diff --git a/cmd/cloud-network-config-controller/main.go b/cmd/cloud-network-config-controller/main.go index 486479a57..0a91f2049 100644 --- a/cmd/cloud-network-config-controller/main.go +++ b/cmd/cloud-network-config-controller/main.go @@ -12,17 +12,12 @@ import ( cloudnetworkclientset "github.com/openshift/client-go/cloudnetwork/clientset/versioned" cloudnetworkscheme "github.com/openshift/client-go/cloudnetwork/clientset/versioned/scheme" cloudnetworkinformers "github.com/openshift/client-go/cloudnetwork/informers/externalversions" - configclient "github.com/openshift/client-go/config/clientset/versioned" - configinformers "github.com/openshift/client-go/config/informers/externalversions" cloudprovider "github.com/openshift/cloud-network-config-controller/pkg/cloudprovider" cloudprivateipconfigcontroller "github.com/openshift/cloud-network-config-controller/pkg/controller/cloudprivateipconfig" configmapcontroller "github.com/openshift/cloud-network-config-controller/pkg/controller/configmap" nodecontroller "github.com/openshift/cloud-network-config-controller/pkg/controller/node" secretcontroller "github.com/openshift/cloud-network-config-controller/pkg/controller/secret" signals "github.com/openshift/cloud-network-config-controller/pkg/signals" - "github.com/openshift/library-go/pkg/operator/configobserver/featuregates" - "github.com/openshift/library-go/pkg/operator/events" - corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" kubeinformers "k8s.io/client-go/informers" "k8s.io/client-go/kubernetes" @@ -31,7 +26,6 @@ import ( "k8s.io/client-go/tools/leaderelection" "k8s.io/client-go/tools/leaderelection/resourcelock" "k8s.io/klog/v2" - "k8s.io/utils/clock" controllerclient "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -40,9 +34,6 @@ const ( resourceLockName = "cloud-network-config-controller-lock" controllerNameEnvVar = "CONTROLLER_NAME" controllerNamespaceEnvVar = "CONTROLLER_NAMESPACE" - operatorVersionEnvVar = "RELEASE_VERSION" - defaultOperatorVersion = "0.0.1-snapshot" - deploymentName = "cloud-network-config-controller" globalInfrastructureName = "cluster" ) @@ -116,30 +107,12 @@ func main() { RetryPeriod: 26 * time.Second, Callbacks: leaderelection.LeaderCallbacks{ OnStartedLeading: func(ctx context.Context) { - featureGateAccessor, err := createFeatureGateAccessor( - ctx, - cfg, - os.Getenv(controllerNameEnvVar), - os.Getenv(controllerNamespaceEnvVar), - deploymentName, - getReleaseVersion(), - stopCh, - ) - if err != nil { - klog.Exitf("Error building feature gate accessor: %s", err.Error()) - } - - featureGates, err := awaitEnabledFeatureGates(featureGateAccessor, 1*time.Minute) - if err != nil { - klog.Fatalf("Failed to get feature gates: %v", err) - } - cloudNetworkClient, err := cloudnetworkclientset.NewForConfig(cfg) if err != nil { klog.Exitf("Error building cloudnetwork clientset: %s", err.Error()) } - cloudProviderClient, err := cloudprovider.NewCloudProviderClient(platformCfg, platformStatus, featureGates) + cloudProviderClient, err := cloudprovider.NewCloudProviderClient(platformCfg, platformStatus) if err != nil { klog.Fatalf("Error building cloud provider client, err: %v", err) } @@ -280,67 +253,6 @@ func init() { } } -// By default, when the enabled/disabled list of featuregates changes, os.Exit is called. -// See featuregates.NewFeatureGateAccess for more information -func createFeatureGateAccessor(ctx context.Context, cfg *rest.Config, operatorName, namespace, deploymentName, operatorVersion string, stop <-chan struct{}) (featuregates.FeatureGateAccess, error) { - ctx, cancelFn := context.WithCancel(ctx) - go func() { - defer cancelFn() - <-stop - }() - - kubeClient, err := kubernetes.NewForConfig(cfg) - if err != nil { - return nil, fmt.Errorf("failed to create kube client: %w", err) - } - - eventRecorder := events.NewKubeRecorder(kubeClient.CoreV1().Events(namespace), operatorName, &corev1.ObjectReference{ - APIVersion: "apps/v1", - Kind: "Deployment", - Namespace: namespace, - Name: deploymentName, - }, clock.RealClock{}) - - configClient, err := configclient.NewForConfig(cfg) - if err != nil { - return nil, fmt.Errorf("failed to create config client: %w", err) - } - configInformers := configinformers.NewSharedInformerFactory(configClient, 10*time.Minute) - - featureGateAccessor := featuregates.NewFeatureGateAccess( - operatorVersion, defaultOperatorVersion, - configInformers.Config().V1().ClusterVersions(), configInformers.Config().V1().FeatureGates(), - eventRecorder, - ) - go featureGateAccessor.Run(ctx) - go configInformers.Start(stop) - - return featureGateAccessor, nil -} - -func awaitEnabledFeatureGates(accessor featuregates.FeatureGateAccess, timeout time.Duration) (featuregates.FeatureGate, error) { - select { - case <-accessor.InitialFeatureGatesObserved(): - featureGates, err := accessor.CurrentFeatureGates() - if err != nil { - return nil, err - } else { - klog.Infof("FeatureGates initialized: knownFeatureGates=%v", featureGates.KnownFeatures()) - return featureGates, nil - } - case <-time.After(timeout): - return nil, fmt.Errorf("timed out waiting for FeatureGate detection") - } -} - -func getReleaseVersion() string { - releaseVersion := os.Getenv(operatorVersionEnvVar) - if len(releaseVersion) == 0 { - return defaultOperatorVersion - } - return releaseVersion -} - func getPlatformStatus(cfg *rest.Config, scheme *runtime.Scheme) (*configv1.PlatformStatus, error) { client, err := controllerclient.New(cfg, controllerclient.Options{Scheme: scheme}) if err != nil { diff --git a/go.mod b/go.mod index e589869da..0bf4faa12 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/onsi/gomega v1.39.0 github.com/openshift/api v0.0.0-20260715165912-72066cc9718b github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec - github.com/openshift/library-go v0.0.0-20260716164659-7926d144f96a github.com/pkg/errors v0.9.1 golang.org/x/oauth2 v0.36.0 google.golang.org/api v0.288.0 @@ -47,8 +46,6 @@ require ( github.com/Azure/go-autorest/tracing v0.6.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.3.3 // indirect github.com/antlr4-go/antlr/v4 v4.13.1 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/blang/semver/v4 v4.0.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/emicklei/go-restful/v3 v3.13.0 // indirect @@ -80,7 +77,6 @@ require ( github.com/google/s2a-go v0.1.9 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.17 // indirect github.com/googleapis/gax-go/v2 v2.22.0 // indirect - github.com/imdario/mergo v0.3.16 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/kylelemons/godebug v1.1.0 // indirect @@ -91,11 +87,8 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.23.2 // indirect - github.com/prometheus/client_model v0.6.2 // indirect github.com/prometheus/common v0.70.0 // indirect github.com/prometheus/procfs v0.21.1 // indirect - github.com/robfig/cron v1.2.0 // indirect github.com/spf13/pflag v1.0.10 // indirect github.com/x448/float16 v0.8.4 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.67.0 // indirect @@ -119,12 +112,8 @@ require ( gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/apiextensions-apiserver v0.36.2 // indirect - k8s.io/apiserver v0.36.2 // indirect - k8s.io/component-base v0.36.2 // indirect - k8s.io/kube-aggregator v0.36.2 // indirect k8s.io/kube-openapi v0.0.0-20260718133925-74c0ba7c0470 // indirect sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 // indirect - sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 // indirect sigs.k8s.io/randfill v1.0.0 // indirect sigs.k8s.io/structured-merge-diff/v6 v6.4.2 // indirect sigs.k8s.io/yaml v1.6.0 // indirect diff --git a/go.sum b/go.sum index 61b8cfd67..cd9367657 100644 --- a/go.sum +++ b/go.sum @@ -58,8 +58,6 @@ github.com/aws/aws-sdk-go v1.37.8 h1:9kywcbuz6vQuTf+FD+U7FshafrHzmqUCjgAEiLuIJ8U github.com/aws/aws-sdk-go v1.37.8/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= -github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -121,8 +119,8 @@ github.com/go-openapi/testify/enable/yaml/v2 v2.6.0 h1:gGHwAJ0R/5jU8BEGDbfRNR3hL github.com/go-openapi/testify/enable/yaml/v2 v2.6.0/go.mod h1:tY+St1SGq4NFl0QIqdTY4aEdbChAHxhyB77XQi9iJCo= github.com/go-openapi/testify/v2 v2.6.0 h1:5PKH2HE7YJ/LuRPQGvSxBRlFXNQhSetBLlGAgUEu3ug= github.com/go-openapi/testify/v2 v2.6.0/go.mod h1:SgsVHtfooshd0tublTtJ50FPKhujf47YRqauXXOUxfw= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= -github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI= github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8= github.com/gofrs/uuid/v5 v5.3.0 h1:m0mUMr+oVYUdxpMLgSYCZiXe7PuVPnI94+OMeVBNedk= @@ -165,8 +163,6 @@ github.com/gophercloud/gophercloud/v2 v2.1.1/go.mod h1:f2hMRC7Kakbv5vM7wSGHrIPZh github.com/gophercloud/utils/v2 v2.0.0-20241008104625-7cbb8fd76bb7 h1:RDFC3+cVfeCQ8zi/PgaKrPzJyUbwzg3Mi2xCWnAW+g4= github.com/gophercloud/utils/v2 v2.0.0-20241008104625-7cbb8fd76bb7/go.mod h1:hLzf9Ts2fhebZrZAtq6BpbwXQLEZmUqa7ABJMkg/il8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= -github.com/imdario/mergo v0.3.16/go.mod h1:WBLT9ZmE3lPoWsEzCh9LPo3TiwVN+ZKEjmz+hD27ysY= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -175,8 +171,6 @@ github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnr github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6 h1:IsMZxCuZqKuao2vNdfD82fjjgPLfyHLpR41Z88viRWs= github.com/keybase/go-keychain v0.0.0-20231219164618-57a3676c3af6/go.mod h1:3VeWNIJaW+O5xpRQbPp0Ybqu1vJd/pm7s2F473HRrkw= -github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo= -github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -210,8 +204,6 @@ github.com/openshift/api v0.0.0-20260715165912-72066cc9718b h1:gN3SihCYEwoIksD+f github.com/openshift/api v0.0.0-20260715165912-72066cc9718b/go.mod h1:k6qH5QOVa5GDln2VVm8Jz4NV3Z7R2SATHFLwGS6Wh3M= github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec h1:UDjX+mot5IVLpcChyBqLXG1oSB29s4UkqFmgNb0Xsqc= github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec/go.mod h1:iMHec0APKVjOH8GfL/RxddX8DuiuSvPlRe+s7KDqlyA= -github.com/openshift/library-go v0.0.0-20260716164659-7926d144f96a h1:Sovnpe/R/QRqGjjjcOhwqD6V65nrTaNwv32B1HIgruk= -github.com/openshift/library-go v0.0.0-20260716164659-7926d144f96a/go.mod h1:iWcB6wgeOhsByZAZGhmzBtEnrLQzABL0s3aeou8AmSI= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -219,8 +211,6 @@ github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0 h1:AHzMWDxNiAVscJL6+4wkvFRTpMnJqiaZFEKA/osaBXE= -github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.74.0/go.mod h1:wAR5JopumPtAZnu0Cjv2PSqV4p4QB09LMhc6fZZTXuA= github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= @@ -231,8 +221,6 @@ github.com/prometheus/procfs v0.21.1 h1:GljZCt+zSTS+NZq88cyQ1LjZ+RCHp3uVuabBWA5+ github.com/prometheus/procfs v0.21.1/go.mod h1:aB55Cww9pdSJVHk0hUf0inxWyyjPogFIjmHKYgMKmtY= github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa9E= github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= -github.com/robfig/cron v1.2.0 h1:ZjScXvvxeQ63Dbyxy76Fj3AT3Ut0aKsyd2/tl3DTMuQ= -github.com/robfig/cron v1.2.0/go.mod h1:JGuDeoQd7Z6yL4zQhZ3OPEVHB7fL6Ka6skscFHfmt2k= github.com/rogpeppe/go-internal v1.14.1 h1:UQB4HGPB6osV0SQTLymcB4TgvyWu6ZyliaW0tI/otEQ= github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7so1lCWt35ZSgc= github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk= @@ -378,18 +366,12 @@ k8s.io/apiextensions-apiserver v0.36.2 h1:3O5gqOj/dt2XWWbpMe+TXWpE9yU6pjM/tXxtHH k8s.io/apiextensions-apiserver v0.36.2/go.mod h1:cL1tBWe8XSaP1H30iWKGo7hf6iAUUUJPEU70dskmAnA= k8s.io/apimachinery v0.36.2 h1:0PE/W/WNy1UX61NLbXY5TMbJ6UwLL6E6lAPkYrKFxbQ= k8s.io/apimachinery v0.36.2/go.mod h1:fvf/HOLXq9RId0rnDIbN1OEBvHXdQbLMM8nu0LcBUf4= -k8s.io/apiserver v0.36.2 h1:6vMnkmHZPeBloNkHUhmZYq7Ylv8WIB8xjyEl+eSt26E= -k8s.io/apiserver v0.36.2/go.mod h1:9PoQ2ikCytrZyZg11mGhLEF5m8Rgsb5FJmYJ4Wvnl1k= k8s.io/client-go v0.36.2 h1:bfgxmFKc9CgqsgX4xKLAAdmTQlWee7Ob/HlDOrJ5TBI= k8s.io/client-go v0.36.2/go.mod h1:1vgO4OAlfPnoLcb+Rze2GF5rAr14w8qjrYMoyXJzQj0= k8s.io/cloud-provider v0.36.2 h1:pqIEKh6E3eBU2qn+B+cTOSfCC0TU7n2AyD++aAaOHkg= k8s.io/cloud-provider v0.36.2/go.mod h1:mVFXxKcbigdGOUebI2zPvzRLfqstkPtdpVy46sqoAWQ= -k8s.io/component-base v0.36.2 h1:Z0VH80O7Ng0HDZnZj3WRR3urEGa0kTwmO8CwEwjVK1w= -k8s.io/component-base v0.36.2/go.mod h1:mGfFOA7Gwpdm1VW2cwSQYbiDIlz8GD2WGwH88QSeCyA= k8s.io/klog/v2 v2.140.0 h1:Tf+J3AH7xnUzZyVVXhTgGhEKnFqye14aadWv7bzXdzc= k8s.io/klog/v2 v2.140.0/go.mod h1:o+/RWfJ6PwpnFn7OyAG3QnO47BFsymfEfrz6XyYSSp0= -k8s.io/kube-aggregator v0.36.2 h1:zfeH9Fs16oDquNfBZef3M27dGG3QtJ9/TwkWfBlw1lo= -k8s.io/kube-aggregator v0.36.2/go.mod h1:UMrB5DfEhznFTf0bqYW2SV26GDy8HNaxoYakvKVWZ8M= k8s.io/kube-openapi v0.0.0-20260718133925-74c0ba7c0470 h1:BVDpOsFos+7pz64ZQ3g3mhfqFNKmBXW2a/BVXwbB7FI= k8s.io/kube-openapi v0.0.0-20260718133925-74c0ba7c0470/go.mod h1:rcZ+P5cEvHQB+m154WBOatIGBgOEPjzmLkXjkHfg3ms= k8s.io/utils v0.0.0-20260707023825-cf1189d6abe3 h1:jVkFFVfXdXP74B/zbO3hM3hpSFD0xvhQ5U686DPurkE= @@ -398,8 +380,6 @@ sigs.k8s.io/controller-runtime v0.24.1 h1:miPEwrmirImAvgME1L9qebGHrOnGJoVmVdtOU9 sigs.k8s.io/controller-runtime v0.24.1/go.mod h1:vFkfY5fGt5xAC/sKb8IBFKgWPNKG9OUG29dR8Y2wImw= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg= sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg= -sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 h1:PFWFSkpArPNJxFX4ZKWAk9NSeRoZaXschn+ULa4xVek= -sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96/go.mod h1:EOBQyBowOUsd7U4CJnMHNE0ri+zCXyouGdLwC/jZU+I= sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU= sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= sigs.k8s.io/structured-merge-diff/v6 v6.4.2 h1:qdOxHwrl2Kaag1aQEarlYcOA9vSyGCp3CIki3aW8c4Q= diff --git a/pkg/cloudprovider/azure.go b/pkg/cloudprovider/azure.go index fd2313a2f..bba19d33c 100644 --- a/pkg/cloudprovider/azure.go +++ b/pkg/cloudprovider/azure.go @@ -48,15 +48,14 @@ const ( // to the Azure cloud API type Azure struct { CloudProvider - platformStatus *configv1.AzurePlatformStatus - resourceGroup string - env azureapi.Environment - vmClient *armcompute.VirtualMachinesClient - virtualNetworkClient *armnetwork.VirtualNetworksClient - networkClient *armnetwork.InterfacesClient - nodeMapLock sync.Mutex - nodeLockMap map[string]*sync.Mutex - azureWorkloadIdentityEnabled bool + platformStatus *configv1.AzurePlatformStatus + resourceGroup string + env azureapi.Environment + vmClient *armcompute.VirtualMachinesClient + virtualNetworkClient *armnetwork.VirtualNetworksClient + networkClient *armnetwork.InterfacesClient + nodeMapLock sync.Mutex + nodeLockMap map[string]*sync.Mutex } type azureCredentialsConfig struct { @@ -605,7 +604,7 @@ func (a *Azure) getAzureCredentials(env azureapi.Environment, cfg *azureCredenti return nil, cloud.Configuration{}, err } } else if strings.TrimSpace(cfg.clientSecret) == "" { - if a.azureWorkloadIdentityEnabled && strings.TrimSpace(cfg.tokenFile) != "" { + if strings.TrimSpace(cfg.tokenFile) != "" { klog.Infof("Using workload identity authentication") if cfg.clientID == "" || cfg.tenantID == "" { return nil, cloud.Configuration{}, fmt.Errorf("clientID and tenantID are required in workload identity authentication") diff --git a/pkg/cloudprovider/cloudprovider.go b/pkg/cloudprovider/cloudprovider.go index 32ca861f6..3fed53a10 100644 --- a/pkg/cloudprovider/cloudprovider.go +++ b/pkg/cloudprovider/cloudprovider.go @@ -10,8 +10,6 @@ import ( "sync" configv1 "github.com/openshift/api/config/v1" - apifeatures "github.com/openshift/api/features" - "github.com/openshift/library-go/pkg/operator/configobserver/featuregates" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/util/sets" @@ -135,8 +133,7 @@ func (n *NodeEgressIPConfiguration) String() string { } func NewCloudProviderClient(cfg CloudProviderConfig, - platformStatus *configv1.PlatformStatus, - featureGates featuregates.FeatureGate) (CloudProviderIntf, error) { + platformStatus *configv1.PlatformStatus) (CloudProviderIntf, error) { var cloudProviderIntf CloudProviderIntf // Initialize a separate context from the main context, rationale: cloud @@ -159,10 +156,9 @@ func NewCloudProviderClient(cfg CloudProviderConfig, } cloudProviderIntf = &Azure{ - CloudProvider: cp, - platformStatus: azurePlatformStatus, - nodeLockMap: make(map[string]*sync.Mutex), - azureWorkloadIdentityEnabled: featureGates.Enabled(apifeatures.FeatureGateAzureWorkloadIdentity), + CloudProvider: cp, + platformStatus: azurePlatformStatus, + nodeLockMap: make(map[string]*sync.Mutex), } case PlatformTypeAWS: cloudProviderIntf = &AWS{ diff --git a/vendor/github.com/beorn7/perks/LICENSE b/vendor/github.com/beorn7/perks/LICENSE deleted file mode 100644 index 339177be6..000000000 --- a/vendor/github.com/beorn7/perks/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -Copyright (C) 2013 Blake Mizerany - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/beorn7/perks/quantile/exampledata.txt b/vendor/github.com/beorn7/perks/quantile/exampledata.txt deleted file mode 100644 index 1602287d7..000000000 --- a/vendor/github.com/beorn7/perks/quantile/exampledata.txt +++ /dev/null @@ -1,2388 +0,0 @@ -8 -5 -26 -12 -5 -235 -13 -6 -28 -30 -3 -3 -3 -3 -5 -2 -33 -7 -2 -4 -7 -12 -14 -5 -8 -3 -10 -4 -5 -3 -6 -6 -209 -20 -3 -10 -14 -3 -4 -6 -8 -5 -11 -7 -3 -2 -3 -3 -212 -5 -222 -4 -10 -10 -5 -6 -3 -8 -3 -10 -254 -220 -2 -3 -5 -24 -5 -4 -222 -7 -3 -3 -223 -8 -15 -12 -14 -14 -3 -2 -2 -3 -13 -3 -11 -4 -4 -6 -5 -7 -13 -5 -3 -5 -2 -5 -3 -5 -2 -7 -15 -17 -14 -3 -6 -6 -3 -17 -5 -4 -7 -6 -4 -4 -8 -6 -8 -3 -9 -3 -6 -3 -4 -5 -3 -3 -660 -4 -6 -10 -3 -6 -3 -2 -5 -13 -2 -4 -4 -10 -4 -8 -4 -3 -7 -9 -9 -3 -10 -37 -3 -13 -4 -12 -3 -6 -10 -8 -5 -21 -2 -3 -8 -3 -2 -3 -3 -4 -12 -2 -4 -8 -8 -4 -3 -2 -20 -1 -6 -32 -2 -11 -6 -18 -3 -8 -11 -3 -212 -3 -4 -2 -6 -7 -12 -11 -3 -2 -16 -10 -6 -4 -6 -3 -2 -7 -3 -2 -2 -2 -2 -5 -6 -4 -3 -10 -3 -4 -6 -5 -3 -4 -4 -5 -6 -4 -3 -4 -4 -5 -7 -5 -5 -3 -2 -7 -2 -4 -12 -4 -5 -6 -2 -4 -4 -8 -4 -15 -13 -7 -16 -5 -3 -23 -5 -5 -7 -3 -2 -9 -8 -7 -5 -8 -11 -4 -10 -76 -4 -47 -4 -3 -2 -7 -4 -2 -3 -37 -10 -4 -2 -20 -5 -4 -4 -10 -10 -4 -3 -7 -23 -240 -7 -13 -5 -5 -3 -3 -2 -5 -4 -2 -8 -7 -19 -2 -23 -8 -7 -2 -5 -3 -8 -3 -8 -13 -5 -5 -5 -2 -3 -23 -4 -9 -8 -4 -3 -3 -5 -220 -2 -3 -4 -6 -14 -3 -53 -6 -2 -5 -18 -6 -3 -219 -6 -5 -2 -5 -3 -6 -5 -15 -4 -3 -17 -3 -2 -4 -7 -2 -3 -3 -4 -4 -3 -2 -664 -6 -3 -23 -5 -5 -16 -5 -8 -2 -4 -2 -24 -12 -3 -2 -3 -5 -8 -3 -5 -4 -3 -14 -3 -5 -8 -2 -3 -7 -9 -4 -2 -3 -6 -8 -4 -3 -4 -6 -5 -3 -3 -6 -3 -19 -4 -4 -6 -3 -6 -3 -5 -22 -5 -4 -4 -3 -8 -11 -4 -9 -7 -6 -13 -4 -4 -4 -6 -17 -9 -3 -3 -3 -4 -3 -221 -5 -11 -3 -4 -2 -12 -6 -3 -5 -7 -5 -7 -4 -9 -7 -14 -37 -19 -217 -16 -3 -5 -2 -2 -7 -19 -7 -6 -7 -4 -24 -5 -11 -4 -7 -7 -9 -13 -3 -4 -3 -6 -28 -4 -4 -5 -5 -2 -5 -6 -4 -4 -6 -10 -5 -4 -3 -2 -3 -3 -6 -5 -5 -4 -3 -2 -3 -7 -4 -6 -18 -16 -8 -16 -4 -5 -8 -6 -9 -13 -1545 -6 -215 -6 -5 -6 -3 -45 -31 -5 -2 -2 -4 -3 -3 -2 -5 -4 -3 -5 -7 -7 -4 -5 -8 -5 -4 -749 -2 -31 -9 -11 -2 -11 -5 -4 -4 -7 -9 -11 -4 -5 -4 -7 -3 -4 -6 -2 -15 -3 -4 -3 -4 -3 -5 -2 -13 -5 -5 -3 -3 -23 -4 -4 -5 -7 -4 -13 -2 -4 -3 -4 -2 -6 -2 -7 -3 -5 -5 -3 -29 -5 -4 -4 -3 -10 -2 -3 -79 -16 -6 -6 -7 -7 -3 -5 -5 -7 -4 -3 -7 -9 -5 -6 -5 -9 -6 -3 -6 -4 -17 -2 -10 -9 -3 -6 -2 -3 -21 -22 -5 -11 -4 -2 -17 -2 -224 -2 -14 -3 -4 -4 -2 -4 -4 -4 -4 -5 -3 -4 -4 -10 -2 -6 -3 -3 -5 -7 -2 -7 -5 -6 -3 -218 -2 -2 -5 -2 -6 -3 -5 -222 -14 -6 -33 -3 -2 -5 -3 -3 -3 -9 -5 -3 -3 -2 -7 -4 -3 -4 -3 -5 -6 -5 -26 -4 -13 -9 -7 -3 -221 -3 -3 -4 -4 -4 -4 -2 -18 -5 -3 -7 -9 -6 -8 -3 -10 -3 -11 -9 -5 -4 -17 -5 -5 -6 -6 -3 -2 -4 -12 -17 -6 -7 -218 -4 -2 -4 -10 -3 -5 -15 -3 -9 -4 -3 -3 -6 -29 -3 -3 -4 -5 -5 -3 -8 -5 -6 -6 -7 -5 -3 -5 -3 -29 -2 -31 -5 -15 -24 -16 -5 -207 -4 -3 -3 -2 -15 -4 -4 -13 -5 -5 -4 -6 -10 -2 -7 -8 -4 -6 -20 -5 -3 -4 -3 -12 -12 -5 -17 -7 -3 -3 -3 -6 -10 -3 -5 -25 -80 -4 -9 -3 -2 -11 -3 -3 -2 -3 -8 -7 -5 -5 -19 -5 -3 -3 -12 -11 -2 -6 -5 -5 -5 -3 -3 -3 -4 -209 -14 -3 -2 -5 -19 -4 -4 -3 -4 -14 -5 -6 -4 -13 -9 -7 -4 -7 -10 -2 -9 -5 -7 -2 -8 -4 -6 -5 -5 -222 -8 -7 -12 -5 -216 -3 -4 -4 -6 -3 -14 -8 -7 -13 -4 -3 -3 -3 -3 -17 -5 -4 -3 -33 -6 -6 -33 -7 -5 -3 -8 -7 -5 -2 -9 -4 -2 -233 -24 -7 -4 -8 -10 -3 -4 -15 -2 -16 -3 -3 -13 -12 -7 -5 -4 -207 -4 -2 -4 -27 -15 -2 -5 -2 -25 -6 -5 -5 -6 -13 -6 -18 -6 -4 -12 -225 -10 -7 -5 -2 -2 -11 -4 -14 -21 -8 -10 -3 -5 -4 -232 -2 -5 -5 -3 -7 -17 -11 -6 -6 -23 -4 -6 -3 -5 -4 -2 -17 -3 -6 -5 -8 -3 -2 -2 -14 -9 -4 -4 -2 -5 -5 -3 -7 -6 -12 -6 -10 -3 -6 -2 -2 -19 -5 -4 -4 -9 -2 -4 -13 -3 -5 -6 -3 -6 -5 -4 -9 -6 -3 -5 -7 -3 -6 -6 -4 -3 -10 -6 -3 -221 -3 -5 -3 -6 -4 -8 -5 -3 -6 -4 -4 -2 -54 -5 -6 -11 -3 -3 -4 -4 -4 -3 -7 -3 -11 -11 -7 -10 -6 -13 -223 -213 -15 -231 -7 -3 -7 -228 -2 -3 -4 -4 -5 -6 -7 -4 -13 -3 -4 -5 -3 -6 -4 -6 -7 -2 -4 -3 -4 -3 -3 -6 -3 -7 -3 -5 -18 -5 -6 -8 -10 -3 -3 -3 -2 -4 -2 -4 -4 -5 -6 -6 -4 -10 -13 -3 -12 -5 -12 -16 -8 -4 -19 -11 -2 -4 -5 -6 -8 -5 -6 -4 -18 -10 -4 -2 -216 -6 -6 -6 -2 -4 -12 -8 -3 -11 -5 -6 -14 -5 -3 -13 -4 -5 -4 -5 -3 -28 -6 -3 -7 -219 -3 -9 -7 -3 -10 -6 -3 -4 -19 -5 -7 -11 -6 -15 -19 -4 -13 -11 -3 -7 -5 -10 -2 -8 -11 -2 -6 -4 -6 -24 -6 -3 -3 -3 -3 -6 -18 -4 -11 -4 -2 -5 -10 -8 -3 -9 -5 -3 -4 -5 -6 -2 -5 -7 -4 -4 -14 -6 -4 -4 -5 -5 -7 -2 -4 -3 -7 -3 -3 -6 -4 -5 -4 -4 -4 -3 -3 -3 -3 -8 -14 -2 -3 -5 -3 -2 -4 -5 -3 -7 -3 -3 -18 -3 -4 -4 -5 -7 -3 -3 -3 -13 -5 -4 -8 -211 -5 -5 -3 -5 -2 -5 -4 -2 -655 -6 -3 -5 -11 -2 -5 -3 -12 -9 -15 -11 -5 -12 -217 -2 -6 -17 -3 -3 -207 -5 -5 -4 -5 -9 -3 -2 -8 -5 -4 -3 -2 -5 -12 -4 -14 -5 -4 -2 -13 -5 -8 -4 -225 -4 -3 -4 -5 -4 -3 -3 -6 -23 -9 -2 -6 -7 -233 -4 -4 -6 -18 -3 -4 -6 -3 -4 -4 -2 -3 -7 -4 -13 -227 -4 -3 -5 -4 -2 -12 -9 -17 -3 -7 -14 -6 -4 -5 -21 -4 -8 -9 -2 -9 -25 -16 -3 -6 -4 -7 -8 -5 -2 -3 -5 -4 -3 -3 -5 -3 -3 -3 -2 -3 -19 -2 -4 -3 -4 -2 -3 -4 -4 -2 -4 -3 -3 -3 -2 -6 -3 -17 -5 -6 -4 -3 -13 -5 -3 -3 -3 -4 -9 -4 -2 -14 -12 -4 -5 -24 -4 -3 -37 -12 -11 -21 -3 -4 -3 -13 -4 -2 -3 -15 -4 -11 -4 -4 -3 -8 -3 -4 -4 -12 -8 -5 -3 -3 -4 -2 -220 -3 -5 -223 -3 -3 -3 -10 -3 -15 -4 -241 -9 -7 -3 -6 -6 -23 -4 -13 -7 -3 -4 -7 -4 -9 -3 -3 -4 -10 -5 -5 -1 -5 -24 -2 -4 -5 -5 -6 -14 -3 -8 -2 -3 -5 -13 -13 -3 -5 -2 -3 -15 -3 -4 -2 -10 -4 -4 -4 -5 -5 -3 -5 -3 -4 -7 -4 -27 -3 -6 -4 -15 -3 -5 -6 -6 -5 -4 -8 -3 -9 -2 -6 -3 -4 -3 -7 -4 -18 -3 -11 -3 -3 -8 -9 -7 -24 -3 -219 -7 -10 -4 -5 -9 -12 -2 -5 -4 -4 -4 -3 -3 -19 -5 -8 -16 -8 -6 -22 -3 -23 -3 -242 -9 -4 -3 -3 -5 -7 -3 -3 -5 -8 -3 -7 -5 -14 -8 -10 -3 -4 -3 -7 -4 -6 -7 -4 -10 -4 -3 -11 -3 -7 -10 -3 -13 -6 -8 -12 -10 -5 -7 -9 -3 -4 -7 -7 -10 -8 -30 -9 -19 -4 -3 -19 -15 -4 -13 -3 -215 -223 -4 -7 -4 -8 -17 -16 -3 -7 -6 -5 -5 -4 -12 -3 -7 -4 -4 -13 -4 -5 -2 -5 -6 -5 -6 -6 -7 -10 -18 -23 -9 -3 -3 -6 -5 -2 -4 -2 -7 -3 -3 -2 -5 -5 -14 -10 -224 -6 -3 -4 -3 -7 -5 -9 -3 -6 -4 -2 -5 -11 -4 -3 -3 -2 -8 -4 -7 -4 -10 -7 -3 -3 -18 -18 -17 -3 -3 -3 -4 -5 -3 -3 -4 -12 -7 -3 -11 -13 -5 -4 -7 -13 -5 -4 -11 -3 -12 -3 -6 -4 -4 -21 -4 -6 -9 -5 -3 -10 -8 -4 -6 -4 -4 -6 -5 -4 -8 -6 -4 -6 -4 -4 -5 -9 -6 -3 -4 -2 -9 -3 -18 -2 -4 -3 -13 -3 -6 -6 -8 -7 -9 -3 -2 -16 -3 -4 -6 -3 -2 -33 -22 -14 -4 -9 -12 -4 -5 -6 -3 -23 -9 -4 -3 -5 -5 -3 -4 -5 -3 -5 -3 -10 -4 -5 -5 -8 -4 -4 -6 -8 -5 -4 -3 -4 -6 -3 -3 -3 -5 -9 -12 -6 -5 -9 -3 -5 -3 -2 -2 -2 -18 -3 -2 -21 -2 -5 -4 -6 -4 -5 -10 -3 -9 -3 -2 -10 -7 -3 -6 -6 -4 -4 -8 -12 -7 -3 -7 -3 -3 -9 -3 -4 -5 -4 -4 -5 -5 -10 -15 -4 -4 -14 -6 -227 -3 -14 -5 -216 -22 -5 -4 -2 -2 -6 -3 -4 -2 -9 -9 -4 -3 -28 -13 -11 -4 -5 -3 -3 -2 -3 -3 -5 -3 -4 -3 -5 -23 -26 -3 -4 -5 -6 -4 -6 -3 -5 -5 -3 -4 -3 -2 -2 -2 -7 -14 -3 -6 -7 -17 -2 -2 -15 -14 -16 -4 -6 -7 -13 -6 -4 -5 -6 -16 -3 -3 -28 -3 -6 -15 -3 -9 -2 -4 -6 -3 -3 -22 -4 -12 -6 -7 -2 -5 -4 -10 -3 -16 -6 -9 -2 -5 -12 -7 -5 -5 -5 -5 -2 -11 -9 -17 -4 -3 -11 -7 -3 -5 -15 -4 -3 -4 -211 -8 -7 -5 -4 -7 -6 -7 -6 -3 -6 -5 -6 -5 -3 -4 -4 -26 -4 -6 -10 -4 -4 -3 -2 -3 -3 -4 -5 -9 -3 -9 -4 -4 -5 -5 -8 -2 -4 -2 -3 -8 -4 -11 -19 -5 -8 -6 -3 -5 -6 -12 -3 -2 -4 -16 -12 -3 -4 -4 -8 -6 -5 -6 -6 -219 -8 -222 -6 -16 -3 -13 -19 -5 -4 -3 -11 -6 -10 -4 -7 -7 -12 -5 -3 -3 -5 -6 -10 -3 -8 -2 -5 -4 -7 -2 -4 -4 -2 -12 -9 -6 -4 -2 -40 -2 -4 -10 -4 -223 -4 -2 -20 -6 -7 -24 -5 -4 -5 -2 -20 -16 -6 -5 -13 -2 -3 -3 -19 -3 -2 -4 -5 -6 -7 -11 -12 -5 -6 -7 -7 -3 -5 -3 -5 -3 -14 -3 -4 -4 -2 -11 -1 -7 -3 -9 -6 -11 -12 -5 -8 -6 -221 -4 -2 -12 -4 -3 -15 -4 -5 -226 -7 -218 -7 -5 -4 -5 -18 -4 -5 -9 -4 -4 -2 -9 -18 -18 -9 -5 -6 -6 -3 -3 -7 -3 -5 -4 -4 -4 -12 -3 -6 -31 -5 -4 -7 -3 -6 -5 -6 -5 -11 -2 -2 -11 -11 -6 -7 -5 -8 -7 -10 -5 -23 -7 -4 -3 -5 -34 -2 -5 -23 -7 -3 -6 -8 -4 -4 -4 -2 -5 -3 -8 -5 -4 -8 -25 -2 -3 -17 -8 -3 -4 -8 -7 -3 -15 -6 -5 -7 -21 -9 -5 -6 -6 -5 -3 -2 -3 -10 -3 -6 -3 -14 -7 -4 -4 -8 -7 -8 -2 -6 -12 -4 -213 -6 -5 -21 -8 -2 -5 -23 -3 -11 -2 -3 -6 -25 -2 -3 -6 -7 -6 -6 -4 -4 -6 -3 -17 -9 -7 -6 -4 -3 -10 -7 -2 -3 -3 -3 -11 -8 -3 -7 -6 -4 -14 -36 -3 -4 -3 -3 -22 -13 -21 -4 -2 -7 -4 -4 -17 -15 -3 -7 -11 -2 -4 -7 -6 -209 -6 -3 -2 -2 -24 -4 -9 -4 -3 -3 -3 -29 -2 -2 -4 -3 -3 -5 -4 -6 -3 -3 -2 -4 diff --git a/vendor/github.com/beorn7/perks/quantile/stream.go b/vendor/github.com/beorn7/perks/quantile/stream.go deleted file mode 100644 index d7d14f8eb..000000000 --- a/vendor/github.com/beorn7/perks/quantile/stream.go +++ /dev/null @@ -1,316 +0,0 @@ -// Package quantile computes approximate quantiles over an unbounded data -// stream within low memory and CPU bounds. -// -// A small amount of accuracy is traded to achieve the above properties. -// -// Multiple streams can be merged before calling Query to generate a single set -// of results. This is meaningful when the streams represent the same type of -// data. See Merge and Samples. -// -// For more detailed information about the algorithm used, see: -// -// Effective Computation of Biased Quantiles over Data Streams -// -// http://www.cs.rutgers.edu/~muthu/bquant.pdf -package quantile - -import ( - "math" - "sort" -) - -// Sample holds an observed value and meta information for compression. JSON -// tags have been added for convenience. -type Sample struct { - Value float64 `json:",string"` - Width float64 `json:",string"` - Delta float64 `json:",string"` -} - -// Samples represents a slice of samples. It implements sort.Interface. -type Samples []Sample - -func (a Samples) Len() int { return len(a) } -func (a Samples) Less(i, j int) bool { return a[i].Value < a[j].Value } -func (a Samples) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -type invariant func(s *stream, r float64) float64 - -// NewLowBiased returns an initialized Stream for low-biased quantiles -// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but -// error guarantees can still be given even for the lower ranks of the data -// distribution. -// -// The provided epsilon is a relative error, i.e. the true quantile of a value -// returned by a query is guaranteed to be within (1±Epsilon)*Quantile. -// -// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error -// properties. -func NewLowBiased(epsilon float64) *Stream { - ƒ := func(s *stream, r float64) float64 { - return 2 * epsilon * r - } - return newStream(ƒ) -} - -// NewHighBiased returns an initialized Stream for high-biased quantiles -// (e.g. 0.01, 0.1, 0.5) where the needed quantiles are not known a priori, but -// error guarantees can still be given even for the higher ranks of the data -// distribution. -// -// The provided epsilon is a relative error, i.e. the true quantile of a value -// returned by a query is guaranteed to be within 1-(1±Epsilon)*(1-Quantile). -// -// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error -// properties. -func NewHighBiased(epsilon float64) *Stream { - ƒ := func(s *stream, r float64) float64 { - return 2 * epsilon * (s.n - r) - } - return newStream(ƒ) -} - -// NewTargeted returns an initialized Stream concerned with a particular set of -// quantile values that are supplied a priori. Knowing these a priori reduces -// space and computation time. The targets map maps the desired quantiles to -// their absolute errors, i.e. the true quantile of a value returned by a query -// is guaranteed to be within (Quantile±Epsilon). -// -// See http://www.cs.rutgers.edu/~muthu/bquant.pdf for time, space, and error properties. -func NewTargeted(targetMap map[float64]float64) *Stream { - // Convert map to slice to avoid slow iterations on a map. - // ƒ is called on the hot path, so converting the map to a slice - // beforehand results in significant CPU savings. - targets := targetMapToSlice(targetMap) - - ƒ := func(s *stream, r float64) float64 { - var m = math.MaxFloat64 - var f float64 - for _, t := range targets { - if t.quantile*s.n <= r { - f = (2 * t.epsilon * r) / t.quantile - } else { - f = (2 * t.epsilon * (s.n - r)) / (1 - t.quantile) - } - if f < m { - m = f - } - } - return m - } - return newStream(ƒ) -} - -type target struct { - quantile float64 - epsilon float64 -} - -func targetMapToSlice(targetMap map[float64]float64) []target { - targets := make([]target, 0, len(targetMap)) - - for quantile, epsilon := range targetMap { - t := target{ - quantile: quantile, - epsilon: epsilon, - } - targets = append(targets, t) - } - - return targets -} - -// Stream computes quantiles for a stream of float64s. It is not thread-safe by -// design. Take care when using across multiple goroutines. -type Stream struct { - *stream - b Samples - sorted bool -} - -func newStream(ƒ invariant) *Stream { - x := &stream{ƒ: ƒ} - return &Stream{x, make(Samples, 0, 500), true} -} - -// Insert inserts v into the stream. -func (s *Stream) Insert(v float64) { - s.insert(Sample{Value: v, Width: 1}) -} - -func (s *Stream) insert(sample Sample) { - s.b = append(s.b, sample) - s.sorted = false - if len(s.b) == cap(s.b) { - s.flush() - } -} - -// Query returns the computed qth percentiles value. If s was created with -// NewTargeted, and q is not in the set of quantiles provided a priori, Query -// will return an unspecified result. -func (s *Stream) Query(q float64) float64 { - if !s.flushed() { - // Fast path when there hasn't been enough data for a flush; - // this also yields better accuracy for small sets of data. - l := len(s.b) - if l == 0 { - return 0 - } - i := int(math.Ceil(float64(l) * q)) - if i > 0 { - i -= 1 - } - s.maybeSort() - return s.b[i].Value - } - s.flush() - return s.stream.query(q) -} - -// Merge merges samples into the underlying streams samples. This is handy when -// merging multiple streams from separate threads, database shards, etc. -// -// ATTENTION: This method is broken and does not yield correct results. The -// underlying algorithm is not capable of merging streams correctly. -func (s *Stream) Merge(samples Samples) { - sort.Sort(samples) - s.stream.merge(samples) -} - -// Reset reinitializes and clears the list reusing the samples buffer memory. -func (s *Stream) Reset() { - s.stream.reset() - s.b = s.b[:0] -} - -// Samples returns stream samples held by s. -func (s *Stream) Samples() Samples { - if !s.flushed() { - return s.b - } - s.flush() - return s.stream.samples() -} - -// Count returns the total number of samples observed in the stream -// since initialization. -func (s *Stream) Count() int { - return len(s.b) + s.stream.count() -} - -func (s *Stream) flush() { - s.maybeSort() - s.stream.merge(s.b) - s.b = s.b[:0] -} - -func (s *Stream) maybeSort() { - if !s.sorted { - s.sorted = true - sort.Sort(s.b) - } -} - -func (s *Stream) flushed() bool { - return len(s.stream.l) > 0 -} - -type stream struct { - n float64 - l []Sample - ƒ invariant -} - -func (s *stream) reset() { - s.l = s.l[:0] - s.n = 0 -} - -func (s *stream) insert(v float64) { - s.merge(Samples{{v, 1, 0}}) -} - -func (s *stream) merge(samples Samples) { - // TODO(beorn7): This tries to merge not only individual samples, but - // whole summaries. The paper doesn't mention merging summaries at - // all. Unittests show that the merging is inaccurate. Find out how to - // do merges properly. - var r float64 - i := 0 - for _, sample := range samples { - for ; i < len(s.l); i++ { - c := s.l[i] - if c.Value > sample.Value { - // Insert at position i. - s.l = append(s.l, Sample{}) - copy(s.l[i+1:], s.l[i:]) - s.l[i] = Sample{ - sample.Value, - sample.Width, - math.Max(sample.Delta, math.Floor(s.ƒ(s, r))-1), - // TODO(beorn7): How to calculate delta correctly? - } - i++ - goto inserted - } - r += c.Width - } - s.l = append(s.l, Sample{sample.Value, sample.Width, 0}) - i++ - inserted: - s.n += sample.Width - r += sample.Width - } - s.compress() -} - -func (s *stream) count() int { - return int(s.n) -} - -func (s *stream) query(q float64) float64 { - t := math.Ceil(q * s.n) - t += math.Ceil(s.ƒ(s, t) / 2) - p := s.l[0] - var r float64 - for _, c := range s.l[1:] { - r += p.Width - if r+c.Width+c.Delta > t { - return p.Value - } - p = c - } - return p.Value -} - -func (s *stream) compress() { - if len(s.l) < 2 { - return - } - x := s.l[len(s.l)-1] - xi := len(s.l) - 1 - r := s.n - 1 - x.Width - - for i := len(s.l) - 2; i >= 0; i-- { - c := s.l[i] - if c.Width+x.Width+x.Delta <= s.ƒ(s, r) { - x.Width += c.Width - s.l[xi] = x - // Remove element at i. - copy(s.l[i:], s.l[i+1:]) - s.l = s.l[:len(s.l)-1] - xi -= 1 - } else { - x = c - xi = i - } - r -= c.Width - } -} - -func (s *stream) samples() Samples { - samples := make(Samples, len(s.l)) - copy(samples, s.l) - return samples -} diff --git a/vendor/github.com/blang/semver/v4/LICENSE b/vendor/github.com/blang/semver/v4/LICENSE deleted file mode 100644 index 5ba5c86fc..000000000 --- a/vendor/github.com/blang/semver/v4/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -The MIT License - -Copyright (c) 2014 Benedikt Lang - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - diff --git a/vendor/github.com/blang/semver/v4/json.go b/vendor/github.com/blang/semver/v4/json.go deleted file mode 100644 index a74bf7c44..000000000 --- a/vendor/github.com/blang/semver/v4/json.go +++ /dev/null @@ -1,23 +0,0 @@ -package semver - -import ( - "encoding/json" -) - -// MarshalJSON implements the encoding/json.Marshaler interface. -func (v Version) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements the encoding/json.Unmarshaler interface. -func (v *Version) UnmarshalJSON(data []byte) (err error) { - var versionString string - - if err = json.Unmarshal(data, &versionString); err != nil { - return - } - - *v, err = Parse(versionString) - - return -} diff --git a/vendor/github.com/blang/semver/v4/range.go b/vendor/github.com/blang/semver/v4/range.go deleted file mode 100644 index 95f7139b9..000000000 --- a/vendor/github.com/blang/semver/v4/range.go +++ /dev/null @@ -1,416 +0,0 @@ -package semver - -import ( - "fmt" - "strconv" - "strings" - "unicode" -) - -type wildcardType int - -const ( - noneWildcard wildcardType = iota - majorWildcard wildcardType = 1 - minorWildcard wildcardType = 2 - patchWildcard wildcardType = 3 -) - -func wildcardTypefromInt(i int) wildcardType { - switch i { - case 1: - return majorWildcard - case 2: - return minorWildcard - case 3: - return patchWildcard - default: - return noneWildcard - } -} - -type comparator func(Version, Version) bool - -var ( - compEQ comparator = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 0 - } - compNE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) != 0 - } - compGT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == 1 - } - compGE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) >= 0 - } - compLT = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) == -1 - } - compLE = func(v1 Version, v2 Version) bool { - return v1.Compare(v2) <= 0 - } -) - -type versionRange struct { - v Version - c comparator -} - -// rangeFunc creates a Range from the given versionRange. -func (vr *versionRange) rangeFunc() Range { - return Range(func(v Version) bool { - return vr.c(v, vr.v) - }) -} - -// Range represents a range of versions. -// A Range can be used to check if a Version satisfies it: -// -// range, err := semver.ParseRange(">1.0.0 <2.0.0") -// range(semver.MustParse("1.1.1") // returns true -type Range func(Version) bool - -// OR combines the existing Range with another Range using logical OR. -func (rf Range) OR(f Range) Range { - return Range(func(v Version) bool { - return rf(v) || f(v) - }) -} - -// AND combines the existing Range with another Range using logical AND. -func (rf Range) AND(f Range) Range { - return Range(func(v Version) bool { - return rf(v) && f(v) - }) -} - -// ParseRange parses a range and returns a Range. -// If the range could not be parsed an error is returned. -// -// Valid ranges are: -// - "<1.0.0" -// - "<=1.0.0" -// - ">1.0.0" -// - ">=1.0.0" -// - "1.0.0", "=1.0.0", "==1.0.0" -// - "!1.0.0", "!=1.0.0" -// -// A Range can consist of multiple ranges separated by space: -// Ranges can be linked by logical AND: -// - ">1.0.0 <2.0.0" would match between both ranges, so "1.1.1" and "1.8.7" but not "1.0.0" or "2.0.0" -// - ">1.0.0 <3.0.0 !2.0.3-beta.2" would match every version between 1.0.0 and 3.0.0 except 2.0.3-beta.2 -// -// Ranges can also be linked by logical OR: -// - "<2.0.0 || >=3.0.0" would match "1.x.x" and "3.x.x" but not "2.x.x" -// -// AND has a higher precedence than OR. It's not possible to use brackets. -// -// Ranges can be combined by both AND and OR -// -// - `>1.0.0 <2.0.0 || >3.0.0 !4.2.1` would match `1.2.3`, `1.9.9`, `3.1.1`, but not `4.2.1`, `2.1.1` -func ParseRange(s string) (Range, error) { - parts := splitAndTrim(s) - orParts, err := splitORParts(parts) - if err != nil { - return nil, err - } - expandedParts, err := expandWildcardVersion(orParts) - if err != nil { - return nil, err - } - var orFn Range - for _, p := range expandedParts { - var andFn Range - for _, ap := range p { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - vr, err := buildVersionRange(opStr, vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse Range %q: %s", ap, err) - } - rf := vr.rangeFunc() - - // Set function - if andFn == nil { - andFn = rf - } else { // Combine with existing function - andFn = andFn.AND(rf) - } - } - if orFn == nil { - orFn = andFn - } else { - orFn = orFn.OR(andFn) - } - - } - return orFn, nil -} - -// splitORParts splits the already cleaned parts by '||'. -// Checks for invalid positions of the operator and returns an -// error if found. -func splitORParts(parts []string) ([][]string, error) { - var ORparts [][]string - last := 0 - for i, p := range parts { - if p == "||" { - if i == 0 { - return nil, fmt.Errorf("First element in range is '||'") - } - ORparts = append(ORparts, parts[last:i]) - last = i + 1 - } - } - if last == len(parts) { - return nil, fmt.Errorf("Last element in range is '||'") - } - ORparts = append(ORparts, parts[last:]) - return ORparts, nil -} - -// buildVersionRange takes a slice of 2: operator and version -// and builds a versionRange, otherwise an error. -func buildVersionRange(opStr, vStr string) (*versionRange, error) { - c := parseComparator(opStr) - if c == nil { - return nil, fmt.Errorf("Could not parse comparator %q in %q", opStr, strings.Join([]string{opStr, vStr}, "")) - } - v, err := Parse(vStr) - if err != nil { - return nil, fmt.Errorf("Could not parse version %q in %q: %s", vStr, strings.Join([]string{opStr, vStr}, ""), err) - } - - return &versionRange{ - v: v, - c: c, - }, nil - -} - -// inArray checks if a byte is contained in an array of bytes -func inArray(s byte, list []byte) bool { - for _, el := range list { - if el == s { - return true - } - } - return false -} - -// splitAndTrim splits a range string by spaces and cleans whitespaces -func splitAndTrim(s string) (result []string) { - last := 0 - var lastChar byte - excludeFromSplit := []byte{'>', '<', '='} - for i := 0; i < len(s); i++ { - if s[i] == ' ' && !inArray(lastChar, excludeFromSplit) { - if last < i-1 { - result = append(result, s[last:i]) - } - last = i + 1 - } else if s[i] != ' ' { - lastChar = s[i] - } - } - if last < len(s)-1 { - result = append(result, s[last:]) - } - - for i, v := range result { - result[i] = strings.Replace(v, " ", "", -1) - } - - // parts := strings.Split(s, " ") - // for _, x := range parts { - // if s := strings.TrimSpace(x); len(s) != 0 { - // result = append(result, s) - // } - // } - return -} - -// splitComparatorVersion splits the comparator from the version. -// Input must be free of leading or trailing spaces. -func splitComparatorVersion(s string) (string, string, error) { - i := strings.IndexFunc(s, unicode.IsDigit) - if i == -1 { - return "", "", fmt.Errorf("Could not get version from string: %q", s) - } - return strings.TrimSpace(s[0:i]), s[i:], nil -} - -// getWildcardType will return the type of wildcard that the -// passed version contains -func getWildcardType(vStr string) wildcardType { - parts := strings.Split(vStr, ".") - nparts := len(parts) - wildcard := parts[nparts-1] - - possibleWildcardType := wildcardTypefromInt(nparts) - if wildcard == "x" { - return possibleWildcardType - } - - return noneWildcard -} - -// createVersionFromWildcard will convert a wildcard version -// into a regular version, replacing 'x's with '0's, handling -// special cases like '1.x.x' and '1.x' -func createVersionFromWildcard(vStr string) string { - // handle 1.x.x - vStr2 := strings.Replace(vStr, ".x.x", ".x", 1) - vStr2 = strings.Replace(vStr2, ".x", ".0", 1) - parts := strings.Split(vStr2, ".") - - // handle 1.x - if len(parts) == 2 { - return vStr2 + ".0" - } - - return vStr2 -} - -// incrementMajorVersion will increment the major version -// of the passed version -func incrementMajorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[0]) - if err != nil { - return "", err - } - parts[0] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// incrementMajorVersion will increment the minor version -// of the passed version -func incrementMinorVersion(vStr string) (string, error) { - parts := strings.Split(vStr, ".") - i, err := strconv.Atoi(parts[1]) - if err != nil { - return "", err - } - parts[1] = strconv.Itoa(i + 1) - - return strings.Join(parts, "."), nil -} - -// expandWildcardVersion will expand wildcards inside versions -// following these rules: -// -// * when dealing with patch wildcards: -// >= 1.2.x will become >= 1.2.0 -// <= 1.2.x will become < 1.3.0 -// > 1.2.x will become >= 1.3.0 -// < 1.2.x will become < 1.2.0 -// != 1.2.x will become < 1.2.0 >= 1.3.0 -// -// * when dealing with minor wildcards: -// >= 1.x will become >= 1.0.0 -// <= 1.x will become < 2.0.0 -// > 1.x will become >= 2.0.0 -// < 1.0 will become < 1.0.0 -// != 1.x will become < 1.0.0 >= 2.0.0 -// -// * when dealing with wildcards without -// version operator: -// 1.2.x will become >= 1.2.0 < 1.3.0 -// 1.x will become >= 1.0.0 < 2.0.0 -func expandWildcardVersion(parts [][]string) ([][]string, error) { - var expandedParts [][]string - for _, p := range parts { - var newParts []string - for _, ap := range p { - if strings.Contains(ap, "x") { - opStr, vStr, err := splitComparatorVersion(ap) - if err != nil { - return nil, err - } - - versionWildcardType := getWildcardType(vStr) - flatVersion := createVersionFromWildcard(vStr) - - var resultOperator string - var shouldIncrementVersion bool - switch opStr { - case ">": - resultOperator = ">=" - shouldIncrementVersion = true - case ">=": - resultOperator = ">=" - case "<": - resultOperator = "<" - case "<=": - resultOperator = "<" - shouldIncrementVersion = true - case "", "=", "==": - newParts = append(newParts, ">="+flatVersion) - resultOperator = "<" - shouldIncrementVersion = true - case "!=", "!": - newParts = append(newParts, "<"+flatVersion) - resultOperator = ">=" - shouldIncrementVersion = true - } - - var resultVersion string - if shouldIncrementVersion { - switch versionWildcardType { - case patchWildcard: - resultVersion, _ = incrementMinorVersion(flatVersion) - case minorWildcard: - resultVersion, _ = incrementMajorVersion(flatVersion) - } - } else { - resultVersion = flatVersion - } - - ap = resultOperator + resultVersion - } - newParts = append(newParts, ap) - } - expandedParts = append(expandedParts, newParts) - } - - return expandedParts, nil -} - -func parseComparator(s string) comparator { - switch s { - case "==": - fallthrough - case "": - fallthrough - case "=": - return compEQ - case ">": - return compGT - case ">=": - return compGE - case "<": - return compLT - case "<=": - return compLE - case "!": - fallthrough - case "!=": - return compNE - } - - return nil -} - -// MustParseRange is like ParseRange but panics if the range cannot be parsed. -func MustParseRange(s string) Range { - r, err := ParseRange(s) - if err != nil { - panic(`semver: ParseRange(` + s + `): ` + err.Error()) - } - return r -} diff --git a/vendor/github.com/blang/semver/v4/semver.go b/vendor/github.com/blang/semver/v4/semver.go deleted file mode 100644 index 307de610f..000000000 --- a/vendor/github.com/blang/semver/v4/semver.go +++ /dev/null @@ -1,476 +0,0 @@ -package semver - -import ( - "errors" - "fmt" - "strconv" - "strings" -) - -const ( - numbers string = "0123456789" - alphas = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-" - alphanum = alphas + numbers -) - -// SpecVersion is the latest fully supported spec version of semver -var SpecVersion = Version{ - Major: 2, - Minor: 0, - Patch: 0, -} - -// Version represents a semver compatible version -type Version struct { - Major uint64 - Minor uint64 - Patch uint64 - Pre []PRVersion - Build []string //No Precedence -} - -// Version to string -func (v Version) String() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - - if len(v.Pre) > 0 { - b = append(b, '-') - b = append(b, v.Pre[0].String()...) - - for _, pre := range v.Pre[1:] { - b = append(b, '.') - b = append(b, pre.String()...) - } - } - - if len(v.Build) > 0 { - b = append(b, '+') - b = append(b, v.Build[0]...) - - for _, build := range v.Build[1:] { - b = append(b, '.') - b = append(b, build...) - } - } - - return string(b) -} - -// FinalizeVersion discards prerelease and build number and only returns -// major, minor and patch number. -func (v Version) FinalizeVersion() string { - b := make([]byte, 0, 5) - b = strconv.AppendUint(b, v.Major, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Minor, 10) - b = append(b, '.') - b = strconv.AppendUint(b, v.Patch, 10) - return string(b) -} - -// Equals checks if v is equal to o. -func (v Version) Equals(o Version) bool { - return (v.Compare(o) == 0) -} - -// EQ checks if v is equal to o. -func (v Version) EQ(o Version) bool { - return (v.Compare(o) == 0) -} - -// NE checks if v is not equal to o. -func (v Version) NE(o Version) bool { - return (v.Compare(o) != 0) -} - -// GT checks if v is greater than o. -func (v Version) GT(o Version) bool { - return (v.Compare(o) == 1) -} - -// GTE checks if v is greater than or equal to o. -func (v Version) GTE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// GE checks if v is greater than or equal to o. -func (v Version) GE(o Version) bool { - return (v.Compare(o) >= 0) -} - -// LT checks if v is less than o. -func (v Version) LT(o Version) bool { - return (v.Compare(o) == -1) -} - -// LTE checks if v is less than or equal to o. -func (v Version) LTE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// LE checks if v is less than or equal to o. -func (v Version) LE(o Version) bool { - return (v.Compare(o) <= 0) -} - -// Compare compares Versions v to o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v Version) Compare(o Version) int { - if v.Major != o.Major { - if v.Major > o.Major { - return 1 - } - return -1 - } - if v.Minor != o.Minor { - if v.Minor > o.Minor { - return 1 - } - return -1 - } - if v.Patch != o.Patch { - if v.Patch > o.Patch { - return 1 - } - return -1 - } - - // Quick comparison if a version has no prerelease versions - if len(v.Pre) == 0 && len(o.Pre) == 0 { - return 0 - } else if len(v.Pre) == 0 && len(o.Pre) > 0 { - return 1 - } else if len(v.Pre) > 0 && len(o.Pre) == 0 { - return -1 - } - - i := 0 - for ; i < len(v.Pre) && i < len(o.Pre); i++ { - if comp := v.Pre[i].Compare(o.Pre[i]); comp == 0 { - continue - } else if comp == 1 { - return 1 - } else { - return -1 - } - } - - // If all pr versions are the equal but one has further prversion, this one greater - if i == len(v.Pre) && i == len(o.Pre) { - return 0 - } else if i == len(v.Pre) && i < len(o.Pre) { - return -1 - } else { - return 1 - } - -} - -// IncrementPatch increments the patch version -func (v *Version) IncrementPatch() error { - v.Patch++ - return nil -} - -// IncrementMinor increments the minor version -func (v *Version) IncrementMinor() error { - v.Minor++ - v.Patch = 0 - return nil -} - -// IncrementMajor increments the major version -func (v *Version) IncrementMajor() error { - v.Major++ - v.Minor = 0 - v.Patch = 0 - return nil -} - -// Validate validates v and returns error in case -func (v Version) Validate() error { - // Major, Minor, Patch already validated using uint64 - - for _, pre := range v.Pre { - if !pre.IsNum { //Numeric prerelease versions already uint64 - if len(pre.VersionStr) == 0 { - return fmt.Errorf("Prerelease can not be empty %q", pre.VersionStr) - } - if !containsOnly(pre.VersionStr, alphanum) { - return fmt.Errorf("Invalid character(s) found in prerelease %q", pre.VersionStr) - } - } - } - - for _, build := range v.Build { - if len(build) == 0 { - return fmt.Errorf("Build meta data can not be empty %q", build) - } - if !containsOnly(build, alphanum) { - return fmt.Errorf("Invalid character(s) found in build meta data %q", build) - } - } - - return nil -} - -// New is an alias for Parse and returns a pointer, parses version string and returns a validated Version or error -func New(s string) (*Version, error) { - v, err := Parse(s) - vp := &v - return vp, err -} - -// Make is an alias for Parse, parses version string and returns a validated Version or error -func Make(s string) (Version, error) { - return Parse(s) -} - -// ParseTolerant allows for certain version specifications that do not strictly adhere to semver -// specs to be parsed by this library. It does so by normalizing versions before passing them to -// Parse(). It currently trims spaces, removes a "v" prefix, adds a 0 patch number to versions -// with only major and minor components specified, and removes leading 0s. -func ParseTolerant(s string) (Version, error) { - s = strings.TrimSpace(s) - s = strings.TrimPrefix(s, "v") - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - // Remove leading zeros. - for i, p := range parts { - if len(p) > 1 { - p = strings.TrimLeft(p, "0") - if len(p) == 0 || !strings.ContainsAny(p[0:1], "0123456789") { - p = "0" + p - } - parts[i] = p - } - } - // Fill up shortened versions. - if len(parts) < 3 { - if strings.ContainsAny(parts[len(parts)-1], "+-") { - return Version{}, errors.New("Short version cannot contain PreRelease/Build meta data") - } - for len(parts) < 3 { - parts = append(parts, "0") - } - } - s = strings.Join(parts, ".") - - return Parse(s) -} - -// Parse parses version string and returns a validated Version or error -func Parse(s string) (Version, error) { - if len(s) == 0 { - return Version{}, errors.New("Version string empty") - } - - // Split into major.minor.(patch+pr+meta) - parts := strings.SplitN(s, ".", 3) - if len(parts) != 3 { - return Version{}, errors.New("No Major.Minor.Patch elements found") - } - - // Major - if !containsOnly(parts[0], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in major number %q", parts[0]) - } - if hasLeadingZeroes(parts[0]) { - return Version{}, fmt.Errorf("Major number must not contain leading zeroes %q", parts[0]) - } - major, err := strconv.ParseUint(parts[0], 10, 64) - if err != nil { - return Version{}, err - } - - // Minor - if !containsOnly(parts[1], numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in minor number %q", parts[1]) - } - if hasLeadingZeroes(parts[1]) { - return Version{}, fmt.Errorf("Minor number must not contain leading zeroes %q", parts[1]) - } - minor, err := strconv.ParseUint(parts[1], 10, 64) - if err != nil { - return Version{}, err - } - - v := Version{} - v.Major = major - v.Minor = minor - - var build, prerelease []string - patchStr := parts[2] - - if buildIndex := strings.IndexRune(patchStr, '+'); buildIndex != -1 { - build = strings.Split(patchStr[buildIndex+1:], ".") - patchStr = patchStr[:buildIndex] - } - - if preIndex := strings.IndexRune(patchStr, '-'); preIndex != -1 { - prerelease = strings.Split(patchStr[preIndex+1:], ".") - patchStr = patchStr[:preIndex] - } - - if !containsOnly(patchStr, numbers) { - return Version{}, fmt.Errorf("Invalid character(s) found in patch number %q", patchStr) - } - if hasLeadingZeroes(patchStr) { - return Version{}, fmt.Errorf("Patch number must not contain leading zeroes %q", patchStr) - } - patch, err := strconv.ParseUint(patchStr, 10, 64) - if err != nil { - return Version{}, err - } - - v.Patch = patch - - // Prerelease - for _, prstr := range prerelease { - parsedPR, err := NewPRVersion(prstr) - if err != nil { - return Version{}, err - } - v.Pre = append(v.Pre, parsedPR) - } - - // Build meta data - for _, str := range build { - if len(str) == 0 { - return Version{}, errors.New("Build meta data is empty") - } - if !containsOnly(str, alphanum) { - return Version{}, fmt.Errorf("Invalid character(s) found in build meta data %q", str) - } - v.Build = append(v.Build, str) - } - - return v, nil -} - -// MustParse is like Parse but panics if the version cannot be parsed. -func MustParse(s string) Version { - v, err := Parse(s) - if err != nil { - panic(`semver: Parse(` + s + `): ` + err.Error()) - } - return v -} - -// PRVersion represents a PreRelease Version -type PRVersion struct { - VersionStr string - VersionNum uint64 - IsNum bool -} - -// NewPRVersion creates a new valid prerelease version -func NewPRVersion(s string) (PRVersion, error) { - if len(s) == 0 { - return PRVersion{}, errors.New("Prerelease is empty") - } - v := PRVersion{} - if containsOnly(s, numbers) { - if hasLeadingZeroes(s) { - return PRVersion{}, fmt.Errorf("Numeric PreRelease version must not contain leading zeroes %q", s) - } - num, err := strconv.ParseUint(s, 10, 64) - - // Might never be hit, but just in case - if err != nil { - return PRVersion{}, err - } - v.VersionNum = num - v.IsNum = true - } else if containsOnly(s, alphanum) { - v.VersionStr = s - v.IsNum = false - } else { - return PRVersion{}, fmt.Errorf("Invalid character(s) found in prerelease %q", s) - } - return v, nil -} - -// IsNumeric checks if prerelease-version is numeric -func (v PRVersion) IsNumeric() bool { - return v.IsNum -} - -// Compare compares two PreRelease Versions v and o: -// -1 == v is less than o -// 0 == v is equal to o -// 1 == v is greater than o -func (v PRVersion) Compare(o PRVersion) int { - if v.IsNum && !o.IsNum { - return -1 - } else if !v.IsNum && o.IsNum { - return 1 - } else if v.IsNum && o.IsNum { - if v.VersionNum == o.VersionNum { - return 0 - } else if v.VersionNum > o.VersionNum { - return 1 - } else { - return -1 - } - } else { // both are Alphas - if v.VersionStr == o.VersionStr { - return 0 - } else if v.VersionStr > o.VersionStr { - return 1 - } else { - return -1 - } - } -} - -// PreRelease version to string -func (v PRVersion) String() string { - if v.IsNum { - return strconv.FormatUint(v.VersionNum, 10) - } - return v.VersionStr -} - -func containsOnly(s string, set string) bool { - return strings.IndexFunc(s, func(r rune) bool { - return !strings.ContainsRune(set, r) - }) == -1 -} - -func hasLeadingZeroes(s string) bool { - return len(s) > 1 && s[0] == '0' -} - -// NewBuildVersion creates a new valid build version -func NewBuildVersion(s string) (string, error) { - if len(s) == 0 { - return "", errors.New("Buildversion is empty") - } - if !containsOnly(s, alphanum) { - return "", fmt.Errorf("Invalid character(s) found in build meta data %q", s) - } - return s, nil -} - -// FinalizeVersion returns the major, minor and patch number only and discards -// prerelease and build number. -func FinalizeVersion(s string) (string, error) { - v, err := Parse(s) - if err != nil { - return "", err - } - v.Pre = nil - v.Build = nil - - finalVer := v.String() - return finalVer, nil -} diff --git a/vendor/github.com/blang/semver/v4/sort.go b/vendor/github.com/blang/semver/v4/sort.go deleted file mode 100644 index e18f88082..000000000 --- a/vendor/github.com/blang/semver/v4/sort.go +++ /dev/null @@ -1,28 +0,0 @@ -package semver - -import ( - "sort" -) - -// Versions represents multiple versions. -type Versions []Version - -// Len returns length of version collection -func (s Versions) Len() int { - return len(s) -} - -// Swap swaps two versions inside the collection by its indices -func (s Versions) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Less checks if version at index i is less than version at index j -func (s Versions) Less(i, j int) bool { - return s[i].LT(s[j]) -} - -// Sort sorts a slice of versions -func Sort(versions []Version) { - sort.Sort(Versions(versions)) -} diff --git a/vendor/github.com/blang/semver/v4/sql.go b/vendor/github.com/blang/semver/v4/sql.go deleted file mode 100644 index db958134f..000000000 --- a/vendor/github.com/blang/semver/v4/sql.go +++ /dev/null @@ -1,30 +0,0 @@ -package semver - -import ( - "database/sql/driver" - "fmt" -) - -// Scan implements the database/sql.Scanner interface. -func (v *Version) Scan(src interface{}) (err error) { - var str string - switch src := src.(type) { - case string: - str = src - case []byte: - str = string(src) - default: - return fmt.Errorf("version.Scan: cannot convert %T to string", src) - } - - if t, err := Parse(str); err == nil { - *v = t - } - - return -} - -// Value implements the database/sql/driver.Valuer interface. -func (v Version) Value() (driver.Value, error) { - return v.String(), nil -} diff --git a/vendor/github.com/imdario/mergo/.deepsource.toml b/vendor/github.com/imdario/mergo/.deepsource.toml deleted file mode 100644 index 8a0681af8..000000000 --- a/vendor/github.com/imdario/mergo/.deepsource.toml +++ /dev/null @@ -1,12 +0,0 @@ -version = 1 - -test_patterns = [ - "*_test.go" -] - -[[analyzers]] -name = "go" -enabled = true - - [analyzers.meta] - import_path = "github.com/imdario/mergo" \ No newline at end of file diff --git a/vendor/github.com/imdario/mergo/.gitignore b/vendor/github.com/imdario/mergo/.gitignore deleted file mode 100644 index 529c3412b..000000000 --- a/vendor/github.com/imdario/mergo/.gitignore +++ /dev/null @@ -1,33 +0,0 @@ -#### joe made this: http://goel.io/joe - -#### go #### -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ - -#### vim #### -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-v][a-z] -[._]sw[a-p] - -# Session -Session.vim - -# Temporary -.netrwhist -*~ -# Auto-generated tag files -tags diff --git a/vendor/github.com/imdario/mergo/.travis.yml b/vendor/github.com/imdario/mergo/.travis.yml deleted file mode 100644 index d324c43ba..000000000 --- a/vendor/github.com/imdario/mergo/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: go -arch: - - amd64 - - ppc64le -install: - - go get -t - - go get golang.org/x/tools/cmd/cover - - go get github.com/mattn/goveralls -script: - - go test -race -v ./... -after_script: - - $HOME/gopath/bin/goveralls -service=travis-ci -repotoken $COVERALLS_TOKEN diff --git a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md b/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md deleted file mode 100644 index 469b44907..000000000 --- a/vendor/github.com/imdario/mergo/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,46 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. - -## Our Standards - -Examples of behavior that contributes to creating a positive environment include: - -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting - -## Our Responsibilities - -Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. - -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. - -## Scope - -This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at i@dario.im. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. - -Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] - -[homepage]: http://contributor-covenant.org -[version]: http://contributor-covenant.org/version/1/4/ diff --git a/vendor/github.com/imdario/mergo/CONTRIBUTING.md b/vendor/github.com/imdario/mergo/CONTRIBUTING.md deleted file mode 100644 index 0a1ff9f94..000000000 --- a/vendor/github.com/imdario/mergo/CONTRIBUTING.md +++ /dev/null @@ -1,112 +0,0 @@ - -# Contributing to mergo - -First off, thanks for taking the time to contribute! ❤️ - -All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 - -> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: -> - Star the project -> - Tweet about it -> - Refer this project in your project's readme -> - Mention the project at local meetups and tell your friends/colleagues - - -## Table of Contents - -- [Code of Conduct](#code-of-conduct) -- [I Have a Question](#i-have-a-question) -- [I Want To Contribute](#i-want-to-contribute) -- [Reporting Bugs](#reporting-bugs) -- [Suggesting Enhancements](#suggesting-enhancements) - -## Code of Conduct - -This project and everyone participating in it is governed by the -[mergo Code of Conduct](https://github.com/imdario/mergoblob/master/CODE_OF_CONDUCT.md). -By participating, you are expected to uphold this code. Please report unacceptable behavior -to <>. - - -## I Have a Question - -> If you want to ask a question, we assume that you have read the available [Documentation](https://pkg.go.dev/github.com/imdario/mergo). - -Before you ask a question, it is best to search for existing [Issues](https://github.com/imdario/mergo/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. - -If you then still feel the need to ask a question and need clarification, we recommend the following: - -- Open an [Issue](https://github.com/imdario/mergo/issues/new). -- Provide as much context as you can about what you're running into. -- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant. - -We will then take care of the issue as soon as possible. - -## I Want To Contribute - -> ### Legal Notice -> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license. - -### Reporting Bugs - - -#### Before Submitting a Bug Report - -A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. - -- Make sure that you are using the latest version. -- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)). -- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/imdario/mergoissues?q=label%3Abug). -- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. -- Collect information about the bug: -- Stack trace (Traceback) -- OS, Platform and Version (Windows, Linux, macOS, x86, ARM) -- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. -- Possibly your input and the output -- Can you reliably reproduce the issue? And can you also reproduce it with older versions? - - -#### How Do I Submit a Good Bug Report? - -> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to . - - -We use GitHub issues to track bugs and errors. If you run into an issue with the project: - -- Open an [Issue](https://github.com/imdario/mergo/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) -- Explain the behavior you would expect and the actual behavior. -- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. -- Provide the information you collected in the previous section. - -Once it's filed: - -- The project team will label the issue accordingly. -- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. -- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be implemented by someone. - -### Suggesting Enhancements - -This section guides you through submitting an enhancement suggestion for mergo, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. - - -#### Before Submitting an Enhancement - -- Make sure that you are using the latest version. -- Read the [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration. -- Perform a [search](https://github.com/imdario/mergo/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. -- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. - - -#### How Do I Submit a Good Enhancement Suggestion? - -Enhancement suggestions are tracked as [GitHub issues](https://github.com/imdario/mergo/issues). - -- Use a **clear and descriptive title** for the issue to identify the suggestion. -- Provide a **step-by-step description of the suggested enhancement** in as many details as possible. -- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. -- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. -- **Explain why this enhancement would be useful** to most mergo users. You may also want to point out the other projects that solved it better and which could serve as inspiration. - - -## Attribution -This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! diff --git a/vendor/github.com/imdario/mergo/LICENSE b/vendor/github.com/imdario/mergo/LICENSE deleted file mode 100644 index 686680298..000000000 --- a/vendor/github.com/imdario/mergo/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2013 Dario Castañé. All rights reserved. -Copyright (c) 2012 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/imdario/mergo/README.md b/vendor/github.com/imdario/mergo/README.md deleted file mode 100644 index ffbbb62c7..000000000 --- a/vendor/github.com/imdario/mergo/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# Mergo - -[![GitHub release][5]][6] -[![GoCard][7]][8] -[![Test status][1]][2] -[![OpenSSF Scorecard][21]][22] -[![OpenSSF Best Practices][19]][20] -[![Coverage status][9]][10] -[![Sourcegraph][11]][12] -[![FOSSA status][13]][14] - -[![GoDoc][3]][4] -[![Become my sponsor][15]][16] -[![Tidelift][17]][18] - -[1]: https://github.com/imdario/mergo/workflows/tests/badge.svg?branch=master -[2]: https://github.com/imdario/mergo/actions/workflows/tests.yml -[3]: https://godoc.org/github.com/imdario/mergo?status.svg -[4]: https://godoc.org/github.com/imdario/mergo -[5]: https://img.shields.io/github/release/imdario/mergo.svg -[6]: https://github.com/imdario/mergo/releases -[7]: https://goreportcard.com/badge/imdario/mergo -[8]: https://goreportcard.com/report/github.com/imdario/mergo -[9]: https://coveralls.io/repos/github/imdario/mergo/badge.svg?branch=master -[10]: https://coveralls.io/github/imdario/mergo?branch=master -[11]: https://sourcegraph.com/github.com/imdario/mergo/-/badge.svg -[12]: https://sourcegraph.com/github.com/imdario/mergo?badge -[13]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=shield -[14]: https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_shield -[15]: https://img.shields.io/github/sponsors/imdario -[16]: https://github.com/sponsors/imdario -[17]: https://tidelift.com/badges/package/go/github.com%2Fimdario%2Fmergo -[18]: https://tidelift.com/subscription/pkg/go-github.com-imdario-mergo -[19]: https://bestpractices.coreinfrastructure.org/projects/7177/badge -[20]: https://bestpractices.coreinfrastructure.org/projects/7177 -[21]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo/badge -[22]: https://api.securityscorecards.dev/projects/github.com/imdario/mergo - -A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. - -Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). - -Also a lovely [comune](http://en.wikipedia.org/wiki/Mergo) (municipality) in the Province of Ancona in the Italian region of Marche. - -## Status - -It is ready for production use. [It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, Microsoft, etc](https://github.com/imdario/mergo#mergo-in-the-wild). - -### Important note - -Please keep in mind that a problematic PR broke [0.3.9](//github.com/imdario/mergo/releases/tag/0.3.9). I reverted it in [0.3.10](//github.com/imdario/mergo/releases/tag/0.3.10), and I consider it stable but not bug-free. Also, this version adds support for go modules. - -Keep in mind that in [0.3.2](//github.com/imdario/mergo/releases/tag/0.3.2), Mergo changed `Merge()`and `Map()` signatures to support [transformers](#transformers). I added an optional/variadic argument so that it won't break the existing code. - -If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with ```go get -u github.com/imdario/mergo```. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). - -### Donations - -If Mergo is useful to you, consider buying me a coffee, a beer, or making a monthly donation to allow me to keep building great free software. :heart_eyes: - -Buy Me a Coffee at ko-fi.com -Donate using Liberapay -Become my sponsor - -### Mergo in the wild - -- [moby/moby](https://github.com/moby/moby) -- [kubernetes/kubernetes](https://github.com/kubernetes/kubernetes) -- [vmware/dispatch](https://github.com/vmware/dispatch) -- [Shopify/themekit](https://github.com/Shopify/themekit) -- [imdario/zas](https://github.com/imdario/zas) -- [matcornic/hermes](https://github.com/matcornic/hermes) -- [OpenBazaar/openbazaar-go](https://github.com/OpenBazaar/openbazaar-go) -- [kataras/iris](https://github.com/kataras/iris) -- [michaelsauter/crane](https://github.com/michaelsauter/crane) -- [go-task/task](https://github.com/go-task/task) -- [sensu/uchiwa](https://github.com/sensu/uchiwa) -- [ory/hydra](https://github.com/ory/hydra) -- [sisatech/vcli](https://github.com/sisatech/vcli) -- [dairycart/dairycart](https://github.com/dairycart/dairycart) -- [projectcalico/felix](https://github.com/projectcalico/felix) -- [resin-os/balena](https://github.com/resin-os/balena) -- [go-kivik/kivik](https://github.com/go-kivik/kivik) -- [Telefonica/govice](https://github.com/Telefonica/govice) -- [supergiant/supergiant](supergiant/supergiant) -- [SergeyTsalkov/brooce](https://github.com/SergeyTsalkov/brooce) -- [soniah/dnsmadeeasy](https://github.com/soniah/dnsmadeeasy) -- [ohsu-comp-bio/funnel](https://github.com/ohsu-comp-bio/funnel) -- [EagerIO/Stout](https://github.com/EagerIO/Stout) -- [lynndylanhurley/defsynth-api](https://github.com/lynndylanhurley/defsynth-api) -- [russross/canvasassignments](https://github.com/russross/canvasassignments) -- [rdegges/cryptly-api](https://github.com/rdegges/cryptly-api) -- [casualjim/exeggutor](https://github.com/casualjim/exeggutor) -- [divshot/gitling](https://github.com/divshot/gitling) -- [RWJMurphy/gorl](https://github.com/RWJMurphy/gorl) -- [andrerocker/deploy42](https://github.com/andrerocker/deploy42) -- [elwinar/rambler](https://github.com/elwinar/rambler) -- [tmaiaroto/gopartman](https://github.com/tmaiaroto/gopartman) -- [jfbus/impressionist](https://github.com/jfbus/impressionist) -- [Jmeyering/zealot](https://github.com/Jmeyering/zealot) -- [godep-migrator/rigger-host](https://github.com/godep-migrator/rigger-host) -- [Dronevery/MultiwaySwitch-Go](https://github.com/Dronevery/MultiwaySwitch-Go) -- [thoas/picfit](https://github.com/thoas/picfit) -- [mantasmatelis/whooplist-server](https://github.com/mantasmatelis/whooplist-server) -- [jnuthong/item_search](https://github.com/jnuthong/item_search) -- [bukalapak/snowboard](https://github.com/bukalapak/snowboard) -- [containerssh/containerssh](https://github.com/containerssh/containerssh) -- [goreleaser/goreleaser](https://github.com/goreleaser/goreleaser) -- [tjpnz/structbot](https://github.com/tjpnz/structbot) - -## Install - - go get github.com/imdario/mergo - - // use in your .go code - import ( - "github.com/imdario/mergo" - ) - -## Usage - -You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as [they are zero values](https://golang.org/ref/spec#The_zero_value) too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). - -```go -if err := mergo.Merge(&dst, src); err != nil { - // ... -} -``` - -Also, you can merge overwriting values using the transformer `WithOverride`. - -```go -if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { - // ... -} -``` - -Additionally, you can map a `map[string]interface{}` to a struct (and otherwise, from struct to map), following the same restrictions as in `Merge()`. Keys are capitalized to find each corresponding exported field. - -```go -if err := mergo.Map(&dst, srcMap); err != nil { - // ... -} -``` - -Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as `map[string]interface{}`. They will be just assigned as values. - -Here is a nice example: - -```go -package main - -import ( - "fmt" - "github.com/imdario/mergo" -) - -type Foo struct { - A string - B int64 -} - -func main() { - src := Foo{ - A: "one", - B: 2, - } - dest := Foo{ - A: "two", - } - mergo.Merge(&dest, src) - fmt.Println(dest) - // Will print - // {two 2} -} -``` - -Note: if test are failing due missing package, please execute: - - go get gopkg.in/yaml.v3 - -### Transformers - -Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, `time.Time` is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero `time.Time`? - -```go -package main - -import ( - "fmt" - "github.com/imdario/mergo" - "reflect" - "time" -) - -type timeTransformer struct { -} - -func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { - if typ == reflect.TypeOf(time.Time{}) { - return func(dst, src reflect.Value) error { - if dst.CanSet() { - isZero := dst.MethodByName("IsZero") - result := isZero.Call([]reflect.Value{}) - if result[0].Bool() { - dst.Set(src) - } - } - return nil - } - } - return nil -} - -type Snapshot struct { - Time time.Time - // ... -} - -func main() { - src := Snapshot{time.Now()} - dest := Snapshot{} - mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) - fmt.Println(dest) - // Will print - // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } -} -``` - -## Contact me - -If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): [@im_dario](https://twitter.com/im_dario) - -## About - -Written by [Dario Castañé](http://dario.im). - -## License - -[BSD 3-Clause](http://opensource.org/licenses/BSD-3-Clause) license, as [Go language](http://golang.org/LICENSE). - -[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fimdario%2Fmergo.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fimdario%2Fmergo?ref=badge_large) diff --git a/vendor/github.com/imdario/mergo/SECURITY.md b/vendor/github.com/imdario/mergo/SECURITY.md deleted file mode 100644 index a5de61f77..000000000 --- a/vendor/github.com/imdario/mergo/SECURITY.md +++ /dev/null @@ -1,14 +0,0 @@ -# Security Policy - -## Supported Versions - -| Version | Supported | -| ------- | ------------------ | -| 0.3.x | :white_check_mark: | -| < 0.3 | :x: | - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. diff --git a/vendor/github.com/imdario/mergo/doc.go b/vendor/github.com/imdario/mergo/doc.go deleted file mode 100644 index fcd985f99..000000000 --- a/vendor/github.com/imdario/mergo/doc.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -/* -A helper to merge structs and maps in Golang. Useful for configuration default values, avoiding messy if-statements. - -Mergo merges same-type structs and maps by setting default values in zero-value fields. Mergo won't merge unexported (private) fields. It will do recursively any exported one. It also won't merge structs inside maps (because they are not addressable using Go reflection). - -Status - -It is ready for production use. It is used in several projects by Docker, Google, The Linux Foundation, VMWare, Shopify, etc. - -Important note - -Please keep in mind that a problematic PR broke 0.3.9. We reverted it in 0.3.10. We consider 0.3.10 as stable but not bug-free. . Also, this version adds suppot for go modules. - -Keep in mind that in 0.3.2, Mergo changed Merge() and Map() signatures to support transformers. We added an optional/variadic argument so that it won't break the existing code. - -If you were using Mergo before April 6th, 2015, please check your project works as intended after updating your local copy with go get -u github.com/imdario/mergo. I apologize for any issue caused by its previous behavior and any future bug that Mergo could cause in existing projects after the change (release 0.2.0). - -Install - -Do your usual installation procedure: - - go get github.com/imdario/mergo - - // use in your .go code - import ( - "github.com/imdario/mergo" - ) - -Usage - -You can only merge same-type structs with exported fields initialized as zero value of their type and same-types maps. Mergo won't merge unexported (private) fields but will do recursively any exported one. It won't merge empty structs value as they are zero values too. Also, maps will be merged recursively except for structs inside maps (because they are not addressable using Go reflection). - - if err := mergo.Merge(&dst, src); err != nil { - // ... - } - -Also, you can merge overwriting values using the transformer WithOverride. - - if err := mergo.Merge(&dst, src, mergo.WithOverride); err != nil { - // ... - } - -Additionally, you can map a map[string]interface{} to a struct (and otherwise, from struct to map), following the same restrictions as in Merge(). Keys are capitalized to find each corresponding exported field. - - if err := mergo.Map(&dst, srcMap); err != nil { - // ... - } - -Warning: if you map a struct to map, it won't do it recursively. Don't expect Mergo to map struct members of your struct as map[string]interface{}. They will be just assigned as values. - -Here is a nice example: - - package main - - import ( - "fmt" - "github.com/imdario/mergo" - ) - - type Foo struct { - A string - B int64 - } - - func main() { - src := Foo{ - A: "one", - B: 2, - } - dest := Foo{ - A: "two", - } - mergo.Merge(&dest, src) - fmt.Println(dest) - // Will print - // {two 2} - } - -Transformers - -Transformers allow to merge specific types differently than in the default behavior. In other words, now you can customize how some types are merged. For example, time.Time is a struct; it doesn't have zero value but IsZero can return true because it has fields with zero value. How can we merge a non-zero time.Time? - - package main - - import ( - "fmt" - "github.com/imdario/mergo" - "reflect" - "time" - ) - - type timeTransformer struct { - } - - func (t timeTransformer) Transformer(typ reflect.Type) func(dst, src reflect.Value) error { - if typ == reflect.TypeOf(time.Time{}) { - return func(dst, src reflect.Value) error { - if dst.CanSet() { - isZero := dst.MethodByName("IsZero") - result := isZero.Call([]reflect.Value{}) - if result[0].Bool() { - dst.Set(src) - } - } - return nil - } - } - return nil - } - - type Snapshot struct { - Time time.Time - // ... - } - - func main() { - src := Snapshot{time.Now()} - dest := Snapshot{} - mergo.Merge(&dest, src, mergo.WithTransformers(timeTransformer{})) - fmt.Println(dest) - // Will print - // { 2018-01-12 01:15:00 +0000 UTC m=+0.000000001 } - } - -Contact me - -If I can help you, you have an idea or you are using Mergo in your projects, don't hesitate to drop me a line (or a pull request): https://twitter.com/im_dario - -About - -Written by Dario Castañé: https://da.rio.hn - -License - -BSD 3-Clause license, as Go language. - -*/ -package mergo diff --git a/vendor/github.com/imdario/mergo/map.go b/vendor/github.com/imdario/mergo/map.go deleted file mode 100644 index b50d5c2a4..000000000 --- a/vendor/github.com/imdario/mergo/map.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright 2014 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "fmt" - "reflect" - "unicode" - "unicode/utf8" -) - -func changeInitialCase(s string, mapper func(rune) rune) string { - if s == "" { - return s - } - r, n := utf8.DecodeRuneInString(s) - return string(mapper(r)) + s[n:] -} - -func isExported(field reflect.StructField) bool { - r, _ := utf8.DecodeRuneInString(field.Name) - return r >= 'A' && r <= 'Z' -} - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deepMap(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { - overwrite := config.Overwrite - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{typ, seen, addr} - } - zeroValue := reflect.Value{} - switch dst.Kind() { - case reflect.Map: - dstMap := dst.Interface().(map[string]interface{}) - for i, n := 0, src.NumField(); i < n; i++ { - srcType := src.Type() - field := srcType.Field(i) - if !isExported(field) { - continue - } - fieldName := field.Name - fieldName = changeInitialCase(fieldName, unicode.ToLower) - if v, ok := dstMap[fieldName]; !ok || (isEmptyValue(reflect.ValueOf(v), !config.ShouldNotDereference) || overwrite) { - dstMap[fieldName] = src.Field(i).Interface() - } - } - case reflect.Ptr: - if dst.IsNil() { - v := reflect.New(dst.Type().Elem()) - dst.Set(v) - } - dst = dst.Elem() - fallthrough - case reflect.Struct: - srcMap := src.Interface().(map[string]interface{}) - for key := range srcMap { - config.overwriteWithEmptyValue = true - srcValue := srcMap[key] - fieldName := changeInitialCase(key, unicode.ToUpper) - dstElement := dst.FieldByName(fieldName) - if dstElement == zeroValue { - // We discard it because the field doesn't exist. - continue - } - srcElement := reflect.ValueOf(srcValue) - dstKind := dstElement.Kind() - srcKind := srcElement.Kind() - if srcKind == reflect.Ptr && dstKind != reflect.Ptr { - srcElement = srcElement.Elem() - srcKind = reflect.TypeOf(srcElement.Interface()).Kind() - } else if dstKind == reflect.Ptr { - // Can this work? I guess it can't. - if srcKind != reflect.Ptr && srcElement.CanAddr() { - srcPtr := srcElement.Addr() - srcElement = reflect.ValueOf(srcPtr) - srcKind = reflect.Ptr - } - } - - if !srcElement.IsValid() { - continue - } - if srcKind == dstKind { - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else if dstKind == reflect.Interface && dstElement.Kind() == reflect.Interface { - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else if srcKind == reflect.Map { - if err = deepMap(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } else { - return fmt.Errorf("type mismatch on %s field: found %v, expected %v", fieldName, srcKind, dstKind) - } - } - } - return -} - -// Map sets fields' values in dst from src. -// src can be a map with string keys or a struct. dst must be the opposite: -// if src is a map, dst must be a valid pointer to struct. If src is a struct, -// dst must be map[string]interface{}. -// It won't merge unexported (private) fields and will do recursively -// any exported field. -// If dst is a map, keys will be src fields' names in lower camel case. -// Missing key in src that doesn't match a field in dst will be skipped. This -// doesn't apply if dst is a map. -// This is separated method from Merge because it is cleaner and it keeps sane -// semantics: merging equal types, mapping different (restricted) types. -func Map(dst, src interface{}, opts ...func(*Config)) error { - return _map(dst, src, opts...) -} - -// MapWithOverwrite will do the same as Map except that non-empty dst attributes will be overridden by -// non-empty src attribute values. -// Deprecated: Use Map(…) with WithOverride -func MapWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { - return _map(dst, src, append(opts, WithOverride)...) -} - -func _map(dst, src interface{}, opts ...func(*Config)) error { - if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { - return ErrNonPointerArgument - } - var ( - vDst, vSrc reflect.Value - err error - ) - config := &Config{} - - for _, opt := range opts { - opt(config) - } - - if vDst, vSrc, err = resolveValues(dst, src); err != nil { - return err - } - // To be friction-less, we redirect equal-type arguments - // to deepMerge. Only because arguments can be anything. - if vSrc.Kind() == vDst.Kind() { - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) - } - switch vSrc.Kind() { - case reflect.Struct: - if vDst.Kind() != reflect.Map { - return ErrExpectedMapAsDestination - } - case reflect.Map: - if vDst.Kind() != reflect.Struct { - return ErrExpectedStructAsDestination - } - default: - return ErrNotSupported - } - return deepMap(vDst, vSrc, make(map[uintptr]*visit), 0, config) -} diff --git a/vendor/github.com/imdario/mergo/merge.go b/vendor/github.com/imdario/mergo/merge.go deleted file mode 100644 index 0ef9b2138..000000000 --- a/vendor/github.com/imdario/mergo/merge.go +++ /dev/null @@ -1,409 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "fmt" - "reflect" -) - -func hasMergeableFields(dst reflect.Value) (exported bool) { - for i, n := 0, dst.NumField(); i < n; i++ { - field := dst.Type().Field(i) - if field.Anonymous && dst.Field(i).Kind() == reflect.Struct { - exported = exported || hasMergeableFields(dst.Field(i)) - } else if isExportedComponent(&field) { - exported = exported || len(field.PkgPath) == 0 - } - } - return -} - -func isExportedComponent(field *reflect.StructField) bool { - pkgPath := field.PkgPath - if len(pkgPath) > 0 { - return false - } - c := field.Name[0] - if 'a' <= c && c <= 'z' || c == '_' { - return false - } - return true -} - -type Config struct { - Transformers Transformers - Overwrite bool - ShouldNotDereference bool - AppendSlice bool - TypeCheck bool - overwriteWithEmptyValue bool - overwriteSliceWithEmptyValue bool - sliceDeepCopy bool - debug bool -} - -type Transformers interface { - Transformer(reflect.Type) func(dst, src reflect.Value) error -} - -// Traverses recursively both values, assigning src's fields values to dst. -// The map argument tracks comparisons that have already been seen, which allows -// short circuiting on recursive types. -func deepMerge(dst, src reflect.Value, visited map[uintptr]*visit, depth int, config *Config) (err error) { - overwrite := config.Overwrite - typeCheck := config.TypeCheck - overwriteWithEmptySrc := config.overwriteWithEmptyValue - overwriteSliceWithEmptySrc := config.overwriteSliceWithEmptyValue - sliceDeepCopy := config.sliceDeepCopy - - if !src.IsValid() { - return - } - if dst.CanAddr() { - addr := dst.UnsafeAddr() - h := 17 * addr - seen := visited[h] - typ := dst.Type() - for p := seen; p != nil; p = p.next { - if p.ptr == addr && p.typ == typ { - return nil - } - } - // Remember, remember... - visited[h] = &visit{typ, seen, addr} - } - - if config.Transformers != nil && !isReflectNil(dst) && dst.IsValid() { - if fn := config.Transformers.Transformer(dst.Type()); fn != nil { - err = fn(dst, src) - return - } - } - - switch dst.Kind() { - case reflect.Struct: - if hasMergeableFields(dst) { - for i, n := 0, dst.NumField(); i < n; i++ { - if err = deepMerge(dst.Field(i), src.Field(i), visited, depth+1, config); err != nil { - return - } - } - } else { - if dst.CanSet() && (isReflectNil(dst) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) { - dst.Set(src) - } - } - case reflect.Map: - if dst.IsNil() && !src.IsNil() { - if dst.CanSet() { - dst.Set(reflect.MakeMap(dst.Type())) - } else { - dst = src - return - } - } - - if src.Kind() != reflect.Map { - if overwrite && dst.CanSet() { - dst.Set(src) - } - return - } - - for _, key := range src.MapKeys() { - srcElement := src.MapIndex(key) - if !srcElement.IsValid() { - continue - } - dstElement := dst.MapIndex(key) - switch srcElement.Kind() { - case reflect.Chan, reflect.Func, reflect.Map, reflect.Interface, reflect.Slice: - if srcElement.IsNil() { - if overwrite { - dst.SetMapIndex(key, srcElement) - } - continue - } - fallthrough - default: - if !srcElement.CanInterface() { - continue - } - switch reflect.TypeOf(srcElement.Interface()).Kind() { - case reflect.Struct: - fallthrough - case reflect.Ptr: - fallthrough - case reflect.Map: - srcMapElm := srcElement - dstMapElm := dstElement - if srcMapElm.CanInterface() { - srcMapElm = reflect.ValueOf(srcMapElm.Interface()) - if dstMapElm.IsValid() { - dstMapElm = reflect.ValueOf(dstMapElm.Interface()) - } - } - if err = deepMerge(dstMapElm, srcMapElm, visited, depth+1, config); err != nil { - return - } - case reflect.Slice: - srcSlice := reflect.ValueOf(srcElement.Interface()) - - var dstSlice reflect.Value - if !dstElement.IsValid() || dstElement.IsNil() { - dstSlice = reflect.MakeSlice(srcSlice.Type(), 0, srcSlice.Len()) - } else { - dstSlice = reflect.ValueOf(dstElement.Interface()) - } - - if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { - if typeCheck && srcSlice.Type() != dstSlice.Type() { - return fmt.Errorf("cannot override two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) - } - dstSlice = srcSlice - } else if config.AppendSlice { - if srcSlice.Type() != dstSlice.Type() { - return fmt.Errorf("cannot append two slices with different type (%s, %s)", srcSlice.Type(), dstSlice.Type()) - } - dstSlice = reflect.AppendSlice(dstSlice, srcSlice) - } else if sliceDeepCopy { - i := 0 - for ; i < srcSlice.Len() && i < dstSlice.Len(); i++ { - srcElement := srcSlice.Index(i) - dstElement := dstSlice.Index(i) - - if srcElement.CanInterface() { - srcElement = reflect.ValueOf(srcElement.Interface()) - } - if dstElement.CanInterface() { - dstElement = reflect.ValueOf(dstElement.Interface()) - } - - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } - - } - dst.SetMapIndex(key, dstSlice) - } - } - - if dstElement.IsValid() && !isEmptyValue(dstElement, !config.ShouldNotDereference) { - if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Slice { - continue - } - if reflect.TypeOf(srcElement.Interface()).Kind() == reflect.Map && reflect.TypeOf(dstElement.Interface()).Kind() == reflect.Map { - continue - } - } - - if srcElement.IsValid() && ((srcElement.Kind() != reflect.Ptr && overwrite) || !dstElement.IsValid() || isEmptyValue(dstElement, !config.ShouldNotDereference)) { - if dst.IsNil() { - dst.Set(reflect.MakeMap(dst.Type())) - } - dst.SetMapIndex(key, srcElement) - } - } - - // Ensure that all keys in dst are deleted if they are not in src. - if overwriteWithEmptySrc { - for _, key := range dst.MapKeys() { - srcElement := src.MapIndex(key) - if !srcElement.IsValid() { - dst.SetMapIndex(key, reflect.Value{}) - } - } - } - case reflect.Slice: - if !dst.CanSet() { - break - } - if (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc || overwriteSliceWithEmptySrc) && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) && !config.AppendSlice && !sliceDeepCopy { - dst.Set(src) - } else if config.AppendSlice { - if src.Type() != dst.Type() { - return fmt.Errorf("cannot append two slice with different type (%s, %s)", src.Type(), dst.Type()) - } - dst.Set(reflect.AppendSlice(dst, src)) - } else if sliceDeepCopy { - for i := 0; i < src.Len() && i < dst.Len(); i++ { - srcElement := src.Index(i) - dstElement := dst.Index(i) - if srcElement.CanInterface() { - srcElement = reflect.ValueOf(srcElement.Interface()) - } - if dstElement.CanInterface() { - dstElement = reflect.ValueOf(dstElement.Interface()) - } - - if err = deepMerge(dstElement, srcElement, visited, depth+1, config); err != nil { - return - } - } - } - case reflect.Ptr: - fallthrough - case reflect.Interface: - if isReflectNil(src) { - if overwriteWithEmptySrc && dst.CanSet() && src.Type().AssignableTo(dst.Type()) { - dst.Set(src) - } - break - } - - if src.Kind() != reflect.Interface { - if dst.IsNil() || (src.Kind() != reflect.Ptr && overwrite) { - if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { - dst.Set(src) - } - } else if src.Kind() == reflect.Ptr { - if !config.ShouldNotDereference { - if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { - return - } - } else { - if overwriteWithEmptySrc || (overwrite && !src.IsNil()) || dst.IsNil() { - dst.Set(src) - } - } - } else if dst.Elem().Type() == src.Type() { - if err = deepMerge(dst.Elem(), src, visited, depth+1, config); err != nil { - return - } - } else { - return ErrDifferentArgumentsTypes - } - break - } - - if dst.IsNil() || overwrite { - if dst.CanSet() && (overwrite || isEmptyValue(dst, !config.ShouldNotDereference)) { - dst.Set(src) - } - break - } - - if dst.Elem().Kind() == src.Elem().Kind() { - if err = deepMerge(dst.Elem(), src.Elem(), visited, depth+1, config); err != nil { - return - } - break - } - default: - mustSet := (isEmptyValue(dst, !config.ShouldNotDereference) || overwrite) && (!isEmptyValue(src, !config.ShouldNotDereference) || overwriteWithEmptySrc) - if mustSet { - if dst.CanSet() { - dst.Set(src) - } else { - dst = src - } - } - } - - return -} - -// Merge will fill any empty for value type attributes on the dst struct using corresponding -// src attributes if they themselves are not empty. dst and src must be valid same-type structs -// and dst must be a pointer to struct. -// It won't merge unexported (private) fields and will do recursively any exported field. -func Merge(dst, src interface{}, opts ...func(*Config)) error { - return merge(dst, src, opts...) -} - -// MergeWithOverwrite will do the same as Merge except that non-empty dst attributes will be overridden by -// non-empty src attribute values. -// Deprecated: use Merge(…) with WithOverride -func MergeWithOverwrite(dst, src interface{}, opts ...func(*Config)) error { - return merge(dst, src, append(opts, WithOverride)...) -} - -// WithTransformers adds transformers to merge, allowing to customize the merging of some types. -func WithTransformers(transformers Transformers) func(*Config) { - return func(config *Config) { - config.Transformers = transformers - } -} - -// WithOverride will make merge override non-empty dst attributes with non-empty src attributes values. -func WithOverride(config *Config) { - config.Overwrite = true -} - -// WithOverwriteWithEmptyValue will make merge override non empty dst attributes with empty src attributes values. -func WithOverwriteWithEmptyValue(config *Config) { - config.Overwrite = true - config.overwriteWithEmptyValue = true -} - -// WithOverrideEmptySlice will make merge override empty dst slice with empty src slice. -func WithOverrideEmptySlice(config *Config) { - config.overwriteSliceWithEmptyValue = true -} - -// WithoutDereference prevents dereferencing pointers when evaluating whether they are empty -// (i.e. a non-nil pointer is never considered empty). -func WithoutDereference(config *Config) { - config.ShouldNotDereference = true -} - -// WithAppendSlice will make merge append slices instead of overwriting it. -func WithAppendSlice(config *Config) { - config.AppendSlice = true -} - -// WithTypeCheck will make merge check types while overwriting it (must be used with WithOverride). -func WithTypeCheck(config *Config) { - config.TypeCheck = true -} - -// WithSliceDeepCopy will merge slice element one by one with Overwrite flag. -func WithSliceDeepCopy(config *Config) { - config.sliceDeepCopy = true - config.Overwrite = true -} - -func merge(dst, src interface{}, opts ...func(*Config)) error { - if dst != nil && reflect.ValueOf(dst).Kind() != reflect.Ptr { - return ErrNonPointerArgument - } - var ( - vDst, vSrc reflect.Value - err error - ) - - config := &Config{} - - for _, opt := range opts { - opt(config) - } - - if vDst, vSrc, err = resolveValues(dst, src); err != nil { - return err - } - if vDst.Type() != vSrc.Type() { - return ErrDifferentArgumentsTypes - } - return deepMerge(vDst, vSrc, make(map[uintptr]*visit), 0, config) -} - -// IsReflectNil is the reflect value provided nil -func isReflectNil(v reflect.Value) bool { - k := v.Kind() - switch k { - case reflect.Interface, reflect.Slice, reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr: - // Both interface and slice are nil if first word is 0. - // Both are always bigger than a word; assume flagIndir. - return v.IsNil() - default: - return false - } -} diff --git a/vendor/github.com/imdario/mergo/mergo.go b/vendor/github.com/imdario/mergo/mergo.go deleted file mode 100644 index 0a721e2d8..000000000 --- a/vendor/github.com/imdario/mergo/mergo.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2013 Dario Castañé. All rights reserved. -// Copyright 2009 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Based on src/pkg/reflect/deepequal.go from official -// golang's stdlib. - -package mergo - -import ( - "errors" - "reflect" -) - -// Errors reported by Mergo when it finds invalid arguments. -var ( - ErrNilArguments = errors.New("src and dst must not be nil") - ErrDifferentArgumentsTypes = errors.New("src and dst must be of same type") - ErrNotSupported = errors.New("only structs, maps, and slices are supported") - ErrExpectedMapAsDestination = errors.New("dst was expected to be a map") - ErrExpectedStructAsDestination = errors.New("dst was expected to be a struct") - ErrNonPointerArgument = errors.New("dst must be a pointer") -) - -// During deepMerge, must keep track of checks that are -// in progress. The comparison algorithm assumes that all -// checks in progress are true when it reencounters them. -// Visited are stored in a map indexed by 17 * a1 + a2; -type visit struct { - typ reflect.Type - next *visit - ptr uintptr -} - -// From src/pkg/encoding/json/encode.go. -func isEmptyValue(v reflect.Value, shouldDereference bool) bool { - switch v.Kind() { - case reflect.Array, reflect.Map, reflect.Slice, reflect.String: - return v.Len() == 0 - case reflect.Bool: - return !v.Bool() - case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: - return v.Int() == 0 - case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: - return v.Uint() == 0 - case reflect.Float32, reflect.Float64: - return v.Float() == 0 - case reflect.Interface, reflect.Ptr: - if v.IsNil() { - return true - } - if shouldDereference { - return isEmptyValue(v.Elem(), shouldDereference) - } - return false - case reflect.Func: - return v.IsNil() - case reflect.Invalid: - return true - } - return false -} - -func resolveValues(dst, src interface{}) (vDst, vSrc reflect.Value, err error) { - if dst == nil || src == nil { - err = ErrNilArguments - return - } - vDst = reflect.ValueOf(dst).Elem() - if vDst.Kind() != reflect.Struct && vDst.Kind() != reflect.Map && vDst.Kind() != reflect.Slice { - err = ErrNotSupported - return - } - vSrc = reflect.ValueOf(src) - // We check if vSrc is a pointer to dereference it. - if vSrc.Kind() == reflect.Ptr { - vSrc = vSrc.Elem() - } - return -} diff --git a/vendor/github.com/openshift/api/.ci-operator.yaml b/vendor/github.com/openshift/api/.ci-operator.yaml deleted file mode 100644 index 1d88a59fd..000000000 --- a/vendor/github.com/openshift/api/.ci-operator.yaml +++ /dev/null @@ -1,4 +0,0 @@ -build_root_image: - name: release - namespace: openshift - tag: rhel-9-release-golang-1.26-openshift-5.0 diff --git a/vendor/github.com/openshift/api/.coderabbit.yaml b/vendor/github.com/openshift/api/.coderabbit.yaml deleted file mode 100644 index 4f015d3cb..000000000 --- a/vendor/github.com/openshift/api/.coderabbit.yaml +++ /dev/null @@ -1,30 +0,0 @@ -inheritance: true -language: en-US -reviews: - profile: chill - high_level_summary: false - review_status: true - commit_status: true - collapse_walkthrough: true - changed_files_summary: false - sequence_diagrams: false - estimate_code_review_effort: false - poem: false - suggested_labels: false - path_filters: - - "!payload-manifests" - - "!**/zz_generated.crd-manifests/*" # Contains files - - "!**/zz_generated.featuregated-crd-manifests/**" # Contains folders - - "!openapi/**" - - "!**/vendor/**" - - "!vendor/**" - tools: - golangci-lint: - enabled: true -knowledge_base: - code_guidelines: - enabled: true - filePatterns: - - AGENTS.md - learnings: - scope: local diff --git a/vendor/github.com/openshift/api/.gitattributes b/vendor/github.com/openshift/api/.gitattributes deleted file mode 100644 index 124067fe7..000000000 --- a/vendor/github.com/openshift/api/.gitattributes +++ /dev/null @@ -1,7 +0,0 @@ -# Set unix LF EOL for shell scripts -*.sh text eol=lf - -**/zz_generated.*.go linguist-generated=true -**/types.generated.go linguist-generated=true -**/generated.pb.go linguist-generated=true -**/generated.proto linguist-generated=true diff --git a/vendor/github.com/openshift/api/.gitignore b/vendor/github.com/openshift/api/.gitignore deleted file mode 100644 index 1c3e4625d..000000000 --- a/vendor/github.com/openshift/api/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib - -# Test binary, build with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ -.idea/ -_output/ -tests/bin/ - -models-schema -/render -/write-available-featuresets diff --git a/vendor/github.com/openshift/api/.golangci.go-validated.yaml b/vendor/github.com/openshift/api/.golangci.go-validated.yaml deleted file mode 100644 index ed8fcdbe2..000000000 --- a/vendor/github.com/openshift/api/.golangci.go-validated.yaml +++ /dev/null @@ -1,59 +0,0 @@ -version: "2" -linters: - default: none - enable: - - kubeapilinter - settings: - custom: - kubeapilinter: - path: tools/_output/bin/kube-api-linter.so - description: kubeapilinter is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices. - settings: - linters: - enable: - - optionalfields - - nonpointerstructs - disable: - - "*" - lintersConfig: - optionalfields: - pointers: - preference: Always - policy: SuggestFix - omitEmpty: - # This will force omitempty on optional fields. - # This is in line with upstream guidance where optional fields should be omitted - # from the serialized output unless they are non-zero. - policy: SuggestFix - omitzero: - # This will force omitzero on optional struct fields. - # This means they can be omitted correctly and prevents the need for pointers to structs. - policy: SuggestFix - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ - rules: - - linters: - - kubeapilinter - # This regex must always be updated in tandem with the regex in .golangci.yaml that prevents `optionalfields` from being applied to the files in the path-except. - path-except: machine/v1beta1/(types_awsprovider.go|types_azureprovider.go|types_gcpprovider.go|types_vsphereprovider.go)|machine/v1alpha1/types_openstack.go -issues: - # We have a lot of existing issues. - # Want to make sure that those adding new fields have an - # opportunity to fix them when running the linter locally. - max-issues-per-linter: 1000 -formatters: - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ diff --git a/vendor/github.com/openshift/api/.golangci.yaml b/vendor/github.com/openshift/api/.golangci.yaml deleted file mode 100644 index e4e5b9761..000000000 --- a/vendor/github.com/openshift/api/.golangci.yaml +++ /dev/null @@ -1,138 +0,0 @@ -version: "2" -linters: - default: none - enable: - - kubeapilinter - settings: - custom: - kubeapilinter: - path: tools/_output/bin/kube-api-linter.so - description: kubeapilinter is the Kube-API-Linter and lints Kube like APIs based on API conventions and best practices. - settings: - linters: - enable: - - forbiddenmarkers - - maxlength - - minlength - - namingconventions - - nobools - - nomaps - - preferredmarkers - - statussubresource - disable: - - statusoptional # This is legacy and not something we currently recommend. - - nonpointerstructs # This is intended for native types, not CRD types. - lintersConfig: - conditions: - isFirstField: Warn - usePatchStrategy: Ignore - useProtobuf: Ignore - forbiddenmarkers: - markers: - - identifier: "openshift:enable:FeatureSets" - - identifier: "openshift:validation:FeatureSetAwareEnum" - - identifier: "openshift:validation:FeatureSetAwareXValidation" - - identifier: "kubebuilder:validation:UniqueItems" - optionalfields: - pointers: - preference: WhenRequired - policy: SuggestFix - omitEmpty: - # This will force omitempty on optional fields. - # This is in line with upstream guidance where optional fields should be omitted - # from the serialized output unless they are non-zero. - policy: SuggestFix - omitzero: - # This will force omitzero on optional struct fields. - # This means they can be omitted correctly and prevents the need for pointers to structs. - policy: SuggestFix - preferredmarkers: - markers: - - preferredIdentifier: "kubebuilder:validation:XValidation" - equivalentIdentifiers: - - identifier: "kubebuilder:validation:Pattern" # Use CEL expressions instead to allow more expressive error messages. - requiredfields: - pointers: - # This will force pointers when the field is required, but only when the zero - # value is a valid user choice, and has a semantic difference to being omitted (e.g. replicas allows 0). - policy: SuggestFix - omitempty: - # This will force omitempty on required fields. - # We do this so that the behaviour of not setting a value for the field is the same between - # both structured and unstructured clients. - policy: SuggestFix - omitzero: - # This will force omitzero on required struct fields. - # This means they can be omitted correctly and prevents the need for pointers to structs. - policy: SuggestFix - namingconventions: - conventions: - - name: nokind - violationMatcher: "^Kind$" - operation: Replacement - replacement: "Resource" - message: "API Kinds can be ambiguous and should be replaced with Resource" - noreferences: - policy: NoReferences - uniquemarkers: - customMarkers: - - identifier: "openshift:validation:FeatureGateAwareEnum" - attributes: - - featureGate - - requiredFeatureGate - - identifier: "openshift:validation:FeatureGateMaxItems" - attributes: - - featureGate - - requiredFeatureGate - - identifier: "openshift:validation:FeatureGateAwareXValidation" - attributes: - - featureGate - - requiredFeatureGate - - rule - exclusions: - generated: lax - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - paths: - - third_party$ - - builtin$ - - examples$ - rules: - - linters: - - kubeapilinter - # This regex must always be updated in tandem with the regex in .golangci.go-validated.yaml that prevents `optionalfields` from being applied to the files in the path. - path: machine/v1beta1/(types_awsprovider.go|types_azureprovider.go|types_gcpprovider.go|types_vsphereprovider.go)|machine/v1alpha1/types_openstack.go - text: "optionalfields" - - linters: - - kubeapilinter - # osin/v1 types are config file APIs, not CRDs — validation is handled in Go code at config load time. - path: osin/v1/types.go - - linters: - - kubeapilinter - # Silence norefs lint for `Ref` field in ClusterAPI as it refers to an OCI image reference, not a kube object reference. - path: operator/v1alpha1/types_clusterapi.go - text: "noreferences: naming convention \"no-references\": field ClusterAPIInstallerComponentImage.Ref: field names should not contain reference-related words" - - linters: - - kubeapilinter - # PacemakerCluster intentionally marks Conditions as required with XValidation rules - # to enforce specific condition types are always present. - path: etcd/v1/types_pacemakercluster.go - text: "conditions: Conditions field in (PacemakerClusterStatus|PacemakerClusterNodeStatus|PacemakerClusterFencingAgentStatus|PacemakerClusterResourceStatus) is missing the following markers: optional" - - linters: - - kubeapilinter - path: features|payload-command/*.go -issues: - # We have a lot of existing issues. - # Want to make sure that those adding new fields have an - # opportunity to fix them when running the linter locally. - max-issues-per-linter: 1000 -formatters: - exclusions: - generated: lax - paths: - - third_party$ - - builtin$ - - examples$ diff --git a/vendor/github.com/openshift/api/AGENTS.md b/vendor/github.com/openshift/api/AGENTS.md deleted file mode 100644 index b93747227..000000000 --- a/vendor/github.com/openshift/api/AGENTS.md +++ /dev/null @@ -1,222 +0,0 @@ -This file provides guidance to AI agents when working with code in this repository. - -This is the OpenShift API repository - the canonical location of OpenShift API type definitions and serialization code. It contains: - -- API type definitions for OpenShift-specific resources (Custom Resource Definitions) -- FeatureGate management system for controlling API availability across cluster profiles -- Generated CRD manifests and validation schemas -- Integration test suite for API validation - -## Key Architecture Components - -### FeatureGate System -The FeatureGate system (`features/features.go`) controls API availability across different cluster profiles (Hypershift, SelfManaged) and feature sets (Default, TechPreview, DevPreview). Each API feature is gated behind a FeatureGate that can be enabled/disabled per cluster profile and feature set. - -### API Structure -APIs are organized by group and version (e.g., `route/v1`, `config/v1`). Each API group contains: -- `types.go` - Go type definitions -- `zz_generated.*` files - Generated code (deepcopy, CRDs, etc.) -- `tests/` directories - Integration test definitions -- CRD manifest files - -## Common Development Commands - -### Building -```bash -make build # Build render and write-available-featuresets binaries -make clean # Clean build artifacts -``` - -### Code Generation -```bash -make update # Alias for update-codegen-crds -``` - -#### Targeted Code Generation -When working on a specific API group/version, you can regenerate only the affected CRDs instead of all CRDs: - -```bash -# Regenerate CRDs for a specific API group/version -make update-codegen API_GROUP_VERSIONS=operator.openshift.io/v1alpha1 -make update-codegen API_GROUP_VERSIONS=config.openshift.io/v1 -make update-codegen API_GROUP_VERSIONS=route.openshift.io/v1 - -# Multiple API groups can be specified with comma separation -make update-codegen API_GROUP_VERSIONS=operator.openshift.io/v1alpha1,config.openshift.io/v1 -``` - -**Important:** While using `API_GROUP_VERSIONS` is faster for iteration (e.g., when developing tests), -it generates invalid OpenAPI data. This targeted generation is useful during development cycles, but you -**must run `make update`** (without `API_GROUP_VERSIONS`) to regenerate all files correctly before -committing changes. The full `make update` ensures all generated files, including OpenAPI schemas, are -properly synchronized. - -**Workflow:** -- During iteration: `make update-codegen API_GROUP_VERSIONS=your.group/v1` (fast feedback) -- Before committing: `make update` (ensures correctness) - -### Testing -```bash -make test-unit # Run unit tests -make integration # Run integration tests (in tests/ directory) -go test -v ./... # Run tests for specific packages - -# Run integration tests for specific API groups -make -C config/v1 test # Run tests for config/v1 API group -make -C route/v1 test # Run tests for route/v1 API group -make -C operator/v1 test # Run tests for operator/v1 API group -``` - -### Validation and Verification -```bash -make verify # Run all verification checks -make verify-scripts # Verify generated code is up to date -make verify-codegen-crds # Verify CRD generation is current -make lint # Run golangci-lint (only on changes from master) -make lint-fix # Auto-fix linting issues where possible -``` - -## Adding New APIs - -All APIs should start as tech preview. -New fields on stable APIs should be introduced behind a feature gate `+openshift:enable:FeatureGate=MyFeatureGate`. - - -### For New Stable APIs (v1) -1. Create the API type with proper kubebuilder annotations -2. Include required markers like `+openshift:compatibility-gen:level=1` -3. Add validation tests in `//tests//` -4. Run `make update-codegen-crds` to generate CRDs - -### For New TechPreview APIs (v1alpha1) -1. First add a FeatureGate in `features/features.go` -2. Create the API type with `+openshift:enable:FeatureGate=MyFeatureGate` -3. Add corresponding test files -4. Run generation commands - -### Adding FeatureGates -Add to `features/features.go` using the builder pattern: -```go -FeatureGateMyFeatureName = newFeatureGate("MyFeatureName"). - reportProblemsToJiraComponent("my-jira-component"). - contactPerson("my-team-lead"). - productScope(ocpSpecific). - enableIn(configv1.TechPreviewNoUpgrade). - mustRegister() -``` - -## Testing Framework - -The repository includes a comprehensive integration test suite in `tests/`. Test suites are defined in `*.testsuite.yaml` files alongside API definitions and support: -- `onCreate` tests for validation during resource creation -- `onUpdate` tests for update-specific validations and immutability -- Status subresource testing -- Validation ratcheting tests using `initialCRDPatches` - -Use `tests/hack/gen-minimal-test.sh $FOLDER $VERSION` to generate test suite templates. - -## Container-based Development -```bash -make verify-with-container # Run verification in container -make generate-with-container # Run code generation in container -``` - -Uses `podman` by default, set `RUNTIME=docker` or `USE_DOCKER=1` to use Docker instead. - -## Custom Claude Code Commands - -### Generate Tests -``` -/generate-tests -``` -Generates comprehensive `.testsuite.yaml` integration test files for OpenShift API type definitions: -- Reads Go types, validation markers, CRD manifests, and CEL rules -- Generates test suites for each CRD variant in `zz_generated.featuregated-crd-manifests/` - -Examples: -``` -/generate-tests config/v1/types_infrastructure.go -/generate-tests operator/v1 -``` - -### API Review -``` -/api-review -``` -Runs comprehensive API review for OpenShift API changes in a GitHub PR: -- Executes `make lint` to check for kube-api-linter issues -- Validates that all API fields are properly documented -- Ensures optional fields explain behavior when not present -- Confirms validation rules and kubebuilder markers are documented in field comments - -#### Documentation Requirements -All kubebuilder validation markers must be documented in the field's comment. For example: - -**Good:** -```go -// internalDNSRecords is an optional field that determines whether we deploy -// with internal records enabled for api, api-int, and ingress. -// Valid values are "Enabled" and "Disabled". -// When set to Enabled, in cluster DNS resolution will be enabled for the api, api-int, and ingress endpoints. -// When set to Disabled, in cluster DNS resolution will be disabled and an external DNS solution must be provided for these endpoints. -// +optional -// +kubebuilder:validation:Enum=Enabled;Disabled -InternalDNSRecords InternalDNSRecordsType `json:"internalDNSRecords"` -``` - -**Bad:** -```go -// internalDNSRecords determines whether we deploy with internal records enabled for -// api, api-int, and ingress. -// +optional // ❌ Optional nature not documented in comment -// +kubebuilder:validation:Enum=Enabled;Disabled // ❌ Valid values not documented -InternalDNSRecords InternalDNSRecordsType `json:"internalDNSRecords"` -``` - -#### Systematic Validation Marker Documentation Checklist - -**MANDATORY**: For each field with validation markers, verify the comment documents ALL of the following that apply: - -**Field Optionality:** -- [ ] `+optional` - explain behavior when field is omitted -- [ ] `+required` - explain that the field is required - -**String/Array Length Constraints:** -- [ ] `+kubebuilder:validation:MinLength` and `+kubebuilder:validation:MaxLength` - document character length constraints -- [ ] `+kubebuilder:validation:MinItems` and `+kubebuilder:validation:MaxItems` - document item count ranges - -**Value Constraints:** -- [ ] `+kubebuilder:validation:Enum` - list all valid enum values and their meanings -- [ ] `+kubebuilder:validation:Pattern` - explain the pattern requirement in human-readable terms -- [ ] `+kubebuilder:validation:Minimum` and `+kubebuilder:validation:Maximum` - document numeric ranges - -**Advanced Validation:** -- [ ] `+kubebuilder:validation:XValidation` - explain cross-field validation rules in detail -- [ ] Any custom validation logic - document the validation behavior - -#### API Review Process - -**CRITICAL PROCESS**: Follow this exact order to ensure comprehensive validation: - -1. **Linting Check**: Run `make lint` and fix all kubeapilinter errors first -2. **Extract Validation Markers**: Use systematic search to find all markers -3. **Systematic Documentation Review**: For each marker found, verify corresponding documentation exists -4. **Optional Fields Review**: Ensure every `+optional` field explains omitted behavior -5. **Cross-field Validation**: Verify any documented field relationships have corresponding `XValidation` rules - -**FAILURE CONDITIONS**: The review MUST fail if any of these are found: -- Any validation marker without corresponding documentation -- Any `+optional` field without omitted behavior explanation -- Any documented field constraint without enforcement via validation rules -- Any `make lint` failures - -The comment must explicitly state: -- When a field is optional (for `+kubebuilder:validation:Optional` or `+optional`) -- Valid enum values (for `+kubebuilder:validation:Enum`) -- Validation constraints (for min/max, patterns, etc.) -- Default behavior when field is omitted -- Any interactions with other fields, commonly implemented with `+kubebuilder:validation:XValidation` - -**CRITICAL**: When API documentation states field relationships or constraints (e.g., "cannot be used together with field X", "mutually exclusive with field Y"), these relationships MUST be enforced with appropriate validation rules. Use `+kubebuilder:validation:XValidation` with CEL expressions for cross-field constraints. Documentation without enforcement is insufficient and will fail review. - -Example: `/api-review https://github.com/openshift/api/pull/1234` diff --git a/vendor/github.com/openshift/api/Dockerfile.ocp b/vendor/github.com/openshift/api/Dockerfile.ocp deleted file mode 100644 index 98870518c..000000000 --- a/vendor/github.com/openshift/api/Dockerfile.ocp +++ /dev/null @@ -1,23 +0,0 @@ -FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.26-openshift-5.0 AS builder -WORKDIR /go/src/github.com/openshift/api -COPY . . -ENV GO_PACKAGE github.com/openshift/api -RUN make build --warn-undefined-variables - -FROM registry.ci.openshift.org/ocp/5.0:base-rhel9 - -# copy the built binaries to /usr/bin -COPY --from=builder /go/src/github.com/openshift/api/render /usr/bin/ -COPY --from=builder /go/src/github.com/openshift/api/write-available-featuresets /usr/bin/ - -# this directory is used to produce rendered manifests that the installer applies (but does not maintain) in bootkube -RUN mkdir -p /usr/share/bootkube/manifests/manifests -COPY payload-manifests/crds/* /usr/share/bootkube/manifests/manifests - -# these are applied by the CVO -RUN mkdir -p /manifests -COPY payload-manifests/crds/* /manifests -COPY payload-manifests/featuregates/* /manifests -COPY payload-command/empty-resources /manifests - -LABEL io.openshift.release.operator true diff --git a/vendor/github.com/openshift/api/Makefile b/vendor/github.com/openshift/api/Makefile deleted file mode 100644 index b6c0de378..000000000 --- a/vendor/github.com/openshift/api/Makefile +++ /dev/null @@ -1,249 +0,0 @@ -all: build -.PHONY: all - -update: update-non-codegen update-codegen - -RUNTIME ?= podman -RUNTIME_IMAGE_NAME ?= registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.26-openshift-5.0 - -EXCLUDE_DIRS := _output/ dependencymagnet/ hack/ third_party/ tls/ tools/ vendor/ tests/ -GO_PACKAGES :=$(addsuffix ...,$(addprefix ./,$(filter-out $(EXCLUDE_DIRS), $(wildcard */)))) - -.PHONY: test-unit -test-unit: - go test -v $(GO_PACKAGES) - -################################################################################## -# -# BEGIN: Update codegen-crds. Defaults to generating updates for all API packages. -# To run a subset of packages: -# - Set API_GROUP_VERSIONS to a space separated list of fully qualified /. -# E.g. API_GROUP_VERSIONS="apps.openshift.io/v1 build.openshift.io/v1" make update-codegen-crds. -# FeatureSet generation is controlled at the group level by the -# .codegen.yaml file. -# -################################################################################## - -# Ensure update-scripts are run before crd-gen so updates to Godoc are included in CRDs. -# Run update-payload-crds after update-codegen-crds to copy any newly created crds -.PHONY: update-codegen-crds -update-codegen-crds: update-scripts - hack/update-codegen-crds.sh - hack/update-payload-crds.sh - -##################### -# -# END: Update Codegen -# -##################### - -# When not otherwise set, diff/lint against the local master branch -PULL_BASE_SHA ?= master - -.PHONY: lint -lint: - hack/golangci-lint.sh run --new-from-rev=${PULL_BASE_SHA} ${EXTRA_ARGS} - -.PHONY: lint-fix -lint-fix: EXTRA_ARGS=--fix -lint-fix: lint - -# Ignore the exit code of the fix lint, it will always error as there are unfixed issues -# that cannot be fixed from historic commits. -.PHONY: verify-lint-fix -verify-lint-fix: - make lint-fix 2>/dev/null || true - git diff --exit-code - -# Verify codegen runs all verifiers in the order they are defined in the root.go file. -# This includes all generators defined in update-codegen, but also the crd-schema-checker and crdify verifiers. -.PHONY: verify-codegen -verify-codegen: - EXTRA_ARGS=--verify hack/update-codegen.sh - -.PHONY: verify-non-codegen -verify-non-codegen: - bash -x hack/verify-protobuf.sh - hack/verify-crds.sh - bash -x hack/verify-types.sh - bash -x hack/verify-integration-tests.sh - bash -x hack/verify-group-versions.sh - bash -x hack/verify-prerelease-lifecycle-gen.sh - hack/verify-payload-crds.sh - hack/verify-payload-featuregates.sh - -.PHONY: verify-scripts -verify-scripts: verify-non-codegen verify-codegen - -.PHONY: verify -verify: verify-scripts lint - -.PHONY: verify-codegen-crds -verify-codegen-crds: - bash -x hack/verify-codegen-crds.sh - -.PHONY: verify-crd-schema -verify-crd-schema: - bash -x hack/verify-crd-schema-checker.sh - -.PHONY: verify-crdify -verify-crdify: - bash -x hack/verify-crdify.sh - -.PHONY: verify-feature-promotion -verify-feature-promotion: - hack/verify-promoted-features-pass-tests.sh - -.PHONY: verify-% -verify-%: - make $* - git diff --exit-code - -################################################################################################ -# -# BEGIN: Update scripts. Defaults to generating updates for all API packages. -# Set API_GROUP_VERSIONS to a space separated list of fully qualified / to limit -# the scope of the updates. Eg API_GROUP_VERSIONS="apps.openshift.io/v1 build.openshift.io/v1" make update-scripts. -# Note: Protobuf generation is handled separately, see hack/lib/init.sh. -# -################################################################################################ - -.PHONY: update-scripts -update-scripts: update-compatibility update-openapi update-deepcopy update-protobuf update-swagger-docs tests-vendor update-prerelease-lifecycle-gen update-payload-featuregates - -# Update codegen runs all generators in the order they are defined in the root.go file. -# The per group generators are:[compatibility, deepcopy, swagger-docs, empty-partial-schema, schema-patch, crd-manifest-merge] -# The multi group generators are:[openapi] -# The payload generation must come after these generators have run so they are included here as well, rather than in update-non-codegen. -.PHONY: update-codegen -update-codegen: - hack/update-codegen.sh - make update-payload-crds update-payload-featuregates - -# Update non-codegen runs all generators that are not part of the codegen utility, or -# are part of it, but are not run by default when invoking codegen without a specific generator. -# E.g. the payload feature gates which is not part of the generator style, but is still a subcommand. -.PHONY: update-non-codegen -update-non-codegen: update-protobuf tests-vendor update-prerelease-lifecycle-gen - -.PHONY: update-compatibility -update-compatibility: - hack/update-compatibility.sh - -.PHONY: update-openapi -update-openapi: - hack/update-openapi.sh - -.PHONY: update-deepcopy -update-deepcopy: - hack/update-deepcopy.sh - -.PHONY: update-protobuf -update-protobuf: - hack/update-protobuf.sh - -.PHONY: update-swagger-docs -update-swagger-docs: - hack/update-swagger-docs.sh - -.PHONY: update-prerelease-lifecycle-gen -update-prerelease-lifecycle-gen: - hack/update-prerelease-lifecycle-gen.sh - -.PHONY: update-payload-crds -update-payload-crds: - hack/update-payload-crds.sh - -.PHONY: update-payload-featuregates -update-payload-featuregates: - hack/update-payload-featuregates.sh - -##################### -# -# END: Update scripts -# -##################### - -deps: - go mod tidy - go mod vendor - go mod verify - -verify-with-container: - $(RUNTIME) run -ti --rm -v $(PWD):/go/src/github.com/openshift/api:z -w /go/src/github.com/openshift/api $(RUNTIME_IMAGE_NAME) make verify - -generate-with-container: - $(RUNTIME) run -ti --rm -v $(PWD):/go/src/github.com/openshift/api:z -w /go/src/github.com/openshift/api $(RUNTIME_IMAGE_NAME) make update - -.PHONY: integration -integration: - make -C tests integration - -# Run API review evals. Requires claude CLI. -# EVAL_RUNS=5 Number of runs per test case (default: 1) -# EVAL_THRESHOLD=0.8 Minimum pass rate (default: 0.8) -# EVAL_GOLDEN_MODEL=... Model for golden tests (default: sonnet) -# EVAL_INTEGRATION_MODEL=... Model for integration tests (default: opus) -# EVAL_JUDGE_MODEL=... Model for judging results (default: haiku) -# EVAL_GOLDEN_PROCS=4 Max parallel golden tests (default: 4) -# EVAL_INTEGRATION_PROCS=2 Max parallel integration tests (default: 2) -# EVAL_GINKGO_ARGS=... Extra ginkgo args -.PHONY: eval -eval: - $(MAKE) -C tests eval - -.PHONY: eval-golden -eval-golden: - $(MAKE) -C tests eval-golden - -.PHONY: eval-integration -eval-integration: - $(MAKE) -C tests eval-integration - -tests-vendor: - make -C tests vendor - -################################## -# -# BEGIN: Build binaries and images -# -################################## - -.PHONY: build -build: render write-available-featuresets - -render: - go build --mod=vendor -trimpath github.com/openshift/api/payload-command/cmd/render - -write-available-featuresets: - go build --mod=vendor -trimpath github.com/openshift/api/payload-command/cmd/write-available-featuresets - -.PHONY: clean -clean: - rm -f render write-available-featuresets - rm -rf tools/_output - -VERSION ?= $(shell git describe --always --abbrev=7) -MUTABLE_TAG ?= latest -IMAGE ?= registry.ci.openshift.org/openshift/api - -ifeq ($(shell command -v podman > /dev/null 2>&1 ; echo $$? ), 0) - ENGINE=podman -else ifeq ($(shell command -v docker > /dev/null 2>&1 ; echo $$? ), 0) - ENGINE=docker -endif - -USE_DOCKER ?= 0 -ifeq ($(USE_DOCKER), 1) - ENGINE=docker -endif - -.PHONY: images -images: - $(ENGINE) build -f Dockerfile.rhel8 -t "$(IMAGE):$(VERSION)" -t "$(IMAGE):$(MUTABLE_TAG)" ./ - -################################ -# -# END: Build binaries and images -# -################################ diff --git a/vendor/github.com/openshift/api/OWNERS b/vendor/github.com/openshift/api/OWNERS deleted file mode 100644 index ebd9a2f45..000000000 --- a/vendor/github.com/openshift/api/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: - - JoelSpeed - - everettraven -approvers: - - deads2k - - JoelSpeed - - everettraven diff --git a/vendor/github.com/openshift/api/README.md b/vendor/github.com/openshift/api/README.md deleted file mode 100644 index 071da98c0..000000000 --- a/vendor/github.com/openshift/api/README.md +++ /dev/null @@ -1,354 +0,0 @@ -# api -The canonical location of the OpenShift API definition. -This repo holds the API type definitions and serialization code used by [openshift/client-go](https://github.com/openshift/client-go) -APIs in this repo ship inside OCP payloads. - -## Adding new FeatureGates -Add your FeatureGate to `features.go`. -The threshold for merging a fully disabled or TechPreview FeatureGate is an open enhancement. -To promote to Default on any ClusterProfile, the threshold is 99% passing tests on all platforms or QE sign off. - -### Adding new TechPreview FeatureGate to all ClusterProfiles (Hypershift and SelfManaged) -```go -FeatureGateMyFeatureName = newFeatureGate("MyFeatureName"). - reportProblemsToJiraComponent("my-jira-component"). - contactPerson("my-team-lead"). - productScope(ocpSpecific). - enableIn(TechPreviewNoUpgrade). - mustRegister() -``` - -### Adding new TechPreview FeatureGate to all only Hypershift -This will be enabled in TechPreview on Hypershift, but never enabled on SelfManaged -```go -FeatureGateMyFeatureName = newFeatureGate("MyFeatureName"). - reportProblemsToJiraComponent("my-jira-component"). - contactPerson("my-team-lead"). - productScope(ocpSpecific). - enableForClusterProfile(Hypershift, TechPreviewNoUpgrade). - mustRegister() -``` - -### Promoting to Default, but only on Hypershift -This will be enabled in TechPreview on all ClusterProfiles and also by Default on Hypershift. -It will be disabled in Default on SelfManaged. -```go -FeatureGateMyFeatureName = newFeatureGate("MyFeatureName"). - reportProblemsToJiraComponent("my-jira-component"). - contactPerson("my-team-lead"). - productScope([ocpSpecific|kubernetes]). - enableIn(TechPreviewNoUpgrade). - enableForClusterProfile(Hypershift, Default). - mustRegister() -``` - -### Promoting to Default on all ClusterProfiles -```go -FeatureGateMyFeatureName = newFeatureGate("MyFeatureName"). - reportProblemsToJiraComponent("my-jira-component"). - contactPerson("my-team-lead"). - productScope([ocpSpecific|kubernetes]). - enableIn(Default, TechPreviewNoUpgrade). - mustRegister() -``` - -### defining API validation tests -Tests are logically associated with FeatureGates. -When adding any FeatureGated functionality a new test file is required. -The test files are located in `//tests//FeatureGate.yaml`: -``` -route/ - v1/ - tests/ - routes.route.openshift.io/ - AAA_ungated.yaml - RouteExternalCertificate.yaml -``` -Here's an `AAA_ungated.yaml` example: -```yaml -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this. -name: Route -crdName: routes.route.openshift.io -tests: -``` - -Here's an `RouteExternalCertificate.yaml` example: -```yaml -apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this. -name: Route -crdName: routes.route.openshift.io -featureGate: RouteExternalCertificate -tests: -``` - -The integration tests use the crdName and featureGate to determine which tests apply to which manifests and automatically -react to changes when the FeatureGates are enabled/disabled on various FeatureSets and ClusterProfiles. - -[`gen-minimal-test.sh`](tests/hack/gen-minimal-test.sh) can still function to stub out files if you don't want to -copy/paste an existing one. - -### defining FeatureGate e2e tests - -In order to move an API into the `Default` FeatureSet, it is necessary to demonstrate completeness and reliability. -E2E tests are the ONLY category of test that automatically prevents regression over time: repository presubmits do NOT provide equivalent protection. -To confirm this, there is an automated verify script that runs every time a FeatureGate is added to the `Default` FeatureSet. -The script queries our CI system (sippy/component readiness) to retrieve a list of all automated tests for a given FeatureGate -and then enforces the following rules. -1. Tests must contain either `[OCPFeatureGate:]` or the standard upstream `[FeatureGate:]`. -2. There must be at least five tests for each FeatureGate. -3. Every test must be run on every TechPreview platform we have jobs for. (Ask for an exception if your feature doesn't support a variant.) -4. Every test must run at least 14 times on every platform/variant. -5. Every test must pass at least 95% of the time on every platform/variant. -6. Test results are taken from the last 7 days if the test was run at least 14 times during that period. Otherwise, data from the last 14 days is used. -7. Test flakes (even if the test eventually passes on a retry) are considered failures and negatively impact the pass rate. - -If your FeatureGate lacks automated testing, there is an exception process that allows QE to sign off on the promotion by -commenting on the PR. - - -## defining new APIs - -When defining a new API, please follow [the OpenShift API -conventions](https://github.com/openshift/enhancements/blob/master/CONVENTIONS.md#api), -and then follow the instructions below to regenerate CRDs (if necessary) and -submit a pull request with your new API definitions and generated files. - -New APIs (new CRDs) must be added first as an unstable API (v1alpha1). -Once the feature is more developed, and ready to be promoted to stable, the API can be promoted to v1. - -### Why do we start with v1alpha1? - -By starting an API as a v1alpha1, we can iterate on the API with the ability to make breaking changes. -We can make changes to the schema, change validations, change entire types and even serialization without worry. - -When changes are made to an API, any existing client code will need to be updated to match. -If there are breaking changes (such as changing the serialization), then this requires a new version of the API. - -If we did not bump the API version for each breaking change, a client, generated prior to the breaking change, -would panic when it tried to deserialize the new serialization of the API. - -If, during development of a feature, we need to make a breaking change, we should move the feature to v1alpha2 (or v1alpha3, etc), -until we reach a version that we are happy to promote to v1. - -Do not make changes to the API when promoting the feature to v1. - -### Adding a new stable API (v1) -When copying, it matters which `// +foo` markers are two comments blocks up and which are one comment block up. - -```go -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// the next line of whitespace matters - -// MyAPI is amazing, let me describe it! -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=my-operator,operatorOrdering=01 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=myapis,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/ -// +openshift:capability=IfYouHaveOne -// +kubebuilder:printcolumn:name=Column Name,JSONPath=.status.something,type=string,description=how users should interpret this. -// +kubebuilder:metadata:annotations=key=value -// +kubebuilder:metadata:labels=key=value -// +kubebuilder:validation:XValidation:rule= -type MyAPI struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the desired state of the cluster version - the operator will work - // to ensure that the desired version is applied to the cluster. - // +kubebuilder:validation:Required - Spec MyAPISpec `json:"spec"` - // status contains information about the available updates and any in-progress - // updates. - // +optional - Status MyAPIStatus `json:"status"` -} - -``` - -### Adding a new unstable API (v1alpha) -First, add a FeatureGate as described above. - -Like above, but there's an additional - -```go -// +kubebuilder:validation:XValidation:rule= -// +openshift:enable:FeatureGate=MyFeatureGate -type MyAPI struct { - ... -} -``` - -### Adding new fields -Here are few other use-cases for convenience, but have a look in `./example` for other possibilities. - - -```go -// +openshift:validation:FeatureGateAwareXValidation:featureGate=MyFeatureGate,rule="has(oldSelf.coolNewField) ? has(self.coolNewField) : true",message="coolNewField may not be removed once set" -type MyAPI struct { - // +openshift:enable:FeatureGate=MyFeatureGate - // +optional - CoolNewField string `json:"coolNewField"` -} - -// EvolvingDiscriminator defines the audit policy profile type. -// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum="";StableValue -// +openshift:validation:FeatureGateAwareEnum:featureGate=MyFeatureGate,enum="";StableValue;TechPreviewOnlyValue -type EvolvingDiscriminator string - -const ( - // "StableValue" is always present. - StableValue EvolvingDiscriminator = "StableValue" - - // "TechPreviewOnlyValue" should only be allowed when TechPreviewNoUpgrade is set in the cluster - TechPreviewOnlyValue EvolvingDiscriminator = "TechPreviewOnlyValue" -) - -``` - - -### required labels - -In addition to the standard `lgtm` and `approved` labels this repository requires either: - -`bugzilla/valid-bug` - applied if your PR references a valid bugzilla bug - -OR - -`qe-approved`, `docs-approved`, and `px-approved` - these labels can be applied by anyone in the openshift org via the `/label` command. - -Who should apply these qe/docs/px labels? -- For a no-FF team who is merging a feature before code freeze, they need to get those labels applied to their api repo PR by the appropriate teams (i.e. qe, docs, px) -- For a FF(traditional) team who is merging a feature before FF, they can self-apply the labels(via /label commands), they are basically irrelevant for those teams -- For a FF team who is merging a feature after FF, the PR should be rejected barring an exception - -Why are these labels needed? - -We need a way for no-FF teams to be able to merge post-FF that does not require a BZ. For non-shared repos that mechanism is the -qe/docs/px-approved labels. We are expanding that mechanism to shared repos because the alternative would be that no-FF teams would -put a dummy `bugzilla/valid-bug` label on their feature PRs in order to be able to merge them after feature freeze. Since most -individuals can't apply a `bugzilla/valid-bug` label to a PR, this introduces additional obstacles on those PRs. Conversely, anyone -can apply the docs/qe/px-approved labels, so "FF" teams that need to apply these labels to merge can do so w/o needing to involve -anyone additional. - -Does this mean feature-freeze teams can use the no-FF process to merge code? - -No, signing a team up to be a no-FF team includes some basic education on the process and includes ensuring the associated QE+Docs -participants are aware the team is moving to that model. If you'd like to sign your team up, please speak with Gina Hargan who will -be happy to help on-board your team. - -## vendoring generated manifests into other repositories -If your repository relies on vendoring and copying CRD manifests (good job!), you'll need have an import line that -depends on the package that contains the CRD manifests. -For example, adding -```go -import ( - _ "github.com/openshift/api/operatoringress/v1/zz_generated.crd-manifests" -) -``` -to any .go file will work, but some commonly chosen files are `tools/tools.go` or `pkg/dependencymagnet/doc.go`. -Once added, a `go mod vendor` will pick up the package containing the manifests for you to copy. - -## generating CRD schemas - -Since Kubernetes 1.16, every CRD created in `apiextensions.k8s.io/v1` is required to have a [structural OpenAPIV3 schema](https://kubernetes.io/blog/2019/06/20/crd-structural-schema/). The schemas provide server-side validation for fields, as well as providing the descriptions for `oc explain`. Moreover, schemas ensure structural consistency of data in etcd. Without it anything can be stored in a resource which can have security implications. As we host many of our CRDs in this repo along with their corresponding Go types we also require them to have schemas. However, the following instructions apply for CRDs that are not hosted here as well. - -These schemas are often very long and complex, and should not be written by hand. For OpenShift, we provide Makefile targets in [build-machinery-go](https://github.com/openshift/build-machinery-go/) which generate the schema, built on upstream's [controller-gen](https://github.com/kubernetes-sigs/controller-tools) tool. - -If you make a change to a CRD type in this repo, simply calling `make update-codegen-crds` should regenerate all CRDs and update the manifests. If yours is not updated, ensure that the path to its API is included in our [calls to the Makefile targets](https://github.com/openshift/api/blob/release-4.5/Makefile#L17-L29), if this doesn't help try calling `make generate-with-container` for executing the generators in a controlled environment. - -To add this generator to another repo: -1. Vendor `github.com/openshift/build-machinery-go` - -2. Update your `Makefile` to include the following: -``` -include $(addprefix ./vendor/github.com/openshift/build-machinery-go/make/, \ - targets/openshift/crd-schema-gen.mk \ -) - -$(call add-crd-gen,,,,) -``` -The parameters for the call are: - -1. `TARGET_NAME`: The name of your generated Make target. This can be anything, as long as it does not conflict with another make target. Recommended to be your api name. -2. `API_DIRECTORY`: The location of your API. For example if your Go types are located under `pkg/apis/myoperator/v1/types.go`, this should be `./pkg/apis/myoperator/v1`. -3. `CRD_MANIFESTS`: The directory your CRDs are located in. For example, if that is `manifests/my_operator.crd.yaml` then it should be `./manifests` -4. `MANIFEST_OUTPUT`: This should most likely be the same as `CRD_MANIFESTS`, and is only provided for flexibility to output generated code to a different directory. - -You can include as many calls to different APIs as necessary, or if you have multiple APIs under the same directory (eg, `v1` and `v2beta1`) you can use 1 call to the parent directory pointing to your API. - -After this, calling `make update-codegen-crds` should generate a new structural OpenAPIV3 schema for your CRDs. - -**Notes** -- This will not generate entire CRDs, only their OpenAPIV3 schemas. If you do not already have a CRD, you will get no output from the generator. -- Ensure that your API is correctly declared for the generator to pick it up. That means, in your `doc.go`, include the following: - 1. `// +groupName=`, this should match the `group` in your CRD `spec` - 2. `// +kubebuilder:validation:Optional`, this tells the operator that fields should be optional unless explicitly marked with `// +kubebuilder:validation:Required` - -For more information on the API markers to add to your Go types, see the [Kubebuilder book](https://book.kubebuilder.io/reference/markers.html) - -### Order of generation -`make update-codegen-crds` does roughly this: - -1. Run the `empty-partial-schema` tool. This creates empty CRD manifests in `zz_generated.featuregated-crd-manifests` for each FeatureGate. -2. Run the `schemapatch` tool. This fills in the schema for each per-FeatureGate CRD manifest. -3. Run the `manifest-merge` tool. This combines all the per-FeatureGate CRD manifests and `manual-overrides` - -#### empty-partial-schema -This tool is gengo based and scans all types for a `// +kubebuilder:object:root=true` marker. -For each type match, the type is navigated and all tags that include a `featureGate` -(`// +openshift:enable:FeatureGate`, `// +openshift:validation:FeatureGateAwareEnum`, and `// +openshift:validation:FeatureGateAwareXValidation`) -are tracked. -For each type, for each FeatureGate, a file CRD manifest is created in `zz_generated.featuregated-crd-manifests`. -The most common kube-builder tags are re-implemented in this stage to fill in the non-schema portion of the CRD manifests. -This includes things like metadata, resource, and some custom openshift tags as well. - -The generator ignores the schema when doing verify, so it doesn't fail on needing to run `schemapatch`. -The generator should clean up old FeatureGated manifests when the gate is removed. -Ungated files are created for resources that are sometimes ungated. -Annotations are injected to indicate which FeatureGate a manifest is for: this is later read by `schemapatch` and `manifest-merge`. - -#### schemapatch -This tool is kubebuilder based with patches to handle FeatureGated types, members, and validation. -It reads the injected annotation from `empty-partial-schema` to decide which FeatureGate should be considered enabled when -creating the schema that needs to be injected. -It has no knowledge of whether the FeatureGate is enabled or disabled in particular ClusterProfile,FeatureSet tuples. -It only needs a single pass over all the FeatureGated partial manifests. - -If the schema generation isn't doing what you want, `manual-override-crd-manifests` allows partially overlaying bits of the CRD manifest. -`yamlpatch` is no longer supported. -The format is just "write the CRD you want and delete the stuff the generator sets properly". -More specifically, it is the partial manifest that server-side-apply (structured merge diff) would properly merge on top of -the CRD that is generated otherwise. -Caveat, you cannot test this with a kube-apiserver because the CRD schema uses atomic lists and we had to patch that -schema to indicate map lists keyed by version. - -#### manifest-merge -This tool is gengo based and it combines the files in `zz_generated.featuregated-crd-manifests` and `manual-override-crd-manifests` -on a per ClusterProfile,FeatureSet tuple. -This tool takes as input all possible ClusterProfiles and all possible FeatureSets. -It then maps from ClusterProfile,FeatureSet tuple to the set of enabled and disabled FeatureGates. -Then for each CRD,ClusterProfile,Feature tuple, it merges the pertinent input using structured-merge-diff (SSA) logic -based on the CRD schema plus a patch to make atomic fields map-lists. -Pertinence is determined based on -1. does this manifest have preferred ClusterProfile annotations: if so, honor them; if not, include everywhere. -2. does this manifest have FeatureGate annotations: if so, match against the enabled set for the ClusterProfile,FeatureSet tuple. - Note that CustomNoUpgrade selects everything - -Once we have CRD for each ClusterProfile,FeatureSet tuple we choose what to serialize. -This roughly follows: -1. if all the CRDs are the same, write a single file and annotate with no FeatureSet and every ClusterProfile. Done. -2. if all the CRDs are the same across all ClusterProfiles for each FeatureSet, create one file per FeatureSet and - annotate with one FeatureSet and all ClusterProfiles. Done. -3. if all the CRDs are the same across all FeatureSets for one ClusterProfile, create one file and annotate - with no FeatureSet and one ClusterProfile. Continue to 4. -4. for all remaining ClusterProfile,FeatureSet tuples, serialize a file with one FeatureSet and one ClusterProfile. - diff --git a/vendor/github.com/openshift/api/annotations/annotations.go b/vendor/github.com/openshift/api/annotations/annotations.go deleted file mode 100644 index c10234d10..000000000 --- a/vendor/github.com/openshift/api/annotations/annotations.go +++ /dev/null @@ -1,34 +0,0 @@ -package annotations - -// annotation keys -// NEVER ADD TO THIS LIST. Annotations need to be owned in the API groups they are associated with, so these constants end -// up nested in an API group, not top level in the OpenShift namespace. The items located here are examples of annotations -// claiming a global namespace key that have never achieved global reach. In the future, names should be based on the -// consuming component. -const ( - // OpenShiftDisplayName is a common, optional annotation that stores the name displayed by a UI when referencing a resource. - OpenShiftDisplayName = "openshift.io/display-name" - - // OpenShiftProviderDisplayNameAnnotation is the name of a provider of a resource, e.g. - // "Red Hat, Inc." - OpenShiftProviderDisplayNameAnnotation = "openshift.io/provider-display-name" - - // OpenShiftDocumentationURLAnnotation is the url where documentation associated with - // a resource can be found. - OpenShiftDocumentationURLAnnotation = "openshift.io/documentation-url" - - // OpenShiftSupportURLAnnotation is the url where support for a template can be found. - OpenShiftSupportURLAnnotation = "openshift.io/support-url" - - // OpenShiftDescription is a common, optional annotation that stores the description for a resource. - OpenShiftDescription = "openshift.io/description" - - // OpenShiftLongDescriptionAnnotation is a resource's long description - OpenShiftLongDescriptionAnnotation = "openshift.io/long-description" - - // OpenShiftComponent is a common, optional annotation that stores the owning component for a resource. - // The component is for whatever bug tracker we're using. That used to be bugzilla, now it is - // a jira component and subcomponent in OCPBUGS. - // For example, "Etcd" or "Networking / ovn-kubernetes" - OpenShiftComponent = "openshift.io/owning-component" -) diff --git a/vendor/github.com/openshift/api/apiextensions/install.go b/vendor/github.com/openshift/api/apiextensions/install.go deleted file mode 100644 index adaca4d6b..000000000 --- a/vendor/github.com/openshift/api/apiextensions/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package apiextensions - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - apiextensionsv1alpha1 "github.com/openshift/api/apiextensions/v1alpha1" -) - -const ( - GroupName = "apiextensions.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(apiextensionsv1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/Makefile b/vendor/github.com/openshift/api/apiextensions/v1alpha1/Makefile deleted file mode 100644 index 6cf1a197f..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="apiextensions.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/doc.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/doc.go deleted file mode 100644 index ff9b7416a..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.apiextensions.v1alpha1 -// +openshift:featuregated-schema-gen=true - -// +groupName=apiextensions.openshift.io -// Package v1alpha1 is the v1alpha1 version of the API. -package v1alpha1 diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/register.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/register.go deleted file mode 100644 index a2f99e2a5..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "apiextensions.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &CompatibilityRequirement{}, - &CompatibilityRequirementList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/types_compatibilityrequirement.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/types_compatibilityrequirement.go deleted file mode 100644 index b8dfcc7ac..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/types_compatibilityrequirement.go +++ /dev/null @@ -1,390 +0,0 @@ -package v1alpha1 - -import ( - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CompatibilityRequirement expresses a set of requirements on a target CRD. -// It is used to ensure compatibility between different actors using the same -// CRD. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:file-pattern=cvoRunLevel=0000_20,operatorName=crd-compatibility-checker,operatorOrdering=01 -// +openshift:enable:FeatureGate=CRDCompatibilityRequirementOperator -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=compatibilityrequirements,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2479 -// +kubebuilder:metadata:annotations="release.openshift.io/feature-gate=CRDCompatibilityRequirementOperator" -type CompatibilityRequirement struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +required - metav1.ObjectMeta `json:"metadata,omitzero"` - - // spec is the specification of the desired behavior of the Compatibility Requirement. - // +required - Spec CompatibilityRequirementSpec `json:"spec,omitzero"` - - // status is the most recently observed status of the Compatibility Requirement. - // +optional - Status CompatibilityRequirementStatus `json:"status,omitzero"` -} - -// CompatibilityRequirementSpec is the specification of the desired behavior of the Compatibility Requirement. -type CompatibilityRequirementSpec struct { - // compatibilitySchema defines the schema used by - // customResourceDefinitionSchemaValidation and objectSchemaValidation. - // This field is required. - // +required - CompatibilitySchema CompatibilitySchema `json:"compatibilitySchema,omitzero"` - - // customResourceDefinitionSchemaValidation ensures that updates to the - // installed CRD are compatible with this compatibility requirement. If not - // specified, admission of the target CRD will not be validated. - // This field is optional. - // +optional - CustomResourceDefinitionSchemaValidation CustomResourceDefinitionSchemaValidation `json:"customResourceDefinitionSchemaValidation,omitzero"` - - // objectSchemaValidation ensures that matching resources conform to - // compatibilitySchema. If not specified, admission of matching resources - // will not be validated. - // This field is optional. - // +optional - ObjectSchemaValidation ObjectSchemaValidation `json:"objectSchemaValidation,omitzero"` -} - -// CRDDataType indicates the type of the CRD data. -// +kubebuilder:validation:Enum=YAML -type CRDDataType string - -const ( - // CRDDataTypeYAML indicates that the CRD data is in YAML format. - CRDDataTypeYAML CRDDataType = "YAML" -) - -// CRDData contains the complete definition of a CRD. -type CRDData struct { - // type indicates the type of the CRD data. The only supported type is "YAML". - // This field is required. - // +required - Type CRDDataType `json:"type,omitempty"` - - // data contains the complete definition of the CRD. This field must be in - // the format specified by the type field. It may not be longer than 1572864 - // characters. - // This field is required. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=1572864 - // +required - Data string `json:"data,omitempty"` -} - -// APIVersionSelectionType specifies a method for automatically selecting a -// set of API versions to require. -// +kubebuilder:validation:Enum=StorageOnly;AllServed -type APIVersionSelectionType string - -const ( - APIVersionSetTypeStorageOnly APIVersionSelectionType = "StorageOnly" - APIVersionSetTypeAllServed APIVersionSelectionType = "AllServed" -) - -// APIVersionString is a string representing a kubernetes API version. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=63 -// +kubebuilder:validation:XValidation:rule="!format.dns1035Label().validate(self).hasValue()",message="It must contain only lower-case alphanumeric characters and hyphens and must start with an alphabetic character and end with an alphanumeric character" -type APIVersionString string - -// APIVersions specifies a set of API versions of a CRD. -// +kubebuilder:validation:XValidation:rule="self.defaultSelection != 'AllServed' || !has(self.additionalVersions)",message="additionalVersions may not be defined when defaultSelection is 'AllServed'" -type APIVersions struct { - // defaultSelection specifies a method for automatically selecting a set of - // versions to require. - // - // Valid options are StorageOnly and AllServed. - // When set to StorageOnly, only the storage version is selected for - // compatibility assessment. - // When set to AllServed, all served versions are selected for compatibility - // assessment. - // - // This field is required. - // +required - DefaultSelection APIVersionSelectionType `json:"defaultSelection,omitempty"` - - // additionalVersions specifies a set api versions to require in addition to - // the default selection. It is explicitly permitted to specify a version in - // additionalVersions which was also selected by the default selection. The - // selections will be merged and deduplicated. - // - // Each item must be at most 63 characters in length, and must must consist - // of only lowercase alphanumeric characters and hyphens, and must start - // with an alphabetic character and end with an alphanumeric character.// with an alphabetic character and end with an alphanumeric character. - // At most 32 additional versions may be specified. - // - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - // +listType=set - // +optional - AdditionalVersions []APIVersionString `json:"additionalVersions,omitempty"` -} - -// APIExcludedField describes a field in the schema which will not be validated by -// crdSchemaValidation or objectSchemaValidation. -type APIExcludedField struct { - // path is the path to the field in the schema. - // Paths are dot-separated field names (e.g., "fieldA.fieldB.fieldC") representing nested object fields. - // If part of the path is a slice (e.g., "status.conditions") the remaining path is applied to all items in the slice - // (e.g., "status.conditions.lastTransitionTimestamp"). - // Each field name must be a valid Kubernetes CRD field name: start with a letter, contain only - // letters, digits, and underscores, and be between 1 and 63 characters in length. - // A path may contain at most 16 fields. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=1023 - // +kubebuilder:validation:XValidation:rule="self.split('.').size() <= 16",message="There may be at most 16 fields in the path." - // +kubebuilder:validation:XValidation:rule="self.split('.', 16).all(f, f.matches('^[a-zA-Z][a-zA-Z0-9_]{0,62}$'))",message="path must be dot-separated field names, each starting with a letter and containing only letters, digits, and underscores not exceeding 63 characters. There may be at most 16 fields in the path." - // +required - Path string `json:"path,omitempty"` - - // versions are the API versions the field is excluded from. - // When not specified, the field is excluded from all versions. - // - // Each item must be at most 63 characters in length, and must must - // consist of only lowercase alphanumeric characters and hyphens, and must - // start with an alphabetic character and end with an alphanumeric - // character. - // At most 32 versions may be specified. - // - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - // +listType=set - // +required - Versions []APIVersionString `json:"versions,omitempty"` -} - -// CompatibilitySchema defines the schema used by crdSchemaValidation and objectSchemaValidation. -type CompatibilitySchema struct { - // customResourceDefinition contains the complete definition of the CRD for schema and object validation purposes. - // This field is required. - // +required - CustomResourceDefinition CRDData `json:"customResourceDefinition,omitzero"` - - // requiredVersions specifies a subset of the CRD's API versions which will be asserted for compatibility. - // This field is required. - // +required - RequiredVersions APIVersions `json:"requiredVersions,omitzero"` - - // excludedFields is a set of fields in the schema which will not be validated by - // crdSchemaValidation or objectSchemaValidation. - // The list may contain at most 64 fields. - // Each path in the list must be unique. - // When not specified, all fields in the schema will be validated. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=64 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, y.path == x.path))",message="each path in the list must be unique." - // +listType=atomic - // +optional - ExcludedFields []APIExcludedField `json:"excludedFields,omitempty"` -} - -// CustomResourceDefinitionSchemaValidation ensures that updates to the installed CRD are compatible with this compatibility requirement. -type CustomResourceDefinitionSchemaValidation struct { - // action determines whether violations are rejected (Deny) or admitted with an API warning (Warn). - // Valid options are Deny and Warn. - // When set to Deny, incompatible CRDs will be rejected and not admitted to the cluster. - // When set to Warn, incompatible CRDs will be allowed but a warning will be generated in the API response. - // This field is required. - // +required - Action CRDAdmitAction `json:"action,omitempty"` -} - -// ObjectSchemaValidation ensures that matching objects conform to the compatibilitySchema. -type ObjectSchemaValidation struct { - // action determines whether violations are rejected (Deny) or admitted with an API warning (Warn). - // Valid options are Deny and Warn. - // When set to Deny, incompatible Objects will be rejected and not admitted to the cluster. - // When set to Warn, incompatible Objects will be allowed but a warning will be generated in the API response. - // This field is required. - // +required - Action CRDAdmitAction `json:"action,omitempty"` - - // namespaceSelector defines a label selector for namespaces. If defined, - // only objects in a namespace with matching labels will be subject to - // validation. When not specified, objects for validation will not be - // filtered by namespace. - // +kubebuilder:validation:XValidation:rule="size(self.matchLabels) > 0 || size(self.matchExpressions) > 0",message="must have at least one of matchLabels or matchExpressions when specified" - // +optional - NamespaceSelector metav1.LabelSelector `json:"namespaceSelector,omitempty,omitzero"` - // objectSelector defines a label selector for objects. If defined, only - // objects with matching labels will be subject to validation. When not - // specified, objects for validation will not be filtered by label. - // +kubebuilder:validation:XValidation:rule="size(self.matchLabels) > 0 || size(self.matchExpressions) > 0",message="must have at least one of matchLabels or matchExpressions when specified" - // +optional - ObjectSelector metav1.LabelSelector `json:"objectSelector,omitempty,omitzero"` - - // matchConditions defines the matchConditions field of the resulting ValidatingWebhookConfiguration. - // When present, must contain between 1 and 64 match conditions. - // When not specified, the webhook will match all requests according to its other selectors. - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=64 - // +optional - MatchConditions []admissionregistrationv1.MatchCondition `json:"matchConditions,omitempty"` -} - -// CRDAdmitAction determines the action taken when a CRD is not compatible. -// +kubebuilder:validation:Enum=Deny;Warn -// +enum -type CRDAdmitAction string - -const ( - // CRDAdmitActionDeny means that incompatible CRDs will be rejected. - CRDAdmitActionDeny CRDAdmitAction = "Deny" - - // CRDAdmitActionWarn means that incompatible CRDs will be allowed but a warning will be generated. - CRDAdmitActionWarn CRDAdmitAction = "Warn" -) - -// CompatibilityRequirement's Progressing condition and corresponding reasons. -const ( - // CompatibilityRequirementProgressing is false if the spec has been - // completely reconciled against the condition's observed generation. - // True indicates that reconciliation is still in progress and the current status does not represent - // a stable state. Progressing false with an error reason indicates that the object cannot be reconciled. - CompatibilityRequirementProgressing string = "Progressing" - - // CompatibilityRequirementConfigurationErrorReason indicates that - // reconciliation cannot progress due to an invalid spec. The controller - // will not reconcile this object again until the spec is updated. - CompatibilityRequirementConfigurationErrorReason string = "ConfigurationError" - - // CompatibilityRequirementTransientErrorReason indicates that - // reconciliation failed due to an error that can be retried. - CompatibilityRequirementTransientErrorReason string = "TransientError" - - // CompatibilityRequirementUpToDateReason surfaces when reconciliation - // completed successfully for the condition's observed generation. - CompatibilityRequirementUpToDateReason string = "UpToDate" -) - -// CompatibilityRequirement's Admitted condition and corresponding reasons. -const ( - // CompatibilityRequirementAdmitted is true if the requirement has been configured in the validating webhook, - // otherwise false. - CompatibilityRequirementAdmitted string = "Admitted" - - // CompatibilityRequirementAdmittedReason surfaces when the requirement has been configured in the validating webhook. - CompatibilityRequirementAdmittedReason string = "Admitted" - - // CompatibilityRequirementNotAdmittedReason surfaces when the requirement has not been configured in the validating webhook. - CompatibilityRequirementNotAdmittedReason string = "NotAdmitted" -) - -// CompatibilityRequirement's Compatible condition and corresponding reasons. -const ( - // CompatibilityRequirementCompatible is true if the observed CRD is compatible with the requirement, - // otherwise false. Note that Compatible may be false when adding a new requirement which the existing - // CRD does not meet. - CompatibilityRequirementCompatible string = "Compatible" - - // CompatibilityRequirementRequirementsNotMetReason surfaces when a CRD exists, and it is not compatible with this requirement. - CompatibilityRequirementRequirementsNotMetReason string = "RequirementsNotMet" - - // CompatibilityRequirementCRDNotFoundReason surfaces when the referenced CRD does not exist. - CompatibilityRequirementCRDNotFoundReason string = "CRDNotFound" - - // CompatibilityRequirementCompatibleWithWarningsReason surfaces when the CRD exists and is compatible with this requirement, but Message contains one or more warning messages. - CompatibilityRequirementCompatibleWithWarningsReason string = "CompatibleWithWarnings" - - // CompatibilityRequirementCompatibleReason surfaces when the CRD exists and is compatible with this requirement. - CompatibilityRequirementCompatibleReason string = "Compatible" -) - -// CompatibilityRequirementStatus defines the observed status of the Compatibility Requirement. -// +kubebuilder:validation:MinProperties=1 -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.crdName) || has(self.crdName) && oldSelf.crdName == self.crdName",message="crdName cannot be changed once set" -type CompatibilityRequirementStatus struct { - // conditions is a list of conditions and their status. - // Known condition types are Progressing, Admitted, and Compatible. - // - // The Progressing condition indicates if reconciliation of a CompatibilityRequirement is still - // progressing or has finished. - // - // The Admitted condition indicates if the validating webhook has been configured. - // - // The Compatible condition indicates if the observed CRD is compatible with the requirement. - // - // +optional - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // observedCRD documents the uid and generation of the CRD object when the current status was written. - // This field will be omitted if the target CRD does not exist or could not be retrieved. - // +optional - ObservedCRD ObservedCRD `json:"observedCRD,omitzero"` - - // crdName is the name of the target CRD. The target CRD is not required to - // exist, as we may legitimately place requirements on it before it is - // created. The observed CRD is given in status.observedCRD, which will be - // empty if no CRD is observed. - // When present, must be between 1 and 253 characters and conform to RFC 1123 subdomain format: - // lowercase alphanumeric characters, '-' or '.', starting and ending with alphanumeric characters. - // When not specified, the requirement applies to any CRD name discovered from the compatibility schema. - // This field is optional. Once set, the value cannot be changed and must always remain set. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +optional - CRDName string `json:"crdName,omitempty"` -} - -// ObservedCRD contains information about the observed target CRD. -// +kubebuilder:validation:XValidation:rule="oldSelf.uid != self.uid || self.generation >= oldSelf.generation",message="generation may only increase on the same CRD" -type ObservedCRD struct { - // uid is the uid of the observed CRD. - // Must be a valid UUID consisting of lowercase hexadecimal digits in 5 hyphenated blocks (8-4-4-4-12 format). - // Length must be between 1 and 36 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=36 - // +kubebuilder:validation:Format=uuid - // +required - UID string `json:"uid,omitempty"` - - // generation is the observed generation of the CRD. - // Must be a positive integer (minimum value of 1). - // +kubebuilder:validation:Minimum=1 - // +required - Generation int64 `json:"generation,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CompatibilityRequirementList is a collection of CompatibilityRequirements. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type CompatibilityRequirementList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitzero"` - - // items is a list of CompatibilityRequirements. - // +kubebuilder:validation:MaxItems=1000 - // +optional - Items []CompatibilityRequirement `json:"items,omitempty"` -} diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index a9ff411a8..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,254 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *APIExcludedField) DeepCopyInto(out *APIExcludedField) { - *out = *in - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]APIVersionString, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIExcludedField. -func (in *APIExcludedField) DeepCopy() *APIExcludedField { - if in == nil { - return nil - } - out := new(APIExcludedField) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIVersions) DeepCopyInto(out *APIVersions) { - *out = *in - if in.AdditionalVersions != nil { - in, out := &in.AdditionalVersions, &out.AdditionalVersions - *out = make([]APIVersionString, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIVersions. -func (in *APIVersions) DeepCopy() *APIVersions { - if in == nil { - return nil - } - out := new(APIVersions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CRDData) DeepCopyInto(out *CRDData) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRDData. -func (in *CRDData) DeepCopy() *CRDData { - if in == nil { - return nil - } - out := new(CRDData) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CompatibilityRequirement) DeepCopyInto(out *CompatibilityRequirement) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompatibilityRequirement. -func (in *CompatibilityRequirement) DeepCopy() *CompatibilityRequirement { - if in == nil { - return nil - } - out := new(CompatibilityRequirement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CompatibilityRequirement) 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 *CompatibilityRequirementList) DeepCopyInto(out *CompatibilityRequirementList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CompatibilityRequirement, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompatibilityRequirementList. -func (in *CompatibilityRequirementList) DeepCopy() *CompatibilityRequirementList { - if in == nil { - return nil - } - out := new(CompatibilityRequirementList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CompatibilityRequirementList) 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 *CompatibilityRequirementSpec) DeepCopyInto(out *CompatibilityRequirementSpec) { - *out = *in - in.CompatibilitySchema.DeepCopyInto(&out.CompatibilitySchema) - out.CustomResourceDefinitionSchemaValidation = in.CustomResourceDefinitionSchemaValidation - in.ObjectSchemaValidation.DeepCopyInto(&out.ObjectSchemaValidation) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompatibilityRequirementSpec. -func (in *CompatibilityRequirementSpec) DeepCopy() *CompatibilityRequirementSpec { - if in == nil { - return nil - } - out := new(CompatibilityRequirementSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CompatibilityRequirementStatus) DeepCopyInto(out *CompatibilityRequirementStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.ObservedCRD = in.ObservedCRD - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompatibilityRequirementStatus. -func (in *CompatibilityRequirementStatus) DeepCopy() *CompatibilityRequirementStatus { - if in == nil { - return nil - } - out := new(CompatibilityRequirementStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CompatibilitySchema) DeepCopyInto(out *CompatibilitySchema) { - *out = *in - out.CustomResourceDefinition = in.CustomResourceDefinition - in.RequiredVersions.DeepCopyInto(&out.RequiredVersions) - if in.ExcludedFields != nil { - in, out := &in.ExcludedFields, &out.ExcludedFields - *out = make([]APIExcludedField, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CompatibilitySchema. -func (in *CompatibilitySchema) DeepCopy() *CompatibilitySchema { - if in == nil { - return nil - } - out := new(CompatibilitySchema) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionSchemaValidation) DeepCopyInto(out *CustomResourceDefinitionSchemaValidation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSchemaValidation. -func (in *CustomResourceDefinitionSchemaValidation) DeepCopy() *CustomResourceDefinitionSchemaValidation { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionSchemaValidation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectSchemaValidation) DeepCopyInto(out *ObjectSchemaValidation) { - *out = *in - in.NamespaceSelector.DeepCopyInto(&out.NamespaceSelector) - in.ObjectSelector.DeepCopyInto(&out.ObjectSelector) - if in.MatchConditions != nil { - in, out := &in.MatchConditions, &out.MatchConditions - *out = make([]admissionregistrationv1.MatchCondition, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectSchemaValidation. -func (in *ObjectSchemaValidation) DeepCopy() *ObjectSchemaValidation { - if in == nil { - return nil - } - out := new(ObjectSchemaValidation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObservedCRD) DeepCopyInto(out *ObservedCRD) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObservedCRD. -func (in *ObservedCRD) DeepCopy() *ObservedCRD { - if in == nil { - return nil - } - out := new(ObservedCRD) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 433546401..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,24 +0,0 @@ -compatibilityrequirements.apiextensions.openshift.io: - Annotations: - release.openshift.io/feature-gate: CRDCompatibilityRequirementOperator - ApprovedPRNumber: https://github.com/openshift/api/pull/2479 - CRDName: compatibilityrequirements.apiextensions.openshift.io - Capability: "" - Category: "" - FeatureGates: - - CRDCompatibilityRequirementOperator - FilenameOperatorName: crd-compatibility-checker - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_20" - GroupName: apiextensions.openshift.io - HasStatus: true - KindName: CompatibilityRequirement - Labels: {} - PluralName: compatibilityrequirements - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - CRDCompatibilityRequirementOperator - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 1f0482e4f..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIExcludedField) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.APIExcludedField" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIVersions) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.APIVersions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CRDData) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CRDData" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CompatibilityRequirement) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CompatibilityRequirement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CompatibilityRequirementList) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CompatibilityRequirementList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CompatibilityRequirementSpec) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CompatibilityRequirementSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CompatibilityRequirementStatus) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CompatibilityRequirementStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CompatibilitySchema) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CompatibilitySchema" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionSchemaValidation) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.CustomResourceDefinitionSchemaValidation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ObjectSchemaValidation) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.ObjectSchemaValidation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ObservedCRD) OpenAPIModelName() string { - return "com.github.openshift.api.apiextensions.v1alpha1.ObservedCRD" -} diff --git a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index d615ef285..000000000 --- a/vendor/github.com/openshift/api/apiextensions/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,129 +0,0 @@ -package v1alpha1 - -// 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_APIExcludedField = map[string]string{ - "": "APIExcludedField describes a field in the schema which will not be validated by crdSchemaValidation or objectSchemaValidation.", - "path": "path is the path to the field in the schema. Paths are dot-separated field names (e.g., \"fieldA.fieldB.fieldC\") representing nested object fields. If part of the path is a slice (e.g., \"status.conditions\") the remaining path is applied to all items in the slice (e.g., \"status.conditions.lastTransitionTimestamp\"). Each field name must be a valid Kubernetes CRD field name: start with a letter, contain only letters, digits, and underscores, and be between 1 and 63 characters in length. A path may contain at most 16 fields.", - "versions": "versions are the API versions the field is excluded from. When not specified, the field is excluded from all versions.\n\nEach item must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens, and must start with an alphabetic character and end with an alphanumeric character. At most 32 versions may be specified.", -} - -func (APIExcludedField) SwaggerDoc() map[string]string { - return map_APIExcludedField -} - -var map_APIVersions = map[string]string{ - "": "APIVersions specifies a set of API versions of a CRD.", - "defaultSelection": "defaultSelection specifies a method for automatically selecting a set of versions to require.\n\nValid options are StorageOnly and AllServed. When set to StorageOnly, only the storage version is selected for compatibility assessment. When set to AllServed, all served versions are selected for compatibility assessment.\n\nThis field is required.", - "additionalVersions": "additionalVersions specifies a set api versions to require in addition to the default selection. It is explicitly permitted to specify a version in additionalVersions which was also selected by the default selection. The selections will be merged and deduplicated.\n\nEach item must be at most 63 characters in length, and must must consist of only lowercase alphanumeric characters and hyphens, and must start with an alphabetic character and end with an alphanumeric character.// with an alphabetic character and end with an alphanumeric character. At most 32 additional versions may be specified.", -} - -func (APIVersions) SwaggerDoc() map[string]string { - return map_APIVersions -} - -var map_CRDData = map[string]string{ - "": "CRDData contains the complete definition of a CRD.", - "type": "type indicates the type of the CRD data. The only supported type is \"YAML\". This field is required.", - "data": "data contains the complete definition of the CRD. This field must be in the format specified by the type field. It may not be longer than 1572864 characters. This field is required.", -} - -func (CRDData) SwaggerDoc() map[string]string { - return map_CRDData -} - -var map_CompatibilityRequirement = map[string]string{ - "": "CompatibilityRequirement expresses a set of requirements on a target CRD. It is used to ensure compatibility between different actors using the same CRD.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Compatibility Requirement.", - "status": "status is the most recently observed status of the Compatibility Requirement.", -} - -func (CompatibilityRequirement) SwaggerDoc() map[string]string { - return map_CompatibilityRequirement -} - -var map_CompatibilityRequirementList = map[string]string{ - "": "CompatibilityRequirementList is a collection of CompatibilityRequirements.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of CompatibilityRequirements.", -} - -func (CompatibilityRequirementList) SwaggerDoc() map[string]string { - return map_CompatibilityRequirementList -} - -var map_CompatibilityRequirementSpec = map[string]string{ - "": "CompatibilityRequirementSpec is the specification of the desired behavior of the Compatibility Requirement.", - "compatibilitySchema": "compatibilitySchema defines the schema used by customResourceDefinitionSchemaValidation and objectSchemaValidation. This field is required.", - "customResourceDefinitionSchemaValidation": "customResourceDefinitionSchemaValidation ensures that updates to the installed CRD are compatible with this compatibility requirement. If not specified, admission of the target CRD will not be validated. This field is optional.", - "objectSchemaValidation": "objectSchemaValidation ensures that matching resources conform to compatibilitySchema. If not specified, admission of matching resources will not be validated. This field is optional.", -} - -func (CompatibilityRequirementSpec) SwaggerDoc() map[string]string { - return map_CompatibilityRequirementSpec -} - -var map_CompatibilityRequirementStatus = map[string]string{ - "": "CompatibilityRequirementStatus defines the observed status of the Compatibility Requirement.", - "conditions": "conditions is a list of conditions and their status. Known condition types are Progressing, Admitted, and Compatible.\n\nThe Progressing condition indicates if reconciliation of a CompatibilityRequirement is still progressing or has finished.\n\nThe Admitted condition indicates if the validating webhook has been configured.\n\nThe Compatible condition indicates if the observed CRD is compatible with the requirement.", - "observedCRD": "observedCRD documents the uid and generation of the CRD object when the current status was written. This field will be omitted if the target CRD does not exist or could not be retrieved.", - "crdName": "crdName is the name of the target CRD. The target CRD is not required to exist, as we may legitimately place requirements on it before it is created. The observed CRD is given in status.observedCRD, which will be empty if no CRD is observed. When present, must be between 1 and 253 characters and conform to RFC 1123 subdomain format: lowercase alphanumeric characters, '-' or '.', starting and ending with alphanumeric characters. When not specified, the requirement applies to any CRD name discovered from the compatibility schema. This field is optional. Once set, the value cannot be changed and must always remain set.", -} - -func (CompatibilityRequirementStatus) SwaggerDoc() map[string]string { - return map_CompatibilityRequirementStatus -} - -var map_CompatibilitySchema = map[string]string{ - "": "CompatibilitySchema defines the schema used by crdSchemaValidation and objectSchemaValidation.", - "customResourceDefinition": "customResourceDefinition contains the complete definition of the CRD for schema and object validation purposes. This field is required.", - "requiredVersions": "requiredVersions specifies a subset of the CRD's API versions which will be asserted for compatibility. This field is required.", - "excludedFields": "excludedFields is a set of fields in the schema which will not be validated by crdSchemaValidation or objectSchemaValidation. The list may contain at most 64 fields. Each path in the list must be unique. When not specified, all fields in the schema will be validated.", -} - -func (CompatibilitySchema) SwaggerDoc() map[string]string { - return map_CompatibilitySchema -} - -var map_CustomResourceDefinitionSchemaValidation = map[string]string{ - "": "CustomResourceDefinitionSchemaValidation ensures that updates to the installed CRD are compatible with this compatibility requirement.", - "action": "action determines whether violations are rejected (Deny) or admitted with an API warning (Warn). Valid options are Deny and Warn. When set to Deny, incompatible CRDs will be rejected and not admitted to the cluster. When set to Warn, incompatible CRDs will be allowed but a warning will be generated in the API response. This field is required.", -} - -func (CustomResourceDefinitionSchemaValidation) SwaggerDoc() map[string]string { - return map_CustomResourceDefinitionSchemaValidation -} - -var map_ObjectSchemaValidation = map[string]string{ - "": "ObjectSchemaValidation ensures that matching objects conform to the compatibilitySchema.", - "action": "action determines whether violations are rejected (Deny) or admitted with an API warning (Warn). Valid options are Deny and Warn. When set to Deny, incompatible Objects will be rejected and not admitted to the cluster. When set to Warn, incompatible Objects will be allowed but a warning will be generated in the API response. This field is required.", - "namespaceSelector": "namespaceSelector defines a label selector for namespaces. If defined, only objects in a namespace with matching labels will be subject to validation. When not specified, objects for validation will not be filtered by namespace.", - "objectSelector": "objectSelector defines a label selector for objects. If defined, only objects with matching labels will be subject to validation. When not specified, objects for validation will not be filtered by label.", - "matchConditions": "matchConditions defines the matchConditions field of the resulting ValidatingWebhookConfiguration. When present, must contain between 1 and 64 match conditions. When not specified, the webhook will match all requests according to its other selectors.", -} - -func (ObjectSchemaValidation) SwaggerDoc() map[string]string { - return map_ObjectSchemaValidation -} - -var map_ObservedCRD = map[string]string{ - "": "ObservedCRD contains information about the observed target CRD.", - "uid": "uid is the uid of the observed CRD. Must be a valid UUID consisting of lowercase hexadecimal digits in 5 hyphenated blocks (8-4-4-4-12 format). Length must be between 1 and 36 characters.", - "generation": "generation is the observed generation of the CRD. Must be a positive integer (minimum value of 1).", -} - -func (ObservedCRD) SwaggerDoc() map[string]string { - return map_ObservedCRD -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/apiserver/.codegen.yaml b/vendor/github.com/openshift/api/apiserver/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/apiserver/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/apiserver/install.go b/vendor/github.com/openshift/api/apiserver/install.go deleted file mode 100644 index c0cf2ac29..000000000 --- a/vendor/github.com/openshift/api/apiserver/install.go +++ /dev/null @@ -1,22 +0,0 @@ -package apiserver - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - v1 "github.com/openshift/api/apiserver/v1" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(v1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: "apiserver.openshift.io", Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: "apiserver.openshift.io", Kind: kind} -} diff --git a/vendor/github.com/openshift/api/apiserver/v1/Makefile b/vendor/github.com/openshift/api/apiserver/v1/Makefile deleted file mode 100644 index a2d1fa49b..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="apiserver.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/apiserver/v1/doc.go b/vendor/github.com/openshift/api/apiserver/v1/doc.go deleted file mode 100644 index 598fd6e75..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.apiserver.v1 - -// +kubebuilder:validation:Optional -// +groupName=apiserver.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/apiserver/v1/register.go b/vendor/github.com/openshift/api/apiserver/v1/register.go deleted file mode 100644 index 9d6e126e4..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "apiserver.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &APIRequestCount{}, - &APIRequestCountList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/apiserver/v1/types_apirequestcount.go b/vendor/github.com/openshift/api/apiserver/v1/types_apirequestcount.go deleted file mode 100644 index 3771fa21d..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/types_apirequestcount.go +++ /dev/null @@ -1,178 +0,0 @@ -// Package v1 is an api version in the apiserver.openshift.io group -package v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -const ( - // RemovedInReleaseLabel is a label which can be used to select APIRequestCounts based on the release - // in which they are removed. The value is equivalent to .status.removedInRelease. - RemovedInReleaseLabel = "apirequestcounts.apiserver.openshift.io/removedInRelease" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient:nonNamespaced -// +openshift:compatibility-gen:level=1 - -// APIRequestCount tracks requests made to an API. The instance name must -// be of the form `resource.version.group`, matching the resource. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=apirequestcounts,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/897 -// +openshift:file-pattern=operatorName=kube-apiserver -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +kubebuilder:printcolumn:name=RemovedInRelease,JSONPath=.status.removedInRelease,type=string,description=Release in which an API will be removed. -// +kubebuilder:printcolumn:name=RequestsInCurrentHour,JSONPath=.status.currentHour.requestCount,type=integer,description=Number of requests in the current hour. -// +kubebuilder:printcolumn:name=RequestsInLast24h,JSONPath=.status.requestCount,type=integer,description=Number of requests in the last 24h. -type APIRequestCount struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec defines the characteristics of the resource. - // +required - Spec APIRequestCountSpec `json:"spec"` - - // status contains the observed state of the resource. - Status APIRequestCountStatus `json:"status,omitempty"` -} - -type APIRequestCountSpec struct { - - // numberOfUsersToReport is the number of users to include in the report. - // If unspecified or zero, the default is ten. This is default is subject to change. - // +kubebuilder:default:=10 - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=100 - // +optional - NumberOfUsersToReport int64 `json:"numberOfUsersToReport"` -} - -// +k8s:deepcopy-gen=true -type APIRequestCountStatus struct { - - // conditions contains details of the current status of this API Resource. - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions"` - - // removedInRelease is when the API will be removed. - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:Pattern=^[0-9][0-9]*\.[0-9][0-9]*$ - // +kubebuilder:validation:MaxLength=64 - // +optional - RemovedInRelease string `json:"removedInRelease,omitempty"` - - // requestCount is a sum of all requestCounts across all current hours, nodes, and users. - // +kubebuilder:validation:Minimum=0 - // +required - RequestCount int64 `json:"requestCount"` - - // currentHour contains request history for the current hour. This is porcelain to make the API - // easier to read by humans seeing if they addressed a problem. This field is reset on the hour. - // +optional - CurrentHour PerResourceAPIRequestLog `json:"currentHour"` - - // last24h contains request history for the last 24 hours, indexed by the hour, so - // 12:00AM-12:59 is in index 0, 6am-6:59am is index 6, etc. The index of the current hour - // is updated live and then duplicated into the requestsLastHour field. - // +kubebuilder:validation:MaxItems=24 - // +optional - Last24h []PerResourceAPIRequestLog `json:"last24h"` -} - -// PerResourceAPIRequestLog logs request for various nodes. -type PerResourceAPIRequestLog struct { - - // byNode contains logs of requests per node. - // +kubebuilder:validation:MaxItems=512 - // +optional - ByNode []PerNodeAPIRequestLog `json:"byNode"` - - // requestCount is a sum of all requestCounts across nodes. - // +kubebuilder:validation:Minimum=0 - // +required - RequestCount int64 `json:"requestCount"` -} - -// PerNodeAPIRequestLog contains logs of requests to a certain node. -type PerNodeAPIRequestLog struct { - - // nodeName where the request are being handled. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=512 - // +required - NodeName string `json:"nodeName"` - - // requestCount is a sum of all requestCounts across all users, even those outside of the top 10 users. - // +kubebuilder:validation:Minimum=0 - // +required - RequestCount int64 `json:"requestCount"` - - // byUser contains request details by top .spec.numberOfUsersToReport users. - // Note that because in the case of an apiserver, restart the list of top users is determined on a best-effort basis, - // the list might be imprecise. - // In addition, some system users may be explicitly included in the list. - // +kubebuilder:validation:MaxItems=500 - ByUser []PerUserAPIRequestCount `json:"byUser"` -} - -// PerUserAPIRequestCount contains logs of a user's requests. -type PerUserAPIRequestCount struct { - - // username that made the request. - // +kubebuilder:validation:MaxLength=512 - UserName string `json:"username"` - - // userAgent that made the request. - // The same user often has multiple binaries which connect (pods with many containers). The different binaries - // will have different userAgents, but the same user. In addition, we have userAgents with version information - // embedded and the userName isn't likely to change. - // +kubebuilder:validation:MaxLength=1024 - UserAgent string `json:"userAgent"` - - // requestCount of requests by the user across all verbs. - // +kubebuilder:validation:Minimum=0 - // +required - RequestCount int64 `json:"requestCount"` - - // byVerb details by verb. - // +kubebuilder:validation:MaxItems=10 - ByVerb []PerVerbAPIRequestCount `json:"byVerb"` -} - -// PerVerbAPIRequestCount requestCounts requests by API request verb. -type PerVerbAPIRequestCount struct { - - // verb of API request (get, list, create, etc...) - // +kubebuilder:validation:MaxLength=20 - // +required - Verb string `json:"verb"` - - // requestCount of requests for verb. - // +kubebuilder:validation:Minimum=0 - // +required - RequestCount int64 `json:"requestCount"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=1 - -// APIRequestCountList is a list of APIRequestCount resources. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type APIRequestCountList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []APIRequestCount `json:"items"` -} diff --git a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/apiserver/v1/zz_generated.deepcopy.go deleted file mode 100644 index 35c9d2d98..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,202 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *APIRequestCount) DeepCopyInto(out *APIRequestCount) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCount. -func (in *APIRequestCount) DeepCopy() *APIRequestCount { - if in == nil { - return nil - } - out := new(APIRequestCount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIRequestCount) 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 *APIRequestCountList) DeepCopyInto(out *APIRequestCountList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIRequestCount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountList. -func (in *APIRequestCountList) DeepCopy() *APIRequestCountList { - if in == nil { - return nil - } - out := new(APIRequestCountList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIRequestCountList) 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 *APIRequestCountSpec) DeepCopyInto(out *APIRequestCountSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountSpec. -func (in *APIRequestCountSpec) DeepCopy() *APIRequestCountSpec { - if in == nil { - return nil - } - out := new(APIRequestCountSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIRequestCountStatus) DeepCopyInto(out *APIRequestCountStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.CurrentHour.DeepCopyInto(&out.CurrentHour) - if in.Last24h != nil { - in, out := &in.Last24h, &out.Last24h - *out = make([]PerResourceAPIRequestLog, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIRequestCountStatus. -func (in *APIRequestCountStatus) DeepCopy() *APIRequestCountStatus { - if in == nil { - return nil - } - out := new(APIRequestCountStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PerNodeAPIRequestLog) DeepCopyInto(out *PerNodeAPIRequestLog) { - *out = *in - if in.ByUser != nil { - in, out := &in.ByUser, &out.ByUser - *out = make([]PerUserAPIRequestCount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerNodeAPIRequestLog. -func (in *PerNodeAPIRequestLog) DeepCopy() *PerNodeAPIRequestLog { - if in == nil { - return nil - } - out := new(PerNodeAPIRequestLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PerResourceAPIRequestLog) DeepCopyInto(out *PerResourceAPIRequestLog) { - *out = *in - if in.ByNode != nil { - in, out := &in.ByNode, &out.ByNode - *out = make([]PerNodeAPIRequestLog, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerResourceAPIRequestLog. -func (in *PerResourceAPIRequestLog) DeepCopy() *PerResourceAPIRequestLog { - if in == nil { - return nil - } - out := new(PerResourceAPIRequestLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PerUserAPIRequestCount) DeepCopyInto(out *PerUserAPIRequestCount) { - *out = *in - if in.ByVerb != nil { - in, out := &in.ByVerb, &out.ByVerb - *out = make([]PerVerbAPIRequestCount, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerUserAPIRequestCount. -func (in *PerUserAPIRequestCount) DeepCopy() *PerUserAPIRequestCount { - if in == nil { - return nil - } - out := new(PerUserAPIRequestCount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PerVerbAPIRequestCount) DeepCopyInto(out *PerVerbAPIRequestCount) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerVerbAPIRequestCount. -func (in *PerVerbAPIRequestCount) DeepCopy() *PerVerbAPIRequestCount { - if in == nil { - return nil - } - out := new(PerVerbAPIRequestCount) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/apiserver/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index f5ff911a2..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,34 +0,0 @@ -apirequestcounts.apiserver.openshift.io: - Annotations: - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/897 - CRDName: apirequestcounts.apiserver.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: kube-apiserver - FilenameOperatorOrdering: "" - FilenameRunLevel: "" - GroupName: apiserver.openshift.io - HasStatus: true - KindName: APIRequestCount - Labels: {} - PluralName: apirequestcounts - PrinterColumns: - - description: Release in which an API will be removed. - jsonPath: .status.removedInRelease - name: RemovedInRelease - type: string - - description: Number of requests in the current hour. - jsonPath: .status.currentHour.requestCount - name: RequestsInCurrentHour - type: integer - - description: Number of requests in the last 24h. - jsonPath: .status.requestCount - name: RequestsInLast24h - type: integer - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/apiserver/v1/zz_generated.model_name.go deleted file mode 100644 index 69b62d04f..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.model_name.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIRequestCount) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.APIRequestCount" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIRequestCountList) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.APIRequestCountList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIRequestCountSpec) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.APIRequestCountSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIRequestCountStatus) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.APIRequestCountStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerNodeAPIRequestLog) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.PerNodeAPIRequestLog" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerResourceAPIRequestLog) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.PerResourceAPIRequestLog" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerUserAPIRequestCount) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.PerUserAPIRequestCount" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerVerbAPIRequestCount) OpenAPIModelName() string { - return "com.github.openshift.api.apiserver.v1.PerVerbAPIRequestCount" -} diff --git a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/apiserver/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index b3d6b615f..000000000 --- a/vendor/github.com/openshift/api/apiserver/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,97 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_APIRequestCount = map[string]string{ - "": "APIRequestCount tracks requests made to an API. The instance name must be of the form `resource.version.group`, matching the resource.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the characteristics of the resource.", - "status": "status contains the observed state of the resource.", -} - -func (APIRequestCount) SwaggerDoc() map[string]string { - return map_APIRequestCount -} - -var map_APIRequestCountList = map[string]string{ - "": "APIRequestCountList is a list of APIRequestCount resources.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (APIRequestCountList) SwaggerDoc() map[string]string { - return map_APIRequestCountList -} - -var map_APIRequestCountSpec = map[string]string{ - "numberOfUsersToReport": "numberOfUsersToReport is the number of users to include in the report. If unspecified or zero, the default is ten. This is default is subject to change.", -} - -func (APIRequestCountSpec) SwaggerDoc() map[string]string { - return map_APIRequestCountSpec -} - -var map_APIRequestCountStatus = map[string]string{ - "conditions": "conditions contains details of the current status of this API Resource.", - "removedInRelease": "removedInRelease is when the API will be removed.", - "requestCount": "requestCount is a sum of all requestCounts across all current hours, nodes, and users.", - "currentHour": "currentHour contains request history for the current hour. This is porcelain to make the API easier to read by humans seeing if they addressed a problem. This field is reset on the hour.", - "last24h": "last24h contains request history for the last 24 hours, indexed by the hour, so 12:00AM-12:59 is in index 0, 6am-6:59am is index 6, etc. The index of the current hour is updated live and then duplicated into the requestsLastHour field.", -} - -func (APIRequestCountStatus) SwaggerDoc() map[string]string { - return map_APIRequestCountStatus -} - -var map_PerNodeAPIRequestLog = map[string]string{ - "": "PerNodeAPIRequestLog contains logs of requests to a certain node.", - "nodeName": "nodeName where the request are being handled.", - "requestCount": "requestCount is a sum of all requestCounts across all users, even those outside of the top 10 users.", - "byUser": "byUser contains request details by top .spec.numberOfUsersToReport users. Note that because in the case of an apiserver, restart the list of top users is determined on a best-effort basis, the list might be imprecise. In addition, some system users may be explicitly included in the list.", -} - -func (PerNodeAPIRequestLog) SwaggerDoc() map[string]string { - return map_PerNodeAPIRequestLog -} - -var map_PerResourceAPIRequestLog = map[string]string{ - "": "PerResourceAPIRequestLog logs request for various nodes.", - "byNode": "byNode contains logs of requests per node.", - "requestCount": "requestCount is a sum of all requestCounts across nodes.", -} - -func (PerResourceAPIRequestLog) SwaggerDoc() map[string]string { - return map_PerResourceAPIRequestLog -} - -var map_PerUserAPIRequestCount = map[string]string{ - "": "PerUserAPIRequestCount contains logs of a user's requests.", - "username": "username that made the request.", - "userAgent": "userAgent that made the request. The same user often has multiple binaries which connect (pods with many containers). The different binaries will have different userAgents, but the same user. In addition, we have userAgents with version information embedded and the userName isn't likely to change.", - "requestCount": "requestCount of requests by the user across all verbs.", - "byVerb": "byVerb details by verb.", -} - -func (PerUserAPIRequestCount) SwaggerDoc() map[string]string { - return map_PerUserAPIRequestCount -} - -var map_PerVerbAPIRequestCount = map[string]string{ - "": "PerVerbAPIRequestCount requestCounts requests by API request verb.", - "verb": "verb of API request (get, list, create, etc...)", - "requestCount": "requestCount of requests for verb.", -} - -func (PerVerbAPIRequestCount) SwaggerDoc() map[string]string { - return map_PerVerbAPIRequestCount -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/apps/.codegen.yaml b/vendor/github.com/openshift/api/apps/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/apps/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/apps/OWNERS b/vendor/github.com/openshift/api/apps/OWNERS deleted file mode 100644 index d8d669b91..000000000 --- a/vendor/github.com/openshift/api/apps/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -reviewers: - - mfojtik - - soltysh diff --git a/vendor/github.com/openshift/api/apps/install.go b/vendor/github.com/openshift/api/apps/install.go deleted file mode 100644 index 80f7ba2b2..000000000 --- a/vendor/github.com/openshift/api/apps/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package apps - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - appsv1 "github.com/openshift/api/apps/v1" -) - -const ( - GroupName = "apps.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(appsv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/apps/v1/consts.go b/vendor/github.com/openshift/api/apps/v1/consts.go deleted file mode 100644 index 212578bcc..000000000 --- a/vendor/github.com/openshift/api/apps/v1/consts.go +++ /dev/null @@ -1,108 +0,0 @@ -package v1 - -const ( - // DeploymentStatusReasonAnnotation represents the reason for deployment being in a given state - // Used for specifying the reason for cancellation or failure of a deployment - // This is on replication controller set by deployer controller. - DeploymentStatusReasonAnnotation = "openshift.io/deployment.status-reason" - - // DeploymentPodAnnotation is an annotation on a deployment (a ReplicationController). The - // annotation value is the name of the deployer Pod which will act upon the ReplicationController - // to implement the deployment behavior. - // This is set on replication controller by deployer controller. - DeploymentPodAnnotation = "openshift.io/deployer-pod.name" - - // DeploymentConfigAnnotation is an annotation name used to correlate a deployment with the - // DeploymentConfig on which the deployment is based. - // This is set on replication controller pod template by deployer controller. - DeploymentConfigAnnotation = "openshift.io/deployment-config.name" - - // DeploymentCancelledAnnotation indicates that the deployment has been cancelled - // The annotation value does not matter and its mere presence indicates cancellation. - // This is set on replication controller by deployment config controller or oc rollout cancel command. - DeploymentCancelledAnnotation = "openshift.io/deployment.cancelled" - - // DeploymentEncodedConfigAnnotation is an annotation name used to retrieve specific encoded - // DeploymentConfig on which a given deployment is based. - // This is set on replication controller by deployer controller. - DeploymentEncodedConfigAnnotation = "openshift.io/encoded-deployment-config" - - // DeploymentVersionAnnotation is an annotation on a deployment (a ReplicationController). The - // annotation value is the LatestVersion value of the DeploymentConfig which was the basis for - // the deployment. - // This is set on replication controller pod template by deployment config controller. - DeploymentVersionAnnotation = "openshift.io/deployment-config.latest-version" - - // DeployerPodForDeploymentLabel is a label which groups pods related to a - // deployment. The value is a deployment name. The deployer pod and hook pods - // created by the internal strategies will have this label. Custom - // strategies can apply this label to any pods they create, enabling - // platform-provided cancellation and garbage collection support. - // This is set on deployer pod by deployer controller. - DeployerPodForDeploymentLabel = "openshift.io/deployer-pod-for.name" - - // DeploymentStatusAnnotation is an annotation name used to retrieve the DeploymentPhase of - // a deployment. - // This is set on replication controller by deployer controller. - DeploymentStatusAnnotation = "openshift.io/deployment.phase" -) - -type DeploymentConditionReason string - -var ( - // ReplicationControllerUpdatedReason is added in a deployment config when one of its replication - // controllers is updated as part of the rollout process. - ReplicationControllerUpdatedReason DeploymentConditionReason = "ReplicationControllerUpdated" - - // ReplicationControllerCreateError is added in a deployment config when it cannot create a new replication - // controller. - ReplicationControllerCreateErrorReason DeploymentConditionReason = "ReplicationControllerCreateError" - - // ReplicationControllerCreatedReason is added in a deployment config when it creates a new replication - // controller. - NewReplicationControllerCreatedReason DeploymentConditionReason = "NewReplicationControllerCreated" - - // NewReplicationControllerAvailableReason is added in a deployment config when its newest replication controller is made - // available ie. the number of new pods that have passed readiness checks and run for at least - // minReadySeconds is at least the minimum available pods that need to run for the deployment config. - NewReplicationControllerAvailableReason DeploymentConditionReason = "NewReplicationControllerAvailable" - - // ProgressDeadlineExceededReason is added in a deployment config when its newest replication controller fails to show - // any progress within the given deadline (progressDeadlineSeconds). - ProgressDeadlineExceededReason DeploymentConditionReason = "ProgressDeadlineExceeded" - - // DeploymentConfigPausedReason is added in a deployment config when it is paused. Lack of progress shouldn't be - // estimated once a deployment config is paused. - DeploymentConfigPausedReason DeploymentConditionReason = "DeploymentConfigPaused" - - // DeploymentConfigResumedReason is added in a deployment config when it is resumed. Useful for not failing accidentally - // deployment configs that paused amidst a rollout. - DeploymentConfigResumedReason DeploymentConditionReason = "DeploymentConfigResumed" - - // RolloutCancelledReason is added in a deployment config when its newest rollout was - // interrupted by cancellation. - RolloutCancelledReason DeploymentConditionReason = "RolloutCancelled" -) - -// DeploymentStatus describes the possible states a deployment can be in. -type DeploymentStatus string - -var ( - - // DeploymentStatusNew means the deployment has been accepted but not yet acted upon. - DeploymentStatusNew DeploymentStatus = "New" - - // DeploymentStatusPending means the deployment been handed over to a deployment strategy, - // but the strategy has not yet declared the deployment to be running. - DeploymentStatusPending DeploymentStatus = "Pending" - - // DeploymentStatusRunning means the deployment strategy has reported the deployment as - // being in-progress. - DeploymentStatusRunning DeploymentStatus = "Running" - - // DeploymentStatusComplete means the deployment finished without an error. - DeploymentStatusComplete DeploymentStatus = "Complete" - - // DeploymentStatusFailed means the deployment finished with an error. - DeploymentStatusFailed DeploymentStatus = "Failed" -) diff --git a/vendor/github.com/openshift/api/apps/v1/deprecated_consts.go b/vendor/github.com/openshift/api/apps/v1/deprecated_consts.go deleted file mode 100644 index 31969786c..000000000 --- a/vendor/github.com/openshift/api/apps/v1/deprecated_consts.go +++ /dev/null @@ -1,38 +0,0 @@ -package v1 - -// This file contains consts that are not shared between components and set just internally. -// They will likely be removed in (near) future. - -const ( - // DeployerPodCreatedAtAnnotation is an annotation on a deployment that - // records the time in RFC3339 format of when the deployer pod for this particular - // deployment was created. - // This is set by deployer controller, but not consumed by any command or internally. - // DEPRECATED: will be removed soon - DeployerPodCreatedAtAnnotation = "openshift.io/deployer-pod.created-at" - - // DeployerPodStartedAtAnnotation is an annotation on a deployment that - // records the time in RFC3339 format of when the deployer pod for this particular - // deployment was started. - // This is set by deployer controller, but not consumed by any command or internally. - // DEPRECATED: will be removed soon - DeployerPodStartedAtAnnotation = "openshift.io/deployer-pod.started-at" - - // DeployerPodCompletedAtAnnotation is an annotation on deployment that records - // the time in RFC3339 format of when the deployer pod finished. - // This is set by deployer controller, but not consumed by any command or internally. - // DEPRECATED: will be removed soon - DeployerPodCompletedAtAnnotation = "openshift.io/deployer-pod.completed-at" - - // DesiredReplicasAnnotation represents the desired number of replicas for a - // new deployment. - // This is set by deployer controller, but not consumed by any command or internally. - // DEPRECATED: will be removed soon - DesiredReplicasAnnotation = "kubectl.kubernetes.io/desired-replicas" - - // DeploymentAnnotation is an annotation on a deployer Pod. The annotation value is the name - // of the deployment (a ReplicationController) on which the deployer Pod acts. - // This is set by deployer controller and consumed internally and in oc adm top command. - // DEPRECATED: will be removed soon - DeploymentAnnotation = "openshift.io/deployment.name" -) diff --git a/vendor/github.com/openshift/api/apps/v1/doc.go b/vendor/github.com/openshift/api/apps/v1/doc.go deleted file mode 100644 index 9ba23002d..000000000 --- a/vendor/github.com/openshift/api/apps/v1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/apps/apis/apps -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.apps.v1 -// +k8s:prerelease-lifecycle-gen=true - -// +groupName=apps.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/apps/v1/generated.pb.go b/vendor/github.com/openshift/api/apps/v1/generated.pb.go deleted file mode 100644 index af0823259..000000000 --- a/vendor/github.com/openshift/api/apps/v1/generated.pb.go +++ /dev/null @@ -1,6654 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/apps/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v1 "k8s.io/api/core/v1" - v11 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" - - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - -func (m *CustomDeploymentStrategyParams) Reset() { *m = CustomDeploymentStrategyParams{} } - -func (m *DeploymentCause) Reset() { *m = DeploymentCause{} } - -func (m *DeploymentCauseImageTrigger) Reset() { *m = DeploymentCauseImageTrigger{} } - -func (m *DeploymentCondition) Reset() { *m = DeploymentCondition{} } - -func (m *DeploymentConfig) Reset() { *m = DeploymentConfig{} } - -func (m *DeploymentConfigList) Reset() { *m = DeploymentConfigList{} } - -func (m *DeploymentConfigRollback) Reset() { *m = DeploymentConfigRollback{} } - -func (m *DeploymentConfigRollbackSpec) Reset() { *m = DeploymentConfigRollbackSpec{} } - -func (m *DeploymentConfigSpec) Reset() { *m = DeploymentConfigSpec{} } - -func (m *DeploymentConfigStatus) Reset() { *m = DeploymentConfigStatus{} } - -func (m *DeploymentDetails) Reset() { *m = DeploymentDetails{} } - -func (m *DeploymentLog) Reset() { *m = DeploymentLog{} } - -func (m *DeploymentLogOptions) Reset() { *m = DeploymentLogOptions{} } - -func (m *DeploymentRequest) Reset() { *m = DeploymentRequest{} } - -func (m *DeploymentStrategy) Reset() { *m = DeploymentStrategy{} } - -func (m *DeploymentTriggerImageChangeParams) Reset() { *m = DeploymentTriggerImageChangeParams{} } - -func (m *DeploymentTriggerPolicies) Reset() { *m = DeploymentTriggerPolicies{} } - -func (m *DeploymentTriggerPolicy) Reset() { *m = DeploymentTriggerPolicy{} } - -func (m *ExecNewPodHook) Reset() { *m = ExecNewPodHook{} } - -func (m *LifecycleHook) Reset() { *m = LifecycleHook{} } - -func (m *RecreateDeploymentStrategyParams) Reset() { *m = RecreateDeploymentStrategyParams{} } - -func (m *RollingDeploymentStrategyParams) Reset() { *m = RollingDeploymentStrategyParams{} } - -func (m *TagImageHook) Reset() { *m = TagImageHook{} } - -func (m *CustomDeploymentStrategyParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomDeploymentStrategyParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomDeploymentStrategyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Command) > 0 { - for iNdEx := len(m.Command) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Command[iNdEx]) - copy(dAtA[i:], m.Command[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Command[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Environment) > 0 { - for iNdEx := len(m.Environment) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Environment[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Image) - copy(dAtA[i:], m.Image) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ImageTrigger != nil { - { - size, err := m.ImageTrigger.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentCauseImageTrigger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentCauseImageTrigger) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentCauseImageTrigger) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfigList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfigList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfigList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfigRollback) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfigRollback) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfigRollback) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.UpdatedAnnotations) > 0 { - keysForUpdatedAnnotations := make([]string, 0, len(m.UpdatedAnnotations)) - for k := range m.UpdatedAnnotations { - keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, string(k)) - } - sort.Strings(keysForUpdatedAnnotations) - for iNdEx := len(keysForUpdatedAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.UpdatedAnnotations[string(keysForUpdatedAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForUpdatedAnnotations[iNdEx]) - copy(dAtA[i:], keysForUpdatedAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForUpdatedAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfigRollbackSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfigRollbackSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfigRollbackSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.IncludeStrategy { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - i-- - if m.IncludeReplicationMeta { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - i-- - if m.IncludeTemplate { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - i-- - if m.IncludeTriggers { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i = encodeVarintGenerated(dAtA, i, uint64(m.Revision)) - i-- - dAtA[i] = 0x10 - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfigSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfigSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.MinReadySeconds)) - i-- - dAtA[i] = 0x48 - if m.Template != nil { - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if len(m.Selector) > 0 { - keysForSelector := make([]string, 0, len(m.Selector)) - for k := range m.Selector { - keysForSelector = append(keysForSelector, string(k)) - } - sort.Strings(keysForSelector) - for iNdEx := len(keysForSelector) - 1; iNdEx >= 0; iNdEx-- { - v := m.Selector[string(keysForSelector[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForSelector[iNdEx]) - copy(dAtA[i:], keysForSelector[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForSelector[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - i-- - if m.Paused { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - i-- - if m.Test { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - if m.RevisionHistoryLimit != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.RevisionHistoryLimit)) - i-- - dAtA[i] = 0x20 - } - i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas)) - i-- - dAtA[i] = 0x18 - if m.Triggers != nil { - { - size, err := m.Triggers.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Strategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentConfigStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentConfigStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentConfigStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ReadyReplicas)) - i-- - dAtA[i] = 0x48 - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if m.Details != nil { - { - size, err := m.Details.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - i = encodeVarintGenerated(dAtA, i, uint64(m.UnavailableReplicas)) - i-- - dAtA[i] = 0x30 - i = encodeVarintGenerated(dAtA, i, uint64(m.AvailableReplicas)) - i-- - dAtA[i] = 0x28 - i = encodeVarintGenerated(dAtA, i, uint64(m.UpdatedReplicas)) - i-- - dAtA[i] = 0x20 - i = encodeVarintGenerated(dAtA, i, uint64(m.Replicas)) - i-- - dAtA[i] = 0x18 - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x10 - i = encodeVarintGenerated(dAtA, i, uint64(m.LatestVersion)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *DeploymentDetails) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentDetails) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentDetails) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Causes) > 0 { - for iNdEx := len(m.Causes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Causes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentLog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentLog) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *DeploymentLogOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentLogOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentLogOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Version != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Version)) - i-- - dAtA[i] = 0x50 - } - i-- - if m.NoWait { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - if m.LimitBytes != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.LimitBytes)) - i-- - dAtA[i] = 0x40 - } - if m.TailLines != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TailLines)) - i-- - dAtA[i] = 0x38 - } - i-- - if m.Timestamps { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - if m.SinceTime != nil { - { - size, err := m.SinceTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.SinceSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.SinceSeconds)) - i-- - dAtA[i] = 0x20 - } - i-- - if m.Previous { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i-- - if m.Follow { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Container) - copy(dAtA[i:], m.Container) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ExcludeTriggers) > 0 { - for iNdEx := len(m.ExcludeTriggers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExcludeTriggers[iNdEx]) - copy(dAtA[i:], m.ExcludeTriggers[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExcludeTriggers[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i-- - if m.Force { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i-- - if m.Latest { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ActiveDeadlineSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.ActiveDeadlineSeconds)) - i-- - dAtA[i] = 0x40 - } - if len(m.Annotations) > 0 { - keysForAnnotations := make([]string, 0, len(m.Annotations)) - for k := range m.Annotations { - keysForAnnotations = append(keysForAnnotations, string(k)) - } - sort.Strings(keysForAnnotations) - for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.Annotations[string(keysForAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAnnotations[iNdEx]) - copy(dAtA[i:], keysForAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x3a - } - } - if len(m.Labels) > 0 { - keysForLabels := make([]string, 0, len(m.Labels)) - for k := range m.Labels { - keysForLabels = append(keysForLabels, string(k)) - } - sort.Strings(keysForLabels) - for iNdEx := len(keysForLabels) - 1; iNdEx >= 0; iNdEx-- { - v := m.Labels[string(keysForLabels[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForLabels[iNdEx]) - copy(dAtA[i:], keysForLabels[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForLabels[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - { - size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.RollingParams != nil { - { - size, err := m.RollingParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.RecreateParams != nil { - { - size, err := m.RecreateParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.CustomParams != nil { - { - size, err := m.CustomParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DeploymentTriggerImageChangeParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentTriggerImageChangeParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentTriggerImageChangeParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.LastTriggeredImage) - copy(dAtA[i:], m.LastTriggeredImage) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LastTriggeredImage))) - i-- - dAtA[i] = 0x22 - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ContainerNames) > 0 { - for iNdEx := len(m.ContainerNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ContainerNames[iNdEx]) - copy(dAtA[i:], m.ContainerNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerNames[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i-- - if m.Automatic { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m DeploymentTriggerPolicies) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m DeploymentTriggerPolicies) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m DeploymentTriggerPolicies) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *DeploymentTriggerPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DeploymentTriggerPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DeploymentTriggerPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ImageChangeParams != nil { - { - size, err := m.ImageChangeParams.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ExecNewPodHook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExecNewPodHook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExecNewPodHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Volumes) > 0 { - for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Volumes[iNdEx]) - copy(dAtA[i:], m.Volumes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Volumes[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerName))) - i-- - dAtA[i] = 0x1a - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Command) > 0 { - for iNdEx := len(m.Command) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Command[iNdEx]) - copy(dAtA[i:], m.Command[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Command[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *LifecycleHook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LifecycleHook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LifecycleHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TagImages) > 0 { - for iNdEx := len(m.TagImages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TagImages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ExecNewPod != nil { - { - size, err := m.ExecNewPod.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.FailurePolicy) - copy(dAtA[i:], m.FailurePolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FailurePolicy))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RecreateDeploymentStrategyParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RecreateDeploymentStrategyParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RecreateDeploymentStrategyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Post != nil { - { - size, err := m.Post.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Mid != nil { - { - size, err := m.Mid.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Pre != nil { - { - size, err := m.Pre.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.TimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RollingDeploymentStrategyParams) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RollingDeploymentStrategyParams) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RollingDeploymentStrategyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Post != nil { - { - size, err := m.Post.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Pre != nil { - { - size, err := m.Pre.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if m.MaxSurge != nil { - { - size, err := m.MaxSurge.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.MaxUnavailable != nil { - { - size, err := m.MaxUnavailable.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TimeoutSeconds)) - i-- - dAtA[i] = 0x18 - } - if m.IntervalSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.IntervalSeconds)) - i-- - dAtA[i] = 0x10 - } - if m.UpdatePeriodSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.UpdatePeriodSeconds)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *TagImageHook) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagImageHook) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagImageHook) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.ContainerName) - copy(dAtA[i:], m.ContainerName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContainerName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *CustomDeploymentStrategyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Image) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Environment) > 0 { - for _, e := range m.Environment { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Command) > 0 { - for _, s := range m.Command { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeploymentCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.ImageTrigger != nil { - l = m.ImageTrigger.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *DeploymentCauseImageTrigger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeploymentCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastUpdateTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeploymentConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeploymentConfigList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeploymentConfigRollback) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UpdatedAnnotations) > 0 { - for k, v := range m.UpdatedAnnotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DeploymentConfigRollbackSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Revision)) - n += 2 - n += 2 - n += 2 - n += 2 - return n -} - -func (m *DeploymentConfigSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Strategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Triggers != nil { - l = m.Triggers.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Replicas)) - if m.RevisionHistoryLimit != nil { - n += 1 + sovGenerated(uint64(*m.RevisionHistoryLimit)) - } - n += 2 - n += 2 - if len(m.Selector) > 0 { - for k, v := range m.Selector { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.Template != nil { - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.MinReadySeconds)) - return n -} - -func (m *DeploymentConfigStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovGenerated(uint64(m.LatestVersion)) - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - n += 1 + sovGenerated(uint64(m.Replicas)) - n += 1 + sovGenerated(uint64(m.UpdatedReplicas)) - n += 1 + sovGenerated(uint64(m.AvailableReplicas)) - n += 1 + sovGenerated(uint64(m.UnavailableReplicas)) - if m.Details != nil { - l = m.Details.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 1 + sovGenerated(uint64(m.ReadyReplicas)) - return n -} - -func (m *DeploymentDetails) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Causes) > 0 { - for _, e := range m.Causes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeploymentLog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *DeploymentLogOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Container) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - if m.SinceSeconds != nil { - n += 1 + sovGenerated(uint64(*m.SinceSeconds)) - } - if m.SinceTime != nil { - l = m.SinceTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if m.TailLines != nil { - n += 1 + sovGenerated(uint64(*m.TailLines)) - } - if m.LimitBytes != nil { - n += 1 + sovGenerated(uint64(*m.LimitBytes)) - } - n += 2 - if m.Version != nil { - n += 1 + sovGenerated(uint64(*m.Version)) - } - return n -} - -func (m *DeploymentRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - if len(m.ExcludeTriggers) > 0 { - for _, s := range m.ExcludeTriggers { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeploymentStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.CustomParams != nil { - l = m.CustomParams.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.RecreateParams != nil { - l = m.RecreateParams.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.RollingParams != nil { - l = m.RollingParams.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Resources.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Labels) > 0 { - for k, v := range m.Labels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.ActiveDeadlineSeconds != nil { - n += 1 + sovGenerated(uint64(*m.ActiveDeadlineSeconds)) - } - return n -} - -func (m *DeploymentTriggerImageChangeParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - if len(m.ContainerNames) > 0 { - for _, s := range m.ContainerNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.LastTriggeredImage) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m DeploymentTriggerPolicies) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for _, e := range m { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DeploymentTriggerPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.ImageChangeParams != nil { - l = m.ImageChangeParams.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ExecNewPodHook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Command) > 0 { - for _, s := range m.Command { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ContainerName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Volumes) > 0 { - for _, s := range m.Volumes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *LifecycleHook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.FailurePolicy) - n += 1 + l + sovGenerated(uint64(l)) - if m.ExecNewPod != nil { - l = m.ExecNewPod.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.TagImages) > 0 { - for _, e := range m.TagImages { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RecreateDeploymentStrategyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) - } - if m.Pre != nil { - l = m.Pre.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Mid != nil { - l = m.Mid.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Post != nil { - l = m.Post.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RollingDeploymentStrategyParams) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UpdatePeriodSeconds != nil { - n += 1 + sovGenerated(uint64(*m.UpdatePeriodSeconds)) - } - if m.IntervalSeconds != nil { - n += 1 + sovGenerated(uint64(*m.IntervalSeconds)) - } - if m.TimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.TimeoutSeconds)) - } - if m.MaxUnavailable != nil { - l = m.MaxUnavailable.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.MaxSurge != nil { - l = m.MaxSurge.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Pre != nil { - l = m.Pre.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Post != nil { - l = m.Post.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TagImageHook) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ContainerName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *CustomDeploymentStrategyParams) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnvironment := "[]EnvVar{" - for _, f := range this.Environment { - repeatedStringForEnvironment += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnvironment += "}" - s := strings.Join([]string{`&CustomDeploymentStrategyParams{`, - `Image:` + fmt.Sprintf("%v", this.Image) + `,`, - `Environment:` + repeatedStringForEnvironment + `,`, - `Command:` + fmt.Sprintf("%v", this.Command) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentCause{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `ImageTrigger:` + strings.Replace(this.ImageTrigger.String(), "DeploymentCauseImageTrigger", "DeploymentCauseImageTrigger", 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentCauseImageTrigger) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentCauseImageTrigger{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v1.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v11.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v11.Time", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentConfig{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v11.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentConfigSpec", "DeploymentConfigSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "DeploymentConfigStatus", "DeploymentConfigStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfigList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]DeploymentConfig{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "DeploymentConfig", "DeploymentConfig", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&DeploymentConfigList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v11.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfigRollback) String() string { - if this == nil { - return "nil" - } - keysForUpdatedAnnotations := make([]string, 0, len(this.UpdatedAnnotations)) - for k := range this.UpdatedAnnotations { - keysForUpdatedAnnotations = append(keysForUpdatedAnnotations, k) - } - sort.Strings(keysForUpdatedAnnotations) - mapStringForUpdatedAnnotations := "map[string]string{" - for _, k := range keysForUpdatedAnnotations { - mapStringForUpdatedAnnotations += fmt.Sprintf("%v: %v,", k, this.UpdatedAnnotations[k]) - } - mapStringForUpdatedAnnotations += "}" - s := strings.Join([]string{`&DeploymentConfigRollback{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `UpdatedAnnotations:` + mapStringForUpdatedAnnotations + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "DeploymentConfigRollbackSpec", "DeploymentConfigRollbackSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfigRollbackSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentConfigRollbackSpec{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v1.ObjectReference", 1), `&`, ``, 1) + `,`, - `Revision:` + fmt.Sprintf("%v", this.Revision) + `,`, - `IncludeTriggers:` + fmt.Sprintf("%v", this.IncludeTriggers) + `,`, - `IncludeTemplate:` + fmt.Sprintf("%v", this.IncludeTemplate) + `,`, - `IncludeReplicationMeta:` + fmt.Sprintf("%v", this.IncludeReplicationMeta) + `,`, - `IncludeStrategy:` + fmt.Sprintf("%v", this.IncludeStrategy) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfigSpec) String() string { - if this == nil { - return "nil" - } - keysForSelector := make([]string, 0, len(this.Selector)) - for k := range this.Selector { - keysForSelector = append(keysForSelector, k) - } - sort.Strings(keysForSelector) - mapStringForSelector := "map[string]string{" - for _, k := range keysForSelector { - mapStringForSelector += fmt.Sprintf("%v: %v,", k, this.Selector[k]) - } - mapStringForSelector += "}" - s := strings.Join([]string{`&DeploymentConfigSpec{`, - `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "DeploymentStrategy", "DeploymentStrategy", 1), `&`, ``, 1) + `,`, - `Triggers:` + strings.Replace(fmt.Sprintf("%v", this.Triggers), "DeploymentTriggerPolicies", "DeploymentTriggerPolicies", 1) + `,`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, - `RevisionHistoryLimit:` + valueToStringGenerated(this.RevisionHistoryLimit) + `,`, - `Test:` + fmt.Sprintf("%v", this.Test) + `,`, - `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`, - `Selector:` + mapStringForSelector + `,`, - `Template:` + strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v1.PodTemplateSpec", 1) + `,`, - `MinReadySeconds:` + fmt.Sprintf("%v", this.MinReadySeconds) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentConfigStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]DeploymentCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "DeploymentCondition", "DeploymentCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&DeploymentConfigStatus{`, - `LatestVersion:` + fmt.Sprintf("%v", this.LatestVersion) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `Replicas:` + fmt.Sprintf("%v", this.Replicas) + `,`, - `UpdatedReplicas:` + fmt.Sprintf("%v", this.UpdatedReplicas) + `,`, - `AvailableReplicas:` + fmt.Sprintf("%v", this.AvailableReplicas) + `,`, - `UnavailableReplicas:` + fmt.Sprintf("%v", this.UnavailableReplicas) + `,`, - `Details:` + strings.Replace(this.Details.String(), "DeploymentDetails", "DeploymentDetails", 1) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `ReadyReplicas:` + fmt.Sprintf("%v", this.ReadyReplicas) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentDetails) String() string { - if this == nil { - return "nil" - } - repeatedStringForCauses := "[]DeploymentCause{" - for _, f := range this.Causes { - repeatedStringForCauses += strings.Replace(strings.Replace(f.String(), "DeploymentCause", "DeploymentCause", 1), `&`, ``, 1) + "," - } - repeatedStringForCauses += "}" - s := strings.Join([]string{`&DeploymentDetails{`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Causes:` + repeatedStringForCauses + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentLog) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentLog{`, - `}`, - }, "") - return s -} -func (this *DeploymentLogOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentLogOptions{`, - `Container:` + fmt.Sprintf("%v", this.Container) + `,`, - `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`, - `Previous:` + fmt.Sprintf("%v", this.Previous) + `,`, - `SinceSeconds:` + valueToStringGenerated(this.SinceSeconds) + `,`, - `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "v11.Time", 1) + `,`, - `Timestamps:` + fmt.Sprintf("%v", this.Timestamps) + `,`, - `TailLines:` + valueToStringGenerated(this.TailLines) + `,`, - `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`, - `NoWait:` + fmt.Sprintf("%v", this.NoWait) + `,`, - `Version:` + valueToStringGenerated(this.Version) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentRequest{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Latest:` + fmt.Sprintf("%v", this.Latest) + `,`, - `Force:` + fmt.Sprintf("%v", this.Force) + `,`, - `ExcludeTriggers:` + fmt.Sprintf("%v", this.ExcludeTriggers) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentStrategy) String() string { - if this == nil { - return "nil" - } - keysForLabels := make([]string, 0, len(this.Labels)) - for k := range this.Labels { - keysForLabels = append(keysForLabels, k) - } - sort.Strings(keysForLabels) - mapStringForLabels := "map[string]string{" - for _, k := range keysForLabels { - mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) - } - mapStringForLabels += "}" - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) - } - sort.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) - } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&DeploymentStrategy{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `CustomParams:` + strings.Replace(this.CustomParams.String(), "CustomDeploymentStrategyParams", "CustomDeploymentStrategyParams", 1) + `,`, - `RecreateParams:` + strings.Replace(this.RecreateParams.String(), "RecreateDeploymentStrategyParams", "RecreateDeploymentStrategyParams", 1) + `,`, - `RollingParams:` + strings.Replace(this.RollingParams.String(), "RollingDeploymentStrategyParams", "RollingDeploymentStrategyParams", 1) + `,`, - `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "v1.ResourceRequirements", 1), `&`, ``, 1) + `,`, - `Labels:` + mapStringForLabels + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `ActiveDeadlineSeconds:` + valueToStringGenerated(this.ActiveDeadlineSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentTriggerImageChangeParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentTriggerImageChangeParams{`, - `Automatic:` + fmt.Sprintf("%v", this.Automatic) + `,`, - `ContainerNames:` + fmt.Sprintf("%v", this.ContainerNames) + `,`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v1.ObjectReference", 1), `&`, ``, 1) + `,`, - `LastTriggeredImage:` + fmt.Sprintf("%v", this.LastTriggeredImage) + `,`, - `}`, - }, "") - return s -} -func (this *DeploymentTriggerPolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DeploymentTriggerPolicy{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `ImageChangeParams:` + strings.Replace(this.ImageChangeParams.String(), "DeploymentTriggerImageChangeParams", "DeploymentTriggerImageChangeParams", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ExecNewPodHook) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - s := strings.Join([]string{`&ExecNewPodHook{`, - `Command:` + fmt.Sprintf("%v", this.Command) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`, - `}`, - }, "") - return s -} -func (this *LifecycleHook) String() string { - if this == nil { - return "nil" - } - repeatedStringForTagImages := "[]TagImageHook{" - for _, f := range this.TagImages { - repeatedStringForTagImages += strings.Replace(strings.Replace(f.String(), "TagImageHook", "TagImageHook", 1), `&`, ``, 1) + "," - } - repeatedStringForTagImages += "}" - s := strings.Join([]string{`&LifecycleHook{`, - `FailurePolicy:` + fmt.Sprintf("%v", this.FailurePolicy) + `,`, - `ExecNewPod:` + strings.Replace(this.ExecNewPod.String(), "ExecNewPodHook", "ExecNewPodHook", 1) + `,`, - `TagImages:` + repeatedStringForTagImages + `,`, - `}`, - }, "") - return s -} -func (this *RecreateDeploymentStrategyParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RecreateDeploymentStrategyParams{`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `Pre:` + strings.Replace(this.Pre.String(), "LifecycleHook", "LifecycleHook", 1) + `,`, - `Mid:` + strings.Replace(this.Mid.String(), "LifecycleHook", "LifecycleHook", 1) + `,`, - `Post:` + strings.Replace(this.Post.String(), "LifecycleHook", "LifecycleHook", 1) + `,`, - `}`, - }, "") - return s -} -func (this *RollingDeploymentStrategyParams) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RollingDeploymentStrategyParams{`, - `UpdatePeriodSeconds:` + valueToStringGenerated(this.UpdatePeriodSeconds) + `,`, - `IntervalSeconds:` + valueToStringGenerated(this.IntervalSeconds) + `,`, - `TimeoutSeconds:` + valueToStringGenerated(this.TimeoutSeconds) + `,`, - `MaxUnavailable:` + strings.Replace(fmt.Sprintf("%v", this.MaxUnavailable), "IntOrString", "intstr.IntOrString", 1) + `,`, - `MaxSurge:` + strings.Replace(fmt.Sprintf("%v", this.MaxSurge), "IntOrString", "intstr.IntOrString", 1) + `,`, - `Pre:` + strings.Replace(this.Pre.String(), "LifecycleHook", "LifecycleHook", 1) + `,`, - `Post:` + strings.Replace(this.Post.String(), "LifecycleHook", "LifecycleHook", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TagImageHook) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TagImageHook{`, - `ContainerName:` + fmt.Sprintf("%v", this.ContainerName) + `,`, - `To:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.To), "ObjectReference", "v1.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *CustomDeploymentStrategyParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomDeploymentStrategyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomDeploymentStrategyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Image = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Environment = append(m.Environment, v1.EnvVar{}) - if err := m.Environment[len(m.Environment)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = append(m.Command, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = DeploymentTriggerType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageTrigger", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ImageTrigger == nil { - m.ImageTrigger = &DeploymentCauseImageTrigger{} - } - if err := m.ImageTrigger.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentCauseImageTrigger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentCauseImageTrigger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentCauseImageTrigger: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = DeploymentConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfigList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfigList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfigList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, DeploymentConfig{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfigRollback) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfigRollback: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfigRollback: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedAnnotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UpdatedAnnotations == nil { - m.UpdatedAnnotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.UpdatedAnnotations[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfigRollbackSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfigRollbackSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfigRollbackSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - m.Revision = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Revision |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeTriggers", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeTriggers = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeTemplate", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeTemplate = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeReplicationMeta", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeReplicationMeta = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeStrategy", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeStrategy = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfigSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfigSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Triggers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Triggers == nil { - m.Triggers = DeploymentTriggerPolicies{} - } - if err := m.Triggers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Replicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RevisionHistoryLimit", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RevisionHistoryLimit = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Test", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Test = bool(v != 0) - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Paused = bool(v != 0) - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Selector == nil { - m.Selector = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Selector[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Template == nil { - m.Template = &v1.PodTemplateSpec{} - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinReadySeconds", wireType) - } - m.MinReadySeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.MinReadySeconds |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentConfigStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentConfigStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LatestVersion", wireType) - } - m.LatestVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LatestVersion |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Replicas", wireType) - } - m.Replicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Replicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatedReplicas", wireType) - } - m.UpdatedReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UpdatedReplicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AvailableReplicas", wireType) - } - m.AvailableReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AvailableReplicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UnavailableReplicas", wireType) - } - m.UnavailableReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.UnavailableReplicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Details", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Details == nil { - m.Details = &DeploymentDetails{} - } - if err := m.Details.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, DeploymentCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadyReplicas", wireType) - } - m.ReadyReplicas = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ReadyReplicas |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentDetails) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentDetails: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentDetails: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Causes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Causes = append(m.Causes, DeploymentCause{}) - if err := m.Causes[len(m.Causes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentLog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentLog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentLog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentLogOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentLogOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentLogOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Container = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Follow = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Previous", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Previous = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SinceSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SinceSeconds = &v - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SinceTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SinceTime == nil { - m.SinceTime = &v11.Time{} - } - if err := m.SinceTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Timestamps = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TailLines", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TailLines = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LimitBytes = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoWait", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoWait = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Version = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Latest", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Latest = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Force", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Force = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExcludeTriggers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExcludeTriggers = append(m.ExcludeTriggers, DeploymentTriggerType(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = DeploymentStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CustomParams == nil { - m.CustomParams = &CustomDeploymentStrategyParams{} - } - if err := m.CustomParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RecreateParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RecreateParams == nil { - m.RecreateParams = &RecreateDeploymentStrategyParams{} - } - if err := m.RecreateParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RollingParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RollingParams == nil { - m.RollingParams = &RollingDeploymentStrategyParams{} - } - if err := m.RollingParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Labels == nil { - m.Labels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Labels[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ActiveDeadlineSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ActiveDeadlineSeconds = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentTriggerImageChangeParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentTriggerImageChangeParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentTriggerImageChangeParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Automatic", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Automatic = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerNames = append(m.ContainerNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredImage", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastTriggeredImage = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentTriggerPolicies) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentTriggerPolicies: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentTriggerPolicies: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, DeploymentTriggerPolicy{}) - if err := (*m)[len(*m)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DeploymentTriggerPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DeploymentTriggerPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DeploymentTriggerPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = DeploymentTriggerType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageChangeParams", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ImageChangeParams == nil { - m.ImageChangeParams = &DeploymentTriggerImageChangeParams{} - } - if err := m.ImageChangeParams.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExecNewPodHook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExecNewPodHook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExecNewPodHook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = append(m.Command, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v1.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Volumes = append(m.Volumes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LifecycleHook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LifecycleHook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LifecycleHook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FailurePolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FailurePolicy = LifecycleHookFailurePolicy(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExecNewPod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExecNewPod == nil { - m.ExecNewPod = &ExecNewPodHook{} - } - if err := m.ExecNewPod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TagImages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TagImages = append(m.TagImages, TagImageHook{}) - if err := m.TagImages[len(m.TagImages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RecreateDeploymentStrategyParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RecreateDeploymentStrategyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RecreateDeploymentStrategyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimeoutSeconds = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pre", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pre == nil { - m.Pre = &LifecycleHook{} - } - if err := m.Pre.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mid", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Mid == nil { - m.Mid = &LifecycleHook{} - } - if err := m.Mid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Post", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Post == nil { - m.Post = &LifecycleHook{} - } - if err := m.Post.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RollingDeploymentStrategyParams) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RollingDeploymentStrategyParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RollingDeploymentStrategyParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UpdatePeriodSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UpdatePeriodSeconds = &v - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IntervalSeconds = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TimeoutSeconds = &v - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxUnavailable", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxUnavailable == nil { - m.MaxUnavailable = &intstr.IntOrString{} - } - if err := m.MaxUnavailable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxSurge", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.MaxSurge == nil { - m.MaxSurge = &intstr.IntOrString{} - } - if err := m.MaxSurge.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pre", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pre == nil { - m.Pre = &LifecycleHook{} - } - if err := m.Pre.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Post", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Post == nil { - m.Post = &LifecycleHook{} - } - if err := m.Post.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagImageHook) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagImageHook: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagImageHook: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContainerName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContainerName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/apps/v1/generated.proto b/vendor/github.com/openshift/api/apps/v1/generated.proto deleted file mode 100644 index b0a1a1c08..000000000 --- a/vendor/github.com/openshift/api/apps/v1/generated.proto +++ /dev/null @@ -1,499 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.apps.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/apps/v1"; - -// CustomDeploymentStrategyParams are the input to the Custom deployment strategy. -message CustomDeploymentStrategyParams { - // image specifies a container image which can carry out a deployment. - optional string image = 1; - - // environment holds the environment which will be given to the container for Image. - repeated .k8s.io.api.core.v1.EnvVar environment = 2; - - // command is optional and overrides CMD in the container Image. - repeated string command = 3; -} - -// DeploymentCause captures information about a particular cause of a deployment. -message DeploymentCause { - // type of the trigger that resulted in the creation of a new deployment - optional string type = 1; - - // imageTrigger contains the image trigger details, if this trigger was fired based on an image change - optional DeploymentCauseImageTrigger imageTrigger = 2; -} - -// DeploymentCauseImageTrigger represents details about the cause of a deployment originating -// from an image change trigger -message DeploymentCauseImageTrigger { - // from is a reference to the changed object which triggered a deployment. The field may have - // the kinds DockerImage, ImageStreamTag, or ImageStreamImage. - optional .k8s.io.api.core.v1.ObjectReference from = 1; -} - -// DeploymentCondition describes the state of a deployment config at a certain point. -message DeploymentCondition { - // type of deployment condition. - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // The last time the condition transitioned from one status to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// Deployment Configs define the template for a pod and manages deploying new images or configuration changes. -// A single deployment configuration is usually analogous to a single micro-service. Can support many different -// deployment patterns, including full restart, customizable rolling updates, and fully custom behaviors, as -// well as pre- and post- deployment hooks. Each individual deployment is represented as a replication controller. -// -// A deployment is "triggered" when its configuration is changed or a tag in an Image Stream is changed. -// Triggers can be disabled to allow manual control over a deployment. The "strategy" determines how the deployment -// is carried out and may be changed at any time. The `latestVersion` field is updated when a new deployment -// is triggered by any means. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// Deprecated: Use deployments or other means for declarative updates for pods instead. -// +openshift:compatibility-gen:level=1 -message DeploymentConfig { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec represents a desired deployment state and how to deploy to it. - optional DeploymentConfigSpec spec = 2; - - // status represents the current deployment state. - // +optional - optional DeploymentConfigStatus status = 3; -} - -// DeploymentConfigList is a collection of deployment configs. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message DeploymentConfigList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of deployment configs - repeated DeploymentConfig items = 2; -} - -// DeploymentConfigRollback provides the input to rollback generation. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message DeploymentConfigRollback { - // name of the deployment config that will be rolled back. - optional string name = 1; - - // updatedAnnotations is a set of new annotations that will be added in the deployment config. - map updatedAnnotations = 2; - - // spec defines the options to rollback generation. - optional DeploymentConfigRollbackSpec spec = 3; -} - -// DeploymentConfigRollbackSpec represents the options for rollback generation. -message DeploymentConfigRollbackSpec { - // from points to a ReplicationController which is a deployment. - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // revision to rollback to. If set to 0, rollback to the last revision. - optional int64 revision = 2; - - // includeTriggers specifies whether to include config Triggers. - optional bool includeTriggers = 3; - - // includeTemplate specifies whether to include the PodTemplateSpec. - optional bool includeTemplate = 4; - - // includeReplicationMeta specifies whether to include the replica count and selector. - optional bool includeReplicationMeta = 5; - - // includeStrategy specifies whether to include the deployment Strategy. - optional bool includeStrategy = 6; -} - -// DeploymentConfigSpec represents the desired state of the deployment. -message DeploymentConfigSpec { - // strategy describes how a deployment is executed. - // +optional - optional DeploymentStrategy strategy = 1; - - // minReadySeconds is the minimum number of seconds for which a newly created pod should - // be ready without any of its container crashing, for it to be considered available. - // Defaults to 0 (pod will be considered available as soon as it is ready) - optional int32 minReadySeconds = 9; - - // triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers - // are defined, a new deployment can only occur as a result of an explicit client update to the - // DeploymentConfig with a new LatestVersion. If null, defaults to having a config change trigger. - // +optional - optional DeploymentTriggerPolicies triggers = 2; - - // replicas is the number of desired replicas. - // +optional - optional int32 replicas = 3; - - // revisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks. - // This field is a pointer to allow for differentiation between an explicit zero and not specified. - // Defaults to 10. (This only applies to DeploymentConfigs created via the new group API resource, not the legacy resource.) - optional int32 revisionHistoryLimit = 4; - - // test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the - // deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding - // or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action. - // +optional - optional bool test = 5; - - // paused indicates that the deployment config is paused resulting in no new deployments on template - // changes or changes in the template caused by other triggers. - optional bool paused = 6; - - // selector is a label query over pods that should match the Replicas count. - map selector = 7; - - // template is the object that describes the pod that will be created if - // insufficient replicas are detected. - optional .k8s.io.api.core.v1.PodTemplateSpec template = 8; -} - -// DeploymentConfigStatus represents the current deployment state. -message DeploymentConfigStatus { - // latestVersion is used to determine whether the current deployment associated with a deployment - // config is out of sync. - // +optional - optional int64 latestVersion = 1; - - // observedGeneration is the most recent generation observed by the deployment config controller. - // +optional - optional int64 observedGeneration = 2; - - // replicas is the total number of pods targeted by this deployment config. - // +optional - optional int32 replicas = 3; - - // updatedReplicas is the total number of non-terminated pods targeted by this deployment config - // that have the desired template spec. - // +optional - optional int32 updatedReplicas = 4; - - // availableReplicas is the total number of available pods targeted by this deployment config. - // +optional - optional int32 availableReplicas = 5; - - // unavailableReplicas is the total number of unavailable pods targeted by this deployment config. - // +optional - optional int32 unavailableReplicas = 6; - - // details are the reasons for the update to this deployment config. - // This could be based on a change made by the user or caused by an automatic trigger - // +optional - optional DeploymentDetails details = 7; - - // conditions represents the latest available observations of a deployment config's current state. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated DeploymentCondition conditions = 8; - - // Total number of ready pods targeted by this deployment. - // +optional - optional int32 readyReplicas = 9; -} - -// DeploymentDetails captures information about the causes of a deployment. -message DeploymentDetails { - // message is the user specified change message, if this deployment was triggered manually by the user - optional string message = 1; - - // causes are extended data associated with all the causes for creating a new deployment - repeated DeploymentCause causes = 2; -} - -// DeploymentLog represents the logs for a deployment -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message DeploymentLog { -} - -// DeploymentLogOptions is the REST options for a deployment log -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message DeploymentLogOptions { - // The container for which to stream logs. Defaults to only container if there is one container in the pod. - optional string container = 1; - - // follow if true indicates that the build log should be streamed until - // the build terminates. - optional bool follow = 2; - - // Return previous deployment logs. Defaults to false. - optional bool previous = 3; - - // A relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - optional int64 sinceSeconds = 4; - - // An RFC3339 timestamp from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5; - - // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - optional bool timestamps = 6; - - // If set, the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - optional int64 tailLines = 7; - - // If set, the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - optional int64 limitBytes = 8; - - // nowait if true causes the call to return immediately even if the deployment - // is not available yet. Otherwise the server will wait until the deployment has started. - // TODO: Fix the tag to 'noWait' in v2 - optional bool nowait = 9; - - // version of the deployment for which to view logs. - optional int64 version = 10; -} - -// DeploymentRequest is a request to a deployment config for a new deployment. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message DeploymentRequest { - // name of the deployment config for requesting a new deployment. - optional string name = 1; - - // latest will update the deployment config with the latest state from all triggers. - optional bool latest = 2; - - // force will try to force a new deployment to run. If the deployment config is paused, - // then setting this to true will return an Invalid error. - optional bool force = 3; - - // excludeTriggers instructs the instantiator to avoid processing the specified triggers. - // This field overrides the triggers from latest and allows clients to control specific - // logic. This field is ignored if not specified. - repeated string excludeTriggers = 4; -} - -// DeploymentStrategy describes how to perform a deployment. -message DeploymentStrategy { - // type is the name of a deployment strategy. - // +optional - optional string type = 1; - - // customParams are the input to the Custom deployment strategy, and may also - // be specified for the Recreate and Rolling strategies to customize the execution - // process that runs the deployment. - optional CustomDeploymentStrategyParams customParams = 2; - - // recreateParams are the input to the Recreate deployment strategy. - optional RecreateDeploymentStrategyParams recreateParams = 3; - - // rollingParams are the input to the Rolling deployment strategy. - optional RollingDeploymentStrategyParams rollingParams = 4; - - // resources contains resource requirements to execute the deployment and any hooks. - optional .k8s.io.api.core.v1.ResourceRequirements resources = 5; - - // labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods. - map labels = 6; - - // annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods. - map annotations = 7; - - // activeDeadlineSeconds is the duration in seconds that the deployer pods for this deployment - // config may be active on a node before the system actively tries to terminate them. - optional int64 activeDeadlineSeconds = 8; -} - -// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger. -message DeploymentTriggerImageChangeParams { - // automatic means that the detection of a new tag value should result in an image update - // inside the pod template. - optional bool automatic = 1; - - // containerNames is used to restrict tag updates to the specified set of container names in a pod. - // If multiple triggers point to the same containers, the resulting behavior is undefined. Future - // API versions will make this a validation error. If ContainerNames does not point to a valid container, - // the trigger will be ignored. Future API versions will make this a validation error. - repeated string containerNames = 2; - - // from is a reference to an image stream tag to watch for changes. From.Name is the only - // required subfield - if From.Namespace is blank, the namespace of the current deployment - // trigger will be used. - optional .k8s.io.api.core.v1.ObjectReference from = 3; - - // lastTriggeredImage is the last image to be triggered. - optional string lastTriggeredImage = 4; -} - -// DeploymentTriggerPolicies is a list of policies where nil values and different from empty arrays. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message DeploymentTriggerPolicies { - // items, if empty, will result in an empty slice - - repeated DeploymentTriggerPolicy items = 1; -} - -// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment. -message DeploymentTriggerPolicy { - // type of the trigger - optional string type = 1; - - // imageChangeParams represents the parameters for the ImageChange trigger. - optional DeploymentTriggerImageChangeParams imageChangeParams = 2; -} - -// ExecNewPodHook is a hook implementation which runs a command in a new pod -// based on the specified container which is assumed to be part of the -// deployment template. -message ExecNewPodHook { - // command is the action command and its arguments. - repeated string command = 1; - - // env is a set of environment variables to supply to the hook pod's container. - repeated .k8s.io.api.core.v1.EnvVar env = 2; - - // containerName is the name of a container in the deployment pod template - // whose container image will be used for the hook pod's container. - optional string containerName = 3; - - // volumes is a list of named volumes from the pod template which should be - // copied to the hook pod. Volumes names not found in pod spec are ignored. - // An empty list means no volumes will be copied. - repeated string volumes = 4; -} - -// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time. -message LifecycleHook { - // failurePolicy specifies what action to take if the hook fails. - optional string failurePolicy = 1; - - // execNewPod specifies the options for a lifecycle hook backed by a pod. - optional ExecNewPodHook execNewPod = 2; - - // tagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag. - repeated TagImageHook tagImages = 3; -} - -// RecreateDeploymentStrategyParams are the input to the Recreate deployment -// strategy. -message RecreateDeploymentStrategyParams { - // timeoutSeconds is the time to wait for updates before giving up. If the - // value is nil, a default will be used. - optional int64 timeoutSeconds = 1; - - // pre is a lifecycle hook which is executed before the strategy manipulates - // the deployment. All LifecycleHookFailurePolicy values are supported. - optional LifecycleHook pre = 2; - - // mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new - // pod is created. All LifecycleHookFailurePolicy values are supported. - optional LifecycleHook mid = 3; - - // post is a lifecycle hook which is executed after the strategy has - // finished all deployment logic. All LifecycleHookFailurePolicy values are supported. - optional LifecycleHook post = 4; -} - -// RollingDeploymentStrategyParams are the input to the Rolling deployment -// strategy. -message RollingDeploymentStrategyParams { - // updatePeriodSeconds is the time to wait between individual pod updates. - // If the value is nil, a default will be used. - optional int64 updatePeriodSeconds = 1; - - // intervalSeconds is the time to wait between polling deployment status - // after update. If the value is nil, a default will be used. - optional int64 intervalSeconds = 2; - - // timeoutSeconds is the time to wait for updates before giving up. If the - // value is nil, a default will be used. - optional int64 timeoutSeconds = 3; - - // maxUnavailable is the maximum number of pods that can be unavailable - // during the update. Value can be an absolute number (ex: 5) or a - // percentage of total pods at the start of update (ex: 10%). Absolute - // number is calculated from percentage by rounding down. - // - // This cannot be 0 if MaxSurge is 0. By default, 25% is used. - // - // Example: when this is set to 30%, the old RC can be scaled down by 30% - // immediately when the rolling update starts. Once new pods are ready, old - // RC can be scaled down further, followed by scaling up the new RC, - // ensuring that at least 70% of original number of pods are available at - // all times during the update. - optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString maxUnavailable = 4; - - // maxSurge is the maximum number of pods that can be scheduled above the - // original number of pods. Value can be an absolute number (ex: 5) or a - // percentage of total pods at the start of the update (ex: 10%). Absolute - // number is calculated from percentage by rounding up. - // - // This cannot be 0 if MaxUnavailable is 0. By default, 25% is used. - // - // Example: when this is set to 30%, the new RC can be scaled up by 30% - // immediately when the rolling update starts. Once old pods have been - // killed, new RC can be scaled up further, ensuring that total number of - // pods running at any time during the update is atmost 130% of original - // pods. - optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString maxSurge = 5; - - // pre is a lifecycle hook which is executed before the deployment process - // begins. All LifecycleHookFailurePolicy values are supported. - optional LifecycleHook pre = 7; - - // post is a lifecycle hook which is executed after the strategy has - // finished all deployment logic. All LifecycleHookFailurePolicy values - // are supported. - optional LifecycleHook post = 8; -} - -// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag. -message TagImageHook { - // containerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single - // container this value will be defaulted to the name of that container. - optional string containerName = 1; - - // to is the target ImageStreamTag to set the container's image onto. - optional .k8s.io.api.core.v1.ObjectReference to = 2; -} - diff --git a/vendor/github.com/openshift/api/apps/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/apps/v1/generated.protomessage.pb.go deleted file mode 100644 index 55ce7a3d2..000000000 --- a/vendor/github.com/openshift/api/apps/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,52 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*CustomDeploymentStrategyParams) ProtoMessage() {} - -func (*DeploymentCause) ProtoMessage() {} - -func (*DeploymentCauseImageTrigger) ProtoMessage() {} - -func (*DeploymentCondition) ProtoMessage() {} - -func (*DeploymentConfig) ProtoMessage() {} - -func (*DeploymentConfigList) ProtoMessage() {} - -func (*DeploymentConfigRollback) ProtoMessage() {} - -func (*DeploymentConfigRollbackSpec) ProtoMessage() {} - -func (*DeploymentConfigSpec) ProtoMessage() {} - -func (*DeploymentConfigStatus) ProtoMessage() {} - -func (*DeploymentDetails) ProtoMessage() {} - -func (*DeploymentLog) ProtoMessage() {} - -func (*DeploymentLogOptions) ProtoMessage() {} - -func (*DeploymentRequest) ProtoMessage() {} - -func (*DeploymentStrategy) ProtoMessage() {} - -func (*DeploymentTriggerImageChangeParams) ProtoMessage() {} - -func (*DeploymentTriggerPolicies) ProtoMessage() {} - -func (*DeploymentTriggerPolicy) ProtoMessage() {} - -func (*ExecNewPodHook) ProtoMessage() {} - -func (*LifecycleHook) ProtoMessage() {} - -func (*RecreateDeploymentStrategyParams) ProtoMessage() {} - -func (*RollingDeploymentStrategyParams) ProtoMessage() {} - -func (*TagImageHook) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/apps/v1/legacy.go b/vendor/github.com/openshift/api/apps/v1/legacy.go deleted file mode 100644 index c8fa0ed99..000000000 --- a/vendor/github.com/openshift/api/apps/v1/legacy.go +++ /dev/null @@ -1,28 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme, extensionsv1beta1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &DeploymentConfig{}, - &DeploymentConfigList{}, - &DeploymentConfigRollback{}, - &DeploymentRequest{}, - &DeploymentLog{}, - &DeploymentLogOptions{}, - &extensionsv1beta1.Scale{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/apps/v1/register.go b/vendor/github.com/openshift/api/apps/v1/register.go deleted file mode 100644 index 0c1e47e6d..000000000 --- a/vendor/github.com/openshift/api/apps/v1/register.go +++ /dev/null @@ -1,45 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "apps.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme, extensionsv1beta1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &DeploymentConfig{}, - &DeploymentConfigList{}, - &DeploymentConfigRollback{}, - &DeploymentRequest{}, - &DeploymentLog{}, - &DeploymentLogOptions{}, - &extensionsv1beta1.Scale{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/apps/v1/types.go b/vendor/github.com/openshift/api/apps/v1/types.go deleted file mode 100644 index 883770e76..000000000 --- a/vendor/github.com/openshift/api/apps/v1/types.go +++ /dev/null @@ -1,546 +0,0 @@ -package v1 - -import ( - "fmt" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// +genclient -// +genclient:method=Instantiate,verb=create,subresource=instantiate,input=DeploymentRequest -// +genclient:method=Rollback,verb=create,subresource=rollback,input=DeploymentConfigRollback -// +genclient:method=GetScale,verb=get,subresource=scale,result=k8s.io/api/extensions/v1beta1.Scale -// +genclient:method=UpdateScale,verb=update,subresource=scale,input=k8s.io/api/extensions/v1beta1.Scale,result=k8s.io/api/extensions/v1beta1.Scale -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// Deployment Configs define the template for a pod and manages deploying new images or configuration changes. -// A single deployment configuration is usually analogous to a single micro-service. Can support many different -// deployment patterns, including full restart, customizable rolling updates, and fully custom behaviors, as -// well as pre- and post- deployment hooks. Each individual deployment is represented as a replication controller. -// -// A deployment is "triggered" when its configuration is changed or a tag in an Image Stream is changed. -// Triggers can be disabled to allow manual control over a deployment. The "strategy" determines how the deployment -// is carried out and may be changed at any time. The `latestVersion` field is updated when a new deployment -// is triggered by any means. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// Deprecated: Use deployments or other means for declarative updates for pods instead. -// +openshift:compatibility-gen:level=1 -type DeploymentConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec represents a desired deployment state and how to deploy to it. - Spec DeploymentConfigSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - - // status represents the current deployment state. - // +optional - Status DeploymentConfigStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// DeploymentConfigSpec represents the desired state of the deployment. -type DeploymentConfigSpec struct { - // strategy describes how a deployment is executed. - // +optional - Strategy DeploymentStrategy `json:"strategy" protobuf:"bytes,1,opt,name=strategy"` - - // minReadySeconds is the minimum number of seconds for which a newly created pod should - // be ready without any of its container crashing, for it to be considered available. - // Defaults to 0 (pod will be considered available as soon as it is ready) - MinReadySeconds int32 `json:"minReadySeconds,omitempty" protobuf:"varint,9,opt,name=minReadySeconds"` - - // triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers - // are defined, a new deployment can only occur as a result of an explicit client update to the - // DeploymentConfig with a new LatestVersion. If null, defaults to having a config change trigger. - // +optional - Triggers DeploymentTriggerPolicies `json:"triggers" protobuf:"bytes,2,rep,name=triggers"` - - // replicas is the number of desired replicas. - // +optional - Replicas int32 `json:"replicas" protobuf:"varint,3,opt,name=replicas"` - - // revisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks. - // This field is a pointer to allow for differentiation between an explicit zero and not specified. - // Defaults to 10. (This only applies to DeploymentConfigs created via the new group API resource, not the legacy resource.) - RevisionHistoryLimit *int32 `json:"revisionHistoryLimit,omitempty" protobuf:"varint,4,opt,name=revisionHistoryLimit"` - - // test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the - // deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding - // or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action. - // +optional - Test bool `json:"test" protobuf:"varint,5,opt,name=test"` - - // paused indicates that the deployment config is paused resulting in no new deployments on template - // changes or changes in the template caused by other triggers. - Paused bool `json:"paused,omitempty" protobuf:"varint,6,opt,name=paused"` - - // selector is a label query over pods that should match the Replicas count. - Selector map[string]string `json:"selector,omitempty" protobuf:"bytes,7,rep,name=selector"` - - // template is the object that describes the pod that will be created if - // insufficient replicas are detected. - Template *corev1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,8,opt,name=template"` -} - -// DeploymentStrategy describes how to perform a deployment. -type DeploymentStrategy struct { - // type is the name of a deployment strategy. - // +optional - Type DeploymentStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentStrategyType"` - - // customParams are the input to the Custom deployment strategy, and may also - // be specified for the Recreate and Rolling strategies to customize the execution - // process that runs the deployment. - CustomParams *CustomDeploymentStrategyParams `json:"customParams,omitempty" protobuf:"bytes,2,opt,name=customParams"` - // recreateParams are the input to the Recreate deployment strategy. - RecreateParams *RecreateDeploymentStrategyParams `json:"recreateParams,omitempty" protobuf:"bytes,3,opt,name=recreateParams"` - // rollingParams are the input to the Rolling deployment strategy. - RollingParams *RollingDeploymentStrategyParams `json:"rollingParams,omitempty" protobuf:"bytes,4,opt,name=rollingParams"` - - // resources contains resource requirements to execute the deployment and any hooks. - Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,5,opt,name=resources"` - // labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods. - Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,6,rep,name=labels"` - // annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods. - Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,7,rep,name=annotations"` - - // activeDeadlineSeconds is the duration in seconds that the deployer pods for this deployment - // config may be active on a node before the system actively tries to terminate them. - ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,8,opt,name=activeDeadlineSeconds"` -} - -// DeploymentStrategyType refers to a specific DeploymentStrategy implementation. -type DeploymentStrategyType string - -const ( - // DeploymentStrategyTypeRecreate is a simple strategy suitable as a default. - DeploymentStrategyTypeRecreate DeploymentStrategyType = "Recreate" - // DeploymentStrategyTypeCustom is a user defined strategy. - DeploymentStrategyTypeCustom DeploymentStrategyType = "Custom" - // DeploymentStrategyTypeRolling uses the Kubernetes RollingUpdater. - DeploymentStrategyTypeRolling DeploymentStrategyType = "Rolling" -) - -// CustomDeploymentStrategyParams are the input to the Custom deployment strategy. -type CustomDeploymentStrategyParams struct { - // image specifies a container image which can carry out a deployment. - Image string `json:"image,omitempty" protobuf:"bytes,1,opt,name=image"` - // environment holds the environment which will be given to the container for Image. - Environment []corev1.EnvVar `json:"environment,omitempty" protobuf:"bytes,2,rep,name=environment"` - // command is optional and overrides CMD in the container Image. - Command []string `json:"command,omitempty" protobuf:"bytes,3,rep,name=command"` -} - -// RecreateDeploymentStrategyParams are the input to the Recreate deployment -// strategy. -type RecreateDeploymentStrategyParams struct { - // timeoutSeconds is the time to wait for updates before giving up. If the - // value is nil, a default will be used. - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,1,opt,name=timeoutSeconds"` - // pre is a lifecycle hook which is executed before the strategy manipulates - // the deployment. All LifecycleHookFailurePolicy values are supported. - Pre *LifecycleHook `json:"pre,omitempty" protobuf:"bytes,2,opt,name=pre"` - // mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new - // pod is created. All LifecycleHookFailurePolicy values are supported. - Mid *LifecycleHook `json:"mid,omitempty" protobuf:"bytes,3,opt,name=mid"` - // post is a lifecycle hook which is executed after the strategy has - // finished all deployment logic. All LifecycleHookFailurePolicy values are supported. - Post *LifecycleHook `json:"post,omitempty" protobuf:"bytes,4,opt,name=post"` -} - -// RollingDeploymentStrategyParams are the input to the Rolling deployment -// strategy. -type RollingDeploymentStrategyParams struct { - // updatePeriodSeconds is the time to wait between individual pod updates. - // If the value is nil, a default will be used. - UpdatePeriodSeconds *int64 `json:"updatePeriodSeconds,omitempty" protobuf:"varint,1,opt,name=updatePeriodSeconds"` - // intervalSeconds is the time to wait between polling deployment status - // after update. If the value is nil, a default will be used. - IntervalSeconds *int64 `json:"intervalSeconds,omitempty" protobuf:"varint,2,opt,name=intervalSeconds"` - // timeoutSeconds is the time to wait for updates before giving up. If the - // value is nil, a default will be used. - TimeoutSeconds *int64 `json:"timeoutSeconds,omitempty" protobuf:"varint,3,opt,name=timeoutSeconds"` - // maxUnavailable is the maximum number of pods that can be unavailable - // during the update. Value can be an absolute number (ex: 5) or a - // percentage of total pods at the start of update (ex: 10%). Absolute - // number is calculated from percentage by rounding down. - // - // This cannot be 0 if MaxSurge is 0. By default, 25% is used. - // - // Example: when this is set to 30%, the old RC can be scaled down by 30% - // immediately when the rolling update starts. Once new pods are ready, old - // RC can be scaled down further, followed by scaling up the new RC, - // ensuring that at least 70% of original number of pods are available at - // all times during the update. - MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty" protobuf:"bytes,4,opt,name=maxUnavailable"` - // maxSurge is the maximum number of pods that can be scheduled above the - // original number of pods. Value can be an absolute number (ex: 5) or a - // percentage of total pods at the start of the update (ex: 10%). Absolute - // number is calculated from percentage by rounding up. - // - // This cannot be 0 if MaxUnavailable is 0. By default, 25% is used. - // - // Example: when this is set to 30%, the new RC can be scaled up by 30% - // immediately when the rolling update starts. Once old pods have been - // killed, new RC can be scaled up further, ensuring that total number of - // pods running at any time during the update is atmost 130% of original - // pods. - MaxSurge *intstr.IntOrString `json:"maxSurge,omitempty" protobuf:"bytes,5,opt,name=maxSurge"` - // pre is a lifecycle hook which is executed before the deployment process - // begins. All LifecycleHookFailurePolicy values are supported. - Pre *LifecycleHook `json:"pre,omitempty" protobuf:"bytes,7,opt,name=pre"` - // post is a lifecycle hook which is executed after the strategy has - // finished all deployment logic. All LifecycleHookFailurePolicy values - // are supported. - Post *LifecycleHook `json:"post,omitempty" protobuf:"bytes,8,opt,name=post"` -} - -// LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time. -type LifecycleHook struct { - // failurePolicy specifies what action to take if the hook fails. - FailurePolicy LifecycleHookFailurePolicy `json:"failurePolicy" protobuf:"bytes,1,opt,name=failurePolicy,casttype=LifecycleHookFailurePolicy"` - - // execNewPod specifies the options for a lifecycle hook backed by a pod. - ExecNewPod *ExecNewPodHook `json:"execNewPod,omitempty" protobuf:"bytes,2,opt,name=execNewPod"` - - // tagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag. - TagImages []TagImageHook `json:"tagImages,omitempty" protobuf:"bytes,3,rep,name=tagImages"` -} - -// LifecycleHookFailurePolicy describes possibles actions to take if a hook fails. -type LifecycleHookFailurePolicy string - -const ( - // LifecycleHookFailurePolicyRetry means retry the hook until it succeeds. - LifecycleHookFailurePolicyRetry LifecycleHookFailurePolicy = "Retry" - // LifecycleHookFailurePolicyAbort means abort the deployment. - LifecycleHookFailurePolicyAbort LifecycleHookFailurePolicy = "Abort" - // LifecycleHookFailurePolicyIgnore means ignore failure and continue the deployment. - LifecycleHookFailurePolicyIgnore LifecycleHookFailurePolicy = "Ignore" -) - -// ExecNewPodHook is a hook implementation which runs a command in a new pod -// based on the specified container which is assumed to be part of the -// deployment template. -type ExecNewPodHook struct { - // command is the action command and its arguments. - Command []string `json:"command" protobuf:"bytes,1,rep,name=command"` - // env is a set of environment variables to supply to the hook pod's container. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,2,rep,name=env"` - // containerName is the name of a container in the deployment pod template - // whose container image will be used for the hook pod's container. - ContainerName string `json:"containerName" protobuf:"bytes,3,opt,name=containerName"` - // volumes is a list of named volumes from the pod template which should be - // copied to the hook pod. Volumes names not found in pod spec are ignored. - // An empty list means no volumes will be copied. - Volumes []string `json:"volumes,omitempty" protobuf:"bytes,4,rep,name=volumes"` -} - -// TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag. -type TagImageHook struct { - // containerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single - // container this value will be defaulted to the name of that container. - ContainerName string `json:"containerName" protobuf:"bytes,1,opt,name=containerName"` - // to is the target ImageStreamTag to set the container's image onto. - To corev1.ObjectReference `json:"to" protobuf:"bytes,2,opt,name=to"` -} - -// DeploymentTriggerPolicies is a list of policies where nil values and different from empty arrays. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type DeploymentTriggerPolicies []DeploymentTriggerPolicy - -func (t DeploymentTriggerPolicies) String() string { - return fmt.Sprintf("%v", []DeploymentTriggerPolicy(t)) -} - -// DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment. -type DeploymentTriggerPolicy struct { - // type of the trigger - Type DeploymentTriggerType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=DeploymentTriggerType"` - // imageChangeParams represents the parameters for the ImageChange trigger. - ImageChangeParams *DeploymentTriggerImageChangeParams `json:"imageChangeParams,omitempty" protobuf:"bytes,2,opt,name=imageChangeParams"` -} - -// DeploymentTriggerType refers to a specific DeploymentTriggerPolicy implementation. -type DeploymentTriggerType string - -const ( - // DeploymentTriggerOnImageChange will create new deployments in response to updated tags from - // a container image repository. - DeploymentTriggerOnImageChange DeploymentTriggerType = "ImageChange" - // DeploymentTriggerOnConfigChange will create new deployments in response to changes to - // the ControllerTemplate of a DeploymentConfig. - DeploymentTriggerOnConfigChange DeploymentTriggerType = "ConfigChange" -) - -// DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger. -type DeploymentTriggerImageChangeParams struct { - // automatic means that the detection of a new tag value should result in an image update - // inside the pod template. - Automatic bool `json:"automatic,omitempty" protobuf:"varint,1,opt,name=automatic"` - // containerNames is used to restrict tag updates to the specified set of container names in a pod. - // If multiple triggers point to the same containers, the resulting behavior is undefined. Future - // API versions will make this a validation error. If ContainerNames does not point to a valid container, - // the trigger will be ignored. Future API versions will make this a validation error. - ContainerNames []string `json:"containerNames,omitempty" protobuf:"bytes,2,rep,name=containerNames"` - // from is a reference to an image stream tag to watch for changes. From.Name is the only - // required subfield - if From.Namespace is blank, the namespace of the current deployment - // trigger will be used. - From corev1.ObjectReference `json:"from" protobuf:"bytes,3,opt,name=from"` - // lastTriggeredImage is the last image to be triggered. - LastTriggeredImage string `json:"lastTriggeredImage,omitempty" protobuf:"bytes,4,opt,name=lastTriggeredImage"` -} - -// DeploymentConfigStatus represents the current deployment state. -type DeploymentConfigStatus struct { - // latestVersion is used to determine whether the current deployment associated with a deployment - // config is out of sync. - // +optional - LatestVersion int64 `json:"latestVersion" protobuf:"varint,1,opt,name=latestVersion"` - // observedGeneration is the most recent generation observed by the deployment config controller. - // +optional - ObservedGeneration int64 `json:"observedGeneration" protobuf:"varint,2,opt,name=observedGeneration"` - // replicas is the total number of pods targeted by this deployment config. - // +optional - Replicas int32 `json:"replicas" protobuf:"varint,3,opt,name=replicas"` - // updatedReplicas is the total number of non-terminated pods targeted by this deployment config - // that have the desired template spec. - // +optional - UpdatedReplicas int32 `json:"updatedReplicas" protobuf:"varint,4,opt,name=updatedReplicas"` - // availableReplicas is the total number of available pods targeted by this deployment config. - // +optional - AvailableReplicas int32 `json:"availableReplicas" protobuf:"varint,5,opt,name=availableReplicas"` - // unavailableReplicas is the total number of unavailable pods targeted by this deployment config. - // +optional - UnavailableReplicas int32 `json:"unavailableReplicas" protobuf:"varint,6,opt,name=unavailableReplicas"` - // details are the reasons for the update to this deployment config. - // This could be based on a change made by the user or caused by an automatic trigger - // +optional - Details *DeploymentDetails `json:"details,omitempty" protobuf:"bytes,7,opt,name=details"` - // conditions represents the latest available observations of a deployment config's current state. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []DeploymentCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,8,rep,name=conditions"` - // Total number of ready pods targeted by this deployment. - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty" protobuf:"varint,9,opt,name=readyReplicas"` -} - -// DeploymentDetails captures information about the causes of a deployment. -type DeploymentDetails struct { - // message is the user specified change message, if this deployment was triggered manually by the user - Message string `json:"message,omitempty" protobuf:"bytes,1,opt,name=message"` - // causes are extended data associated with all the causes for creating a new deployment - Causes []DeploymentCause `json:"causes" protobuf:"bytes,2,rep,name=causes"` -} - -// DeploymentCause captures information about a particular cause of a deployment. -type DeploymentCause struct { - // type of the trigger that resulted in the creation of a new deployment - Type DeploymentTriggerType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentTriggerType"` - // imageTrigger contains the image trigger details, if this trigger was fired based on an image change - ImageTrigger *DeploymentCauseImageTrigger `json:"imageTrigger,omitempty" protobuf:"bytes,2,opt,name=imageTrigger"` -} - -// DeploymentCauseImageTrigger represents details about the cause of a deployment originating -// from an image change trigger -type DeploymentCauseImageTrigger struct { - // from is a reference to the changed object which triggered a deployment. The field may have - // the kinds DockerImage, ImageStreamTag, or ImageStreamImage. - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` -} - -type DeploymentConditionType string - -// These are valid conditions of a DeploymentConfig. -const ( - // DeploymentAvailable means the DeploymentConfig is available, ie. at least the minimum available - // replicas required (dc.spec.replicas in case the DeploymentConfig is of Recreate type, - // dc.spec.replicas - dc.spec.strategy.rollingParams.maxUnavailable in case it's Rolling) are up and - // running for at least dc.spec.minReadySeconds. - DeploymentAvailable DeploymentConditionType = "Available" - // DeploymentProgressing is: - // * True: the DeploymentConfig has been successfully deployed or is amidst getting deployed. - // The two different states can be determined by looking at the Reason of the Condition. - // For example, a complete DC will have {Status: True, Reason: NewReplicationControllerAvailable} - // and a DC in the middle of a rollout {Status: True, Reason: ReplicationControllerUpdated}. - // TODO: Represent a successfully deployed DC by using something else for Status like Unknown? - // * False: the DeploymentConfig has failed to deploy its latest version. - // - // This condition is purely informational and depends on the dc.spec.strategy.*params.timeoutSeconds - // field, which is responsible for the time in seconds to wait for a rollout before deciding that - // no progress can be made, thus the rollout is aborted. - // - // Progress for a DeploymentConfig is considered when new pods scale up or old pods scale down. - DeploymentProgressing DeploymentConditionType = "Progressing" - // DeploymentReplicaFailure is added in a deployment config when one of its pods - // fails to be created or deleted. - DeploymentReplicaFailure DeploymentConditionType = "ReplicaFailure" -) - -// DeploymentCondition describes the state of a deployment config at a certain point. -type DeploymentCondition struct { - // type of deployment condition. - Type DeploymentConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=DeploymentConditionType"` - // status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` - // The last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// DeploymentConfigList is a collection of deployment configs. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DeploymentConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of deployment configs - Items []DeploymentConfig `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// DeploymentConfigRollback provides the input to rollback generation. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DeploymentConfigRollback struct { - metav1.TypeMeta `json:",inline"` - // name of the deployment config that will be rolled back. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // updatedAnnotations is a set of new annotations that will be added in the deployment config. - UpdatedAnnotations map[string]string `json:"updatedAnnotations,omitempty" protobuf:"bytes,2,rep,name=updatedAnnotations"` - // spec defines the options to rollback generation. - Spec DeploymentConfigRollbackSpec `json:"spec" protobuf:"bytes,3,opt,name=spec"` -} - -// DeploymentConfigRollbackSpec represents the options for rollback generation. -type DeploymentConfigRollbackSpec struct { - // from points to a ReplicationController which is a deployment. - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - // revision to rollback to. If set to 0, rollback to the last revision. - Revision int64 `json:"revision,omitempty" protobuf:"varint,2,opt,name=revision"` - // includeTriggers specifies whether to include config Triggers. - IncludeTriggers bool `json:"includeTriggers" protobuf:"varint,3,opt,name=includeTriggers"` - // includeTemplate specifies whether to include the PodTemplateSpec. - IncludeTemplate bool `json:"includeTemplate" protobuf:"varint,4,opt,name=includeTemplate"` - // includeReplicationMeta specifies whether to include the replica count and selector. - IncludeReplicationMeta bool `json:"includeReplicationMeta" protobuf:"varint,5,opt,name=includeReplicationMeta"` - // includeStrategy specifies whether to include the deployment Strategy. - IncludeStrategy bool `json:"includeStrategy" protobuf:"varint,6,opt,name=includeStrategy"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// DeploymentRequest is a request to a deployment config for a new deployment. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DeploymentRequest struct { - metav1.TypeMeta `json:",inline"` - // name of the deployment config for requesting a new deployment. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // latest will update the deployment config with the latest state from all triggers. - Latest bool `json:"latest" protobuf:"varint,2,opt,name=latest"` - // force will try to force a new deployment to run. If the deployment config is paused, - // then setting this to true will return an Invalid error. - Force bool `json:"force" protobuf:"varint,3,opt,name=force"` - // excludeTriggers instructs the instantiator to avoid processing the specified triggers. - // This field overrides the triggers from latest and allows clients to control specific - // logic. This field is ignored if not specified. - ExcludeTriggers []DeploymentTriggerType `json:"excludeTriggers,omitempty" protobuf:"bytes,4,rep,name=excludeTriggers,casttype=DeploymentTriggerType"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// DeploymentLog represents the logs for a deployment -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DeploymentLog struct { - metav1.TypeMeta `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=3.0 -// +k8s:prerelease-lifecycle-gen:deprecated=4.14 -// +k8s:prerelease-lifecycle-gen:removed=6.0 - -// DeploymentLogOptions is the REST options for a deployment log -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DeploymentLogOptions struct { - metav1.TypeMeta `json:",inline"` - - // The container for which to stream logs. Defaults to only container if there is one container in the pod. - Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` - // follow if true indicates that the build log should be streamed until - // the build terminates. - Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` - // Return previous deployment logs. Defaults to false. - Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` - // A relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` - // An RFC3339 timestamp from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` - // If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` - // If set, the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` - // If set, the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` - - // nowait if true causes the call to return immediately even if the deployment - // is not available yet. Otherwise the server will wait until the deployment has started. - // TODO: Fix the tag to 'noWait' in v2 - NoWait bool `json:"nowait,omitempty" protobuf:"varint,9,opt,name=nowait"` - - // version of the deployment for which to view logs. - Version *int64 `json:"version,omitempty" protobuf:"varint,10,opt,name=version"` -} diff --git a/vendor/github.com/openshift/api/apps/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/apps/v1/zz_generated.deepcopy.go deleted file mode 100644 index 3fd2e95d4..000000000 --- a/vendor/github.com/openshift/api/apps/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,682 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomDeploymentStrategyParams) DeepCopyInto(out *CustomDeploymentStrategyParams) { - *out = *in - if in.Environment != nil { - in, out := &in.Environment, &out.Environment - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomDeploymentStrategyParams. -func (in *CustomDeploymentStrategyParams) DeepCopy() *CustomDeploymentStrategyParams { - if in == nil { - return nil - } - out := new(CustomDeploymentStrategyParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentCause) DeepCopyInto(out *DeploymentCause) { - *out = *in - if in.ImageTrigger != nil { - in, out := &in.ImageTrigger, &out.ImageTrigger - *out = new(DeploymentCauseImageTrigger) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCause. -func (in *DeploymentCause) DeepCopy() *DeploymentCause { - if in == nil { - return nil - } - out := new(DeploymentCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentCauseImageTrigger) DeepCopyInto(out *DeploymentCauseImageTrigger) { - *out = *in - out.From = in.From - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCauseImageTrigger. -func (in *DeploymentCauseImageTrigger) DeepCopy() *DeploymentCauseImageTrigger { - if in == nil { - return nil - } - out := new(DeploymentCauseImageTrigger) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentCondition) DeepCopyInto(out *DeploymentCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentCondition. -func (in *DeploymentCondition) DeepCopy() *DeploymentCondition { - if in == nil { - return nil - } - out := new(DeploymentCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentConfig) DeepCopyInto(out *DeploymentConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfig. -func (in *DeploymentConfig) DeepCopy() *DeploymentConfig { - if in == nil { - return nil - } - out := new(DeploymentConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentConfig) 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 *DeploymentConfigList) DeepCopyInto(out *DeploymentConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DeploymentConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfigList. -func (in *DeploymentConfigList) DeepCopy() *DeploymentConfigList { - if in == nil { - return nil - } - out := new(DeploymentConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentConfigList) 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 *DeploymentConfigRollback) DeepCopyInto(out *DeploymentConfigRollback) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.UpdatedAnnotations != nil { - in, out := &in.UpdatedAnnotations, &out.UpdatedAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.Spec = in.Spec - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfigRollback. -func (in *DeploymentConfigRollback) DeepCopy() *DeploymentConfigRollback { - if in == nil { - return nil - } - out := new(DeploymentConfigRollback) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentConfigRollback) 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 *DeploymentConfigRollbackSpec) DeepCopyInto(out *DeploymentConfigRollbackSpec) { - *out = *in - out.From = in.From - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfigRollbackSpec. -func (in *DeploymentConfigRollbackSpec) DeepCopy() *DeploymentConfigRollbackSpec { - if in == nil { - return nil - } - out := new(DeploymentConfigRollbackSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentConfigSpec) DeepCopyInto(out *DeploymentConfigSpec) { - *out = *in - in.Strategy.DeepCopyInto(&out.Strategy) - if in.Triggers != nil { - in, out := &in.Triggers, &out.Triggers - *out = make(DeploymentTriggerPolicies, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.RevisionHistoryLimit != nil { - in, out := &in.RevisionHistoryLimit, &out.RevisionHistoryLimit - *out = new(int32) - **out = **in - } - if in.Selector != nil { - in, out := &in.Selector, &out.Selector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Template != nil { - in, out := &in.Template, &out.Template - *out = new(corev1.PodTemplateSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfigSpec. -func (in *DeploymentConfigSpec) DeepCopy() *DeploymentConfigSpec { - if in == nil { - return nil - } - out := new(DeploymentConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentConfigStatus) DeepCopyInto(out *DeploymentConfigStatus) { - *out = *in - if in.Details != nil { - in, out := &in.Details, &out.Details - *out = new(DeploymentDetails) - (*in).DeepCopyInto(*out) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]DeploymentCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentConfigStatus. -func (in *DeploymentConfigStatus) DeepCopy() *DeploymentConfigStatus { - if in == nil { - return nil - } - out := new(DeploymentConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentDetails) DeepCopyInto(out *DeploymentDetails) { - *out = *in - if in.Causes != nil { - in, out := &in.Causes, &out.Causes - *out = make([]DeploymentCause, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentDetails. -func (in *DeploymentDetails) DeepCopy() *DeploymentDetails { - if in == nil { - return nil - } - out := new(DeploymentDetails) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentLog) DeepCopyInto(out *DeploymentLog) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentLog. -func (in *DeploymentLog) DeepCopy() *DeploymentLog { - if in == nil { - return nil - } - out := new(DeploymentLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentLog) 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 *DeploymentLogOptions) DeepCopyInto(out *DeploymentLogOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.SinceSeconds != nil { - in, out := &in.SinceSeconds, &out.SinceSeconds - *out = new(int64) - **out = **in - } - if in.SinceTime != nil { - in, out := &in.SinceTime, &out.SinceTime - *out = (*in).DeepCopy() - } - if in.TailLines != nil { - in, out := &in.TailLines, &out.TailLines - *out = new(int64) - **out = **in - } - if in.LimitBytes != nil { - in, out := &in.LimitBytes, &out.LimitBytes - *out = new(int64) - **out = **in - } - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentLogOptions. -func (in *DeploymentLogOptions) DeepCopy() *DeploymentLogOptions { - if in == nil { - return nil - } - out := new(DeploymentLogOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentLogOptions) 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 *DeploymentRequest) DeepCopyInto(out *DeploymentRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ExcludeTriggers != nil { - in, out := &in.ExcludeTriggers, &out.ExcludeTriggers - *out = make([]DeploymentTriggerType, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentRequest. -func (in *DeploymentRequest) DeepCopy() *DeploymentRequest { - if in == nil { - return nil - } - out := new(DeploymentRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentRequest) 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 *DeploymentStrategy) DeepCopyInto(out *DeploymentStrategy) { - *out = *in - if in.CustomParams != nil { - in, out := &in.CustomParams, &out.CustomParams - *out = new(CustomDeploymentStrategyParams) - (*in).DeepCopyInto(*out) - } - if in.RecreateParams != nil { - in, out := &in.RecreateParams, &out.RecreateParams - *out = new(RecreateDeploymentStrategyParams) - (*in).DeepCopyInto(*out) - } - if in.RollingParams != nil { - in, out := &in.RollingParams, &out.RollingParams - *out = new(RollingDeploymentStrategyParams) - (*in).DeepCopyInto(*out) - } - in.Resources.DeepCopyInto(&out.Resources) - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ActiveDeadlineSeconds != nil { - in, out := &in.ActiveDeadlineSeconds, &out.ActiveDeadlineSeconds - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStrategy. -func (in *DeploymentStrategy) DeepCopy() *DeploymentStrategy { - if in == nil { - return nil - } - out := new(DeploymentStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTriggerImageChangeParams) DeepCopyInto(out *DeploymentTriggerImageChangeParams) { - *out = *in - if in.ContainerNames != nil { - in, out := &in.ContainerNames, &out.ContainerNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.From = in.From - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTriggerImageChangeParams. -func (in *DeploymentTriggerImageChangeParams) DeepCopy() *DeploymentTriggerImageChangeParams { - if in == nil { - return nil - } - out := new(DeploymentTriggerImageChangeParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in DeploymentTriggerPolicies) DeepCopyInto(out *DeploymentTriggerPolicies) { - { - in := &in - *out = make(DeploymentTriggerPolicies, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTriggerPolicies. -func (in DeploymentTriggerPolicies) DeepCopy() DeploymentTriggerPolicies { - if in == nil { - return nil - } - out := new(DeploymentTriggerPolicies) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentTriggerPolicy) DeepCopyInto(out *DeploymentTriggerPolicy) { - *out = *in - if in.ImageChangeParams != nil { - in, out := &in.ImageChangeParams, &out.ImageChangeParams - *out = new(DeploymentTriggerImageChangeParams) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentTriggerPolicy. -func (in *DeploymentTriggerPolicy) DeepCopy() *DeploymentTriggerPolicy { - if in == nil { - return nil - } - out := new(DeploymentTriggerPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecNewPodHook) DeepCopyInto(out *ExecNewPodHook) { - *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecNewPodHook. -func (in *ExecNewPodHook) DeepCopy() *ExecNewPodHook { - if in == nil { - return nil - } - out := new(ExecNewPodHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LifecycleHook) DeepCopyInto(out *LifecycleHook) { - *out = *in - if in.ExecNewPod != nil { - in, out := &in.ExecNewPod, &out.ExecNewPod - *out = new(ExecNewPodHook) - (*in).DeepCopyInto(*out) - } - if in.TagImages != nil { - in, out := &in.TagImages, &out.TagImages - *out = make([]TagImageHook, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleHook. -func (in *LifecycleHook) DeepCopy() *LifecycleHook { - if in == nil { - return nil - } - out := new(LifecycleHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RecreateDeploymentStrategyParams) DeepCopyInto(out *RecreateDeploymentStrategyParams) { - *out = *in - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int64) - **out = **in - } - if in.Pre != nil { - in, out := &in.Pre, &out.Pre - *out = new(LifecycleHook) - (*in).DeepCopyInto(*out) - } - if in.Mid != nil { - in, out := &in.Mid, &out.Mid - *out = new(LifecycleHook) - (*in).DeepCopyInto(*out) - } - if in.Post != nil { - in, out := &in.Post, &out.Post - *out = new(LifecycleHook) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RecreateDeploymentStrategyParams. -func (in *RecreateDeploymentStrategyParams) DeepCopy() *RecreateDeploymentStrategyParams { - if in == nil { - return nil - } - out := new(RecreateDeploymentStrategyParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RollingDeploymentStrategyParams) DeepCopyInto(out *RollingDeploymentStrategyParams) { - *out = *in - if in.UpdatePeriodSeconds != nil { - in, out := &in.UpdatePeriodSeconds, &out.UpdatePeriodSeconds - *out = new(int64) - **out = **in - } - if in.IntervalSeconds != nil { - in, out := &in.IntervalSeconds, &out.IntervalSeconds - *out = new(int64) - **out = **in - } - if in.TimeoutSeconds != nil { - in, out := &in.TimeoutSeconds, &out.TimeoutSeconds - *out = new(int64) - **out = **in - } - if in.MaxUnavailable != nil { - in, out := &in.MaxUnavailable, &out.MaxUnavailable - *out = new(intstr.IntOrString) - **out = **in - } - if in.MaxSurge != nil { - in, out := &in.MaxSurge, &out.MaxSurge - *out = new(intstr.IntOrString) - **out = **in - } - if in.Pre != nil { - in, out := &in.Pre, &out.Pre - *out = new(LifecycleHook) - (*in).DeepCopyInto(*out) - } - if in.Post != nil { - in, out := &in.Post, &out.Post - *out = new(LifecycleHook) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RollingDeploymentStrategyParams. -func (in *RollingDeploymentStrategyParams) DeepCopy() *RollingDeploymentStrategyParams { - if in == nil { - return nil - } - out := new(RollingDeploymentStrategyParams) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagImageHook) DeepCopyInto(out *TagImageHook) { - *out = *in - out.To = in.To - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagImageHook. -func (in *TagImageHook) DeepCopy() *TagImageHook { - if in == nil { - return nil - } - out := new(TagImageHook) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/apps/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/apps/v1/zz_generated.model_name.go deleted file mode 100644 index 3eea1fc87..000000000 --- a/vendor/github.com/openshift/api/apps/v1/zz_generated.model_name.go +++ /dev/null @@ -1,116 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomDeploymentStrategyParams) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.CustomDeploymentStrategyParams" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentCause) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentCauseImageTrigger) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentCauseImageTrigger" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentCondition) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfig) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfigRollback) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfigRollback" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfigRollbackSpec) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfigRollbackSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentConfigStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentDetails) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentDetails" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentLog) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentLog" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentLogOptions) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentLogOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentRequest) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentTriggerImageChangeParams) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentTriggerImageChangeParams" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeploymentTriggerPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.DeploymentTriggerPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ExecNewPodHook) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.ExecNewPodHook" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LifecycleHook) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.LifecycleHook" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RecreateDeploymentStrategyParams) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.RecreateDeploymentStrategyParams" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RollingDeploymentStrategyParams) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.RollingDeploymentStrategyParams" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagImageHook) OpenAPIModelName() string { - return "com.github.openshift.api.apps.v1.TagImageHook" -} diff --git a/vendor/github.com/openshift/api/apps/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/apps/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 55b53c5da..000000000 --- a/vendor/github.com/openshift/api/apps/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,284 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_CustomDeploymentStrategyParams = map[string]string{ - "": "CustomDeploymentStrategyParams are the input to the Custom deployment strategy.", - "image": "image specifies a container image which can carry out a deployment.", - "environment": "environment holds the environment which will be given to the container for Image.", - "command": "command is optional and overrides CMD in the container Image.", -} - -func (CustomDeploymentStrategyParams) SwaggerDoc() map[string]string { - return map_CustomDeploymentStrategyParams -} - -var map_DeploymentCause = map[string]string{ - "": "DeploymentCause captures information about a particular cause of a deployment.", - "type": "type of the trigger that resulted in the creation of a new deployment", - "imageTrigger": "imageTrigger contains the image trigger details, if this trigger was fired based on an image change", -} - -func (DeploymentCause) SwaggerDoc() map[string]string { - return map_DeploymentCause -} - -var map_DeploymentCauseImageTrigger = map[string]string{ - "": "DeploymentCauseImageTrigger represents details about the cause of a deployment originating from an image change trigger", - "from": "from is a reference to the changed object which triggered a deployment. The field may have the kinds DockerImage, ImageStreamTag, or ImageStreamImage.", -} - -func (DeploymentCauseImageTrigger) SwaggerDoc() map[string]string { - return map_DeploymentCauseImageTrigger -} - -var map_DeploymentCondition = map[string]string{ - "": "DeploymentCondition describes the state of a deployment config at a certain point.", - "type": "type of deployment condition.", - "status": "status of the condition, one of True, False, Unknown.", - "lastUpdateTime": "The last time this condition was updated.", - "lastTransitionTime": "The last time the condition transitioned from one status to another.", - "reason": "The reason for the condition's last transition.", - "message": "A human readable message indicating details about the transition.", -} - -func (DeploymentCondition) SwaggerDoc() map[string]string { - return map_DeploymentCondition -} - -var map_DeploymentConfig = map[string]string{ - "": "Deployment Configs define the template for a pod and manages deploying new images or configuration changes. A single deployment configuration is usually analogous to a single micro-service. Can support many different deployment patterns, including full restart, customizable rolling updates, and fully custom behaviors, as well as pre- and post- deployment hooks. Each individual deployment is represented as a replication controller.\n\nA deployment is \"triggered\" when its configuration is changed or a tag in an Image Stream is changed. Triggers can be disabled to allow manual control over a deployment. The \"strategy\" determines how the deployment is carried out and may be changed at any time. The `latestVersion` field is updated when a new deployment is triggered by any means.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). Deprecated: Use deployments or other means for declarative updates for pods instead.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec represents a desired deployment state and how to deploy to it.", - "status": "status represents the current deployment state.", -} - -func (DeploymentConfig) SwaggerDoc() map[string]string { - return map_DeploymentConfig -} - -var map_DeploymentConfigList = map[string]string{ - "": "DeploymentConfigList is a collection of deployment configs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of deployment configs", -} - -func (DeploymentConfigList) SwaggerDoc() map[string]string { - return map_DeploymentConfigList -} - -var map_DeploymentConfigRollback = map[string]string{ - "": "DeploymentConfigRollback provides the input to rollback generation.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "name": "name of the deployment config that will be rolled back.", - "updatedAnnotations": "updatedAnnotations is a set of new annotations that will be added in the deployment config.", - "spec": "spec defines the options to rollback generation.", -} - -func (DeploymentConfigRollback) SwaggerDoc() map[string]string { - return map_DeploymentConfigRollback -} - -var map_DeploymentConfigRollbackSpec = map[string]string{ - "": "DeploymentConfigRollbackSpec represents the options for rollback generation.", - "from": "from points to a ReplicationController which is a deployment.", - "revision": "revision to rollback to. If set to 0, rollback to the last revision.", - "includeTriggers": "includeTriggers specifies whether to include config Triggers.", - "includeTemplate": "includeTemplate specifies whether to include the PodTemplateSpec.", - "includeReplicationMeta": "includeReplicationMeta specifies whether to include the replica count and selector.", - "includeStrategy": "includeStrategy specifies whether to include the deployment Strategy.", -} - -func (DeploymentConfigRollbackSpec) SwaggerDoc() map[string]string { - return map_DeploymentConfigRollbackSpec -} - -var map_DeploymentConfigSpec = map[string]string{ - "": "DeploymentConfigSpec represents the desired state of the deployment.", - "strategy": "strategy describes how a deployment is executed.", - "minReadySeconds": "minReadySeconds is the minimum number of seconds for which a newly created pod should be ready without any of its container crashing, for it to be considered available. Defaults to 0 (pod will be considered available as soon as it is ready)", - "triggers": "triggers determine how updates to a DeploymentConfig result in new deployments. If no triggers are defined, a new deployment can only occur as a result of an explicit client update to the DeploymentConfig with a new LatestVersion. If null, defaults to having a config change trigger.", - "replicas": "replicas is the number of desired replicas.", - "revisionHistoryLimit": "revisionHistoryLimit is the number of old ReplicationControllers to retain to allow for rollbacks. This field is a pointer to allow for differentiation between an explicit zero and not specified. Defaults to 10. (This only applies to DeploymentConfigs created via the new group API resource, not the legacy resource.)", - "test": "test ensures that this deployment config will have zero replicas except while a deployment is running. This allows the deployment config to be used as a continuous deployment test - triggering on images, running the deployment, and then succeeding or failing. Post strategy hooks and After actions can be used to integrate successful deployment with an action.", - "paused": "paused indicates that the deployment config is paused resulting in no new deployments on template changes or changes in the template caused by other triggers.", - "selector": "selector is a label query over pods that should match the Replicas count.", - "template": "template is the object that describes the pod that will be created if insufficient replicas are detected.", -} - -func (DeploymentConfigSpec) SwaggerDoc() map[string]string { - return map_DeploymentConfigSpec -} - -var map_DeploymentConfigStatus = map[string]string{ - "": "DeploymentConfigStatus represents the current deployment state.", - "latestVersion": "latestVersion is used to determine whether the current deployment associated with a deployment config is out of sync.", - "observedGeneration": "observedGeneration is the most recent generation observed by the deployment config controller.", - "replicas": "replicas is the total number of pods targeted by this deployment config.", - "updatedReplicas": "updatedReplicas is the total number of non-terminated pods targeted by this deployment config that have the desired template spec.", - "availableReplicas": "availableReplicas is the total number of available pods targeted by this deployment config.", - "unavailableReplicas": "unavailableReplicas is the total number of unavailable pods targeted by this deployment config.", - "details": "details are the reasons for the update to this deployment config. This could be based on a change made by the user or caused by an automatic trigger", - "conditions": "conditions represents the latest available observations of a deployment config's current state.", - "readyReplicas": "Total number of ready pods targeted by this deployment.", -} - -func (DeploymentConfigStatus) SwaggerDoc() map[string]string { - return map_DeploymentConfigStatus -} - -var map_DeploymentDetails = map[string]string{ - "": "DeploymentDetails captures information about the causes of a deployment.", - "message": "message is the user specified change message, if this deployment was triggered manually by the user", - "causes": "causes are extended data associated with all the causes for creating a new deployment", -} - -func (DeploymentDetails) SwaggerDoc() map[string]string { - return map_DeploymentDetails -} - -var map_DeploymentLog = map[string]string{ - "": "DeploymentLog represents the logs for a deployment\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (DeploymentLog) SwaggerDoc() map[string]string { - return map_DeploymentLog -} - -var map_DeploymentLogOptions = map[string]string{ - "": "DeploymentLogOptions is the REST options for a deployment log\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "container": "The container for which to stream logs. Defaults to only container if there is one container in the pod.", - "follow": "follow if true indicates that the build log should be streamed until the build terminates.", - "previous": "Return previous deployment logs. Defaults to false.", - "sinceSeconds": "A relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "sinceTime": "An RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "timestamps": "If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - "tailLines": "If set, the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - "limitBytes": "If set, the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - "nowait": "nowait if true causes the call to return immediately even if the deployment is not available yet. Otherwise the server will wait until the deployment has started.", - "version": "version of the deployment for which to view logs.", -} - -func (DeploymentLogOptions) SwaggerDoc() map[string]string { - return map_DeploymentLogOptions -} - -var map_DeploymentRequest = map[string]string{ - "": "DeploymentRequest is a request to a deployment config for a new deployment.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "name": "name of the deployment config for requesting a new deployment.", - "latest": "latest will update the deployment config with the latest state from all triggers.", - "force": "force will try to force a new deployment to run. If the deployment config is paused, then setting this to true will return an Invalid error.", - "excludeTriggers": "excludeTriggers instructs the instantiator to avoid processing the specified triggers. This field overrides the triggers from latest and allows clients to control specific logic. This field is ignored if not specified.", -} - -func (DeploymentRequest) SwaggerDoc() map[string]string { - return map_DeploymentRequest -} - -var map_DeploymentStrategy = map[string]string{ - "": "DeploymentStrategy describes how to perform a deployment.", - "type": "type is the name of a deployment strategy.", - "customParams": "customParams are the input to the Custom deployment strategy, and may also be specified for the Recreate and Rolling strategies to customize the execution process that runs the deployment.", - "recreateParams": "recreateParams are the input to the Recreate deployment strategy.", - "rollingParams": "rollingParams are the input to the Rolling deployment strategy.", - "resources": "resources contains resource requirements to execute the deployment and any hooks.", - "labels": "labels is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.", - "annotations": "annotations is a set of key, value pairs added to custom deployer and lifecycle pre/post hook pods.", - "activeDeadlineSeconds": "activeDeadlineSeconds is the duration in seconds that the deployer pods for this deployment config may be active on a node before the system actively tries to terminate them.", -} - -func (DeploymentStrategy) SwaggerDoc() map[string]string { - return map_DeploymentStrategy -} - -var map_DeploymentTriggerImageChangeParams = map[string]string{ - "": "DeploymentTriggerImageChangeParams represents the parameters to the ImageChange trigger.", - "automatic": "automatic means that the detection of a new tag value should result in an image update inside the pod template.", - "containerNames": "containerNames is used to restrict tag updates to the specified set of container names in a pod. If multiple triggers point to the same containers, the resulting behavior is undefined. Future API versions will make this a validation error. If ContainerNames does not point to a valid container, the trigger will be ignored. Future API versions will make this a validation error.", - "from": "from is a reference to an image stream tag to watch for changes. From.Name is the only required subfield - if From.Namespace is blank, the namespace of the current deployment trigger will be used.", - "lastTriggeredImage": "lastTriggeredImage is the last image to be triggered.", -} - -func (DeploymentTriggerImageChangeParams) SwaggerDoc() map[string]string { - return map_DeploymentTriggerImageChangeParams -} - -var map_DeploymentTriggerPolicy = map[string]string{ - "": "DeploymentTriggerPolicy describes a policy for a single trigger that results in a new deployment.", - "type": "type of the trigger", - "imageChangeParams": "imageChangeParams represents the parameters for the ImageChange trigger.", -} - -func (DeploymentTriggerPolicy) SwaggerDoc() map[string]string { - return map_DeploymentTriggerPolicy -} - -var map_ExecNewPodHook = map[string]string{ - "": "ExecNewPodHook is a hook implementation which runs a command in a new pod based on the specified container which is assumed to be part of the deployment template.", - "command": "command is the action command and its arguments.", - "env": "env is a set of environment variables to supply to the hook pod's container.", - "containerName": "containerName is the name of a container in the deployment pod template whose container image will be used for the hook pod's container.", - "volumes": "volumes is a list of named volumes from the pod template which should be copied to the hook pod. Volumes names not found in pod spec are ignored. An empty list means no volumes will be copied.", -} - -func (ExecNewPodHook) SwaggerDoc() map[string]string { - return map_ExecNewPodHook -} - -var map_LifecycleHook = map[string]string{ - "": "LifecycleHook defines a specific deployment lifecycle action. Only one type of action may be specified at any time.", - "failurePolicy": "failurePolicy specifies what action to take if the hook fails.", - "execNewPod": "execNewPod specifies the options for a lifecycle hook backed by a pod.", - "tagImages": "tagImages instructs the deployer to tag the current image referenced under a container onto an image stream tag.", -} - -func (LifecycleHook) SwaggerDoc() map[string]string { - return map_LifecycleHook -} - -var map_RecreateDeploymentStrategyParams = map[string]string{ - "": "RecreateDeploymentStrategyParams are the input to the Recreate deployment strategy.", - "timeoutSeconds": "timeoutSeconds is the time to wait for updates before giving up. If the value is nil, a default will be used.", - "pre": "pre is a lifecycle hook which is executed before the strategy manipulates the deployment. All LifecycleHookFailurePolicy values are supported.", - "mid": "mid is a lifecycle hook which is executed while the deployment is scaled down to zero before the first new pod is created. All LifecycleHookFailurePolicy values are supported.", - "post": "post is a lifecycle hook which is executed after the strategy has finished all deployment logic. All LifecycleHookFailurePolicy values are supported.", -} - -func (RecreateDeploymentStrategyParams) SwaggerDoc() map[string]string { - return map_RecreateDeploymentStrategyParams -} - -var map_RollingDeploymentStrategyParams = map[string]string{ - "": "RollingDeploymentStrategyParams are the input to the Rolling deployment strategy.", - "updatePeriodSeconds": "updatePeriodSeconds is the time to wait between individual pod updates. If the value is nil, a default will be used.", - "intervalSeconds": "intervalSeconds is the time to wait between polling deployment status after update. If the value is nil, a default will be used.", - "timeoutSeconds": "timeoutSeconds is the time to wait for updates before giving up. If the value is nil, a default will be used.", - "maxUnavailable": "maxUnavailable is the maximum number of pods that can be unavailable during the update. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of update (ex: 10%). Absolute number is calculated from percentage by rounding down.\n\nThis cannot be 0 if MaxSurge is 0. By default, 25% is used.\n\nExample: when this is set to 30%, the old RC can be scaled down by 30% immediately when the rolling update starts. Once new pods are ready, old RC can be scaled down further, followed by scaling up the new RC, ensuring that at least 70% of original number of pods are available at all times during the update.", - "maxSurge": "maxSurge is the maximum number of pods that can be scheduled above the original number of pods. Value can be an absolute number (ex: 5) or a percentage of total pods at the start of the update (ex: 10%). Absolute number is calculated from percentage by rounding up.\n\nThis cannot be 0 if MaxUnavailable is 0. By default, 25% is used.\n\nExample: when this is set to 30%, the new RC can be scaled up by 30% immediately when the rolling update starts. Once old pods have been killed, new RC can be scaled up further, ensuring that total number of pods running at any time during the update is atmost 130% of original pods.", - "pre": "pre is a lifecycle hook which is executed before the deployment process begins. All LifecycleHookFailurePolicy values are supported.", - "post": "post is a lifecycle hook which is executed after the strategy has finished all deployment logic. All LifecycleHookFailurePolicy values are supported.", -} - -func (RollingDeploymentStrategyParams) SwaggerDoc() map[string]string { - return map_RollingDeploymentStrategyParams -} - -var map_TagImageHook = map[string]string{ - "": "TagImageHook is a request to tag the image in a particular container onto an ImageStreamTag.", - "containerName": "containerName is the name of a container in the deployment config whose image value will be used as the source of the tag. If there is only a single container this value will be defaulted to the name of that container.", - "to": "to is the target ImageStreamTag to set the container's image onto.", -} - -func (TagImageHook) SwaggerDoc() map[string]string { - return map_TagImageHook -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/apps/v1/zz_prerelease_lifecycle_generated.go b/vendor/github.com/openshift/api/apps/v1/zz_prerelease_lifecycle_generated.go deleted file mode 100644 index cdd91d385..000000000 --- a/vendor/github.com/openshift/api/apps/v1/zz_prerelease_lifecycle_generated.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1 - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentConfig) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentConfig) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentConfig) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentConfigList) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentConfigList) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentConfigList) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentConfigRollback) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentConfigRollback) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentConfigRollback) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentLog) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentLog) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentLog) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentLogOptions) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentLogOptions) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentLogOptions) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *DeploymentRequest) APILifecycleIntroduced() (major, minor int) { - return 3, 0 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *DeploymentRequest) APILifecycleDeprecated() (major, minor int) { - return 4, 14 -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *DeploymentRequest) APILifecycleRemoved() (major, minor int) { - return 6, 0 -} diff --git a/vendor/github.com/openshift/api/authorization/.codegen.yaml b/vendor/github.com/openshift/api/authorization/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/authorization/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/authorization/install.go b/vendor/github.com/openshift/api/authorization/install.go deleted file mode 100644 index 08ecc95f4..000000000 --- a/vendor/github.com/openshift/api/authorization/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package authorization - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - authorizationv1 "github.com/openshift/api/authorization/v1" -) - -const ( - GroupName = "authorization.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(authorizationv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/authorization/v1/Makefile b/vendor/github.com/openshift/api/authorization/v1/Makefile deleted file mode 100644 index 1e47c9fd9..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="authorization.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/authorization/v1/codec.go b/vendor/github.com/openshift/api/authorization/v1/codec.go deleted file mode 100644 index 61f1f9f51..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/codec.go +++ /dev/null @@ -1,139 +0,0 @@ -package v1 - -import ( - "github.com/openshift/api/pkg/serialization" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -var _ runtime.NestedObjectDecoder = &PolicyRule{} -var _ runtime.NestedObjectEncoder = &PolicyRule{} - -func (c *PolicyRule) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - serialization.DecodeNestedRawExtensionOrUnknown(d, &c.AttributeRestrictions) - return nil -} -func (c *PolicyRule) EncodeNestedObjects(e runtime.Encoder) error { - return serialization.EncodeNestedRawExtension(e, &c.AttributeRestrictions) -} - -var _ runtime.NestedObjectDecoder = &SelfSubjectRulesReview{} -var _ runtime.NestedObjectEncoder = &SelfSubjectRulesReview{} - -func (c *SelfSubjectRulesReview) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Status.Rules { - c.Status.Rules[i].DecodeNestedObjects(d) - } - return nil -} -func (c *SelfSubjectRulesReview) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Status.Rules { - if err := c.Status.Rules[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} - -var _ runtime.NestedObjectDecoder = &SubjectRulesReview{} -var _ runtime.NestedObjectEncoder = &SubjectRulesReview{} - -func (c *SubjectRulesReview) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Status.Rules { - c.Status.Rules[i].DecodeNestedObjects(d) - } - return nil -} -func (c *SubjectRulesReview) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Status.Rules { - if err := c.Status.Rules[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} - -var _ runtime.NestedObjectDecoder = &ClusterRole{} -var _ runtime.NestedObjectEncoder = &ClusterRole{} - -func (c *ClusterRole) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Rules { - c.Rules[i].DecodeNestedObjects(d) - } - return nil -} -func (c *ClusterRole) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Rules { - if err := c.Rules[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} - -var _ runtime.NestedObjectDecoder = &Role{} -var _ runtime.NestedObjectEncoder = &Role{} - -func (c *Role) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Rules { - c.Rules[i].DecodeNestedObjects(d) - } - return nil -} -func (c *Role) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Rules { - if err := c.Rules[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} - -var _ runtime.NestedObjectDecoder = &ClusterRoleList{} -var _ runtime.NestedObjectEncoder = &ClusterRoleList{} - -func (c *ClusterRoleList) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Items { - c.Items[i].DecodeNestedObjects(d) - } - return nil -} -func (c *ClusterRoleList) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Items { - if err := c.Items[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} - -var _ runtime.NestedObjectDecoder = &RoleList{} -var _ runtime.NestedObjectEncoder = &RoleList{} - -func (c *RoleList) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for i := range c.Items { - c.Items[i].DecodeNestedObjects(d) - } - return nil -} -func (c *RoleList) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Items { - if err := c.Items[i].EncodeNestedObjects(e); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/openshift/api/authorization/v1/doc.go b/vendor/github.com/openshift/api/authorization/v1/doc.go deleted file mode 100644 index 8b4e927d6..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/doc.go +++ /dev/null @@ -1,10 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/authorization/apis/authorization -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.authorization.v1 - -// +kubebuilder:validation:Optional -// +groupName=authorization.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/authorization/v1/generated.pb.go b/vendor/github.com/openshift/api/authorization/v1/generated.pb.go deleted file mode 100644 index 7db96e17e..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/generated.pb.go +++ /dev/null @@ -1,8005 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/authorization/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - v12 "k8s.io/api/core/v1" - v11 "k8s.io/api/rbac/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *Action) Reset() { *m = Action{} } - -func (m *ClusterRole) Reset() { *m = ClusterRole{} } - -func (m *ClusterRoleBinding) Reset() { *m = ClusterRoleBinding{} } - -func (m *ClusterRoleBindingList) Reset() { *m = ClusterRoleBindingList{} } - -func (m *ClusterRoleList) Reset() { *m = ClusterRoleList{} } - -func (m *GroupRestriction) Reset() { *m = GroupRestriction{} } - -func (m *IsPersonalSubjectAccessReview) Reset() { *m = IsPersonalSubjectAccessReview{} } - -func (m *LocalResourceAccessReview) Reset() { *m = LocalResourceAccessReview{} } - -func (m *LocalSubjectAccessReview) Reset() { *m = LocalSubjectAccessReview{} } - -func (m *NamedClusterRole) Reset() { *m = NamedClusterRole{} } - -func (m *NamedClusterRoleBinding) Reset() { *m = NamedClusterRoleBinding{} } - -func (m *NamedRole) Reset() { *m = NamedRole{} } - -func (m *NamedRoleBinding) Reset() { *m = NamedRoleBinding{} } - -func (m *OptionalNames) Reset() { *m = OptionalNames{} } - -func (m *OptionalScopes) Reset() { *m = OptionalScopes{} } - -func (m *PolicyRule) Reset() { *m = PolicyRule{} } - -func (m *ResourceAccessReview) Reset() { *m = ResourceAccessReview{} } - -func (m *ResourceAccessReviewResponse) Reset() { *m = ResourceAccessReviewResponse{} } - -func (m *Role) Reset() { *m = Role{} } - -func (m *RoleBinding) Reset() { *m = RoleBinding{} } - -func (m *RoleBindingList) Reset() { *m = RoleBindingList{} } - -func (m *RoleBindingRestriction) Reset() { *m = RoleBindingRestriction{} } - -func (m *RoleBindingRestrictionList) Reset() { *m = RoleBindingRestrictionList{} } - -func (m *RoleBindingRestrictionSpec) Reset() { *m = RoleBindingRestrictionSpec{} } - -func (m *RoleList) Reset() { *m = RoleList{} } - -func (m *SelfSubjectRulesReview) Reset() { *m = SelfSubjectRulesReview{} } - -func (m *SelfSubjectRulesReviewSpec) Reset() { *m = SelfSubjectRulesReviewSpec{} } - -func (m *ServiceAccountReference) Reset() { *m = ServiceAccountReference{} } - -func (m *ServiceAccountRestriction) Reset() { *m = ServiceAccountRestriction{} } - -func (m *SubjectAccessReview) Reset() { *m = SubjectAccessReview{} } - -func (m *SubjectAccessReviewResponse) Reset() { *m = SubjectAccessReviewResponse{} } - -func (m *SubjectRulesReview) Reset() { *m = SubjectRulesReview{} } - -func (m *SubjectRulesReviewSpec) Reset() { *m = SubjectRulesReviewSpec{} } - -func (m *SubjectRulesReviewStatus) Reset() { *m = SubjectRulesReviewStatus{} } - -func (m *UserRestriction) Reset() { *m = UserRestriction{} } - -func (m *Action) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Action) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Action) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.IsNonResourceURL { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x42 - { - size, err := m.Content.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - i -= len(m.ResourceName) - copy(dAtA[i:], m.ResourceName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceName))) - i-- - dAtA[i] = 0x32 - i -= len(m.Resource) - copy(dAtA[i:], m.Resource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resource))) - i-- - dAtA[i] = 0x2a - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x22 - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0x1a - i -= len(m.Verb) - copy(dAtA[i:], m.Verb) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verb))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterRole) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRole) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AggregationRule != nil { - { - size, err := m.AggregationRule.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterRoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.GroupNames != nil { - { - size, err := m.GroupNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.UserNames != nil { - { - size, err := m.UserNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterRoleBindingList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRoleBindingList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRoleBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterRoleList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRoleList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRoleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GroupRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GroupRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GroupRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Selectors) > 0 { - for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *IsPersonalSubjectAccessReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IsPersonalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IsPersonalSubjectAccessReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *LocalResourceAccessReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalResourceAccessReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalResourceAccessReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *LocalSubjectAccessReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalSubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalSubjectAccessReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.Scopes != nil { - { - size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.GroupsSlice) > 0 { - for iNdEx := len(m.GroupsSlice) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.GroupsSlice[iNdEx]) - copy(dAtA[i:], m.GroupsSlice[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupsSlice[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x12 - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedClusterRole) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamedClusterRole) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedClusterRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Role.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedClusterRoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamedClusterRoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedClusterRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.RoleBinding.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedRole) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamedRole) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedRole) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Role.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedRoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamedRoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedRoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.RoleBinding.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m OptionalNames) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m OptionalNames) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m OptionalNames) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m[iNdEx]) - copy(dAtA[i:], m[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m OptionalScopes) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m OptionalScopes) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m OptionalScopes) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m[iNdEx]) - copy(dAtA[i:], m[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *PolicyRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PolicyRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.NonResourceURLsSlice) > 0 { - for iNdEx := len(m.NonResourceURLsSlice) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.NonResourceURLsSlice[iNdEx]) - copy(dAtA[i:], m.NonResourceURLsSlice[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NonResourceURLsSlice[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.ResourceNames) > 0 { - for iNdEx := len(m.ResourceNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ResourceNames[iNdEx]) - copy(dAtA[i:], m.ResourceNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ResourceNames[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Resources) > 0 { - for iNdEx := len(m.Resources) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Resources[iNdEx]) - copy(dAtA[i:], m.Resources[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Resources[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.APIGroups) > 0 { - for iNdEx := len(m.APIGroups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.APIGroups[iNdEx]) - copy(dAtA[i:], m.APIGroups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.APIGroups[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.AttributeRestrictions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Verbs) > 0 { - for iNdEx := len(m.Verbs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Verbs[iNdEx]) - copy(dAtA[i:], m.Verbs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Verbs[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ResourceAccessReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceAccessReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceAccessReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceAccessReviewResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceAccessReviewResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceAccessReviewResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.EvaluationError) - copy(dAtA[i:], m.EvaluationError) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) - i-- - dAtA[i] = 0x22 - if len(m.GroupsSlice) > 0 { - for iNdEx := len(m.GroupsSlice) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.GroupsSlice[iNdEx]) - copy(dAtA[i:], m.GroupsSlice[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupsSlice[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.UsersSlice) > 0 { - for iNdEx := len(m.UsersSlice) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.UsersSlice[iNdEx]) - copy(dAtA[i:], m.UsersSlice[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UsersSlice[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Role) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Role) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Role) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoleBinding) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBinding) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBinding) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.RoleRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Subjects) > 0 { - for iNdEx := len(m.Subjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Subjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.GroupNames != nil { - { - size, err := m.GroupNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.UserNames != nil { - { - size, err := m.UserNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoleBindingList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBindingList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBindingList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoleBindingRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBindingRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBindingRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoleBindingRestrictionList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBindingRestrictionList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBindingRestrictionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoleBindingRestrictionSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleBindingRestrictionSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleBindingRestrictionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ServiceAccountRestriction != nil { - { - size, err := m.ServiceAccountRestriction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.GroupRestriction != nil { - { - size, err := m.GroupRestriction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.UserRestriction != nil { - { - size, err := m.UserRestriction.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RoleList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoleList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoleList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SelfSubjectRulesReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SelfSubjectRulesReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SelfSubjectRulesReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SelfSubjectRulesReviewSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SelfSubjectRulesReviewSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SelfSubjectRulesReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Scopes != nil { - { - size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ServiceAccountReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceAccountReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceAccountReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceAccountRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceAccountRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceAccountRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Namespaces[iNdEx]) - copy(dAtA[i:], m.Namespaces[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.ServiceAccounts) > 0 { - for iNdEx := len(m.ServiceAccounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ServiceAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SubjectAccessReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubjectAccessReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubjectAccessReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if m.Scopes != nil { - { - size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.GroupsSlice) > 0 { - for iNdEx := len(m.GroupsSlice) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.GroupsSlice[iNdEx]) - copy(dAtA[i:], m.GroupsSlice[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.GroupsSlice[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x12 - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SubjectAccessReviewResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubjectAccessReviewResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubjectAccessReviewResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.EvaluationError) - copy(dAtA[i:], m.EvaluationError) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) - i-- - dAtA[i] = 0x22 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x1a - i-- - if m.Allowed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SubjectRulesReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubjectRulesReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubjectRulesReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SubjectRulesReviewSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubjectRulesReviewSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubjectRulesReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Scopes != nil { - { - size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SubjectRulesReviewStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SubjectRulesReviewStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SubjectRulesReviewStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.EvaluationError) - copy(dAtA[i:], m.EvaluationError) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EvaluationError))) - i-- - dAtA[i] = 0x12 - if len(m.Rules) > 0 { - for iNdEx := len(m.Rules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UserRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Selectors) > 0 { - for iNdEx := len(m.Selectors) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Selectors[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Users) > 0 { - for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Users[iNdEx]) - copy(dAtA[i:], m.Users[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Users[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Action) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Verb) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Resource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ResourceName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Content.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - return n -} - -func (m *ClusterRole) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.AggregationRule != nil { - l = m.AggregationRule.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ClusterRoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.UserNames != nil { - l = m.UserNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GroupNames != nil { - l = m.GroupNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.RoleRef.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ClusterRoleBindingList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ClusterRoleList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *GroupRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *IsPersonalSubjectAccessReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *LocalResourceAccessReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Action.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *LocalSubjectAccessReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Action.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.User) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.GroupsSlice) > 0 { - for _, s := range m.GroupsSlice { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedClusterRole) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Role.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedClusterRoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.RoleBinding.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedRole) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Role.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *NamedRoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.RoleBinding.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m OptionalNames) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m OptionalScopes) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PolicyRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Verbs) > 0 { - for _, s := range m.Verbs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.AttributeRestrictions.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.APIGroups) > 0 { - for _, s := range m.APIGroups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Resources) > 0 { - for _, s := range m.Resources { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.ResourceNames) > 0 { - for _, s := range m.ResourceNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.NonResourceURLsSlice) > 0 { - for _, s := range m.NonResourceURLsSlice { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceAccessReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Action.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ResourceAccessReviewResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.UsersSlice) > 0 { - for _, s := range m.UsersSlice { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.GroupsSlice) > 0 { - for _, s := range m.GroupsSlice { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.EvaluationError) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Role) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RoleBinding) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.UserNames != nil { - l = m.UserNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GroupNames != nil { - l = m.GroupNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Subjects) > 0 { - for _, e := range m.Subjects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.RoleRef.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RoleBindingList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RoleBindingRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RoleBindingRestrictionList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RoleBindingRestrictionSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.UserRestriction != nil { - l = m.UserRestriction.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GroupRestriction != nil { - l = m.GroupRestriction.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ServiceAccountRestriction != nil { - l = m.ServiceAccountRestriction.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RoleList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SelfSubjectRulesReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SelfSubjectRulesReviewSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ServiceAccountReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ServiceAccountRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ServiceAccounts) > 0 { - for _, e := range m.ServiceAccounts { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Namespaces) > 0 { - for _, s := range m.Namespaces { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SubjectAccessReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Action.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.User) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.GroupsSlice) > 0 { - for _, s := range m.GroupsSlice { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SubjectAccessReviewResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.EvaluationError) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SubjectRulesReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SubjectRulesReviewSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.User) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Scopes != nil { - l = m.Scopes.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *SubjectRulesReviewStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rules) > 0 { - for _, e := range m.Rules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.EvaluationError) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *UserRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Users) > 0 { - for _, s := range m.Users { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Selectors) > 0 { - for _, e := range m.Selectors { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Action) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Action{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Verb:` + fmt.Sprintf("%v", this.Verb) + `,`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `Resource:` + fmt.Sprintf("%v", this.Resource) + `,`, - `ResourceName:` + fmt.Sprintf("%v", this.ResourceName) + `,`, - `Content:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Content), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `IsNonResourceURL:` + fmt.Sprintf("%v", this.IsNonResourceURL) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterRole) String() string { - if this == nil { - return "nil" - } - repeatedStringForRules := "[]PolicyRule{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + "," - } - repeatedStringForRules += "}" - s := strings.Join([]string{`&ClusterRole{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `AggregationRule:` + strings.Replace(fmt.Sprintf("%v", this.AggregationRule), "AggregationRule", "v11.AggregationRule", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterRoleBinding) String() string { - if this == nil { - return "nil" - } - repeatedStringForSubjects := "[]ObjectReference{" - for _, f := range this.Subjects { - repeatedStringForSubjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForSubjects += "}" - s := strings.Join([]string{`&ClusterRoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `UserNames:` + strings.Replace(fmt.Sprintf("%v", this.UserNames), "OptionalNames", "OptionalNames", 1) + `,`, - `GroupNames:` + strings.Replace(fmt.Sprintf("%v", this.GroupNames), "OptionalNames", "OptionalNames", 1) + `,`, - `Subjects:` + repeatedStringForSubjects + `,`, - `RoleRef:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RoleRef), "ObjectReference", "v12.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterRoleBindingList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ClusterRoleBinding{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ClusterRoleBindingList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ClusterRoleList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ClusterRole{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ClusterRoleList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *GroupRestriction) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]LabelSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += fmt.Sprintf("%v", f) + "," - } - repeatedStringForSelectors += "}" - s := strings.Join([]string{`&GroupRestriction{`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `Selectors:` + repeatedStringForSelectors + `,`, - `}`, - }, "") - return s -} -func (this *IsPersonalSubjectAccessReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsPersonalSubjectAccessReview{`, - `}`, - }, "") - return s -} -func (this *LocalResourceAccessReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LocalResourceAccessReview{`, - `Action:` + strings.Replace(strings.Replace(this.Action.String(), "Action", "Action", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *LocalSubjectAccessReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LocalSubjectAccessReview{`, - `Action:` + strings.Replace(strings.Replace(this.Action.String(), "Action", "Action", 1), `&`, ``, 1) + `,`, - `User:` + fmt.Sprintf("%v", this.User) + `,`, - `GroupsSlice:` + fmt.Sprintf("%v", this.GroupsSlice) + `,`, - `Scopes:` + strings.Replace(fmt.Sprintf("%v", this.Scopes), "OptionalScopes", "OptionalScopes", 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamedClusterRole) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedClusterRole{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Role:` + strings.Replace(strings.Replace(this.Role.String(), "ClusterRole", "ClusterRole", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamedClusterRoleBinding) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedClusterRoleBinding{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `RoleBinding:` + strings.Replace(strings.Replace(this.RoleBinding.String(), "ClusterRoleBinding", "ClusterRoleBinding", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamedRole) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedRole{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Role:` + strings.Replace(strings.Replace(this.Role.String(), "Role", "Role", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *NamedRoleBinding) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NamedRoleBinding{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `RoleBinding:` + strings.Replace(strings.Replace(this.RoleBinding.String(), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PolicyRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PolicyRule{`, - `Verbs:` + fmt.Sprintf("%v", this.Verbs) + `,`, - `AttributeRestrictions:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AttributeRestrictions), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `APIGroups:` + fmt.Sprintf("%v", this.APIGroups) + `,`, - `Resources:` + fmt.Sprintf("%v", this.Resources) + `,`, - `ResourceNames:` + fmt.Sprintf("%v", this.ResourceNames) + `,`, - `NonResourceURLsSlice:` + fmt.Sprintf("%v", this.NonResourceURLsSlice) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceAccessReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceAccessReview{`, - `Action:` + strings.Replace(strings.Replace(this.Action.String(), "Action", "Action", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ResourceAccessReviewResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceAccessReviewResponse{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `UsersSlice:` + fmt.Sprintf("%v", this.UsersSlice) + `,`, - `GroupsSlice:` + fmt.Sprintf("%v", this.GroupsSlice) + `,`, - `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, - `}`, - }, "") - return s -} -func (this *Role) String() string { - if this == nil { - return "nil" - } - repeatedStringForRules := "[]PolicyRule{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + "," - } - repeatedStringForRules += "}" - s := strings.Join([]string{`&Role{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Rules:` + repeatedStringForRules + `,`, - `}`, - }, "") - return s -} -func (this *RoleBinding) String() string { - if this == nil { - return "nil" - } - repeatedStringForSubjects := "[]ObjectReference{" - for _, f := range this.Subjects { - repeatedStringForSubjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForSubjects += "}" - s := strings.Join([]string{`&RoleBinding{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `UserNames:` + strings.Replace(fmt.Sprintf("%v", this.UserNames), "OptionalNames", "OptionalNames", 1) + `,`, - `GroupNames:` + strings.Replace(fmt.Sprintf("%v", this.GroupNames), "OptionalNames", "OptionalNames", 1) + `,`, - `Subjects:` + repeatedStringForSubjects + `,`, - `RoleRef:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.RoleRef), "ObjectReference", "v12.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RoleBindingList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]RoleBinding{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RoleBinding", "RoleBinding", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RoleBindingList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *RoleBindingRestriction) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RoleBindingRestriction{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RoleBindingRestrictionSpec", "RoleBindingRestrictionSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RoleBindingRestrictionList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]RoleBindingRestriction{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RoleBindingRestriction", "RoleBindingRestriction", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RoleBindingRestrictionList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *RoleBindingRestrictionSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RoleBindingRestrictionSpec{`, - `UserRestriction:` + strings.Replace(this.UserRestriction.String(), "UserRestriction", "UserRestriction", 1) + `,`, - `GroupRestriction:` + strings.Replace(this.GroupRestriction.String(), "GroupRestriction", "GroupRestriction", 1) + `,`, - `ServiceAccountRestriction:` + strings.Replace(this.ServiceAccountRestriction.String(), "ServiceAccountRestriction", "ServiceAccountRestriction", 1) + `,`, - `}`, - }, "") - return s -} -func (this *RoleList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Role{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Role", "Role", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RoleList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *SelfSubjectRulesReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SelfSubjectRulesReview{`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SelfSubjectRulesReviewSpec", "SelfSubjectRulesReviewSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectRulesReviewStatus", "SubjectRulesReviewStatus", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SelfSubjectRulesReviewSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SelfSubjectRulesReviewSpec{`, - `Scopes:` + strings.Replace(fmt.Sprintf("%v", this.Scopes), "OptionalScopes", "OptionalScopes", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceAccountReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceAccountReference{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceAccountRestriction) String() string { - if this == nil { - return "nil" - } - repeatedStringForServiceAccounts := "[]ServiceAccountReference{" - for _, f := range this.ServiceAccounts { - repeatedStringForServiceAccounts += strings.Replace(strings.Replace(f.String(), "ServiceAccountReference", "ServiceAccountReference", 1), `&`, ``, 1) + "," - } - repeatedStringForServiceAccounts += "}" - s := strings.Join([]string{`&ServiceAccountRestriction{`, - `ServiceAccounts:` + repeatedStringForServiceAccounts + `,`, - `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, - `}`, - }, "") - return s -} -func (this *SubjectAccessReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubjectAccessReview{`, - `Action:` + strings.Replace(strings.Replace(this.Action.String(), "Action", "Action", 1), `&`, ``, 1) + `,`, - `User:` + fmt.Sprintf("%v", this.User) + `,`, - `GroupsSlice:` + fmt.Sprintf("%v", this.GroupsSlice) + `,`, - `Scopes:` + strings.Replace(fmt.Sprintf("%v", this.Scopes), "OptionalScopes", "OptionalScopes", 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SubjectAccessReviewResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubjectAccessReviewResponse{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, - `}`, - }, "") - return s -} -func (this *SubjectRulesReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubjectRulesReview{`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "SubjectRulesReviewSpec", "SubjectRulesReviewSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "SubjectRulesReviewStatus", "SubjectRulesReviewStatus", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SubjectRulesReviewSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SubjectRulesReviewSpec{`, - `User:` + fmt.Sprintf("%v", this.User) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `Scopes:` + strings.Replace(fmt.Sprintf("%v", this.Scopes), "OptionalScopes", "OptionalScopes", 1) + `,`, - `}`, - }, "") - return s -} -func (this *SubjectRulesReviewStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForRules := "[]PolicyRule{" - for _, f := range this.Rules { - repeatedStringForRules += strings.Replace(strings.Replace(f.String(), "PolicyRule", "PolicyRule", 1), `&`, ``, 1) + "," - } - repeatedStringForRules += "}" - s := strings.Join([]string{`&SubjectRulesReviewStatus{`, - `Rules:` + repeatedStringForRules + `,`, - `EvaluationError:` + fmt.Sprintf("%v", this.EvaluationError) + `,`, - `}`, - }, "") - return s -} -func (this *UserRestriction) String() string { - if this == nil { - return "nil" - } - repeatedStringForSelectors := "[]LabelSelector{" - for _, f := range this.Selectors { - repeatedStringForSelectors += fmt.Sprintf("%v", f) + "," - } - repeatedStringForSelectors += "}" - s := strings.Join([]string{`&UserRestriction{`, - `Users:` + fmt.Sprintf("%v", this.Users) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `Selectors:` + repeatedStringForSelectors + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Action) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Action: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Action: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verb", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verb = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Content.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsNonResourceURL", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsNonResourceURL = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRole) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRole: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, PolicyRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AggregationRule", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AggregationRule == nil { - m.AggregationRule = &v11.AggregationRule{} - } - if err := m.AggregationRule.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UserNames == nil { - m.UserNames = OptionalNames{} - } - if err := m.UserNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GroupNames == nil { - m.GroupNames = OptionalNames{} - } - if err := m.GroupNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subjects = append(m.Subjects, v12.ObjectReference{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRoleBindingList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRoleBindingList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ClusterRoleBinding{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterRoleList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRoleList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRoleList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ClusterRole{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Selectors = append(m.Selectors, v1.LabelSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IsPersonalSubjectAccessReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IsPersonalSubjectAccessReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IsPersonalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalResourceAccessReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalResourceAccessReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalResourceAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *LocalSubjectAccessReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalSubjectAccessReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalSubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupsSlice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupsSlice = append(m.GroupsSlice, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scopes == nil { - m.Scopes = OptionalScopes{} - } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedClusterRole) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedClusterRole: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedClusterRole: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Role.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedClusterRoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedClusterRoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedClusterRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleBinding", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedRole) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedRole: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedRole: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Role.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedRoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedRoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedRoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleBinding", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleBinding.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OptionalNames) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OptionalNames: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OptionalNames: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OptionalScopes) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OptionalScopes: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OptionalScopes: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PolicyRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PolicyRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verbs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verbs = append(m.Verbs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttributeRestrictions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AttributeRestrictions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field APIGroups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.APIGroups = append(m.APIGroups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Resources = append(m.Resources, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResourceNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ResourceNames = append(m.ResourceNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NonResourceURLsSlice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NonResourceURLsSlice = append(m.NonResourceURLsSlice, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceAccessReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceAccessReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceAccessReviewResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceAccessReviewResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceAccessReviewResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UsersSlice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UsersSlice = append(m.UsersSlice, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupsSlice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupsSlice = append(m.GroupsSlice, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvaluationError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Role) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Role: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, PolicyRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBinding) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBinding: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBinding: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UserNames == nil { - m.UserNames = OptionalNames{} - } - if err := m.UserNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GroupNames == nil { - m.GroupNames = OptionalNames{} - } - if err := m.GroupNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subjects = append(m.Subjects, v12.ObjectReference{}) - if err := m.Subjects[len(m.Subjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RoleRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBindingList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBindingList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBindingList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, RoleBinding{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBindingRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBindingRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBindingRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBindingRestrictionList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBindingRestrictionList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBindingRestrictionList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, RoleBindingRestriction{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleBindingRestrictionSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleBindingRestrictionSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleBindingRestrictionSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserRestriction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.UserRestriction == nil { - m.UserRestriction = &UserRestriction{} - } - if err := m.UserRestriction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupRestriction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GroupRestriction == nil { - m.GroupRestriction = &GroupRestriction{} - } - if err := m.GroupRestriction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountRestriction", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ServiceAccountRestriction == nil { - m.ServiceAccountRestriction = &ServiceAccountRestriction{} - } - if err := m.ServiceAccountRestriction.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoleList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoleList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoleList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Role{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SelfSubjectRulesReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelfSubjectRulesReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelfSubjectRulesReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SelfSubjectRulesReviewSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelfSubjectRulesReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scopes == nil { - m.Scopes = OptionalScopes{} - } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceAccountReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceAccountReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceAccountReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceAccountRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceAccountRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceAccountRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceAccounts = append(m.ServiceAccounts, ServiceAccountReference{}) - if err := m.ServiceAccounts[len(m.ServiceAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubjectAccessReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubjectAccessReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectAccessReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupsSlice", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GroupsSlice = append(m.GroupsSlice, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scopes == nil { - m.Scopes = OptionalScopes{} - } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubjectAccessReviewResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubjectAccessReviewResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectAccessReviewResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Allowed = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvaluationError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubjectRulesReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubjectRulesReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectRulesReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubjectRulesReviewSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubjectRulesReviewSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectRulesReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scopes == nil { - m.Scopes = OptionalScopes{} - } - if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SubjectRulesReviewStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SubjectRulesReviewStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SubjectRulesReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rules = append(m.Rules, PolicyRule{}) - if err := m.Rules[len(m.Rules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EvaluationError", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EvaluationError = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selectors", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Selectors = append(m.Selectors, v1.LabelSelector{}) - if err := m.Selectors[len(m.Selectors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/authorization/v1/generated.proto b/vendor/github.com/openshift/api/authorization/v1/generated.proto deleted file mode 100644 index 326ecf2e6..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/generated.proto +++ /dev/null @@ -1,588 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.authorization.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/api/rbac/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/authorization/v1"; - -// Action describes a request to the API server -message Action { - // namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces - optional string namespace = 1; - - // verb is one of: get, list, watch, create, update, delete - optional string verb = 2; - - // Group is the API group of the resource - // Serialized as resourceAPIGroup to avoid confusion with the 'groups' field when inlined - optional string resourceAPIGroup = 3; - - // Version is the API version of the resource - // Serialized as resourceAPIVersion to avoid confusion with TypeMeta.apiVersion and ObjectMeta.resourceVersion when inlined - optional string resourceAPIVersion = 4; - - // resource is one of the existing resource types - optional string resource = 5; - - // resourceName is the name of the resource being requested for a "get" or deleted for a "delete" - optional string resourceName = 6; - - // path is the path of a non resource URL - optional string path = 8; - - // isNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy) - optional bool isNonResourceURL = 9; - - // content is the actual content of the request for create and update - // +kubebuilder:pruning:PreserveUnknownFields - optional .k8s.io.apimachinery.pkg.runtime.RawExtension content = 7; -} - -// ClusterRole is a logical grouping of PolicyRules that can be referenced as a unit by ClusterRoleBindings. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterRole { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // rules holds all the PolicyRules for this ClusterRole - repeated PolicyRule rules = 2; - - // aggregationRule is an optional field that describes how to build the Rules for this ClusterRole. - // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be - // stomped by the controller. - optional .k8s.io.api.rbac.v1.AggregationRule aggregationRule = 3; -} - -// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference any ClusterRole in the same namespace or in the global namespace. -// It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. -// ClusterRoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces). -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterRoleBinding { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // userNames holds all the usernames directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - optional OptionalNames userNames = 2; - - // groupNames holds all the groups directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - optional OptionalNames groupNames = 3; - - // subjects hold object references to authorize with this rule. - // This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. - // Thus newer clients that do not need to support backwards compatibility should send - // only fully qualified Subjects and should omit the UserNames and GroupNames fields. - // Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames. - repeated .k8s.io.api.core.v1.ObjectReference subjects = 4; - - // roleRef can only reference the current namespace and the global namespace. - // If the ClusterRoleRef cannot be resolved, the Authorizer must return an error. - // Since Policy is a singleton, this is sufficient knowledge to locate a role. - optional .k8s.io.api.core.v1.ObjectReference roleRef = 5; -} - -// ClusterRoleBindingList is a collection of ClusterRoleBindings -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterRoleBindingList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of ClusterRoleBindings - repeated ClusterRoleBinding items = 2; -} - -// ClusterRoleList is a collection of ClusterRoles -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterRoleList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of ClusterRoles - repeated ClusterRole items = 2; -} - -// GroupRestriction matches a group either by a string match on the group name -// or a label selector applied to group labels. -message GroupRestriction { - // groups is a list of groups used to match against an individual user's - // groups. If the user is a member of one of the whitelisted groups, the user - // is allowed to be bound to a role. - // +nullable - repeated string groups = 1; - - // Selectors specifies a list of label selectors over group labels. - // +nullable - repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labels = 2; -} - -// IsPersonalSubjectAccessReview is a marker for PolicyRule.AttributeRestrictions that denotes that subjectaccessreviews on self should be allowed -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message IsPersonalSubjectAccessReview { -} - -// LocalResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec in a particular namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message LocalResourceAccessReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 2; - - // Action describes the action being tested. The Namespace element is FORCED to the current namespace. - optional Action Action = 1; -} - -// LocalSubjectAccessReview is an object for requesting information about whether a user or group can perform an action in a particular namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message LocalSubjectAccessReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 5; - - // Action describes the action being tested. The Namespace element is FORCED to the current namespace. - optional Action Action = 1; - - // user is optional. If both User and Groups are empty, the current authenticated user is used. - optional string user = 2; - - // groups is optional. Groups is the list of groups to which the User belongs. - // +k8s:conversion-gen=false - repeated string groups = 3; - - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil for a self-SAR, means "use the scopes on this request". - // Nil for a regular SAR, means the same as empty. - // +k8s:conversion-gen=false - optional OptionalScopes scopes = 4; -} - -// NamedClusterRole relates a name with a cluster role -message NamedClusterRole { - // name is the name of the cluster role - optional string name = 1; - - // role is the cluster role being named - optional ClusterRole role = 2; -} - -// NamedClusterRoleBinding relates a name with a cluster role binding -message NamedClusterRoleBinding { - // name is the name of the cluster role binding - optional string name = 1; - - // roleBinding is the cluster role binding being named - optional ClusterRoleBinding roleBinding = 2; -} - -// NamedRole relates a Role with a name -message NamedRole { - // name is the name of the role - optional string name = 1; - - // role is the role being named - optional Role role = 2; -} - -// NamedRoleBinding relates a role binding with a name -message NamedRoleBinding { - // name is the name of the role binding - optional string name = 1; - - // roleBinding is the role binding being named - optional RoleBinding roleBinding = 2; -} - -// OptionalNames is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message OptionalNames { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// OptionalScopes is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message OptionalScopes { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// PolicyRule holds information that describes a policy rule, but does not contain information -// about who the rule applies to or which namespace the rule applies to. -message PolicyRule { - // verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - repeated string verbs = 1; - - // attributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +kubebuilder:pruning:PreserveUnknownFields - optional .k8s.io.apimachinery.pkg.runtime.RawExtension attributeRestrictions = 2; - - // apiGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed. - // That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request - // will be allowed - // +optional - // +nullable - repeated string apiGroups = 3; - - // resources is a list of resources this rule applies to. ResourceAll represents all resources. - repeated string resources = 4; - - // resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - repeated string resourceNames = 5; - - // NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. - repeated string nonResourceURLs = 6; -} - -// ResourceAccessReview is a means to request a list of which users and groups are authorized to perform the -// action specified by spec -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ResourceAccessReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 2; - - // Action describes the action being tested. - optional Action Action = 1; -} - -// ResourceAccessReviewResponse describes who can perform the action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ResourceAccessReviewResponse { - // namespace is the namespace used for the access review - optional string namespace = 1; - - // UsersSlice is the list of users who can perform the action - // +k8s:conversion-gen=false - repeated string users = 2; - - // GroupsSlice is the list of groups who can perform the action - // +k8s:conversion-gen=false - repeated string groups = 3; - - // EvaluationError is an indication that some error occurred during resolution, but partial results can still be returned. - // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is - // most common when a bound role is missing, but enough roles are still present and bound to reason about the request. - optional string evalutionError = 4; -} - -// Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Role { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // rules holds all the PolicyRules for this Role - repeated PolicyRule rules = 2; -} - -// RoleBinding references a Role, but not contain it. It can reference any Role in the same namespace or in the global namespace. -// It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. -// RoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces). -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RoleBinding { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // userNames holds all the usernames directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - optional OptionalNames userNames = 2; - - // groupNames holds all the groups directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - optional OptionalNames groupNames = 3; - - // subjects hold object references to authorize with this rule. - // This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. - // Thus newer clients that do not need to support backwards compatibility should send - // only fully qualified Subjects and should omit the UserNames and GroupNames fields. - // Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames. - repeated .k8s.io.api.core.v1.ObjectReference subjects = 4; - - // roleRef can only reference the current namespace and the global namespace. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - // Since Policy is a singleton, this is sufficient knowledge to locate a role. - optional .k8s.io.api.core.v1.ObjectReference roleRef = 5; -} - -// RoleBindingList is a collection of RoleBindings -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RoleBindingList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of RoleBindings - repeated RoleBinding items = 2; -} - -// RoleBindingRestriction is an object that can be matched against a subject -// (user, group, or service account) to determine whether rolebindings on that -// subject are allowed in the namespace to which the RoleBindingRestriction -// belongs. If any one of those RoleBindingRestriction objects matches -// a subject, rolebindings on that subject in the namespace are allowed. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=rolebindingrestrictions,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_03,operatorName=config-operator,operatorOrdering=01 -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -message RoleBindingRestriction { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec defines the matcher. - optional RoleBindingRestrictionSpec spec = 2; -} - -// RoleBindingRestrictionList is a collection of RoleBindingRestriction objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RoleBindingRestrictionList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of RoleBindingRestriction objects. - repeated RoleBindingRestriction items = 2; -} - -// RoleBindingRestrictionSpec defines a rolebinding restriction. Exactly one -// field must be non-nil. -message RoleBindingRestrictionSpec { - // userrestriction matches against user subjects. - // +nullable - optional UserRestriction userrestriction = 1; - - // grouprestriction matches against group subjects. - // +nullable - optional GroupRestriction grouprestriction = 2; - - // serviceaccountrestriction matches against service-account subjects. - // +nullable - optional ServiceAccountRestriction serviceaccountrestriction = 3; -} - -// RoleList is a collection of Roles -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RoleList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of Roles - repeated Role items = 2; -} - -// SelfSubjectRulesReview is a resource you can create to determine which actions you can perform in a namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message SelfSubjectRulesReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 3; - - // spec adds information about how to conduct the check - optional SelfSubjectRulesReviewSpec spec = 1; - - // status is completed by the server to tell which permissions you have - optional SubjectRulesReviewStatus status = 2; -} - -// SelfSubjectRulesReviewSpec adds information about how to conduct the check -message SelfSubjectRulesReviewSpec { - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil means "use the scopes on this request". - // +k8s:conversion-gen=false - optional OptionalScopes scopes = 1; -} - -// ServiceAccountReference specifies a service account and namespace by their -// names. -message ServiceAccountReference { - // name is the name of the service account. - optional string name = 1; - - // namespace is the namespace of the service account. Service accounts from - // inside the whitelisted namespaces are allowed to be bound to roles. If - // Namespace is empty, then the namespace of the RoleBindingRestriction in - // which the ServiceAccountReference is embedded is used. - optional string namespace = 2; -} - -// ServiceAccountRestriction matches a service account by a string match on -// either the service-account name or the name of the service account's -// namespace. -message ServiceAccountRestriction { - // serviceaccounts specifies a list of literal service-account names. - repeated ServiceAccountReference serviceaccounts = 1; - - // namespaces specifies a list of literal namespace names. - repeated string namespaces = 2; -} - -// SubjectAccessReview is an object for requesting information about whether a user or group can perform an action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message SubjectAccessReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 5; - - // Action describes the action being tested. - optional Action Action = 1; - - // user is optional. If both User and Groups are empty, the current authenticated user is used. - optional string user = 2; - - // GroupsSlice is optional. Groups is the list of groups to which the User belongs. - // +k8s:conversion-gen=false - repeated string groups = 3; - - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil for a self-SAR, means "use the scopes on this request". - // Nil for a regular SAR, means the same as empty. - // +k8s:conversion-gen=false - optional OptionalScopes scopes = 4; -} - -// SubjectAccessReviewResponse describes whether or not a user or group can perform an action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message SubjectAccessReviewResponse { - // namespace is the namespace used for the access review - optional string namespace = 1; - - // allowed is required. True if the action would be allowed, false otherwise. - optional bool allowed = 2; - - // reason is optional. It indicates why a request was allowed or denied. - optional string reason = 3; - - // evaluationError is an indication that some error occurred during the authorization check. - // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is - // most common when a bound role is missing, but enough roles are still present and bound to reason about the request. - optional string evaluationError = 4; -} - -// SubjectRulesReview is a resource you can create to determine which actions another user can perform in a namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message SubjectRulesReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 3; - - // spec adds information about how to conduct the check - optional SubjectRulesReviewSpec spec = 1; - - // status is completed by the server to tell which permissions you have - optional SubjectRulesReviewStatus status = 2; -} - -// SubjectRulesReviewSpec adds information about how to conduct the check -message SubjectRulesReviewSpec { - // user is optional. At least one of User and Groups must be specified. - optional string user = 1; - - // groups is optional. Groups is the list of groups to which the User belongs. At least one of User and Groups must be specified. - repeated string groups = 2; - - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - optional OptionalScopes scopes = 3; -} - -// SubjectRulesReviewStatus is contains the result of a rules check -message SubjectRulesReviewStatus { - // rules is the list of rules (no particular sort) that are allowed for the subject - // +optional - repeated PolicyRule rules = 1; - - // evaluationError can appear in combination with Rules. It means some error happened during evaluation - // that may have prevented additional rules from being populated. - // +optional - optional string evaluationError = 2; -} - -// UserRestriction matches a user either by a string match on the user name, -// a string match on the name of a group to which the user belongs, or a label -// selector applied to the user labels. -message UserRestriction { - // users specifies a list of literal user names. - repeated string users = 1; - - // groups specifies a list of literal group names. - // +nullable - repeated string groups = 2; - - // Selectors specifies a list of label selectors over user labels. - // +nullable - repeated .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labels = 3; -} - diff --git a/vendor/github.com/openshift/api/authorization/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/authorization/v1/generated.protomessage.pb.go deleted file mode 100644 index eec7f5334..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*Action) ProtoMessage() {} - -func (*ClusterRole) ProtoMessage() {} - -func (*ClusterRoleBinding) ProtoMessage() {} - -func (*ClusterRoleBindingList) ProtoMessage() {} - -func (*ClusterRoleList) ProtoMessage() {} - -func (*GroupRestriction) ProtoMessage() {} - -func (*IsPersonalSubjectAccessReview) ProtoMessage() {} - -func (*LocalResourceAccessReview) ProtoMessage() {} - -func (*LocalSubjectAccessReview) ProtoMessage() {} - -func (*NamedClusterRole) ProtoMessage() {} - -func (*NamedClusterRoleBinding) ProtoMessage() {} - -func (*NamedRole) ProtoMessage() {} - -func (*NamedRoleBinding) ProtoMessage() {} - -func (*OptionalNames) ProtoMessage() {} - -func (*OptionalScopes) ProtoMessage() {} - -func (*PolicyRule) ProtoMessage() {} - -func (*ResourceAccessReview) ProtoMessage() {} - -func (*ResourceAccessReviewResponse) ProtoMessage() {} - -func (*Role) ProtoMessage() {} - -func (*RoleBinding) ProtoMessage() {} - -func (*RoleBindingList) ProtoMessage() {} - -func (*RoleBindingRestriction) ProtoMessage() {} - -func (*RoleBindingRestrictionList) ProtoMessage() {} - -func (*RoleBindingRestrictionSpec) ProtoMessage() {} - -func (*RoleList) ProtoMessage() {} - -func (*SelfSubjectRulesReview) ProtoMessage() {} - -func (*SelfSubjectRulesReviewSpec) ProtoMessage() {} - -func (*ServiceAccountReference) ProtoMessage() {} - -func (*ServiceAccountRestriction) ProtoMessage() {} - -func (*SubjectAccessReview) ProtoMessage() {} - -func (*SubjectAccessReviewResponse) ProtoMessage() {} - -func (*SubjectRulesReview) ProtoMessage() {} - -func (*SubjectRulesReviewSpec) ProtoMessage() {} - -func (*SubjectRulesReviewStatus) ProtoMessage() {} - -func (*UserRestriction) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/authorization/v1/legacy.go b/vendor/github.com/openshift/api/authorization/v1/legacy.go deleted file mode 100644 index f437a242e..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/legacy.go +++ /dev/null @@ -1,43 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme, rbacv1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Role{}, - &RoleBinding{}, - &RoleBindingList{}, - &RoleList{}, - - &SelfSubjectRulesReview{}, - &SubjectRulesReview{}, - &ResourceAccessReview{}, - &SubjectAccessReview{}, - &LocalResourceAccessReview{}, - &LocalSubjectAccessReview{}, - &ResourceAccessReviewResponse{}, - &SubjectAccessReviewResponse{}, - &IsPersonalSubjectAccessReview{}, - - &ClusterRole{}, - &ClusterRoleBinding{}, - &ClusterRoleBindingList{}, - &ClusterRoleList{}, - - &RoleBindingRestriction{}, - &RoleBindingRestrictionList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/authorization/v1/register.go b/vendor/github.com/openshift/api/authorization/v1/register.go deleted file mode 100644 index f1e12477b..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/register.go +++ /dev/null @@ -1,60 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "authorization.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme, rbacv1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Role{}, - &RoleBinding{}, - &RoleBindingList{}, - &RoleList{}, - - &SelfSubjectRulesReview{}, - &SubjectRulesReview{}, - &ResourceAccessReview{}, - &SubjectAccessReview{}, - &LocalResourceAccessReview{}, - &LocalSubjectAccessReview{}, - &ResourceAccessReviewResponse{}, - &SubjectAccessReviewResponse{}, - &IsPersonalSubjectAccessReview{}, - - &ClusterRole{}, - &ClusterRoleBinding{}, - &ClusterRoleBindingList{}, - &ClusterRoleList{}, - - &RoleBindingRestriction{}, - &RoleBindingRestrictionList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/authorization/v1/types.go b/vendor/github.com/openshift/api/authorization/v1/types.go deleted file mode 100644 index ac9a6759f..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/types.go +++ /dev/null @@ -1,663 +0,0 @@ -package v1 - -import ( - "fmt" - - corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - kruntime "k8s.io/apimachinery/pkg/runtime" -) - -// Authorization is calculated against -// 1. all deny RoleBinding PolicyRules in the master namespace - short circuit on match -// 2. all allow RoleBinding PolicyRules in the master namespace - short circuit on match -// 3. all deny RoleBinding PolicyRules in the namespace - short circuit on match -// 4. all allow RoleBinding PolicyRules in the namespace - short circuit on match -// 5. deny by default - -const ( - // GroupKind is string representation of kind used in role binding subjects that represents the "group". - GroupKind = "Group" - // UserKind is string representation of kind used in role binding subjects that represents the "user". - UserKind = "User" - - ScopesKey = "scopes.authorization.openshift.io" -) - -// PolicyRule holds information that describes a policy rule, but does not contain information -// about who the rule applies to or which namespace the rule applies to. -type PolicyRule struct { - // verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds. - Verbs []string `json:"verbs" protobuf:"bytes,1,rep,name=verbs"` - // attributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. - // If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error. - // +kubebuilder:pruning:PreserveUnknownFields - AttributeRestrictions kruntime.RawExtension `json:"attributeRestrictions,omitempty" protobuf:"bytes,2,opt,name=attributeRestrictions"` - // apiGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed. - // That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request - // will be allowed - // +optional - // +nullable - APIGroups []string `json:"apiGroups,omitempty" protobuf:"bytes,3,rep,name=apiGroups"` - // resources is a list of resources this rule applies to. ResourceAll represents all resources. - Resources []string `json:"resources" protobuf:"bytes,4,rep,name=resources"` - // resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed. - ResourceNames []string `json:"resourceNames,omitempty" protobuf:"bytes,5,rep,name=resourceNames"` - // NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path - // This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different. - NonResourceURLsSlice []string `json:"nonResourceURLs,omitempty" protobuf:"bytes,6,rep,name=nonResourceURLs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IsPersonalSubjectAccessReview is a marker for PolicyRule.AttributeRestrictions that denotes that subjectaccessreviews on self should be allowed -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type IsPersonalSubjectAccessReview struct { - metav1.TypeMeta `json:",inline"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Role struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // rules holds all the PolicyRules for this Role - Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` -} - -// OptionalNames is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type OptionalNames []string - -func (t OptionalNames) String() string { - return fmt.Sprintf("%v", []string(t)) -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RoleBinding references a Role, but not contain it. It can reference any Role in the same namespace or in the global namespace. -// It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. -// RoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces). -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RoleBinding struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // userNames holds all the usernames directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - UserNames OptionalNames `json:"userNames" protobuf:"bytes,2,rep,name=userNames"` - // groupNames holds all the groups directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - GroupNames OptionalNames `json:"groupNames" protobuf:"bytes,3,rep,name=groupNames"` - // subjects hold object references to authorize with this rule. - // This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. - // Thus newer clients that do not need to support backwards compatibility should send - // only fully qualified Subjects and should omit the UserNames and GroupNames fields. - // Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames. - Subjects []corev1.ObjectReference `json:"subjects" protobuf:"bytes,4,rep,name=subjects"` - - // roleRef can only reference the current namespace and the global namespace. - // If the RoleRef cannot be resolved, the Authorizer must return an error. - // Since Policy is a singleton, this is sufficient knowledge to locate a role. - RoleRef corev1.ObjectReference `json:"roleRef" protobuf:"bytes,5,opt,name=roleRef"` -} - -// NamedRole relates a Role with a name -type NamedRole struct { - // name is the name of the role - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // role is the role being named - Role Role `json:"role" protobuf:"bytes,2,opt,name=role"` -} - -// NamedRoleBinding relates a role binding with a name -type NamedRoleBinding struct { - // name is the name of the role binding - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // roleBinding is the role binding being named - RoleBinding RoleBinding `json:"roleBinding" protobuf:"bytes,2,opt,name=roleBinding"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SelfSubjectRulesReview is a resource you can create to determine which actions you can perform in a namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SelfSubjectRulesReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"` - - // spec adds information about how to conduct the check - Spec SelfSubjectRulesReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"` - - // status is completed by the server to tell which permissions you have - Status SubjectRulesReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// SelfSubjectRulesReviewSpec adds information about how to conduct the check -type SelfSubjectRulesReviewSpec struct { - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil means "use the scopes on this request". - // +k8s:conversion-gen=false - Scopes OptionalScopes `json:"scopes" protobuf:"bytes,1,rep,name=scopes"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SubjectRulesReview is a resource you can create to determine which actions another user can perform in a namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SubjectRulesReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"` - - // spec adds information about how to conduct the check - Spec SubjectRulesReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"` - - // status is completed by the server to tell which permissions you have - Status SubjectRulesReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// SubjectRulesReviewSpec adds information about how to conduct the check -type SubjectRulesReviewSpec struct { - // user is optional. At least one of User and Groups must be specified. - User string `json:"user" protobuf:"bytes,1,opt,name=user"` - // groups is optional. Groups is the list of groups to which the User belongs. At least one of User and Groups must be specified. - Groups []string `json:"groups" protobuf:"bytes,2,rep,name=groups"` - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - Scopes OptionalScopes `json:"scopes" protobuf:"bytes,3,opt,name=scopes"` -} - -// SubjectRulesReviewStatus is contains the result of a rules check -type SubjectRulesReviewStatus struct { - // rules is the list of rules (no particular sort) that are allowed for the subject - // +optional - Rules []PolicyRule `json:"rules" protobuf:"bytes,1,rep,name=rules"` - // evaluationError can appear in combination with Rules. It means some error happened during evaluation - // that may have prevented additional rules from being populated. - // +optional - EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,2,opt,name=evaluationError"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceAccessReviewResponse describes who can perform the action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ResourceAccessReviewResponse struct { - metav1.TypeMeta `json:",inline"` - - // namespace is the namespace used for the access review - Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` - // UsersSlice is the list of users who can perform the action - // +k8s:conversion-gen=false - UsersSlice []string `json:"users" protobuf:"bytes,2,rep,name=users"` - // GroupsSlice is the list of groups who can perform the action - // +k8s:conversion-gen=false - GroupsSlice []string `json:"groups" protobuf:"bytes,3,rep,name=groups"` - - // EvaluationError is an indication that some error occurred during resolution, but partial results can still be returned. - // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is - // most common when a bound role is missing, but enough roles are still present and bound to reason about the request. - EvaluationError string `json:"evalutionError" protobuf:"bytes,4,opt,name=evalutionError"` -} - -// +genclient -// +genclient:nonNamespaced -// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=ResourceAccessReviewResponse -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ResourceAccessReview is a means to request a list of which users and groups are authorized to perform the -// action specified by spec -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ResourceAccessReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"` - - // Action describes the action being tested. - Action `json:",inline" protobuf:"bytes,1,opt,name=Action"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SubjectAccessReviewResponse describes whether or not a user or group can perform an action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SubjectAccessReviewResponse struct { - metav1.TypeMeta `json:",inline"` - - // namespace is the namespace used for the access review - Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` - // allowed is required. True if the action would be allowed, false otherwise. - Allowed bool `json:"allowed" protobuf:"varint,2,opt,name=allowed"` - // reason is optional. It indicates why a request was allowed or denied. - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` - // evaluationError is an indication that some error occurred during the authorization check. - // It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is - // most common when a bound role is missing, but enough roles are still present and bound to reason about the request. - EvaluationError string `json:"evaluationError,omitempty" protobuf:"bytes,4,opt,name=evaluationError"` -} - -// OptionalScopes is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type OptionalScopes []string - -func (t OptionalScopes) String() string { - return fmt.Sprintf("%v", []string(t)) -} - -// +genclient -// +genclient:nonNamespaced -// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=SubjectAccessReviewResponse -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SubjectAccessReview is an object for requesting information about whether a user or group can perform an action -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SubjectAccessReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,5,opt,name=metadata"` - - // Action describes the action being tested. - Action `json:",inline" protobuf:"bytes,1,opt,name=Action"` - // user is optional. If both User and Groups are empty, the current authenticated user is used. - User string `json:"user" protobuf:"bytes,2,opt,name=user"` - // GroupsSlice is optional. Groups is the list of groups to which the User belongs. - // +k8s:conversion-gen=false - GroupsSlice []string `json:"groups" protobuf:"bytes,3,rep,name=groups"` - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil for a self-SAR, means "use the scopes on this request". - // Nil for a regular SAR, means the same as empty. - // +k8s:conversion-gen=false - Scopes OptionalScopes `json:"scopes" protobuf:"bytes,4,rep,name=scopes"` -} - -// +genclient -// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=ResourceAccessReviewResponse -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// LocalResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec in a particular namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type LocalResourceAccessReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,2,opt,name=metadata"` - - // Action describes the action being tested. The Namespace element is FORCED to the current namespace. - Action `json:",inline" protobuf:"bytes,1,opt,name=Action"` -} - -// +genclient -// +genclient:skipVerbs=apply,applyStatus,get,list,create,update,updateStatus,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=SubjectAccessReviewResponse -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// LocalSubjectAccessReview is an object for requesting information about whether a user or group can perform an action in a particular namespace -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type LocalSubjectAccessReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,5,opt,name=metadata"` - - // Action describes the action being tested. The Namespace element is FORCED to the current namespace. - Action `json:",inline" protobuf:"bytes,1,opt,name=Action"` - // user is optional. If both User and Groups are empty, the current authenticated user is used. - User string `json:"user" protobuf:"bytes,2,opt,name=user"` - // groups is optional. Groups is the list of groups to which the User belongs. - // +k8s:conversion-gen=false - GroupsSlice []string `json:"groups" protobuf:"bytes,3,rep,name=groups"` - // scopes to use for the evaluation. Empty means "use the unscoped (full) permissions of the user/groups". - // Nil for a self-SAR, means "use the scopes on this request". - // Nil for a regular SAR, means the same as empty. - // +k8s:conversion-gen=false - Scopes OptionalScopes `json:"scopes" protobuf:"bytes,4,rep,name=scopes"` -} - -// Action describes a request to the API server -type Action struct { - // namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - // verb is one of: get, list, watch, create, update, delete - Verb string `json:"verb" protobuf:"bytes,2,opt,name=verb"` - // Group is the API group of the resource - // Serialized as resourceAPIGroup to avoid confusion with the 'groups' field when inlined - Group string `json:"resourceAPIGroup" protobuf:"bytes,3,opt,name=resourceAPIGroup"` - // Version is the API version of the resource - // Serialized as resourceAPIVersion to avoid confusion with TypeMeta.apiVersion and ObjectMeta.resourceVersion when inlined - Version string `json:"resourceAPIVersion" protobuf:"bytes,4,opt,name=resourceAPIVersion"` - // resource is one of the existing resource types - Resource string `json:"resource" protobuf:"bytes,5,opt,name=resource"` - // resourceName is the name of the resource being requested for a "get" or deleted for a "delete" - ResourceName string `json:"resourceName" protobuf:"bytes,6,opt,name=resourceName"` - // path is the path of a non resource URL - Path string `json:"path" protobuf:"bytes,8,opt,name=path"` - // isNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy) - IsNonResourceURL bool `json:"isNonResourceURL" protobuf:"varint,9,opt,name=isNonResourceURL"` - // content is the actual content of the request for create and update - // +kubebuilder:pruning:PreserveUnknownFields - Content kruntime.RawExtension `json:"content,omitempty" protobuf:"bytes,7,opt,name=content"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RoleBindingList is a collection of RoleBindings -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RoleBindingList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of RoleBindings - Items []RoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RoleList is a collection of Roles -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RoleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of Roles - Items []Role `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRole is a logical grouping of PolicyRules that can be referenced as a unit by ClusterRoleBindings. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterRole struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // rules holds all the PolicyRules for this ClusterRole - Rules []PolicyRule `json:"rules" protobuf:"bytes,2,rep,name=rules"` - - // aggregationRule is an optional field that describes how to build the Rules for this ClusterRole. - // If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be - // stomped by the controller. - AggregationRule *rbacv1.AggregationRule `json:"aggregationRule,omitempty" protobuf:"bytes,3,opt,name=aggregationRule"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRoleBinding references a ClusterRole, but not contain it. It can reference any ClusterRole in the same namespace or in the global namespace. -// It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. -// ClusterRoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces). -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterRoleBinding struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // userNames holds all the usernames directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - UserNames OptionalNames `json:"userNames" protobuf:"bytes,2,rep,name=userNames"` - // groupNames holds all the groups directly bound to the role. - // This field should only be specified when supporting legacy clients and servers. - // See Subjects for further details. - // +k8s:conversion-gen=false - // +optional - GroupNames OptionalNames `json:"groupNames" protobuf:"bytes,3,rep,name=groupNames"` - // subjects hold object references to authorize with this rule. - // This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. - // Thus newer clients that do not need to support backwards compatibility should send - // only fully qualified Subjects and should omit the UserNames and GroupNames fields. - // Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames. - Subjects []corev1.ObjectReference `json:"subjects" protobuf:"bytes,4,rep,name=subjects"` - - // roleRef can only reference the current namespace and the global namespace. - // If the ClusterRoleRef cannot be resolved, the Authorizer must return an error. - // Since Policy is a singleton, this is sufficient knowledge to locate a role. - RoleRef corev1.ObjectReference `json:"roleRef" protobuf:"bytes,5,opt,name=roleRef"` -} - -// NamedClusterRole relates a name with a cluster role -type NamedClusterRole struct { - // name is the name of the cluster role - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // role is the cluster role being named - Role ClusterRole `json:"role" protobuf:"bytes,2,opt,name=role"` -} - -// NamedClusterRoleBinding relates a name with a cluster role binding -type NamedClusterRoleBinding struct { - // name is the name of the cluster role binding - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // roleBinding is the cluster role binding being named - RoleBinding ClusterRoleBinding `json:"roleBinding" protobuf:"bytes,2,opt,name=roleBinding"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRoleBindingList is a collection of ClusterRoleBindings -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterRoleBindingList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of ClusterRoleBindings - Items []ClusterRoleBinding `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterRoleList is a collection of ClusterRoles -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterRoleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of ClusterRoles - Items []ClusterRole `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RoleBindingRestriction is an object that can be matched against a subject -// (user, group, or service account) to determine whether rolebindings on that -// subject are allowed in the namespace to which the RoleBindingRestriction -// belongs. If any one of those RoleBindingRestriction objects matches -// a subject, rolebindings on that subject in the namespace are allowed. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=rolebindingrestrictions,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_03,operatorName=config-operator,operatorOrdering=01 -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -type RoleBindingRestriction struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - - // spec defines the matcher. - Spec RoleBindingRestrictionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` -} - -// RoleBindingRestrictionSpec defines a rolebinding restriction. Exactly one -// field must be non-nil. -type RoleBindingRestrictionSpec struct { - // userrestriction matches against user subjects. - // +nullable - UserRestriction *UserRestriction `json:"userrestriction" protobuf:"bytes,1,opt,name=userrestriction"` - - // grouprestriction matches against group subjects. - // +nullable - GroupRestriction *GroupRestriction `json:"grouprestriction" protobuf:"bytes,2,opt,name=grouprestriction"` - - // serviceaccountrestriction matches against service-account subjects. - // +nullable - ServiceAccountRestriction *ServiceAccountRestriction `json:"serviceaccountrestriction" protobuf:"bytes,3,opt,name=serviceaccountrestriction"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RoleBindingRestrictionList is a collection of RoleBindingRestriction objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RoleBindingRestrictionList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of RoleBindingRestriction objects. - Items []RoleBindingRestriction `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// UserRestriction matches a user either by a string match on the user name, -// a string match on the name of a group to which the user belongs, or a label -// selector applied to the user labels. -type UserRestriction struct { - // users specifies a list of literal user names. - Users []string `json:"users" protobuf:"bytes,1,rep,name=users"` - - // groups specifies a list of literal group names. - // +nullable - Groups []string `json:"groups" protobuf:"bytes,2,rep,name=groups"` - - // Selectors specifies a list of label selectors over user labels. - // +nullable - Selectors []metav1.LabelSelector `json:"labels" protobuf:"bytes,3,rep,name=labels"` -} - -// GroupRestriction matches a group either by a string match on the group name -// or a label selector applied to group labels. -type GroupRestriction struct { - // groups is a list of groups used to match against an individual user's - // groups. If the user is a member of one of the whitelisted groups, the user - // is allowed to be bound to a role. - // +nullable - Groups []string `json:"groups" protobuf:"bytes,1,rep,name=groups"` - - // Selectors specifies a list of label selectors over group labels. - // +nullable - Selectors []metav1.LabelSelector `json:"labels" protobuf:"bytes,2,rep,name=labels"` -} - -// ServiceAccountRestriction matches a service account by a string match on -// either the service-account name or the name of the service account's -// namespace. -type ServiceAccountRestriction struct { - // serviceaccounts specifies a list of literal service-account names. - ServiceAccounts []ServiceAccountReference `json:"serviceaccounts" protobuf:"bytes,1,rep,name=serviceaccounts"` - - // namespaces specifies a list of literal namespace names. - Namespaces []string `json:"namespaces" protobuf:"bytes,2,rep,name=namespaces"` -} - -// ServiceAccountReference specifies a service account and namespace by their -// names. -type ServiceAccountReference struct { - // name is the name of the service account. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // namespace is the namespace of the service account. Service accounts from - // inside the whitelisted namespaces are allowed to be bound to roles. If - // Namespace is empty, then the namespace of the RoleBindingRestriction in - // which the ServiceAccountReference is embedded is used. - Namespace string `json:"namespace" protobuf:"bytes,2,opt,name=namespace"` -} diff --git a/vendor/github.com/openshift/api/authorization/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/authorization/v1/zz_generated.deepcopy.go deleted file mode 100644 index 208ae3467..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1000 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - rbacv1 "k8s.io/api/rbac/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *Action) DeepCopyInto(out *Action) { - *out = *in - in.Content.DeepCopyInto(&out.Content) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Action. -func (in *Action) DeepCopy() *Action { - if in == nil { - return nil - } - out := new(Action) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRole) DeepCopyInto(out *ClusterRole) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AggregationRule != nil { - in, out := &in.AggregationRule, &out.AggregationRule - *out = new(rbacv1.AggregationRule) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRole. -func (in *ClusterRole) DeepCopy() *ClusterRole { - if in == nil { - return nil - } - out := new(ClusterRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRole) 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 *ClusterRoleBinding) DeepCopyInto(out *ClusterRoleBinding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserNames != nil { - in, out := &in.UserNames, &out.UserNames - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - } - if in.GroupNames != nil { - in, out := &in.GroupNames, &out.GroupNames - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - } - if in.Subjects != nil { - in, out := &in.Subjects, &out.Subjects - *out = make([]corev1.ObjectReference, len(*in)) - copy(*out, *in) - } - out.RoleRef = in.RoleRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBinding. -func (in *ClusterRoleBinding) DeepCopy() *ClusterRoleBinding { - if in == nil { - return nil - } - out := new(ClusterRoleBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleBinding) 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 *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRoleBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBindingList. -func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList { - if in == nil { - return nil - } - out := new(ClusterRoleBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleBindingList) 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 *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterRole, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleList. -func (in *ClusterRoleList) DeepCopy() *ClusterRoleList { - if in == nil { - return nil - } - out := new(ClusterRoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleList) 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 *GroupRestriction) DeepCopyInto(out *GroupRestriction) { - *out = *in - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Selectors != nil { - in, out := &in.Selectors, &out.Selectors - *out = make([]metav1.LabelSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupRestriction. -func (in *GroupRestriction) DeepCopy() *GroupRestriction { - if in == nil { - return nil - } - out := new(GroupRestriction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IsPersonalSubjectAccessReview) DeepCopyInto(out *IsPersonalSubjectAccessReview) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IsPersonalSubjectAccessReview. -func (in *IsPersonalSubjectAccessReview) DeepCopy() *IsPersonalSubjectAccessReview { - if in == nil { - return nil - } - out := new(IsPersonalSubjectAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IsPersonalSubjectAccessReview) 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 *LocalResourceAccessReview) DeepCopyInto(out *LocalResourceAccessReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Action.DeepCopyInto(&out.Action) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalResourceAccessReview. -func (in *LocalResourceAccessReview) DeepCopy() *LocalResourceAccessReview { - if in == nil { - return nil - } - out := new(LocalResourceAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalResourceAccessReview) 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 *LocalSubjectAccessReview) DeepCopyInto(out *LocalSubjectAccessReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Action.DeepCopyInto(&out.Action) - if in.GroupsSlice != nil { - in, out := &in.GroupsSlice, &out.GroupsSlice - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make(OptionalScopes, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalSubjectAccessReview. -func (in *LocalSubjectAccessReview) DeepCopy() *LocalSubjectAccessReview { - if in == nil { - return nil - } - out := new(LocalSubjectAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LocalSubjectAccessReview) 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 *NamedClusterRole) DeepCopyInto(out *NamedClusterRole) { - *out = *in - in.Role.DeepCopyInto(&out.Role) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedClusterRole. -func (in *NamedClusterRole) DeepCopy() *NamedClusterRole { - if in == nil { - return nil - } - out := new(NamedClusterRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedClusterRoleBinding) DeepCopyInto(out *NamedClusterRoleBinding) { - *out = *in - in.RoleBinding.DeepCopyInto(&out.RoleBinding) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedClusterRoleBinding. -func (in *NamedClusterRoleBinding) DeepCopy() *NamedClusterRoleBinding { - if in == nil { - return nil - } - out := new(NamedClusterRoleBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedRole) DeepCopyInto(out *NamedRole) { - *out = *in - in.Role.DeepCopyInto(&out.Role) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRole. -func (in *NamedRole) DeepCopy() *NamedRole { - if in == nil { - return nil - } - out := new(NamedRole) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamedRoleBinding) DeepCopyInto(out *NamedRoleBinding) { - *out = *in - in.RoleBinding.DeepCopyInto(&out.RoleBinding) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedRoleBinding. -func (in *NamedRoleBinding) DeepCopy() *NamedRoleBinding { - if in == nil { - return nil - } - out := new(NamedRoleBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in OptionalNames) DeepCopyInto(out *OptionalNames) { - { - in := &in - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalNames. -func (in OptionalNames) DeepCopy() OptionalNames { - if in == nil { - return nil - } - out := new(OptionalNames) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in OptionalScopes) DeepCopyInto(out *OptionalScopes) { - { - in := &in - *out = make(OptionalScopes, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalScopes. -func (in OptionalScopes) DeepCopy() OptionalScopes { - if in == nil { - return nil - } - out := new(OptionalScopes) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyRule) DeepCopyInto(out *PolicyRule) { - *out = *in - if in.Verbs != nil { - in, out := &in.Verbs, &out.Verbs - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.AttributeRestrictions.DeepCopyInto(&out.AttributeRestrictions) - if in.APIGroups != nil { - in, out := &in.APIGroups, &out.APIGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ResourceNames != nil { - in, out := &in.ResourceNames, &out.ResourceNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NonResourceURLsSlice != nil { - in, out := &in.NonResourceURLsSlice, &out.NonResourceURLsSlice - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyRule. -func (in *PolicyRule) DeepCopy() *PolicyRule { - if in == nil { - return nil - } - out := new(PolicyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceAccessReview) DeepCopyInto(out *ResourceAccessReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Action.DeepCopyInto(&out.Action) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessReview. -func (in *ResourceAccessReview) DeepCopy() *ResourceAccessReview { - if in == nil { - return nil - } - out := new(ResourceAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceAccessReview) 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 *ResourceAccessReviewResponse) DeepCopyInto(out *ResourceAccessReviewResponse) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.UsersSlice != nil { - in, out := &in.UsersSlice, &out.UsersSlice - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupsSlice != nil { - in, out := &in.GroupsSlice, &out.GroupsSlice - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAccessReviewResponse. -func (in *ResourceAccessReviewResponse) DeepCopy() *ResourceAccessReviewResponse { - if in == nil { - return nil - } - out := new(ResourceAccessReviewResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceAccessReviewResponse) 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 *Role) DeepCopyInto(out *Role) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Role. -func (in *Role) DeepCopy() *Role { - if in == nil { - return nil - } - out := new(Role) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Role) 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 *RoleBinding) DeepCopyInto(out *RoleBinding) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserNames != nil { - in, out := &in.UserNames, &out.UserNames - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - } - if in.GroupNames != nil { - in, out := &in.GroupNames, &out.GroupNames - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - } - if in.Subjects != nil { - in, out := &in.Subjects, &out.Subjects - *out = make([]corev1.ObjectReference, len(*in)) - copy(*out, *in) - } - out.RoleRef = in.RoleRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBinding. -func (in *RoleBinding) DeepCopy() *RoleBinding { - if in == nil { - return nil - } - out := new(RoleBinding) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleBinding) 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 *RoleBindingList) DeepCopyInto(out *RoleBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RoleBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingList. -func (in *RoleBindingList) DeepCopy() *RoleBindingList { - if in == nil { - return nil - } - out := new(RoleBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleBindingList) 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 *RoleBindingRestriction) DeepCopyInto(out *RoleBindingRestriction) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingRestriction. -func (in *RoleBindingRestriction) DeepCopy() *RoleBindingRestriction { - if in == nil { - return nil - } - out := new(RoleBindingRestriction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleBindingRestriction) 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 *RoleBindingRestrictionList) DeepCopyInto(out *RoleBindingRestrictionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RoleBindingRestriction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingRestrictionList. -func (in *RoleBindingRestrictionList) DeepCopy() *RoleBindingRestrictionList { - if in == nil { - return nil - } - out := new(RoleBindingRestrictionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleBindingRestrictionList) 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 *RoleBindingRestrictionSpec) DeepCopyInto(out *RoleBindingRestrictionSpec) { - *out = *in - if in.UserRestriction != nil { - in, out := &in.UserRestriction, &out.UserRestriction - *out = new(UserRestriction) - (*in).DeepCopyInto(*out) - } - if in.GroupRestriction != nil { - in, out := &in.GroupRestriction, &out.GroupRestriction - *out = new(GroupRestriction) - (*in).DeepCopyInto(*out) - } - if in.ServiceAccountRestriction != nil { - in, out := &in.ServiceAccountRestriction, &out.ServiceAccountRestriction - *out = new(ServiceAccountRestriction) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingRestrictionSpec. -func (in *RoleBindingRestrictionSpec) DeepCopy() *RoleBindingRestrictionSpec { - if in == nil { - return nil - } - out := new(RoleBindingRestrictionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleList) DeepCopyInto(out *RoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Role, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList. -func (in *RoleList) DeepCopy() *RoleList { - if in == nil { - return nil - } - out := new(RoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleList) 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 *SelfSubjectRulesReview) DeepCopyInto(out *SelfSubjectRulesReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReview. -func (in *SelfSubjectRulesReview) DeepCopy() *SelfSubjectRulesReview { - if in == nil { - return nil - } - out := new(SelfSubjectRulesReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SelfSubjectRulesReview) 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 *SelfSubjectRulesReviewSpec) DeepCopyInto(out *SelfSubjectRulesReviewSpec) { - *out = *in - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make(OptionalScopes, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelfSubjectRulesReviewSpec. -func (in *SelfSubjectRulesReviewSpec) DeepCopy() *SelfSubjectRulesReviewSpec { - if in == nil { - return nil - } - out := new(SelfSubjectRulesReviewSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountReference) DeepCopyInto(out *ServiceAccountReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountReference. -func (in *ServiceAccountReference) DeepCopy() *ServiceAccountReference { - if in == nil { - return nil - } - out := new(ServiceAccountReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountRestriction) DeepCopyInto(out *ServiceAccountRestriction) { - *out = *in - if in.ServiceAccounts != nil { - in, out := &in.ServiceAccounts, &out.ServiceAccounts - *out = make([]ServiceAccountReference, len(*in)) - copy(*out, *in) - } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountRestriction. -func (in *ServiceAccountRestriction) DeepCopy() *ServiceAccountRestriction { - if in == nil { - return nil - } - out := new(ServiceAccountRestriction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubjectAccessReview) DeepCopyInto(out *SubjectAccessReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Action.DeepCopyInto(&out.Action) - if in.GroupsSlice != nil { - in, out := &in.GroupsSlice, &out.GroupsSlice - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make(OptionalScopes, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReview. -func (in *SubjectAccessReview) DeepCopy() *SubjectAccessReview { - if in == nil { - return nil - } - out := new(SubjectAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SubjectAccessReview) 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 *SubjectAccessReviewResponse) DeepCopyInto(out *SubjectAccessReviewResponse) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectAccessReviewResponse. -func (in *SubjectAccessReviewResponse) DeepCopy() *SubjectAccessReviewResponse { - if in == nil { - return nil - } - out := new(SubjectAccessReviewResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SubjectAccessReviewResponse) 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 *SubjectRulesReview) DeepCopyInto(out *SubjectRulesReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReview. -func (in *SubjectRulesReview) DeepCopy() *SubjectRulesReview { - if in == nil { - return nil - } - out := new(SubjectRulesReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SubjectRulesReview) 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 *SubjectRulesReviewSpec) DeepCopyInto(out *SubjectRulesReviewSpec) { - *out = *in - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make(OptionalScopes, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewSpec. -func (in *SubjectRulesReviewSpec) DeepCopy() *SubjectRulesReviewSpec { - if in == nil { - return nil - } - out := new(SubjectRulesReviewSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubjectRulesReviewStatus) DeepCopyInto(out *SubjectRulesReviewStatus) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]PolicyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubjectRulesReviewStatus. -func (in *SubjectRulesReviewStatus) DeepCopy() *SubjectRulesReviewStatus { - if in == nil { - return nil - } - out := new(SubjectRulesReviewStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserRestriction) DeepCopyInto(out *UserRestriction) { - *out = *in - if in.Users != nil { - in, out := &in.Users, &out.Users - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Selectors != nil { - in, out := &in.Selectors, &out.Selectors - *out = make([]metav1.LabelSelector, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserRestriction. -func (in *UserRestriction) DeepCopy() *UserRestriction { - if in == nil { - return nil - } - out := new(UserRestriction) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/authorization/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/authorization/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index c708c0fa0..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -rolebindingrestrictions.authorization.openshift.io: - Annotations: - release.openshift.io/bootstrap-required: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/470 - CRDName: rolebindingrestrictions.authorization.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_03" - GroupName: authorization.openshift.io - HasStatus: false - KindName: RoleBindingRestriction - Labels: {} - PluralName: rolebindingrestrictions - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/authorization/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/authorization/v1/zz_generated.model_name.go deleted file mode 100644 index 47987773b..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/zz_generated.model_name.go +++ /dev/null @@ -1,171 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Action) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.Action" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterRole) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ClusterRole" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterRoleBinding) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ClusterRoleBinding" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterRoleBindingList) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ClusterRoleBindingList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterRoleList) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ClusterRoleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GroupRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.GroupRestriction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IsPersonalSubjectAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.IsPersonalSubjectAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LocalResourceAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.LocalResourceAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LocalSubjectAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.LocalSubjectAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedClusterRole) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.NamedClusterRole" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedClusterRoleBinding) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.NamedClusterRoleBinding" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedRole) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.NamedRole" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedRoleBinding) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.NamedRoleBinding" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PolicyRule) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.PolicyRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ResourceAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceAccessReviewResponse) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ResourceAccessReviewResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Role) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.Role" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleBinding) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleBinding" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleBindingList) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleBindingList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleBindingRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleBindingRestriction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleBindingRestrictionList) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleBindingRestrictionList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleBindingRestrictionSpec) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleBindingRestrictionSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoleList) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.RoleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SelfSubjectRulesReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SelfSubjectRulesReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SelfSubjectRulesReviewSpec) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SelfSubjectRulesReviewSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountReference) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ServiceAccountReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.ServiceAccountRestriction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubjectAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SubjectAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubjectAccessReviewResponse) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SubjectAccessReviewResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubjectRulesReview) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SubjectRulesReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubjectRulesReviewSpec) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SubjectRulesReviewSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubjectRulesReviewStatus) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.SubjectRulesReviewStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.authorization.v1.UserRestriction" -} diff --git a/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index a1c28a3ec..000000000 --- a/vendor/github.com/openshift/api/authorization/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,370 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Action = map[string]string{ - "": "Action describes a request to the API server", - "namespace": "namespace is the namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces", - "verb": "verb is one of: get, list, watch, create, update, delete", - "resourceAPIGroup": "Group is the API group of the resource Serialized as resourceAPIGroup to avoid confusion with the 'groups' field when inlined", - "resourceAPIVersion": "Version is the API version of the resource Serialized as resourceAPIVersion to avoid confusion with TypeMeta.apiVersion and ObjectMeta.resourceVersion when inlined", - "resource": "resource is one of the existing resource types", - "resourceName": "resourceName is the name of the resource being requested for a \"get\" or deleted for a \"delete\"", - "path": "path is the path of a non resource URL", - "isNonResourceURL": "isNonResourceURL is true if this is a request for a non-resource URL (outside of the resource hierarchy)", - "content": "content is the actual content of the request for create and update", -} - -func (Action) SwaggerDoc() map[string]string { - return map_Action -} - -var map_ClusterRole = map[string]string{ - "": "ClusterRole is a logical grouping of PolicyRules that can be referenced as a unit by ClusterRoleBindings.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "rules": "rules holds all the PolicyRules for this ClusterRole", - "aggregationRule": "aggregationRule is an optional field that describes how to build the Rules for this ClusterRole. If AggregationRule is set, then the Rules are controller managed and direct changes to Rules will be stomped by the controller.", -} - -func (ClusterRole) SwaggerDoc() map[string]string { - return map_ClusterRole -} - -var map_ClusterRoleBinding = map[string]string{ - "": "ClusterRoleBinding references a ClusterRole, but not contain it. It can reference any ClusterRole in the same namespace or in the global namespace. It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. ClusterRoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces).\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "userNames": "userNames holds all the usernames directly bound to the role. This field should only be specified when supporting legacy clients and servers. See Subjects for further details.", - "groupNames": "groupNames holds all the groups directly bound to the role. This field should only be specified when supporting legacy clients and servers. See Subjects for further details.", - "subjects": "subjects hold object references to authorize with this rule. This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. Thus newer clients that do not need to support backwards compatibility should send only fully qualified Subjects and should omit the UserNames and GroupNames fields. Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames.", - "roleRef": "roleRef can only reference the current namespace and the global namespace. If the ClusterRoleRef cannot be resolved, the Authorizer must return an error. Since Policy is a singleton, this is sufficient knowledge to locate a role.", -} - -func (ClusterRoleBinding) SwaggerDoc() map[string]string { - return map_ClusterRoleBinding -} - -var map_ClusterRoleBindingList = map[string]string{ - "": "ClusterRoleBindingList is a collection of ClusterRoleBindings\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of ClusterRoleBindings", -} - -func (ClusterRoleBindingList) SwaggerDoc() map[string]string { - return map_ClusterRoleBindingList -} - -var map_ClusterRoleList = map[string]string{ - "": "ClusterRoleList is a collection of ClusterRoles\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of ClusterRoles", -} - -func (ClusterRoleList) SwaggerDoc() map[string]string { - return map_ClusterRoleList -} - -var map_GroupRestriction = map[string]string{ - "": "GroupRestriction matches a group either by a string match on the group name or a label selector applied to group labels.", - "groups": "groups is a list of groups used to match against an individual user's groups. If the user is a member of one of the whitelisted groups, the user is allowed to be bound to a role.", - "labels": "Selectors specifies a list of label selectors over group labels.", -} - -func (GroupRestriction) SwaggerDoc() map[string]string { - return map_GroupRestriction -} - -var map_IsPersonalSubjectAccessReview = map[string]string{ - "": "IsPersonalSubjectAccessReview is a marker for PolicyRule.AttributeRestrictions that denotes that subjectaccessreviews on self should be allowed\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (IsPersonalSubjectAccessReview) SwaggerDoc() map[string]string { - return map_IsPersonalSubjectAccessReview -} - -var map_LocalResourceAccessReview = map[string]string{ - "": "LocalResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec in a particular namespace\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (LocalResourceAccessReview) SwaggerDoc() map[string]string { - return map_LocalResourceAccessReview -} - -var map_LocalSubjectAccessReview = map[string]string{ - "": "LocalSubjectAccessReview is an object for requesting information about whether a user or group can perform an action in a particular namespace\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "user": "user is optional. If both User and Groups are empty, the current authenticated user is used.", - "groups": "groups is optional. Groups is the list of groups to which the User belongs.", - "scopes": "scopes to use for the evaluation. Empty means \"use the unscoped (full) permissions of the user/groups\". Nil for a self-SAR, means \"use the scopes on this request\". Nil for a regular SAR, means the same as empty.", -} - -func (LocalSubjectAccessReview) SwaggerDoc() map[string]string { - return map_LocalSubjectAccessReview -} - -var map_NamedClusterRole = map[string]string{ - "": "NamedClusterRole relates a name with a cluster role", - "name": "name is the name of the cluster role", - "role": "role is the cluster role being named", -} - -func (NamedClusterRole) SwaggerDoc() map[string]string { - return map_NamedClusterRole -} - -var map_NamedClusterRoleBinding = map[string]string{ - "": "NamedClusterRoleBinding relates a name with a cluster role binding", - "name": "name is the name of the cluster role binding", - "roleBinding": "roleBinding is the cluster role binding being named", -} - -func (NamedClusterRoleBinding) SwaggerDoc() map[string]string { - return map_NamedClusterRoleBinding -} - -var map_NamedRole = map[string]string{ - "": "NamedRole relates a Role with a name", - "name": "name is the name of the role", - "role": "role is the role being named", -} - -func (NamedRole) SwaggerDoc() map[string]string { - return map_NamedRole -} - -var map_NamedRoleBinding = map[string]string{ - "": "NamedRoleBinding relates a role binding with a name", - "name": "name is the name of the role binding", - "roleBinding": "roleBinding is the role binding being named", -} - -func (NamedRoleBinding) SwaggerDoc() map[string]string { - return map_NamedRoleBinding -} - -var map_PolicyRule = map[string]string{ - "": "PolicyRule holds information that describes a policy rule, but does not contain information about who the rule applies to or which namespace the rule applies to.", - "verbs": "verbs is a list of Verbs that apply to ALL the ResourceKinds and AttributeRestrictions contained in this rule. VerbAll represents all kinds.", - "attributeRestrictions": "attributeRestrictions will vary depending on what the Authorizer/AuthorizationAttributeBuilder pair supports. If the Authorizer does not recognize how to handle the AttributeRestrictions, the Authorizer should report an error.", - "apiGroups": "apiGroups is the name of the APIGroup that contains the resources. If this field is empty, then both kubernetes and origin API groups are assumed. That means that if an action is requested against one of the enumerated resources in either the kubernetes or the origin API group, the request will be allowed", - "resources": "resources is a list of resources this rule applies to. ResourceAll represents all resources.", - "resourceNames": "resourceNames is an optional white list of names that the rule applies to. An empty set means that everything is allowed.", - "nonResourceURLs": "NonResourceURLsSlice is a set of partial urls that a user should have access to. *s are allowed, but only as the full, final step in the path This name is intentionally different than the internal type so that the DefaultConvert works nicely and because the ordering may be different.", -} - -func (PolicyRule) SwaggerDoc() map[string]string { - return map_PolicyRule -} - -var map_ResourceAccessReview = map[string]string{ - "": "ResourceAccessReview is a means to request a list of which users and groups are authorized to perform the action specified by spec\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ResourceAccessReview) SwaggerDoc() map[string]string { - return map_ResourceAccessReview -} - -var map_ResourceAccessReviewResponse = map[string]string{ - "": "ResourceAccessReviewResponse describes who can perform the action\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "namespace": "namespace is the namespace used for the access review", - "users": "UsersSlice is the list of users who can perform the action", - "groups": "GroupsSlice is the list of groups who can perform the action", - "evalutionError": "EvaluationError is an indication that some error occurred during resolution, but partial results can still be returned. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is most common when a bound role is missing, but enough roles are still present and bound to reason about the request.", -} - -func (ResourceAccessReviewResponse) SwaggerDoc() map[string]string { - return map_ResourceAccessReviewResponse -} - -var map_Role = map[string]string{ - "": "Role is a logical grouping of PolicyRules that can be referenced as a unit by RoleBindings.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "rules": "rules holds all the PolicyRules for this Role", -} - -func (Role) SwaggerDoc() map[string]string { - return map_Role -} - -var map_RoleBinding = map[string]string{ - "": "RoleBinding references a Role, but not contain it. It can reference any Role in the same namespace or in the global namespace. It adds who information via (Users and Groups) OR Subjects and namespace information by which namespace it exists in. RoleBindings in a given namespace only have effect in that namespace (excepting the master namespace which has power in all namespaces).\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "userNames": "userNames holds all the usernames directly bound to the role. This field should only be specified when supporting legacy clients and servers. See Subjects for further details.", - "groupNames": "groupNames holds all the groups directly bound to the role. This field should only be specified when supporting legacy clients and servers. See Subjects for further details.", - "subjects": "subjects hold object references to authorize with this rule. This field is ignored if UserNames or GroupNames are specified to support legacy clients and servers. Thus newer clients that do not need to support backwards compatibility should send only fully qualified Subjects and should omit the UserNames and GroupNames fields. Clients that need to support backwards compatibility can use this field to build the UserNames and GroupNames.", - "roleRef": "roleRef can only reference the current namespace and the global namespace. If the RoleRef cannot be resolved, the Authorizer must return an error. Since Policy is a singleton, this is sufficient knowledge to locate a role.", -} - -func (RoleBinding) SwaggerDoc() map[string]string { - return map_RoleBinding -} - -var map_RoleBindingList = map[string]string{ - "": "RoleBindingList is a collection of RoleBindings\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of RoleBindings", -} - -func (RoleBindingList) SwaggerDoc() map[string]string { - return map_RoleBindingList -} - -var map_RoleBindingRestriction = map[string]string{ - "": "RoleBindingRestriction is an object that can be matched against a subject (user, group, or service account) to determine whether rolebindings on that subject are allowed in the namespace to which the RoleBindingRestriction belongs. If any one of those RoleBindingRestriction objects matches a subject, rolebindings on that subject in the namespace are allowed.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the matcher.", -} - -func (RoleBindingRestriction) SwaggerDoc() map[string]string { - return map_RoleBindingRestriction -} - -var map_RoleBindingRestrictionList = map[string]string{ - "": "RoleBindingRestrictionList is a collection of RoleBindingRestriction objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of RoleBindingRestriction objects.", -} - -func (RoleBindingRestrictionList) SwaggerDoc() map[string]string { - return map_RoleBindingRestrictionList -} - -var map_RoleBindingRestrictionSpec = map[string]string{ - "": "RoleBindingRestrictionSpec defines a rolebinding restriction. Exactly one field must be non-nil.", - "userrestriction": "userrestriction matches against user subjects.", - "grouprestriction": "grouprestriction matches against group subjects.", - "serviceaccountrestriction": "serviceaccountrestriction matches against service-account subjects.", -} - -func (RoleBindingRestrictionSpec) SwaggerDoc() map[string]string { - return map_RoleBindingRestrictionSpec -} - -var map_RoleList = map[string]string{ - "": "RoleList is a collection of Roles\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of Roles", -} - -func (RoleList) SwaggerDoc() map[string]string { - return map_RoleList -} - -var map_SelfSubjectRulesReview = map[string]string{ - "": "SelfSubjectRulesReview is a resource you can create to determine which actions you can perform in a namespace\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec adds information about how to conduct the check", - "status": "status is completed by the server to tell which permissions you have", -} - -func (SelfSubjectRulesReview) SwaggerDoc() map[string]string { - return map_SelfSubjectRulesReview -} - -var map_SelfSubjectRulesReviewSpec = map[string]string{ - "": "SelfSubjectRulesReviewSpec adds information about how to conduct the check", - "scopes": "scopes to use for the evaluation. Empty means \"use the unscoped (full) permissions of the user/groups\". Nil means \"use the scopes on this request\".", -} - -func (SelfSubjectRulesReviewSpec) SwaggerDoc() map[string]string { - return map_SelfSubjectRulesReviewSpec -} - -var map_ServiceAccountReference = map[string]string{ - "": "ServiceAccountReference specifies a service account and namespace by their names.", - "name": "name is the name of the service account.", - "namespace": "namespace is the namespace of the service account. Service accounts from inside the whitelisted namespaces are allowed to be bound to roles. If Namespace is empty, then the namespace of the RoleBindingRestriction in which the ServiceAccountReference is embedded is used.", -} - -func (ServiceAccountReference) SwaggerDoc() map[string]string { - return map_ServiceAccountReference -} - -var map_ServiceAccountRestriction = map[string]string{ - "": "ServiceAccountRestriction matches a service account by a string match on either the service-account name or the name of the service account's namespace.", - "serviceaccounts": "serviceaccounts specifies a list of literal service-account names.", - "namespaces": "namespaces specifies a list of literal namespace names.", -} - -func (ServiceAccountRestriction) SwaggerDoc() map[string]string { - return map_ServiceAccountRestriction -} - -var map_SubjectAccessReview = map[string]string{ - "": "SubjectAccessReview is an object for requesting information about whether a user or group can perform an action\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "user": "user is optional. If both User and Groups are empty, the current authenticated user is used.", - "groups": "GroupsSlice is optional. Groups is the list of groups to which the User belongs.", - "scopes": "scopes to use for the evaluation. Empty means \"use the unscoped (full) permissions of the user/groups\". Nil for a self-SAR, means \"use the scopes on this request\". Nil for a regular SAR, means the same as empty.", -} - -func (SubjectAccessReview) SwaggerDoc() map[string]string { - return map_SubjectAccessReview -} - -var map_SubjectAccessReviewResponse = map[string]string{ - "": "SubjectAccessReviewResponse describes whether or not a user or group can perform an action\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "namespace": "namespace is the namespace used for the access review", - "allowed": "allowed is required. True if the action would be allowed, false otherwise.", - "reason": "reason is optional. It indicates why a request was allowed or denied.", - "evaluationError": "evaluationError is an indication that some error occurred during the authorization check. It is entirely possible to get an error and be able to continue determine authorization status in spite of it. This is most common when a bound role is missing, but enough roles are still present and bound to reason about the request.", -} - -func (SubjectAccessReviewResponse) SwaggerDoc() map[string]string { - return map_SubjectAccessReviewResponse -} - -var map_SubjectRulesReview = map[string]string{ - "": "SubjectRulesReview is a resource you can create to determine which actions another user can perform in a namespace\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec adds information about how to conduct the check", - "status": "status is completed by the server to tell which permissions you have", -} - -func (SubjectRulesReview) SwaggerDoc() map[string]string { - return map_SubjectRulesReview -} - -var map_SubjectRulesReviewSpec = map[string]string{ - "": "SubjectRulesReviewSpec adds information about how to conduct the check", - "user": "user is optional. At least one of User and Groups must be specified.", - "groups": "groups is optional. Groups is the list of groups to which the User belongs. At least one of User and Groups must be specified.", - "scopes": "scopes to use for the evaluation. Empty means \"use the unscoped (full) permissions of the user/groups\".", -} - -func (SubjectRulesReviewSpec) SwaggerDoc() map[string]string { - return map_SubjectRulesReviewSpec -} - -var map_SubjectRulesReviewStatus = map[string]string{ - "": "SubjectRulesReviewStatus is contains the result of a rules check", - "rules": "rules is the list of rules (no particular sort) that are allowed for the subject", - "evaluationError": "evaluationError can appear in combination with Rules. It means some error happened during evaluation that may have prevented additional rules from being populated.", -} - -func (SubjectRulesReviewStatus) SwaggerDoc() map[string]string { - return map_SubjectRulesReviewStatus -} - -var map_UserRestriction = map[string]string{ - "": "UserRestriction matches a user either by a string match on the user name, a string match on the name of a group to which the user belongs, or a label selector applied to the user labels.", - "users": "users specifies a list of literal user names.", - "groups": "groups specifies a list of literal group names.", - "labels": "Selectors specifies a list of label selectors over user labels.", -} - -func (UserRestriction) SwaggerDoc() map[string]string { - return map_UserRestriction -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/build/.codegen.yaml b/vendor/github.com/openshift/api/build/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/build/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/build/OWNERS b/vendor/github.com/openshift/api/build/OWNERS deleted file mode 100644 index e6d19c798..000000000 --- a/vendor/github.com/openshift/api/build/OWNERS +++ /dev/null @@ -1,7 +0,0 @@ -reviewers: - - adambkaplan - - bparees - - sayan-biswas -emeritus_reviewers: - - jim-minter - - gabemontero diff --git a/vendor/github.com/openshift/api/build/install.go b/vendor/github.com/openshift/api/build/install.go deleted file mode 100644 index 87e2c26b0..000000000 --- a/vendor/github.com/openshift/api/build/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package build - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - buildv1 "github.com/openshift/api/build/v1" -) - -const ( - GroupName = "build.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(buildv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/build/v1/consts.go b/vendor/github.com/openshift/api/build/v1/consts.go deleted file mode 100644 index 0d9c8f03b..000000000 --- a/vendor/github.com/openshift/api/build/v1/consts.go +++ /dev/null @@ -1,202 +0,0 @@ -package v1 - -// annotations -const ( - // BuildAnnotation is an annotation that identifies a Pod as being for a Build - BuildAnnotation = "openshift.io/build.name" - - // BuildConfigAnnotation is an annotation that identifies the BuildConfig that a Build was created from - BuildConfigAnnotation = "openshift.io/build-config.name" - - // BuildCloneAnnotation is an annotation whose value is the name of the build this build was cloned from - BuildCloneAnnotation = "openshift.io/build.clone-of" - - // BuildNumberAnnotation is an annotation whose value is the sequential number for this Build - BuildNumberAnnotation = "openshift.io/build.number" - - // BuildPodNameAnnotation is an annotation whose value is the name of the pod running this build - BuildPodNameAnnotation = "openshift.io/build.pod-name" - - // BuildJenkinsStatusJSONAnnotation is an annotation holding the Jenkins status information - BuildJenkinsStatusJSONAnnotation = "openshift.io/jenkins-status-json" - - // BuildJenkinsLogURLAnnotation is an annotation holding a link to the raw Jenkins build console log - BuildJenkinsLogURLAnnotation = "openshift.io/jenkins-log-url" - - // BuildJenkinsConsoleLogURLAnnotation is an annotation holding a link to the Jenkins build console log (including Jenkins chrome wrappering) - BuildJenkinsConsoleLogURLAnnotation = "openshift.io/jenkins-console-log-url" - - // BuildJenkinsBlueOceanLogURLAnnotation is an annotation holding a link to the Jenkins build console log via the Jenkins BlueOcean UI Plugin - BuildJenkinsBlueOceanLogURLAnnotation = "openshift.io/jenkins-blueocean-log-url" - - // BuildJenkinsBuildURIAnnotation is an annotation holding a link to the Jenkins build - BuildJenkinsBuildURIAnnotation = "openshift.io/jenkins-build-uri" - - // BuildSourceSecretMatchURIAnnotationPrefix is a prefix for annotations on a Secret which indicate a source URI against which the Secret can be used - BuildSourceSecretMatchURIAnnotationPrefix = "build.openshift.io/source-secret-match-uri-" - - // BuildConfigPausedAnnotation is an annotation that marks a BuildConfig as paused. - // New Builds cannot be instantiated from a paused BuildConfig. - BuildConfigPausedAnnotation = "openshift.io/build-config.paused" -) - -// labels -const ( - // BuildConfigLabel is the key of a Build label whose value is the ID of a BuildConfig - // on which the Build is based. NOTE: The value for this label may not contain the entire - // BuildConfig name because it will be truncated to maximum label length. - BuildConfigLabel = "openshift.io/build-config.name" - - // BuildLabel is the key of a Pod label whose value is the Name of a Build which is run. - // NOTE: The value for this label may not contain the entire Build name because it will be - // truncated to maximum label length. - BuildLabel = "openshift.io/build.name" - - // BuildRunPolicyLabel represents the start policy used to start the build. - BuildRunPolicyLabel = "openshift.io/build.start-policy" - - // BuildConfigLabelDeprecated was used as BuildConfigLabel before adding namespaces. - // We keep it for backward compatibility. - BuildConfigLabelDeprecated = "buildconfig" -) - -const ( - // StatusReasonError is a generic reason for a build error condition. - StatusReasonError StatusReason = "Error" - - // StatusReasonCannotCreateBuildPodSpec is an error condition when the build - // strategy cannot create a build pod spec. - StatusReasonCannotCreateBuildPodSpec StatusReason = "CannotCreateBuildPodSpec" - - // StatusReasonCannotCreateBuildPod is an error condition when a build pod - // cannot be created. - StatusReasonCannotCreateBuildPod StatusReason = "CannotCreateBuildPod" - - // StatusReasonInvalidOutputReference is an error condition when the build - // output is an invalid reference. - StatusReasonInvalidOutputReference StatusReason = "InvalidOutputReference" - - // StatusReasonInvalidImageReference is an error condition when the build - // references an invalid image. - StatusReasonInvalidImageReference StatusReason = "InvalidImageReference" - - // StatusReasonCancelBuildFailed is an error condition when cancelling a build - // fails. - StatusReasonCancelBuildFailed StatusReason = "CancelBuildFailed" - - // StatusReasonBuildPodDeleted is an error condition when the build pod is - // deleted before build completion. - StatusReasonBuildPodDeleted StatusReason = "BuildPodDeleted" - - // StatusReasonExceededRetryTimeout is an error condition when the build has - // not completed and retrying the build times out. - StatusReasonExceededRetryTimeout StatusReason = "ExceededRetryTimeout" - - // StatusReasonMissingPushSecret indicates that the build is missing required - // secret for pushing the output image. - // The build will stay in the pending state until the secret is created, or the build times out. - StatusReasonMissingPushSecret StatusReason = "MissingPushSecret" - - // StatusReasonPostCommitHookFailed indicates the post-commit hook failed. - StatusReasonPostCommitHookFailed StatusReason = "PostCommitHookFailed" - - // StatusReasonPushImageToRegistryFailed indicates that an image failed to be - // pushed to the registry. - StatusReasonPushImageToRegistryFailed StatusReason = "PushImageToRegistryFailed" - - // StatusReasonPullBuilderImageFailed indicates that we failed to pull the - // builder image. - StatusReasonPullBuilderImageFailed StatusReason = "PullBuilderImageFailed" - - // StatusReasonFetchSourceFailed indicates that fetching the source of the - // build has failed. - StatusReasonFetchSourceFailed StatusReason = "FetchSourceFailed" - - // StatusReasonFetchImageContentFailed indicates that the fetching of an image and extracting - // its contents for inclusion in the build has failed. - StatusReasonFetchImageContentFailed StatusReason = "FetchImageContentFailed" - - // StatusReasonManageDockerfileFailed indicates that the set up of the Dockerfile for the build - // has failed. - StatusReasonManageDockerfileFailed StatusReason = "ManageDockerfileFailed" - - // StatusReasonInvalidContextDirectory indicates that the supplied - // contextDir does not exist - StatusReasonInvalidContextDirectory StatusReason = "InvalidContextDirectory" - - // StatusReasonCancelledBuild indicates that the build was cancelled by the - // user. - StatusReasonCancelledBuild StatusReason = "CancelledBuild" - - // StatusReasonDockerBuildFailed indicates that the container image build strategy has - // failed. - StatusReasonDockerBuildFailed StatusReason = "DockerBuildFailed" - - // StatusReasonBuildPodExists indicates that the build tried to create a - // build pod but one was already present. - StatusReasonBuildPodExists StatusReason = "BuildPodExists" - - // StatusReasonNoBuildContainerStatus indicates that the build failed because the - // the build pod has no container statuses. - StatusReasonNoBuildContainerStatus StatusReason = "NoBuildContainerStatus" - - // StatusReasonFailedContainer indicates that the pod for the build has at least - // one container with a non-zero exit status. - StatusReasonFailedContainer StatusReason = "FailedContainer" - - // StatusReasonUnresolvableEnvironmentVariable indicates that an error occurred processing - // the supplied options for environment variables in the build strategy environment - StatusReasonUnresolvableEnvironmentVariable StatusReason = "UnresolvableEnvironmentVariable" - - // StatusReasonGenericBuildFailed is the reason associated with a broad - // range of build failures. - StatusReasonGenericBuildFailed StatusReason = "GenericBuildFailed" - - // StatusReasonOutOfMemoryKilled indicates that the build pod was killed for its memory consumption - StatusReasonOutOfMemoryKilled StatusReason = "OutOfMemoryKilled" - - // StatusReasonCannotRetrieveServiceAccount is the reason associated with a failure - // to look up the service account associated with the BuildConfig. - StatusReasonCannotRetrieveServiceAccount StatusReason = "CannotRetrieveServiceAccount" - - // StatusReasonBuildPodEvicted is the reason a build fails due to the build pod being evicted - // from its node - StatusReasonBuildPodEvicted StatusReason = "BuildPodEvicted" -) - -// WhitelistEnvVarNames is a list of environment variable names that are allowed to be specified -// in a buildconfig and merged into the created build pods, the code for this is located in -// openshift/openshift-controller-manager -var WhitelistEnvVarNames = []string{"BUILD_LOGLEVEL", "GIT_SSL_NO_VERIFY", "GIT_LFS_SKIP_SMUDGE", "LANG", - "HTTP_PROXY", "HTTPS_PROXY", "NO_PROXY", "http_proxy", "https_proxy", "no_proxy"} - -// env vars -const ( - - // CustomBuildStrategyBaseImageKey is the environment variable that indicates the base image to be used when - // performing a custom build, if needed. - CustomBuildStrategyBaseImageKey = "OPENSHIFT_CUSTOM_BUILD_BASE_IMAGE" - - // AllowedUIDs is an environment variable that contains ranges of UIDs that are allowed in - // Source builder images - AllowedUIDs = "ALLOWED_UIDS" - // DropCapabilities is an environment variable that contains a list of capabilities to drop when - // executing a Source build - DropCapabilities = "DROP_CAPS" -) - -// keys inside of secrets and configmaps -const ( - // WebHookSecretKey is the key used to identify the value containing the webhook invocation - // secret within a secret referenced by a webhook trigger. - WebHookSecretKey = "WebHookSecretKey" - - // RegistryConfKey is the ConfigMap key for the build pod's registry configuration file. - RegistryConfKey = "registries.conf" - - // SignaturePolicyKey is the ConfigMap key for the build pod's image signature policy file. - SignaturePolicyKey = "policy.json" - - // ServiceCAKey is the ConfigMap key for the service signing certificate authority mounted into build pods. - ServiceCAKey = "service-ca.crt" -) diff --git a/vendor/github.com/openshift/api/build/v1/doc.go b/vendor/github.com/openshift/api/build/v1/doc.go deleted file mode 100644 index 6fe1839e9..000000000 --- a/vendor/github.com/openshift/api/build/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/build/apis/build -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.build.v1 - -// +groupName=build.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/build/v1/generated.pb.go b/vendor/github.com/openshift/api/build/v1/generated.pb.go deleted file mode 100644 index 9ffe8ebd7..000000000 --- a/vendor/github.com/openshift/api/build/v1/generated.pb.go +++ /dev/null @@ -1,15624 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/build/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v11 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" - time "time" -) - -func (m *BinaryBuildRequestOptions) Reset() { *m = BinaryBuildRequestOptions{} } - -func (m *BinaryBuildSource) Reset() { *m = BinaryBuildSource{} } - -func (m *BitbucketWebHookCause) Reset() { *m = BitbucketWebHookCause{} } - -func (m *Build) Reset() { *m = Build{} } - -func (m *BuildCondition) Reset() { *m = BuildCondition{} } - -func (m *BuildConfig) Reset() { *m = BuildConfig{} } - -func (m *BuildConfigList) Reset() { *m = BuildConfigList{} } - -func (m *BuildConfigSpec) Reset() { *m = BuildConfigSpec{} } - -func (m *BuildConfigStatus) Reset() { *m = BuildConfigStatus{} } - -func (m *BuildList) Reset() { *m = BuildList{} } - -func (m *BuildLog) Reset() { *m = BuildLog{} } - -func (m *BuildLogOptions) Reset() { *m = BuildLogOptions{} } - -func (m *BuildOutput) Reset() { *m = BuildOutput{} } - -func (m *BuildPostCommitSpec) Reset() { *m = BuildPostCommitSpec{} } - -func (m *BuildRequest) Reset() { *m = BuildRequest{} } - -func (m *BuildSource) Reset() { *m = BuildSource{} } - -func (m *BuildSpec) Reset() { *m = BuildSpec{} } - -func (m *BuildStatus) Reset() { *m = BuildStatus{} } - -func (m *BuildStatusOutput) Reset() { *m = BuildStatusOutput{} } - -func (m *BuildStatusOutputTo) Reset() { *m = BuildStatusOutputTo{} } - -func (m *BuildStrategy) Reset() { *m = BuildStrategy{} } - -func (m *BuildTriggerCause) Reset() { *m = BuildTriggerCause{} } - -func (m *BuildTriggerPolicy) Reset() { *m = BuildTriggerPolicy{} } - -func (m *BuildVolume) Reset() { *m = BuildVolume{} } - -func (m *BuildVolumeMount) Reset() { *m = BuildVolumeMount{} } - -func (m *BuildVolumeSource) Reset() { *m = BuildVolumeSource{} } - -func (m *CommonSpec) Reset() { *m = CommonSpec{} } - -func (m *CommonWebHookCause) Reset() { *m = CommonWebHookCause{} } - -func (m *ConfigMapBuildSource) Reset() { *m = ConfigMapBuildSource{} } - -func (m *CustomBuildStrategy) Reset() { *m = CustomBuildStrategy{} } - -func (m *DockerBuildStrategy) Reset() { *m = DockerBuildStrategy{} } - -func (m *DockerStrategyOptions) Reset() { *m = DockerStrategyOptions{} } - -func (m *GenericWebHookCause) Reset() { *m = GenericWebHookCause{} } - -func (m *GenericWebHookEvent) Reset() { *m = GenericWebHookEvent{} } - -func (m *GitBuildSource) Reset() { *m = GitBuildSource{} } - -func (m *GitHubWebHookCause) Reset() { *m = GitHubWebHookCause{} } - -func (m *GitInfo) Reset() { *m = GitInfo{} } - -func (m *GitLabWebHookCause) Reset() { *m = GitLabWebHookCause{} } - -func (m *GitRefInfo) Reset() { *m = GitRefInfo{} } - -func (m *GitSourceRevision) Reset() { *m = GitSourceRevision{} } - -func (m *ImageChangeCause) Reset() { *m = ImageChangeCause{} } - -func (m *ImageChangeTrigger) Reset() { *m = ImageChangeTrigger{} } - -func (m *ImageChangeTriggerStatus) Reset() { *m = ImageChangeTriggerStatus{} } - -func (m *ImageLabel) Reset() { *m = ImageLabel{} } - -func (m *ImageSource) Reset() { *m = ImageSource{} } - -func (m *ImageSourcePath) Reset() { *m = ImageSourcePath{} } - -func (m *ImageStreamTagReference) Reset() { *m = ImageStreamTagReference{} } - -func (m *JenkinsPipelineBuildStrategy) Reset() { *m = JenkinsPipelineBuildStrategy{} } - -func (m *OptionalNodeSelector) Reset() { *m = OptionalNodeSelector{} } - -func (m *ProxyConfig) Reset() { *m = ProxyConfig{} } - -func (m *SecretBuildSource) Reset() { *m = SecretBuildSource{} } - -func (m *SecretLocalReference) Reset() { *m = SecretLocalReference{} } - -func (m *SecretSpec) Reset() { *m = SecretSpec{} } - -func (m *SourceBuildStrategy) Reset() { *m = SourceBuildStrategy{} } - -func (m *SourceControlUser) Reset() { *m = SourceControlUser{} } - -func (m *SourceRevision) Reset() { *m = SourceRevision{} } - -func (m *SourceStrategyOptions) Reset() { *m = SourceStrategyOptions{} } - -func (m *StageInfo) Reset() { *m = StageInfo{} } - -func (m *StepInfo) Reset() { *m = StepInfo{} } - -func (m *WebHookTrigger) Reset() { *m = WebHookTrigger{} } - -func (m *BinaryBuildRequestOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BinaryBuildRequestOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BinaryBuildRequestOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.CommitterEmail) - copy(dAtA[i:], m.CommitterEmail) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CommitterEmail))) - i-- - dAtA[i] = 0x42 - i -= len(m.CommitterName) - copy(dAtA[i:], m.CommitterName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CommitterName))) - i-- - dAtA[i] = 0x3a - i -= len(m.AuthorEmail) - copy(dAtA[i:], m.AuthorEmail) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuthorEmail))) - i-- - dAtA[i] = 0x32 - i -= len(m.AuthorName) - copy(dAtA[i:], m.AuthorName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuthorName))) - i-- - dAtA[i] = 0x2a - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x22 - i -= len(m.Commit) - copy(dAtA[i:], m.Commit) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Commit))) - i-- - dAtA[i] = 0x1a - i -= len(m.AsFile) - copy(dAtA[i:], m.AsFile) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AsFile))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BinaryBuildSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BinaryBuildSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BinaryBuildSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.AsFile) - copy(dAtA[i:], m.AsFile) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AsFile))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BitbucketWebHookCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BitbucketWebHookCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BitbucketWebHookCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommonWebHookCause.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Build) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Build) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Build) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildConfigList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildConfigList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildConfigList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildConfigSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildConfigSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FailedBuildsHistoryLimit != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.FailedBuildsHistoryLimit)) - i-- - dAtA[i] = 0x28 - } - if m.SuccessfulBuildsHistoryLimit != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.SuccessfulBuildsHistoryLimit)) - i-- - dAtA[i] = 0x20 - } - { - size, err := m.CommonSpec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.RunPolicy) - copy(dAtA[i:], m.RunPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RunPolicy))) - i-- - dAtA[i] = 0x12 - if len(m.Triggers) > 0 { - for iNdEx := len(m.Triggers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Triggers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BuildConfigStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildConfigStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildConfigStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ImageChangeTriggers) > 0 { - for iNdEx := len(m.ImageChangeTriggers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ImageChangeTriggers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.LastVersion)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *BuildList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildLog) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildLog) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildLog) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *BuildLogOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildLogOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildLogOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.InsecureSkipTLSVerifyBackend { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - if m.Version != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Version)) - i-- - dAtA[i] = 0x50 - } - i-- - if m.NoWait { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - if m.LimitBytes != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.LimitBytes)) - i-- - dAtA[i] = 0x40 - } - if m.TailLines != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.TailLines)) - i-- - dAtA[i] = 0x38 - } - i-- - if m.Timestamps { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - if m.SinceTime != nil { - { - size, err := m.SinceTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.SinceSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.SinceSeconds)) - i-- - dAtA[i] = 0x20 - } - i-- - if m.Previous { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i-- - if m.Follow { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Container) - copy(dAtA[i:], m.Container) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Container))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildOutput) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ImageLabels) > 0 { - for iNdEx := len(m.ImageLabels) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ImageLabels[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.PushSecret != nil { - { - size, err := m.PushSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BuildPostCommitSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildPostCommitSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildPostCommitSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Script) - copy(dAtA[i:], m.Script) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Script))) - i-- - dAtA[i] = 0x1a - if len(m.Args) > 0 { - for iNdEx := len(m.Args) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Args[iNdEx]) - copy(dAtA[i:], m.Args[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Args[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.Command) > 0 { - for iNdEx := len(m.Command) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Command[iNdEx]) - copy(dAtA[i:], m.Command[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Command[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *BuildRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SourceStrategyOptions != nil { - { - size, err := m.SourceStrategyOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.DockerStrategyOptions != nil { - { - size, err := m.DockerStrategyOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.TriggeredBy) > 0 { - for iNdEx := len(m.TriggeredBy) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TriggeredBy[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.LastVersion != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.LastVersion)) - i-- - dAtA[i] = 0x30 - } - if m.Binary != nil { - { - size, err := m.Binary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.TriggeredByImage != nil { - { - size, err := m.TriggeredByImage.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Revision != nil { - { - size, err := m.Revision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConfigMaps) > 0 { - for iNdEx := len(m.ConfigMaps) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConfigMaps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if m.SourceSecret != nil { - { - size, err := m.SourceSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - i -= len(m.ContextDir) - copy(dAtA[i:], m.ContextDir) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ContextDir))) - i-- - dAtA[i] = 0x32 - if len(m.Images) > 0 { - for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if m.Git != nil { - { - size, err := m.Git.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Dockerfile != nil { - i -= len(*m.Dockerfile) - copy(dAtA[i:], *m.Dockerfile) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Dockerfile))) - i-- - dAtA[i] = 0x1a - } - if m.Binary != nil { - { - size, err := m.Binary.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TriggeredBy) > 0 { - for iNdEx := len(m.TriggeredBy) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TriggeredBy[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.CommonSpec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - } - i -= len(m.LogSnippet) - copy(dAtA[i:], m.LogSnippet) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LogSnippet))) - i-- - dAtA[i] = 0x62 - if len(m.Stages) > 0 { - for iNdEx := len(m.Stages) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Stages[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - if m.Config != nil { - { - size, err := m.Config.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - i -= len(m.OutputDockerImageReference) - copy(dAtA[i:], m.OutputDockerImageReference) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.OutputDockerImageReference))) - i-- - dAtA[i] = 0x42 - i = encodeVarintGenerated(dAtA, i, uint64(m.Duration)) - i-- - dAtA[i] = 0x38 - if m.CompletionTimestamp != nil { - { - size, err := m.CompletionTimestamp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.StartTimestamp != nil { - { - size, err := m.StartTimestamp.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x22 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x1a - i-- - if m.Cancelled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Phase) - copy(dAtA[i:], m.Phase) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildStatusOutput) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildStatusOutput) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildStatusOutput) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *BuildStatusOutputTo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildStatusOutputTo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildStatusOutputTo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.ImageDigest) - copy(dAtA[i:], m.ImageDigest) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImageDigest))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.JenkinsPipelineStrategy != nil { - { - size, err := m.JenkinsPipelineStrategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.CustomStrategy != nil { - { - size, err := m.CustomStrategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.SourceStrategy != nil { - { - size, err := m.SourceStrategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.DockerStrategy != nil { - { - size, err := m.DockerStrategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildTriggerCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildTriggerCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildTriggerCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BitbucketWebHook != nil { - { - size, err := m.BitbucketWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.GitLabWebHook != nil { - { - size, err := m.GitLabWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ImageChangeBuild != nil { - { - size, err := m.ImageChangeBuild.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.GitHubWebHook != nil { - { - size, err := m.GitHubWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.GenericWebHook != nil { - { - size, err := m.GenericWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildTriggerPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildTriggerPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildTriggerPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.BitbucketWebHook != nil { - { - size, err := m.BitbucketWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.GitLabWebHook != nil { - { - size, err := m.GitLabWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.ImageChange != nil { - { - size, err := m.ImageChange.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.GenericWebHook != nil { - { - size, err := m.GenericWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.GitHubWebHook != nil { - { - size, err := m.GitHubWebHook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildVolume) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildVolume) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Mounts) > 0 { - for iNdEx := len(m.Mounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Mounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildVolumeMount) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildVolumeMount) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildVolumeMount) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DestinationPath) - copy(dAtA[i:], m.DestinationPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationPath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BuildVolumeSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BuildVolumeSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BuildVolumeSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CSI != nil { - { - size, err := m.CSI.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ConfigMap != nil { - { - size, err := m.ConfigMap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Secret != nil { - { - size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CommonSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommonSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommonSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MountTrustedCA != nil { - i-- - if *m.MountTrustedCA { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.NodeSelector != nil { - { - size, err := m.NodeSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.CompletionDeadlineSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.CompletionDeadlineSeconds)) - i-- - dAtA[i] = 0x40 - } - { - size, err := m.PostCommit.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size, err := m.Resources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size, err := m.Output.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - { - size, err := m.Strategy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - if m.Revision != nil { - { - size, err := m.Revision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - { - size, err := m.Source.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.ServiceAccount) - copy(dAtA[i:], m.ServiceAccount) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccount))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CommonWebHookCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CommonWebHookCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CommonWebHookCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x12 - if m.Revision != nil { - { - size, err := m.Revision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ConfigMapBuildSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigMapBuildSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigMapBuildSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DestinationDir) - copy(dAtA[i:], m.DestinationDir) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationDir))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ConfigMap.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomBuildStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomBuildStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomBuildStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.BuildAPIVersion) - copy(dAtA[i:], m.BuildAPIVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.BuildAPIVersion))) - i-- - dAtA[i] = 0x3a - if len(m.Secrets) > 0 { - for iNdEx := len(m.Secrets) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Secrets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - i-- - if m.ForcePull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - i-- - if m.ExposeDockerSocket { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.PullSecret != nil { - { - size, err := m.PullSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *DockerBuildStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DockerBuildStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DockerBuildStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Volumes) > 0 { - for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.ImageOptimizationPolicy != nil { - i -= len(*m.ImageOptimizationPolicy) - copy(dAtA[i:], *m.ImageOptimizationPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.ImageOptimizationPolicy))) - i-- - dAtA[i] = 0x42 - } - if len(m.BuildArgs) > 0 { - for iNdEx := len(m.BuildArgs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BuildArgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - i -= len(m.DockerfilePath) - copy(dAtA[i:], m.DockerfilePath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerfilePath))) - i-- - dAtA[i] = 0x32 - i-- - if m.ForcePull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - i-- - if m.NoCache { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - if m.PullSecret != nil { - { - size, err := m.PullSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *DockerStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DockerStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DockerStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NoCache != nil { - i-- - if *m.NoCache { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.BuildArgs) > 0 { - for iNdEx := len(m.BuildArgs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BuildArgs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *GenericWebHookCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenericWebHookCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenericWebHookCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x12 - if m.Revision != nil { - { - size, err := m.Revision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GenericWebHookEvent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GenericWebHookEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GenericWebHookEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.DockerStrategyOptions != nil { - { - size, err := m.DockerStrategyOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Git != nil { - { - size, err := m.Git.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GitBuildSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitBuildSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitBuildSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ProxyConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Ref) - copy(dAtA[i:], m.Ref) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Ref))) - i-- - dAtA[i] = 0x12 - i -= len(m.URI) - copy(dAtA[i:], m.URI) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URI))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GitHubWebHookCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitHubWebHookCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitHubWebHookCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x12 - if m.Revision != nil { - { - size, err := m.Revision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GitInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Refs) > 0 { - for iNdEx := len(m.Refs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Refs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.GitSourceRevision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.GitBuildSource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GitLabWebHookCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitLabWebHookCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitLabWebHookCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.CommonWebHookCause.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GitRefInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitRefInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitRefInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.GitSourceRevision.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.GitBuildSource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GitSourceRevision) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GitSourceRevision) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GitSourceRevision) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x22 - { - size, err := m.Committer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Author.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Commit) - copy(dAtA[i:], m.Commit) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Commit))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageChangeCause) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageChangeCause) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageChangeCause) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.FromRef != nil { - { - size, err := m.FromRef.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.ImageID) - copy(dAtA[i:], m.ImageID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImageID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageChangeTrigger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageChangeTrigger) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageChangeTrigger) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.Paused { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.LastTriggeredImageID) - copy(dAtA[i:], m.LastTriggeredImageID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LastTriggeredImageID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageChangeTriggerStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageChangeTriggerStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageChangeTriggerStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LastTriggerTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.LastTriggeredImageID) - copy(dAtA[i:], m.LastTriggeredImageID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.LastTriggeredImageID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageLabel) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageLabel) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageLabel) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.As) > 0 { - for iNdEx := len(m.As) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.As[iNdEx]) - copy(dAtA[i:], m.As[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.As[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if m.PullSecret != nil { - { - size, err := m.PullSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Paths[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageSourcePath) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageSourcePath) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageSourcePath) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DestinationDir) - copy(dAtA[i:], m.DestinationDir) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationDir))) - i-- - dAtA[i] = 0x12 - i -= len(m.SourcePath) - copy(dAtA[i:], m.SourcePath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SourcePath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamTagReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamTagReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamTagReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *JenkinsPipelineBuildStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JenkinsPipelineBuildStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JenkinsPipelineBuildStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.Jenkinsfile) - copy(dAtA[i:], m.Jenkinsfile) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Jenkinsfile))) - i-- - dAtA[i] = 0x12 - i -= len(m.JenkinsfilePath) - copy(dAtA[i:], m.JenkinsfilePath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.JenkinsfilePath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m OptionalNodeSelector) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m OptionalNodeSelector) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m OptionalNodeSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - keysForItems := make([]string, 0, len(m)) - for k := range m { - keysForItems = append(keysForItems, string(k)) - } - sort.Strings(keysForItems) - for iNdEx := len(keysForItems) - 1; iNdEx >= 0; iNdEx-- { - v := m[string(keysForItems[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForItems[iNdEx]) - copy(dAtA[i:], keysForItems[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForItems[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ProxyConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProxyConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProxyConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NoProxy != nil { - i -= len(*m.NoProxy) - copy(dAtA[i:], *m.NoProxy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.NoProxy))) - i-- - dAtA[i] = 0x2a - } - if m.HTTPSProxy != nil { - i -= len(*m.HTTPSProxy) - copy(dAtA[i:], *m.HTTPSProxy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HTTPSProxy))) - i-- - dAtA[i] = 0x22 - } - if m.HTTPProxy != nil { - i -= len(*m.HTTPProxy) - copy(dAtA[i:], *m.HTTPProxy) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.HTTPProxy))) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} - -func (m *SecretBuildSource) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretBuildSource) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretBuildSource) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DestinationDir) - copy(dAtA[i:], m.DestinationDir) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationDir))) - i-- - dAtA[i] = 0x12 - { - size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecretLocalReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretLocalReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretLocalReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecretSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.MountPath) - copy(dAtA[i:], m.MountPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MountPath))) - i-- - dAtA[i] = 0x12 - { - size, err := m.SecretSource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SourceBuildStrategy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SourceBuildStrategy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SourceBuildStrategy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Volumes) > 0 { - for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Volumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - i-- - if m.ForcePull { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - if m.Incremental != nil { - i-- - if *m.Incremental { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - i -= len(m.Scripts) - copy(dAtA[i:], m.Scripts) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scripts))) - i-- - dAtA[i] = 0x22 - if len(m.Env) > 0 { - for iNdEx := len(m.Env) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Env[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.PullSecret != nil { - { - size, err := m.PullSecret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SourceControlUser) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SourceControlUser) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SourceControlUser) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Email) - copy(dAtA[i:], m.Email) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Email))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SourceRevision) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SourceRevision) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SourceRevision) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Git != nil { - { - size, err := m.Git.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SourceStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SourceStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SourceStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Incremental != nil { - i-- - if *m.Incremental { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *StageInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StageInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StageInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Steps) > 0 { - for iNdEx := len(m.Steps) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Steps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.DurationMilliseconds)) - i-- - dAtA[i] = 0x18 - { - size, err := m.StartTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *StepInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *StepInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *StepInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.DurationMilliseconds)) - i-- - dAtA[i] = 0x18 - { - size, err := m.StartTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *WebHookTrigger) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebHookTrigger) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebHookTrigger) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SecretReference != nil { - { - size, err := m.SecretReference.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - i-- - if m.AllowEnv { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BinaryBuildRequestOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.AsFile) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Commit) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.AuthorName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.AuthorEmail) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CommitterName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CommitterEmail) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BinaryBuildSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.AsFile) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BitbucketWebHookCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CommonWebHookCause.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Build) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastUpdateTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildConfigList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildConfigSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Triggers) > 0 { - for _, e := range m.Triggers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.RunPolicy) - n += 1 + l + sovGenerated(uint64(l)) - l = m.CommonSpec.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.SuccessfulBuildsHistoryLimit != nil { - n += 1 + sovGenerated(uint64(*m.SuccessfulBuildsHistoryLimit)) - } - if m.FailedBuildsHistoryLimit != nil { - n += 1 + sovGenerated(uint64(*m.FailedBuildsHistoryLimit)) - } - return n -} - -func (m *BuildConfigStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovGenerated(uint64(m.LastVersion)) - if len(m.ImageChangeTriggers) > 0 { - for _, e := range m.ImageChangeTriggers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildLog) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *BuildLogOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Container) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - if m.SinceSeconds != nil { - n += 1 + sovGenerated(uint64(*m.SinceSeconds)) - } - if m.SinceTime != nil { - l = m.SinceTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if m.TailLines != nil { - n += 1 + sovGenerated(uint64(*m.TailLines)) - } - if m.LimitBytes != nil { - n += 1 + sovGenerated(uint64(*m.LimitBytes)) - } - n += 2 - if m.Version != nil { - n += 1 + sovGenerated(uint64(*m.Version)) - } - n += 2 - return n -} - -func (m *BuildOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.PushSecret != nil { - l = m.PushSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ImageLabels) > 0 { - for _, e := range m.ImageLabels { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildPostCommitSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Command) > 0 { - for _, s := range m.Command { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Args) > 0 { - for _, s := range m.Args { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Script) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Revision != nil { - l = m.Revision.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.TriggeredByImage != nil { - l = m.TriggeredByImage.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Binary != nil { - l = m.Binary.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.LastVersion != nil { - n += 1 + sovGenerated(uint64(*m.LastVersion)) - } - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.TriggeredBy) > 0 { - for _, e := range m.TriggeredBy { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.DockerStrategyOptions != nil { - l = m.DockerStrategyOptions.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.SourceStrategyOptions != nil { - l = m.SourceStrategyOptions.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *BuildSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Binary != nil { - l = m.Binary.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Dockerfile != nil { - l = len(*m.Dockerfile) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Git != nil { - l = m.Git.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Images) > 0 { - for _, e := range m.Images { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ContextDir) - n += 1 + l + sovGenerated(uint64(l)) - if m.SourceSecret != nil { - l = m.SourceSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.ConfigMaps) > 0 { - for _, e := range m.ConfigMaps { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CommonSpec.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.TriggeredBy) > 0 { - for _, e := range m.TriggeredBy { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if m.StartTimestamp != nil { - l = m.StartTimestamp.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CompletionTimestamp != nil { - l = m.CompletionTimestamp.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Duration)) - l = len(m.OutputDockerImageReference) - n += 1 + l + sovGenerated(uint64(l)) - if m.Config != nil { - l = m.Config.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Output.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Stages) > 0 { - for _, e := range m.Stages { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.LogSnippet) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildStatusOutput) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *BuildStatusOutputTo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ImageDigest) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.DockerStrategy != nil { - l = m.DockerStrategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.SourceStrategy != nil { - l = m.SourceStrategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CustomStrategy != nil { - l = m.CustomStrategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.JenkinsPipelineStrategy != nil { - l = m.JenkinsPipelineStrategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *BuildTriggerCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if m.GenericWebHook != nil { - l = m.GenericWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GitHubWebHook != nil { - l = m.GitHubWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ImageChangeBuild != nil { - l = m.ImageChangeBuild.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GitLabWebHook != nil { - l = m.GitLabWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.BitbucketWebHook != nil { - l = m.BitbucketWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *BuildTriggerPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.GitHubWebHook != nil { - l = m.GitHubWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GenericWebHook != nil { - l = m.GenericWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ImageChange != nil { - l = m.ImageChange.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.GitLabWebHook != nil { - l = m.GitLabWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.BitbucketWebHook != nil { - l = m.BitbucketWebHook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *BuildVolume) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Source.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Mounts) > 0 { - for _, e := range m.Mounts { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BuildVolumeMount) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DestinationPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BuildVolumeSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Secret != nil { - l = m.Secret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.ConfigMap != nil { - l = m.ConfigMap.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CSI != nil { - l = m.CSI.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CommonSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ServiceAccount) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Source.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Revision != nil { - l = m.Revision.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.Strategy.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Output.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Resources.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.PostCommit.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.CompletionDeadlineSeconds != nil { - n += 1 + sovGenerated(uint64(*m.CompletionDeadlineSeconds)) - } - if m.NodeSelector != nil { - l = m.NodeSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.MountTrustedCA != nil { - n += 2 - } - return n -} - -func (m *CommonWebHookCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Revision != nil { - l = m.Revision.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Secret) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConfigMapBuildSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ConfigMap.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DestinationDir) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomBuildStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.PullSecret != nil { - l = m.PullSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - n += 2 - if len(m.Secrets) > 0 { - for _, e := range m.Secrets { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.BuildAPIVersion) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *DockerBuildStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.PullSecret != nil { - l = m.PullSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - l = len(m.DockerfilePath) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.BuildArgs) > 0 { - for _, e := range m.BuildArgs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.ImageOptimizationPolicy != nil { - l = len(*m.ImageOptimizationPolicy) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Volumes) > 0 { - for _, e := range m.Volumes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *DockerStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.BuildArgs) > 0 { - for _, e := range m.BuildArgs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.NoCache != nil { - n += 2 - } - return n -} - -func (m *GenericWebHookCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Revision != nil { - l = m.Revision.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Secret) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GenericWebHookEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Git != nil { - l = m.Git.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.DockerStrategyOptions != nil { - l = m.DockerStrategyOptions.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *GitBuildSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.URI) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Ref) - n += 1 + l + sovGenerated(uint64(l)) - l = m.ProxyConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GitHubWebHookCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Revision != nil { - l = m.Revision.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Secret) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GitInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.GitBuildSource.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.GitSourceRevision.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Refs) > 0 { - for _, e := range m.Refs { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *GitLabWebHookCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.CommonWebHookCause.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GitRefInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.GitBuildSource.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.GitSourceRevision.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *GitSourceRevision) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Commit) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Author.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Committer.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageChangeCause) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ImageID) - n += 1 + l + sovGenerated(uint64(l)) - if m.FromRef != nil { - l = m.FromRef.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ImageChangeTrigger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LastTriggeredImageID) - n += 1 + l + sovGenerated(uint64(l)) - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - return n -} - -func (m *ImageChangeTriggerStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.LastTriggeredImageID) - n += 1 + l + sovGenerated(uint64(l)) - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTriggerTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageLabel) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Paths) > 0 { - for _, e := range m.Paths { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.PullSecret != nil { - l = m.PullSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.As) > 0 { - for _, s := range m.As { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageSourcePath) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SourcePath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DestinationDir) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamTagReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JenkinsPipelineBuildStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.JenkinsfilePath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Jenkinsfile) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m OptionalNodeSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for k, v := range m { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *ProxyConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HTTPProxy != nil { - l = len(*m.HTTPProxy) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.HTTPSProxy != nil { - l = len(*m.HTTPSProxy) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.NoProxy != nil { - l = len(*m.NoProxy) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *SecretBuildSource) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Secret.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DestinationDir) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SecretLocalReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SecretSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.SecretSource.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.MountPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SourceBuildStrategy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.PullSecret != nil { - l = m.PullSecret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Env) > 0 { - for _, e := range m.Env { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Scripts) - n += 1 + l + sovGenerated(uint64(l)) - if m.Incremental != nil { - n += 2 - } - n += 2 - if len(m.Volumes) > 0 { - for _, e := range m.Volumes { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SourceControlUser) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Email) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SourceRevision) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Git != nil { - l = m.Git.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *SourceStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Incremental != nil { - n += 2 - } - return n -} - -func (m *StageInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.DurationMilliseconds)) - if len(m.Steps) > 0 { - for _, e := range m.Steps { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *StepInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.StartTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.DurationMilliseconds)) - return n -} - -func (m *WebHookTrigger) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Secret) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.SecretReference != nil { - l = m.SecretReference.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *BinaryBuildRequestOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BinaryBuildRequestOptions{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `AsFile:` + fmt.Sprintf("%v", this.AsFile) + `,`, - `Commit:` + fmt.Sprintf("%v", this.Commit) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `AuthorName:` + fmt.Sprintf("%v", this.AuthorName) + `,`, - `AuthorEmail:` + fmt.Sprintf("%v", this.AuthorEmail) + `,`, - `CommitterName:` + fmt.Sprintf("%v", this.CommitterName) + `,`, - `CommitterEmail:` + fmt.Sprintf("%v", this.CommitterEmail) + `,`, - `}`, - }, "") - return s -} -func (this *BinaryBuildSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BinaryBuildSource{`, - `AsFile:` + fmt.Sprintf("%v", this.AsFile) + `,`, - `}`, - }, "") - return s -} -func (this *BitbucketWebHookCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BitbucketWebHookCause{`, - `CommonWebHookCause:` + strings.Replace(strings.Replace(this.CommonWebHookCause.String(), "CommonWebHookCause", "CommonWebHookCause", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *Build) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Build{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "BuildSpec", "BuildSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "BuildStatus", "BuildStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildConfig{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "BuildConfigSpec", "BuildConfigSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "BuildConfigStatus", "BuildConfigStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildConfigList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]BuildConfig{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "BuildConfig", "BuildConfig", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&BuildConfigList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *BuildConfigSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForTriggers := "[]BuildTriggerPolicy{" - for _, f := range this.Triggers { - repeatedStringForTriggers += strings.Replace(strings.Replace(f.String(), "BuildTriggerPolicy", "BuildTriggerPolicy", 1), `&`, ``, 1) + "," - } - repeatedStringForTriggers += "}" - s := strings.Join([]string{`&BuildConfigSpec{`, - `Triggers:` + repeatedStringForTriggers + `,`, - `RunPolicy:` + fmt.Sprintf("%v", this.RunPolicy) + `,`, - `CommonSpec:` + strings.Replace(strings.Replace(this.CommonSpec.String(), "CommonSpec", "CommonSpec", 1), `&`, ``, 1) + `,`, - `SuccessfulBuildsHistoryLimit:` + valueToStringGenerated(this.SuccessfulBuildsHistoryLimit) + `,`, - `FailedBuildsHistoryLimit:` + valueToStringGenerated(this.FailedBuildsHistoryLimit) + `,`, - `}`, - }, "") - return s -} -func (this *BuildConfigStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForImageChangeTriggers := "[]ImageChangeTriggerStatus{" - for _, f := range this.ImageChangeTriggers { - repeatedStringForImageChangeTriggers += strings.Replace(strings.Replace(f.String(), "ImageChangeTriggerStatus", "ImageChangeTriggerStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForImageChangeTriggers += "}" - s := strings.Join([]string{`&BuildConfigStatus{`, - `LastVersion:` + fmt.Sprintf("%v", this.LastVersion) + `,`, - `ImageChangeTriggers:` + repeatedStringForImageChangeTriggers + `,`, - `}`, - }, "") - return s -} -func (this *BuildList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Build{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Build", "Build", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&BuildList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *BuildLog) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildLog{`, - `}`, - }, "") - return s -} -func (this *BuildLogOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildLogOptions{`, - `Container:` + fmt.Sprintf("%v", this.Container) + `,`, - `Follow:` + fmt.Sprintf("%v", this.Follow) + `,`, - `Previous:` + fmt.Sprintf("%v", this.Previous) + `,`, - `SinceSeconds:` + valueToStringGenerated(this.SinceSeconds) + `,`, - `SinceTime:` + strings.Replace(fmt.Sprintf("%v", this.SinceTime), "Time", "v1.Time", 1) + `,`, - `Timestamps:` + fmt.Sprintf("%v", this.Timestamps) + `,`, - `TailLines:` + valueToStringGenerated(this.TailLines) + `,`, - `LimitBytes:` + valueToStringGenerated(this.LimitBytes) + `,`, - `NoWait:` + fmt.Sprintf("%v", this.NoWait) + `,`, - `Version:` + valueToStringGenerated(this.Version) + `,`, - `InsecureSkipTLSVerifyBackend:` + fmt.Sprintf("%v", this.InsecureSkipTLSVerifyBackend) + `,`, - `}`, - }, "") - return s -} -func (this *BuildOutput) String() string { - if this == nil { - return "nil" - } - repeatedStringForImageLabels := "[]ImageLabel{" - for _, f := range this.ImageLabels { - repeatedStringForImageLabels += strings.Replace(strings.Replace(f.String(), "ImageLabel", "ImageLabel", 1), `&`, ``, 1) + "," - } - repeatedStringForImageLabels += "}" - s := strings.Join([]string{`&BuildOutput{`, - `To:` + strings.Replace(fmt.Sprintf("%v", this.To), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `PushSecret:` + strings.Replace(fmt.Sprintf("%v", this.PushSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `ImageLabels:` + repeatedStringForImageLabels + `,`, - `}`, - }, "") - return s -} -func (this *BuildPostCommitSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildPostCommitSpec{`, - `Command:` + fmt.Sprintf("%v", this.Command) + `,`, - `Args:` + fmt.Sprintf("%v", this.Args) + `,`, - `Script:` + fmt.Sprintf("%v", this.Script) + `,`, - `}`, - }, "") - return s -} -func (this *BuildRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - repeatedStringForTriggeredBy := "[]BuildTriggerCause{" - for _, f := range this.TriggeredBy { - repeatedStringForTriggeredBy += strings.Replace(strings.Replace(f.String(), "BuildTriggerCause", "BuildTriggerCause", 1), `&`, ``, 1) + "," - } - repeatedStringForTriggeredBy += "}" - s := strings.Join([]string{`&BuildRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Revision:` + strings.Replace(this.Revision.String(), "SourceRevision", "SourceRevision", 1) + `,`, - `TriggeredByImage:` + strings.Replace(fmt.Sprintf("%v", this.TriggeredByImage), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `From:` + strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `Binary:` + strings.Replace(this.Binary.String(), "BinaryBuildSource", "BinaryBuildSource", 1) + `,`, - `LastVersion:` + valueToStringGenerated(this.LastVersion) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `TriggeredBy:` + repeatedStringForTriggeredBy + `,`, - `DockerStrategyOptions:` + strings.Replace(this.DockerStrategyOptions.String(), "DockerStrategyOptions", "DockerStrategyOptions", 1) + `,`, - `SourceStrategyOptions:` + strings.Replace(this.SourceStrategyOptions.String(), "SourceStrategyOptions", "SourceStrategyOptions", 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildSource) String() string { - if this == nil { - return "nil" - } - repeatedStringForImages := "[]ImageSource{" - for _, f := range this.Images { - repeatedStringForImages += strings.Replace(strings.Replace(f.String(), "ImageSource", "ImageSource", 1), `&`, ``, 1) + "," - } - repeatedStringForImages += "}" - repeatedStringForSecrets := "[]SecretBuildSource{" - for _, f := range this.Secrets { - repeatedStringForSecrets += strings.Replace(strings.Replace(f.String(), "SecretBuildSource", "SecretBuildSource", 1), `&`, ``, 1) + "," - } - repeatedStringForSecrets += "}" - repeatedStringForConfigMaps := "[]ConfigMapBuildSource{" - for _, f := range this.ConfigMaps { - repeatedStringForConfigMaps += strings.Replace(strings.Replace(f.String(), "ConfigMapBuildSource", "ConfigMapBuildSource", 1), `&`, ``, 1) + "," - } - repeatedStringForConfigMaps += "}" - s := strings.Join([]string{`&BuildSource{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Binary:` + strings.Replace(this.Binary.String(), "BinaryBuildSource", "BinaryBuildSource", 1) + `,`, - `Dockerfile:` + valueToStringGenerated(this.Dockerfile) + `,`, - `Git:` + strings.Replace(this.Git.String(), "GitBuildSource", "GitBuildSource", 1) + `,`, - `Images:` + repeatedStringForImages + `,`, - `ContextDir:` + fmt.Sprintf("%v", this.ContextDir) + `,`, - `SourceSecret:` + strings.Replace(fmt.Sprintf("%v", this.SourceSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `Secrets:` + repeatedStringForSecrets + `,`, - `ConfigMaps:` + repeatedStringForConfigMaps + `,`, - `}`, - }, "") - return s -} -func (this *BuildSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForTriggeredBy := "[]BuildTriggerCause{" - for _, f := range this.TriggeredBy { - repeatedStringForTriggeredBy += strings.Replace(strings.Replace(f.String(), "BuildTriggerCause", "BuildTriggerCause", 1), `&`, ``, 1) + "," - } - repeatedStringForTriggeredBy += "}" - s := strings.Join([]string{`&BuildSpec{`, - `CommonSpec:` + strings.Replace(strings.Replace(this.CommonSpec.String(), "CommonSpec", "CommonSpec", 1), `&`, ``, 1) + `,`, - `TriggeredBy:` + repeatedStringForTriggeredBy + `,`, - `}`, - }, "") - return s -} -func (this *BuildStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForStages := "[]StageInfo{" - for _, f := range this.Stages { - repeatedStringForStages += strings.Replace(strings.Replace(f.String(), "StageInfo", "StageInfo", 1), `&`, ``, 1) + "," - } - repeatedStringForStages += "}" - repeatedStringForConditions := "[]BuildCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "BuildCondition", "BuildCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&BuildStatus{`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `Cancelled:` + fmt.Sprintf("%v", this.Cancelled) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `StartTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.StartTimestamp), "Time", "v1.Time", 1) + `,`, - `CompletionTimestamp:` + strings.Replace(fmt.Sprintf("%v", this.CompletionTimestamp), "Time", "v1.Time", 1) + `,`, - `Duration:` + fmt.Sprintf("%v", this.Duration) + `,`, - `OutputDockerImageReference:` + fmt.Sprintf("%v", this.OutputDockerImageReference) + `,`, - `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `Output:` + strings.Replace(strings.Replace(this.Output.String(), "BuildStatusOutput", "BuildStatusOutput", 1), `&`, ``, 1) + `,`, - `Stages:` + repeatedStringForStages + `,`, - `LogSnippet:` + fmt.Sprintf("%v", this.LogSnippet) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *BuildStatusOutput) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildStatusOutput{`, - `To:` + strings.Replace(this.To.String(), "BuildStatusOutputTo", "BuildStatusOutputTo", 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildStatusOutputTo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildStatusOutputTo{`, - `ImageDigest:` + fmt.Sprintf("%v", this.ImageDigest) + `,`, - `}`, - }, "") - return s -} -func (this *BuildStrategy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildStrategy{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `DockerStrategy:` + strings.Replace(this.DockerStrategy.String(), "DockerBuildStrategy", "DockerBuildStrategy", 1) + `,`, - `SourceStrategy:` + strings.Replace(this.SourceStrategy.String(), "SourceBuildStrategy", "SourceBuildStrategy", 1) + `,`, - `CustomStrategy:` + strings.Replace(this.CustomStrategy.String(), "CustomBuildStrategy", "CustomBuildStrategy", 1) + `,`, - `JenkinsPipelineStrategy:` + strings.Replace(this.JenkinsPipelineStrategy.String(), "JenkinsPipelineBuildStrategy", "JenkinsPipelineBuildStrategy", 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildTriggerCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildTriggerCause{`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `GenericWebHook:` + strings.Replace(this.GenericWebHook.String(), "GenericWebHookCause", "GenericWebHookCause", 1) + `,`, - `GitHubWebHook:` + strings.Replace(this.GitHubWebHook.String(), "GitHubWebHookCause", "GitHubWebHookCause", 1) + `,`, - `ImageChangeBuild:` + strings.Replace(this.ImageChangeBuild.String(), "ImageChangeCause", "ImageChangeCause", 1) + `,`, - `GitLabWebHook:` + strings.Replace(this.GitLabWebHook.String(), "GitLabWebHookCause", "GitLabWebHookCause", 1) + `,`, - `BitbucketWebHook:` + strings.Replace(this.BitbucketWebHook.String(), "BitbucketWebHookCause", "BitbucketWebHookCause", 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildTriggerPolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildTriggerPolicy{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `GitHubWebHook:` + strings.Replace(this.GitHubWebHook.String(), "WebHookTrigger", "WebHookTrigger", 1) + `,`, - `GenericWebHook:` + strings.Replace(this.GenericWebHook.String(), "WebHookTrigger", "WebHookTrigger", 1) + `,`, - `ImageChange:` + strings.Replace(this.ImageChange.String(), "ImageChangeTrigger", "ImageChangeTrigger", 1) + `,`, - `GitLabWebHook:` + strings.Replace(this.GitLabWebHook.String(), "WebHookTrigger", "WebHookTrigger", 1) + `,`, - `BitbucketWebHook:` + strings.Replace(this.BitbucketWebHook.String(), "WebHookTrigger", "WebHookTrigger", 1) + `,`, - `}`, - }, "") - return s -} -func (this *BuildVolume) String() string { - if this == nil { - return "nil" - } - repeatedStringForMounts := "[]BuildVolumeMount{" - for _, f := range this.Mounts { - repeatedStringForMounts += strings.Replace(strings.Replace(f.String(), "BuildVolumeMount", "BuildVolumeMount", 1), `&`, ``, 1) + "," - } - repeatedStringForMounts += "}" - s := strings.Join([]string{`&BuildVolume{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Source:` + strings.Replace(strings.Replace(this.Source.String(), "BuildVolumeSource", "BuildVolumeSource", 1), `&`, ``, 1) + `,`, - `Mounts:` + repeatedStringForMounts + `,`, - `}`, - }, "") - return s -} -func (this *BuildVolumeMount) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildVolumeMount{`, - `DestinationPath:` + fmt.Sprintf("%v", this.DestinationPath) + `,`, - `}`, - }, "") - return s -} -func (this *BuildVolumeSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BuildVolumeSource{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "SecretVolumeSource", "v11.SecretVolumeSource", 1) + `,`, - `ConfigMap:` + strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "ConfigMapVolumeSource", "v11.ConfigMapVolumeSource", 1) + `,`, - `CSI:` + strings.Replace(fmt.Sprintf("%v", this.CSI), "CSIVolumeSource", "v11.CSIVolumeSource", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CommonSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CommonSpec{`, - `ServiceAccount:` + fmt.Sprintf("%v", this.ServiceAccount) + `,`, - `Source:` + strings.Replace(strings.Replace(this.Source.String(), "BuildSource", "BuildSource", 1), `&`, ``, 1) + `,`, - `Revision:` + strings.Replace(this.Revision.String(), "SourceRevision", "SourceRevision", 1) + `,`, - `Strategy:` + strings.Replace(strings.Replace(this.Strategy.String(), "BuildStrategy", "BuildStrategy", 1), `&`, ``, 1) + `,`, - `Output:` + strings.Replace(strings.Replace(this.Output.String(), "BuildOutput", "BuildOutput", 1), `&`, ``, 1) + `,`, - `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "ResourceRequirements", "v11.ResourceRequirements", 1), `&`, ``, 1) + `,`, - `PostCommit:` + strings.Replace(strings.Replace(this.PostCommit.String(), "BuildPostCommitSpec", "BuildPostCommitSpec", 1), `&`, ``, 1) + `,`, - `CompletionDeadlineSeconds:` + valueToStringGenerated(this.CompletionDeadlineSeconds) + `,`, - `NodeSelector:` + strings.Replace(fmt.Sprintf("%v", this.NodeSelector), "OptionalNodeSelector", "OptionalNodeSelector", 1) + `,`, - `MountTrustedCA:` + valueToStringGenerated(this.MountTrustedCA) + `,`, - `}`, - }, "") - return s -} -func (this *CommonWebHookCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CommonWebHookCause{`, - `Revision:` + strings.Replace(this.Revision.String(), "SourceRevision", "SourceRevision", 1) + `,`, - `Secret:` + fmt.Sprintf("%v", this.Secret) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigMapBuildSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConfigMapBuildSource{`, - `ConfigMap:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConfigMap), "LocalObjectReference", "v11.LocalObjectReference", 1), `&`, ``, 1) + `,`, - `DestinationDir:` + fmt.Sprintf("%v", this.DestinationDir) + `,`, - `}`, - }, "") - return s -} -func (this *CustomBuildStrategy) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - repeatedStringForSecrets := "[]SecretSpec{" - for _, f := range this.Secrets { - repeatedStringForSecrets += strings.Replace(strings.Replace(f.String(), "SecretSpec", "SecretSpec", 1), `&`, ``, 1) + "," - } - repeatedStringForSecrets += "}" - s := strings.Join([]string{`&CustomBuildStrategy{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `PullSecret:` + strings.Replace(fmt.Sprintf("%v", this.PullSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `ExposeDockerSocket:` + fmt.Sprintf("%v", this.ExposeDockerSocket) + `,`, - `ForcePull:` + fmt.Sprintf("%v", this.ForcePull) + `,`, - `Secrets:` + repeatedStringForSecrets + `,`, - `BuildAPIVersion:` + fmt.Sprintf("%v", this.BuildAPIVersion) + `,`, - `}`, - }, "") - return s -} -func (this *DockerBuildStrategy) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - repeatedStringForBuildArgs := "[]EnvVar{" - for _, f := range this.BuildArgs { - repeatedStringForBuildArgs += fmt.Sprintf("%v", f) + "," - } - repeatedStringForBuildArgs += "}" - repeatedStringForVolumes := "[]BuildVolume{" - for _, f := range this.Volumes { - repeatedStringForVolumes += strings.Replace(strings.Replace(f.String(), "BuildVolume", "BuildVolume", 1), `&`, ``, 1) + "," - } - repeatedStringForVolumes += "}" - s := strings.Join([]string{`&DockerBuildStrategy{`, - `From:` + strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `PullSecret:` + strings.Replace(fmt.Sprintf("%v", this.PullSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `NoCache:` + fmt.Sprintf("%v", this.NoCache) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `ForcePull:` + fmt.Sprintf("%v", this.ForcePull) + `,`, - `DockerfilePath:` + fmt.Sprintf("%v", this.DockerfilePath) + `,`, - `BuildArgs:` + repeatedStringForBuildArgs + `,`, - `ImageOptimizationPolicy:` + valueToStringGenerated(this.ImageOptimizationPolicy) + `,`, - `Volumes:` + repeatedStringForVolumes + `,`, - `}`, - }, "") - return s -} -func (this *DockerStrategyOptions) String() string { - if this == nil { - return "nil" - } - repeatedStringForBuildArgs := "[]EnvVar{" - for _, f := range this.BuildArgs { - repeatedStringForBuildArgs += fmt.Sprintf("%v", f) + "," - } - repeatedStringForBuildArgs += "}" - s := strings.Join([]string{`&DockerStrategyOptions{`, - `BuildArgs:` + repeatedStringForBuildArgs + `,`, - `NoCache:` + valueToStringGenerated(this.NoCache) + `,`, - `}`, - }, "") - return s -} -func (this *GenericWebHookCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GenericWebHookCause{`, - `Revision:` + strings.Replace(this.Revision.String(), "SourceRevision", "SourceRevision", 1) + `,`, - `Secret:` + fmt.Sprintf("%v", this.Secret) + `,`, - `}`, - }, "") - return s -} -func (this *GenericWebHookEvent) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - s := strings.Join([]string{`&GenericWebHookEvent{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Git:` + strings.Replace(this.Git.String(), "GitInfo", "GitInfo", 1) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `DockerStrategyOptions:` + strings.Replace(this.DockerStrategyOptions.String(), "DockerStrategyOptions", "DockerStrategyOptions", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitBuildSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitBuildSource{`, - `URI:` + fmt.Sprintf("%v", this.URI) + `,`, - `Ref:` + fmt.Sprintf("%v", this.Ref) + `,`, - `ProxyConfig:` + strings.Replace(strings.Replace(this.ProxyConfig.String(), "ProxyConfig", "ProxyConfig", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitHubWebHookCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitHubWebHookCause{`, - `Revision:` + strings.Replace(this.Revision.String(), "SourceRevision", "SourceRevision", 1) + `,`, - `Secret:` + fmt.Sprintf("%v", this.Secret) + `,`, - `}`, - }, "") - return s -} -func (this *GitInfo) String() string { - if this == nil { - return "nil" - } - repeatedStringForRefs := "[]GitRefInfo{" - for _, f := range this.Refs { - repeatedStringForRefs += strings.Replace(strings.Replace(f.String(), "GitRefInfo", "GitRefInfo", 1), `&`, ``, 1) + "," - } - repeatedStringForRefs += "}" - s := strings.Join([]string{`&GitInfo{`, - `GitBuildSource:` + strings.Replace(strings.Replace(this.GitBuildSource.String(), "GitBuildSource", "GitBuildSource", 1), `&`, ``, 1) + `,`, - `GitSourceRevision:` + strings.Replace(strings.Replace(this.GitSourceRevision.String(), "GitSourceRevision", "GitSourceRevision", 1), `&`, ``, 1) + `,`, - `Refs:` + repeatedStringForRefs + `,`, - `}`, - }, "") - return s -} -func (this *GitLabWebHookCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitLabWebHookCause{`, - `CommonWebHookCause:` + strings.Replace(strings.Replace(this.CommonWebHookCause.String(), "CommonWebHookCause", "CommonWebHookCause", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitRefInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitRefInfo{`, - `GitBuildSource:` + strings.Replace(strings.Replace(this.GitBuildSource.String(), "GitBuildSource", "GitBuildSource", 1), `&`, ``, 1) + `,`, - `GitSourceRevision:` + strings.Replace(strings.Replace(this.GitSourceRevision.String(), "GitSourceRevision", "GitSourceRevision", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *GitSourceRevision) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GitSourceRevision{`, - `Commit:` + fmt.Sprintf("%v", this.Commit) + `,`, - `Author:` + strings.Replace(strings.Replace(this.Author.String(), "SourceControlUser", "SourceControlUser", 1), `&`, ``, 1) + `,`, - `Committer:` + strings.Replace(strings.Replace(this.Committer.String(), "SourceControlUser", "SourceControlUser", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *ImageChangeCause) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageChangeCause{`, - `ImageID:` + fmt.Sprintf("%v", this.ImageID) + `,`, - `FromRef:` + strings.Replace(fmt.Sprintf("%v", this.FromRef), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageChangeTrigger) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageChangeTrigger{`, - `LastTriggeredImageID:` + fmt.Sprintf("%v", this.LastTriggeredImageID) + `,`, - `From:` + strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `Paused:` + fmt.Sprintf("%v", this.Paused) + `,`, - `}`, - }, "") - return s -} -func (this *ImageChangeTriggerStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageChangeTriggerStatus{`, - `LastTriggeredImageID:` + fmt.Sprintf("%v", this.LastTriggeredImageID) + `,`, - `From:` + strings.Replace(strings.Replace(this.From.String(), "ImageStreamTagReference", "ImageStreamTagReference", 1), `&`, ``, 1) + `,`, - `LastTriggerTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTriggerTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageLabel) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageLabel{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `}`, - }, "") - return s -} -func (this *ImageSource) String() string { - if this == nil { - return "nil" - } - repeatedStringForPaths := "[]ImageSourcePath{" - for _, f := range this.Paths { - repeatedStringForPaths += strings.Replace(strings.Replace(f.String(), "ImageSourcePath", "ImageSourcePath", 1), `&`, ``, 1) + "," - } - repeatedStringForPaths += "}" - s := strings.Join([]string{`&ImageSource{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `Paths:` + repeatedStringForPaths + `,`, - `PullSecret:` + strings.Replace(fmt.Sprintf("%v", this.PullSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `As:` + fmt.Sprintf("%v", this.As) + `,`, - `}`, - }, "") - return s -} -func (this *ImageSourcePath) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageSourcePath{`, - `SourcePath:` + fmt.Sprintf("%v", this.SourcePath) + `,`, - `DestinationDir:` + fmt.Sprintf("%v", this.DestinationDir) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamTagReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageStreamTagReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *JenkinsPipelineBuildStrategy) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - s := strings.Join([]string{`&JenkinsPipelineBuildStrategy{`, - `JenkinsfilePath:` + fmt.Sprintf("%v", this.JenkinsfilePath) + `,`, - `Jenkinsfile:` + fmt.Sprintf("%v", this.Jenkinsfile) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `}`, - }, "") - return s -} -func (this *ProxyConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ProxyConfig{`, - `HTTPProxy:` + valueToStringGenerated(this.HTTPProxy) + `,`, - `HTTPSProxy:` + valueToStringGenerated(this.HTTPSProxy) + `,`, - `NoProxy:` + valueToStringGenerated(this.NoProxy) + `,`, - `}`, - }, "") - return s -} -func (this *SecretBuildSource) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SecretBuildSource{`, - `Secret:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secret), "LocalObjectReference", "v11.LocalObjectReference", 1), `&`, ``, 1) + `,`, - `DestinationDir:` + fmt.Sprintf("%v", this.DestinationDir) + `,`, - `}`, - }, "") - return s -} -func (this *SecretLocalReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SecretLocalReference{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *SecretSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SecretSpec{`, - `SecretSource:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.SecretSource), "LocalObjectReference", "v11.LocalObjectReference", 1), `&`, ``, 1) + `,`, - `MountPath:` + fmt.Sprintf("%v", this.MountPath) + `,`, - `}`, - }, "") - return s -} -func (this *SourceBuildStrategy) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnv := "[]EnvVar{" - for _, f := range this.Env { - repeatedStringForEnv += fmt.Sprintf("%v", f) + "," - } - repeatedStringForEnv += "}" - repeatedStringForVolumes := "[]BuildVolume{" - for _, f := range this.Volumes { - repeatedStringForVolumes += strings.Replace(strings.Replace(f.String(), "BuildVolume", "BuildVolume", 1), `&`, ``, 1) + "," - } - repeatedStringForVolumes += "}" - s := strings.Join([]string{`&SourceBuildStrategy{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `PullSecret:` + strings.Replace(fmt.Sprintf("%v", this.PullSecret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `Env:` + repeatedStringForEnv + `,`, - `Scripts:` + fmt.Sprintf("%v", this.Scripts) + `,`, - `Incremental:` + valueToStringGenerated(this.Incremental) + `,`, - `ForcePull:` + fmt.Sprintf("%v", this.ForcePull) + `,`, - `Volumes:` + repeatedStringForVolumes + `,`, - `}`, - }, "") - return s -} -func (this *SourceControlUser) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SourceControlUser{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Email:` + fmt.Sprintf("%v", this.Email) + `,`, - `}`, - }, "") - return s -} -func (this *SourceRevision) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SourceRevision{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Git:` + strings.Replace(this.Git.String(), "GitSourceRevision", "GitSourceRevision", 1) + `,`, - `}`, - }, "") - return s -} -func (this *SourceStrategyOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SourceStrategyOptions{`, - `Incremental:` + valueToStringGenerated(this.Incremental) + `,`, - `}`, - }, "") - return s -} -func (this *StageInfo) String() string { - if this == nil { - return "nil" - } - repeatedStringForSteps := "[]StepInfo{" - for _, f := range this.Steps { - repeatedStringForSteps += strings.Replace(strings.Replace(f.String(), "StepInfo", "StepInfo", 1), `&`, ``, 1) + "," - } - repeatedStringForSteps += "}" - s := strings.Join([]string{`&StageInfo{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `StartTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `DurationMilliseconds:` + fmt.Sprintf("%v", this.DurationMilliseconds) + `,`, - `Steps:` + repeatedStringForSteps + `,`, - `}`, - }, "") - return s -} -func (this *StepInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StepInfo{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `StartTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.StartTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `DurationMilliseconds:` + fmt.Sprintf("%v", this.DurationMilliseconds) + `,`, - `}`, - }, "") - return s -} -func (this *WebHookTrigger) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebHookTrigger{`, - `Secret:` + fmt.Sprintf("%v", this.Secret) + `,`, - `AllowEnv:` + fmt.Sprintf("%v", this.AllowEnv) + `,`, - `SecretReference:` + strings.Replace(this.SecretReference.String(), "SecretLocalReference", "SecretLocalReference", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *BinaryBuildRequestOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BinaryBuildRequestOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BinaryBuildRequestOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AsFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorEmail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorEmail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommitterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommitterEmail", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommitterEmail = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BinaryBuildSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BinaryBuildSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BinaryBuildSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AsFile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AsFile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BitbucketWebHookCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BitbucketWebHookCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BitbucketWebHookCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonWebHookCause", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommonWebHookCause.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Build) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Build: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Build: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildConfigList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildConfigList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildConfigList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, BuildConfig{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildConfigSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildConfigSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Triggers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Triggers = append(m.Triggers, BuildTriggerPolicy{}) - if err := m.Triggers[len(m.Triggers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RunPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RunPolicy = BuildRunPolicy(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonSpec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommonSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SuccessfulBuildsHistoryLimit", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SuccessfulBuildsHistoryLimit = &v - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FailedBuildsHistoryLimit", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FailedBuildsHistoryLimit = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildConfigStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildConfigStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastVersion", wireType) - } - m.LastVersion = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LastVersion |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageChangeTriggers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageChangeTriggers = append(m.ImageChangeTriggers, ImageChangeTriggerStatus{}) - if err := m.ImageChangeTriggers[len(m.ImageChangeTriggers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Build{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildLog) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildLog: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildLog: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildLogOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildLogOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildLogOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Container = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Follow", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Follow = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Previous", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Previous = bool(v != 0) - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SinceSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.SinceSeconds = &v - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SinceTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SinceTime == nil { - m.SinceTime = &v1.Time{} - } - if err := m.SinceTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Timestamps", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Timestamps = bool(v != 0) - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TailLines", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.TailLines = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LimitBytes = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoWait", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoWait = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Version = &v - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipTLSVerifyBackend", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsecureSkipTLSVerifyBackend = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildOutput) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &v11.ObjectReference{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PushSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PushSecret == nil { - m.PushSecret = &v11.LocalObjectReference{} - } - if err := m.PushSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageLabels = append(m.ImageLabels, ImageLabel{}) - if err := m.ImageLabels[len(m.ImageLabels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildPostCommitSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildPostCommitSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildPostCommitSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Command = append(m.Command, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Args", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Args = append(m.Args, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Script", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Script = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Revision == nil { - m.Revision = &SourceRevision{} - } - if err := m.Revision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TriggeredByImage", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TriggeredByImage == nil { - m.TriggeredByImage = &v11.ObjectReference{} - } - if err := m.TriggeredByImage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &v11.ObjectReference{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Binary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Binary == nil { - m.Binary = &BinaryBuildSource{} - } - if err := m.Binary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LastVersion", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LastVersion = &v - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TriggeredBy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TriggeredBy = append(m.TriggeredBy, BuildTriggerCause{}) - if err := m.TriggeredBy[len(m.TriggeredBy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerStrategyOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DockerStrategyOptions == nil { - m.DockerStrategyOptions = &DockerStrategyOptions{} - } - if err := m.DockerStrategyOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceStrategyOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceStrategyOptions == nil { - m.SourceStrategyOptions = &SourceStrategyOptions{} - } - if err := m.SourceStrategyOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildSourceType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Binary", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Binary == nil { - m.Binary = &BinaryBuildSource{} - } - if err := m.Binary.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dockerfile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Dockerfile = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Git", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Git == nil { - m.Git = &GitBuildSource{} - } - if err := m.Git.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Images = append(m.Images, ImageSource{}) - if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ContextDir", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ContextDir = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceSecret == nil { - m.SourceSecret = &v11.LocalObjectReference{} - } - if err := m.SourceSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, SecretBuildSource{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMaps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConfigMaps = append(m.ConfigMaps, ConfigMapBuildSource{}) - if err := m.ConfigMaps[len(m.ConfigMaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonSpec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommonSpec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TriggeredBy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TriggeredBy = append(m.TriggeredBy, BuildTriggerCause{}) - if err := m.TriggeredBy[len(m.TriggeredBy)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = BuildPhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Cancelled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Cancelled = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = StatusReason(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.StartTimestamp == nil { - m.StartTimestamp = &v1.Time{} - } - if err := m.StartTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionTimestamp", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CompletionTimestamp == nil { - m.CompletionTimestamp = &v1.Time{} - } - if err := m.CompletionTimestamp.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) - } - m.Duration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Duration |= time.Duration(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutputDockerImageReference", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutputDockerImageReference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Config == nil { - m.Config = &v11.ObjectReference{} - } - if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stages", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Stages = append(m.Stages, StageInfo{}) - if err := m.Stages[len(m.Stages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LogSnippet", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LogSnippet = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, BuildCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildStatusOutput) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildStatusOutput: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildStatusOutput: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &BuildStatusOutputTo{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildStatusOutputTo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildStatusOutputTo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildStatusOutputTo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageDigest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageDigest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerStrategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DockerStrategy == nil { - m.DockerStrategy = &DockerBuildStrategy{} - } - if err := m.DockerStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceStrategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SourceStrategy == nil { - m.SourceStrategy = &SourceBuildStrategy{} - } - if err := m.SourceStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CustomStrategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CustomStrategy == nil { - m.CustomStrategy = &CustomBuildStrategy{} - } - if err := m.CustomStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JenkinsPipelineStrategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.JenkinsPipelineStrategy == nil { - m.JenkinsPipelineStrategy = &JenkinsPipelineBuildStrategy{} - } - if err := m.JenkinsPipelineStrategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildTriggerCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildTriggerCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildTriggerCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenericWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GenericWebHook == nil { - m.GenericWebHook = &GenericWebHookCause{} - } - if err := m.GenericWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitHubWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GitHubWebHook == nil { - m.GitHubWebHook = &GitHubWebHookCause{} - } - if err := m.GitHubWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageChangeBuild", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ImageChangeBuild == nil { - m.ImageChangeBuild = &ImageChangeCause{} - } - if err := m.ImageChangeBuild.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitLabWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GitLabWebHook == nil { - m.GitLabWebHook = &GitLabWebHookCause{} - } - if err := m.GitLabWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BitbucketWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BitbucketWebHook == nil { - m.BitbucketWebHook = &BitbucketWebHookCause{} - } - if err := m.BitbucketWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildTriggerPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildTriggerPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildTriggerPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildTriggerType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitHubWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GitHubWebHook == nil { - m.GitHubWebHook = &WebHookTrigger{} - } - if err := m.GitHubWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenericWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GenericWebHook == nil { - m.GenericWebHook = &WebHookTrigger{} - } - if err := m.GenericWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageChange", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ImageChange == nil { - m.ImageChange = &ImageChangeTrigger{} - } - if err := m.ImageChange.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitLabWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.GitLabWebHook == nil { - m.GitLabWebHook = &WebHookTrigger{} - } - if err := m.GitLabWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BitbucketWebHook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BitbucketWebHook == nil { - m.BitbucketWebHook = &WebHookTrigger{} - } - if err := m.BitbucketWebHook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildVolume) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildVolume: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildVolume: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mounts = append(m.Mounts, BuildVolumeMount{}) - if err := m.Mounts[len(m.Mounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildVolumeMount) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildVolumeMount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildVolumeMount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BuildVolumeSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BuildVolumeSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BuildVolumeSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildVolumeSourceType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Secret == nil { - m.Secret = &v11.SecretVolumeSource{} - } - if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ConfigMap == nil { - m.ConfigMap = &v11.ConfigMapVolumeSource{} - } - if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CSI", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CSI == nil { - m.CSI = &v11.CSIVolumeSource{} - } - if err := m.CSI.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommonSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommonSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommonSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccount", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceAccount = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Revision == nil { - m.Revision = &SourceRevision{} - } - if err := m.Revision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Strategy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Output", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Output.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PostCommit", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PostCommit.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CompletionDeadlineSeconds", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.CompletionDeadlineSeconds = &v - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.NodeSelector == nil { - m.NodeSelector = OptionalNodeSelector{} - } - if err := m.NodeSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MountTrustedCA", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.MountTrustedCA = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CommonWebHookCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CommonWebHookCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CommonWebHookCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Revision == nil { - m.Revision = &SourceRevision{} - } - if err := m.Revision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigMapBuildSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigMapBuildSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigMapBuildSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMap", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ConfigMap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationDir", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationDir = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomBuildStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomBuildStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomBuildStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PullSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PullSecret == nil { - m.PullSecret = &v11.LocalObjectReference{} - } - if err := m.PullSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExposeDockerSocket", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExposeDockerSocket = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ForcePull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ForcePull = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secrets", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secrets = append(m.Secrets, SecretSpec{}) - if err := m.Secrets[len(m.Secrets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildAPIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildAPIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DockerBuildStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DockerBuildStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DockerBuildStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &v11.ObjectReference{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PullSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PullSecret == nil { - m.PullSecret = &v11.LocalObjectReference{} - } - if err := m.PullSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCache", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NoCache = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ForcePull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ForcePull = bool(v != 0) - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerfilePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerfilePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildArgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildArgs = append(m.BuildArgs, v11.EnvVar{}) - if err := m.BuildArgs[len(m.BuildArgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageOptimizationPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := ImageOptimizationPolicy(dAtA[iNdEx:postIndex]) - m.ImageOptimizationPolicy = &s - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Volumes = append(m.Volumes, BuildVolume{}) - if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *DockerStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DockerStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DockerStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildArgs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildArgs = append(m.BuildArgs, v11.EnvVar{}) - if err := m.BuildArgs[len(m.BuildArgs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NoCache", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.NoCache = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenericWebHookCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenericWebHookCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenericWebHookCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Revision == nil { - m.Revision = &SourceRevision{} - } - if err := m.Revision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GenericWebHookEvent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GenericWebHookEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GenericWebHookEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildSourceType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Git", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Git == nil { - m.Git = &GitInfo{} - } - if err := m.Git.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerStrategyOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DockerStrategyOptions == nil { - m.DockerStrategyOptions = &DockerStrategyOptions{} - } - if err := m.DockerStrategyOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitBuildSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitBuildSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitBuildSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ref = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProxyConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ProxyConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitHubWebHookCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitHubWebHookCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitHubWebHookCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Revision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Revision == nil { - m.Revision = &SourceRevision{} - } - if err := m.Revision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitBuildSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GitBuildSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitSourceRevision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GitSourceRevision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Refs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Refs = append(m.Refs, GitRefInfo{}) - if err := m.Refs[len(m.Refs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitLabWebHookCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitLabWebHookCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitLabWebHookCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonWebHookCause", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.CommonWebHookCause.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitRefInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitRefInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitRefInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitBuildSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GitBuildSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitSourceRevision", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.GitSourceRevision.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GitSourceRevision) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GitSourceRevision: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GitSourceRevision: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Commit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Author", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Author.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Committer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Committer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageChangeCause) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageChangeCause: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageChangeCause: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FromRef", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.FromRef == nil { - m.FromRef = &v11.ObjectReference{} - } - if err := m.FromRef.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageChangeTrigger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageChangeTrigger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageChangeTrigger: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredImageID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastTriggeredImageID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &v11.ObjectReference{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Paused", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Paused = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageChangeTriggerStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageChangeTriggerStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageChangeTriggerStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTriggeredImageID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LastTriggeredImageID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTriggerTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTriggerTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageLabel) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageLabel: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageLabel: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, ImageSourcePath{}) - if err := m.Paths[len(m.Paths)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PullSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PullSecret == nil { - m.PullSecret = &v11.LocalObjectReference{} - } - if err := m.PullSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field As", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.As = append(m.As, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageSourcePath) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageSourcePath: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageSourcePath: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourcePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourcePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationDir", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationDir = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamTagReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamTagReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamTagReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JenkinsPipelineBuildStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JenkinsPipelineBuildStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JenkinsPipelineBuildStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JenkinsfilePath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JenkinsfilePath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Jenkinsfile", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Jenkinsfile = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OptionalNodeSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OptionalNodeSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OptionalNodeSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if *m == nil { - *m = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - (*m)[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProxyConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProxyConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProxyConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HTTPProxy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.HTTPProxy = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HTTPSProxy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.HTTPSProxy = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NoProxy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.NoProxy = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretBuildSource) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretBuildSource: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretBuildSource: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationDir", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationDir = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretLocalReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretLocalReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretLocalReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretSource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SecretSource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MountPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MountPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SourceBuildStrategy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceBuildStrategy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceBuildStrategy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PullSecret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PullSecret == nil { - m.PullSecret = &v11.LocalObjectReference{} - } - if err := m.PullSecret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Env", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Env = append(m.Env, v11.EnvVar{}) - if err := m.Env[len(m.Env)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scripts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scripts = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Incremental", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Incremental = &b - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ForcePull", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ForcePull = bool(v != 0) - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Volumes = append(m.Volumes, BuildVolume{}) - if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SourceControlUser) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceControlUser: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceControlUser: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Email", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Email = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SourceRevision) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceRevision: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceRevision: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = BuildSourceType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Git", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Git == nil { - m.Git = &GitSourceRevision{} - } - if err := m.Git.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SourceStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SourceStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SourceStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Incremental", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.Incremental = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StageInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StageInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StageInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = StageName(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMilliseconds", wireType) - } - m.DurationMilliseconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationMilliseconds |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Steps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Steps = append(m.Steps, StepInfo{}) - if err := m.Steps[len(m.Steps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *StepInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: StepInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: StepInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = StepName(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.StartTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DurationMilliseconds", wireType) - } - m.DurationMilliseconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.DurationMilliseconds |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebHookTrigger) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebHookTrigger: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebHookTrigger: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowEnv", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowEnv = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SecretReference", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SecretReference == nil { - m.SecretReference = &SecretLocalReference{} - } - if err := m.SecretReference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/build/v1/generated.proto b/vendor/github.com/openshift/api/build/v1/generated.proto deleted file mode 100644 index 7a18a7f02..000000000 --- a/vendor/github.com/openshift/api/build/v1/generated.proto +++ /dev/null @@ -1,1254 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.build.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/build/v1"; - -// BinaryBuildRequestOptions are the options required to fully speficy a binary build request -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BinaryBuildRequestOptions { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // asFile determines if the binary should be created as a file within the source rather than extracted as an archive - optional string asFile = 2; - - // revision.commit is the value identifying a specific commit - optional string revisionCommit = 3; - - // revision.message is the description of a specific commit - optional string revisionMessage = 4; - - // revision.authorName of the source control user - optional string revisionAuthorName = 5; - - // revision.authorEmail of the source control user - optional string revisionAuthorEmail = 6; - - // revision.committerName of the source control user - optional string revisionCommitterName = 7; - - // revision.committerEmail of the source control user - optional string revisionCommitterEmail = 8; -} - -// BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, -// where the file will be extracted and used as the build source. -message BinaryBuildSource { - // asFile indicates that the provided binary input should be considered a single file - // within the build input. For example, specifying "webapp.war" would place the provided - // binary as `/webapp.war` for the builder. If left empty, the Docker and Source build - // strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. - // The custom strategy receives this binary as standard input. This filename may not - // contain slashes or be '..' or '.'. - optional string asFile = 1; -} - -// BitbucketWebHookCause has information about a Bitbucket webhook that triggered a -// build. -message BitbucketWebHookCause { - optional CommonWebHookCause commonSpec = 1; -} - -// Build encapsulates the inputs needed to produce a new deployable image, as well as -// the status of the execution and a reference to the Pod which executed the build. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Build { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is all the inputs used to execute the build. - optional BuildSpec spec = 2; - - // status is the current status of the build. - // +optional - optional BuildStatus status = 3; -} - -// BuildCondition describes the state of a build at a certain point. -message BuildCondition { - // type of build condition. - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - optional string status = 2; - - // The last time this condition was updated. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 6; - - // The last time the condition transitioned from one status to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // The reason for the condition's last transition. - optional string reason = 4; - - // A human readable message indicating details about the transition. - optional string message = 5; -} - -// Build configurations define a build process for new container images. There are three types of builds possible - a container image build using a Dockerfile, a Source-to-Image build that uses a specially prepared base image that accepts source code that it can make runnable, and a custom build that can run // arbitrary container images as a base and accept the build parameters. Builds run on the cluster and on completion are pushed to the container image registry specified in the "output" section. A build can be triggered via a webhook, when the base image changes, or when a user manually requests a new build be // created. -// -// Each build created by a build configuration is numbered and refers back to its parent configuration. Multiple builds can be triggered at once. Builds that do not have "output" set can be used to test code or run a verification build. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildConfig { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec holds all the input necessary to produce a new build, and the conditions when - // to trigger them. - optional BuildConfigSpec spec = 2; - - // status holds any relevant information about a build config - // +optional - optional BuildConfigStatus status = 3; -} - -// BuildConfigList is a collection of BuildConfigs. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildConfigList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of build configs - repeated BuildConfig items = 2; -} - -// BuildConfigSpec describes when and how builds are created -message BuildConfigSpec { - // triggers determine how new Builds can be launched from a BuildConfig. If - // no triggers are defined, a new build can only occur as a result of an - // explicit client build creation. - // +optional - repeated BuildTriggerPolicy triggers = 1; - - // runPolicy describes how the new build created from this build - // configuration will be scheduled for execution. - // This is optional, if not specified we default to "Serial". - optional string runPolicy = 2; - - // CommonSpec is the desired build specification - optional CommonSpec commonSpec = 3; - - // successfulBuildsHistoryLimit is the number of old successful builds to retain. - // When a BuildConfig is created, the 5 most recent successful builds are retained unless this value is set. - // If removed after the BuildConfig has been created, all successful builds are retained. - optional int32 successfulBuildsHistoryLimit = 4; - - // failedBuildsHistoryLimit is the number of old failed builds to retain. - // When a BuildConfig is created, the 5 most recent failed builds are retained unless this value is set. - // If removed after the BuildConfig has been created, all failed builds are retained. - optional int32 failedBuildsHistoryLimit = 5; -} - -// BuildConfigStatus contains current state of the build config object. -message BuildConfigStatus { - // lastVersion is used to inform about number of last triggered build. - // +optional - optional int64 lastVersion = 1; - - // imageChangeTriggers captures the runtime state of any ImageChangeTrigger specified in the BuildConfigSpec, - // including the value reconciled by the OpenShift APIServer for the lastTriggeredImageID. There is a single entry - // in this array for each image change trigger in spec. Each trigger status references the ImageStreamTag that acts as the source of the trigger. - // +optional - repeated ImageChangeTriggerStatus imageChangeTriggers = 2; -} - -// BuildList is a collection of Builds. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of builds - repeated Build items = 2; -} - -// BuildLog is the (unused) resource associated with the build log redirector -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildLog { -} - -// BuildLogOptions is the REST options for a build log -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildLogOptions { - // cointainer for which to stream logs. Defaults to only container if there is one container in the pod. - optional string container = 1; - - // follow if true indicates that the build log should be streamed until - // the build terminates. - optional bool follow = 2; - - // previous returns previous build logs. Defaults to false. - optional bool previous = 3; - - // sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - optional int64 sinceSeconds = 4; - - // sinceTime is an RFC3339 timestamp from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time sinceTime = 5; - - // timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - optional bool timestamps = 6; - - // tailLines, If set, is the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - optional int64 tailLines = 7; - - // limitBytes, If set, is the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - optional int64 limitBytes = 8; - - // nowait if true causes the call to return immediately even if the build - // is not available yet. Otherwise the server will wait until the build has started. - // TODO: Fix the tag to 'noWait' in v2 - optional bool nowait = 9; - - // version of the build for which to view logs. - optional int64 version = 10; - - // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the - // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver - // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real - // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the - // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept - // the actual log data coming from the real kubelet). - // +optional - optional bool insecureSkipTLSVerifyBackend = 11; -} - -// BuildOutput is input to a build strategy and describes the container image that the strategy -// should produce. -message BuildOutput { - // to defines an optional location to push the output of this build to. - // Kind must be one of 'ImageStreamTag' or 'DockerImage'. - // This value will be used to look up a container image repository to push to. - // In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of - // the build unless Namespace is specified. - optional .k8s.io.api.core.v1.ObjectReference to = 1; - - // pushSecret is the name of a Secret that would be used for setting - // up the authentication for executing the Docker push to authentication - // enabled Docker Registry (or Docker Hub). - optional .k8s.io.api.core.v1.LocalObjectReference pushSecret = 2; - - // imageLabels define a list of labels that are applied to the resulting image. If there - // are multiple labels with the same name then the last one in the list is used. - repeated ImageLabel imageLabels = 3; -} - -// A BuildPostCommitSpec holds a build post commit hook specification. The hook -// executes a command in a temporary container running the build output image, -// immediately after the last layer of the image is committed and before the -// image is pushed to a registry. The command is executed with the current -// working directory ($PWD) set to the image's WORKDIR. -// -// The build will be marked as failed if the hook execution fails. It will fail -// if the script or command return a non-zero exit code, or if there is any -// other error related to starting the temporary container. -// -// There are five different ways to configure the hook. As an example, all forms -// below are equivalent and will execute `rake test --verbose`. -// -// 1. Shell script: -// -// "postCommit": { -// "script": "rake test --verbose", -// } -// -// The above is a convenient form which is equivalent to: -// -// "postCommit": { -// "command": ["/bin/sh", "-ic"], -// "args": ["rake test --verbose"] -// } -// -// 2. A command as the image entrypoint: -// -// "postCommit": { -// "commit": ["rake", "test", "--verbose"] -// } -// -// Command overrides the image entrypoint in the exec form, as documented in -// Docker: https://docs.docker.com/engine/reference/builder/#entrypoint. -// -// 3. Pass arguments to the default entrypoint: -// -// "postCommit": { -// "args": ["rake", "test", "--verbose"] -// } -// -// This form is only useful if the image entrypoint can handle arguments. -// -// 4. Shell script with arguments: -// -// "postCommit": { -// "script": "rake test $1", -// "args": ["--verbose"] -// } -// -// This form is useful if you need to pass arguments that would otherwise be -// hard to quote properly in the shell script. In the script, $0 will be -// "/bin/sh" and $1, $2, etc, are the positional arguments from Args. -// -// 5. Command with arguments: -// -// "postCommit": { -// "command": ["rake", "test"], -// "args": ["--verbose"] -// } -// -// This form is equivalent to appending the arguments to the Command slice. -// -// It is invalid to provide both Script and Command simultaneously. If none of -// the fields are specified, the hook is not executed. -message BuildPostCommitSpec { - // command is the command to run. It may not be specified with Script. - // This might be needed if the image doesn't have `/bin/sh`, or if you - // do not want to use a shell. In all other cases, using Script might be - // more convenient. - repeated string command = 1; - - // args is a list of arguments that are provided to either Command, - // Script or the container image's default entrypoint. The arguments are - // placed immediately after the command to be run. - repeated string args = 2; - - // script is a shell script to be run with `/bin/sh -ic`. It may not be - // specified with Command. Use Script when a shell script is appropriate - // to execute the post build hook, for example for running unit tests - // with `rake test`. If you need control over the image entrypoint, or - // if the image does not have `/bin/sh`, use Command and/or Args. - // The `-i` flag is needed to support CentOS and RHEL images that use - // Software Collections (SCL), in order to have the appropriate - // collections enabled in the shell. E.g., in the Ruby image, this is - // necessary to make `ruby`, `bundle` and other binaries available in - // the PATH. - optional string script = 3; -} - -// BuildRequest is the resource used to pass parameters to build generator -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BuildRequest { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // revision is the information from the source for a specific repo snapshot. - optional SourceRevision revision = 2; - - // triggeredByImage is the Image that triggered this build. - optional .k8s.io.api.core.v1.ObjectReference triggeredByImage = 3; - - // from is the reference to the ImageStreamTag that triggered the build. - optional .k8s.io.api.core.v1.ObjectReference from = 4; - - // binary indicates a request to build from a binary provided to the builder - optional BinaryBuildSource binary = 5; - - // lastVersion (optional) is the LastVersion of the BuildConfig that was used - // to generate the build. If the BuildConfig in the generator doesn't match, a build will - // not be generated. - optional int64 lastVersion = 6; - - // env contains additional environment variables you want to pass into a builder container. - repeated .k8s.io.api.core.v1.EnvVar env = 7; - - // triggeredBy describes which triggers started the most recent update to the - // build configuration and contains information about those triggers. - repeated BuildTriggerCause triggeredBy = 8; - - // dockerStrategyOptions contains additional docker-strategy specific options for the build - optional DockerStrategyOptions dockerStrategyOptions = 9; - - // sourceStrategyOptions contains additional source-strategy specific options for the build - optional SourceStrategyOptions sourceStrategyOptions = 10; -} - -// BuildSource is the SCM used for the build. -message BuildSource { - // type of build input to accept - // +k8s:conversion-gen=false - // +optional - optional string type = 1; - - // binary builds accept a binary as their input. The binary is generally assumed to be a tar, - // gzipped tar, or zip file depending on the strategy. For container image builds, this is the build - // context and an optional Dockerfile may be specified to override any Dockerfile in the - // build context. For Source builds, this is assumed to be an archive as described above. For - // Source and container image builds, if binary.asFile is set the build will receive a directory with - // a single file. contextDir may be used when an archive is provided. Custom builds will - // receive this binary as input on STDIN. - optional BinaryBuildSource binary = 2; - - // dockerfile is the raw contents of a Dockerfile which should be built. When this option is - // specified, the FROM may be modified based on your strategy base image and additional ENV - // stanzas from your strategy environment will be added after the FROM, but before the rest - // of your Dockerfile stanzas. The Dockerfile source type may be used with other options like - // git - in those cases the Git repo will have any innate Dockerfile replaced in the context - // dir. - optional string dockerfile = 3; - - // git contains optional information about git build source - optional GitBuildSource git = 4; - - // images describes a set of images to be used to provide source for the build - repeated ImageSource images = 5; - - // contextDir specifies the sub-directory where the source code for the application exists. - // This allows to have buildable sources in directory other than root of - // repository. - optional string contextDir = 6; - - // sourceSecret is the name of a Secret that would be used for setting - // up the authentication for cloning private repository. - // The secret contains valid credentials for remote repository, where the - // data's key represent the authentication method to be used and value is - // the base64 encoded credentials. Supported auth methods are: ssh-privatekey. - optional .k8s.io.api.core.v1.LocalObjectReference sourceSecret = 7; - - // secrets represents a list of secrets and their destinations that will - // be used only for the build. - repeated SecretBuildSource secrets = 8; - - // configMaps represents a list of configMaps and their destinations that will - // be used for the build. - repeated ConfigMapBuildSource configMaps = 9; -} - -// BuildSpec has the information to represent a build and also additional -// information about a build -message BuildSpec { - // CommonSpec is the information that represents a build - optional CommonSpec commonSpec = 1; - - // triggeredBy describes which triggers started the most recent update to the - // build configuration and contains information about those triggers. - repeated BuildTriggerCause triggeredBy = 2; -} - -// BuildStatus contains the status of a build -message BuildStatus { - // phase is the point in the build lifecycle. Possible values are - // "New", "Pending", "Running", "Complete", "Failed", "Error", and "Cancelled". - // +optional - optional string phase = 1; - - // cancelled describes if a cancel event was triggered for the build. - // +optional - optional bool cancelled = 2; - - // reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - // +optional - optional string reason = 3; - - // message is a human-readable message indicating details about why the build has this status. - // +optional - optional string message = 4; - - // startTimestamp is a timestamp representing the server time when this Build started - // running in a Pod. - // It is represented in RFC3339 form and is in UTC. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time startTimestamp = 5; - - // completionTimestamp is a timestamp representing the server time when this Build was - // finished, whether that build failed or succeeded. It reflects the time at which - // the Pod running the Build terminated. - // It is represented in RFC3339 form and is in UTC. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time completionTimestamp = 6; - - // duration contains time.Duration object describing build time. - // +optional - optional int64 duration = 7; - - // outputDockerImageReference contains a reference to the container image that - // will be built by this build. Its value is computed from - // Build.Spec.Output.To, and should include the registry address, so that - // it can be used to push and pull the image. - // +optional - optional string outputDockerImageReference = 8; - - // config is an ObjectReference to the BuildConfig this Build is based on. - // +optional - optional .k8s.io.api.core.v1.ObjectReference config = 9; - - // output describes the container image the build has produced. - // +optional - optional BuildStatusOutput output = 10; - - // stages contains details about each stage that occurs during the build - // including start time, duration (in milliseconds), and the steps that - // occured within each stage. - // +optional - repeated StageInfo stages = 11; - - // logSnippet is the last few lines of the build log. This value is only set for builds that failed. - // +optional - optional string logSnippet = 12; - - // conditions represents the latest available observations of a build's current state. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated BuildCondition conditions = 13; -} - -// BuildStatusOutput contains the status of the built image. -message BuildStatusOutput { - // to describes the status of the built image being pushed to a registry. - optional BuildStatusOutputTo to = 1; -} - -// BuildStatusOutputTo describes the status of the built image with regards to -// image registry to which it was supposed to be pushed. -message BuildStatusOutputTo { - // imageDigest is the digest of the built container image. The digest uniquely - // identifies the image in the registry to which it was pushed. - // - // Please note that this field may not always be set even if the push - // completes successfully - e.g. when the registry returns no digest or - // returns it in a format that the builder doesn't understand. - optional string imageDigest = 1; -} - -// BuildStrategy contains the details of how to perform a build. -message BuildStrategy { - // type is the kind of build strategy. - // +k8s:conversion-gen=false - // +optional - optional string type = 1; - - // dockerStrategy holds the parameters to the container image build strategy. - optional DockerBuildStrategy dockerStrategy = 2; - - // sourceStrategy holds the parameters to the Source build strategy. - optional SourceBuildStrategy sourceStrategy = 3; - - // customStrategy holds the parameters to the Custom build strategy - optional CustomBuildStrategy customStrategy = 4; - - // jenkinsPipelineStrategy holds the parameters to the Jenkins Pipeline build strategy. - // Deprecated: use OpenShift Pipelines - optional JenkinsPipelineBuildStrategy jenkinsPipelineStrategy = 5; -} - -// BuildTriggerCause holds information about a triggered build. It is used for -// displaying build trigger data for each build and build configuration in oc -// describe. It is also used to describe which triggers led to the most recent -// update in the build configuration. -message BuildTriggerCause { - // message is used to store a human readable message for why the build was - // triggered. E.g.: "Manually triggered by user", "Configuration change",etc. - optional string message = 1; - - // genericWebHook holds data about a builds generic webhook trigger. - optional GenericWebHookCause genericWebHook = 2; - - // githubWebHook represents data for a GitHub webhook that fired a - // specific build. - optional GitHubWebHookCause githubWebHook = 3; - - // imageChangeBuild stores information about an imagechange event - // that triggered a new build. - optional ImageChangeCause imageChangeBuild = 4; - - // gitlabWebHook represents data for a GitLab webhook that fired a specific - // build. - optional GitLabWebHookCause gitlabWebHook = 5; - - // bitbucketWebHook represents data for a Bitbucket webhook that fired a - // specific build. - optional BitbucketWebHookCause bitbucketWebHook = 6; -} - -// BuildTriggerPolicy describes a policy for a single trigger that results in a new Build. -message BuildTriggerPolicy { - // type is the type of build trigger. Valid values: - // - // - GitHub - // GitHubWebHookBuildTriggerType represents a trigger that launches builds on - // GitHub webhook invocations - // - // - Generic - // GenericWebHookBuildTriggerType represents a trigger that launches builds on - // generic webhook invocations - // - // - GitLab - // GitLabWebHookBuildTriggerType represents a trigger that launches builds on - // GitLab webhook invocations - // - // - Bitbucket - // BitbucketWebHookBuildTriggerType represents a trigger that launches builds on - // Bitbucket webhook invocations - // - // - ImageChange - // ImageChangeBuildTriggerType represents a trigger that launches builds on - // availability of a new version of an image - // - // - ConfigChange - // ConfigChangeBuildTriggerType will trigger a build on an initial build config creation - // WARNING: In the future the behavior will change to trigger a build on any config change - optional string type = 1; - - // github contains the parameters for a GitHub webhook type of trigger - optional WebHookTrigger github = 2; - - // generic contains the parameters for a Generic webhook type of trigger - optional WebHookTrigger generic = 3; - - // imageChange contains parameters for an ImageChange type of trigger - optional ImageChangeTrigger imageChange = 4; - - // GitLabWebHook contains the parameters for a GitLab webhook type of trigger - optional WebHookTrigger gitlab = 5; - - // BitbucketWebHook contains the parameters for a Bitbucket webhook type of - // trigger - optional WebHookTrigger bitbucket = 6; -} - -// BuildVolume describes a volume that is made available to build pods, -// such that it can be mounted into buildah's runtime environment. -// Only a subset of Kubernetes Volume sources are supported. -message BuildVolume { - // name is a unique identifier for this BuildVolume. - // It must conform to the Kubernetes DNS label standard and be unique within the pod. - // Names that collide with those added by the build controller will result in a - // failed build with an error message detailing which name caused the error. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +required - optional string name = 1; - - // source represents the location and type of the mounted volume. - // +required - optional BuildVolumeSource source = 2; - - // mounts represents the location of the volume in the image build container - // +required - // +listType=map - // +listMapKey=destinationPath - // +patchMergeKey=destinationPath - // +patchStrategy=merge - repeated BuildVolumeMount mounts = 3; -} - -// BuildVolumeMount describes the mounting of a Volume within buildah's runtime environment. -message BuildVolumeMount { - // destinationPath is the path within the buildah runtime environment at which the volume should be mounted. - // The transient mount within the build image and the backing volume will both be mounted read only. - // Must be an absolute path, must not contain '..' or ':', and must not collide with a destination path generated - // by the builder process - // Paths that collide with those added by the build controller will result in a - // failed build with an error message detailing which path caused the error. - optional string destinationPath = 1; -} - -// BuildVolumeSource represents the source of a volume to mount -// Only one of its supported types may be specified at any given time. -message BuildVolumeSource { - // type is the BuildVolumeSourceType for the volume source. - // Type must match the populated volume source. - // Valid types are: Secret, ConfigMap - optional string type = 1; - - // secret represents a Secret that should populate this volume. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - optional .k8s.io.api.core.v1.SecretVolumeSource secret = 2; - - // configMap represents a ConfigMap that should populate this volume - // +optional - optional .k8s.io.api.core.v1.ConfigMapVolumeSource configMap = 3; - - // csi represents ephemeral storage provided by external CSI drivers which support this capability - // +optional - optional .k8s.io.api.core.v1.CSIVolumeSource csi = 4; -} - -// CommonSpec encapsulates all the inputs necessary to represent a build. -message CommonSpec { - // serviceAccount is the name of the ServiceAccount to use to run the pod - // created by this build. - // The pod will be allowed to use secrets referenced by the ServiceAccount - optional string serviceAccount = 1; - - // source describes the SCM in use. - optional BuildSource source = 2; - - // revision is the information from the source for a specific repo snapshot. - // This is optional. - optional SourceRevision revision = 3; - - // strategy defines how to perform a build. - optional BuildStrategy strategy = 4; - - // output describes the container image the Strategy should produce. - optional BuildOutput output = 5; - - // resources computes resource requirements to execute the build. - optional .k8s.io.api.core.v1.ResourceRequirements resources = 6; - - // postCommit is a build hook executed after the build output image is - // committed, before it is pushed to a registry. - optional BuildPostCommitSpec postCommit = 7; - - // completionDeadlineSeconds is an optional duration in seconds, counted from - // the time when a build pod gets scheduled in the system, that the build may - // be active on a node before the system actively tries to terminate the - // build; value must be positive integer - optional int64 completionDeadlineSeconds = 8; - - // nodeSelector is a selector which must be true for the build pod to fit on a node - // If nil, it can be overridden by default build nodeselector values for the cluster. - // If set to an empty map or a map with any values, default build nodeselector values - // are ignored. - // +optional - optional OptionalNodeSelector nodeSelector = 9; - - // mountTrustedCA bind mounts the cluster's trusted certificate authorities, as defined in - // the cluster's proxy configuration, into the build. This lets processes within a build trust - // components signed by custom PKI certificate authorities, such as private artifact - // repositories and HTTPS proxies. - // - // When this field is set to true, the contents of `/etc/pki/ca-trust` within the build are - // managed by the build container, and any changes to this directory or its subdirectories (for - // example - within a Dockerfile `RUN` instruction) are not persisted in the build's output image. - optional bool mountTrustedCA = 10; -} - -// CommonWebHookCause factors out the identical format of these webhook -// causes into struct so we can share it in the specific causes; it is too late for -// GitHub and Generic but we can leverage this pattern with GitLab and Bitbucket. -message CommonWebHookCause { - // revision is the git source revision information of the trigger. - optional SourceRevision revision = 1; - - // secret is the obfuscated webhook secret that triggered a build. - optional string secret = 2; -} - -// ConfigMapBuildSource describes a configmap and its destination directory that will be -// used only at the build time. The content of the configmap referenced here will -// be copied into the destination directory instead of mounting. -message ConfigMapBuildSource { - // configMap is a reference to an existing configmap that you want to use in your - // build. - optional .k8s.io.api.core.v1.LocalObjectReference configMap = 1; - - // destinationDir is the directory where the files from the configmap should be - // available for the build time. - // For the Source build strategy, these will be injected into a container - // where the assemble script runs. - // For the container image build strategy, these will be copied into the build - // directory, where the Dockerfile is located, so users can ADD or COPY them - // during container image build. - optional string destinationDir = 2; -} - -// CustomBuildStrategy defines input parameters specific to Custom build. -message CustomBuildStrategy { - // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which - // the container image should be pulled - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - optional .k8s.io.api.core.v1.LocalObjectReference pullSecret = 2; - - // env contains additional environment variables you want to pass into a builder container. - repeated .k8s.io.api.core.v1.EnvVar env = 3; - - // exposeDockerSocket will allow running Docker commands (and build container images) from - // inside the container. - // TODO: Allow admins to enforce 'false' for this option - optional bool exposeDockerSocket = 4; - - // forcePull describes if the controller should configure the build pod to always pull the images - // for the builder or only pull if it is not present locally - optional bool forcePull = 5; - - // secrets is a list of additional secrets that will be included in the build pod - repeated SecretSpec secrets = 6; - - // buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder - optional string buildAPIVersion = 7; -} - -// DockerBuildStrategy defines input parameters specific to container image build. -message DockerBuildStrategy { - // from is a reference to an DockerImage, ImageStreamTag, or ImageStreamImage which overrides - // the FROM image in the Dockerfile for the build. If the Dockerfile uses multi-stage builds, - // this will replace the image in the last FROM directive of the file. - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - optional .k8s.io.api.core.v1.LocalObjectReference pullSecret = 2; - - // noCache if set to true indicates that the container image build must be executed with the - // --no-cache=true flag - optional bool noCache = 3; - - // env contains additional environment variables you want to pass into a builder container. - repeated .k8s.io.api.core.v1.EnvVar env = 4; - - // forcePull describes if the builder should pull the images from registry prior to building. - optional bool forcePull = 5; - - // dockerfilePath is the path of the Dockerfile that will be used to build the container image, - // relative to the root of the context (contextDir). - // Defaults to `Dockerfile` if unset. - optional string dockerfilePath = 6; - - // buildArgs contains build arguments that will be resolved in the Dockerfile. See - // https://docs.docker.com/engine/reference/builder/#/arg for more details. - // NOTE: Only the 'name' and 'value' fields are supported. Any settings on the 'valueFrom' field - // are ignored. - repeated .k8s.io.api.core.v1.EnvVar buildArgs = 7; - - // imageOptimizationPolicy describes what optimizations the system can use when building images - // to reduce the final size or time spent building the image. The default policy is 'None' which - // means the final build image will be equivalent to an image created by the container image build API. - // The experimental policy 'SkipLayers' will avoid commiting new layers in between each - // image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' - // policy. An additional experimental policy 'SkipLayersAndWarn' is the same as - // 'SkipLayers' but simply warns if compatibility cannot be preserved. - optional string imageOptimizationPolicy = 8; - - // volumes is a list of input volumes that can be mounted into the builds runtime environment. - // Only a subset of Kubernetes Volume sources are supported by builds. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +listType=map - // +listMapKey=name - // +patchMergeKey=name - // +patchStrategy=merge - repeated BuildVolume volumes = 9; -} - -// DockerStrategyOptions contains extra strategy options for container image builds -message DockerStrategyOptions { - // Args contains any build arguments that are to be passed to Docker. See - // https://docs.docker.com/engine/reference/builder/#/arg for more details - repeated .k8s.io.api.core.v1.EnvVar buildArgs = 1; - - // noCache overrides the docker-strategy noCache option in the build config - optional bool noCache = 2; -} - -// GenericWebHookCause holds information about a generic WebHook that -// triggered a build. -message GenericWebHookCause { - // revision is an optional field that stores the git source revision - // information of the generic webhook trigger when it is available. - optional SourceRevision revision = 1; - - // secret is the obfuscated webhook secret that triggered a build. - optional string secret = 2; -} - -// GenericWebHookEvent is the payload expected for a generic webhook post -message GenericWebHookEvent { - // type is the type of source repository - // +k8s:conversion-gen=false - optional string type = 1; - - // git is the git information if the Type is BuildSourceGit - optional GitInfo git = 2; - - // env contains additional environment variables you want to pass into a builder container. - // ValueFrom is not supported. - repeated .k8s.io.api.core.v1.EnvVar env = 3; - - // dockerStrategyOptions contains additional docker-strategy specific options for the build - optional DockerStrategyOptions dockerStrategyOptions = 4; -} - -// GitBuildSource defines the parameters of a Git SCM -message GitBuildSource { - // uri points to the source that will be built. The structure of the source - // will depend on the type of build to run - optional string uri = 1; - - // ref is the branch/tag/ref to build. - optional string ref = 2; - - // proxyConfig defines the proxies to use for the git clone operation. Values - // not set here are inherited from cluster-wide build git proxy settings. - optional ProxyConfig proxyConfig = 3; -} - -// GitHubWebHookCause has information about a GitHub webhook that triggered a -// build. -message GitHubWebHookCause { - // revision is the git revision information of the trigger. - optional SourceRevision revision = 1; - - // secret is the obfuscated webhook secret that triggered a build. - optional string secret = 2; -} - -// GitInfo is the aggregated git information for a generic webhook post -message GitInfo { - optional GitBuildSource gitBuildSource = 1; - - optional GitSourceRevision gitSourceRevision = 2; - - // refs is a list of GitRefs for the provided repo - generally sent - // when used from a post-receive hook. This field is optional and is - // used when sending multiple refs - repeated GitRefInfo refs = 3; -} - -// GitLabWebHookCause has information about a GitLab webhook that triggered a -// build. -message GitLabWebHookCause { - optional CommonWebHookCause commonSpec = 1; -} - -// GitRefInfo is a single ref -message GitRefInfo { - optional GitBuildSource gitBuildSource = 1; - - optional GitSourceRevision gitSourceRevision = 2; -} - -// GitSourceRevision is the commit information from a git source for a build -message GitSourceRevision { - // commit is the commit hash identifying a specific commit - optional string commit = 1; - - // author is the author of a specific commit - optional SourceControlUser author = 2; - - // committer is the committer of a specific commit - optional SourceControlUser committer = 3; - - // message is the description of a specific commit - optional string message = 4; -} - -// ImageChangeCause contains information about the image that triggered a -// build -message ImageChangeCause { - // imageID is the ID of the image that triggered a new build. - optional string imageID = 1; - - // fromRef contains detailed information about an image that triggered a - // build. - optional .k8s.io.api.core.v1.ObjectReference fromRef = 2; -} - -// ImageChangeTrigger allows builds to be triggered when an ImageStream changes -message ImageChangeTrigger { - // lastTriggeredImageID is used internally by the ImageChangeController to save last - // used image ID for build - // This field is deprecated and will be removed in a future release. - // Deprecated - optional string lastTriggeredImageID = 1; - - // from is a reference to an ImageStreamTag that will trigger a build when updated - // It is optional. If no From is specified, the From image from the build strategy - // will be used. Only one ImageChangeTrigger with an empty From reference is allowed in - // a build configuration. - optional .k8s.io.api.core.v1.ObjectReference from = 2; - - // paused is true if this trigger is temporarily disabled. Optional. - optional bool paused = 3; -} - -// ImageChangeTriggerStatus tracks the latest resolved status of the associated ImageChangeTrigger policy -// specified in the BuildConfigSpec.Triggers struct. -message ImageChangeTriggerStatus { - // lastTriggeredImageID represents the sha/id of the ImageStreamTag when a Build for this BuildConfig was started. - // The lastTriggeredImageID is updated each time a Build for this BuildConfig is started, even if this ImageStreamTag is not the reason the Build is started. - optional string lastTriggeredImageID = 1; - - // from is the ImageStreamTag that is the source of the trigger. - optional ImageStreamTagReference from = 2; - - // lastTriggerTime is the last time this particular ImageStreamTag triggered a Build to start. - // This field is only updated when this trigger specifically started a Build. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTriggerTime = 3; -} - -// ImageLabel represents a label applied to the resulting image. -message ImageLabel { - // name defines the name of the label. It must have non-zero length. - optional string name = 1; - - // value defines the literal value of the label. - optional string value = 2; -} - -// ImageSource is used to describe build source that will be extracted from an image or used during a -// multi stage build. A reference of type ImageStreamTag, ImageStreamImage or DockerImage may be used. -// A pull secret can be specified to pull the image from an external registry or override the default -// service account secret if pulling from the internal registry. Image sources can either be used to -// extract content from an image and place it into the build context along with the repository source, -// or used directly during a multi-stage container image build to allow content to be copied without overwriting -// the contents of the repository source (see the 'paths' and 'as' fields). -message ImageSource { - // from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to - // copy source from. - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // A list of image names that this source will be used in place of during a multi-stage container image - // build. For instance, a Dockerfile that uses "COPY --from=nginx:latest" will first check for an image - // source that has "nginx:latest" in this field before attempting to pull directly. If the Dockerfile - // does not reference an image source it is ignored. This field and paths may both be set, in which case - // the contents will be used twice. - // +optional - repeated string as = 4; - - // paths is a list of source and destination paths to copy from the image. This content will be copied - // into the build context prior to starting the build. If no paths are set, the build context will - // not be altered. - // +optional - repeated ImageSourcePath paths = 2; - - // pullSecret is a reference to a secret to be used to pull the image from a registry - // If the image is pulled from the OpenShift registry, this field does not need to be set. - optional .k8s.io.api.core.v1.LocalObjectReference pullSecret = 3; -} - -// ImageSourcePath describes a path to be copied from a source image and its destination within the build directory. -message ImageSourcePath { - // sourcePath is the absolute path of the file or directory inside the image to - // copy to the build directory. If the source path ends in /. then the content of - // the directory will be copied, but the directory itself will not be created at the - // destination. - optional string sourcePath = 1; - - // destinationDir is the relative directory within the build directory - // where files copied from the image are placed. - optional string destinationDir = 2; -} - -// ImageStreamTagReference references the ImageStreamTag in an image change trigger by namespace and name. -message ImageStreamTagReference { - // namespace is the namespace where the ImageStreamTag for an ImageChangeTrigger is located - optional string namespace = 1; - - // name is the name of the ImageStreamTag for an ImageChangeTrigger - optional string name = 2; -} - -// JenkinsPipelineBuildStrategy holds parameters specific to a Jenkins Pipeline build. -// Deprecated: use OpenShift Pipelines -message JenkinsPipelineBuildStrategy { - // jenkinsfilePath is the optional path of the Jenkinsfile that will be used to configure the pipeline - // relative to the root of the context (contextDir). If both JenkinsfilePath & Jenkinsfile are - // both not specified, this defaults to Jenkinsfile in the root of the specified contextDir. - optional string jenkinsfilePath = 1; - - // jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build. - optional string jenkinsfile = 2; - - // env contains additional environment variables you want to pass into a build pipeline. - repeated .k8s.io.api.core.v1.EnvVar env = 3; -} - -// OptionalNodeSelector is a map that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message OptionalNodeSelector { - // items, if empty, will result in an empty map - - map items = 1; -} - -// ProxyConfig defines what proxies to use for an operation -message ProxyConfig { - // httpProxy is a proxy used to reach the git repository over http - optional string httpProxy = 3; - - // httpsProxy is a proxy used to reach the git repository over https - optional string httpsProxy = 4; - - // noProxy is the list of domains for which the proxy should not be used - optional string noProxy = 5; -} - -// SecretBuildSource describes a secret and its destination directory that will be -// used only at the build time. The content of the secret referenced here will -// be copied into the destination directory instead of mounting. -message SecretBuildSource { - // secret is a reference to an existing secret that you want to use in your - // build. - optional .k8s.io.api.core.v1.LocalObjectReference secret = 1; - - // destinationDir is the directory where the files from the secret should be - // available for the build time. - // For the Source build strategy, these will be injected into a container - // where the assemble script runs. Later, when the script finishes, all files - // injected will be truncated to zero length. - // For the container image build strategy, these will be copied into the build - // directory, where the Dockerfile is located, so users can ADD or COPY them - // during container image build. - optional string destinationDir = 2; -} - -// SecretLocalReference contains information that points to the local secret being used -message SecretLocalReference { - // name is the name of the resource in the same namespace being referenced - optional string name = 1; -} - -// SecretSpec specifies a secret to be included in a build pod and its corresponding mount point -message SecretSpec { - // secretSource is a reference to the secret - optional .k8s.io.api.core.v1.LocalObjectReference secretSource = 1; - - // mountPath is the path at which to mount the secret - optional string mountPath = 2; -} - -// SourceBuildStrategy defines input parameters specific to an Source build. -message SourceBuildStrategy { - // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which - // the container image should be pulled - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - optional .k8s.io.api.core.v1.LocalObjectReference pullSecret = 2; - - // env contains additional environment variables you want to pass into a builder container. - repeated .k8s.io.api.core.v1.EnvVar env = 3; - - // scripts is the location of Source scripts - optional string scripts = 4; - - // incremental flag forces the Source build to do incremental builds if true. - optional bool incremental = 5; - - // forcePull describes if the builder should pull the images from registry prior to building. - optional bool forcePull = 6; - - // volumes is a list of input volumes that can be mounted into the builds runtime environment. - // Only a subset of Kubernetes Volume sources are supported by builds. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +listType=map - // +listMapKey=name - // +patchMergeKey=name - // +patchStrategy=merge - repeated BuildVolume volumes = 9; -} - -// SourceControlUser defines the identity of a user of source control -message SourceControlUser { - // name of the source control user - optional string name = 1; - - // email of the source control user - optional string email = 2; -} - -// SourceRevision is the revision or commit information from the source for the build -message SourceRevision { - // type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' - // +k8s:conversion-gen=false - optional string type = 1; - - // git contains information about git-based build source - optional GitSourceRevision git = 2; -} - -// SourceStrategyOptions contains extra strategy options for Source builds -message SourceStrategyOptions { - // incremental overrides the source-strategy incremental option in the build config - optional bool incremental = 1; -} - -// StageInfo contains details about a build stage. -message StageInfo { - // name is a unique identifier for each build stage that occurs. - optional string name = 1; - - // startTime is a timestamp representing the server time when this Stage started. - // It is represented in RFC3339 form and is in UTC. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2; - - // durationMilliseconds identifies how long the stage took - // to complete in milliseconds. - // Note: the duration of a stage can exceed the sum of the duration of the steps within - // the stage as not all actions are accounted for in explicit build steps. - optional int64 durationMilliseconds = 3; - - // steps contains details about each step that occurs during a build stage - // including start time and duration in milliseconds. - repeated StepInfo steps = 4; -} - -// StepInfo contains details about a build step. -message StepInfo { - // name is a unique identifier for each build step. - optional string name = 1; - - // startTime is a timestamp representing the server time when this Step started. - // it is represented in RFC3339 form and is in UTC. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time startTime = 2; - - // durationMilliseconds identifies how long the step took - // to complete in milliseconds. - optional int64 durationMilliseconds = 3; -} - -// WebHookTrigger is a trigger that gets invoked using a webhook type of post -message WebHookTrigger { - // secret used to validate requests. - // Deprecated: use SecretReference instead. - optional string secret = 1; - - // allowEnv determines whether the webhook can set environment variables; can only - // be set to true for GenericWebHook. - optional bool allowEnv = 2; - - // secretReference is a reference to a secret in the same namespace, - // containing the value to be validated when the webhook is invoked. - // The secret being referenced must contain a key named "WebHookSecretKey", the value - // of which will be checked against the value supplied in the webhook invocation. - optional SecretLocalReference secretReference = 3; -} - diff --git a/vendor/github.com/openshift/api/build/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/build/v1/generated.protomessage.pb.go deleted file mode 100644 index 02886028c..000000000 --- a/vendor/github.com/openshift/api/build/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,126 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*BinaryBuildRequestOptions) ProtoMessage() {} - -func (*BinaryBuildSource) ProtoMessage() {} - -func (*BitbucketWebHookCause) ProtoMessage() {} - -func (*Build) ProtoMessage() {} - -func (*BuildCondition) ProtoMessage() {} - -func (*BuildConfig) ProtoMessage() {} - -func (*BuildConfigList) ProtoMessage() {} - -func (*BuildConfigSpec) ProtoMessage() {} - -func (*BuildConfigStatus) ProtoMessage() {} - -func (*BuildList) ProtoMessage() {} - -func (*BuildLog) ProtoMessage() {} - -func (*BuildLogOptions) ProtoMessage() {} - -func (*BuildOutput) ProtoMessage() {} - -func (*BuildPostCommitSpec) ProtoMessage() {} - -func (*BuildRequest) ProtoMessage() {} - -func (*BuildSource) ProtoMessage() {} - -func (*BuildSpec) ProtoMessage() {} - -func (*BuildStatus) ProtoMessage() {} - -func (*BuildStatusOutput) ProtoMessage() {} - -func (*BuildStatusOutputTo) ProtoMessage() {} - -func (*BuildStrategy) ProtoMessage() {} - -func (*BuildTriggerCause) ProtoMessage() {} - -func (*BuildTriggerPolicy) ProtoMessage() {} - -func (*BuildVolume) ProtoMessage() {} - -func (*BuildVolumeMount) ProtoMessage() {} - -func (*BuildVolumeSource) ProtoMessage() {} - -func (*CommonSpec) ProtoMessage() {} - -func (*CommonWebHookCause) ProtoMessage() {} - -func (*ConfigMapBuildSource) ProtoMessage() {} - -func (*CustomBuildStrategy) ProtoMessage() {} - -func (*DockerBuildStrategy) ProtoMessage() {} - -func (*DockerStrategyOptions) ProtoMessage() {} - -func (*GenericWebHookCause) ProtoMessage() {} - -func (*GenericWebHookEvent) ProtoMessage() {} - -func (*GitBuildSource) ProtoMessage() {} - -func (*GitHubWebHookCause) ProtoMessage() {} - -func (*GitInfo) ProtoMessage() {} - -func (*GitLabWebHookCause) ProtoMessage() {} - -func (*GitRefInfo) ProtoMessage() {} - -func (*GitSourceRevision) ProtoMessage() {} - -func (*ImageChangeCause) ProtoMessage() {} - -func (*ImageChangeTrigger) ProtoMessage() {} - -func (*ImageChangeTriggerStatus) ProtoMessage() {} - -func (*ImageLabel) ProtoMessage() {} - -func (*ImageSource) ProtoMessage() {} - -func (*ImageSourcePath) ProtoMessage() {} - -func (*ImageStreamTagReference) ProtoMessage() {} - -func (*JenkinsPipelineBuildStrategy) ProtoMessage() {} - -func (*OptionalNodeSelector) ProtoMessage() {} - -func (*ProxyConfig) ProtoMessage() {} - -func (*SecretBuildSource) ProtoMessage() {} - -func (*SecretLocalReference) ProtoMessage() {} - -func (*SecretSpec) ProtoMessage() {} - -func (*SourceBuildStrategy) ProtoMessage() {} - -func (*SourceControlUser) ProtoMessage() {} - -func (*SourceRevision) ProtoMessage() {} - -func (*SourceStrategyOptions) ProtoMessage() {} - -func (*StageInfo) ProtoMessage() {} - -func (*StepInfo) ProtoMessage() {} - -func (*WebHookTrigger) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/build/v1/legacy.go b/vendor/github.com/openshift/api/build/v1/legacy.go deleted file mode 100644 index a74627d2c..000000000 --- a/vendor/github.com/openshift/api/build/v1/legacy.go +++ /dev/null @@ -1,28 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Build{}, - &BuildList{}, - &BuildConfig{}, - &BuildConfigList{}, - &BuildLog{}, - &BuildRequest{}, - &BuildLogOptions{}, - &BinaryBuildRequestOptions{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/build/v1/register.go b/vendor/github.com/openshift/api/build/v1/register.go deleted file mode 100644 index 16f68ea8c..000000000 --- a/vendor/github.com/openshift/api/build/v1/register.go +++ /dev/null @@ -1,47 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "build.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// addKnownTypes adds types to API group -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Build{}, - &BuildList{}, - &BuildConfig{}, - &BuildConfigList{}, - &BuildLog{}, - &BuildRequest{}, - &BuildLogOptions{}, - &BinaryBuildRequestOptions{}, - // This is needed for webhooks - &corev1.PodProxyOptions{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/build/v1/types.go b/vendor/github.com/openshift/api/build/v1/types.go deleted file mode 100644 index b64aacc06..000000000 --- a/vendor/github.com/openshift/api/build/v1/types.go +++ /dev/null @@ -1,1484 +0,0 @@ -package v1 - -import ( - "fmt" - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:method=UpdateDetails,verb=update,subresource=details -// +genclient:method=Clone,verb=create,subresource=clone,input=BuildRequest -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Build encapsulates the inputs needed to produce a new deployable image, as well as -// the status of the execution and a reference to the Pod which executed the build. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Build struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec is all the inputs used to execute the build. - Spec BuildSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // status is the current status of the build. - // +optional - Status BuildStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// BuildSpec has the information to represent a build and also additional -// information about a build -type BuildSpec struct { - // CommonSpec is the information that represents a build - CommonSpec `json:",inline" protobuf:"bytes,1,opt,name=commonSpec"` - - // triggeredBy describes which triggers started the most recent update to the - // build configuration and contains information about those triggers. - TriggeredBy []BuildTriggerCause `json:"triggeredBy,omitempty" protobuf:"bytes,2,rep,name=triggeredBy"` -} - -// OptionalNodeSelector is a map that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type OptionalNodeSelector map[string]string - -func (t OptionalNodeSelector) String() string { - return fmt.Sprintf("%v", map[string]string(t)) -} - -// CommonSpec encapsulates all the inputs necessary to represent a build. -type CommonSpec struct { - // serviceAccount is the name of the ServiceAccount to use to run the pod - // created by this build. - // The pod will be allowed to use secrets referenced by the ServiceAccount - ServiceAccount string `json:"serviceAccount,omitempty" protobuf:"bytes,1,opt,name=serviceAccount"` - - // source describes the SCM in use. - Source BuildSource `json:"source,omitempty" protobuf:"bytes,2,opt,name=source"` - - // revision is the information from the source for a specific repo snapshot. - // This is optional. - Revision *SourceRevision `json:"revision,omitempty" protobuf:"bytes,3,opt,name=revision"` - - // strategy defines how to perform a build. - Strategy BuildStrategy `json:"strategy" protobuf:"bytes,4,opt,name=strategy"` - - // output describes the container image the Strategy should produce. - Output BuildOutput `json:"output,omitempty" protobuf:"bytes,5,opt,name=output"` - - // resources computes resource requirements to execute the build. - Resources corev1.ResourceRequirements `json:"resources,omitempty" protobuf:"bytes,6,opt,name=resources"` - - // postCommit is a build hook executed after the build output image is - // committed, before it is pushed to a registry. - PostCommit BuildPostCommitSpec `json:"postCommit,omitempty" protobuf:"bytes,7,opt,name=postCommit"` - - // completionDeadlineSeconds is an optional duration in seconds, counted from - // the time when a build pod gets scheduled in the system, that the build may - // be active on a node before the system actively tries to terminate the - // build; value must be positive integer - CompletionDeadlineSeconds *int64 `json:"completionDeadlineSeconds,omitempty" protobuf:"varint,8,opt,name=completionDeadlineSeconds"` - - // nodeSelector is a selector which must be true for the build pod to fit on a node - // If nil, it can be overridden by default build nodeselector values for the cluster. - // If set to an empty map or a map with any values, default build nodeselector values - // are ignored. - // +optional - NodeSelector OptionalNodeSelector `json:"nodeSelector" protobuf:"bytes,9,name=nodeSelector"` - - // mountTrustedCA bind mounts the cluster's trusted certificate authorities, as defined in - // the cluster's proxy configuration, into the build. This lets processes within a build trust - // components signed by custom PKI certificate authorities, such as private artifact - // repositories and HTTPS proxies. - // - // When this field is set to true, the contents of `/etc/pki/ca-trust` within the build are - // managed by the build container, and any changes to this directory or its subdirectories (for - // example - within a Dockerfile `RUN` instruction) are not persisted in the build's output image. - MountTrustedCA *bool `json:"mountTrustedCA,omitempty" protobuf:"varint,10,opt,name=mountTrustedCA"` -} - -// BuildTriggerCause holds information about a triggered build. It is used for -// displaying build trigger data for each build and build configuration in oc -// describe. It is also used to describe which triggers led to the most recent -// update in the build configuration. -type BuildTriggerCause struct { - // message is used to store a human readable message for why the build was - // triggered. E.g.: "Manually triggered by user", "Configuration change",etc. - Message string `json:"message,omitempty" protobuf:"bytes,1,opt,name=message"` - - // genericWebHook holds data about a builds generic webhook trigger. - GenericWebHook *GenericWebHookCause `json:"genericWebHook,omitempty" protobuf:"bytes,2,opt,name=genericWebHook"` - - // githubWebHook represents data for a GitHub webhook that fired a - //specific build. - GitHubWebHook *GitHubWebHookCause `json:"githubWebHook,omitempty" protobuf:"bytes,3,opt,name=githubWebHook"` - - // imageChangeBuild stores information about an imagechange event - // that triggered a new build. - ImageChangeBuild *ImageChangeCause `json:"imageChangeBuild,omitempty" protobuf:"bytes,4,opt,name=imageChangeBuild"` - - // gitlabWebHook represents data for a GitLab webhook that fired a specific - // build. - GitLabWebHook *GitLabWebHookCause `json:"gitlabWebHook,omitempty" protobuf:"bytes,5,opt,name=gitlabWebHook"` - - // bitbucketWebHook represents data for a Bitbucket webhook that fired a - // specific build. - BitbucketWebHook *BitbucketWebHookCause `json:"bitbucketWebHook,omitempty" protobuf:"bytes,6,opt,name=bitbucketWebHook"` -} - -// GenericWebHookCause holds information about a generic WebHook that -// triggered a build. -type GenericWebHookCause struct { - // revision is an optional field that stores the git source revision - // information of the generic webhook trigger when it is available. - Revision *SourceRevision `json:"revision,omitempty" protobuf:"bytes,1,opt,name=revision"` - - // secret is the obfuscated webhook secret that triggered a build. - Secret string `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` -} - -// GitHubWebHookCause has information about a GitHub webhook that triggered a -// build. -type GitHubWebHookCause struct { - // revision is the git revision information of the trigger. - Revision *SourceRevision `json:"revision,omitempty" protobuf:"bytes,1,opt,name=revision"` - - // secret is the obfuscated webhook secret that triggered a build. - Secret string `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` -} - -// CommonWebHookCause factors out the identical format of these webhook -// causes into struct so we can share it in the specific causes; it is too late for -// GitHub and Generic but we can leverage this pattern with GitLab and Bitbucket. -type CommonWebHookCause struct { - // revision is the git source revision information of the trigger. - Revision *SourceRevision `json:"revision,omitempty" protobuf:"bytes,1,opt,name=revision"` - - // secret is the obfuscated webhook secret that triggered a build. - Secret string `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` -} - -// GitLabWebHookCause has information about a GitLab webhook that triggered a -// build. -type GitLabWebHookCause struct { - CommonWebHookCause `json:",inline" protobuf:"bytes,1,opt,name=commonSpec"` -} - -// BitbucketWebHookCause has information about a Bitbucket webhook that triggered a -// build. -type BitbucketWebHookCause struct { - CommonWebHookCause `json:",inline" protobuf:"bytes,1,opt,name=commonSpec"` -} - -// ImageChangeCause contains information about the image that triggered a -// build -type ImageChangeCause struct { - // imageID is the ID of the image that triggered a new build. - ImageID string `json:"imageID,omitempty" protobuf:"bytes,1,opt,name=imageID"` - - // fromRef contains detailed information about an image that triggered a - // build. - FromRef *corev1.ObjectReference `json:"fromRef,omitempty" protobuf:"bytes,2,opt,name=fromRef"` -} - -// BuildStatus contains the status of a build -type BuildStatus struct { - // phase is the point in the build lifecycle. Possible values are - // "New", "Pending", "Running", "Complete", "Failed", "Error", and "Cancelled". - // +optional - Phase BuildPhase `json:"phase" protobuf:"bytes,1,opt,name=phase,casttype=BuildPhase"` - - // cancelled describes if a cancel event was triggered for the build. - // +optional - Cancelled bool `json:"cancelled,omitempty" protobuf:"varint,2,opt,name=cancelled"` - - // reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI. - // +optional - Reason StatusReason `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason,casttype=StatusReason"` - - // message is a human-readable message indicating details about why the build has this status. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` - - // startTimestamp is a timestamp representing the server time when this Build started - // running in a Pod. - // It is represented in RFC3339 form and is in UTC. - // +optional - StartTimestamp *metav1.Time `json:"startTimestamp,omitempty" protobuf:"bytes,5,opt,name=startTimestamp"` - - // completionTimestamp is a timestamp representing the server time when this Build was - // finished, whether that build failed or succeeded. It reflects the time at which - // the Pod running the Build terminated. - // It is represented in RFC3339 form and is in UTC. - // +optional - CompletionTimestamp *metav1.Time `json:"completionTimestamp,omitempty" protobuf:"bytes,6,opt,name=completionTimestamp"` - - // duration contains time.Duration object describing build time. - // +optional - Duration time.Duration `json:"duration,omitempty" protobuf:"varint,7,opt,name=duration,casttype=time.Duration"` - - // outputDockerImageReference contains a reference to the container image that - // will be built by this build. Its value is computed from - // Build.Spec.Output.To, and should include the registry address, so that - // it can be used to push and pull the image. - // +optional - OutputDockerImageReference string `json:"outputDockerImageReference,omitempty" protobuf:"bytes,8,opt,name=outputDockerImageReference"` - - // config is an ObjectReference to the BuildConfig this Build is based on. - // +optional - Config *corev1.ObjectReference `json:"config,omitempty" protobuf:"bytes,9,opt,name=config"` - - // output describes the container image the build has produced. - // +optional - Output BuildStatusOutput `json:"output,omitempty" protobuf:"bytes,10,opt,name=output"` - - // stages contains details about each stage that occurs during the build - // including start time, duration (in milliseconds), and the steps that - // occured within each stage. - // +optional - Stages []StageInfo `json:"stages,omitempty" protobuf:"bytes,11,opt,name=stages"` - - // logSnippet is the last few lines of the build log. This value is only set for builds that failed. - // +optional - LogSnippet string `json:"logSnippet,omitempty" protobuf:"bytes,12,opt,name=logSnippet"` - - // conditions represents the latest available observations of a build's current state. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []BuildCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,13,rep,name=conditions"` -} - -// StageInfo contains details about a build stage. -type StageInfo struct { - // name is a unique identifier for each build stage that occurs. - Name StageName `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // startTime is a timestamp representing the server time when this Stage started. - // It is represented in RFC3339 form and is in UTC. - StartTime metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` - - // durationMilliseconds identifies how long the stage took - // to complete in milliseconds. - // Note: the duration of a stage can exceed the sum of the duration of the steps within - // the stage as not all actions are accounted for in explicit build steps. - DurationMilliseconds int64 `json:"durationMilliseconds,omitempty" protobuf:"varint,3,opt,name=durationMilliseconds"` - - // steps contains details about each step that occurs during a build stage - // including start time and duration in milliseconds. - Steps []StepInfo `json:"steps,omitempty" protobuf:"bytes,4,opt,name=steps"` -} - -// StageName is the unique identifier for each build stage. -type StageName string - -// Valid values for StageName -const ( - // StageFetchInputs fetches any inputs such as source code. - StageFetchInputs StageName = "FetchInputs" - - // StagePullImages pulls any images that are needed such as - // base images or input images. - StagePullImages StageName = "PullImages" - - // StageBuild performs the steps necessary to build the image. - StageBuild StageName = "Build" - - // StagePostCommit executes any post commit steps. - StagePostCommit StageName = "PostCommit" - - // StagePushImage pushes the image to the node. - StagePushImage StageName = "PushImage" -) - -// StepInfo contains details about a build step. -type StepInfo struct { - // name is a unique identifier for each build step. - Name StepName `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // startTime is a timestamp representing the server time when this Step started. - // it is represented in RFC3339 form and is in UTC. - StartTime metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` - - // durationMilliseconds identifies how long the step took - // to complete in milliseconds. - DurationMilliseconds int64 `json:"durationMilliseconds,omitempty" protobuf:"varint,3,opt,name=durationMilliseconds"` -} - -// StepName is a unique identifier for each build step. -type StepName string - -// Valid values for StepName -const ( - // StepExecPostCommitHook executes the buildconfigs post commit hook. - StepExecPostCommitHook StepName = "RunPostCommitHook" - - // StepFetchGitSource fetches source code for the build. - StepFetchGitSource StepName = "FetchGitSource" - - // StepPullBaseImage pulls a base image for the build. - StepPullBaseImage StepName = "PullBaseImage" - - // StepPullInputImage pulls an input image for the build. - StepPullInputImage StepName = "PullInputImage" - - // StepPushImage pushes an image to the registry. - StepPushImage StepName = "PushImage" - - // StepPushDockerImage pushes a container image to the registry. - StepPushDockerImage StepName = "PushDockerImage" - - //StepDockerBuild performs the container image build - StepDockerBuild StepName = "DockerBuild" -) - -// BuildPhase represents the status of a build at a point in time. -type BuildPhase string - -// Valid values for BuildPhase. -const ( - // BuildPhaseNew is automatically assigned to a newly created build. - BuildPhaseNew BuildPhase = "New" - - // BuildPhasePending indicates that a pod name has been assigned and a build is - // about to start running. - BuildPhasePending BuildPhase = "Pending" - - // BuildPhaseRunning indicates that a pod has been created and a build is running. - BuildPhaseRunning BuildPhase = "Running" - - // BuildPhaseComplete indicates that a build has been successful. - BuildPhaseComplete BuildPhase = "Complete" - - // BuildPhaseFailed indicates that a build has executed and failed. - BuildPhaseFailed BuildPhase = "Failed" - - // BuildPhaseError indicates that an error prevented the build from executing. - BuildPhaseError BuildPhase = "Error" - - // BuildPhaseCancelled indicates that a running/pending build was stopped from executing. - BuildPhaseCancelled BuildPhase = "Cancelled" -) - -type BuildConditionType string - -// BuildCondition describes the state of a build at a certain point. -type BuildCondition struct { - // type of build condition. - Type BuildConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=BuildConditionType"` - // status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` - // The last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,6,opt,name=lastUpdateTime"` - // The last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // The reason for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // A human readable message indicating details about the transition. - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// StatusReason is a brief CamelCase string that describes a temporary or -// permanent build error condition, meant for machine parsing and tidy display -// in the CLI. -type StatusReason string - -// BuildStatusOutput contains the status of the built image. -type BuildStatusOutput struct { - // to describes the status of the built image being pushed to a registry. - To *BuildStatusOutputTo `json:"to,omitempty" protobuf:"bytes,1,opt,name=to"` -} - -// BuildStatusOutputTo describes the status of the built image with regards to -// image registry to which it was supposed to be pushed. -type BuildStatusOutputTo struct { - // imageDigest is the digest of the built container image. The digest uniquely - // identifies the image in the registry to which it was pushed. - // - // Please note that this field may not always be set even if the push - // completes successfully - e.g. when the registry returns no digest or - // returns it in a format that the builder doesn't understand. - ImageDigest string `json:"imageDigest,omitempty" protobuf:"bytes,1,opt,name=imageDigest"` -} - -// BuildSourceType is the type of SCM used. -type BuildSourceType string - -// Valid values for BuildSourceType. -const ( - //BuildSourceGit instructs a build to use a Git source control repository as the build input. - BuildSourceGit BuildSourceType = "Git" - // BuildSourceDockerfile uses a Dockerfile as the start of a build - BuildSourceDockerfile BuildSourceType = "Dockerfile" - // BuildSourceBinary indicates the build will accept a Binary file as input. - BuildSourceBinary BuildSourceType = "Binary" - // BuildSourceImage indicates the build will accept an image as input - BuildSourceImage BuildSourceType = "Image" - // BuildSourceNone indicates the build has no predefined input (only valid for Source and Custom Strategies) - BuildSourceNone BuildSourceType = "None" -) - -// BuildSource is the SCM used for the build. -type BuildSource struct { - // type of build input to accept - // +k8s:conversion-gen=false - // +optional - Type BuildSourceType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=BuildSourceType"` - - // binary builds accept a binary as their input. The binary is generally assumed to be a tar, - // gzipped tar, or zip file depending on the strategy. For container image builds, this is the build - // context and an optional Dockerfile may be specified to override any Dockerfile in the - // build context. For Source builds, this is assumed to be an archive as described above. For - // Source and container image builds, if binary.asFile is set the build will receive a directory with - // a single file. contextDir may be used when an archive is provided. Custom builds will - // receive this binary as input on STDIN. - Binary *BinaryBuildSource `json:"binary,omitempty" protobuf:"bytes,2,opt,name=binary"` - - // dockerfile is the raw contents of a Dockerfile which should be built. When this option is - // specified, the FROM may be modified based on your strategy base image and additional ENV - // stanzas from your strategy environment will be added after the FROM, but before the rest - // of your Dockerfile stanzas. The Dockerfile source type may be used with other options like - // git - in those cases the Git repo will have any innate Dockerfile replaced in the context - // dir. - Dockerfile *string `json:"dockerfile,omitempty" protobuf:"bytes,3,opt,name=dockerfile"` - - // git contains optional information about git build source - Git *GitBuildSource `json:"git,omitempty" protobuf:"bytes,4,opt,name=git"` - - // images describes a set of images to be used to provide source for the build - Images []ImageSource `json:"images,omitempty" protobuf:"bytes,5,rep,name=images"` - - // contextDir specifies the sub-directory where the source code for the application exists. - // This allows to have buildable sources in directory other than root of - // repository. - ContextDir string `json:"contextDir,omitempty" protobuf:"bytes,6,opt,name=contextDir"` - - // sourceSecret is the name of a Secret that would be used for setting - // up the authentication for cloning private repository. - // The secret contains valid credentials for remote repository, where the - // data's key represent the authentication method to be used and value is - // the base64 encoded credentials. Supported auth methods are: ssh-privatekey. - SourceSecret *corev1.LocalObjectReference `json:"sourceSecret,omitempty" protobuf:"bytes,7,opt,name=sourceSecret"` - - // secrets represents a list of secrets and their destinations that will - // be used only for the build. - Secrets []SecretBuildSource `json:"secrets,omitempty" protobuf:"bytes,8,rep,name=secrets"` - - // configMaps represents a list of configMaps and their destinations that will - // be used for the build. - ConfigMaps []ConfigMapBuildSource `json:"configMaps,omitempty" protobuf:"bytes,9,rep,name=configMaps"` -} - -// ImageSource is used to describe build source that will be extracted from an image or used during a -// multi stage build. A reference of type ImageStreamTag, ImageStreamImage or DockerImage may be used. -// A pull secret can be specified to pull the image from an external registry or override the default -// service account secret if pulling from the internal registry. Image sources can either be used to -// extract content from an image and place it into the build context along with the repository source, -// or used directly during a multi-stage container image build to allow content to be copied without overwriting -// the contents of the repository source (see the 'paths' and 'as' fields). -type ImageSource struct { - // from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to - // copy source from. - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - - // A list of image names that this source will be used in place of during a multi-stage container image - // build. For instance, a Dockerfile that uses "COPY --from=nginx:latest" will first check for an image - // source that has "nginx:latest" in this field before attempting to pull directly. If the Dockerfile - // does not reference an image source it is ignored. This field and paths may both be set, in which case - // the contents will be used twice. - // +optional - As []string `json:"as,omitempty" protobuf:"bytes,4,rep,name=as"` - - // paths is a list of source and destination paths to copy from the image. This content will be copied - // into the build context prior to starting the build. If no paths are set, the build context will - // not be altered. - // +optional - Paths []ImageSourcePath `json:"paths,omitempty" protobuf:"bytes,2,rep,name=paths"` - - // pullSecret is a reference to a secret to be used to pull the image from a registry - // If the image is pulled from the OpenShift registry, this field does not need to be set. - PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty" protobuf:"bytes,3,opt,name=pullSecret"` -} - -// ImageSourcePath describes a path to be copied from a source image and its destination within the build directory. -type ImageSourcePath struct { - // sourcePath is the absolute path of the file or directory inside the image to - // copy to the build directory. If the source path ends in /. then the content of - // the directory will be copied, but the directory itself will not be created at the - // destination. - SourcePath string `json:"sourcePath" protobuf:"bytes,1,opt,name=sourcePath"` - - // destinationDir is the relative directory within the build directory - // where files copied from the image are placed. - DestinationDir string `json:"destinationDir" protobuf:"bytes,2,opt,name=destinationDir"` -} - -// SecretBuildSource describes a secret and its destination directory that will be -// used only at the build time. The content of the secret referenced here will -// be copied into the destination directory instead of mounting. -type SecretBuildSource struct { - // secret is a reference to an existing secret that you want to use in your - // build. - Secret corev1.LocalObjectReference `json:"secret" protobuf:"bytes,1,opt,name=secret"` - - // destinationDir is the directory where the files from the secret should be - // available for the build time. - // For the Source build strategy, these will be injected into a container - // where the assemble script runs. Later, when the script finishes, all files - // injected will be truncated to zero length. - // For the container image build strategy, these will be copied into the build - // directory, where the Dockerfile is located, so users can ADD or COPY them - // during container image build. - DestinationDir string `json:"destinationDir,omitempty" protobuf:"bytes,2,opt,name=destinationDir"` -} - -// ConfigMapBuildSource describes a configmap and its destination directory that will be -// used only at the build time. The content of the configmap referenced here will -// be copied into the destination directory instead of mounting. -type ConfigMapBuildSource struct { - // configMap is a reference to an existing configmap that you want to use in your - // build. - ConfigMap corev1.LocalObjectReference `json:"configMap" protobuf:"bytes,1,opt,name=configMap"` - - // destinationDir is the directory where the files from the configmap should be - // available for the build time. - // For the Source build strategy, these will be injected into a container - // where the assemble script runs. - // For the container image build strategy, these will be copied into the build - // directory, where the Dockerfile is located, so users can ADD or COPY them - // during container image build. - DestinationDir string `json:"destinationDir,omitempty" protobuf:"bytes,2,opt,name=destinationDir"` -} - -// BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, -// where the file will be extracted and used as the build source. -type BinaryBuildSource struct { - // asFile indicates that the provided binary input should be considered a single file - // within the build input. For example, specifying "webapp.war" would place the provided - // binary as `/webapp.war` for the builder. If left empty, the Docker and Source build - // strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. - // The custom strategy receives this binary as standard input. This filename may not - // contain slashes or be '..' or '.'. - AsFile string `json:"asFile,omitempty" protobuf:"bytes,1,opt,name=asFile"` -} - -// SourceRevision is the revision or commit information from the source for the build -type SourceRevision struct { - // type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images' - // +k8s:conversion-gen=false - Type BuildSourceType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=BuildSourceType"` - - // git contains information about git-based build source - Git *GitSourceRevision `json:"git,omitempty" protobuf:"bytes,2,opt,name=git"` -} - -// GitSourceRevision is the commit information from a git source for a build -type GitSourceRevision struct { - // commit is the commit hash identifying a specific commit - Commit string `json:"commit,omitempty" protobuf:"bytes,1,opt,name=commit"` - - // author is the author of a specific commit - Author SourceControlUser `json:"author,omitempty" protobuf:"bytes,2,opt,name=author"` - - // committer is the committer of a specific commit - Committer SourceControlUser `json:"committer,omitempty" protobuf:"bytes,3,opt,name=committer"` - - // message is the description of a specific commit - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` -} - -// ProxyConfig defines what proxies to use for an operation -type ProxyConfig struct { - // httpProxy is a proxy used to reach the git repository over http - HTTPProxy *string `json:"httpProxy,omitempty" protobuf:"bytes,3,opt,name=httpProxy"` - - // httpsProxy is a proxy used to reach the git repository over https - HTTPSProxy *string `json:"httpsProxy,omitempty" protobuf:"bytes,4,opt,name=httpsProxy"` - - // noProxy is the list of domains for which the proxy should not be used - NoProxy *string `json:"noProxy,omitempty" protobuf:"bytes,5,opt,name=noProxy"` -} - -// GitBuildSource defines the parameters of a Git SCM -type GitBuildSource struct { - // uri points to the source that will be built. The structure of the source - // will depend on the type of build to run - URI string `json:"uri" protobuf:"bytes,1,opt,name=uri"` - - // ref is the branch/tag/ref to build. - Ref string `json:"ref,omitempty" protobuf:"bytes,2,opt,name=ref"` - - // proxyConfig defines the proxies to use for the git clone operation. Values - // not set here are inherited from cluster-wide build git proxy settings. - ProxyConfig `json:",inline" protobuf:"bytes,3,opt,name=proxyConfig"` -} - -// SourceControlUser defines the identity of a user of source control -type SourceControlUser struct { - // name of the source control user - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` - - // email of the source control user - Email string `json:"email,omitempty" protobuf:"bytes,2,opt,name=email"` -} - -// BuildStrategy contains the details of how to perform a build. -type BuildStrategy struct { - // type is the kind of build strategy. - // +k8s:conversion-gen=false - // +optional - Type BuildStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=BuildStrategyType"` - - // dockerStrategy holds the parameters to the container image build strategy. - DockerStrategy *DockerBuildStrategy `json:"dockerStrategy,omitempty" protobuf:"bytes,2,opt,name=dockerStrategy"` - - // sourceStrategy holds the parameters to the Source build strategy. - SourceStrategy *SourceBuildStrategy `json:"sourceStrategy,omitempty" protobuf:"bytes,3,opt,name=sourceStrategy"` - - // customStrategy holds the parameters to the Custom build strategy - CustomStrategy *CustomBuildStrategy `json:"customStrategy,omitempty" protobuf:"bytes,4,opt,name=customStrategy"` - - // jenkinsPipelineStrategy holds the parameters to the Jenkins Pipeline build strategy. - // Deprecated: use OpenShift Pipelines - JenkinsPipelineStrategy *JenkinsPipelineBuildStrategy `json:"jenkinsPipelineStrategy,omitempty" protobuf:"bytes,5,opt,name=jenkinsPipelineStrategy"` -} - -// BuildStrategyType describes a particular way of performing a build. -type BuildStrategyType string - -// Valid values for BuildStrategyType. -const ( - // DockerBuildStrategyType performs builds using a Dockerfile. - DockerBuildStrategyType BuildStrategyType = "Docker" - - // SourceBuildStrategyType performs builds build using Source To Images with a Git repository - // and a builder image. - SourceBuildStrategyType BuildStrategyType = "Source" - - // CustomBuildStrategyType performs builds using custom builder container image. - CustomBuildStrategyType BuildStrategyType = "Custom" - - // JenkinsPipelineBuildStrategyType indicates the build will run via Jenkine Pipeline. - JenkinsPipelineBuildStrategyType BuildStrategyType = "JenkinsPipeline" -) - -// CustomBuildStrategy defines input parameters specific to Custom build. -type CustomBuildStrategy struct { - // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which - // the container image should be pulled - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty" protobuf:"bytes,2,opt,name=pullSecret"` - - // env contains additional environment variables you want to pass into a builder container. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,3,rep,name=env"` - - // exposeDockerSocket will allow running Docker commands (and build container images) from - // inside the container. - // TODO: Allow admins to enforce 'false' for this option - ExposeDockerSocket bool `json:"exposeDockerSocket,omitempty" protobuf:"varint,4,opt,name=exposeDockerSocket"` - - // forcePull describes if the controller should configure the build pod to always pull the images - // for the builder or only pull if it is not present locally - ForcePull bool `json:"forcePull,omitempty" protobuf:"varint,5,opt,name=forcePull"` - - // secrets is a list of additional secrets that will be included in the build pod - Secrets []SecretSpec `json:"secrets,omitempty" protobuf:"bytes,6,rep,name=secrets"` - - // buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder - BuildAPIVersion string `json:"buildAPIVersion,omitempty" protobuf:"bytes,7,opt,name=buildAPIVersion"` -} - -// ImageOptimizationPolicy describes what optimizations the builder can perform when building images. -type ImageOptimizationPolicy string - -const ( - // ImageOptimizationNone will generate a canonical container image as produced by the - // `container image build` command. - ImageOptimizationNone ImageOptimizationPolicy = "None" - - // ImageOptimizationSkipLayers is an experimental policy and will avoid creating - // unique layers for each dockerfile line, resulting in smaller images and saving time - // during creation. Some Dockerfile syntax is not fully supported - content added to - // a VOLUME by an earlier layer may have incorrect uid, gid, and filesystem permissions. - // If an unsupported setting is detected, the build will fail. - ImageOptimizationSkipLayers ImageOptimizationPolicy = "SkipLayers" - - // ImageOptimizationSkipLayersAndWarn is the same as SkipLayers, but will only - // warn to the build output instead of failing when unsupported syntax is detected. This - // policy is experimental. - ImageOptimizationSkipLayersAndWarn ImageOptimizationPolicy = "SkipLayersAndWarn" -) - -// DockerBuildStrategy defines input parameters specific to container image build. -type DockerBuildStrategy struct { - // from is a reference to an DockerImage, ImageStreamTag, or ImageStreamImage which overrides - // the FROM image in the Dockerfile for the build. If the Dockerfile uses multi-stage builds, - // this will replace the image in the last FROM directive of the file. - From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,1,opt,name=from"` - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty" protobuf:"bytes,2,opt,name=pullSecret"` - - // noCache if set to true indicates that the container image build must be executed with the - // --no-cache=true flag - NoCache bool `json:"noCache,omitempty" protobuf:"varint,3,opt,name=noCache"` - - // env contains additional environment variables you want to pass into a builder container. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,4,rep,name=env"` - - // forcePull describes if the builder should pull the images from registry prior to building. - ForcePull bool `json:"forcePull,omitempty" protobuf:"varint,5,opt,name=forcePull"` - - // dockerfilePath is the path of the Dockerfile that will be used to build the container image, - // relative to the root of the context (contextDir). - // Defaults to `Dockerfile` if unset. - DockerfilePath string `json:"dockerfilePath,omitempty" protobuf:"bytes,6,opt,name=dockerfilePath"` - - // buildArgs contains build arguments that will be resolved in the Dockerfile. See - // https://docs.docker.com/engine/reference/builder/#/arg for more details. - // NOTE: Only the 'name' and 'value' fields are supported. Any settings on the 'valueFrom' field - // are ignored. - BuildArgs []corev1.EnvVar `json:"buildArgs,omitempty" protobuf:"bytes,7,rep,name=buildArgs"` - - // imageOptimizationPolicy describes what optimizations the system can use when building images - // to reduce the final size or time spent building the image. The default policy is 'None' which - // means the final build image will be equivalent to an image created by the container image build API. - // The experimental policy 'SkipLayers' will avoid commiting new layers in between each - // image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' - // policy. An additional experimental policy 'SkipLayersAndWarn' is the same as - // 'SkipLayers' but simply warns if compatibility cannot be preserved. - ImageOptimizationPolicy *ImageOptimizationPolicy `json:"imageOptimizationPolicy,omitempty" protobuf:"bytes,8,opt,name=imageOptimizationPolicy,casttype=ImageOptimizationPolicy"` - - // volumes is a list of input volumes that can be mounted into the builds runtime environment. - // Only a subset of Kubernetes Volume sources are supported by builds. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +listType=map - // +listMapKey=name - // +patchMergeKey=name - // +patchStrategy=merge - Volumes []BuildVolume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,9,opt,name=volumes"` -} - -// SourceBuildStrategy defines input parameters specific to an Source build. -type SourceBuildStrategy struct { - // from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which - // the container image should be pulled - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - - // pullSecret is the name of a Secret that would be used for setting up - // the authentication for pulling the container images from the private Docker - // registries - PullSecret *corev1.LocalObjectReference `json:"pullSecret,omitempty" protobuf:"bytes,2,opt,name=pullSecret"` - - // env contains additional environment variables you want to pass into a builder container. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,3,rep,name=env"` - - // scripts is the location of Source scripts - Scripts string `json:"scripts,omitempty" protobuf:"bytes,4,opt,name=scripts"` - - // incremental flag forces the Source build to do incremental builds if true. - Incremental *bool `json:"incremental,omitempty" protobuf:"varint,5,opt,name=incremental"` - - // forcePull describes if the builder should pull the images from registry prior to building. - ForcePull bool `json:"forcePull,omitempty" protobuf:"varint,6,opt,name=forcePull"` - - // deprecated json field, do not reuse: runtimeImage - // +k8s:protobuf-deprecated=runtimeImage,7 - - // deprecated json field, do not reuse: runtimeArtifacts - // +k8s:protobuf-deprecated=runtimeArtifacts,8 - - // volumes is a list of input volumes that can be mounted into the builds runtime environment. - // Only a subset of Kubernetes Volume sources are supported by builds. - // More info: https://kubernetes.io/docs/concepts/storage/volumes - // +listType=map - // +listMapKey=name - // +patchMergeKey=name - // +patchStrategy=merge - Volumes []BuildVolume `json:"volumes,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,9,opt,name=volumes"` -} - -// JenkinsPipelineBuildStrategy holds parameters specific to a Jenkins Pipeline build. -// Deprecated: use OpenShift Pipelines -type JenkinsPipelineBuildStrategy struct { - // jenkinsfilePath is the optional path of the Jenkinsfile that will be used to configure the pipeline - // relative to the root of the context (contextDir). If both JenkinsfilePath & Jenkinsfile are - // both not specified, this defaults to Jenkinsfile in the root of the specified contextDir. - JenkinsfilePath string `json:"jenkinsfilePath,omitempty" protobuf:"bytes,1,opt,name=jenkinsfilePath"` - - // jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build. - Jenkinsfile string `json:"jenkinsfile,omitempty" protobuf:"bytes,2,opt,name=jenkinsfile"` - - // env contains additional environment variables you want to pass into a build pipeline. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,3,rep,name=env"` -} - -// A BuildPostCommitSpec holds a build post commit hook specification. The hook -// executes a command in a temporary container running the build output image, -// immediately after the last layer of the image is committed and before the -// image is pushed to a registry. The command is executed with the current -// working directory ($PWD) set to the image's WORKDIR. -// -// The build will be marked as failed if the hook execution fails. It will fail -// if the script or command return a non-zero exit code, or if there is any -// other error related to starting the temporary container. -// -// There are five different ways to configure the hook. As an example, all forms -// below are equivalent and will execute `rake test --verbose`. -// -// 1. Shell script: -// -// "postCommit": { -// "script": "rake test --verbose", -// } -// -// The above is a convenient form which is equivalent to: -// -// "postCommit": { -// "command": ["/bin/sh", "-ic"], -// "args": ["rake test --verbose"] -// } -// -// 2. A command as the image entrypoint: -// -// "postCommit": { -// "commit": ["rake", "test", "--verbose"] -// } -// -// Command overrides the image entrypoint in the exec form, as documented in -// Docker: https://docs.docker.com/engine/reference/builder/#entrypoint. -// -// 3. Pass arguments to the default entrypoint: -// -// "postCommit": { -// "args": ["rake", "test", "--verbose"] -// } -// -// This form is only useful if the image entrypoint can handle arguments. -// -// 4. Shell script with arguments: -// -// "postCommit": { -// "script": "rake test $1", -// "args": ["--verbose"] -// } -// -// This form is useful if you need to pass arguments that would otherwise be -// hard to quote properly in the shell script. In the script, $0 will be -// "/bin/sh" and $1, $2, etc, are the positional arguments from Args. -// -// 5. Command with arguments: -// -// "postCommit": { -// "command": ["rake", "test"], -// "args": ["--verbose"] -// } -// -// This form is equivalent to appending the arguments to the Command slice. -// -// It is invalid to provide both Script and Command simultaneously. If none of -// the fields are specified, the hook is not executed. -type BuildPostCommitSpec struct { - // command is the command to run. It may not be specified with Script. - // This might be needed if the image doesn't have `/bin/sh`, or if you - // do not want to use a shell. In all other cases, using Script might be - // more convenient. - Command []string `json:"command,omitempty" protobuf:"bytes,1,rep,name=command"` - // args is a list of arguments that are provided to either Command, - // Script or the container image's default entrypoint. The arguments are - // placed immediately after the command to be run. - Args []string `json:"args,omitempty" protobuf:"bytes,2,rep,name=args"` - // script is a shell script to be run with `/bin/sh -ic`. It may not be - // specified with Command. Use Script when a shell script is appropriate - // to execute the post build hook, for example for running unit tests - // with `rake test`. If you need control over the image entrypoint, or - // if the image does not have `/bin/sh`, use Command and/or Args. - // The `-i` flag is needed to support CentOS and RHEL images that use - // Software Collections (SCL), in order to have the appropriate - // collections enabled in the shell. E.g., in the Ruby image, this is - // necessary to make `ruby`, `bundle` and other binaries available in - // the PATH. - Script string `json:"script,omitempty" protobuf:"bytes,3,opt,name=script"` -} - -// BuildOutput is input to a build strategy and describes the container image that the strategy -// should produce. -type BuildOutput struct { - // to defines an optional location to push the output of this build to. - // Kind must be one of 'ImageStreamTag' or 'DockerImage'. - // This value will be used to look up a container image repository to push to. - // In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of - // the build unless Namespace is specified. - To *corev1.ObjectReference `json:"to,omitempty" protobuf:"bytes,1,opt,name=to"` - - // pushSecret is the name of a Secret that would be used for setting - // up the authentication for executing the Docker push to authentication - // enabled Docker Registry (or Docker Hub). - PushSecret *corev1.LocalObjectReference `json:"pushSecret,omitempty" protobuf:"bytes,2,opt,name=pushSecret"` - - // imageLabels define a list of labels that are applied to the resulting image. If there - // are multiple labels with the same name then the last one in the list is used. - ImageLabels []ImageLabel `json:"imageLabels,omitempty" protobuf:"bytes,3,rep,name=imageLabels"` -} - -// ImageLabel represents a label applied to the resulting image. -type ImageLabel struct { - // name defines the name of the label. It must have non-zero length. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // value defines the literal value of the label. - Value string `json:"value,omitempty" protobuf:"bytes,2,opt,name=value"` -} - -// +genclient -// +genclient:method=Instantiate,verb=create,subresource=instantiate,input=BuildRequest,result=Build -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Build configurations define a build process for new container images. There are three types of builds possible - a container image build using a Dockerfile, a Source-to-Image build that uses a specially prepared base image that accepts source code that it can make runnable, and a custom build that can run // arbitrary container images as a base and accept the build parameters. Builds run on the cluster and on completion are pushed to the container image registry specified in the "output" section. A build can be triggered via a webhook, when the base image changes, or when a user manually requests a new build be // created. -// -// Each build created by a build configuration is numbered and refers back to its parent configuration. Multiple builds can be triggered at once. Builds that do not have "output" set can be used to test code or run a verification build. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec holds all the input necessary to produce a new build, and the conditions when - // to trigger them. - Spec BuildConfigSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status holds any relevant information about a build config - // +optional - Status BuildConfigStatus `json:"status" protobuf:"bytes,3,opt,name=status"` -} - -// BuildConfigSpec describes when and how builds are created -type BuildConfigSpec struct { - - //triggers determine how new Builds can be launched from a BuildConfig. If - //no triggers are defined, a new build can only occur as a result of an - //explicit client build creation. - // +optional - Triggers []BuildTriggerPolicy `json:"triggers,omitempty" protobuf:"bytes,1,rep,name=triggers"` - - // runPolicy describes how the new build created from this build - // configuration will be scheduled for execution. - // This is optional, if not specified we default to "Serial". - RunPolicy BuildRunPolicy `json:"runPolicy,omitempty" protobuf:"bytes,2,opt,name=runPolicy,casttype=BuildRunPolicy"` - - // CommonSpec is the desired build specification - CommonSpec `json:",inline" protobuf:"bytes,3,opt,name=commonSpec"` - - // successfulBuildsHistoryLimit is the number of old successful builds to retain. - // When a BuildConfig is created, the 5 most recent successful builds are retained unless this value is set. - // If removed after the BuildConfig has been created, all successful builds are retained. - SuccessfulBuildsHistoryLimit *int32 `json:"successfulBuildsHistoryLimit,omitempty" protobuf:"varint,4,opt,name=successfulBuildsHistoryLimit"` - - // failedBuildsHistoryLimit is the number of old failed builds to retain. - // When a BuildConfig is created, the 5 most recent failed builds are retained unless this value is set. - // If removed after the BuildConfig has been created, all failed builds are retained. - FailedBuildsHistoryLimit *int32 `json:"failedBuildsHistoryLimit,omitempty" protobuf:"varint,5,opt,name=failedBuildsHistoryLimit"` -} - -// BuildRunPolicy defines the behaviour of how the new builds are executed -// from the existing build configuration. -type BuildRunPolicy string - -const ( - // BuildRunPolicyParallel schedules new builds immediately after they are - // created. Builds will be executed in parallel. - BuildRunPolicyParallel BuildRunPolicy = "Parallel" - - // BuildRunPolicySerial schedules new builds to execute in a sequence as - // they are created. Every build gets queued up and will execute when the - // previous build completes. This is the default policy. - BuildRunPolicySerial BuildRunPolicy = "Serial" - - // BuildRunPolicySerialLatestOnly schedules only the latest build to execute, - // cancelling all the previously queued build. - BuildRunPolicySerialLatestOnly BuildRunPolicy = "SerialLatestOnly" -) - -// BuildConfigStatus contains current state of the build config object. -type BuildConfigStatus struct { - // lastVersion is used to inform about number of last triggered build. - // +optional - LastVersion int64 `json:"lastVersion" protobuf:"varint,1,opt,name=lastVersion"` - - // imageChangeTriggers captures the runtime state of any ImageChangeTrigger specified in the BuildConfigSpec, - // including the value reconciled by the OpenShift APIServer for the lastTriggeredImageID. There is a single entry - // in this array for each image change trigger in spec. Each trigger status references the ImageStreamTag that acts as the source of the trigger. - // +optional - ImageChangeTriggers []ImageChangeTriggerStatus `json:"imageChangeTriggers,omitempty" protobuf:"bytes,2,rep,name=imageChangeTriggers"` -} - -// SecretLocalReference contains information that points to the local secret being used -type SecretLocalReference struct { - // name is the name of the resource in the same namespace being referenced - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` -} - -// WebHookTrigger is a trigger that gets invoked using a webhook type of post -type WebHookTrigger struct { - // secret used to validate requests. - // Deprecated: use SecretReference instead. - Secret string `json:"secret,omitempty" protobuf:"bytes,1,opt,name=secret"` - - // allowEnv determines whether the webhook can set environment variables; can only - // be set to true for GenericWebHook. - AllowEnv bool `json:"allowEnv,omitempty" protobuf:"varint,2,opt,name=allowEnv"` - - // secretReference is a reference to a secret in the same namespace, - // containing the value to be validated when the webhook is invoked. - // The secret being referenced must contain a key named "WebHookSecretKey", the value - // of which will be checked against the value supplied in the webhook invocation. - SecretReference *SecretLocalReference `json:"secretReference,omitempty" protobuf:"bytes,3,opt,name=secretReference"` -} - -// ImageChangeTrigger allows builds to be triggered when an ImageStream changes -type ImageChangeTrigger struct { - // lastTriggeredImageID is used internally by the ImageChangeController to save last - // used image ID for build - // This field is deprecated and will be removed in a future release. - // Deprecated - LastTriggeredImageID string `json:"lastTriggeredImageID,omitempty" protobuf:"bytes,1,opt,name=lastTriggeredImageID"` - - // from is a reference to an ImageStreamTag that will trigger a build when updated - // It is optional. If no From is specified, the From image from the build strategy - // will be used. Only one ImageChangeTrigger with an empty From reference is allowed in - // a build configuration. - From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,2,opt,name=from"` - - // paused is true if this trigger is temporarily disabled. Optional. - Paused bool `json:"paused,omitempty" protobuf:"varint,3,opt,name=paused"` -} - -// ImageStreamTagReference references the ImageStreamTag in an image change trigger by namespace and name. -type ImageStreamTagReference struct { - // namespace is the namespace where the ImageStreamTag for an ImageChangeTrigger is located - Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` - - // name is the name of the ImageStreamTag for an ImageChangeTrigger - Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"` -} - -// ImageChangeTriggerStatus tracks the latest resolved status of the associated ImageChangeTrigger policy -// specified in the BuildConfigSpec.Triggers struct. -type ImageChangeTriggerStatus struct { - // lastTriggeredImageID represents the sha/id of the ImageStreamTag when a Build for this BuildConfig was started. - // The lastTriggeredImageID is updated each time a Build for this BuildConfig is started, even if this ImageStreamTag is not the reason the Build is started. - LastTriggeredImageID string `json:"lastTriggeredImageID,omitempty" protobuf:"bytes,1,opt,name=lastTriggeredImageID"` - - // from is the ImageStreamTag that is the source of the trigger. - From ImageStreamTagReference `json:"from,omitempty" protobuf:"bytes,2,opt,name=from"` - - // lastTriggerTime is the last time this particular ImageStreamTag triggered a Build to start. - // This field is only updated when this trigger specifically started a Build. - LastTriggerTime metav1.Time `json:"lastTriggerTime,omitempty" protobuf:"bytes,3,opt,name=lastTriggerTime"` -} - -// BuildTriggerPolicy describes a policy for a single trigger that results in a new Build. -type BuildTriggerPolicy struct { - // type is the type of build trigger. Valid values: - // - // - GitHub - // GitHubWebHookBuildTriggerType represents a trigger that launches builds on - // GitHub webhook invocations - // - // - Generic - // GenericWebHookBuildTriggerType represents a trigger that launches builds on - // generic webhook invocations - // - // - GitLab - // GitLabWebHookBuildTriggerType represents a trigger that launches builds on - // GitLab webhook invocations - // - // - Bitbucket - // BitbucketWebHookBuildTriggerType represents a trigger that launches builds on - // Bitbucket webhook invocations - // - // - ImageChange - // ImageChangeBuildTriggerType represents a trigger that launches builds on - // availability of a new version of an image - // - // - ConfigChange - // ConfigChangeBuildTriggerType will trigger a build on an initial build config creation - // WARNING: In the future the behavior will change to trigger a build on any config change - Type BuildTriggerType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=BuildTriggerType"` - - // github contains the parameters for a GitHub webhook type of trigger - GitHubWebHook *WebHookTrigger `json:"github,omitempty" protobuf:"bytes,2,opt,name=github"` - - // generic contains the parameters for a Generic webhook type of trigger - GenericWebHook *WebHookTrigger `json:"generic,omitempty" protobuf:"bytes,3,opt,name=generic"` - - // imageChange contains parameters for an ImageChange type of trigger - ImageChange *ImageChangeTrigger `json:"imageChange,omitempty" protobuf:"bytes,4,opt,name=imageChange"` - - // GitLabWebHook contains the parameters for a GitLab webhook type of trigger - GitLabWebHook *WebHookTrigger `json:"gitlab,omitempty" protobuf:"bytes,5,opt,name=gitlab"` - - // BitbucketWebHook contains the parameters for a Bitbucket webhook type of - // trigger - BitbucketWebHook *WebHookTrigger `json:"bitbucket,omitempty" protobuf:"bytes,6,opt,name=bitbucket"` -} - -// BuildTriggerType refers to a specific BuildTriggerPolicy implementation. -type BuildTriggerType string - -const ( - // GitHubWebHookBuildTriggerType represents a trigger that launches builds on - // GitHub webhook invocations - GitHubWebHookBuildTriggerType BuildTriggerType = "GitHub" - GitHubWebHookBuildTriggerTypeDeprecated BuildTriggerType = "github" - - // GenericWebHookBuildTriggerType represents a trigger that launches builds on - // generic webhook invocations - GenericWebHookBuildTriggerType BuildTriggerType = "Generic" - GenericWebHookBuildTriggerTypeDeprecated BuildTriggerType = "generic" - - // GitLabWebHookBuildTriggerType represents a trigger that launches builds on - // GitLab webhook invocations - GitLabWebHookBuildTriggerType BuildTriggerType = "GitLab" - - // BitbucketWebHookBuildTriggerType represents a trigger that launches builds on - // Bitbucket webhook invocations - BitbucketWebHookBuildTriggerType BuildTriggerType = "Bitbucket" - - // ImageChangeBuildTriggerType represents a trigger that launches builds on - // availability of a new version of an image - ImageChangeBuildTriggerType BuildTriggerType = "ImageChange" - ImageChangeBuildTriggerTypeDeprecated BuildTriggerType = "imageChange" - - // ConfigChangeBuildTriggerType will trigger a build on an initial build config creation - // WARNING: In the future the behavior will change to trigger a build on any config change - ConfigChangeBuildTriggerType BuildTriggerType = "ConfigChange" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildList is a collection of Builds. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of builds - Items []Build `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildConfigList is a collection of BuildConfigs. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of build configs - Items []BuildConfig `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// GenericWebHookEvent is the payload expected for a generic webhook post -type GenericWebHookEvent struct { - // type is the type of source repository - // +k8s:conversion-gen=false - Type BuildSourceType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=BuildSourceType"` - - // git is the git information if the Type is BuildSourceGit - Git *GitInfo `json:"git,omitempty" protobuf:"bytes,2,opt,name=git"` - - // env contains additional environment variables you want to pass into a builder container. - // ValueFrom is not supported. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,3,rep,name=env"` - - // dockerStrategyOptions contains additional docker-strategy specific options for the build - DockerStrategyOptions *DockerStrategyOptions `json:"dockerStrategyOptions,omitempty" protobuf:"bytes,4,opt,name=dockerStrategyOptions"` -} - -// GitInfo is the aggregated git information for a generic webhook post -type GitInfo struct { - GitBuildSource `json:",inline" protobuf:"bytes,1,opt,name=gitBuildSource"` - GitSourceRevision `json:",inline" protobuf:"bytes,2,opt,name=gitSourceRevision"` - - // refs is a list of GitRefs for the provided repo - generally sent - // when used from a post-receive hook. This field is optional and is - // used when sending multiple refs - Refs []GitRefInfo `json:"refs" protobuf:"bytes,3,rep,name=refs"` -} - -// GitRefInfo is a single ref -type GitRefInfo struct { - GitBuildSource `json:",inline" protobuf:"bytes,1,opt,name=gitBuildSource"` - GitSourceRevision `json:",inline" protobuf:"bytes,2,opt,name=gitSourceRevision"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildLog is the (unused) resource associated with the build log redirector -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildLog struct { - metav1.TypeMeta `json:",inline"` -} - -// DockerStrategyOptions contains extra strategy options for container image builds -type DockerStrategyOptions struct { - // Args contains any build arguments that are to be passed to Docker. See - // https://docs.docker.com/engine/reference/builder/#/arg for more details - BuildArgs []corev1.EnvVar `json:"buildArgs,omitempty" protobuf:"bytes,1,rep,name=buildArgs"` - - // noCache overrides the docker-strategy noCache option in the build config - NoCache *bool `json:"noCache,omitempty" protobuf:"varint,2,opt,name=noCache"` -} - -// SourceStrategyOptions contains extra strategy options for Source builds -type SourceStrategyOptions struct { - // incremental overrides the source-strategy incremental option in the build config - Incremental *bool `json:"incremental,omitempty" protobuf:"varint,1,opt,name=incremental"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildRequest is the resource used to pass parameters to build generator -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildRequest struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // revision is the information from the source for a specific repo snapshot. - Revision *SourceRevision `json:"revision,omitempty" protobuf:"bytes,2,opt,name=revision"` - - // triggeredByImage is the Image that triggered this build. - TriggeredByImage *corev1.ObjectReference `json:"triggeredByImage,omitempty" protobuf:"bytes,3,opt,name=triggeredByImage"` - - // from is the reference to the ImageStreamTag that triggered the build. - From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,4,opt,name=from"` - - // binary indicates a request to build from a binary provided to the builder - Binary *BinaryBuildSource `json:"binary,omitempty" protobuf:"bytes,5,opt,name=binary"` - - // lastVersion (optional) is the LastVersion of the BuildConfig that was used - // to generate the build. If the BuildConfig in the generator doesn't match, a build will - // not be generated. - LastVersion *int64 `json:"lastVersion,omitempty" protobuf:"varint,6,opt,name=lastVersion"` - - // env contains additional environment variables you want to pass into a builder container. - Env []corev1.EnvVar `json:"env,omitempty" protobuf:"bytes,7,rep,name=env"` - - // triggeredBy describes which triggers started the most recent update to the - // build configuration and contains information about those triggers. - TriggeredBy []BuildTriggerCause `json:"triggeredBy,omitempty" protobuf:"bytes,8,rep,name=triggeredBy"` - - // dockerStrategyOptions contains additional docker-strategy specific options for the build - DockerStrategyOptions *DockerStrategyOptions `json:"dockerStrategyOptions,omitempty" protobuf:"bytes,9,opt,name=dockerStrategyOptions"` - - // sourceStrategyOptions contains additional source-strategy specific options for the build - SourceStrategyOptions *SourceStrategyOptions `json:"sourceStrategyOptions,omitempty" protobuf:"bytes,10,opt,name=sourceStrategyOptions"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BinaryBuildRequestOptions are the options required to fully speficy a binary build request -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BinaryBuildRequestOptions struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // asFile determines if the binary should be created as a file within the source rather than extracted as an archive - AsFile string `json:"asFile,omitempty" protobuf:"bytes,2,opt,name=asFile"` - - // TODO: Improve map[string][]string conversion so we can handled nested objects - - // revision.commit is the value identifying a specific commit - Commit string `json:"revision.commit,omitempty" protobuf:"bytes,3,opt,name=revisionCommit"` - - // revision.message is the description of a specific commit - Message string `json:"revision.message,omitempty" protobuf:"bytes,4,opt,name=revisionMessage"` - - // revision.authorName of the source control user - AuthorName string `json:"revision.authorName,omitempty" protobuf:"bytes,5,opt,name=revisionAuthorName"` - - // revision.authorEmail of the source control user - AuthorEmail string `json:"revision.authorEmail,omitempty" protobuf:"bytes,6,opt,name=revisionAuthorEmail"` - - // revision.committerName of the source control user - CommitterName string `json:"revision.committerName,omitempty" protobuf:"bytes,7,opt,name=revisionCommitterName"` - - // revision.committerEmail of the source control user - CommitterEmail string `json:"revision.committerEmail,omitempty" protobuf:"bytes,8,opt,name=revisionCommitterEmail"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildLogOptions is the REST options for a build log -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BuildLogOptions struct { - metav1.TypeMeta `json:",inline"` - - // cointainer for which to stream logs. Defaults to only container if there is one container in the pod. - Container string `json:"container,omitempty" protobuf:"bytes,1,opt,name=container"` - // follow if true indicates that the build log should be streamed until - // the build terminates. - Follow bool `json:"follow,omitempty" protobuf:"varint,2,opt,name=follow"` - // previous returns previous build logs. Defaults to false. - Previous bool `json:"previous,omitempty" protobuf:"varint,3,opt,name=previous"` - // sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - SinceSeconds *int64 `json:"sinceSeconds,omitempty" protobuf:"varint,4,opt,name=sinceSeconds"` - // sinceTime is an RFC3339 timestamp from which to show logs. If this value - // precedes the time a pod was started, only logs since the pod start will be returned. - // If this value is in the future, no logs will be returned. - // Only one of sinceSeconds or sinceTime may be specified. - SinceTime *metav1.Time `json:"sinceTime,omitempty" protobuf:"bytes,5,opt,name=sinceTime"` - // timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line - // of log output. Defaults to false. - Timestamps bool `json:"timestamps,omitempty" protobuf:"varint,6,opt,name=timestamps"` - // tailLines, If set, is the number of lines from the end of the logs to show. If not specified, - // logs are shown from the creation of the container or sinceSeconds or sinceTime - TailLines *int64 `json:"tailLines,omitempty" protobuf:"varint,7,opt,name=tailLines"` - // limitBytes, If set, is the number of bytes to read from the server before terminating the - // log output. This may not display a complete final line of logging, and may return - // slightly more or slightly less than the specified limit. - LimitBytes *int64 `json:"limitBytes,omitempty" protobuf:"varint,8,opt,name=limitBytes"` - - // nowait if true causes the call to return immediately even if the build - // is not available yet. Otherwise the server will wait until the build has started. - // TODO: Fix the tag to 'noWait' in v2 - NoWait bool `json:"nowait,omitempty" protobuf:"varint,9,opt,name=nowait"` - - // version of the build for which to view logs. - Version *int64 `json:"version,omitempty" protobuf:"varint,10,opt,name=version"` - - // insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the - // serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver - // and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real - // kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the - // connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept - // the actual log data coming from the real kubelet). - // +optional - InsecureSkipTLSVerifyBackend bool `json:"insecureSkipTLSVerifyBackend,omitempty" protobuf:"varint,11,opt,name=insecureSkipTLSVerifyBackend"` -} - -// SecretSpec specifies a secret to be included in a build pod and its corresponding mount point -type SecretSpec struct { - // secretSource is a reference to the secret - SecretSource corev1.LocalObjectReference `json:"secretSource" protobuf:"bytes,1,opt,name=secretSource"` - - // mountPath is the path at which to mount the secret - MountPath string `json:"mountPath" protobuf:"bytes,2,opt,name=mountPath"` -} - -// BuildVolume describes a volume that is made available to build pods, -// such that it can be mounted into buildah's runtime environment. -// Only a subset of Kubernetes Volume sources are supported. -type BuildVolume struct { - // name is a unique identifier for this BuildVolume. - // It must conform to the Kubernetes DNS label standard and be unique within the pod. - // Names that collide with those added by the build controller will result in a - // failed build with an error message detailing which name caused the error. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +required - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // source represents the location and type of the mounted volume. - // +required - Source BuildVolumeSource `json:"source" protobuf:"bytes,2,opt,name=source"` - - // mounts represents the location of the volume in the image build container - // +required - // +listType=map - // +listMapKey=destinationPath - // +patchMergeKey=destinationPath - // +patchStrategy=merge - Mounts []BuildVolumeMount `json:"mounts" patchStrategy:"merge" patchMergeKey:"destinationPath" protobuf:"bytes,3,opt,name=mounts"` -} - -// BuildVolumeSourceType represents a build volume source type -type BuildVolumeSourceType string - -const ( - // BuildVolumeSourceTypeSecret is the Secret build source volume type - BuildVolumeSourceTypeSecret BuildVolumeSourceType = "Secret" - - // BuildVolumeSourceTypeConfigmap is the ConfigMap build source volume type - BuildVolumeSourceTypeConfigMap BuildVolumeSourceType = "ConfigMap" - - // BuildVolumeSourceTypeCSI is the CSI build source volume type - BuildVolumeSourceTypeCSI BuildVolumeSourceType = "CSI" -) - -// BuildVolumeSource represents the source of a volume to mount -// Only one of its supported types may be specified at any given time. -type BuildVolumeSource struct { - - // type is the BuildVolumeSourceType for the volume source. - // Type must match the populated volume source. - // Valid types are: Secret, ConfigMap - Type BuildVolumeSourceType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=BuildVolumeSourceType"` - - // secret represents a Secret that should populate this volume. - // More info: https://kubernetes.io/docs/concepts/storage/volumes#secret - // +optional - Secret *corev1.SecretVolumeSource `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` - - // configMap represents a ConfigMap that should populate this volume - // +optional - ConfigMap *corev1.ConfigMapVolumeSource `json:"configMap,omitempty" protobuf:"bytes,3,opt,name=configMap"` - - // csi represents ephemeral storage provided by external CSI drivers which support this capability - // +optional - CSI *corev1.CSIVolumeSource `json:"csi,omitempty" protobuf:"bytes,4,opt,name=csi"` -} - -// BuildVolumeMount describes the mounting of a Volume within buildah's runtime environment. -type BuildVolumeMount struct { - // destinationPath is the path within the buildah runtime environment at which the volume should be mounted. - // The transient mount within the build image and the backing volume will both be mounted read only. - // Must be an absolute path, must not contain '..' or ':', and must not collide with a destination path generated - // by the builder process - // Paths that collide with those added by the build controller will result in a - // failed build with an error message detailing which path caused the error. - DestinationPath string `json:"destinationPath" protobuf:"bytes,1,opt,name=destinationPath"` -} diff --git a/vendor/github.com/openshift/api/build/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/build/v1/zz_generated.deepcopy.go deleted file mode 100644 index 03cb4a6a7..000000000 --- a/vendor/github.com/openshift/api/build/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1610 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - 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 *BinaryBuildRequestOptions) DeepCopyInto(out *BinaryBuildRequestOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BinaryBuildRequestOptions. -func (in *BinaryBuildRequestOptions) DeepCopy() *BinaryBuildRequestOptions { - if in == nil { - return nil - } - out := new(BinaryBuildRequestOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BinaryBuildRequestOptions) 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 *BinaryBuildSource) DeepCopyInto(out *BinaryBuildSource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BinaryBuildSource. -func (in *BinaryBuildSource) DeepCopy() *BinaryBuildSource { - if in == nil { - return nil - } - out := new(BinaryBuildSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BitbucketWebHookCause) DeepCopyInto(out *BitbucketWebHookCause) { - *out = *in - in.CommonWebHookCause.DeepCopyInto(&out.CommonWebHookCause) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BitbucketWebHookCause. -func (in *BitbucketWebHookCause) DeepCopy() *BitbucketWebHookCause { - if in == nil { - return nil - } - out := new(BitbucketWebHookCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Build) DeepCopyInto(out *Build) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Build. -func (in *Build) DeepCopy() *Build { - if in == nil { - return nil - } - out := new(Build) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Build) 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 *BuildCondition) DeepCopyInto(out *BuildCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildCondition. -func (in *BuildCondition) DeepCopy() *BuildCondition { - if in == nil { - return nil - } - out := new(BuildCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildConfig) DeepCopyInto(out *BuildConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildConfig. -func (in *BuildConfig) DeepCopy() *BuildConfig { - if in == nil { - return nil - } - out := new(BuildConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildConfig) 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 *BuildConfigList) DeepCopyInto(out *BuildConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]BuildConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildConfigList. -func (in *BuildConfigList) DeepCopy() *BuildConfigList { - if in == nil { - return nil - } - out := new(BuildConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildConfigList) 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 *BuildConfigSpec) DeepCopyInto(out *BuildConfigSpec) { - *out = *in - if in.Triggers != nil { - in, out := &in.Triggers, &out.Triggers - *out = make([]BuildTriggerPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.CommonSpec.DeepCopyInto(&out.CommonSpec) - if in.SuccessfulBuildsHistoryLimit != nil { - in, out := &in.SuccessfulBuildsHistoryLimit, &out.SuccessfulBuildsHistoryLimit - *out = new(int32) - **out = **in - } - if in.FailedBuildsHistoryLimit != nil { - in, out := &in.FailedBuildsHistoryLimit, &out.FailedBuildsHistoryLimit - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildConfigSpec. -func (in *BuildConfigSpec) DeepCopy() *BuildConfigSpec { - if in == nil { - return nil - } - out := new(BuildConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildConfigStatus) DeepCopyInto(out *BuildConfigStatus) { - *out = *in - if in.ImageChangeTriggers != nil { - in, out := &in.ImageChangeTriggers, &out.ImageChangeTriggers - *out = make([]ImageChangeTriggerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildConfigStatus. -func (in *BuildConfigStatus) DeepCopy() *BuildConfigStatus { - if in == nil { - return nil - } - out := new(BuildConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildList) DeepCopyInto(out *BuildList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Build, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildList. -func (in *BuildList) DeepCopy() *BuildList { - if in == nil { - return nil - } - out := new(BuildList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildList) 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 *BuildLog) DeepCopyInto(out *BuildLog) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildLog. -func (in *BuildLog) DeepCopy() *BuildLog { - if in == nil { - return nil - } - out := new(BuildLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildLog) 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 *BuildLogOptions) DeepCopyInto(out *BuildLogOptions) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.SinceSeconds != nil { - in, out := &in.SinceSeconds, &out.SinceSeconds - *out = new(int64) - **out = **in - } - if in.SinceTime != nil { - in, out := &in.SinceTime, &out.SinceTime - *out = (*in).DeepCopy() - } - if in.TailLines != nil { - in, out := &in.TailLines, &out.TailLines - *out = new(int64) - **out = **in - } - if in.LimitBytes != nil { - in, out := &in.LimitBytes, &out.LimitBytes - *out = new(int64) - **out = **in - } - if in.Version != nil { - in, out := &in.Version, &out.Version - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildLogOptions. -func (in *BuildLogOptions) DeepCopy() *BuildLogOptions { - if in == nil { - return nil - } - out := new(BuildLogOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildLogOptions) 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 *BuildOutput) DeepCopyInto(out *BuildOutput) { - *out = *in - if in.To != nil { - in, out := &in.To, &out.To - *out = new(corev1.ObjectReference) - **out = **in - } - if in.PushSecret != nil { - in, out := &in.PushSecret, &out.PushSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]ImageLabel, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildOutput. -func (in *BuildOutput) DeepCopy() *BuildOutput { - if in == nil { - return nil - } - out := new(BuildOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildPostCommitSpec) DeepCopyInto(out *BuildPostCommitSpec) { - *out = *in - if in.Command != nil { - in, out := &in.Command, &out.Command - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Args != nil { - in, out := &in.Args, &out.Args - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildPostCommitSpec. -func (in *BuildPostCommitSpec) DeepCopy() *BuildPostCommitSpec { - if in == nil { - return nil - } - out := new(BuildPostCommitSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildRequest) DeepCopyInto(out *BuildRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(SourceRevision) - (*in).DeepCopyInto(*out) - } - if in.TriggeredByImage != nil { - in, out := &in.TriggeredByImage, &out.TriggeredByImage - *out = new(corev1.ObjectReference) - **out = **in - } - if in.From != nil { - in, out := &in.From, &out.From - *out = new(corev1.ObjectReference) - **out = **in - } - if in.Binary != nil { - in, out := &in.Binary, &out.Binary - *out = new(BinaryBuildSource) - **out = **in - } - if in.LastVersion != nil { - in, out := &in.LastVersion, &out.LastVersion - *out = new(int64) - **out = **in - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TriggeredBy != nil { - in, out := &in.TriggeredBy, &out.TriggeredBy - *out = make([]BuildTriggerCause, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DockerStrategyOptions != nil { - in, out := &in.DockerStrategyOptions, &out.DockerStrategyOptions - *out = new(DockerStrategyOptions) - (*in).DeepCopyInto(*out) - } - if in.SourceStrategyOptions != nil { - in, out := &in.SourceStrategyOptions, &out.SourceStrategyOptions - *out = new(SourceStrategyOptions) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildRequest. -func (in *BuildRequest) DeepCopy() *BuildRequest { - if in == nil { - return nil - } - out := new(BuildRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildRequest) 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 *BuildSource) DeepCopyInto(out *BuildSource) { - *out = *in - if in.Binary != nil { - in, out := &in.Binary, &out.Binary - *out = new(BinaryBuildSource) - **out = **in - } - if in.Dockerfile != nil { - in, out := &in.Dockerfile, &out.Dockerfile - *out = new(string) - **out = **in - } - if in.Git != nil { - in, out := &in.Git, &out.Git - *out = new(GitBuildSource) - (*in).DeepCopyInto(*out) - } - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]ImageSource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SourceSecret != nil { - in, out := &in.SourceSecret, &out.SourceSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]SecretBuildSource, len(*in)) - copy(*out, *in) - } - if in.ConfigMaps != nil { - in, out := &in.ConfigMaps, &out.ConfigMaps - *out = make([]ConfigMapBuildSource, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSource. -func (in *BuildSource) DeepCopy() *BuildSource { - if in == nil { - return nil - } - out := new(BuildSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildSpec) DeepCopyInto(out *BuildSpec) { - *out = *in - in.CommonSpec.DeepCopyInto(&out.CommonSpec) - if in.TriggeredBy != nil { - in, out := &in.TriggeredBy, &out.TriggeredBy - *out = make([]BuildTriggerCause, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildSpec. -func (in *BuildSpec) DeepCopy() *BuildSpec { - if in == nil { - return nil - } - out := new(BuildSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildStatus) DeepCopyInto(out *BuildStatus) { - *out = *in - if in.StartTimestamp != nil { - in, out := &in.StartTimestamp, &out.StartTimestamp - *out = (*in).DeepCopy() - } - if in.CompletionTimestamp != nil { - in, out := &in.CompletionTimestamp, &out.CompletionTimestamp - *out = (*in).DeepCopy() - } - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(corev1.ObjectReference) - **out = **in - } - in.Output.DeepCopyInto(&out.Output) - if in.Stages != nil { - in, out := &in.Stages, &out.Stages - *out = make([]StageInfo, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]BuildCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatus. -func (in *BuildStatus) DeepCopy() *BuildStatus { - if in == nil { - return nil - } - out := new(BuildStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildStatusOutput) DeepCopyInto(out *BuildStatusOutput) { - *out = *in - if in.To != nil { - in, out := &in.To, &out.To - *out = new(BuildStatusOutputTo) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatusOutput. -func (in *BuildStatusOutput) DeepCopy() *BuildStatusOutput { - if in == nil { - return nil - } - out := new(BuildStatusOutput) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildStatusOutputTo) DeepCopyInto(out *BuildStatusOutputTo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStatusOutputTo. -func (in *BuildStatusOutputTo) DeepCopy() *BuildStatusOutputTo { - if in == nil { - return nil - } - out := new(BuildStatusOutputTo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildStrategy) DeepCopyInto(out *BuildStrategy) { - *out = *in - if in.DockerStrategy != nil { - in, out := &in.DockerStrategy, &out.DockerStrategy - *out = new(DockerBuildStrategy) - (*in).DeepCopyInto(*out) - } - if in.SourceStrategy != nil { - in, out := &in.SourceStrategy, &out.SourceStrategy - *out = new(SourceBuildStrategy) - (*in).DeepCopyInto(*out) - } - if in.CustomStrategy != nil { - in, out := &in.CustomStrategy, &out.CustomStrategy - *out = new(CustomBuildStrategy) - (*in).DeepCopyInto(*out) - } - if in.JenkinsPipelineStrategy != nil { - in, out := &in.JenkinsPipelineStrategy, &out.JenkinsPipelineStrategy - *out = new(JenkinsPipelineBuildStrategy) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildStrategy. -func (in *BuildStrategy) DeepCopy() *BuildStrategy { - if in == nil { - return nil - } - out := new(BuildStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildTriggerCause) DeepCopyInto(out *BuildTriggerCause) { - *out = *in - if in.GenericWebHook != nil { - in, out := &in.GenericWebHook, &out.GenericWebHook - *out = new(GenericWebHookCause) - (*in).DeepCopyInto(*out) - } - if in.GitHubWebHook != nil { - in, out := &in.GitHubWebHook, &out.GitHubWebHook - *out = new(GitHubWebHookCause) - (*in).DeepCopyInto(*out) - } - if in.ImageChangeBuild != nil { - in, out := &in.ImageChangeBuild, &out.ImageChangeBuild - *out = new(ImageChangeCause) - (*in).DeepCopyInto(*out) - } - if in.GitLabWebHook != nil { - in, out := &in.GitLabWebHook, &out.GitLabWebHook - *out = new(GitLabWebHookCause) - (*in).DeepCopyInto(*out) - } - if in.BitbucketWebHook != nil { - in, out := &in.BitbucketWebHook, &out.BitbucketWebHook - *out = new(BitbucketWebHookCause) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildTriggerCause. -func (in *BuildTriggerCause) DeepCopy() *BuildTriggerCause { - if in == nil { - return nil - } - out := new(BuildTriggerCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildTriggerPolicy) DeepCopyInto(out *BuildTriggerPolicy) { - *out = *in - if in.GitHubWebHook != nil { - in, out := &in.GitHubWebHook, &out.GitHubWebHook - *out = new(WebHookTrigger) - (*in).DeepCopyInto(*out) - } - if in.GenericWebHook != nil { - in, out := &in.GenericWebHook, &out.GenericWebHook - *out = new(WebHookTrigger) - (*in).DeepCopyInto(*out) - } - if in.ImageChange != nil { - in, out := &in.ImageChange, &out.ImageChange - *out = new(ImageChangeTrigger) - (*in).DeepCopyInto(*out) - } - if in.GitLabWebHook != nil { - in, out := &in.GitLabWebHook, &out.GitLabWebHook - *out = new(WebHookTrigger) - (*in).DeepCopyInto(*out) - } - if in.BitbucketWebHook != nil { - in, out := &in.BitbucketWebHook, &out.BitbucketWebHook - *out = new(WebHookTrigger) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildTriggerPolicy. -func (in *BuildTriggerPolicy) DeepCopy() *BuildTriggerPolicy { - if in == nil { - return nil - } - out := new(BuildTriggerPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildVolume) DeepCopyInto(out *BuildVolume) { - *out = *in - in.Source.DeepCopyInto(&out.Source) - if in.Mounts != nil { - in, out := &in.Mounts, &out.Mounts - *out = make([]BuildVolumeMount, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildVolume. -func (in *BuildVolume) DeepCopy() *BuildVolume { - if in == nil { - return nil - } - out := new(BuildVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildVolumeMount) DeepCopyInto(out *BuildVolumeMount) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildVolumeMount. -func (in *BuildVolumeMount) DeepCopy() *BuildVolumeMount { - if in == nil { - return nil - } - out := new(BuildVolumeMount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildVolumeSource) DeepCopyInto(out *BuildVolumeSource) { - *out = *in - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(corev1.SecretVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(corev1.ConfigMapVolumeSource) - (*in).DeepCopyInto(*out) - } - if in.CSI != nil { - in, out := &in.CSI, &out.CSI - *out = new(corev1.CSIVolumeSource) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildVolumeSource. -func (in *BuildVolumeSource) DeepCopy() *BuildVolumeSource { - if in == nil { - return nil - } - out := new(BuildVolumeSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CommonSpec) DeepCopyInto(out *CommonSpec) { - *out = *in - in.Source.DeepCopyInto(&out.Source) - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(SourceRevision) - (*in).DeepCopyInto(*out) - } - in.Strategy.DeepCopyInto(&out.Strategy) - in.Output.DeepCopyInto(&out.Output) - in.Resources.DeepCopyInto(&out.Resources) - in.PostCommit.DeepCopyInto(&out.PostCommit) - if in.CompletionDeadlineSeconds != nil { - in, out := &in.CompletionDeadlineSeconds, &out.CompletionDeadlineSeconds - *out = new(int64) - **out = **in - } - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = make(OptionalNodeSelector, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.MountTrustedCA != nil { - in, out := &in.MountTrustedCA, &out.MountTrustedCA - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonSpec. -func (in *CommonSpec) DeepCopy() *CommonSpec { - if in == nil { - return nil - } - out := new(CommonSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CommonWebHookCause) DeepCopyInto(out *CommonWebHookCause) { - *out = *in - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(SourceRevision) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonWebHookCause. -func (in *CommonWebHookCause) DeepCopy() *CommonWebHookCause { - if in == nil { - return nil - } - out := new(CommonWebHookCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapBuildSource) DeepCopyInto(out *ConfigMapBuildSource) { - *out = *in - out.ConfigMap = in.ConfigMap - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapBuildSource. -func (in *ConfigMapBuildSource) DeepCopy() *ConfigMapBuildSource { - if in == nil { - return nil - } - out := new(ConfigMapBuildSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomBuildStrategy) DeepCopyInto(out *CustomBuildStrategy) { - *out = *in - out.From = in.From - if in.PullSecret != nil { - in, out := &in.PullSecret, &out.PullSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]SecretSpec, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomBuildStrategy. -func (in *CustomBuildStrategy) DeepCopy() *CustomBuildStrategy { - if in == nil { - return nil - } - out := new(CustomBuildStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerBuildStrategy) DeepCopyInto(out *DockerBuildStrategy) { - *out = *in - if in.From != nil { - in, out := &in.From, &out.From - *out = new(corev1.ObjectReference) - **out = **in - } - if in.PullSecret != nil { - in, out := &in.PullSecret, &out.PullSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.BuildArgs != nil { - in, out := &in.BuildArgs, &out.BuildArgs - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ImageOptimizationPolicy != nil { - in, out := &in.ImageOptimizationPolicy, &out.ImageOptimizationPolicy - *out = new(ImageOptimizationPolicy) - **out = **in - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]BuildVolume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerBuildStrategy. -func (in *DockerBuildStrategy) DeepCopy() *DockerBuildStrategy { - if in == nil { - return nil - } - out := new(DockerBuildStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerStrategyOptions) DeepCopyInto(out *DockerStrategyOptions) { - *out = *in - if in.BuildArgs != nil { - in, out := &in.BuildArgs, &out.BuildArgs - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.NoCache != nil { - in, out := &in.NoCache, &out.NoCache - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerStrategyOptions. -func (in *DockerStrategyOptions) DeepCopy() *DockerStrategyOptions { - if in == nil { - return nil - } - out := new(DockerStrategyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericWebHookCause) DeepCopyInto(out *GenericWebHookCause) { - *out = *in - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(SourceRevision) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericWebHookCause. -func (in *GenericWebHookCause) DeepCopy() *GenericWebHookCause { - if in == nil { - return nil - } - out := new(GenericWebHookCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericWebHookEvent) DeepCopyInto(out *GenericWebHookEvent) { - *out = *in - if in.Git != nil { - in, out := &in.Git, &out.Git - *out = new(GitInfo) - (*in).DeepCopyInto(*out) - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DockerStrategyOptions != nil { - in, out := &in.DockerStrategyOptions, &out.DockerStrategyOptions - *out = new(DockerStrategyOptions) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericWebHookEvent. -func (in *GenericWebHookEvent) DeepCopy() *GenericWebHookEvent { - if in == nil { - return nil - } - out := new(GenericWebHookEvent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitBuildSource) DeepCopyInto(out *GitBuildSource) { - *out = *in - in.ProxyConfig.DeepCopyInto(&out.ProxyConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitBuildSource. -func (in *GitBuildSource) DeepCopy() *GitBuildSource { - if in == nil { - return nil - } - out := new(GitBuildSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitHubWebHookCause) DeepCopyInto(out *GitHubWebHookCause) { - *out = *in - if in.Revision != nil { - in, out := &in.Revision, &out.Revision - *out = new(SourceRevision) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubWebHookCause. -func (in *GitHubWebHookCause) DeepCopy() *GitHubWebHookCause { - if in == nil { - return nil - } - out := new(GitHubWebHookCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitInfo) DeepCopyInto(out *GitInfo) { - *out = *in - in.GitBuildSource.DeepCopyInto(&out.GitBuildSource) - out.GitSourceRevision = in.GitSourceRevision - if in.Refs != nil { - in, out := &in.Refs, &out.Refs - *out = make([]GitRefInfo, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitInfo. -func (in *GitInfo) DeepCopy() *GitInfo { - if in == nil { - return nil - } - out := new(GitInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitLabWebHookCause) DeepCopyInto(out *GitLabWebHookCause) { - *out = *in - in.CommonWebHookCause.DeepCopyInto(&out.CommonWebHookCause) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabWebHookCause. -func (in *GitLabWebHookCause) DeepCopy() *GitLabWebHookCause { - if in == nil { - return nil - } - out := new(GitLabWebHookCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitRefInfo) DeepCopyInto(out *GitRefInfo) { - *out = *in - in.GitBuildSource.DeepCopyInto(&out.GitBuildSource) - out.GitSourceRevision = in.GitSourceRevision - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitRefInfo. -func (in *GitRefInfo) DeepCopy() *GitRefInfo { - if in == nil { - return nil - } - out := new(GitRefInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitSourceRevision) DeepCopyInto(out *GitSourceRevision) { - *out = *in - out.Author = in.Author - out.Committer = in.Committer - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitSourceRevision. -func (in *GitSourceRevision) DeepCopy() *GitSourceRevision { - if in == nil { - return nil - } - out := new(GitSourceRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageChangeCause) DeepCopyInto(out *ImageChangeCause) { - *out = *in - if in.FromRef != nil { - in, out := &in.FromRef, &out.FromRef - *out = new(corev1.ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageChangeCause. -func (in *ImageChangeCause) DeepCopy() *ImageChangeCause { - if in == nil { - return nil - } - out := new(ImageChangeCause) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageChangeTrigger) DeepCopyInto(out *ImageChangeTrigger) { - *out = *in - if in.From != nil { - in, out := &in.From, &out.From - *out = new(corev1.ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageChangeTrigger. -func (in *ImageChangeTrigger) DeepCopy() *ImageChangeTrigger { - if in == nil { - return nil - } - out := new(ImageChangeTrigger) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageChangeTriggerStatus) DeepCopyInto(out *ImageChangeTriggerStatus) { - *out = *in - out.From = in.From - in.LastTriggerTime.DeepCopyInto(&out.LastTriggerTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageChangeTriggerStatus. -func (in *ImageChangeTriggerStatus) DeepCopy() *ImageChangeTriggerStatus { - if in == nil { - return nil - } - out := new(ImageChangeTriggerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageLabel) DeepCopyInto(out *ImageLabel) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageLabel. -func (in *ImageLabel) DeepCopy() *ImageLabel { - if in == nil { - return nil - } - out := new(ImageLabel) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSource) DeepCopyInto(out *ImageSource) { - *out = *in - out.From = in.From - if in.As != nil { - in, out := &in.As, &out.As - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]ImageSourcePath, len(*in)) - copy(*out, *in) - } - if in.PullSecret != nil { - in, out := &in.PullSecret, &out.PullSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSource. -func (in *ImageSource) DeepCopy() *ImageSource { - if in == nil { - return nil - } - out := new(ImageSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSourcePath) DeepCopyInto(out *ImageSourcePath) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSourcePath. -func (in *ImageSourcePath) DeepCopy() *ImageSourcePath { - if in == nil { - return nil - } - out := new(ImageSourcePath) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStreamTagReference) DeepCopyInto(out *ImageStreamTagReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamTagReference. -func (in *ImageStreamTagReference) DeepCopy() *ImageStreamTagReference { - if in == nil { - return nil - } - out := new(ImageStreamTagReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JenkinsPipelineBuildStrategy) DeepCopyInto(out *JenkinsPipelineBuildStrategy) { - *out = *in - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsPipelineBuildStrategy. -func (in *JenkinsPipelineBuildStrategy) DeepCopy() *JenkinsPipelineBuildStrategy { - if in == nil { - return nil - } - out := new(JenkinsPipelineBuildStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in OptionalNodeSelector) DeepCopyInto(out *OptionalNodeSelector) { - { - in := &in - *out = make(OptionalNodeSelector, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalNodeSelector. -func (in OptionalNodeSelector) DeepCopy() OptionalNodeSelector { - if in == nil { - return nil - } - out := new(OptionalNodeSelector) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) { - *out = *in - if in.HTTPProxy != nil { - in, out := &in.HTTPProxy, &out.HTTPProxy - *out = new(string) - **out = **in - } - if in.HTTPSProxy != nil { - in, out := &in.HTTPSProxy, &out.HTTPSProxy - *out = new(string) - **out = **in - } - if in.NoProxy != nil { - in, out := &in.NoProxy, &out.NoProxy - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig. -func (in *ProxyConfig) DeepCopy() *ProxyConfig { - if in == nil { - return nil - } - out := new(ProxyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretBuildSource) DeepCopyInto(out *SecretBuildSource) { - *out = *in - out.Secret = in.Secret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretBuildSource. -func (in *SecretBuildSource) DeepCopy() *SecretBuildSource { - if in == nil { - return nil - } - out := new(SecretBuildSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretLocalReference) DeepCopyInto(out *SecretLocalReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretLocalReference. -func (in *SecretLocalReference) DeepCopy() *SecretLocalReference { - if in == nil { - return nil - } - out := new(SecretLocalReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretSpec) DeepCopyInto(out *SecretSpec) { - *out = *in - out.SecretSource = in.SecretSource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretSpec. -func (in *SecretSpec) DeepCopy() *SecretSpec { - if in == nil { - return nil - } - out := new(SecretSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceBuildStrategy) DeepCopyInto(out *SourceBuildStrategy) { - *out = *in - out.From = in.From - if in.PullSecret != nil { - in, out := &in.PullSecret, &out.PullSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Incremental != nil { - in, out := &in.Incremental, &out.Incremental - *out = new(bool) - **out = **in - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]BuildVolume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceBuildStrategy. -func (in *SourceBuildStrategy) DeepCopy() *SourceBuildStrategy { - if in == nil { - return nil - } - out := new(SourceBuildStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceControlUser) DeepCopyInto(out *SourceControlUser) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceControlUser. -func (in *SourceControlUser) DeepCopy() *SourceControlUser { - if in == nil { - return nil - } - out := new(SourceControlUser) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceRevision) DeepCopyInto(out *SourceRevision) { - *out = *in - if in.Git != nil { - in, out := &in.Git, &out.Git - *out = new(GitSourceRevision) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceRevision. -func (in *SourceRevision) DeepCopy() *SourceRevision { - if in == nil { - return nil - } - out := new(SourceRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceStrategyOptions) DeepCopyInto(out *SourceStrategyOptions) { - *out = *in - if in.Incremental != nil { - in, out := &in.Incremental, &out.Incremental - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStrategyOptions. -func (in *SourceStrategyOptions) DeepCopy() *SourceStrategyOptions { - if in == nil { - return nil - } - out := new(SourceStrategyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StageInfo) DeepCopyInto(out *StageInfo) { - *out = *in - in.StartTime.DeepCopyInto(&out.StartTime) - if in.Steps != nil { - in, out := &in.Steps, &out.Steps - *out = make([]StepInfo, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StageInfo. -func (in *StageInfo) DeepCopy() *StageInfo { - if in == nil { - return nil - } - out := new(StageInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StepInfo) DeepCopyInto(out *StepInfo) { - *out = *in - in.StartTime.DeepCopyInto(&out.StartTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StepInfo. -func (in *StepInfo) DeepCopy() *StepInfo { - if in == nil { - return nil - } - out := new(StepInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebHookTrigger) DeepCopyInto(out *WebHookTrigger) { - *out = *in - if in.SecretReference != nil { - in, out := &in.SecretReference, &out.SecretReference - *out = new(SecretLocalReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebHookTrigger. -func (in *WebHookTrigger) DeepCopy() *WebHookTrigger { - if in == nil { - return nil - } - out := new(WebHookTrigger) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/build/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/build/v1/zz_generated.model_name.go deleted file mode 100644 index dd144e3af..000000000 --- a/vendor/github.com/openshift/api/build/v1/zz_generated.model_name.go +++ /dev/null @@ -1,301 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BinaryBuildRequestOptions) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BinaryBuildRequestOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BinaryBuildSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BinaryBuildSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BitbucketWebHookCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BitbucketWebHookCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Build) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.Build" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildCondition) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildConfig) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildConfigStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildList) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildLog) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildLog" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildLogOptions) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildLogOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildOutput) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildOutput" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildPostCommitSpec) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildPostCommitSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildRequest) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildSpec) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildStatus) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildStatusOutput) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildStatusOutput" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildStatusOutputTo) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildStatusOutputTo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildTriggerCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildTriggerCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildTriggerPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildTriggerPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildVolume) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildVolume" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildVolumeMount) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildVolumeMount" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildVolumeSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.BuildVolumeSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CommonSpec) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.CommonSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CommonWebHookCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.CommonWebHookCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigMapBuildSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ConfigMapBuildSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomBuildStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.CustomBuildStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DockerBuildStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.DockerBuildStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DockerStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.DockerStrategyOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GenericWebHookCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GenericWebHookCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GenericWebHookEvent) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GenericWebHookEvent" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitBuildSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitBuildSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitHubWebHookCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitHubWebHookCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitInfo) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitLabWebHookCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitLabWebHookCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitRefInfo) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitRefInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitSourceRevision) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.GitSourceRevision" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageChangeCause) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageChangeCause" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageChangeTrigger) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageChangeTrigger" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageChangeTriggerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageChangeTriggerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageLabel) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageLabel" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageSourcePath) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageSourcePath" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamTagReference) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ImageStreamTagReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JenkinsPipelineBuildStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.JenkinsPipelineBuildStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProxyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.ProxyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretBuildSource) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SecretBuildSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretLocalReference) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SecretLocalReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretSpec) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SecretSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceBuildStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SourceBuildStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceControlUser) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SourceControlUser" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceRevision) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SourceRevision" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.SourceStrategyOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StageInfo) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.StageInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StepInfo) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.StepInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebHookTrigger) OpenAPIModelName() string { - return "com.github.openshift.api.build.v1.WebHookTrigger" -} diff --git a/vendor/github.com/openshift/api/build/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/build/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 1da784353..000000000 --- a/vendor/github.com/openshift/api/build/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,692 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_BinaryBuildRequestOptions = map[string]string{ - "": "BinaryBuildRequestOptions are the options required to fully speficy a binary build request\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "asFile": "asFile determines if the binary should be created as a file within the source rather than extracted as an archive", - "revision.commit": "revision.commit is the value identifying a specific commit", - "revision.message": "revision.message is the description of a specific commit", - "revision.authorName": "revision.authorName of the source control user", - "revision.authorEmail": "revision.authorEmail of the source control user", - "revision.committerName": "revision.committerName of the source control user", - "revision.committerEmail": "revision.committerEmail of the source control user", -} - -func (BinaryBuildRequestOptions) SwaggerDoc() map[string]string { - return map_BinaryBuildRequestOptions -} - -var map_BinaryBuildSource = map[string]string{ - "": "BinaryBuildSource describes a binary file to be used for the Docker and Source build strategies, where the file will be extracted and used as the build source.", - "asFile": "asFile indicates that the provided binary input should be considered a single file within the build input. For example, specifying \"webapp.war\" would place the provided binary as `/webapp.war` for the builder. If left empty, the Docker and Source build strategies assume this file is a zip, tar, or tar.gz file and extract it as the source. The custom strategy receives this binary as standard input. This filename may not contain slashes or be '..' or '.'.", -} - -func (BinaryBuildSource) SwaggerDoc() map[string]string { - return map_BinaryBuildSource -} - -var map_BitbucketWebHookCause = map[string]string{ - "": "BitbucketWebHookCause has information about a Bitbucket webhook that triggered a build.", -} - -func (BitbucketWebHookCause) SwaggerDoc() map[string]string { - return map_BitbucketWebHookCause -} - -var map_Build = map[string]string{ - "": "Build encapsulates the inputs needed to produce a new deployable image, as well as the status of the execution and a reference to the Pod which executed the build.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is all the inputs used to execute the build.", - "status": "status is the current status of the build.", -} - -func (Build) SwaggerDoc() map[string]string { - return map_Build -} - -var map_BuildCondition = map[string]string{ - "": "BuildCondition describes the state of a build at a certain point.", - "type": "type of build condition.", - "status": "status of the condition, one of True, False, Unknown.", - "lastUpdateTime": "The last time this condition was updated.", - "lastTransitionTime": "The last time the condition transitioned from one status to another.", - "reason": "The reason for the condition's last transition.", - "message": "A human readable message indicating details about the transition.", -} - -func (BuildCondition) SwaggerDoc() map[string]string { - return map_BuildCondition -} - -var map_BuildConfig = map[string]string{ - "": "Build configurations define a build process for new container images. There are three types of builds possible - a container image build using a Dockerfile, a Source-to-Image build that uses a specially prepared base image that accepts source code that it can make runnable, and a custom build that can run // arbitrary container images as a base and accept the build parameters. Builds run on the cluster and on completion are pushed to the container image registry specified in the \"output\" section. A build can be triggered via a webhook, when the base image changes, or when a user manually requests a new build be // created.\n\nEach build created by a build configuration is numbered and refers back to its parent configuration. Multiple builds can be triggered at once. Builds that do not have \"output\" set can be used to test code or run a verification build.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds all the input necessary to produce a new build, and the conditions when to trigger them.", - "status": "status holds any relevant information about a build config", -} - -func (BuildConfig) SwaggerDoc() map[string]string { - return map_BuildConfig -} - -var map_BuildConfigList = map[string]string{ - "": "BuildConfigList is a collection of BuildConfigs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of build configs", -} - -func (BuildConfigList) SwaggerDoc() map[string]string { - return map_BuildConfigList -} - -var map_BuildConfigSpec = map[string]string{ - "": "BuildConfigSpec describes when and how builds are created", - "triggers": "triggers determine how new Builds can be launched from a BuildConfig. If no triggers are defined, a new build can only occur as a result of an explicit client build creation.", - "runPolicy": "runPolicy describes how the new build created from this build configuration will be scheduled for execution. This is optional, if not specified we default to \"Serial\".", - "successfulBuildsHistoryLimit": "successfulBuildsHistoryLimit is the number of old successful builds to retain. When a BuildConfig is created, the 5 most recent successful builds are retained unless this value is set. If removed after the BuildConfig has been created, all successful builds are retained.", - "failedBuildsHistoryLimit": "failedBuildsHistoryLimit is the number of old failed builds to retain. When a BuildConfig is created, the 5 most recent failed builds are retained unless this value is set. If removed after the BuildConfig has been created, all failed builds are retained.", -} - -func (BuildConfigSpec) SwaggerDoc() map[string]string { - return map_BuildConfigSpec -} - -var map_BuildConfigStatus = map[string]string{ - "": "BuildConfigStatus contains current state of the build config object.", - "lastVersion": "lastVersion is used to inform about number of last triggered build.", - "imageChangeTriggers": "imageChangeTriggers captures the runtime state of any ImageChangeTrigger specified in the BuildConfigSpec, including the value reconciled by the OpenShift APIServer for the lastTriggeredImageID. There is a single entry in this array for each image change trigger in spec. Each trigger status references the ImageStreamTag that acts as the source of the trigger.", -} - -func (BuildConfigStatus) SwaggerDoc() map[string]string { - return map_BuildConfigStatus -} - -var map_BuildList = map[string]string{ - "": "BuildList is a collection of Builds.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of builds", -} - -func (BuildList) SwaggerDoc() map[string]string { - return map_BuildList -} - -var map_BuildLog = map[string]string{ - "": "BuildLog is the (unused) resource associated with the build log redirector\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", -} - -func (BuildLog) SwaggerDoc() map[string]string { - return map_BuildLog -} - -var map_BuildLogOptions = map[string]string{ - "": "BuildLogOptions is the REST options for a build log\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "container": "cointainer for which to stream logs. Defaults to only container if there is one container in the pod.", - "follow": "follow if true indicates that the build log should be streamed until the build terminates.", - "previous": "previous returns previous build logs. Defaults to false.", - "sinceSeconds": "sinceSeconds is a relative time in seconds before the current time from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "sinceTime": "sinceTime is an RFC3339 timestamp from which to show logs. If this value precedes the time a pod was started, only logs since the pod start will be returned. If this value is in the future, no logs will be returned. Only one of sinceSeconds or sinceTime may be specified.", - "timestamps": "timestamps, If true, add an RFC3339 or RFC3339Nano timestamp at the beginning of every line of log output. Defaults to false.", - "tailLines": "tailLines, If set, is the number of lines from the end of the logs to show. If not specified, logs are shown from the creation of the container or sinceSeconds or sinceTime", - "limitBytes": "limitBytes, If set, is the number of bytes to read from the server before terminating the log output. This may not display a complete final line of logging, and may return slightly more or slightly less than the specified limit.", - "nowait": "nowait if true causes the call to return immediately even if the build is not available yet. Otherwise the server will wait until the build has started.", - "version": "version of the build for which to view logs.", - "insecureSkipTLSVerifyBackend": "insecureSkipTLSVerifyBackend indicates that the apiserver should not confirm the validity of the serving certificate of the backend it is connecting to. This will make the HTTPS connection between the apiserver and the backend insecure. This means the apiserver cannot verify the log data it is receiving came from the real kubelet. If the kubelet is configured to verify the apiserver's TLS credentials, it does not mean the connection to the real kubelet is vulnerable to a man in the middle attack (e.g. an attacker could not intercept the actual log data coming from the real kubelet).", -} - -func (BuildLogOptions) SwaggerDoc() map[string]string { - return map_BuildLogOptions -} - -var map_BuildOutput = map[string]string{ - "": "BuildOutput is input to a build strategy and describes the container image that the strategy should produce.", - "to": "to defines an optional location to push the output of this build to. Kind must be one of 'ImageStreamTag' or 'DockerImage'. This value will be used to look up a container image repository to push to. In the case of an ImageStreamTag, the ImageStreamTag will be looked for in the namespace of the build unless Namespace is specified.", - "pushSecret": "pushSecret is the name of a Secret that would be used for setting up the authentication for executing the Docker push to authentication enabled Docker Registry (or Docker Hub).", - "imageLabels": "imageLabels define a list of labels that are applied to the resulting image. If there are multiple labels with the same name then the last one in the list is used.", -} - -func (BuildOutput) SwaggerDoc() map[string]string { - return map_BuildOutput -} - -var map_BuildPostCommitSpec = map[string]string{ - "": "A BuildPostCommitSpec holds a build post commit hook specification. The hook executes a command in a temporary container running the build output image, immediately after the last layer of the image is committed and before the image is pushed to a registry. The command is executed with the current working directory ($PWD) set to the image's WORKDIR.\n\nThe build will be marked as failed if the hook execution fails. It will fail if the script or command return a non-zero exit code, or if there is any other error related to starting the temporary container.\n\nThere are five different ways to configure the hook. As an example, all forms below are equivalent and will execute `rake test --verbose`.\n\n1. Shell script:\n\n\t \"postCommit\": {\n\t \"script\": \"rake test --verbose\",\n\t }\n\n\tThe above is a convenient form which is equivalent to:\n\n\t \"postCommit\": {\n\t \"command\": [\"/bin/sh\", \"-ic\"],\n\t \"args\": [\"rake test --verbose\"]\n\t }\n\n2. A command as the image entrypoint:\n\n\t \"postCommit\": {\n\t \"commit\": [\"rake\", \"test\", \"--verbose\"]\n\t }\n\n\tCommand overrides the image entrypoint in the exec form, as documented in\n\tDocker: https://docs.docker.com/engine/reference/builder/#entrypoint.\n\n3. Pass arguments to the default entrypoint:\n\n\t \"postCommit\": {\n\t\t\t \"args\": [\"rake\", \"test\", \"--verbose\"]\n\t\t }\n\n\t This form is only useful if the image entrypoint can handle arguments.\n\n4. Shell script with arguments:\n\n\t \"postCommit\": {\n\t \"script\": \"rake test $1\",\n\t \"args\": [\"--verbose\"]\n\t }\n\n\tThis form is useful if you need to pass arguments that would otherwise be\n\thard to quote properly in the shell script. In the script, $0 will be\n\t\"/bin/sh\" and $1, $2, etc, are the positional arguments from Args.\n\n5. Command with arguments:\n\n\t \"postCommit\": {\n\t \"command\": [\"rake\", \"test\"],\n\t \"args\": [\"--verbose\"]\n\t }\n\n\tThis form is equivalent to appending the arguments to the Command slice.\n\nIt is invalid to provide both Script and Command simultaneously. If none of the fields are specified, the hook is not executed.", - "command": "command is the command to run. It may not be specified with Script. This might be needed if the image doesn't have `/bin/sh`, or if you do not want to use a shell. In all other cases, using Script might be more convenient.", - "args": "args is a list of arguments that are provided to either Command, Script or the container image's default entrypoint. The arguments are placed immediately after the command to be run.", - "script": "script is a shell script to be run with `/bin/sh -ic`. It may not be specified with Command. Use Script when a shell script is appropriate to execute the post build hook, for example for running unit tests with `rake test`. If you need control over the image entrypoint, or if the image does not have `/bin/sh`, use Command and/or Args. The `-i` flag is needed to support CentOS and RHEL images that use Software Collections (SCL), in order to have the appropriate collections enabled in the shell. E.g., in the Ruby image, this is necessary to make `ruby`, `bundle` and other binaries available in the PATH.", -} - -func (BuildPostCommitSpec) SwaggerDoc() map[string]string { - return map_BuildPostCommitSpec -} - -var map_BuildRequest = map[string]string{ - "": "BuildRequest is the resource used to pass parameters to build generator\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "revision": "revision is the information from the source for a specific repo snapshot.", - "triggeredByImage": "triggeredByImage is the Image that triggered this build.", - "from": "from is the reference to the ImageStreamTag that triggered the build.", - "binary": "binary indicates a request to build from a binary provided to the builder", - "lastVersion": "lastVersion (optional) is the LastVersion of the BuildConfig that was used to generate the build. If the BuildConfig in the generator doesn't match, a build will not be generated.", - "env": "env contains additional environment variables you want to pass into a builder container.", - "triggeredBy": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.", - "dockerStrategyOptions": "dockerStrategyOptions contains additional docker-strategy specific options for the build", - "sourceStrategyOptions": "sourceStrategyOptions contains additional source-strategy specific options for the build", -} - -func (BuildRequest) SwaggerDoc() map[string]string { - return map_BuildRequest -} - -var map_BuildSource = map[string]string{ - "": "BuildSource is the SCM used for the build.", - "type": "type of build input to accept", - "binary": "binary builds accept a binary as their input. The binary is generally assumed to be a tar, gzipped tar, or zip file depending on the strategy. For container image builds, this is the build context and an optional Dockerfile may be specified to override any Dockerfile in the build context. For Source builds, this is assumed to be an archive as described above. For Source and container image builds, if binary.asFile is set the build will receive a directory with a single file. contextDir may be used when an archive is provided. Custom builds will receive this binary as input on STDIN.", - "dockerfile": "dockerfile is the raw contents of a Dockerfile which should be built. When this option is specified, the FROM may be modified based on your strategy base image and additional ENV stanzas from your strategy environment will be added after the FROM, but before the rest of your Dockerfile stanzas. The Dockerfile source type may be used with other options like git - in those cases the Git repo will have any innate Dockerfile replaced in the context dir.", - "git": "git contains optional information about git build source", - "images": "images describes a set of images to be used to provide source for the build", - "contextDir": "contextDir specifies the sub-directory where the source code for the application exists. This allows to have buildable sources in directory other than root of repository.", - "sourceSecret": "sourceSecret is the name of a Secret that would be used for setting up the authentication for cloning private repository. The secret contains valid credentials for remote repository, where the data's key represent the authentication method to be used and value is the base64 encoded credentials. Supported auth methods are: ssh-privatekey.", - "secrets": "secrets represents a list of secrets and their destinations that will be used only for the build.", - "configMaps": "configMaps represents a list of configMaps and their destinations that will be used for the build.", -} - -func (BuildSource) SwaggerDoc() map[string]string { - return map_BuildSource -} - -var map_BuildSpec = map[string]string{ - "": "BuildSpec has the information to represent a build and also additional information about a build", - "triggeredBy": "triggeredBy describes which triggers started the most recent update to the build configuration and contains information about those triggers.", -} - -func (BuildSpec) SwaggerDoc() map[string]string { - return map_BuildSpec -} - -var map_BuildStatus = map[string]string{ - "": "BuildStatus contains the status of a build", - "phase": "phase is the point in the build lifecycle. Possible values are \"New\", \"Pending\", \"Running\", \"Complete\", \"Failed\", \"Error\", and \"Cancelled\".", - "cancelled": "cancelled describes if a cancel event was triggered for the build.", - "reason": "reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.", - "message": "message is a human-readable message indicating details about why the build has this status.", - "startTimestamp": "startTimestamp is a timestamp representing the server time when this Build started running in a Pod. It is represented in RFC3339 form and is in UTC.", - "completionTimestamp": "completionTimestamp is a timestamp representing the server time when this Build was finished, whether that build failed or succeeded. It reflects the time at which the Pod running the Build terminated. It is represented in RFC3339 form and is in UTC.", - "duration": "duration contains time.Duration object describing build time.", - "outputDockerImageReference": "outputDockerImageReference contains a reference to the container image that will be built by this build. Its value is computed from Build.Spec.Output.To, and should include the registry address, so that it can be used to push and pull the image.", - "config": "config is an ObjectReference to the BuildConfig this Build is based on.", - "output": "output describes the container image the build has produced.", - "stages": "stages contains details about each stage that occurs during the build including start time, duration (in milliseconds), and the steps that occured within each stage.", - "logSnippet": "logSnippet is the last few lines of the build log. This value is only set for builds that failed.", - "conditions": "conditions represents the latest available observations of a build's current state.", -} - -func (BuildStatus) SwaggerDoc() map[string]string { - return map_BuildStatus -} - -var map_BuildStatusOutput = map[string]string{ - "": "BuildStatusOutput contains the status of the built image.", - "to": "to describes the status of the built image being pushed to a registry.", -} - -func (BuildStatusOutput) SwaggerDoc() map[string]string { - return map_BuildStatusOutput -} - -var map_BuildStatusOutputTo = map[string]string{ - "": "BuildStatusOutputTo describes the status of the built image with regards to image registry to which it was supposed to be pushed.", - "imageDigest": "imageDigest is the digest of the built container image. The digest uniquely identifies the image in the registry to which it was pushed.\n\nPlease note that this field may not always be set even if the push completes successfully - e.g. when the registry returns no digest or returns it in a format that the builder doesn't understand.", -} - -func (BuildStatusOutputTo) SwaggerDoc() map[string]string { - return map_BuildStatusOutputTo -} - -var map_BuildStrategy = map[string]string{ - "": "BuildStrategy contains the details of how to perform a build.", - "type": "type is the kind of build strategy.", - "dockerStrategy": "dockerStrategy holds the parameters to the container image build strategy.", - "sourceStrategy": "sourceStrategy holds the parameters to the Source build strategy.", - "customStrategy": "customStrategy holds the parameters to the Custom build strategy", - "jenkinsPipelineStrategy": "jenkinsPipelineStrategy holds the parameters to the Jenkins Pipeline build strategy. Deprecated: use OpenShift Pipelines", -} - -func (BuildStrategy) SwaggerDoc() map[string]string { - return map_BuildStrategy -} - -var map_BuildTriggerCause = map[string]string{ - "": "BuildTriggerCause holds information about a triggered build. It is used for displaying build trigger data for each build and build configuration in oc describe. It is also used to describe which triggers led to the most recent update in the build configuration.", - "message": "message is used to store a human readable message for why the build was triggered. E.g.: \"Manually triggered by user\", \"Configuration change\",etc.", - "genericWebHook": "genericWebHook holds data about a builds generic webhook trigger.", - "githubWebHook": "githubWebHook represents data for a GitHub webhook that fired a specific build.", - "imageChangeBuild": "imageChangeBuild stores information about an imagechange event that triggered a new build.", - "gitlabWebHook": "gitlabWebHook represents data for a GitLab webhook that fired a specific build.", - "bitbucketWebHook": "bitbucketWebHook represents data for a Bitbucket webhook that fired a specific build.", -} - -func (BuildTriggerCause) SwaggerDoc() map[string]string { - return map_BuildTriggerCause -} - -var map_BuildTriggerPolicy = map[string]string{ - "": "BuildTriggerPolicy describes a policy for a single trigger that results in a new Build.", - "type": "type is the type of build trigger. Valid values:\n\n- GitHub GitHubWebHookBuildTriggerType represents a trigger that launches builds on GitHub webhook invocations\n\n- Generic GenericWebHookBuildTriggerType represents a trigger that launches builds on generic webhook invocations\n\n- GitLab GitLabWebHookBuildTriggerType represents a trigger that launches builds on GitLab webhook invocations\n\n- Bitbucket BitbucketWebHookBuildTriggerType represents a trigger that launches builds on Bitbucket webhook invocations\n\n- ImageChange ImageChangeBuildTriggerType represents a trigger that launches builds on availability of a new version of an image\n\n- ConfigChange ConfigChangeBuildTriggerType will trigger a build on an initial build config creation WARNING: In the future the behavior will change to trigger a build on any config change", - "github": "github contains the parameters for a GitHub webhook type of trigger", - "generic": "generic contains the parameters for a Generic webhook type of trigger", - "imageChange": "imageChange contains parameters for an ImageChange type of trigger", - "gitlab": "GitLabWebHook contains the parameters for a GitLab webhook type of trigger", - "bitbucket": "BitbucketWebHook contains the parameters for a Bitbucket webhook type of trigger", -} - -func (BuildTriggerPolicy) SwaggerDoc() map[string]string { - return map_BuildTriggerPolicy -} - -var map_BuildVolume = map[string]string{ - "": "BuildVolume describes a volume that is made available to build pods, such that it can be mounted into buildah's runtime environment. Only a subset of Kubernetes Volume sources are supported.", - "name": "name is a unique identifier for this BuildVolume. It must conform to the Kubernetes DNS label standard and be unique within the pod. Names that collide with those added by the build controller will result in a failed build with an error message detailing which name caused the error. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", - "source": "source represents the location and type of the mounted volume.", - "mounts": "mounts represents the location of the volume in the image build container", -} - -func (BuildVolume) SwaggerDoc() map[string]string { - return map_BuildVolume -} - -var map_BuildVolumeMount = map[string]string{ - "": "BuildVolumeMount describes the mounting of a Volume within buildah's runtime environment.", - "destinationPath": "destinationPath is the path within the buildah runtime environment at which the volume should be mounted. The transient mount within the build image and the backing volume will both be mounted read only. Must be an absolute path, must not contain '..' or ':', and must not collide with a destination path generated by the builder process Paths that collide with those added by the build controller will result in a failed build with an error message detailing which path caused the error.", -} - -func (BuildVolumeMount) SwaggerDoc() map[string]string { - return map_BuildVolumeMount -} - -var map_BuildVolumeSource = map[string]string{ - "": "BuildVolumeSource represents the source of a volume to mount Only one of its supported types may be specified at any given time.", - "type": "type is the BuildVolumeSourceType for the volume source. Type must match the populated volume source. Valid types are: Secret, ConfigMap", - "secret": "secret represents a Secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret", - "configMap": "configMap represents a ConfigMap that should populate this volume", - "csi": "csi represents ephemeral storage provided by external CSI drivers which support this capability", -} - -func (BuildVolumeSource) SwaggerDoc() map[string]string { - return map_BuildVolumeSource -} - -var map_CommonSpec = map[string]string{ - "": "CommonSpec encapsulates all the inputs necessary to represent a build.", - "serviceAccount": "serviceAccount is the name of the ServiceAccount to use to run the pod created by this build. The pod will be allowed to use secrets referenced by the ServiceAccount", - "source": "source describes the SCM in use.", - "revision": "revision is the information from the source for a specific repo snapshot. This is optional.", - "strategy": "strategy defines how to perform a build.", - "output": "output describes the container image the Strategy should produce.", - "resources": "resources computes resource requirements to execute the build.", - "postCommit": "postCommit is a build hook executed after the build output image is committed, before it is pushed to a registry.", - "completionDeadlineSeconds": "completionDeadlineSeconds is an optional duration in seconds, counted from the time when a build pod gets scheduled in the system, that the build may be active on a node before the system actively tries to terminate the build; value must be positive integer", - "nodeSelector": "nodeSelector is a selector which must be true for the build pod to fit on a node If nil, it can be overridden by default build nodeselector values for the cluster. If set to an empty map or a map with any values, default build nodeselector values are ignored.", - "mountTrustedCA": "mountTrustedCA bind mounts the cluster's trusted certificate authorities, as defined in the cluster's proxy configuration, into the build. This lets processes within a build trust components signed by custom PKI certificate authorities, such as private artifact repositories and HTTPS proxies.\n\nWhen this field is set to true, the contents of `/etc/pki/ca-trust` within the build are managed by the build container, and any changes to this directory or its subdirectories (for example - within a Dockerfile `RUN` instruction) are not persisted in the build's output image.", -} - -func (CommonSpec) SwaggerDoc() map[string]string { - return map_CommonSpec -} - -var map_CommonWebHookCause = map[string]string{ - "": "CommonWebHookCause factors out the identical format of these webhook causes into struct so we can share it in the specific causes; it is too late for GitHub and Generic but we can leverage this pattern with GitLab and Bitbucket.", - "revision": "revision is the git source revision information of the trigger.", - "secret": "secret is the obfuscated webhook secret that triggered a build.", -} - -func (CommonWebHookCause) SwaggerDoc() map[string]string { - return map_CommonWebHookCause -} - -var map_ConfigMapBuildSource = map[string]string{ - "": "ConfigMapBuildSource describes a configmap and its destination directory that will be used only at the build time. The content of the configmap referenced here will be copied into the destination directory instead of mounting.", - "configMap": "configMap is a reference to an existing configmap that you want to use in your build.", - "destinationDir": "destinationDir is the directory where the files from the configmap should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. For the container image build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during container image build.", -} - -func (ConfigMapBuildSource) SwaggerDoc() map[string]string { - return map_ConfigMapBuildSource -} - -var map_CustomBuildStrategy = map[string]string{ - "": "CustomBuildStrategy defines input parameters specific to Custom build.", - "from": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the container image should be pulled", - "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the container images from the private Docker registries", - "env": "env contains additional environment variables you want to pass into a builder container.", - "exposeDockerSocket": "exposeDockerSocket will allow running Docker commands (and build container images) from inside the container.", - "forcePull": "forcePull describes if the controller should configure the build pod to always pull the images for the builder or only pull if it is not present locally", - "secrets": "secrets is a list of additional secrets that will be included in the build pod", - "buildAPIVersion": "buildAPIVersion is the requested API version for the Build object serialized and passed to the custom builder", -} - -func (CustomBuildStrategy) SwaggerDoc() map[string]string { - return map_CustomBuildStrategy -} - -var map_DockerBuildStrategy = map[string]string{ - "": "DockerBuildStrategy defines input parameters specific to container image build.", - "from": "from is a reference to an DockerImage, ImageStreamTag, or ImageStreamImage which overrides the FROM image in the Dockerfile for the build. If the Dockerfile uses multi-stage builds, this will replace the image in the last FROM directive of the file.", - "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the container images from the private Docker registries", - "noCache": "noCache if set to true indicates that the container image build must be executed with the --no-cache=true flag", - "env": "env contains additional environment variables you want to pass into a builder container.", - "forcePull": "forcePull describes if the builder should pull the images from registry prior to building.", - "dockerfilePath": "dockerfilePath is the path of the Dockerfile that will be used to build the container image, relative to the root of the context (contextDir). Defaults to `Dockerfile` if unset.", - "buildArgs": "buildArgs contains build arguments that will be resolved in the Dockerfile. See https://docs.docker.com/engine/reference/builder/#/arg for more details. NOTE: Only the 'name' and 'value' fields are supported. Any settings on the 'valueFrom' field are ignored.", - "imageOptimizationPolicy": "imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image. The default policy is 'None' which means the final build image will be equivalent to an image created by the container image build API. The experimental policy 'SkipLayers' will avoid commiting new layers in between each image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' policy. An additional experimental policy 'SkipLayersAndWarn' is the same as 'SkipLayers' but simply warns if compatibility cannot be preserved.", - "volumes": "volumes is a list of input volumes that can be mounted into the builds runtime environment. Only a subset of Kubernetes Volume sources are supported by builds. More info: https://kubernetes.io/docs/concepts/storage/volumes", -} - -func (DockerBuildStrategy) SwaggerDoc() map[string]string { - return map_DockerBuildStrategy -} - -var map_DockerStrategyOptions = map[string]string{ - "": "DockerStrategyOptions contains extra strategy options for container image builds", - "buildArgs": "Args contains any build arguments that are to be passed to Docker. See https://docs.docker.com/engine/reference/builder/#/arg for more details", - "noCache": "noCache overrides the docker-strategy noCache option in the build config", -} - -func (DockerStrategyOptions) SwaggerDoc() map[string]string { - return map_DockerStrategyOptions -} - -var map_GenericWebHookCause = map[string]string{ - "": "GenericWebHookCause holds information about a generic WebHook that triggered a build.", - "revision": "revision is an optional field that stores the git source revision information of the generic webhook trigger when it is available.", - "secret": "secret is the obfuscated webhook secret that triggered a build.", -} - -func (GenericWebHookCause) SwaggerDoc() map[string]string { - return map_GenericWebHookCause -} - -var map_GenericWebHookEvent = map[string]string{ - "": "GenericWebHookEvent is the payload expected for a generic webhook post", - "type": "type is the type of source repository", - "git": "git is the git information if the Type is BuildSourceGit", - "env": "env contains additional environment variables you want to pass into a builder container. ValueFrom is not supported.", - "dockerStrategyOptions": "dockerStrategyOptions contains additional docker-strategy specific options for the build", -} - -func (GenericWebHookEvent) SwaggerDoc() map[string]string { - return map_GenericWebHookEvent -} - -var map_GitBuildSource = map[string]string{ - "": "GitBuildSource defines the parameters of a Git SCM", - "uri": "uri points to the source that will be built. The structure of the source will depend on the type of build to run", - "ref": "ref is the branch/tag/ref to build.", -} - -func (GitBuildSource) SwaggerDoc() map[string]string { - return map_GitBuildSource -} - -var map_GitHubWebHookCause = map[string]string{ - "": "GitHubWebHookCause has information about a GitHub webhook that triggered a build.", - "revision": "revision is the git revision information of the trigger.", - "secret": "secret is the obfuscated webhook secret that triggered a build.", -} - -func (GitHubWebHookCause) SwaggerDoc() map[string]string { - return map_GitHubWebHookCause -} - -var map_GitInfo = map[string]string{ - "": "GitInfo is the aggregated git information for a generic webhook post", - "refs": "refs is a list of GitRefs for the provided repo - generally sent when used from a post-receive hook. This field is optional and is used when sending multiple refs", -} - -func (GitInfo) SwaggerDoc() map[string]string { - return map_GitInfo -} - -var map_GitLabWebHookCause = map[string]string{ - "": "GitLabWebHookCause has information about a GitLab webhook that triggered a build.", -} - -func (GitLabWebHookCause) SwaggerDoc() map[string]string { - return map_GitLabWebHookCause -} - -var map_GitRefInfo = map[string]string{ - "": "GitRefInfo is a single ref", -} - -func (GitRefInfo) SwaggerDoc() map[string]string { - return map_GitRefInfo -} - -var map_GitSourceRevision = map[string]string{ - "": "GitSourceRevision is the commit information from a git source for a build", - "commit": "commit is the commit hash identifying a specific commit", - "author": "author is the author of a specific commit", - "committer": "committer is the committer of a specific commit", - "message": "message is the description of a specific commit", -} - -func (GitSourceRevision) SwaggerDoc() map[string]string { - return map_GitSourceRevision -} - -var map_ImageChangeCause = map[string]string{ - "": "ImageChangeCause contains information about the image that triggered a build", - "imageID": "imageID is the ID of the image that triggered a new build.", - "fromRef": "fromRef contains detailed information about an image that triggered a build.", -} - -func (ImageChangeCause) SwaggerDoc() map[string]string { - return map_ImageChangeCause -} - -var map_ImageChangeTrigger = map[string]string{ - "": "ImageChangeTrigger allows builds to be triggered when an ImageStream changes", - "lastTriggeredImageID": "lastTriggeredImageID is used internally by the ImageChangeController to save last used image ID for build This field is deprecated and will be removed in a future release. Deprecated", - "from": "from is a reference to an ImageStreamTag that will trigger a build when updated It is optional. If no From is specified, the From image from the build strategy will be used. Only one ImageChangeTrigger with an empty From reference is allowed in a build configuration.", - "paused": "paused is true if this trigger is temporarily disabled. Optional.", -} - -func (ImageChangeTrigger) SwaggerDoc() map[string]string { - return map_ImageChangeTrigger -} - -var map_ImageChangeTriggerStatus = map[string]string{ - "": "ImageChangeTriggerStatus tracks the latest resolved status of the associated ImageChangeTrigger policy specified in the BuildConfigSpec.Triggers struct.", - "lastTriggeredImageID": "lastTriggeredImageID represents the sha/id of the ImageStreamTag when a Build for this BuildConfig was started. The lastTriggeredImageID is updated each time a Build for this BuildConfig is started, even if this ImageStreamTag is not the reason the Build is started.", - "from": "from is the ImageStreamTag that is the source of the trigger.", - "lastTriggerTime": "lastTriggerTime is the last time this particular ImageStreamTag triggered a Build to start. This field is only updated when this trigger specifically started a Build.", -} - -func (ImageChangeTriggerStatus) SwaggerDoc() map[string]string { - return map_ImageChangeTriggerStatus -} - -var map_ImageLabel = map[string]string{ - "": "ImageLabel represents a label applied to the resulting image.", - "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_ImageSource = map[string]string{ - "": "ImageSource is used to describe build source that will be extracted from an image or used during a multi stage build. A reference of type ImageStreamTag, ImageStreamImage or DockerImage may be used. A pull secret can be specified to pull the image from an external registry or override the default service account secret if pulling from the internal registry. Image sources can either be used to extract content from an image and place it into the build context along with the repository source, or used directly during a multi-stage container image build to allow content to be copied without overwriting the contents of the repository source (see the 'paths' and 'as' fields).", - "from": "from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.", - "as": "A list of image names that this source will be used in place of during a multi-stage container image build. For instance, a Dockerfile that uses \"COPY --from=nginx:latest\" will first check for an image source that has \"nginx:latest\" in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.", - "paths": "paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.", - "pullSecret": "pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.", -} - -func (ImageSource) SwaggerDoc() map[string]string { - return map_ImageSource -} - -var map_ImageSourcePath = map[string]string{ - "": "ImageSourcePath describes a path to be copied from a source image and its destination within the build directory.", - "sourcePath": "sourcePath is the absolute path of the file or directory inside the image to copy to the build directory. If the source path ends in /. then the content of the directory will be copied, but the directory itself will not be created at the destination.", - "destinationDir": "destinationDir is the relative directory within the build directory where files copied from the image are placed.", -} - -func (ImageSourcePath) SwaggerDoc() map[string]string { - return map_ImageSourcePath -} - -var map_ImageStreamTagReference = map[string]string{ - "": "ImageStreamTagReference references the ImageStreamTag in an image change trigger by namespace and name.", - "namespace": "namespace is the namespace where the ImageStreamTag for an ImageChangeTrigger is located", - "name": "name is the name of the ImageStreamTag for an ImageChangeTrigger", -} - -func (ImageStreamTagReference) SwaggerDoc() map[string]string { - return map_ImageStreamTagReference -} - -var map_JenkinsPipelineBuildStrategy = map[string]string{ - "": "JenkinsPipelineBuildStrategy holds parameters specific to a Jenkins Pipeline build. Deprecated: use OpenShift Pipelines", - "jenkinsfilePath": "jenkinsfilePath is the optional path of the Jenkinsfile that will be used to configure the pipeline relative to the root of the context (contextDir). If both JenkinsfilePath & Jenkinsfile are both not specified, this defaults to Jenkinsfile in the root of the specified contextDir.", - "jenkinsfile": "jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build.", - "env": "env contains additional environment variables you want to pass into a build pipeline.", -} - -func (JenkinsPipelineBuildStrategy) SwaggerDoc() map[string]string { - return map_JenkinsPipelineBuildStrategy -} - -var map_ProxyConfig = map[string]string{ - "": "ProxyConfig defines what proxies to use for an operation", - "httpProxy": "httpProxy is a proxy used to reach the git repository over http", - "httpsProxy": "httpsProxy is a proxy used to reach the git repository over https", - "noProxy": "noProxy is the list of domains for which the proxy should not be used", -} - -func (ProxyConfig) SwaggerDoc() map[string]string { - return map_ProxyConfig -} - -var map_SecretBuildSource = map[string]string{ - "": "SecretBuildSource describes a secret and its destination directory that will be used only at the build time. The content of the secret referenced here will be copied into the destination directory instead of mounting.", - "secret": "secret is a reference to an existing secret that you want to use in your build.", - "destinationDir": "destinationDir is the directory where the files from the secret should be available for the build time. For the Source build strategy, these will be injected into a container where the assemble script runs. Later, when the script finishes, all files injected will be truncated to zero length. For the container image build strategy, these will be copied into the build directory, where the Dockerfile is located, so users can ADD or COPY them during container image build.", -} - -func (SecretBuildSource) SwaggerDoc() map[string]string { - return map_SecretBuildSource -} - -var map_SecretLocalReference = map[string]string{ - "": "SecretLocalReference contains information that points to the local secret being used", - "name": "name is the name of the resource in the same namespace being referenced", -} - -func (SecretLocalReference) SwaggerDoc() map[string]string { - return map_SecretLocalReference -} - -var map_SecretSpec = map[string]string{ - "": "SecretSpec specifies a secret to be included in a build pod and its corresponding mount point", - "secretSource": "secretSource is a reference to the secret", - "mountPath": "mountPath is the path at which to mount the secret", -} - -func (SecretSpec) SwaggerDoc() map[string]string { - return map_SecretSpec -} - -var map_SourceBuildStrategy = map[string]string{ - "": "SourceBuildStrategy defines input parameters specific to an Source build.", - "from": "from is reference to an DockerImage, ImageStreamTag, or ImageStreamImage from which the container image should be pulled", - "pullSecret": "pullSecret is the name of a Secret that would be used for setting up the authentication for pulling the container images from the private Docker registries", - "env": "env contains additional environment variables you want to pass into a builder container.", - "scripts": "scripts is the location of Source scripts", - "incremental": "incremental flag forces the Source build to do incremental builds if true.", - "forcePull": "forcePull describes if the builder should pull the images from registry prior to building.", - "volumes": "volumes is a list of input volumes that can be mounted into the builds runtime environment. Only a subset of Kubernetes Volume sources are supported by builds. More info: https://kubernetes.io/docs/concepts/storage/volumes", -} - -func (SourceBuildStrategy) SwaggerDoc() map[string]string { - return map_SourceBuildStrategy -} - -var map_SourceControlUser = map[string]string{ - "": "SourceControlUser defines the identity of a user of source control", - "name": "name of the source control user", - "email": "email of the source control user", -} - -func (SourceControlUser) SwaggerDoc() map[string]string { - return map_SourceControlUser -} - -var map_SourceRevision = map[string]string{ - "": "SourceRevision is the revision or commit information from the source for the build", - "type": "type of the build source, may be one of 'Source', 'Dockerfile', 'Binary', or 'Images'", - "git": "git contains information about git-based build source", -} - -func (SourceRevision) SwaggerDoc() map[string]string { - return map_SourceRevision -} - -var map_SourceStrategyOptions = map[string]string{ - "": "SourceStrategyOptions contains extra strategy options for Source builds", - "incremental": "incremental overrides the source-strategy incremental option in the build config", -} - -func (SourceStrategyOptions) SwaggerDoc() map[string]string { - return map_SourceStrategyOptions -} - -var map_StageInfo = map[string]string{ - "": "StageInfo contains details about a build stage.", - "name": "name is a unique identifier for each build stage that occurs.", - "startTime": "startTime is a timestamp representing the server time when this Stage started. It is represented in RFC3339 form and is in UTC.", - "durationMilliseconds": "durationMilliseconds identifies how long the stage took to complete in milliseconds. Note: the duration of a stage can exceed the sum of the duration of the steps within the stage as not all actions are accounted for in explicit build steps.", - "steps": "steps contains details about each step that occurs during a build stage including start time and duration in milliseconds.", -} - -func (StageInfo) SwaggerDoc() map[string]string { - return map_StageInfo -} - -var map_StepInfo = map[string]string{ - "": "StepInfo contains details about a build step.", - "name": "name is a unique identifier for each build step.", - "startTime": "startTime is a timestamp representing the server time when this Step started. it is represented in RFC3339 form and is in UTC.", - "durationMilliseconds": "durationMilliseconds identifies how long the step took to complete in milliseconds.", -} - -func (StepInfo) SwaggerDoc() map[string]string { - return map_StepInfo -} - -var map_WebHookTrigger = map[string]string{ - "": "WebHookTrigger is a trigger that gets invoked using a webhook type of post", - "secret": "secret used to validate requests. Deprecated: use SecretReference instead.", - "allowEnv": "allowEnv determines whether the webhook can set environment variables; can only be set to true for GenericWebHook.", - "secretReference": "secretReference is a reference to a secret in the same namespace, containing the value to be validated when the webhook is invoked. The secret being referenced must contain a key named \"WebHookSecretKey\", the value of which will be checked against the value supplied in the webhook invocation.", -} - -func (WebHookTrigger) SwaggerDoc() map[string]string { - return map_WebHookTrigger -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml b/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/cloudnetwork/OWNERS b/vendor/github.com/openshift/api/cloudnetwork/OWNERS deleted file mode 100644 index 0bc20628a..000000000 --- a/vendor/github.com/openshift/api/cloudnetwork/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -reviewers: - - danwinship - - dcbw - - knobunc - - squeed - - abhat diff --git a/vendor/github.com/openshift/api/cloudnetwork/install.go b/vendor/github.com/openshift/api/cloudnetwork/install.go deleted file mode 100644 index f839ebf00..000000000 --- a/vendor/github.com/openshift/api/cloudnetwork/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package cloudnetwork - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - cloudnetworkv1 "github.com/openshift/api/cloudnetwork/v1" -) - -const ( - GroupName = "cloud.network.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(cloudnetworkv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/config/.codegen.yaml b/vendor/github.com/openshift/api/config/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/config/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/config/install.go b/vendor/github.com/openshift/api/config/install.go deleted file mode 100644 index 851a6c3e1..000000000 --- a/vendor/github.com/openshift/api/config/install.go +++ /dev/null @@ -1,28 +0,0 @@ -package config - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - configv1 "github.com/openshift/api/config/v1" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha2 "github.com/openshift/api/config/v1alpha2" -) - -const ( - GroupName = "config.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(configv1.Install, configv1alpha1.Install, configv1alpha2.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/Makefile b/vendor/github.com/openshift/api/config/v1alpha1/Makefile deleted file mode 100644 index e32ad5d9e..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="config.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/config/v1alpha1/doc.go b/vendor/github.com/openshift/api/config/v1alpha1/doc.go deleted file mode 100644 index 65333883b..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.config.v1alpha1 - -// +kubebuilder:validation:Optional -// +groupName=config.openshift.io -// Package v1alpha1 is the v1alpha1 version of the API. -package v1alpha1 diff --git a/vendor/github.com/openshift/api/config/v1alpha1/register.go b/vendor/github.com/openshift/api/config/v1alpha1/register.go deleted file mode 100644 index 1d84b7107..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/register.go +++ /dev/null @@ -1,46 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ClusterMonitoring{}, - &ClusterMonitoringList{}, - &InsightsDataGather{}, - &InsightsDataGatherList{}, - &Backup{}, - &BackupList{}, - &CRIOCredentialProviderConfig{}, - &CRIOCredentialProviderConfigList{}, - &PKI{}, - &PKIList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go b/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go deleted file mode 100644 index 0f3da5184..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_backup.go +++ /dev/null @@ -1,162 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// Backup provides configuration for performing backups of the openshift cluster. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=backups,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1482 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:enable:FeatureGate=AutomatedEtcdBackup -// +openshift:compatibility-gen:level=4 -type Backup struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec BackupSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status BackupStatus `json:"status"` -} - -type BackupSpec struct { - // etcd specifies the configuration for periodic backups of the etcd cluster - // +required - EtcdBackupSpec EtcdBackupSpec `json:"etcd"` -} - -type BackupStatus struct { -} - -// EtcdBackupSpec provides configuration for automated etcd backups to the cluster-etcd-operator -type EtcdBackupSpec struct { - - // schedule defines the recurring backup schedule in Cron format - // every 2 hours: 0 */2 * * * - // every day at 3am: 0 3 * * * - // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. - // The current default is "no backups", but will change in the future. - // +optional - // +kubebuilder:validation:Pattern:=`^(@(annually|yearly|monthly|weekly|daily|hourly))|(\*|(?:\*|(?:[0-9]|(?:[1-5][0-9])))\/(?:[0-9]|(?:[1-5][0-9]))|(?:[0-9]|(?:[1-5][0-9]))(?:(?:\-[0-9]|\-(?:[1-5][0-9]))?|(?:\,(?:[0-9]|(?:[1-5][0-9])))*)) (\*|(?:\*|(?:\*|(?:[0-9]|1[0-9]|2[0-3])))\/(?:[0-9]|1[0-9]|2[0-3])|(?:[0-9]|1[0-9]|2[0-3])(?:(?:\-(?:[0-9]|1[0-9]|2[0-3]))?|(?:\,(?:[0-9]|1[0-9]|2[0-3]))*)) (\*|(?:[1-9]|(?:[12][0-9])|3[01])(?:(?:\-(?:[1-9]|(?:[12][0-9])|3[01]))?|(?:\,(?:[1-9]|(?:[12][0-9])|3[01]))*)) (\*|(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:\-(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?|(?:\,(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))*)) (\*|(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT)(?:(?:\-(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))?|(?:\,(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))*))$` - Schedule string `json:"schedule"` - - // Cron Regex breakdown: - // Allow macros: (@(annually|yearly|monthly|weekly|daily|hourly)) - // OR - // Minute: - // (\*|(?:\*|(?:[0-9]|(?:[1-5][0-9])))\/(?:[0-9]|(?:[1-5][0-9]))|(?:[0-9]|(?:[1-5][0-9]))(?:(?:\-[0-9]|\-(?:[1-5][0-9]))?|(?:\,(?:[0-9]|(?:[1-5][0-9])))*)) - // Hour: - // (\*|(?:\*|(?:\*|(?:[0-9]|1[0-9]|2[0-3])))\/(?:[0-9]|1[0-9]|2[0-3])|(?:[0-9]|1[0-9]|2[0-3])(?:(?:\-(?:[0-9]|1[0-9]|2[0-3]))?|(?:\,(?:[0-9]|1[0-9]|2[0-3]))*)) - // Day of the Month: - // (\*|(?:[1-9]|(?:[12][0-9])|3[01])(?:(?:\-(?:[1-9]|(?:[12][0-9])|3[01]))?|(?:\,(?:[1-9]|(?:[12][0-9])|3[01]))*)) - // Month: - // (\*|(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC)(?:(?:\-(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))?|(?:\,(?:[1-9]|1[012]|JAN|FEB|MAR|APR|MAY|JUN|JUL|AUG|SEP|OCT|NOV|DEC))*)) - // Day of Week: - // (\*|(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT)(?:(?:\-(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))?|(?:\,(?:[0-6]|SUN|MON|TUE|WED|THU|FRI|SAT))*)) - // - - // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will default to the time zone of the kube-controller-manager process. - // See https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones - // +optional - // +kubebuilder:validation:Pattern:=`^([A-Za-z_]+([+-]*0)*|[A-Za-z_]+(\/[A-Za-z_]+){1,2})(\/GMT[+-]\d{1,2})?$` - TimeZone string `json:"timeZone"` - - // Timezone regex breakdown: - // ([A-Za-z_]+([+-]*0)*|[A-Za-z_]+(/[A-Za-z_]+){1,2}) - Matches either: - // [A-Za-z_]+([+-]*0)* - One or more alphabetical characters (uppercase or lowercase) or underscores, followed by a +0 or -0 to account for GMT+0 or GMT-0 (for the first part of the timezone identifier). - // [A-Za-z_]+(/[A-Za-z_]+){1,2} - One or more alphabetical characters (uppercase or lowercase) or underscores, followed by one or two occurrences of a forward slash followed by one or more alphabetical characters or underscores. This allows for matching timezone identifiers with 2 or 3 parts, e.g America/Argentina/Buenos_Aires - // (/GMT[+-]\d{1,2})? - Makes the GMT offset suffix optional. It matches "/GMT" followed by either a plus ("+") or minus ("-") sign and one or two digits (the GMT offset) - - // retentionPolicy defines the retention policy for retaining and deleting existing backups. - // +optional - RetentionPolicy RetentionPolicy `json:"retentionPolicy"` - - // pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the - // etcd backup files would be saved - // The PVC itself must always be created in the "openshift-etcd" namespace - // If the PVC is left unspecified "" then the platform will choose a reasonable default location to save the backup. - // In the future this would be backups saved across the control-plane master nodes. - // +optional - PVCName string `json:"pvcName"` -} - -// RetentionType is the enumeration of valid retention policy types. -// +enum -// +kubebuilder:validation:Enum:="RetentionNumber";"RetentionSize" -type RetentionType string - -const ( - // RetentionTypeNumber sets the retention policy based on the number of backup files saved - RetentionTypeNumber RetentionType = "RetentionNumber" - // RetentionTypeSize sets the retention policy based on the total size of the backup files saved - RetentionTypeSize RetentionType = "RetentionSize" -) - -// RetentionPolicy defines the retention policy for retaining and deleting existing backups. -// This struct is a discriminated union that allows users to select the type of retention policy from the supported types. -// +union -type RetentionPolicy struct { - // retentionType sets the type of retention policy. - // Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. - // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. - // The current default is RetentionNumber with 15 backups kept. - // +unionDiscriminator - // +required - RetentionType RetentionType `json:"retentionType"` - - // retentionNumber configures the retention policy based on the number of backups - // +optional - RetentionNumber *RetentionNumberConfig `json:"retentionNumber,omitempty"` - - // retentionSize configures the retention policy based on the size of backups - // +optional - RetentionSize *RetentionSizeConfig `json:"retentionSize,omitempty"` -} - -// RetentionNumberConfig specifies the configuration of the retention policy on the number of backups -type RetentionNumberConfig struct { - // maxNumberOfBackups defines the maximum number of backups to retain. - // If the existing number of backups saved is equal to MaxNumberOfBackups then - // the oldest backup will be removed before a new backup is initiated. - // +kubebuilder:validation:Minimum=1 - // +required - MaxNumberOfBackups int `json:"maxNumberOfBackups"` -} - -// RetentionSizeConfig specifies the configuration of the retention policy on the total size of backups -type RetentionSizeConfig struct { - // maxSizeOfBackupsGb defines the total size in GB of backups to retain. - // If the current total size backups exceeds MaxSizeOfBackupsGb then - // the oldest backup will be removed before a new backup is initiated. - // +kubebuilder:validation:Minimum=1 - // +required - MaxSizeOfBackupsGb int `json:"maxSizeOfBackupsGb"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BackupList is a collection of items -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type BackupList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []Backup `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go deleted file mode 100644 index d4846fd1c..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go +++ /dev/null @@ -1,2821 +0,0 @@ -/* -Copyright 2024. - -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 v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterMonitoring is the Custom Resource object which holds the current status of Cluster Monitoring Operator. CMO is a central component of the monitoring stack. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:internal -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1929 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clustermonitorings,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:metadata:annotations="description=Cluster Monitoring Operators configuration API" -// +openshift:enable:FeatureGate=ClusterMonitoringConfig -// ClusterMonitoring is the Schema for the Cluster Monitoring Operators API -type ClusterMonitoring struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object metadata. - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user configuration for the Cluster Monitoring Operator - // +required - Spec ClusterMonitoringSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ClusterMonitoringStatus `json:"status,omitempty"` -} - -// ClusterMonitoringStatus defines the observed state of ClusterMonitoring -type ClusterMonitoringStatus struct { -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:internal -type ClusterMonitoringList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list metadata. - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of ClusterMonitoring - // +optional - Items []ClusterMonitoring `json:"items"` -} - -// ClusterMonitoringSpec defines the desired state of Cluster Monitoring Operator -// +kubebuilder:validation:MinProperties=1 -type ClusterMonitoringSpec struct { - // userDefined set the deployment mode for user-defined monitoring in addition to the default platform monitoring. - // userDefined is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `Disabled`. - // +optional - UserDefined UserDefinedMonitoring `json:"userDefined,omitempty,omitzero"` - // alertmanagerConfig allows users to configure how the default Alertmanager instance - // should be deployed in the `openshift-monitoring` namespace. - // alertmanagerConfig is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `DefaultConfig`. - // +optional - AlertmanagerConfig AlertmanagerConfig `json:"alertmanagerConfig,omitempty,omitzero"` - // prometheusConfig provides configuration options for the default platform Prometheus instance - // that runs in the `openshift-monitoring` namespace. This configuration applies only to the - // platform Prometheus instance; user-workload Prometheus instances are configured separately. - // - // This field allows you to customize how the platform Prometheus is deployed and operated, including: - // - Pod scheduling (node selectors, tolerations, topology spread constraints) - // - Resource allocation (CPU, memory requests/limits) - // - Retention policies (how long metrics are stored) - // - External integrations (remote write, additional alertmanagers) - // - // This field is optional. When omitted, the platform chooses reasonable defaults, which may change over time. - // +optional - PrometheusConfig PrometheusConfig `json:"prometheusConfig,omitempty,omitzero"` - // metricsServerConfig is an optional field that can be used to configure the Kubernetes Metrics Server that runs in the openshift-monitoring namespace. - // Specifically, it can configure how the Metrics Server instance is deployed, pod scheduling, its audit policy and log verbosity. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - MetricsServerConfig MetricsServerConfig `json:"metricsServerConfig,omitempty,omitzero"` - // prometheusOperatorConfig is an optional field that can be used to configure the Prometheus Operator component. - // Specifically, it can configure how the Prometheus Operator instance is deployed, pod scheduling, and resource allocation. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - PrometheusOperatorConfig PrometheusOperatorConfig `json:"prometheusOperatorConfig,omitempty,omitzero"` - // prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the - // admission webhook component of Prometheus Operator that runs in the openshift-monitoring namespace. - // The admission webhook validates PrometheusRule and AlertmanagerConfig objects to ensure they are - // semantically valid, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects - // between API versions. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - PrometheusOperatorAdmissionWebhookConfig PrometheusOperatorAdmissionWebhookConfig `json:"prometheusOperatorAdmissionWebhookConfig,omitempty,omitzero"` - // openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics - // agent that runs in the openshift-monitoring namespace. The openshift-state-metrics agent generates metrics - // about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - OpenShiftStateMetricsConfig OpenShiftStateMetricsConfig `json:"openShiftStateMetricsConfig,omitempty,omitzero"` - // telemeterClientConfig is an optional field that can be used to configure the Telemeter Client - // component that runs in the openshift-monitoring namespace. The Telemeter Client collects - // selected monitoring metrics and forwards them to Red Hat for telemetry purposes. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // When set, at least one field must be specified within telemeterClientConfig. - // +optional - TelemeterClientConfig TelemeterClientConfig `json:"telemeterClientConfig,omitempty,omitzero"` - // thanosQuerierConfig is an optional field that can be used to configure the Thanos Querier - // component that runs in the openshift-monitoring namespace. The Thanos Querier provides - // a global query view by aggregating and deduplicating metrics from multiple Prometheus instances. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default deploys the Thanos Querier on linux nodes with 5m CPU and 12Mi memory - // requests, and no custom tolerations or topology spread constraints. - // When set, at least one field must be specified within thanosQuerierConfig. - // +optional - ThanosQuerierConfig ThanosQuerierConfig `json:"thanosQuerierConfig,omitempty,omitzero"` - // nodeExporterConfig is an optional field that can be used to configure the node-exporter agent - // that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects - // hardware and OS-level metrics from every node in the cluster. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - NodeExporterConfig NodeExporterConfig `json:"nodeExporterConfig,omitempty,omitzero"` - // monitoringPluginConfig is an optional field that can be used to configure the monitoring plugin - // that runs as a dynamic plugin of the OpenShift web console. The monitoring plugin provides - // the monitoring UI in the OpenShift web console for visualizing metrics, alerts, and dashboards. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default deploys the monitoring-plugin as a single-replica Deployment - // on linux nodes with 10m CPU and 50Mi memory requests, and no custom tolerations - // or topology spread constraints. - // When set, at least one field must be specified within monitoringPluginConfig. - // +optional - MonitoringPluginConfig MonitoringPluginConfig `json:"monitoringPluginConfig,omitempty,omitzero"` - // kubeStateMetricsConfig is an optional field that can be used to configure the kube-state-metrics - // agent that runs in the openshift-monitoring namespace. kube-state-metrics generates metrics about - // the state of Kubernetes objects such as Deployments, Nodes, and Pods. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - KubeStateMetricsConfig KubeStateMetricsConfig `json:"kubeStateMetricsConfig,omitempty,omitzero"` -} - -// OpenShiftStateMetricsConfig provides configuration options for the openshift-state-metrics agent -// that runs in the `openshift-monitoring` namespace. The openshift-state-metrics agent generates -// metrics about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. -// +kubebuilder:validation:MinProperties=1 -type OpenShiftStateMetricsConfig struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the openshift-state-metrics container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 1m - // limit: null - // - name: memory - // request: 32Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how openshift-state-metrics Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// NodeExporterConfig provides configuration options for the node-exporter agent -// that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects -// hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and -// network statistics. -// At least one field must be specified. -// +kubebuilder:validation:MinProperties=1 -type NodeExporterConfig struct { - // resources defines the compute resource requests and limits for the node-exporter container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 8m - // limit: null - // - name: memory - // request: 32Mi - // limit: null - // --- - // maxItems is set to 5 to stay within the Kubernetes CRD CEL validation cost budget. - // See the MaxItems comment near the ContainerResource type definition for details. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - - // --- TOMBSTONE --- - // nodeSelector was a field that defined the nodes on which the Pods are scheduled. - // It was removed because node-exporter runs as a DaemonSet on all nodes, - // and the CMO does not support this field. - // The field name "nodeSelector" and json tag are reserved to prevent reuse - // with a different backing type. - // - // +optional - // NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // --- TOMBSTONE --- - // tolerations was a field that defined tolerations for the pods. - // It was removed because node-exporter runs as a DaemonSet on all nodes, - // and the CMO does not support this field. - // The field name "tolerations" and json tag are reserved to prevent reuse - // with a different backing type. - // - // +optional - // Tolerations []v1.Toleration `json:"tolerations,omitempty"` - - // collectors configures which node-exporter metric collectors are enabled. - // collectors is optional. - // Each collector can be individually enabled or disabled. Some collectors may have - // additional configuration options. - // - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. - // +optional - Collectors NodeExporterCollectorConfig `json:"collectors,omitempty,omitzero"` - // maxProcs sets the target number of CPUs on which the node-exporter process will run. - // maxProcs is optional. - // Use this setting to override the default value, which is set either to 4 or to the number - // of CPUs on the host, whichever is smaller. - // The default value is computed at runtime and set via the GOMAXPROCS environment variable before - // node-exporter is launched. - // If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, - // you can change this value to 1, which limits node-exporter to running on one CPU. - // For nodes with a high CPU count, setting the limit to a low number saves resources by preventing - // Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the - // maxProcs value is set too low and there are many metrics to collect. - // The minimum value is 1 and the maximum value is 1024. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is min(4, number of host CPUs). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=1024 - MaxProcs int32 `json:"maxProcs,omitempty"` - // ignoredNetworkDevices is a list of regular expression patterns that match network devices - // to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. - // ignoredNetworkDevices is optional. - // - // When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded - // to minimize the impact on memory usage. - // When set as an empty list, no devices are excluded. - // If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. - // Maximum length for this list is 50. - // Each entry must be at least 1 character and at most 1024 characters long. - // +kubebuilder:validation:MaxItems=50 - // +kubebuilder:validation:MinItems=0 - // +listType=set - // +optional - IgnoredNetworkDevices *[]NodeExporterIgnoredNetworkDevice `json:"ignoredNetworkDevices,omitempty"` -} - -// NodeExporterIgnoredNetworkDevice is a string that is interpreted as a Go regular expression -// pattern by the controller to match network device names to exclude from node-exporter -// metric collection for collectors such as netdev, netclass, and ethtool. -// Invalid regular expressions will cause a controller-level error at runtime. -// Must be at least 1 character and at most 1024 characters. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=1024 -type NodeExporterIgnoredNetworkDevice string - -// NodeExporterCollectorCollectionPolicy declares whether a node-exporter collector should collect metrics. -// Valid values are "Collect" and "DoNotCollect". -// +kubebuilder:validation:Enum=Collect;DoNotCollect -// +enum -type NodeExporterCollectorCollectionPolicy string - -const ( - // NodeExporterCollectorCollectionPolicyCollect means the collector is active and will produce metrics. - NodeExporterCollectorCollectionPolicyCollect NodeExporterCollectorCollectionPolicy = "Collect" - // NodeExporterCollectorCollectionPolicyDoNotCollect means the collector is inactive and will not produce metrics. - NodeExporterCollectorCollectionPolicyDoNotCollect NodeExporterCollectorCollectionPolicy = "DoNotCollect" -) - -// NodeExporterNetclassStatsGatherer identifies how the netclass collector gathers device statistics -// (for example via sysfs or netlink, as implemented in node_exporter). -// Valid values are "Sysfs" and "Netlink". -// +kubebuilder:validation:Enum=Sysfs;Netlink -// +enum -type NodeExporterNetclassStatsGatherer string - -const ( - // NodeExporterNetclassStatsGathererSysfs uses the sysfs-based implementation. - NodeExporterNetclassStatsGathererSysfs NodeExporterNetclassStatsGatherer = "Sysfs" - // NodeExporterNetclassStatsGathererNetlink uses the netlink-based implementation. - NodeExporterNetclassStatsGathererNetlink NodeExporterNetclassStatsGatherer = "Netlink" -) - -// NodeExporterCollectorConfig defines settings for individual collectors -// of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. -// At least one collector must be specified. -// +kubebuilder:validation:MinProperties=1 -type NodeExporterCollectorConfig struct { - // cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. - // cpuFreq is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on - // many-core nodes when collectionPolicy is Collect. - // +optional - CpuFreq NodeExporterCollectorCpufreqConfig `json:"cpuFreq,omitempty,omitzero"` - // tcpStat configures the tcpstat collector, which collects TCP connection statistics. - // tcpStat is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when debugging TCP connection behavior or capacity at the node level. - // +optional - TcpStat NodeExporterCollectorTcpStatConfig `json:"tcpStat,omitempty,omitzero"` - // ethtool configures the ethtool collector, which collects ethernet device statistics. - // ethtool is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. - // +optional - Ethtool NodeExporterCollectorEthtoolConfig `json:"ethtool,omitempty,omitzero"` - // netDev configures the netdev collector, which collects network device statistics. - // netDev is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is enabled. - // Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. - // +optional - NetDev NodeExporterCollectorNetDevConfig `json:"netDev,omitempty,omitzero"` - // netClass configures the netclass collector, which collects information about network devices. - // netClass is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is enabled with netlink mode active. - // Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. - // +optional - NetClass NodeExporterCollectorNetClassConfig `json:"netClass,omitempty,omitzero"` - // buddyInfo configures the buddyinfo collector, which collects statistics about memory - // fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. - // buddyInfo is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. - // +optional - BuddyInfo NodeExporterCollectorBuddyInfoConfig `json:"buddyInfo,omitempty,omitzero"` - // mountStats configures the mountstats collector, which collects statistics about NFS volume - // I/O activities. - // mountStats is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enabling this collector may produce metrics with high cardinality. If you enable this - // collector, closely monitor the prometheus-k8s deployment for excessive memory usage. - // Enable when you care about per-mount NFS client statistics. - // +optional - MountStats NodeExporterCollectorMountStatsConfig `json:"mountStats,omitempty,omitzero"` - // ksmd configures the ksmd collector, which collects statistics from the kernel same-page - // merger daemon. - // ksmd is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable on nodes where KSM is in use and you want visibility into merging activity. - // +optional - Ksmd NodeExporterCollectorKSMDConfig `json:"ksmd,omitempty,omitzero"` - // processes configures the processes collector, which collects statistics from processes and - // threads running in the system. - // processes is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable for process/thread-level insight; can be expensive on busy nodes. - // +optional - Processes NodeExporterCollectorProcessesConfig `json:"processes,omitempty,omitzero"` - // systemd configures the systemd collector, which collects statistics on the systemd daemon - // and its managed services. - // systemd is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enabling this collector with a long list of selected units may produce metrics with high - // cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment - // for excessive memory usage. - // Enable when you need metrics for specific units; scope units carefully. - // +optional - Systemd NodeExporterCollectorSystemdConfig `json:"systemd,omitempty,omitzero"` - // softirqs configures the softirqs collector, which exposes detailed softirq statistics - // from /proc/softirqs. - // softirqs is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when you need visibility into kernel softirq processing across CPUs. - // +optional - Softirqs NodeExporterCollectorSoftirqsConfig `json:"softirqs,omitempty,omitzero"` -} - -// NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector -// of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. -// It is disabled by default. -type NodeExporterCollectorCpufreqConfig struct { - // collectionPolicy declares whether the cpufreq collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. - // When set to "DoNotCollect", the cpufreq collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector -// of the node-exporter agent. The tcpstat collector collects TCP connection statistics. -// It is disabled by default. -type NodeExporterCollectorTcpStatConfig struct { - // collectionPolicy declares whether the tcpstat collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. - // When set to "DoNotCollect", the tcpstat collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector -// of the node-exporter agent. The ethtool collector collects ethernet device statistics. -// It is disabled by default. -type NodeExporterCollectorEthtoolConfig struct { - // collectionPolicy declares whether the ethtool collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. - // When set to "DoNotCollect", the ethtool collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorNetDevConfig provides configuration for the netdev collector -// of the node-exporter agent. The netdev collector collects network device statistics -// such as bytes, packets, errors, and drops per device. -// It is enabled by default. -type NodeExporterCollectorNetDevConfig struct { - // collectionPolicy declares whether the netdev collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the netdev collector is active and network device statistics are collected. - // When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorNetClassConfig provides configuration for the netclass collector -// of the node-exporter agent. The netclass collector collects information about network devices -// such as network speed, MTU, and carrier status. -// It is enabled by default. -// When collectionPolicy is DoNotCollect, the collect field must not be set. -// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect is forbidden when collectionPolicy is not Collect" -// +union -type NodeExporterCollectorNetClassConfig struct { - // collectionPolicy declares whether the netclass collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the netclass collector is active and network class information is collected. - // When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. - // When set to "DoNotCollect", the collect field must not be set. - // +unionDiscriminator - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` - // collect contains configuration options that apply only when the netclass collector is actively collecting metrics - // (i.e. when collectionPolicy is Collect). - // collect is optional and may be omitted even when collectionPolicy is Collect. - // collect may only be set when collectionPolicy is Collect. - // When set, at least one field must be specified within collect. - // +unionMember - // +optional - Collect NodeExporterCollectorNetClassCollectConfig `json:"collect,omitzero,omitempty"` -} - -// NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector -// when it is actively collecting metrics. At least one field must be specified. -// +kubebuilder:validation:MinProperties=1 -type NodeExporterCollectorNetClassCollectConfig struct { - // statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). - // statsGatherer is optional. - // Valid values are "Sysfs" and "Netlink". - // When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the sysfs implementation is used. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is Netlink. - // +optional - StatsGatherer NodeExporterNetclassStatsGatherer `json:"statsGatherer,omitempty"` -} - -// NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector -// of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation -// from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. -// It is disabled by default. -type NodeExporterCollectorBuddyInfoConfig struct { - // collectionPolicy declares whether the buddyinfo collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. - // When set to "DoNotCollect", the buddyinfo collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector -// of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. -// It is disabled by default. -// Enabling this collector may produce metrics with high cardinality. If you enable this -// collector, closely monitor the prometheus-k8s deployment for excessive memory usage. -type NodeExporterCollectorMountStatsConfig struct { - // collectionPolicy declares whether the mountstats collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. - // When set to "DoNotCollect", the mountstats collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector -// of the node-exporter agent. The ksmd collector collects statistics from the kernel -// same-page merger daemon. -// It is disabled by default. -type NodeExporterCollectorKSMDConfig struct { - // collectionPolicy declares whether the ksmd collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. - // When set to "DoNotCollect", the ksmd collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorProcessesConfig provides configuration for the processes collector -// of the node-exporter agent. The processes collector collects statistics from processes and threads -// running in the system. -// It is disabled by default. -type NodeExporterCollectorProcessesConfig struct { - // collectionPolicy declares whether the processes collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the processes collector is active and process/thread statistics are collected. - // When set to "DoNotCollect", the processes collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorSystemdConfig provides configuration for the systemd collector -// of the node-exporter agent. The systemd collector collects statistics on the systemd daemon -// and its managed services. -// It is disabled by default. -// Enabling this collector with a long list of selected units may produce metrics with high -// cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment -// for excessive memory usage. -// When collectionPolicy is DoNotCollect, the collect field must not be set. -// +kubebuilder:validation:XValidation:rule="has(self.collectionPolicy) && self.collectionPolicy == 'Collect' ? true : !has(self.collect)",message="collect is forbidden when collectionPolicy is not Collect" -// +union -type NodeExporterCollectorSystemdConfig struct { - // collectionPolicy declares whether the systemd collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the systemd collector is active and systemd unit statistics are collected. - // When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. - // +unionDiscriminator - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` - // collect contains configuration options that apply only when the systemd collector is actively collecting metrics - // (i.e. when collectionPolicy is Collect). - // collect is optional and may be omitted even when collectionPolicy is Collect. - // collect may only be set when collectionPolicy is Collect. - // When set, at least one field must be specified within collect. - // +unionMember - // +optional - Collect NodeExporterCollectorSystemdCollectConfig `json:"collect,omitzero,omitempty"` -} - -// NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector -// when it is actively collecting metrics. At least one field must be specified. -// +kubebuilder:validation:MinProperties=1 -type NodeExporterCollectorSystemdCollectConfig struct { - // units is a list of regular expression patterns that match systemd units to be included - // by the systemd collector. - // units is optional. - // By default, the list is empty, so the collector exposes no metrics for systemd units. - // Each entry is a regular expression pattern and must be at least 1 character and at most 1024 characters. - // Maximum length for this list is 50. - // Minimum length for this list is 1. - // Entries in this list must be unique. - // +kubebuilder:validation:MaxItems=50 - // +kubebuilder:validation:MinItems=1 - // +listType=set - // +optional - Units []NodeExporterSystemdUnit `json:"units,omitempty"` -} - -// NodeExporterSystemdUnit is a string that is interpreted as a Go regular expression -// pattern by the controller to match systemd unit names. -// Invalid regular expressions will cause a controller-level error at runtime. -// Must be at least 1 character and at most 1024 characters. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=1024 -type NodeExporterSystemdUnit string - -// NodeExporterCollectorSoftirqsConfig provides configuration for the softirqs collector -// of the node-exporter agent. The softirqs collector exposes detailed softirq statistics -// from /proc/softirqs. -// It is disabled by default. -type NodeExporterCollectorSoftirqsConfig struct { - // collectionPolicy declares whether the softirqs collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the softirqs collector is active and softirq statistics are collected. - // When set to "DoNotCollect", the softirqs collector is inactive. - // +required - CollectionPolicy NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// MonitoringPluginConfig provides configuration options for the monitoring plugin -// that runs as a dynamic plugin of the OpenShift web console. -// The monitoring plugin provides the monitoring UI in the OpenShift web console -// for visualizing metrics, alerts, and dashboards. -// At least one field must be specified; an empty monitoringPluginConfig object is not allowed. -// +kubebuilder:validation:MinProperties=1 -type MonitoringPluginConfig struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the monitoring-plugin container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 10m - // - name: memory - // request: 50Mi - // - // When specified, resources must contain at least 1 entry and must not exceed 5 entries. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines the tolerations required for the monitoring-plugin Pods. - // This field is optional. - // - // When omitted, the monitoring-plugin Pods will not have any tolerations, which - // means they will only be scheduled on nodes with no taints. - // When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +listType=atomic - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how monitoring-plugin Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // When specified, this list must contain at least 1 entry and must not exceed 10 entries. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// UserDefinedMonitoring config for user-defined projects. -type UserDefinedMonitoring struct { - // mode defines the different configurations of UserDefinedMonitoring - // Valid values are Disabled and NamespaceIsolated - // Disabled disables monitoring for user-defined projects. This restricts the default monitoring stack, installed in the openshift-monitoring project, to monitor only platform namespaces, which prevents any custom monitoring configurations or resources from being applied to user-defined namespaces. - // NamespaceIsolated enables monitoring for user-defined projects with namespace-scoped tenancy. This ensures that metrics, alerts, and monitoring data are isolated at the namespace level. - // The current default value is `Disabled`. - // +required - // +kubebuilder:validation:Enum=Disabled;NamespaceIsolated - Mode UserDefinedMode `json:"mode"` -} - -// UserDefinedMode specifies mode for UserDefine Monitoring -// +enum -type UserDefinedMode string - -const ( - // UserDefinedDisabled disables monitoring for user-defined projects. This restricts the default monitoring stack, installed in the openshift-monitoring project, to monitor only platform namespaces, which prevents any custom monitoring configurations or resources from being applied to user-defined namespaces. - UserDefinedDisabled UserDefinedMode = "Disabled" - // UserDefinedNamespaceIsolated enables monitoring for user-defined projects with namespace-scoped tenancy. This ensures that metrics, alerts, and monitoring data are isolated at the namespace level. - UserDefinedNamespaceIsolated UserDefinedMode = "NamespaceIsolated" -) - -// alertmanagerConfig provides configuration options for the default Alertmanager instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// whether the default Alertmanager is deployed, how it logs, and how its pods are scheduled. -// +kubebuilder:validation:XValidation:rule="self.deploymentMode == 'CustomConfig' ? has(self.customConfig) : !has(self.customConfig)",message="customConfig is required when deploymentMode is CustomConfig, and forbidden otherwise" -type AlertmanagerConfig struct { - // deploymentMode determines whether the default Alertmanager instance should be deployed - // as part of the monitoring stack. - // Allowed values are Disabled, DefaultConfig, and CustomConfig. - // When set to Disabled, the Alertmanager instance will not be deployed. - // When set to DefaultConfig, the platform will deploy Alertmanager with default settings. - // When set to CustomConfig, the Alertmanager will be deployed with custom configuration. - // - // +unionDiscriminator - // +required - DeploymentMode AlertManagerDeployMode `json:"deploymentMode,omitempty"` - - // customConfig must be set when deploymentMode is CustomConfig, and must be unset otherwise. - // When set to CustomConfig, the Alertmanager will be deployed with custom configuration. - // +optional - CustomConfig AlertmanagerCustomConfig `json:"customConfig,omitempty,omitzero"` -} - -// UserAlertmanagerConfigSelection controls whether the platform Alertmanager selects -// AlertmanagerConfig resources from user-defined namespaces. -// +enum -type UserAlertmanagerConfigSelection string - -const ( - // UserAlertmanagerConfigSelectionSelectable enables user-defined namespaces to be selected - // for AlertmanagerConfig lookups on the platform Alertmanager. - UserAlertmanagerConfigSelectionSelectable UserAlertmanagerConfigSelection = "Selectable" - // UserAlertmanagerConfigSelectionNone disables user-defined namespaces from being selected - // for AlertmanagerConfig lookups on the platform Alertmanager. - UserAlertmanagerConfigSelectionNone UserAlertmanagerConfigSelection = "None" -) - -// AlertmanagerCustomConfig represents the configuration for a custom Alertmanager deployment. -// alertmanagerCustomConfig provides configuration options for the default Alertmanager instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// whether user-defined namespaces are selected for AlertmanagerConfig lookups, how it logs, -// and how its pods are scheduled. -// +kubebuilder:validation:MinProperties=1 -type AlertmanagerCustomConfig struct { - // userAlertmanagerConfigSelection is an optional field that controls whether user-defined - // namespaces can be selected for AlertmanagerConfig lookups on the platform Alertmanager - // instance in the `openshift-monitoring` namespace. - // Valid values are Selectable and None. - // When set to Selectable, the platform Alertmanager discovers AlertmanagerConfig resources - // in user-defined namespaces. This is equivalent to `enableUserAlertmanagerConfig: true` in - // the cluster-monitoring-config ConfigMap. - // When set to None, user-defined namespaces are not selected for AlertmanagerConfig lookups - // on the platform Alertmanager. This is equivalent to `enableUserAlertmanagerConfig: false` - // in the cluster-monitoring-config ConfigMap. - // This setting only applies when the user-workload monitoring Alertmanager is not enabled. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `None`. - // +optional - // +kubebuilder:validation:Enum=Selectable;None - UserAlertmanagerConfigSelection UserAlertmanagerConfigSelection `json:"userAlertmanagerConfigSelection,omitempty"` - // logLevel defines the verbosity of logs emitted by Alertmanager. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - // +optional - LogLevel LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Alertmanager container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // secrets defines a list of secrets that need to be mounted into the Alertmanager. - // The secrets must reside within the same namespace as the Alertmanager object. - // They will be added as volumes named secret- and mounted at - // /etc/alertmanager/secrets/ within the 'alertmanager' container of - // the Alertmanager Pods. - // - // These secrets can be used to authenticate Alertmanager with endpoint receivers. - // For example, you can use secrets to: - // - Provide certificates for TLS authentication with receivers that require private CA certificates - // - Store credentials for Basic HTTP authentication with receivers that require password-based auth - // - Store any other authentication credentials needed by your alert receivers - // - // This field is optional. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries in this list must be unique. - // +optional - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=set - Secrets []SecretName `json:"secrets,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Alertmanager Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // volumeClaimTemplate defines persistent storage for Alertmanager. Use this setting to - // configure the persistent volume claim, including storage class and volume size. - // If omitted, the Pod uses ephemeral storage and alert data will not persist - // across restarts. - // +optional - VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty,omitzero"` -} - -// AlertManagerDeployMode defines the deployment state of the platform Alertmanager instance. -// -// Possible values: -// - "Disabled": The Alertmanager instance will not be deployed. -// - "DefaultConfig": The Alertmanager instance will be deployed with default settings. -// - "CustomConfig": The Alertmanager instance will be deployed with custom configuration. -// +kubebuilder:validation:Enum=Disabled;DefaultConfig;CustomConfig -type AlertManagerDeployMode string - -const ( - // AlertManagerModeDisabled means the Alertmanager instance will not be deployed. - AlertManagerDeployModeDisabled AlertManagerDeployMode = "Disabled" - // AlertManagerModeDefaultConfig means the Alertmanager instance will be deployed with default settings. - AlertManagerDeployModeDefaultConfig AlertManagerDeployMode = "DefaultConfig" - // AlertManagerModeCustomConfig means the Alertmanager instance will be deployed with custom configuration. - AlertManagerDeployModeCustomConfig AlertManagerDeployMode = "CustomConfig" -) - -// LogLevel defines the verbosity of logs emitted by Alertmanager. -// Valid values are Error, Warn, Info and Debug. -// +kubebuilder:validation:Enum=Error;Warn;Info;Debug -type LogLevel string - -const ( - // LogLevelError only errors will be logged. - LogLevelError LogLevel = "Error" - // LogLevelWarn, both warnings and errors will be logged. - LogLevelWarn LogLevel = "Warn" - // LogLevelInfo, general information, warnings, and errors will all be logged. - LogLevelInfo LogLevel = "Info" - // LogLevelDebug, detailed debugging information will be logged. - LogLevelDebug LogLevel = "Debug" -) - -// MaxItems on []ContainerResource fields is kept at 5 to stay within the -// Kubernetes CRD CEL validation cost budget (StaticEstimatedCRDCostLimit). -// The quantity() CEL function has a high fixed estimated cost per invocation, -// and the limit-vs-request comparison rule is costed per maxItems per location. -// With multiple structs in ClusterMonitoringSpec embedding []ContainerResource, -// maxItems > 5 causes the total estimated rule cost to exceed the budget. - -// ContainerResource defines a single resource requirement for a container. -// +kubebuilder:validation:XValidation:rule="has(self.request) || has(self.limit)",message="at least one of request or limit must be set" -// +kubebuilder:validation:XValidation:rule="!(has(self.request) && has(self.limit)) || quantity(self.limit).compareTo(quantity(self.request)) >= 0",message="limit must be greater than or equal to request" -type ContainerResource struct { - // name of the resource (e.g. "cpu", "memory", "hugepages-2Mi"). - // This field is required. - // name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.qualifiedName().validate(self).hasValue()",message="name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character" - Name string `json:"name,omitempty"` - - // request is the minimum amount of the resource required (e.g. "2Mi", "1Gi"). - // This field is optional. - // When limit is specified, request cannot be greater than limit. - // The value must be greater than 0 when specified. - // +optional - // +kubebuilder:validation:XIntOrString - // +kubebuilder:validation:MaxLength=20 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="quantity(self).isGreaterThan(quantity('0'))",message="request must be a positive, non-zero quantity" - Request resource.Quantity `json:"request,omitempty"` - - // limit is the maximum amount of the resource allowed (e.g. "2Mi", "1Gi"). - // This field is optional. - // When request is specified, limit cannot be less than request. - // The value must be greater than 0 when specified. - // +optional - // +kubebuilder:validation:XIntOrString - // +kubebuilder:validation:MaxLength=20 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="quantity(self).isGreaterThan(quantity('0'))",message="limit must be a positive, non-zero quantity" - Limit resource.Quantity `json:"limit,omitempty"` -} - -// SecretName is a type that represents the name of a Secret in the same namespace. -// It must be at most 253 characters in length. -// +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." -// +kubebuilder:validation:MaxLength=63 -type SecretName string - -// MetricsServerConfig provides configuration options for the Metrics Server instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// how the Metrics Server instance is deployed, how it logs, and how its pods are scheduled. -// +kubebuilder:validation:MinProperties=1 -type MetricsServerConfig struct { - // audit defines the audit configuration used by the Metrics Server instance. - // audit is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - //The current default sets audit.profile to Metadata - // +optional - Audit Audit `json:"audit,omitempty,omitzero"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // verbosity defines the verbosity of log messages for Metrics Server. - // Valid values are Errors, Info, Trace, TraceAll and omitted. - // When set to Errors, only critical messages and errors are logged. - // When set to Info, only basic information messages are logged. - // When set to Trace, information useful for general debugging is logged. - // When set to TraceAll, detailed information about metric scraping is logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Errors` - // +optional - Verbosity VerbosityLevel `json:"verbosity,omitempty,omitzero"` - // resources defines the compute resource requests and limits for the Metrics Server container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // topologySpreadConstraints defines rules for how Metrics Server Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// PrometheusOperatorConfig provides configuration options for the Prometheus Operator instance -// Use this configuration to control how the Prometheus Operator instance is deployed, how it logs, and how its pods are scheduled. -// +kubebuilder:validation:MinProperties=1 -type PrometheusOperatorConfig struct { - // logLevel defines the verbosity of logs emitted by Prometheus Operator. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - // +optional - LogLevel LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Prometheus Operator container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Prometheus Operator Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// PrometheusOperatorAdmissionWebhookConfig provides configuration options for the admission webhook -// component of Prometheus Operator that runs in the `openshift-monitoring` namespace. The admission -// webhook validates PrometheusRule and AlertmanagerConfig objects, mutates PrometheusRule annotations, -// and converts AlertmanagerConfig objects between API versions. -// +kubebuilder:validation:MinProperties=1 -type PrometheusOperatorAdmissionWebhookConfig struct { - // resources defines the compute resource requests and limits for the - // prometheus-operator-admission-webhook container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 5m - // limit: null - // - name: memory - // request: 30Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // topologySpreadConstraints defines rules for how admission webhook Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// PrometheusConfig provides configuration options for the Prometheus instance. -// Use this configuration to control -// Prometheus deployment, pod scheduling, resource allocation, retention policies, and external integrations. -// +kubebuilder:validation:MinProperties=1 -type PrometheusConfig struct { - // additionalAlertmanagerConfigs configures additional Alertmanager instances that receive alerts from - // the Prometheus component. This is useful for organizations that need to: - // - Send alerts to external monitoring systems (like PagerDuty, Slack, or custom webhooks) - // - Route different types of alerts to different teams or systems - // - Integrate with existing enterprise alerting infrastructure - // - Maintain separate alert routing for compliance or organizational requirements - // When omitted, no additional Alertmanager instances are configured (default behavior). - // When provided, at least one configuration must be specified (minimum 1, maximum 10 items). - // Entries must have unique names (name is the list key). - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=map - // +listMapKey=name - AdditionalAlertmanagerConfigs []AdditionalAlertmanagerConfig `json:"additionalAlertmanagerConfigs,omitempty"` - // enforcedBodySizeLimitBytes enforces a body size limit (in bytes) for Prometheus scraped metrics. - // If a scraped target's body response is larger than the limit, the scrape will fail. - // This helps protect Prometheus from targets that return excessively large responses. - // The value is specified in bytes (e.g., 4194304 for 4MB, 1073741824 for 1GB). - // When omitted, the Cluster Monitoring Operator automatically calculates an appropriate - // limit based on cluster capacity. Set an explicit value to override the automatic calculation. - // Minimum value is 10240 (10kB). - // Maximum value is 1073741824 (1GB). - // +kubebuilder:validation:Minimum=10240 - // +kubebuilder:validation:Maximum=1073741824 - // +optional - EnforcedBodySizeLimitBytes int64 `json:"enforcedBodySizeLimitBytes,omitempty"` - // externalLabels defines labels to be attached to time series and alerts - // when communicating with external systems such as federation, remote storage, - // and Alertmanager. These labels are not stored with metrics on disk; they are - // only added when data leaves Prometheus (e.g., during federation queries, - // remote write, or alert notifications). - // At least 1 label must be specified when set, with a maximum of 50 labels allowed. - // Each label key must be unique within this list. - // When omitted, no external labels are applied. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=50 - // +listType=map - // +listMapKey=key - ExternalLabels []Label `json:"externalLabels,omitempty"` - // logLevel defines the verbosity of logs emitted by Prometheus. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - // +optional - LogLevel LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least one key-value pair (minimum of 1) - // and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // queryLogFile specifies the file to which PromQL queries are logged. - // This setting can be either a filename, in which - // case the queries are saved to an `emptyDir` volume - // at `/var/log/prometheus`, or a full path to a location where - // an `emptyDir` volume will be mounted and the queries saved. - // Writing to `/dev/stderr`, `/dev/stdout` or `/dev/null` is supported, but - // writing to any other `/dev/` path is not supported. Relative paths are - // also not supported. - // By default, PromQL queries are not logged. - // Must be an absolute path starting with `/` or a simple filename without path separators. - // Must not contain consecutive slashes, end with a slash, or include '..' path traversal. - // Must contain only alphanumeric characters, '.', '_', '-', or '/'. - // Must be between 1 and 255 characters in length. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._/-]+$')",message="must contain only alphanumeric characters, '.', '_', '-', or '/'" - // +kubebuilder:validation:XValidation:rule="self.startsWith('/') || !self.contains('/')",message="must be an absolute path starting with '/' or a simple filename without '/'" - // +kubebuilder:validation:XValidation:rule="!self.startsWith('/dev/') || self in ['/dev/stdout', '/dev/stderr', '/dev/null']",message="only /dev/stdout, /dev/stderr, and /dev/null are allowed as /dev/ paths" - // +kubebuilder:validation:XValidation:rule="!self.contains('//') && !self.endsWith('/') && !self.contains('..')",message="must not contain '//', end with '/', or contain '..'" - QueryLogFile string `json:"queryLogFile,omitempty"` - // remoteWrite defines the remote write configuration, including URL, authentication, and relabeling settings. - // Remote write allows Prometheus to send metrics it collects to external long-term storage systems. - // When omitted, no remote write endpoints are configured. - // When provided, at least one configuration must be specified (minimum 1, maximum 10 items). - // Entries must have unique names (name is the list key). - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=map - // +listMapKey=name - // +optional - RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` - // resources defines the compute resource requests and limits for the Prometheus container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // retention configures how long Prometheus retains metrics data and how much storage it can use. - // When omitted, the platform chooses reasonable defaults (currently 15d retention, no size limit). - // +optional - Retention Retention `json:"retention,omitempty,omitzero"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10 - // Minimum length for this list is 1 - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Prometheus Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1 - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // collectionProfile defines the metrics collection profile that Prometheus uses to collect - // metrics from the platform components. Supported values are `Full` or - // `Minimal`. In the `Full` profile (default), Prometheus collects all - // metrics that are exposed by the platform components. In the `Minimal` - // profile, Prometheus only collects metrics necessary for the default - // platform alerts, recording rules, telemetry and console dashboards. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is `Full`. - // +optional - CollectionProfile CollectionProfile `json:"collectionProfile,omitempty"` - // volumeClaimTemplate defines persistent storage for Prometheus. Use this setting to - // configure the persistent volume claim, including storage class and volume size. - // If omitted, the Pod uses ephemeral storage and Prometheus data will not persist - // across restarts. - // +optional - VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty,omitzero"` -} - -// AlertmanagerScheme defines the URL scheme to use when communicating with Alertmanager instances. -// +kubebuilder:validation:Enum=HTTP;HTTPS -type AlertmanagerScheme string - -const ( - AlertmanagerSchemeHTTP AlertmanagerScheme = "HTTP" - AlertmanagerSchemeHTTPS AlertmanagerScheme = "HTTPS" -) - -// AdditionalAlertmanagerConfig represents configuration for additional Alertmanager instances. -// The `AdditionalAlertmanagerConfig` resource defines settings for how a -// component communicates with additional Alertmanager instances. -type AdditionalAlertmanagerConfig struct { - // name is a unique identifier for this Alertmanager configuration entry. - // The name must be a valid DNS subdomain (RFC 1123): lowercase alphanumeric characters, - // hyphens, or periods, and must start and end with an alphanumeric character. - // Minimum length is 1 character (empty string is invalid). - // Maximum length is 253 characters. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +required - Name string `json:"name,omitempty"` - // authorization configures the authentication method for Alertmanager connections. - // Supports bearer token authentication. When omitted, no authentication is used. - // +optional - Authorization AuthorizationConfig `json:"authorization,omitempty,omitzero"` - // pathPrefix defines an optional URL path prefix to prepend to the Alertmanager API endpoints. - // For example, if your Alertmanager is behind a reverse proxy at "/alertmanager/", - // set this to "/alertmanager" so requests go to "/alertmanager/api/v1/alerts" instead of "/api/v1/alerts". - // This is commonly needed when Alertmanager is deployed behind ingress controllers or load balancers. - // When no prefix is needed, omit this field; do not set it to "/" as that would produce paths with double slashes (e.g. "//api/v1/alerts"). - // Must start with "/", must not end with "/", and must not be exactly "/". - // Must not contain query strings ("?") or fragments ("#"). - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:MinLength=2 - // +kubebuilder:validation:XValidation:rule="self.startsWith('/')",message="pathPrefix must start with '/'" - // +kubebuilder:validation:XValidation:rule="!self.endsWith('/')",message="pathPrefix must not end with '/'" - // +kubebuilder:validation:XValidation:rule="self != '/'",message="pathPrefix must not be '/' (would produce double slashes in request path); omit for no prefix" - // +kubebuilder:validation:XValidation:rule="!self.contains('?') && !self.contains('#')",message="pathPrefix must not contain '?' or '#'" - // +optional - PathPrefix string `json:"pathPrefix,omitempty"` - // scheme defines the URL scheme to use when communicating with Alertmanager - // instances. - // Possible values are `HTTP` or `HTTPS`. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `HTTP`. - // +optional - Scheme AlertmanagerScheme `json:"scheme,omitempty"` - // staticConfigs is a list of statically configured Alertmanager endpoints in the form - // of `:`. Each entry must be a valid hostname, IPv4 address, or IPv6 address - // (in brackets) followed by a colon and a valid port number (1-65535). - // Examples: "alertmanager.example.com:9093", "192.168.1.100:9093", "[::1]:9093" - // At least one endpoint must be specified (minimum 1, maximum 10 endpoints). - // Each entry must be unique and non-empty (empty string is invalid). - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=255 - // +kubebuilder:validation:items:XValidation:rule="isURL('http://' + self) && size(url('http://' + self).getHostname()) > 0 && size(url('http://' + self).getPort()) > 0 && int(url('http://' + self).getPort()) >= 1 && int(url('http://' + self).getPort()) <= 65535",message="must be a valid 'host:port' where host is a DNS name, IPv4, or IPv6 address (in brackets), and port is 1-65535" - // +listType=set - // +required - StaticConfigs []string `json:"staticConfigs,omitempty"` - // timeoutSeconds defines the timeout in seconds for requests to Alertmanager. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Currently the default is 10 seconds. - // Minimum value is 1 second. - // Maximum value is 600 seconds (10 minutes). - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=600 - // +optional - TimeoutSeconds int32 `json:"timeoutSeconds,omitempty"` - // tlsConfig defines the TLS settings to use for Alertmanager connections. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - TLSConfig TLSConfig `json:"tlsConfig,omitempty,omitzero"` -} - -// Label represents a key/value pair for external labels. -type Label struct { - // key is the name of the label. - // Prometheus supports UTF-8 label names, so any valid UTF-8 string is allowed. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:MinLength=1 - Key string `json:"key,omitempty"` - // value is the value of the label. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:MinLength=1 - Value string `json:"value,omitempty"` -} - -// RemoteWriteSpec represents configuration for remote write endpoints. -type RemoteWriteSpec struct { - // url is the URL of the remote write endpoint. - // Must be a valid URL with http or https scheme and a non-empty hostname. - // Query parameters, fragments, and user information (e.g. user:password@host) are not allowed. - // Empty string is invalid. Must be between 1 and 2048 characters in length. - // +required - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="isURL(self)",message="must be a valid URL" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getScheme() == 'http' || url(self).getScheme() == 'https'",message="must use http or https scheme" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || size(url(self).getHostname()) > 0",message="must have a non-empty hostname" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getQuery().size() == 0",message="query parameters are not allowed" - // +kubebuilder:validation:XValidation:rule="!self.matches('.*#.*')",message="fragments are not allowed" - // +kubebuilder:validation:XValidation:rule="!self.matches('.*@.*')",message="user information (e.g. user:password@host) is not allowed" - URL string `json:"url,omitempty"` - // name is a required identifier for this remote write configuration (name is the list key for the remoteWrite list). - // This name is used in metrics and logging to differentiate remote write queues. - // Must contain only alphanumeric characters, hyphens, and underscores. - // Must be between 1 and 63 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9_-]+$')",message="must contain only alphanumeric characters, hyphens, and underscores" - Name string `json:"name,omitempty"` - // authorization defines the authorization method for the remote write endpoint. - // When omitted, no authorization is performed. - // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). - // +optional - AuthorizationConfig RemoteWriteAuthorization `json:"authorization,omitzero"` - // headers specifies the custom HTTP headers to be sent along with each remote write request. - // Sending custom headers makes the configuration of a proxy in between optional and helps the - // receiver recognize the given source better. - // Clients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure - // them in such a way as to send reserved headers. Headers set by Prometheus cannot be overwritten. - // When omitted, no custom headers are sent. - // Maximum of 50 headers can be specified. Each header name must be unique. - // Each header name must contain only alphanumeric characters, hyphens, and underscores, and must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate). - // +optional - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=50 - // +kubebuilder:validation:items:XValidation:rule="self.name.matches('^[a-zA-Z0-9_-]+$')",message="header name must contain only alphanumeric characters, hyphens, and underscores" - // +kubebuilder:validation:items:XValidation:rule="!self.name.matches('(?i)^(host|authorization|content-encoding|content-type|x-prometheus-remote-write-version|user-agent|connection|keep-alive|proxy-authenticate|proxy-authorization|www-authenticate)$')",message="header name must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate)" - // +listType=map - // +listMapKey=name - Headers []PrometheusRemoteWriteHeader `json:"headers,omitempty"` - // metadataConfig configures the sending of series metadata to remote storage. - // When omitted, no metadata is sent. - // When set to sendPolicy: Default, metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). - // When set to sendPolicy: Custom, metadata is sent using the settings in the custom field (e.g. custom.sendIntervalSeconds). - // +optional - MetadataConfig MetadataConfig `json:"metadataConfig,omitempty,omitzero"` - // proxyUrl defines an optional proxy URL. - // If the cluster-wide proxy is enabled, it replaces the proxyUrl setting. - // The cluster-wide proxy supports both HTTP and HTTPS proxies, with HTTPS taking precedence. - // When omitted, no proxy is used. - // Must be a valid URL with http or https scheme. - // Must be between 1 and 2048 characters in length. - // +optional - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="isURL(self) && (url(self).getScheme() == 'http' || url(self).getScheme() == 'https')",message="must be a valid URL with http or https scheme" - ProxyURL string `json:"proxyUrl,omitempty"` - // queueConfig allows tuning configuration for remote write queue parameters. - // When omitted, default queue configuration is used. - // +optional - QueueConfig QueueConfig `json:"queueConfig,omitempty,omitzero"` - // remoteTimeoutSeconds defines the timeout in seconds for requests to the remote write endpoint. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 second. - // Maximum value is 600 seconds (10 minutes). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=600 - RemoteTimeoutSeconds int32 `json:"remoteTimeoutSeconds,omitempty"` - // exemplarsMode controls whether exemplars are sent via remote write. - // Valid values are "Send", "DoNotSend" and omitted. - // When set to "Send", Prometheus is configured to store a maximum of 100,000 exemplars in memory and send them with remote write. - // Note that this setting only applies to user-defined monitoring. It is not applicable to default in-cluster monitoring. - // When omitted or set to "DoNotSend", exemplars are not sent. - // +optional - ExemplarsMode ExemplarsMode `json:"exemplarsMode,omitempty"` - // tlsConfig defines TLS authentication settings for the remote write endpoint. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - TLSConfig TLSConfig `json:"tlsConfig,omitempty,omitzero"` - // writeRelabelConfigs is a list of relabeling rules to apply before sending data to the remote endpoint. - // When omitted, no relabeling is performed and all metrics are sent as-is. - // Minimum of 1 and maximum of 10 relabeling rules can be specified. - // Each rule must have a unique name. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=map - // +listMapKey=name - WriteRelabelConfigs []RelabelConfig `json:"writeRelabelConfigs,omitempty"` -} - -// PrometheusRemoteWriteHeader defines a custom HTTP header for remote write requests. -// The header name must not be one of the reserved headers set by Prometheus (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate). -// Header names must contain only case-insensitive alphanumeric characters, hyphens (-), and underscores (_); other characters (e.g. emoji) are rejected by validation. -// Validation is enforced on the Headers field in RemoteWriteSpec. -type PrometheusRemoteWriteHeader struct { - // name is the HTTP header name. Must not be a reserved header (see type documentation). - // Must contain only alphanumeric characters, hyphens, and underscores; invalid characters are rejected. Must be between 1 and 256 characters. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - Name string `json:"name,omitempty"` - // value is the HTTP header value. Must be at most 4096 characters. - // +required - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=4096 - Value *string `json:"value,omitempty"` -} - -// BasicAuth defines basic authentication settings for the remote write endpoint URL. -type BasicAuth struct { - // username defines the secret reference containing the username for basic authentication. - // The secret must exist in the openshift-monitoring namespace. - // +required - Username SecretKeySelector `json:"username,omitzero,omitempty"` - // password defines the secret reference containing the password for basic authentication. - // The secret must exist in the openshift-monitoring namespace. - // +required - Password SecretKeySelector `json:"password,omitzero,omitempty"` -} - -// RemoteWriteAuthorizationType defines the authorization method for remote write endpoints. -// +kubebuilder:validation:Enum=Authorization;BasicAuth;OAuth2;SigV4;ServiceAccount -type RemoteWriteAuthorizationType string - -const ( - // RemoteWriteAuthorizationTypeAuthorization indicates authorization credentials from a secret. - // The secret key contains the credentials (e.g. a Bearer token). Use the authorization field. - RemoteWriteAuthorizationTypeAuthorization RemoteWriteAuthorizationType = "Authorization" - // RemoteWriteAuthorizationTypeBasicAuth indicates HTTP basic authentication. - RemoteWriteAuthorizationTypeBasicAuth RemoteWriteAuthorizationType = "BasicAuth" - // RemoteWriteAuthorizationTypeOAuth2 indicates OAuth2 client credentials. - RemoteWriteAuthorizationTypeOAuth2 RemoteWriteAuthorizationType = "OAuth2" - // RemoteWriteAuthorizationTypeSigV4 indicates AWS Signature Version 4. - RemoteWriteAuthorizationTypeSigV4 RemoteWriteAuthorizationType = "SigV4" - // RemoteWriteAuthorizationTypeServiceAccount indicates use of the pod's service account token for machine identity. - // No additional field is required; the operator configures the token path. - RemoteWriteAuthorizationTypeServiceAccount RemoteWriteAuthorizationType = "ServiceAccount" - - // --- TOMBSTONE --- - // RemoteWriteAuthorizationTypeBearerToken was a constant for bearer token authentication from a secret. - // It has been removed in favor of RemoteWriteAuthorizationTypeAuthorization. The constant name is reserved to prevent reuse. - // - // RemoteWriteAuthorizationTypeBearerToken RemoteWriteAuthorizationType = "BearerToken" - - // --- TOMBSTONE --- - // RemoteWriteAuthorizationTypeSafeAuthorization was a constant for authorization credentials from a secret (Prometheus SafeAuthorization pattern). - // It has been removed in favor of RemoteWriteAuthorizationTypeAuthorization. The constant name is reserved to prevent reuse. - // - // RemoteWriteAuthorizationTypeSafeAuthorization RemoteWriteAuthorizationType = "SafeAuthorization" -) - -// RemoteWriteAuthorization defines the authorization method for a remote write endpoint. -// Nested config requirements depend on the type discriminator: Authorization requires authorization, -// BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Authorization' ? has(self.authorization) : !has(self.authorization)",message="authorization is required when type is Authorization, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'BasicAuth' ? has(self.basicAuth) : !has(self.basicAuth)",message="basicAuth is required when type is BasicAuth, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'OAuth2' ? has(self.oauth2) : !has(self.oauth2)",message="oauth2 is required when type is OAuth2, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'SigV4' ? has(self.sigv4) : !has(self.sigv4)",message="sigv4 is required when type is SigV4, and forbidden otherwise" -// +union -type RemoteWriteAuthorization struct { - // type specifies the authorization method to use. - // Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount. - // - // When set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field. - // - // When set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set. - // - // When set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set. - // - // When set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set. - // - // When set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path. - // +unionDiscriminator - // +required - Type RemoteWriteAuthorizationType `json:"type,omitempty"` - // authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). - // Required when type is "Authorization", and forbidden otherwise. - // The secret must exist in the openshift-monitoring namespace. - // +unionMember=Authorization - // +optional - Authorization SecretKeySelector `json:"authorization,omitempty,omitzero"` - // basicAuth defines HTTP basic authentication credentials. - // Required when type is "BasicAuth", and forbidden otherwise. - // +unionMember - // +optional - BasicAuth BasicAuth `json:"basicAuth,omitempty,omitzero"` - // oauth2 defines OAuth2 client credentials authentication. - // Required when type is "OAuth2", and forbidden otherwise. - // +unionMember - // +optional - OAuth2 OAuth2 `json:"oauth2,omitempty,omitzero"` - // sigv4 defines AWS Signature Version 4 authentication. - // Required when type is "SigV4", and forbidden otherwise. - // +unionMember - // +optional - Sigv4 Sigv4 `json:"sigv4,omitempty,omitzero"` - - // --- TOMBSTONE --- - // bearerToken was a field for bearer token authentication from a secret. - // It has been removed in favor of authorization. The field name is reserved to prevent reuse. - // - // +unionMember - // +optional - // BearerToken SecretKeySelector `json:"bearerToken,omitempty,omitzero"` - - // --- TOMBSTONE --- - // safeAuthorization was a field for authorization credentials from a secret (Prometheus SafeAuthorization pattern). - // It has been removed in favor of authorization. The field name is reserved to prevent reuse. - // - // +unionMember - // +optional - // SafeAuthorization *v1.SecretKeySelector `json:"safeAuthorization,omitempty"` -} - -// MetadataConfigSendPolicy defines whether to send metadata with platform defaults or with custom settings. -// +kubebuilder:validation:Enum=Default;Custom -type MetadataConfigSendPolicy string - -const ( - // MetadataConfigSendPolicyDefault indicates metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). - MetadataConfigSendPolicyDefault MetadataConfigSendPolicy = "Default" - // MetadataConfigSendPolicyCustom indicates metadata is sent using the settings in the custom field. - MetadataConfigSendPolicyCustom MetadataConfigSendPolicy = "Custom" -) - -// MetadataConfig defines whether and how to send series metadata to remote write storage. -// +kubebuilder:validation:XValidation:rule="self.sendPolicy == 'Default' ? self.custom.sendIntervalSeconds == 0 : true",message="custom is forbidden when sendPolicy is Default" -type MetadataConfig struct { - // sendPolicy specifies whether to send metadata and how it is configured. - // Default: send metadata using platform-chosen defaults (e.g. send interval 30 seconds). - // Custom: send metadata using the settings in the custom field. - // +required - SendPolicy MetadataConfigSendPolicy `json:"sendPolicy,omitempty"` - // custom defines custom metadata send settings. Required when sendPolicy is Custom (must have at least one property), and forbidden when sendPolicy is Default. - // +optional - Custom MetadataConfigCustom `json:"custom,omitempty,omitzero"` -} - -// MetadataConfigCustom defines custom settings for sending series metadata when sendPolicy is Custom. -// At least one property must be set when sendPolicy is Custom (e.g. sendIntervalSeconds). -// +kubebuilder:validation:MinProperties=1 -type MetadataConfigCustom struct { - // sendIntervalSeconds is the interval in seconds at which metadata is sent. - // When omitted, the platform chooses a reasonable default (e.g. 30 seconds). - // Minimum value is 1 second. Maximum value is 86400 seconds (24 hours). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=86400 - SendIntervalSeconds int32 `json:"sendIntervalSeconds,omitempty"` -} - -// OAuth2 defines OAuth2 authentication settings for the remote write endpoint. -type OAuth2 struct { - // clientId defines the secret reference containing the OAuth2 client ID. - // The secret must exist in the openshift-monitoring namespace. - // +required - ClientID SecretKeySelector `json:"clientId,omitzero,omitempty"` - // clientSecret defines the secret reference containing the OAuth2 client secret. - // The secret must exist in the openshift-monitoring namespace. - // +required - ClientSecret SecretKeySelector `json:"clientSecret,omitzero,omitempty"` - // tokenUrl is the URL to fetch the token from. - // Must be a valid URL with http or https scheme. - // Must be between 1 and 2048 characters in length. - // +required - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:XValidation:rule="isURL(self)",message="must be a valid URL" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getScheme() == 'http' || url(self).getScheme() == 'https'",message="must use http or https scheme" - TokenURL string `json:"tokenUrl,omitempty"` - // scopes is a list of OAuth2 scopes to request. - // When omitted, no scopes are requested. - // Maximum of 20 scopes can be specified. - // Each scope must be between 1 and 256 characters. - // +optional - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=256 - // +listType=atomic - Scopes []string `json:"scopes,omitempty"` - // endpointParams defines additional parameters to append to the token URL. - // When omitted, no additional parameters are sent. - // Maximum of 20 parameters can be specified. Entries must have unique names (name is the list key). - // +optional - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=20 - // +listType=map - // +listMapKey=name - EndpointParams []OAuth2EndpointParam `json:"endpointParams,omitempty"` -} - -// OAuth2EndpointParam defines a name/value parameter for the OAuth2 token URL. -type OAuth2EndpointParam struct { - // name is the parameter name. Must be between 1 and 256 characters. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - Name string `json:"name,omitempty"` - // value is the optional parameter value. When omitted, the query parameter is applied as ?name (no value). - // When set (including to the empty string), it is applied as ?name=value. Empty string may be used when the - // external system expects a parameter with an empty value (e.g. ?parameter=""). - // Must be between 0 and 2048 characters when present (aligned with common URL length recommendations). - // +optional - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=2048 - Value *string `json:"value,omitempty"` -} - -// QueueConfig allows tuning configuration for remote write queue parameters. -// Configure this when you need to control throughput, backpressure, or retry behavior—for example to avoid overloading the remote endpoint, to reduce memory usage, or to tune for high-cardinality workloads. Consider capacity, maxShards, and batchSendDeadlineSeconds for throughput; minBackoffMilliseconds and maxBackoffMilliseconds for retries; and rateLimitedAction when the remote returns HTTP 429. -// +kubebuilder:validation:MinProperties=1 -type QueueConfig struct { - // capacity is the number of samples to buffer per shard before we start dropping them. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 10000. - // Minimum value is 1. - // Maximum value is 1000000. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=1000000 - Capacity int32 `json:"capacity,omitempty"` - // maxShards is the maximum number of shards, i.e. amount of concurrency. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 200. - // Minimum value is 1. - // Maximum value is 10000. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=10000 - MaxShards int32 `json:"maxShards,omitempty"` - // minShards is the minimum number of shards, i.e. amount of concurrency. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 1. - // Minimum value is 1. - // Maximum value is 10000. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=10000 - MinShards int32 `json:"minShards,omitempty"` - // maxSamplesPerSend is the maximum number of samples per send. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 1000. - // Minimum value is 1. - // Maximum value is 100000. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=100000 - MaxSamplesPerSend int32 `json:"maxSamplesPerSend,omitempty"` - // batchSendDeadlineSeconds is the maximum time in seconds a sample will wait in buffer before being sent. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 second. - // Maximum value is 3600 seconds (1 hour). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=3600 - BatchSendDeadlineSeconds int32 `json:"batchSendDeadlineSeconds,omitempty"` - // minBackoffMilliseconds is the minimum retry delay in milliseconds. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 millisecond. - // Maximum value is 3600000 milliseconds (1 hour). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=3600000 - MinBackoffMilliseconds int32 `json:"minBackoffMilliseconds,omitempty"` - // maxBackoffMilliseconds is the maximum retry delay in milliseconds. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 millisecond. - // Maximum value is 3600000 milliseconds (1 hour). - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=3600000 - MaxBackoffMilliseconds int32 `json:"maxBackoffMilliseconds,omitempty"` - // rateLimitedAction controls what to do when the remote write endpoint returns HTTP 429 (Too Many Requests). - // When omitted, no retries are performed on rate limit responses. - // When set to "Retry", Prometheus will retry such requests using the backoff settings above. - // Valid value when set is "Retry". - // +optional - RateLimitedAction RateLimitedAction `json:"rateLimitedAction,omitempty"` -} - -// Sigv4 defines AWS Signature Version 4 authentication settings. -// At least one of region, accessKey/secretKey, profile, or roleArn must be set so the platform can perform authentication. -// +kubebuilder:validation:MinProperties=1 -type Sigv4 struct { - // region is the AWS region. - // When omitted, the region is derived from the environment or instance metadata. - // Must be between 1 and 128 characters. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Region string `json:"region,omitempty"` - // accessKey defines the secret reference containing the AWS access key ID. - // The secret must exist in the openshift-monitoring namespace. - // When omitted, the access key is derived from the environment or instance metadata. - // +optional - AccessKey SecretKeySelector `json:"accessKey,omitempty,omitzero"` - // secretKey defines the secret reference containing the AWS secret access key. - // The secret must exist in the openshift-monitoring namespace. - // When omitted, the secret key is derived from the environment or instance metadata. - // +optional - SecretKey SecretKeySelector `json:"secretKey,omitempty,omitzero"` - // profile is the named AWS profile used to authenticate. - // When omitted, the default profile is used. - // Must be between 1 and 128 characters. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Profile string `json:"profile,omitempty"` - // roleArn is the AWS Role ARN, an alternative to using AWS API keys. - // When omitted, API keys are used for authentication. - // Must be a valid AWS ARN format (e.g., "arn:aws:iam::123456789012:role/MyRole"). - // Must be between 1 and 512 characters. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=512 - // +kubebuilder:validation:XValidation:rule=`self.startsWith('arn:aws') && self.matches('^arn:aws(-[a-z]+)?:iam::[0-9]{12}:role/.+$')`,message="must be a valid AWS IAM role ARN (e.g., arn:aws:iam::123456789012:role/MyRole)" - RoleArn string `json:"roleArn,omitempty"` -} - -// RelabelConfig represents a relabeling rule. -type RelabelConfig struct { - // name is a unique identifier for this relabel configuration. - // Must contain only alphanumeric characters, hyphens, and underscores. - // Must be between 1 and 63 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9_-]+$')",message="must contain only alphanumeric characters, hyphens, and underscores" - Name string `json:"name,omitempty"` - - // sourceLabels specifies which label names to extract from each series for this relabeling rule. - // The values of these labels are joined together using the configured separator, - // and the resulting string is then matched against the regular expression. - // If a referenced label does not exist on a series, Prometheus substitutes an empty string. - // When omitted, the rule operates without extracting source labels (useful for actions like labelmap). - // Minimum of 1 and maximum of 10 source labels can be specified, each between 1 and 128 characters. - // Each entry must be unique. - // Label names beginning with "__" (two underscores) are reserved for internal Prometheus use and are not allowed. - // Label names SHOULD start with a letter (a-z, A-Z) or underscore (_), followed by zero or more letters, digits (0-9), or underscores for best compatibility. - // While Prometheus supports UTF-8 characters in label names (since v3.0.0), using the recommended character set - // ensures better compatibility with the wider ecosystem (tooling, third-party instrumentation, etc.). - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=128 - // +kubebuilder:validation:items:XValidation:rule="!self.startsWith('__')",message="label names beginning with '__' (two underscores) are reserved for internal Prometheus use and are not allowed" - // +listType=set - SourceLabels []string `json:"sourceLabels,omitempty"` - - // separator is the character sequence used to join source label values. - // Common examples: ";", ",", "::", "|||". - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is ";". - // Must be between 1 and 5 characters in length when specified. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=5 - Separator string `json:"separator,omitempty"` - - // regex is the regular expression to match against the concatenated source label values. - // Must be a valid RE2 regular expression (https://github.com/google/re2/wiki/Syntax). - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is "(.*)" to match everything. - // Must be between 1 and 1000 characters in length when specified. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=1000 - Regex string `json:"regex,omitempty"` - - // action defines the action to perform on the matched labels and its configuration. - // Exactly one action-specific configuration must be specified based on the action type. - // +required - Action RelabelActionConfig `json:"action,omitzero"` -} - -// RelabelActionConfig represents the action to perform and its configuration. -// Exactly one action-specific configuration must be specified based on the action type. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Replace' ? has(self.replace) : !has(self.replace)",message="replace is required when type is Replace, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'HashMod' ? has(self.hashMod) : !has(self.hashMod)",message="hashMod is required when type is HashMod, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Lowercase' ? has(self.lowercase) : !has(self.lowercase)",message="lowercase is required when type is Lowercase, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Uppercase' ? has(self.uppercase) : !has(self.uppercase)",message="uppercase is required when type is Uppercase, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'KeepEqual' ? has(self.keepEqual) : !has(self.keepEqual)",message="keepEqual is required when type is KeepEqual, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'DropEqual' ? has(self.dropEqual) : !has(self.dropEqual)",message="dropEqual is required when type is DropEqual, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'LabelMap' ? has(self.labelMap) : !has(self.labelMap)",message="labelMap is required when type is LabelMap, and forbidden otherwise" -// +union -type RelabelActionConfig struct { - // type specifies the action to perform on the matched labels. - // Allowed values are Replace, Lowercase, Uppercase, Keep, Drop, KeepEqual, DropEqual, HashMod, LabelMap, LabelDrop, LabelKeep. - // - // When set to Replace, regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. If regex does not match, no replacement takes place. - // - // When set to Lowercase, the concatenated source_labels are mapped to their lower case. Requires Prometheus >= v2.36.0. - // - // When set to Uppercase, the concatenated source_labels are mapped to their upper case. Requires Prometheus >= v2.36.0. - // - // When set to Keep, targets for which regex does not match the concatenated source_labels are dropped. - // - // When set to Drop, targets for which regex matches the concatenated source_labels are dropped. - // - // When set to KeepEqual, targets for which the concatenated source_labels do not match target_label are dropped. Requires Prometheus >= v2.41.0. - // - // When set to DropEqual, targets for which the concatenated source_labels do match target_label are dropped. Requires Prometheus >= v2.41.0. - // - // When set to HashMod, target_label is set to the modulus of a hash of the concatenated source_labels. - // - // When set to LabelMap, regex is matched against all source label names (not just source_labels); matching label values are copied to new names given by replacement with ${1}, ${2}, ... substituted. - // - // When set to LabelDrop, regex is matched against all label names; any label that matches is removed. - // - // When set to LabelKeep, regex is matched against all label names; any label that does not match is removed. - // +required - // +unionDiscriminator - Type RelabelAction `json:"type,omitempty"` - - // replace configures the Replace action. - // Required when type is Replace, and forbidden otherwise. - // +unionMember - // +optional - Replace ReplaceActionConfig `json:"replace,omitempty,omitzero"` - - // hashMod configures the HashMod action. - // Required when type is HashMod, and forbidden otherwise. - // +unionMember - // +optional - HashMod HashModActionConfig `json:"hashMod,omitempty,omitzero"` - - // labelMap configures the LabelMap action. - // Required when type is LabelMap, and forbidden otherwise. - // +unionMember - // +optional - LabelMap LabelMapActionConfig `json:"labelMap,omitempty,omitzero"` - - // lowercase configures the Lowercase action. - // Required when type is Lowercase, and forbidden otherwise. - // Requires Prometheus >= v2.36.0. - // +unionMember - // +optional - Lowercase LowercaseActionConfig `json:"lowercase,omitempty,omitzero"` - - // uppercase configures the Uppercase action. - // Required when type is Uppercase, and forbidden otherwise. - // Requires Prometheus >= v2.36.0. - // +unionMember - // +optional - Uppercase UppercaseActionConfig `json:"uppercase,omitempty,omitzero"` - - // keepEqual configures the KeepEqual action. - // Required when type is KeepEqual, and forbidden otherwise. - // Requires Prometheus >= v2.41.0. - // +unionMember - // +optional - KeepEqual KeepEqualActionConfig `json:"keepEqual,omitempty,omitzero"` - - // dropEqual configures the DropEqual action. - // Required when type is DropEqual, and forbidden otherwise. - // Requires Prometheus >= v2.41.0. - // +unionMember - // +optional - DropEqual DropEqualActionConfig `json:"dropEqual,omitempty,omitzero"` -} - -// ReplaceActionConfig configures the Replace action. -// Regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. No replacement if regex does not match. -type ReplaceActionConfig struct { - // targetLabel is the label name where the replacement result is written. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` - - // replacement is the value written to target_label when regex matches; match group references (${1}, ${2}, ...) are substituted. - // Required when using the Replace action so the intended behavior is explicit and the platform does not need to apply defaults. - // Use "$1" for the first capture group, "$2" for the second, etc. Use an empty string ("") to explicitly clear the target label value. - // Must be between 0 and 255 characters in length. - // +required - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=255 - Replacement *string `json:"replacement,omitempty"` -} - -// HashModActionConfig configures the HashMod action. -// target_label is set to the modulus of a hash of the concatenated source_labels (target = hash % modulus). -type HashModActionConfig struct { - // targetLabel is the label name where the hash modulus result is written. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` - - // modulus is the divisor applied to the hash of the concatenated source label values (target = hash % modulus). - // Required when using the HashMod action so the intended behavior is explicit. - // Must be between 1 and 1000000. - // +required - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=1000000 - Modulus int64 `json:"modulus,omitempty"` -} - -// LowercaseActionConfig configures the Lowercase action. -// Maps the concatenated source_labels to their lower case and writes to target_label. -// Requires Prometheus >= v2.36.0. -type LowercaseActionConfig struct { - // targetLabel is the label name where the lower-cased value is written. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` -} - -// UppercaseActionConfig configures the Uppercase action. -// Maps the concatenated source_labels to their upper case and writes to target_label. -// Requires Prometheus >= v2.36.0. -type UppercaseActionConfig struct { - // targetLabel is the label name where the upper-cased value is written. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` -} - -// KeepEqualActionConfig configures the KeepEqual action. -// Drops targets for which the concatenated source_labels do not match the value of target_label. -// Requires Prometheus >= v2.41.0. -type KeepEqualActionConfig struct { - // targetLabel is the label name whose value is compared to the concatenated source_labels; targets that do not match are dropped. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` -} - -// DropEqualActionConfig configures the DropEqual action. -// Drops targets for which the concatenated source_labels do match the value of target_label. -// Requires Prometheus >= v2.41.0. -type DropEqualActionConfig struct { - // targetLabel is the label name whose value is compared to the concatenated source_labels; targets that match are dropped. - // Must be between 1 and 128 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - TargetLabel string `json:"targetLabel,omitempty"` -} - -// LabelMapActionConfig configures the LabelMap action. -// Regex is matched against all source label names (not just source_labels). Matching label values are copied to new label names given by replacement, with match group references (${1}, ${2}, ...) substituted. -type LabelMapActionConfig struct { - // replacement is the template for new label names; match group references (${1}, ${2}, ...) are substituted from the matched label name. - // Required when using the LabelMap action so the intended behavior is explicit and the platform does not need to apply defaults. - // Use "$1" for the first capture group, "$2" for the second, etc. - // Must be between 1 and 255 characters in length. Empty string is invalid as it would produce invalid label names. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - Replacement string `json:"replacement,omitempty"` -} - -// TLSConfig represents TLS configuration for Alertmanager connections. -// At least one TLS configuration option must be specified. -// For mutual TLS (mTLS), both cert and key must be specified together, or both omitted. -// +kubebuilder:validation:MinProperties=1 -// +kubebuilder:validation:XValidation:rule="(has(self.cert) && has(self.key)) || (!has(self.cert) && !has(self.key))",message="cert and key must both be specified together for mutual TLS, or both be omitted" -type TLSConfig struct { - // ca is an optional CA certificate to use for TLS connections. - // When omitted, the system's default CA bundle is used. - // +optional - CA SecretKeySelector `json:"ca,omitempty,omitzero"` - // cert is an optional client certificate to use for mutual TLS connections. - // When omitted, no client certificate is presented. - // +optional - Cert SecretKeySelector `json:"cert,omitempty,omitzero"` - // key is an optional client key to use for mutual TLS connections. - // When omitted, no client key is used. - // +optional - Key SecretKeySelector `json:"key,omitempty,omitzero"` - // serverName is an optional server name to use for TLS connections. - // When specified, must be a valid DNS subdomain as per RFC 1123. - // When omitted, the server name is derived from the URL. - // Must be between 1 and 253 characters in length. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="must be a valid DNS subdomain (lowercase alphanumeric characters, '-' or '.', start and end with alphanumeric)" - ServerName string `json:"serverName,omitempty"` - // certificateVerification determines the policy for TLS certificate verification. - // Allowed values are "Verify" (performs certificate verification, secure) and "SkipVerify" (skips verification, insecure). - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is "Verify". - // +optional - CertificateVerification CertificateVerificationType `json:"certificateVerification,omitempty"` -} - -// CertificateVerificationType defines the TLS certificate verification policy. -// +kubebuilder:validation:Enum=Verify;SkipVerify -type CertificateVerificationType string - -const ( - // CertificateVerificationVerify performs certificate verification (secure, recommended). - CertificateVerificationVerify CertificateVerificationType = "Verify" - // CertificateVerificationSkipVerify skips certificate verification (insecure, use with caution). - CertificateVerificationSkipVerify CertificateVerificationType = "SkipVerify" -) - -// AuthorizationType defines the type of authentication to use. -// +kubebuilder:validation:Enum=BearerToken -type AuthorizationType string - -const ( - // AuthorizationTypeBearerToken indicates bearer token authentication. - AuthorizationTypeBearerToken AuthorizationType = "BearerToken" -) - -// AuthorizationConfig defines the authentication method for Alertmanager connections. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'BearerToken' ? has(self.bearerToken) : !has(self.bearerToken)",message="bearerToken is required when type is BearerToken" -// +union -type AuthorizationConfig struct { - // type specifies the authentication type to use. - // Valid value is "BearerToken" (bearer token authentication). - // When set to BearerToken, the bearerToken field must be specified. - // +unionDiscriminator - // +required - Type AuthorizationType `json:"type,omitempty"` - // bearerToken defines the secret reference containing the bearer token. - // Required when type is "BearerToken", and forbidden otherwise. - // The secret must exist in the openshift-monitoring namespace. - // +optional - BearerToken SecretKeySelector `json:"bearerToken,omitempty,omitzero"` -} - -// SecretKeySelector selects a key of a Secret in the `openshift-monitoring` namespace. -// +structType=atomic -type SecretKeySelector struct { - // name is the name of the secret in the `openshift-monitoring` namespace to select from. - // Must be a valid Kubernetes secret name (lowercase alphanumeric, '-' or '.', start/end with alphanumeric). - // Must be between 1 and 253 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="must be a valid secret name (lowercase alphanumeric characters, '-' or '.', start and end with alphanumeric)" - Name string `json:"name,omitempty"` - // key is the key of the secret to select from. - // Must consist of alphanumeric characters, '-', '_', or '.'. - // Must be between 1 and 253 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._-]+$')",message="must contain only alphanumeric characters, '-', '_', or '.'" - Key string `json:"key,omitempty"` -} - -// Retention configures how long Prometheus retains metrics data and how much storage it can use. -// +kubebuilder:validation:MinProperties=1 -type Retention struct { - // TOMBSTONE: This field has been tombstoned in favor of the `duration` field. This tombstone will be dropped when promoting this API to v1. - // --- - // durationInDays specifies how many days Prometheus will retain metrics data. - // Prometheus automatically deletes data older than this duration. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 15. - // Minimum value is 1 day. - // Maximum value is 365 days (1 year). - // Former marker: kubebuilder:validation:Minimum=1 - // Former marker: kubebuilder:validation:Maximum=365 - // Former marker: optional - // DurationInDays int32 `json:"durationInDays,omitempty"` - - // TOMBSTONE: This field has been tombstoned in favor of the `size` field. This tombstone will be dropped when promoting this API to v1. - // --- - // sizeInGiB specifies the maximum storage size in gibibytes (GiB) that Prometheus - // can use for data blocks and the write-ahead log (WAL). - // When the limit is reached, Prometheus will delete oldest data first. - // When omitted, no size limit is enforced and Prometheus uses available PersistentVolume capacity. - // Minimum value is 1 GiB. - // Maximum value is 16384 GiB (16 TiB). - // Former marker: kubebuilder:validation:Minimum=1 - // Former marker: kubebuilder:validation:Maximum=16384 - // Former marker: optional - // SizeInGiB int32 `json:"sizeInGiB,omitempty"` - - // duration is an optional field that specifies how long Prometheus retains metrics data. - // Valid values are Prometheus-style duration strings with unit suffixes y, w, d, h, m, s, or ms - // (for example, "15d", "24h", or "5d1h30m"). Each unit value must be a positive integer. - // Composite durations must follow the fixed unit order y, w, d, h, m, s, ms. - // Must be at least 1 character and at most 64 characters. - // When set to "0", time-based retention is disabled. This is the only supported form for disabling - // time-based retention; other zero-duration representations such as "0d", "0h", or "0y" are rejected. - // Prometheus automatically deletes data older than this duration. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `15d`. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:XValidation:rule=`self == "0" || self.matches('^([1-9][0-9]*y)?([1-9][0-9]*w)?([1-9][0-9]*d)?([1-9][0-9]*h)?([1-9][0-9]*m)?([1-9][0-9]*s)?([1-9][0-9]*ms)?$')`,message=`must be "0" to disable time-based retention, or a duration string with only positive unit values` - // +optional - Duration string `json:"duration,omitempty"` - - // size is an optional field that specifies the maximum storage size that Prometheus - // can use for data blocks and the write-ahead log (WAL). - // Valid values are byte-size strings with an optional decimal prefix and a unit suffix B, KB, MB, GB, - // TB, EB, PB, or their binary equivalents KiB, MiB, GiB, TiB, EiB, PiB (for example, "500MiB", "10GiB"). - // The numeric value must be greater than zero. - // Must be at least 1 character and at most 32 characters. - // When set to "0", no size limit is enforced. This is the only supported form for disabling size-based - // retention; other zero-size representations such as "0B" or "0MiB" are rejected. - // When the limit is reached, Prometheus deletes oldest data first. - // When omitted, no size limit is enforced and Prometheus uses available PersistentVolume capacity. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=32 - // +kubebuilder:validation:XValidation:rule=`self == "0" || self.matches('^([1-9][0-9]*([.][0-9]+)?|[0-9]*[.][1-9][0-9]*)((K|M|G|T|E|P)i?)?B$')`,message=`must be "0" to disable size-based retention, or a positive byte-size string` - // +optional - Size string `json:"size,omitempty"` -} - -// RelabelAction defines the action to perform in a relabeling rule. -// +kubebuilder:validation:Enum=Replace;Keep;Drop;HashMod;LabelMap;LabelDrop;LabelKeep;Lowercase;Uppercase;KeepEqual;DropEqual -type RelabelAction string - -const ( - // RelabelActionReplace: match regex against concatenated source_labels; set target_label to replacement with ${1}, ${2}, ... substituted. No replacement if regex does not match. - RelabelActionReplace RelabelAction = "Replace" - // RelabelActionLowercase: map the concatenated source_labels to their lower case. - RelabelActionLowercase RelabelAction = "Lowercase" - // RelabelActionUppercase: map the concatenated source_labels to their upper case. - RelabelActionUppercase RelabelAction = "Uppercase" - // RelabelActionKeep: drop targets for which regex does not match the concatenated source_labels. - RelabelActionKeep RelabelAction = "Keep" - // RelabelActionDrop: drop targets for which regex matches the concatenated source_labels. - RelabelActionDrop RelabelAction = "Drop" - // RelabelActionKeepEqual: drop targets for which the concatenated source_labels do not match target_label. - RelabelActionKeepEqual RelabelAction = "KeepEqual" - // RelabelActionDropEqual: drop targets for which the concatenated source_labels do match target_label. - RelabelActionDropEqual RelabelAction = "DropEqual" - // RelabelActionHashMod: set target_label to the modulus of a hash of the concatenated source_labels. - RelabelActionHashMod RelabelAction = "HashMod" - // RelabelActionLabelMap: match regex against all source label names; copy matching label values to new names given by replacement with ${1}, ${2}, ... substituted. - RelabelActionLabelMap RelabelAction = "LabelMap" - // RelabelActionLabelDrop: match regex against all label names; any label that matches is removed. - RelabelActionLabelDrop RelabelAction = "LabelDrop" - // RelabelActionLabelKeep: match regex against all label names; any label that does not match is removed. - RelabelActionLabelKeep RelabelAction = "LabelKeep" -) - -// CollectionProfile defines the metrics collection profile for Prometheus. -// +kubebuilder:validation:Enum=Full;Minimal -type CollectionProfile string - -const ( - // CollectionProfileFull means Prometheus collects all metrics that are exposed by the platform components. - CollectionProfileFull CollectionProfile = "Full" - // CollectionProfileMinimal means Prometheus only collects metrics necessary for the default - // platform alerts, recording rules, telemetry and console dashboards. - CollectionProfileMinimal CollectionProfile = "Minimal" -) - -// TelemeterClientConfig provides configuration options for the Telemeter Client component -// that runs in the `openshift-monitoring` namespace. The Telemeter Client collects selected -// monitoring metrics and forwards them to Red Hat for telemetry purposes. -// At least one field must be specified. -// +kubebuilder:validation:MinProperties=1 -type TelemeterClientConfig struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Telemeter Client container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 1m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Telemeter Client Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// ThanosQuerierConfig provides configuration options for the Thanos Querier component -// that runs in the `openshift-monitoring` namespace. -// At least one field must be specified; an empty thanosQuerierConfig object is not allowed. -// +kubebuilder:validation:MinProperties=1 -type ThanosQuerierConfig struct { - // logLevel defines the verbosity of logs emitted by Thanos Querier. - // logLevel is optional. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - // +optional - LogLevel LogLevel `json:"logLevel,omitempty"` - // requestLogging configures request logging for Thanos Querier. - // requestLogging is optional. - // When provided, the policy field within is required. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default behavior is to not log any requests. - // +optional - RequestLogging ThanosQuerierRequestLoggingConfig `json:"requestLogging,omitempty,omitzero"` - // crossOriginRequestPolicy configures the CORS (Cross-Origin Resource Sharing) policy - // for Thanos Querier's HTTP endpoints. - // crossOriginRequestPolicy is optional. - // Valid values are "AllowAll" and "DenyAll". - // When set to "AllowAll", CORS headers are added to responses, allowing cross-origin requests from any domain. - // When set to "DenyAll", no CORS headers are added and cross-origin requests are rejected by the browser. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is "DenyAll". - // +optional - CrossOriginRequestPolicy CrossOriginRequestPolicy `json:"crossOriginRequestPolicy,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Thanos Querier container. - // resources is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Requests cannot exceed limits. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 5m - // - name: memory - // request: 12Mi - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Thanos Querier Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// ThanosQuerierRequestLoggingConfig configures request logging for Thanos Querier. -type ThanosQuerierRequestLoggingConfig struct { - // policy determines which HTTP and gRPC requests are logged by Thanos Querier. - // Valid values are "AllRequests" and "NoRequests". - // When set to "AllRequests", every request received by Thanos Querier is logged with method, path, and response status. - // The log level for request logs is derived from the logLevel field. - // When set to "NoRequests", request logging is turned off. - // +required - Policy RequestLoggingPolicy `json:"policy,omitempty"` -} - -// RequestLoggingPolicy controls which HTTP and gRPC requests are logged. -// Valid values are "AllRequests" and "NoRequests". -// +kubebuilder:validation:Enum=AllRequests;NoRequests -type RequestLoggingPolicy string - -const ( - // RequestLoggingPolicyAllRequests enables logging of all incoming requests. - RequestLoggingPolicyAllRequests RequestLoggingPolicy = "AllRequests" - // RequestLoggingPolicyNoRequests disables request logging. - RequestLoggingPolicyNoRequests RequestLoggingPolicy = "NoRequests" -) - -// CrossOriginRequestPolicy controls the CORS (Cross-Origin Resource Sharing) policy -// for Thanos Querier's HTTP endpoints. -// Valid values are "AllowAll" and "DenyAll". -// +kubebuilder:validation:Enum=AllowAll;DenyAll -type CrossOriginRequestPolicy string - -const ( - // CrossOriginRequestPolicyAllowAll sets CORS headers allowing requests from any origin. - CrossOriginRequestPolicyAllowAll CrossOriginRequestPolicy = "AllowAll" - // CrossOriginRequestPolicyDenyAll does not set CORS headers, rejecting cross-origin requests. - CrossOriginRequestPolicyDenyAll CrossOriginRequestPolicy = "DenyAll" -) - -// AuditProfile defines the audit log level for the Metrics Server. -// +kubebuilder:validation:Enum=None;Metadata;Request;RequestResponse -type AuditProfile string - -const ( - // AuditProfileNone disables audit logging - AuditProfileNone AuditProfile = "None" - // AuditProfileMetadata logs request metadata (requesting user, timestamp, resource, verb, etc.) but not request or response body - AuditProfileMetadata AuditProfile = "Metadata" - // AuditProfileRequest logs event metadata and request body but not response body - AuditProfileRequest AuditProfile = "Request" - // AuditProfileRequestResponse logs event metadata, request and response bodies - AuditProfileRequestResponse AuditProfile = "RequestResponse" -) - -// VerbosityLevel defines the verbosity of log messages for Metrics Server. -// +kubebuilder:validation:Enum=Errors;Info;Trace;TraceAll -type VerbosityLevel string - -const ( - // VerbosityLevelErrors means only critical messages and errors are logged. - VerbosityLevelErrors VerbosityLevel = "Errors" - // VerbosityLevelInfo means basic informational messages are logged. - VerbosityLevelInfo VerbosityLevel = "Info" - // VerbosityLevelTrace means extended information useful for general debugging is logged. - VerbosityLevelTrace VerbosityLevel = "Trace" - // VerbosityLevelTraceAll means detailed information about metric scraping operations is logged. - VerbosityLevelTraceAll VerbosityLevel = "TraceAll" -) - -// ExemplarsMode defines whether exemplars are sent via remote write. -// +kubebuilder:validation:Enum=Send;DoNotSend -type ExemplarsMode string - -const ( - // ExemplarsModeSend means exemplars are sent via remote write. - ExemplarsModeSend ExemplarsMode = "Send" - // ExemplarsModeDoNotSend means exemplars are not sent via remote write. - ExemplarsModeDoNotSend ExemplarsMode = "DoNotSend" -) - -// RateLimitedAction defines what to do when the remote write endpoint returns HTTP 429 (Too Many Requests). -// Omission of this field means do not retry. When set, the only valid value is Retry. -// +kubebuilder:validation:Enum=Retry -type RateLimitedAction string - -const ( - // RateLimitedActionRetry means requests will be retried on HTTP 429 responses. - RateLimitedActionRetry RateLimitedAction = "Retry" -) - -// Audit profile configurations -type Audit struct { - // profile is a required field for configuring the audit log level of the Kubernetes Metrics Server. - // Allowed values are None, Metadata, Request, or RequestResponse. - // When set to None, audit logging is disabled and no audit events are recorded. - // When set to Metadata, only request metadata (such as requesting user, timestamp, resource, verb, etc.) is logged, but not the request or response body. - // When set to Request, event metadata and the request body are logged, but not the response body. - // When set to RequestResponse, event metadata, request body, and response body are all logged, providing the most detailed audit information. - // - // See: https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy - // for more information about auditing and log levels. - // +required - Profile AuditProfile `json:"profile,omitempty"` -} - -// KubeStateMetricsConfig provides configuration options for the kube-state-metrics agent -// that runs in the `openshift-monitoring` namespace. kube-state-metrics generates metrics -// about the state of Kubernetes objects such as Deployments, Nodes, and Pods. -// +kubebuilder:validation:MinProperties=1 -type KubeStateMetricsConfig struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - // +optional - // +kubebuilder:validation:MinProperties=1 - // +kubebuilder:validation:MaxProperties=10 - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the kube-state-metrics container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:MinItems=1 - Resources []ContainerResource `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, no tolerations are applied. This default is subject to change over time. - // When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries. - // Each toleration's operator, when specified, must be either "Exists" or "Equal". - // Each toleration's effect, when specified, must be one of "NoSchedule", "PreferNoSchedule", or "NoExecute". - // An empty or unset effect means match all effects. - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=atomic - // +kubebuilder:validation:XValidation:rule="self.all(t, !has(t.operator) || t.operator == 'Exists' || t.operator == 'Equal')",message="operator must be either Exists or Equal" - // +kubebuilder:validation:XValidation:rule="self.all(t, !has(t.effect) || t.effect == 'NoSchedule' || t.effect == 'PreferNoSchedule' || t.effect == 'NoExecute' || t.effect == '')",message="effect must be NoSchedule, PreferNoSchedule, NoExecute, or empty" - // +optional - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how kube-state-metrics Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // When omitted, no topology spread constraints are applied. This default is subject to change over time. - // When specified, topologySpreadConstraints must contain at least 1 entry and must not contain more than 10 entries. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // Each entry's whenUnsatisfiable must be either "DoNotSchedule" or "ScheduleAnyway". - // Each entry's maxSkew must be at least 1. - // When minDomains is specified, it must be at least 1 and whenUnsatisfiable must be "DoNotSchedule". - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=topologyKey - // +listMapKey=whenUnsatisfiable - // +kubebuilder:validation:XValidation:rule="self.all(c, c.whenUnsatisfiable == 'DoNotSchedule' || c.whenUnsatisfiable == 'ScheduleAnyway')",message="whenUnsatisfiable must be either DoNotSchedule or ScheduleAnyway" - // +kubebuilder:validation:XValidation:rule="self.all(c, c.maxSkew >= 1)",message="maxSkew must be at least 1" - // +kubebuilder:validation:XValidation:rule="self.all(c, !has(c.minDomains) || c.minDomains >= 1)",message="minDomains must be at least 1" - // +kubebuilder:validation:XValidation:rule="self.all(c, !has(c.minDomains) || c.whenUnsatisfiable == 'DoNotSchedule')",message="minDomains can only be used when whenUnsatisfiable is DoNotSchedule" - // +optional - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // additionalResourceLabels defines additional Kubernetes resource labels to expose as metrics - // in kube-state-metrics. - // Currently, only "Job" and "CronJob" resources are supported due to cardinality concerns. - // Each entry specifies a resource name and a list of Kubernetes label names to expose. - // Use "*" in the labels list to expose all labels for a given resource. - // additionalResourceLabels is optional. - // When omitted, no additional Kubernetes object labels are exposed as metrics - // by kube-state-metrics beyond its built-in metric labels (e.g. namespace, job_name). - // Use this field to opt in to exposing specific Kubernetes labels as metric labels - // for the supported resource types. - // Minimum length for this list is 1. - // Maximum length for this list is 2. - // Each resource name must be unique within this list. - // +optional - // +kubebuilder:validation:MaxItems=2 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=resource - AdditionalResourceLabels []KubeStateMetricsResourceLabels `json:"additionalResourceLabels,omitempty"` -} - -// KubeStateMetricsResourceName is the name of a Kubernetes resource whose labels can be exposed -// as metrics by kube-state-metrics. Currently, only "Job" and "CronJob" are supported -// due to cardinality concerns. -// Valid values are "Job" and "CronJob". -// +kubebuilder:validation:Enum=Job;CronJob -type KubeStateMetricsResourceName string - -const ( - // KubeStateMetricsResourceJob indicates the Kubernetes Job resource. - KubeStateMetricsResourceJob KubeStateMetricsResourceName = "Job" - // KubeStateMetricsResourceCronJob indicates the Kubernetes CronJob resource. - KubeStateMetricsResourceCronJob KubeStateMetricsResourceName = "CronJob" -) - -// KubeStateMetricsLabelName is the name of a Kubernetes label to expose as a metric -// via kube-state-metrics. Use "*" to expose all labels for a resource. -// Must be either the wildcard "*" or a valid Kubernetes label key. -// A valid label key has an optional DNS subdomain prefix followed by a "/" and a name segment, -// or just a name segment without a prefix. The name segment must be 63 characters or fewer, -// beginning and ending with an alphanumeric character, with dashes, underscores, dots, and -// alphanumerics in between. -// Must be at least 1 character and at most 253 characters in length. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=253 -// +kubebuilder:validation:XValidation:rule="self == '*' || !format.qualifiedName().validate(self).hasValue()",message="must be a valid Kubernetes label key or the wildcard '*'" -type KubeStateMetricsLabelName string - -// KubeStateMetricsResourceLabels defines which Kubernetes labels to expose as metrics -// for a given resource type in kube-state-metrics. -type KubeStateMetricsResourceLabels struct { - // resource is the Kubernetes resource name whose labels should be exposed as metrics. - // Currently, only "Job" and "CronJob" are supported due to cardinality concerns. - // Valid values are "Job" and "CronJob". - // This field is required. - // +required - Resource KubeStateMetricsResourceName `json:"resource,omitempty"` - // labels is the list of Kubernetes label names to expose as metrics for this resource. - // Use "*" to expose all labels for the specified resource. - // When "*" is specified, it must be the only entry in the list; mixing "*" with - // specific label names is not allowed. - // This field is required. - // Each label name must be unique within this list. - // Minimum length for this list is 1. - // Maximum length for this list is 50. - // +required - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=50 - // +listType=set - // +kubebuilder:validation:XValidation:rule="!self.exists(l, l == '*') || self.size() == 1",message="when '*' is specified, no other labels may be listed" - Labels []KubeStateMetricsLabelName `json:"labels,omitempty"` -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_crio_credential_provider_config.go b/vendor/github.com/openshift/api/config/v1alpha1/types_crio_credential_provider_config.go deleted file mode 100644 index 9e2e0d39d..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_crio_credential_provider_config.go +++ /dev/null @@ -1,186 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CRIOCredentialProviderConfig holds cluster-wide singleton resource configurations for CRI-O credential provider, the name of this instance is "cluster". CRI-O credential provider is a binary shipped with CRI-O that provides a way to obtain container image pull credentials from external sources. -// For example, it can be used to fetch mirror registry credentials from secrets resources in the cluster within the same namespace the pod will be running in. -// CRIOCredentialProviderConfig configuration specifies the pod image sources registries that should trigger the CRI-O credential provider execution, which will resolve the CRI-O mirror configurations and obtain the necessary credentials for pod creation. -// Note: Configuration changes will only take effect after the kubelet restarts, which is automatically managed by the cluster during rollout. -// -// The resource is a singleton named "cluster". -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=criocredentialproviderconfigs,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2557 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:enable:FeatureGate=CRIOCredentialProviderConfig -// +openshift:compatibility-gen:level=4 -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="criocredentialproviderconfig is a singleton, .metadata.name must be 'cluster'" -type CRIOCredentialProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitzero"` - - // spec defines the desired configuration of the CRI-O Credential Provider. - // This field is required and must be provided when creating the resource. - // +required - Spec *CRIOCredentialProviderConfigSpec `json:"spec,omitempty,omitzero"` - - // status represents the current state of the CRIOCredentialProviderConfig. - // When omitted or nil, it indicates that the status has not yet been set by the controller. - // The controller will populate this field with validation conditions and operational state. - // +optional - Status CRIOCredentialProviderConfigStatus `json:"status,omitzero,omitempty"` -} - -// CRIOCredentialProviderConfigSpec defines the desired configuration of the CRI-O Credential Provider. -// +kubebuilder:validation:MinProperties=0 -type CRIOCredentialProviderConfigSpec struct { - // matchImages is a list of string patterns used to determine whether - // the CRI-O credential provider should be invoked for a given image. This list is - // passed to the kubelet CredentialProviderConfig, and if any pattern matches - // the requested image, CRI-O credential provider will be invoked to obtain credentials for pulling - // that image or its mirrors. - // Depending on the platform, the CRI-O credential provider may be installed alongside an existing platform specific provider. - // Conflicts between the existing platform specific provider image match configuration and this list will be handled by - // the following precedence rule: credentials from built-in kubelet providers (e.g., ECR, GCR, ACR) take precedence over those - // from the CRIOCredentialProviderConfig when both match the same image. - // To avoid uncertainty, it is recommended to avoid configuring your private image patterns to overlap with - // existing platform specific provider config(e.g., the entries from https://github.com/openshift/machine-config-operator/blob/main/templates/common/aws/files/etc-kubernetes-credential-providers-ecr-credential-provider.yaml). - // You can check the resource's Status conditions - // to see if any entries were ignored due to exact matches with known built-in provider patterns. - // - // This field is optional, the items of the list must contain between 1 and 50 entries. - // The list is treated as a set, so duplicate entries are not allowed. - // - // For more details, see: - // https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/ - // https://github.com/cri-o/crio-credential-provider#architecture - // - // Each entry in matchImages is a pattern which can optionally contain a port and a path. Each entry must be no longer than 512 characters. - // Wildcards ('*') are supported for full subdomain labels, such as '*.k8s.io' or 'k8s.*.io', - // and for top-level domains, such as 'k8s.*' (which matches 'k8s.io' or 'k8s.net'). - // A global wildcard '*' (matching any domain) is not allowed. - // Wildcards may replace an entire hostname label (e.g., *.example.com), but they cannot appear within a label (e.g., f*oo.example.com) and are not allowed in the port or path. - // For example, 'example.*.com' is valid, but 'exa*mple.*.com' is not. - // Each wildcard matches only a single domain label, - // so '*.io' does **not** match '*.k8s.io'. - // - // A match exists between an image and a matchImage when all of the below are true: - // Both contain the same number of domain parts and each part matches. - // The URL path of an matchImages must be a prefix of the target image URL path. - // If the matchImages contains a port, then the port must match in the image as well. - // - // Example values of matchImages: - // - 123456789.dkr.ecr.us-east-1.amazonaws.com - // - *.azurecr.io - // - gcr.io - // - *.*.registry.io - // - registry.io:8080/path - // - // +kubebuilder:validation:MaxItems=50 - // +kubebuilder:validation:MinItems=1 - // +listType=set - // +optional - MatchImages []MatchImage `json:"matchImages,omitempty"` -} - -// MatchImage is a string pattern used to match container image registry addresses. -// It must be a valid fully qualified domain name with optional wildcard, port, and path. -// The maximum length is 512 characters. -// -// Wildcards ('*') are supported for full subdomain labels and top-level domains. -// Each entry can optionally contain a port (e.g., :8080) and a path (e.g., /path). -// Wildcards are not allowed in the port or path portions. -// -// Examples: -// - "registry.io" - matches exactly registry.io -// - "*.azurecr.io" - matches any single subdomain of azurecr.io -// - "registry.io:8080/path" - matches with specific port and path prefix -// -// +kubebuilder:validation:MaxLength=512 -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:XValidation:rule="self != '*'",message="global wildcard '*' is not allowed" -// +kubebuilder:validation:XValidation:rule=`self.matches('^((\\*|[a-z0-9]([a-z0-9-]*[a-z0-9])?)(\\.(\\*|[a-z0-9]([a-z0-9-]*[a-z0-9])?))*)(:[0-9]+)?(/[-a-z0-9._/]*)?$')`,message="invalid matchImages value, must be a valid fully qualified domain name in lowercase with optional wildcard, port, and path" -type MatchImage string - -// +k8s:deepcopy-gen=true -// CRIOCredentialProviderConfigStatus defines the observed state of CRIOCredentialProviderConfig -// +kubebuilder:validation:MinProperties=1 -type CRIOCredentialProviderConfigStatus struct { - // conditions represent the latest available observations of the configuration state. - // When omitted, it indicates that no conditions have been reported yet. - // The maximum number of conditions is 16. - // Conditions are stored as a map keyed by condition type, ensuring uniqueness. - // - // Expected condition types include: - // "Validated": indicates whether the matchImages configuration is valid - // +optional - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:MinItems=1 - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CRIOCredentialProviderConfigList contains a list of CRIOCredentialProviderConfig resources -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type CRIOCredentialProviderConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []CRIOCredentialProviderConfig `json:"items"` -} - -const ( - // ConditionTypeValidated is a condition type that indicates whether the CRIOCredentialProviderConfig - // matchImages configuration has been validated successfully. - // When True, all matchImage patterns are valid and have been applied. - // When False, the configuration contains errors (see Reason for details). - // Possible reasons for False status: - // - ValidationFailed: matchImages contains invalid patterns - // - ConfigurationPartiallyApplied: some matchImage entries were ignored due to conflicts - ConditionTypeValidated = "Validated" - - // ReasonValidationFailed is a condition reason used with ConditionTypeValidated=False - // to indicate that the matchImages configuration contains one or more invalid registry patterns - // that do not conform to the required format (valid FQDN with optional wildcard, port, and path). - ReasonValidationFailed = "ValidationFailed" - - // ReasonConfigurationPartiallyApplied is a condition reason used with ConditionTypeValidated=False - // to indicate that some matchImage entries were ignored due to conflicts or overlapping patterns. - // The condition message will contain details about which entries were ignored and why. - ReasonConfigurationPartiallyApplied = "ConfigurationPartiallyApplied" - - // ConditionTypeMachineConfigRendered is a condition type that indicates whether - // the CRIOCredentialProviderConfig has been successfully rendered into a - // MachineConfig object. - // When True, the corresponding MachineConfig is present in the cluster. - // When False, rendering failed. - ConditionTypeMachineConfigRendered = "MachineConfigRendered" - - // ReasonMachineConfigRenderingSucceeded is a condition reason used with ConditionTypeMachineConfigRendered=True - // to indicate that the MachineConfig was successfully created/updated in the API server. - ReasonMachineConfigRenderingSucceeded = "MachineConfigRenderingSucceeded" - - // ReasonMachineConfigRenderingFailed is a condition reason used with ConditionTypeMachineConfigRendered=False - // to indicate that the MachineConfig creation/update failed. - // The condition message will contain details about the failure. - ReasonMachineConfigRenderingFailed = "MachineConfigRenderingFailed" -) diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go b/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go deleted file mode 100644 index 43546d03b..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_insights.go +++ /dev/null @@ -1,154 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// InsightsDataGather provides data gather configuration options for the the Insights Operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=insightsdatagathers,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1245 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:enable:FeatureGate=InsightsConfig -// +openshift:compatibility-gen:level=4 -// +openshift:capability=Insights -type InsightsDataGather struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec InsightsDataGatherSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status InsightsDataGatherStatus `json:"status"` -} - -type InsightsDataGatherSpec struct { - // gatherConfig spec attribute includes all the configuration options related to gathering of the Insights data and its uploading to the ingress. - // +optional - GatherConfig GatherConfig `json:"gatherConfig,omitempty"` -} - -type InsightsDataGatherStatus struct{} - -// gatherConfig provides data gathering configuration options. -type GatherConfig struct { - // dataPolicy allows user to enable additional global obfuscation of the IP addresses and base domain in the Insights archive data. - // Valid values are "None" and "ObfuscateNetworking". - // When set to None the data is not obfuscated. - // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // +optional - DataPolicy DataPolicy `json:"dataPolicy,omitempty"` - // disabledGatherers is a list of gatherers to be excluded from the gathering. All the gatherers can be disabled by providing "all" value. - // If all the gatherers are disabled, the Insights operator does not gather any data. - // The format for the disabledGatherer should be: {gatherer}/{function} where the function is optional. - // Gatherer consists of a lowercase letters only that may include underscores (_). - // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). - // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - // An example of disabling gatherers looks like this: `disabledGatherers: ["clusterconfig/machine_configs", "workloads/workload_info"]` - // +kubebuilder:validation:MaxItems=100 - // +listType=atomic - // +optional - DisabledGatherers []DisabledGatherer `json:"disabledGatherers"` - // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. - // If omitted, the gathering job will use ephemeral storage. - // +optional - StorageSpec *Storage `json:"storage,omitempty"` -} - -// disabledGatherer is a string that represents a gatherer that should be disabled -// +kubebuilder:validation:MaxLength=256 -// +kubebuilder:validation:XValidation:rule=`self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$")`,message=`disabledGatherer must be in the format of {gatherer}/{function} where the gatherer and function are lowercase letters only that may include underscores (_) and are separated by a forward slash (/) if the function is provided` -type DisabledGatherer string - -// storage provides persistent storage configuration options for gathering jobs. -// If the type is set to PersistentVolume, then the PersistentVolume must be defined. -// If the type is set to Ephemeral, then the PersistentVolume must not be defined. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'PersistentVolume' ? has(self.persistentVolume) : !has(self.persistentVolume)",message="persistentVolume is required when type is PersistentVolume, and forbidden otherwise" -type Storage struct { - // type is a required field that specifies the type of storage that will be used to store the Insights data archive. - // Valid values are "PersistentVolume" and "Ephemeral". - // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. - // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field. - // +required - Type StorageType `json:"type"` - // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. - // The PersistentVolume must be created in the openshift-insights namespace. - // +optional - PersistentVolume *PersistentVolumeConfig `json:"persistentVolume,omitempty"` -} - -// storageType declares valid storage types -// +kubebuilder:validation:Enum=PersistentVolume;Ephemeral -type StorageType string - -const ( - // StorageTypePersistentVolume storage type - StorageTypePersistentVolume StorageType = "PersistentVolume" - // StorageTypeEphemeral storage type - StorageTypeEphemeral StorageType = "Ephemeral" -) - -// persistentVolumeConfig provides configuration options for PersistentVolume storage. -type PersistentVolumeConfig struct { - // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. - // The PersistentVolumeClaim must be created in the openshift-insights namespace. - // +required - Claim PersistentVolumeClaimReference `json:"claim"` - // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default mount path is /var/lib/insights-operator - // The path may not exceed 1024 characters and must not contain a colon. - // +kubebuilder:validation:MaxLength=1024 - // +kubebuilder:validation:XValidation:rule="!self.contains(':')",message="mountPath must not contain a colon" - // +optional - MountPath string `json:"mountPath,omitempty"` -} - -// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim. -type PersistentVolumeClaimReference struct { - // name is a string that follows the DNS1123 subdomain format. - // It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character. - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +kubebuilder:validation:MaxLength:=253 - // +required - Name string `json:"name"` -} - -const ( - // No data obfuscation - NoPolicy DataPolicy = "None" - // IP addresses and cluster domain name are obfuscated - ObfuscateNetworking DataPolicy = "ObfuscateNetworking" -) - -// dataPolicy declares valid data policy types -// +kubebuilder:validation:Enum="";None;ObfuscateNetworking -type DataPolicy string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InsightsDataGatherList is a collection of items -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type InsightsDataGatherList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []InsightsDataGather `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_pki.go b/vendor/github.com/openshift/api/config/v1alpha1/types_pki.go deleted file mode 100644 index c5be8b5bc..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_pki.go +++ /dev/null @@ -1,274 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// PKI configures cryptographic parameters for certificates generated -// internally by OpenShift components. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=pkis,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2645 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:enable:FeatureGate=ConfigurablePKI -// +openshift:compatibility-gen:level=4 -type PKI struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec PKISpec `json:"spec,omitzero"` -} - -// PKISpec holds the specification for PKI configuration. -type PKISpec struct { - // certificateManagement specifies how PKI configuration is managed for internally-generated certificates. - // This controls the certificate generation approach for all OpenShift components that create - // certificates internally, including certificate authorities, serving certificates, and client certificates. - // - // +required - CertificateManagement PKICertificateManagement `json:"certificateManagement,omitzero"` -} - -// PKICertificateManagement determines whether components use hardcoded defaults (Unmanaged), follow -// OpenShift best practices (Default), or use administrator-specified cryptographic parameters (Custom). -// This provides flexibility for organizations with specific compliance requirements or security policies -// while maintaining backwards compatibility for existing clusters. -// -// +kubebuilder:validation:XValidation:rule="self.mode == 'Custom' ? has(self.custom) : !has(self.custom)",message="custom is required when mode is Custom, and forbidden otherwise" -// +union -type PKICertificateManagement struct { - // mode determines how PKI configuration is managed. - // Valid values are "Unmanaged", "Default", and "Custom". - // - // When set to Unmanaged, components use their existing hardcoded certificate - // generation behavior, exactly as if this feature did not exist. Each component - // generates certificates using whatever parameters it was using before this - // feature. While most components use RSA 2048, some may use different - // parameters. Use of this mode might prevent upgrading to the next major - // OpenShift release. - // - // When set to Default, OpenShift-recommended best practices for certificate - // generation are applied. The specific parameters may evolve across OpenShift - // releases to adopt improved cryptographic standards. In the initial release, - // this matches Unmanaged behavior for each component. In future releases, this - // may adopt ECDSA or larger RSA keys based on industry best practices. - // Recommended for most customers who want to benefit from security improvements - // automatically. - // - // When set to Custom, the certificate management parameters can be set - // explicitly. Use the custom field to specify certificate generation parameters. - // - // +required - // +unionDiscriminator - Mode PKICertificateManagementMode `json:"mode,omitempty"` - - // custom contains administrator-specified cryptographic configuration. - // Use the defaults and category override fields - // to specify certificate generation parameters. - // Required when mode is Custom, and forbidden otherwise. - // - // +optional - // +unionMember - Custom CustomPKIPolicy `json:"custom,omitzero"` -} - -// CustomPKIPolicy contains administrator-specified cryptographic configuration. -// Administrators must specify defaults for all certificates and may optionally -// override specific categories of certificates. -// -// +kubebuilder:validation:MinProperties=1 -type CustomPKIPolicy struct { - PKIProfile `json:",inline"` -} - -// PKICertificateManagementMode specifies the mode for PKI certificate management. -// -// +kubebuilder:validation:Enum=Unmanaged;Default;Custom -type PKICertificateManagementMode string - -const ( - // PKICertificateManagementModeUnmanaged uses each component's existing hardcoded defaults. - // Most components currently use RSA 2048, but parameters may differ by component. - PKICertificateManagementModeUnmanaged PKICertificateManagementMode = "Unmanaged" - - // PKICertificateManagementModeDefault uses OpenShift-recommended best practices. - // Specific parameters may evolve across OpenShift releases. - PKICertificateManagementModeDefault PKICertificateManagementMode = "Default" - - // PKICertificateManagementModeCustom uses administrator-specified configuration. - PKICertificateManagementModeCustom PKICertificateManagementMode = "Custom" -) - -// PKIProfile defines the certificate generation parameters that OpenShift -// components use to create certificates. Category overrides take precedence -// over defaults. -type PKIProfile struct { - // defaults specifies the default certificate configuration that applies - // to all certificates unless overridden by a category override. - // - // +required - Defaults DefaultCertificateConfig `json:"defaults,omitzero"` - - // signerCertificates optionally overrides certificate parameters for - // certificate authority (CA) certificates that sign other certificates. - // When set, these parameters take precedence over defaults for all signer certificates. - // When omitted, the defaults are used for signer certificates. - // - // +optional - SignerCertificates CertificateConfig `json:"signerCertificates,omitempty,omitzero"` - - // servingCertificates optionally overrides certificate parameters for - // TLS server certificates used to serve HTTPS endpoints. - // When set, these parameters take precedence over defaults for all serving certificates. - // When omitted, the defaults are used for serving certificates. - // - // +optional - ServingCertificates CertificateConfig `json:"servingCertificates,omitempty,omitzero"` - - // clientCertificates optionally overrides certificate parameters for - // client authentication certificates used to authenticate to servers. - // When set, these parameters take precedence over defaults for all client certificates. - // When omitted, the defaults are used for client certificates. - // - // +optional - ClientCertificates CertificateConfig `json:"clientCertificates,omitempty,omitzero"` -} - -// DefaultCertificateConfig specifies the default certificate configuration -// parameters. All fields are required to ensure that defaults are fully -// specified for all certificates. -type DefaultCertificateConfig struct { - // key specifies the cryptographic parameters for the certificate's key pair. - // This field is required in defaults to ensure all certificates have a - // well-defined key configuration. - // +required - Key KeyConfig `json:"key,omitzero"` -} - -// CertificateConfig specifies configuration parameters for certificates. -// At least one property must be specified. -// +kubebuilder:validation:MinProperties=1 -type CertificateConfig struct { - // key specifies the cryptographic parameters for the certificate's key pair. - // Currently this is the only configurable parameter. When omitted in an - // overrides entry, the key configuration from defaults is used. - // +optional - Key KeyConfig `json:"key,omitzero"` -} - -// KeyConfig specifies cryptographic parameters for key generation. -// -// +kubebuilder:validation:XValidation:rule="has(self.algorithm) && self.algorithm == 'RSA' ? has(self.rsa) : !has(self.rsa)",message="rsa is required when algorithm is RSA, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.algorithm) && self.algorithm == 'ECDSA' ? has(self.ecdsa) : !has(self.ecdsa)",message="ecdsa is required when algorithm is ECDSA, and forbidden otherwise" -// +union -type KeyConfig struct { - // algorithm specifies the key generation algorithm. - // Valid values are "RSA" and "ECDSA". - // - // When set to RSA, the rsa field must be specified and the generated key - // will be an RSA key with the configured key size. - // - // When set to ECDSA, the ecdsa field must be specified and the generated key - // will be an ECDSA key using the configured elliptic curve. - // - // +required - // +unionDiscriminator - Algorithm KeyAlgorithm `json:"algorithm,omitempty"` - - // rsa specifies RSA key parameters. - // Required when algorithm is RSA, and forbidden otherwise. - // +optional - // +unionMember - RSA RSAKeyConfig `json:"rsa,omitzero"` - - // ecdsa specifies ECDSA key parameters. - // Required when algorithm is ECDSA, and forbidden otherwise. - // +optional - // +unionMember - ECDSA ECDSAKeyConfig `json:"ecdsa,omitzero"` -} - -// RSAKeyConfig specifies parameters for RSA key generation. -type RSAKeyConfig struct { - // keySize specifies the size of RSA keys in bits. - // Valid values are multiples of 1024 from 2048 to 8192. - // +required - // +kubebuilder:validation:Minimum=2048 - // +kubebuilder:validation:Maximum=8192 - // +kubebuilder:validation:MultipleOf=1024 - KeySize int32 `json:"keySize,omitempty"` -} - -// ECDSAKeyConfig specifies parameters for ECDSA key generation. -type ECDSAKeyConfig struct { - // curve specifies the NIST elliptic curve for ECDSA keys. - // Valid values are "P256", "P384", and "P521". - // - // When set to P256, the NIST P-256 curve (also known as secp256r1) is used, - // providing 128-bit security. - // - // When set to P384, the NIST P-384 curve (also known as secp384r1) is used, - // providing 192-bit security. - // - // When set to P521, the NIST P-521 curve (also known as secp521r1) is used, - // providing 256-bit security. - // - // +required - Curve ECDSACurve `json:"curve,omitempty"` -} - -// KeyAlgorithm specifies the cryptographic algorithm used for key generation. -// -// +kubebuilder:validation:Enum=RSA;ECDSA -type KeyAlgorithm string - -const ( - // KeyAlgorithmRSA specifies the RSA (Rivest-Shamir-Adleman) algorithm for key generation. - KeyAlgorithmRSA KeyAlgorithm = "RSA" - - // KeyAlgorithmECDSA specifies the ECDSA (Elliptic Curve Digital Signature Algorithm) for key generation. - KeyAlgorithmECDSA KeyAlgorithm = "ECDSA" -) - -// ECDSACurve specifies the elliptic curve used for ECDSA key generation. -// -// +kubebuilder:validation:Enum=P256;P384;P521 -type ECDSACurve string - -const ( - // ECDSACurveP256 specifies the NIST P-256 curve (also known as secp256r1), providing 128-bit security. - ECDSACurveP256 ECDSACurve = "P256" - - // ECDSACurveP384 specifies the NIST P-384 curve (also known as secp384r1), providing 192-bit security. - ECDSACurveP384 ECDSACurve = "P384" - - // ECDSACurveP521 specifies the NIST P-521 curve (also known as secp521r1), providing 256-bit security. - ECDSACurveP521 ECDSACurve = "P521" -) - -// PKIList is a collection of PKI resources. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=4 -type PKIList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items is a list of PKI resources - Items []PKI `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 12dd0cd31..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,2113 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AdditionalAlertmanagerConfig) DeepCopyInto(out *AdditionalAlertmanagerConfig) { - *out = *in - out.Authorization = in.Authorization - if in.StaticConfigs != nil { - in, out := &in.StaticConfigs, &out.StaticConfigs - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.TLSConfig = in.TLSConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalAlertmanagerConfig. -func (in *AdditionalAlertmanagerConfig) DeepCopy() *AdditionalAlertmanagerConfig { - if in == nil { - return nil - } - out := new(AdditionalAlertmanagerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertmanagerConfig) DeepCopyInto(out *AlertmanagerConfig) { - *out = *in - in.CustomConfig.DeepCopyInto(&out.CustomConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfig. -func (in *AlertmanagerConfig) DeepCopy() *AlertmanagerConfig { - if in == nil { - return nil - } - out := new(AlertmanagerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertmanagerCustomConfig) DeepCopyInto(out *AlertmanagerCustomConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]SecretName, len(*in)) - copy(*out, *in) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeClaimTemplate != nil { - in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate - *out = new(v1.PersistentVolumeClaim) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerCustomConfig. -func (in *AlertmanagerCustomConfig) DeepCopy() *AlertmanagerCustomConfig { - if in == nil { - return nil - } - out := new(AlertmanagerCustomConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Audit) DeepCopyInto(out *Audit) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Audit. -func (in *Audit) DeepCopy() *Audit { - if in == nil { - return nil - } - out := new(Audit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthorizationConfig) DeepCopyInto(out *AuthorizationConfig) { - *out = *in - out.BearerToken = in.BearerToken - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationConfig. -func (in *AuthorizationConfig) DeepCopy() *AuthorizationConfig { - if in == nil { - return nil - } - out := new(AuthorizationConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Backup) DeepCopyInto(out *Backup) { - *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 Backup. -func (in *Backup) DeepCopy() *Backup { - if in == nil { - return nil - } - out := new(Backup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Backup) 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 *BackupList) DeepCopyInto(out *BackupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Backup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupList. -func (in *BackupList) DeepCopy() *BackupList { - if in == nil { - return nil - } - out := new(BackupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BackupList) 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 *BackupSpec) DeepCopyInto(out *BackupSpec) { - *out = *in - in.EtcdBackupSpec.DeepCopyInto(&out.EtcdBackupSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupSpec. -func (in *BackupSpec) DeepCopy() *BackupSpec { - if in == nil { - return nil - } - out := new(BackupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BackupStatus) DeepCopyInto(out *BackupStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupStatus. -func (in *BackupStatus) DeepCopy() *BackupStatus { - if in == nil { - return nil - } - out := new(BackupStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuth) DeepCopyInto(out *BasicAuth) { - *out = *in - out.Username = in.Username - out.Password = in.Password - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth. -func (in *BasicAuth) DeepCopy() *BasicAuth { - if in == nil { - return nil - } - out := new(BasicAuth) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CRIOCredentialProviderConfig) DeepCopyInto(out *CRIOCredentialProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = new(CRIOCredentialProviderConfigSpec) - (*in).DeepCopyInto(*out) - } - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRIOCredentialProviderConfig. -func (in *CRIOCredentialProviderConfig) DeepCopy() *CRIOCredentialProviderConfig { - if in == nil { - return nil - } - out := new(CRIOCredentialProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CRIOCredentialProviderConfig) 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 *CRIOCredentialProviderConfigList) DeepCopyInto(out *CRIOCredentialProviderConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CRIOCredentialProviderConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRIOCredentialProviderConfigList. -func (in *CRIOCredentialProviderConfigList) DeepCopy() *CRIOCredentialProviderConfigList { - if in == nil { - return nil - } - out := new(CRIOCredentialProviderConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CRIOCredentialProviderConfigList) 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 *CRIOCredentialProviderConfigSpec) DeepCopyInto(out *CRIOCredentialProviderConfigSpec) { - *out = *in - if in.MatchImages != nil { - in, out := &in.MatchImages, &out.MatchImages - *out = make([]MatchImage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRIOCredentialProviderConfigSpec. -func (in *CRIOCredentialProviderConfigSpec) DeepCopy() *CRIOCredentialProviderConfigSpec { - if in == nil { - return nil - } - out := new(CRIOCredentialProviderConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CRIOCredentialProviderConfigStatus) DeepCopyInto(out *CRIOCredentialProviderConfigStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRIOCredentialProviderConfigStatus. -func (in *CRIOCredentialProviderConfigStatus) DeepCopy() *CRIOCredentialProviderConfigStatus { - if in == nil { - return nil - } - out := new(CRIOCredentialProviderConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CertificateConfig) DeepCopyInto(out *CertificateConfig) { - *out = *in - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertificateConfig. -func (in *CertificateConfig) DeepCopy() *CertificateConfig { - if in == nil { - return nil - } - out := new(CertificateConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterMonitoring) DeepCopyInto(out *ClusterMonitoring) { - *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 ClusterMonitoring. -func (in *ClusterMonitoring) DeepCopy() *ClusterMonitoring { - if in == nil { - return nil - } - out := new(ClusterMonitoring) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterMonitoring) 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 *ClusterMonitoringList) DeepCopyInto(out *ClusterMonitoringList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterMonitoring, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMonitoringList. -func (in *ClusterMonitoringList) DeepCopy() *ClusterMonitoringList { - if in == nil { - return nil - } - out := new(ClusterMonitoringList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterMonitoringList) 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 *ClusterMonitoringSpec) DeepCopyInto(out *ClusterMonitoringSpec) { - *out = *in - out.UserDefined = in.UserDefined - in.AlertmanagerConfig.DeepCopyInto(&out.AlertmanagerConfig) - in.PrometheusConfig.DeepCopyInto(&out.PrometheusConfig) - in.MetricsServerConfig.DeepCopyInto(&out.MetricsServerConfig) - in.PrometheusOperatorConfig.DeepCopyInto(&out.PrometheusOperatorConfig) - in.PrometheusOperatorAdmissionWebhookConfig.DeepCopyInto(&out.PrometheusOperatorAdmissionWebhookConfig) - in.OpenShiftStateMetricsConfig.DeepCopyInto(&out.OpenShiftStateMetricsConfig) - in.TelemeterClientConfig.DeepCopyInto(&out.TelemeterClientConfig) - in.ThanosQuerierConfig.DeepCopyInto(&out.ThanosQuerierConfig) - in.NodeExporterConfig.DeepCopyInto(&out.NodeExporterConfig) - in.MonitoringPluginConfig.DeepCopyInto(&out.MonitoringPluginConfig) - in.KubeStateMetricsConfig.DeepCopyInto(&out.KubeStateMetricsConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMonitoringSpec. -func (in *ClusterMonitoringSpec) DeepCopy() *ClusterMonitoringSpec { - if in == nil { - return nil - } - out := new(ClusterMonitoringSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterMonitoringStatus) DeepCopyInto(out *ClusterMonitoringStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterMonitoringStatus. -func (in *ClusterMonitoringStatus) DeepCopy() *ClusterMonitoringStatus { - if in == nil { - return nil - } - out := new(ClusterMonitoringStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerResource) DeepCopyInto(out *ContainerResource) { - *out = *in - out.Request = in.Request.DeepCopy() - out.Limit = in.Limit.DeepCopy() - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerResource. -func (in *ContainerResource) DeepCopy() *ContainerResource { - if in == nil { - return nil - } - out := new(ContainerResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomPKIPolicy) DeepCopyInto(out *CustomPKIPolicy) { - *out = *in - out.PKIProfile = in.PKIProfile - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomPKIPolicy. -func (in *CustomPKIPolicy) DeepCopy() *CustomPKIPolicy { - if in == nil { - return nil - } - out := new(CustomPKIPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DefaultCertificateConfig) DeepCopyInto(out *DefaultCertificateConfig) { - *out = *in - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultCertificateConfig. -func (in *DefaultCertificateConfig) DeepCopy() *DefaultCertificateConfig { - if in == nil { - return nil - } - out := new(DefaultCertificateConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DropEqualActionConfig) DeepCopyInto(out *DropEqualActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DropEqualActionConfig. -func (in *DropEqualActionConfig) DeepCopy() *DropEqualActionConfig { - if in == nil { - return nil - } - out := new(DropEqualActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ECDSAKeyConfig) DeepCopyInto(out *ECDSAKeyConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ECDSAKeyConfig. -func (in *ECDSAKeyConfig) DeepCopy() *ECDSAKeyConfig { - if in == nil { - return nil - } - out := new(ECDSAKeyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdBackupSpec) DeepCopyInto(out *EtcdBackupSpec) { - *out = *in - in.RetentionPolicy.DeepCopyInto(&out.RetentionPolicy) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupSpec. -func (in *EtcdBackupSpec) DeepCopy() *EtcdBackupSpec { - if in == nil { - return nil - } - out := new(EtcdBackupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GatherConfig) DeepCopyInto(out *GatherConfig) { - *out = *in - if in.DisabledGatherers != nil { - in, out := &in.DisabledGatherers, &out.DisabledGatherers - *out = make([]DisabledGatherer, len(*in)) - copy(*out, *in) - } - if in.StorageSpec != nil { - in, out := &in.StorageSpec, &out.StorageSpec - *out = new(Storage) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatherConfig. -func (in *GatherConfig) DeepCopy() *GatherConfig { - if in == nil { - return nil - } - out := new(GatherConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HashModActionConfig) DeepCopyInto(out *HashModActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HashModActionConfig. -func (in *HashModActionConfig) DeepCopy() *HashModActionConfig { - if in == nil { - return nil - } - out := new(HashModActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsDataGather) DeepCopyInto(out *InsightsDataGather) { - *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 InsightsDataGather. -func (in *InsightsDataGather) DeepCopy() *InsightsDataGather { - if in == nil { - return nil - } - out := new(InsightsDataGather) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsDataGather) 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 *InsightsDataGatherList) DeepCopyInto(out *InsightsDataGatherList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]InsightsDataGather, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherList. -func (in *InsightsDataGatherList) DeepCopy() *InsightsDataGatherList { - if in == nil { - return nil - } - out := new(InsightsDataGatherList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsDataGatherList) 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 *InsightsDataGatherSpec) DeepCopyInto(out *InsightsDataGatherSpec) { - *out = *in - in.GatherConfig.DeepCopyInto(&out.GatherConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherSpec. -func (in *InsightsDataGatherSpec) DeepCopy() *InsightsDataGatherSpec { - if in == nil { - return nil - } - out := new(InsightsDataGatherSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsDataGatherStatus) DeepCopyInto(out *InsightsDataGatherStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherStatus. -func (in *InsightsDataGatherStatus) DeepCopy() *InsightsDataGatherStatus { - if in == nil { - return nil - } - out := new(InsightsDataGatherStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeepEqualActionConfig) DeepCopyInto(out *KeepEqualActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeepEqualActionConfig. -func (in *KeepEqualActionConfig) DeepCopy() *KeepEqualActionConfig { - if in == nil { - return nil - } - out := new(KeepEqualActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeyConfig) DeepCopyInto(out *KeyConfig) { - *out = *in - out.RSA = in.RSA - out.ECDSA = in.ECDSA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyConfig. -func (in *KeyConfig) DeepCopy() *KeyConfig { - if in == nil { - return nil - } - out := new(KeyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeStateMetricsConfig) DeepCopyInto(out *KubeStateMetricsConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalResourceLabels != nil { - in, out := &in.AdditionalResourceLabels, &out.AdditionalResourceLabels - *out = make([]KubeStateMetricsResourceLabels, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStateMetricsConfig. -func (in *KubeStateMetricsConfig) DeepCopy() *KubeStateMetricsConfig { - if in == nil { - return nil - } - out := new(KubeStateMetricsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeStateMetricsResourceLabels) DeepCopyInto(out *KubeStateMetricsResourceLabels) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make([]KubeStateMetricsLabelName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStateMetricsResourceLabels. -func (in *KubeStateMetricsResourceLabels) DeepCopy() *KubeStateMetricsResourceLabels { - if in == nil { - return nil - } - out := new(KubeStateMetricsResourceLabels) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Label) DeepCopyInto(out *Label) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Label. -func (in *Label) DeepCopy() *Label { - if in == nil { - return nil - } - out := new(Label) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LabelMapActionConfig) DeepCopyInto(out *LabelMapActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelMapActionConfig. -func (in *LabelMapActionConfig) DeepCopy() *LabelMapActionConfig { - if in == nil { - return nil - } - out := new(LabelMapActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LowercaseActionConfig) DeepCopyInto(out *LowercaseActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LowercaseActionConfig. -func (in *LowercaseActionConfig) DeepCopy() *LowercaseActionConfig { - if in == nil { - return nil - } - out := new(LowercaseActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetadataConfig) DeepCopyInto(out *MetadataConfig) { - *out = *in - out.Custom = in.Custom - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataConfig. -func (in *MetadataConfig) DeepCopy() *MetadataConfig { - if in == nil { - return nil - } - out := new(MetadataConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetadataConfigCustom) DeepCopyInto(out *MetadataConfigCustom) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataConfigCustom. -func (in *MetadataConfigCustom) DeepCopy() *MetadataConfigCustom { - if in == nil { - return nil - } - out := new(MetadataConfigCustom) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetricsServerConfig) DeepCopyInto(out *MetricsServerConfig) { - *out = *in - out.Audit = in.Audit - 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([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsServerConfig. -func (in *MetricsServerConfig) DeepCopy() *MetricsServerConfig { - if in == nil { - return nil - } - out := new(MetricsServerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MonitoringPluginConfig) DeepCopyInto(out *MonitoringPluginConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringPluginConfig. -func (in *MonitoringPluginConfig) DeepCopy() *MonitoringPluginConfig { - if in == nil { - return nil - } - out := new(MonitoringPluginConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorBuddyInfoConfig) DeepCopyInto(out *NodeExporterCollectorBuddyInfoConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorBuddyInfoConfig. -func (in *NodeExporterCollectorBuddyInfoConfig) DeepCopy() *NodeExporterCollectorBuddyInfoConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorBuddyInfoConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorConfig) DeepCopyInto(out *NodeExporterCollectorConfig) { - *out = *in - out.CpuFreq = in.CpuFreq - out.TcpStat = in.TcpStat - out.Ethtool = in.Ethtool - out.NetDev = in.NetDev - out.NetClass = in.NetClass - out.BuddyInfo = in.BuddyInfo - out.MountStats = in.MountStats - out.Ksmd = in.Ksmd - out.Processes = in.Processes - in.Systemd.DeepCopyInto(&out.Systemd) - out.Softirqs = in.Softirqs - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorConfig. -func (in *NodeExporterCollectorConfig) DeepCopy() *NodeExporterCollectorConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorCpufreqConfig) DeepCopyInto(out *NodeExporterCollectorCpufreqConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorCpufreqConfig. -func (in *NodeExporterCollectorCpufreqConfig) DeepCopy() *NodeExporterCollectorCpufreqConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorCpufreqConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorEthtoolConfig) DeepCopyInto(out *NodeExporterCollectorEthtoolConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorEthtoolConfig. -func (in *NodeExporterCollectorEthtoolConfig) DeepCopy() *NodeExporterCollectorEthtoolConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorEthtoolConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorKSMDConfig) DeepCopyInto(out *NodeExporterCollectorKSMDConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorKSMDConfig. -func (in *NodeExporterCollectorKSMDConfig) DeepCopy() *NodeExporterCollectorKSMDConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorKSMDConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorMountStatsConfig) DeepCopyInto(out *NodeExporterCollectorMountStatsConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorMountStatsConfig. -func (in *NodeExporterCollectorMountStatsConfig) DeepCopy() *NodeExporterCollectorMountStatsConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorMountStatsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorNetClassCollectConfig) DeepCopyInto(out *NodeExporterCollectorNetClassCollectConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetClassCollectConfig. -func (in *NodeExporterCollectorNetClassCollectConfig) DeepCopy() *NodeExporterCollectorNetClassCollectConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorNetClassCollectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorNetClassConfig) DeepCopyInto(out *NodeExporterCollectorNetClassConfig) { - *out = *in - out.Collect = in.Collect - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetClassConfig. -func (in *NodeExporterCollectorNetClassConfig) DeepCopy() *NodeExporterCollectorNetClassConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorNetClassConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorNetDevConfig) DeepCopyInto(out *NodeExporterCollectorNetDevConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorNetDevConfig. -func (in *NodeExporterCollectorNetDevConfig) DeepCopy() *NodeExporterCollectorNetDevConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorNetDevConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorProcessesConfig) DeepCopyInto(out *NodeExporterCollectorProcessesConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorProcessesConfig. -func (in *NodeExporterCollectorProcessesConfig) DeepCopy() *NodeExporterCollectorProcessesConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorProcessesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorSoftirqsConfig) DeepCopyInto(out *NodeExporterCollectorSoftirqsConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorSoftirqsConfig. -func (in *NodeExporterCollectorSoftirqsConfig) DeepCopy() *NodeExporterCollectorSoftirqsConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorSoftirqsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorSystemdCollectConfig) DeepCopyInto(out *NodeExporterCollectorSystemdCollectConfig) { - *out = *in - if in.Units != nil { - in, out := &in.Units, &out.Units - *out = make([]NodeExporterSystemdUnit, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorSystemdCollectConfig. -func (in *NodeExporterCollectorSystemdCollectConfig) DeepCopy() *NodeExporterCollectorSystemdCollectConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorSystemdCollectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorSystemdConfig) DeepCopyInto(out *NodeExporterCollectorSystemdConfig) { - *out = *in - in.Collect.DeepCopyInto(&out.Collect) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorSystemdConfig. -func (in *NodeExporterCollectorSystemdConfig) DeepCopy() *NodeExporterCollectorSystemdConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorSystemdConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterCollectorTcpStatConfig) DeepCopyInto(out *NodeExporterCollectorTcpStatConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterCollectorTcpStatConfig. -func (in *NodeExporterCollectorTcpStatConfig) DeepCopy() *NodeExporterCollectorTcpStatConfig { - if in == nil { - return nil - } - out := new(NodeExporterCollectorTcpStatConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeExporterConfig) DeepCopyInto(out *NodeExporterConfig) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Collectors.DeepCopyInto(&out.Collectors) - if in.IgnoredNetworkDevices != nil { - in, out := &in.IgnoredNetworkDevices, &out.IgnoredNetworkDevices - *out = new([]NodeExporterIgnoredNetworkDevice) - if **in != nil { - in, out := *in, *out - *out = make([]NodeExporterIgnoredNetworkDevice, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeExporterConfig. -func (in *NodeExporterConfig) DeepCopy() *NodeExporterConfig { - if in == nil { - return nil - } - out := new(NodeExporterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuth2) DeepCopyInto(out *OAuth2) { - *out = *in - out.ClientID = in.ClientID - out.ClientSecret = in.ClientSecret - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EndpointParams != nil { - in, out := &in.EndpointParams, &out.EndpointParams - *out = make([]OAuth2EndpointParam, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2. -func (in *OAuth2) DeepCopy() *OAuth2 { - if in == nil { - return nil - } - out := new(OAuth2) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuth2EndpointParam) DeepCopyInto(out *OAuth2EndpointParam) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2EndpointParam. -func (in *OAuth2EndpointParam) DeepCopy() *OAuth2EndpointParam { - if in == nil { - return nil - } - out := new(OAuth2EndpointParam) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftStateMetricsConfig) DeepCopyInto(out *OpenShiftStateMetricsConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftStateMetricsConfig. -func (in *OpenShiftStateMetricsConfig) DeepCopy() *OpenShiftStateMetricsConfig { - if in == nil { - return nil - } - out := new(OpenShiftStateMetricsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKI) DeepCopyInto(out *PKI) { - *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 PKI. -func (in *PKI) DeepCopy() *PKI { - if in == nil { - return nil - } - out := new(PKI) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PKI) 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 *PKICertificateManagement) DeepCopyInto(out *PKICertificateManagement) { - *out = *in - out.Custom = in.Custom - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKICertificateManagement. -func (in *PKICertificateManagement) DeepCopy() *PKICertificateManagement { - if in == nil { - return nil - } - out := new(PKICertificateManagement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKIList) DeepCopyInto(out *PKIList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PKI, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKIList. -func (in *PKIList) DeepCopy() *PKIList { - if in == nil { - return nil - } - out := new(PKIList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PKIList) 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 *PKIProfile) DeepCopyInto(out *PKIProfile) { - *out = *in - out.Defaults = in.Defaults - out.SignerCertificates = in.SignerCertificates - out.ServingCertificates = in.ServingCertificates - out.ClientCertificates = in.ClientCertificates - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKIProfile. -func (in *PKIProfile) DeepCopy() *PKIProfile { - if in == nil { - return nil - } - out := new(PKIProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PKISpec) DeepCopyInto(out *PKISpec) { - *out = *in - out.CertificateManagement = in.CertificateManagement - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PKISpec. -func (in *PKISpec) DeepCopy() *PKISpec { - if in == nil { - return nil - } - out := new(PKISpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimReference) DeepCopyInto(out *PersistentVolumeClaimReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimReference. -func (in *PersistentVolumeClaimReference) DeepCopy() *PersistentVolumeClaimReference { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeConfig) DeepCopyInto(out *PersistentVolumeConfig) { - *out = *in - out.Claim = in.Claim - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeConfig. -func (in *PersistentVolumeConfig) DeepCopy() *PersistentVolumeConfig { - if in == nil { - return nil - } - out := new(PersistentVolumeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusConfig) DeepCopyInto(out *PrometheusConfig) { - *out = *in - if in.AdditionalAlertmanagerConfigs != nil { - in, out := &in.AdditionalAlertmanagerConfigs, &out.AdditionalAlertmanagerConfigs - *out = make([]AdditionalAlertmanagerConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ExternalLabels != nil { - in, out := &in.ExternalLabels, &out.ExternalLabels - *out = make([]Label, len(*in)) - copy(*out, *in) - } - 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.RemoteWrite != nil { - in, out := &in.RemoteWrite, &out.RemoteWrite - *out = make([]RemoteWriteSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Retention = in.Retention - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VolumeClaimTemplate != nil { - in, out := &in.VolumeClaimTemplate, &out.VolumeClaimTemplate - *out = new(v1.PersistentVolumeClaim) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusConfig. -func (in *PrometheusConfig) DeepCopy() *PrometheusConfig { - if in == nil { - return nil - } - out := new(PrometheusConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusOperatorAdmissionWebhookConfig) DeepCopyInto(out *PrometheusOperatorAdmissionWebhookConfig) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusOperatorAdmissionWebhookConfig. -func (in *PrometheusOperatorAdmissionWebhookConfig) DeepCopy() *PrometheusOperatorAdmissionWebhookConfig { - if in == nil { - return nil - } - out := new(PrometheusOperatorAdmissionWebhookConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusOperatorConfig) DeepCopyInto(out *PrometheusOperatorConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusOperatorConfig. -func (in *PrometheusOperatorConfig) DeepCopy() *PrometheusOperatorConfig { - if in == nil { - return nil - } - out := new(PrometheusOperatorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusRemoteWriteHeader) DeepCopyInto(out *PrometheusRemoteWriteHeader) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRemoteWriteHeader. -func (in *PrometheusRemoteWriteHeader) DeepCopy() *PrometheusRemoteWriteHeader { - if in == nil { - return nil - } - out := new(PrometheusRemoteWriteHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *QueueConfig) DeepCopyInto(out *QueueConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueConfig. -func (in *QueueConfig) DeepCopy() *QueueConfig { - if in == nil { - return nil - } - out := new(QueueConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RSAKeyConfig) DeepCopyInto(out *RSAKeyConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RSAKeyConfig. -func (in *RSAKeyConfig) DeepCopy() *RSAKeyConfig { - if in == nil { - return nil - } - out := new(RSAKeyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RelabelActionConfig) DeepCopyInto(out *RelabelActionConfig) { - *out = *in - in.Replace.DeepCopyInto(&out.Replace) - out.HashMod = in.HashMod - out.LabelMap = in.LabelMap - out.Lowercase = in.Lowercase - out.Uppercase = in.Uppercase - out.KeepEqual = in.KeepEqual - out.DropEqual = in.DropEqual - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelActionConfig. -func (in *RelabelActionConfig) DeepCopy() *RelabelActionConfig { - if in == nil { - return nil - } - out := new(RelabelActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig) { - *out = *in - if in.SourceLabels != nil { - in, out := &in.SourceLabels, &out.SourceLabels - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Action.DeepCopyInto(&out.Action) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelConfig. -func (in *RelabelConfig) DeepCopy() *RelabelConfig { - if in == nil { - return nil - } - out := new(RelabelConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoteWriteAuthorization) DeepCopyInto(out *RemoteWriteAuthorization) { - *out = *in - out.Authorization = in.Authorization - out.BasicAuth = in.BasicAuth - in.OAuth2.DeepCopyInto(&out.OAuth2) - out.Sigv4 = in.Sigv4 - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteAuthorization. -func (in *RemoteWriteAuthorization) DeepCopy() *RemoteWriteAuthorization { - if in == nil { - return nil - } - out := new(RemoteWriteAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec) { - *out = *in - in.AuthorizationConfig.DeepCopyInto(&out.AuthorizationConfig) - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]PrometheusRemoteWriteHeader, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.MetadataConfig = in.MetadataConfig - out.QueueConfig = in.QueueConfig - out.TLSConfig = in.TLSConfig - if in.WriteRelabelConfigs != nil { - in, out := &in.WriteRelabelConfigs, &out.WriteRelabelConfigs - *out = make([]RelabelConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteSpec. -func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec { - if in == nil { - return nil - } - out := new(RemoteWriteSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplaceActionConfig) DeepCopyInto(out *ReplaceActionConfig) { - *out = *in - if in.Replacement != nil { - in, out := &in.Replacement, &out.Replacement - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplaceActionConfig. -func (in *ReplaceActionConfig) DeepCopy() *ReplaceActionConfig { - if in == nil { - return nil - } - out := new(ReplaceActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Retention) DeepCopyInto(out *Retention) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Retention. -func (in *Retention) DeepCopy() *Retention { - if in == nil { - return nil - } - out := new(Retention) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RetentionNumberConfig) DeepCopyInto(out *RetentionNumberConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionNumberConfig. -func (in *RetentionNumberConfig) DeepCopy() *RetentionNumberConfig { - if in == nil { - return nil - } - out := new(RetentionNumberConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RetentionPolicy) DeepCopyInto(out *RetentionPolicy) { - *out = *in - if in.RetentionNumber != nil { - in, out := &in.RetentionNumber, &out.RetentionNumber - *out = new(RetentionNumberConfig) - **out = **in - } - if in.RetentionSize != nil { - in, out := &in.RetentionSize, &out.RetentionSize - *out = new(RetentionSizeConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionPolicy. -func (in *RetentionPolicy) DeepCopy() *RetentionPolicy { - if in == nil { - return nil - } - out := new(RetentionPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RetentionSizeConfig) DeepCopyInto(out *RetentionSizeConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RetentionSizeConfig. -func (in *RetentionSizeConfig) DeepCopy() *RetentionSizeConfig { - if in == nil { - return nil - } - out := new(RetentionSizeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretKeySelector. -func (in *SecretKeySelector) DeepCopy() *SecretKeySelector { - if in == nil { - return nil - } - out := new(SecretKeySelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Sigv4) DeepCopyInto(out *Sigv4) { - *out = *in - out.AccessKey = in.AccessKey - out.SecretKey = in.SecretKey - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sigv4. -func (in *Sigv4) DeepCopy() *Sigv4 { - if in == nil { - return nil - } - out := new(Sigv4) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Storage) DeepCopyInto(out *Storage) { - *out = *in - if in.PersistentVolume != nil { - in, out := &in.PersistentVolume, &out.PersistentVolume - *out = new(PersistentVolumeConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. -func (in *Storage) DeepCopy() *Storage { - if in == nil { - return nil - } - out := new(Storage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSConfig) DeepCopyInto(out *TLSConfig) { - *out = *in - out.CA = in.CA - out.Cert = in.Cert - out.Key = in.Key - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig. -func (in *TLSConfig) DeepCopy() *TLSConfig { - if in == nil { - return nil - } - out := new(TLSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TelemeterClientConfig) DeepCopyInto(out *TelemeterClientConfig) { - *out = *in - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TelemeterClientConfig. -func (in *TelemeterClientConfig) DeepCopy() *TelemeterClientConfig { - if in == nil { - return nil - } - out := new(TelemeterClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ThanosQuerierConfig) DeepCopyInto(out *ThanosQuerierConfig) { - *out = *in - out.RequestLogging = in.RequestLogging - 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.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]ContainerResource, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]v1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]v1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQuerierConfig. -func (in *ThanosQuerierConfig) DeepCopy() *ThanosQuerierConfig { - if in == nil { - return nil - } - out := new(ThanosQuerierConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ThanosQuerierRequestLoggingConfig) DeepCopyInto(out *ThanosQuerierRequestLoggingConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosQuerierRequestLoggingConfig. -func (in *ThanosQuerierRequestLoggingConfig) DeepCopy() *ThanosQuerierRequestLoggingConfig { - if in == nil { - return nil - } - out := new(ThanosQuerierRequestLoggingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UppercaseActionConfig) DeepCopyInto(out *UppercaseActionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UppercaseActionConfig. -func (in *UppercaseActionConfig) DeepCopy() *UppercaseActionConfig { - if in == nil { - return nil - } - out := new(UppercaseActionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserDefinedMonitoring) DeepCopyInto(out *UserDefinedMonitoring) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserDefinedMonitoring. -func (in *UserDefinedMonitoring) DeepCopy() *UserDefinedMonitoring { - if in == nil { - return nil - } - out := new(UserDefinedMonitoring) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index b2a124193..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,116 +0,0 @@ -backups.config.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1482 - CRDName: backups.config.openshift.io - Capability: "" - Category: "" - FeatureGates: - - AutomatedEtcdBackup - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: true - KindName: Backup - Labels: {} - PluralName: backups - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - AutomatedEtcdBackup - Version: v1alpha1 - -criocredentialproviderconfigs.config.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2557 - CRDName: criocredentialproviderconfigs.config.openshift.io - Capability: "" - Category: "" - FeatureGates: - - CRIOCredentialProviderConfig - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: true - KindName: CRIOCredentialProviderConfig - Labels: {} - PluralName: criocredentialproviderconfigs - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - CRIOCredentialProviderConfig - Version: v1alpha1 - -clustermonitorings.config.openshift.io: - Annotations: - description: Cluster Monitoring Operators configuration API - ApprovedPRNumber: https://github.com/openshift/api/pull/1929 - CRDName: clustermonitorings.config.openshift.io - Capability: "" - Category: "" - FeatureGates: - - ClusterMonitoringConfig - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: true - KindName: ClusterMonitoring - Labels: {} - PluralName: clustermonitorings - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - ClusterMonitoringConfig - Version: v1alpha1 - -insightsdatagathers.config.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1245 - CRDName: insightsdatagathers.config.openshift.io - Capability: Insights - Category: "" - FeatureGates: - - InsightsConfig - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: true - KindName: InsightsDataGather - Labels: {} - PluralName: insightsdatagathers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - InsightsConfig - Version: v1alpha1 - -pkis.config.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2645 - CRDName: pkis.config.openshift.io - Capability: "" - Category: "" - FeatureGates: - - ConfigurablePKI - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: false - KindName: PKI - Labels: {} - PluralName: pkis - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - ConfigurablePKI - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 36a7803bf..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,461 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdditionalAlertmanagerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.AdditionalAlertmanagerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertmanagerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.AlertmanagerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertmanagerCustomConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.AlertmanagerCustomConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Audit) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Audit" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthorizationConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.AuthorizationConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Backup) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Backup" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BackupList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.BackupList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BackupSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.BackupSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BackupStatus) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.BackupStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BasicAuth) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.BasicAuth" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CRIOCredentialProviderConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CRIOCredentialProviderConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CRIOCredentialProviderConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CRIOCredentialProviderConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CertificateConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CertificateConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterMonitoring) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ClusterMonitoring" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterMonitoringList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ClusterMonitoringList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterMonitoringSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ClusterMonitoringSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterMonitoringStatus) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ClusterMonitoringStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ContainerResource) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ContainerResource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomPKIPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.CustomPKIPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DefaultCertificateConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.DefaultCertificateConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DropEqualActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.DropEqualActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ECDSAKeyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ECDSAKeyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdBackupSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.EtcdBackupSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GatherConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.GatherConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HashModActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.HashModActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGather) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.InsightsDataGather" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.InsightsDataGatherList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.InsightsDataGatherSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherStatus) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.InsightsDataGatherStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KeepEqualActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.KeepEqualActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KeyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.KeyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStateMetricsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.KubeStateMetricsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStateMetricsResourceLabels) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.KubeStateMetricsResourceLabels" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Label) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Label" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LabelMapActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.LabelMapActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LowercaseActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.LowercaseActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MetadataConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.MetadataConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MetadataConfigCustom) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.MetadataConfigCustom" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MetricsServerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.MetricsServerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MonitoringPluginConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.MonitoringPluginConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorBuddyInfoConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorBuddyInfoConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorCpufreqConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorEthtoolConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorKSMDConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorKSMDConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorMountStatsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorMountStatsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorNetClassCollectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassCollectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorNetClassConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorNetDevConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetDevConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorProcessesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorProcessesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorSoftirqsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSoftirqsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorSystemdCollectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdCollectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorSystemdConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterCollectorTcpStatConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeExporterConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.NodeExporterConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuth2) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.OAuth2" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuth2EndpointParam) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.OAuth2EndpointParam" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftStateMetricsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.OpenShiftStateMetricsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PKI) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PKI" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PKICertificateManagement) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PKICertificateManagement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PKIList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PKIList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PKIProfile) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PKIProfile" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PKISpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PKISpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PersistentVolumeClaimReference) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PersistentVolumeClaimReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PersistentVolumeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PersistentVolumeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrometheusConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PrometheusConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrometheusOperatorAdmissionWebhookConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PrometheusOperatorAdmissionWebhookConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrometheusOperatorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PrometheusOperatorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrometheusRemoteWriteHeader) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.PrometheusRemoteWriteHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in QueueConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.QueueConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RSAKeyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RSAKeyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RelabelActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RelabelActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RelabelConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RelabelConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RemoteWriteAuthorization) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RemoteWriteSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RemoteWriteSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ReplaceActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ReplaceActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Retention) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Retention" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RetentionNumberConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RetentionNumberConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RetentionPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RetentionPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RetentionSizeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.RetentionSizeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretKeySelector) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.SecretKeySelector" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Sigv4) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Sigv4" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Storage) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.Storage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TLSConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.TLSConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TelemeterClientConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.TelemeterClientConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ThanosQuerierConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ThanosQuerierConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ThanosQuerierRequestLoggingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.ThanosQuerierRequestLoggingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UppercaseActionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.UppercaseActionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserDefinedMonitoring) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha1.UserDefinedMonitoring" -} diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 8f6cda191..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,975 +0,0 @@ -package v1alpha1 - -// 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_Backup = map[string]string{ - "": "\n\nBackup provides configuration for performing backups of the openshift cluster.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Backup) SwaggerDoc() map[string]string { - return map_Backup -} - -var map_BackupList = map[string]string{ - "": "BackupList is a collection of items\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (BackupList) SwaggerDoc() map[string]string { - return map_BackupList -} - -var map_BackupSpec = map[string]string{ - "etcd": "etcd specifies the configuration for periodic backups of the etcd cluster", -} - -func (BackupSpec) SwaggerDoc() map[string]string { - return map_BackupSpec -} - -var map_EtcdBackupSpec = map[string]string{ - "": "EtcdBackupSpec provides configuration for automated etcd backups to the cluster-etcd-operator", - "schedule": "schedule defines the recurring backup schedule in Cron format every 2 hours: 0 */2 * * * every day at 3am: 0 3 * * * Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is \"no backups\", but will change in the future.", - "timeZone": "The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. If not specified, this will default to the time zone of the kube-controller-manager process. See https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones", - "retentionPolicy": "retentionPolicy defines the retention policy for retaining and deleting existing backups.", - "pvcName": "pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup files would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", -} - -func (EtcdBackupSpec) SwaggerDoc() map[string]string { - return map_EtcdBackupSpec -} - -var map_RetentionNumberConfig = map[string]string{ - "": "RetentionNumberConfig specifies the configuration of the retention policy on the number of backups", - "maxNumberOfBackups": "maxNumberOfBackups defines the maximum number of backups to retain. If the existing number of backups saved is equal to MaxNumberOfBackups then the oldest backup will be removed before a new backup is initiated.", -} - -func (RetentionNumberConfig) SwaggerDoc() map[string]string { - return map_RetentionNumberConfig -} - -var map_RetentionPolicy = map[string]string{ - "": "RetentionPolicy defines the retention policy for retaining and deleting existing backups. This struct is a discriminated union that allows users to select the type of retention policy from the supported types.", - "retentionType": "retentionType sets the type of retention policy. Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. The current default is RetentionNumber with 15 backups kept.", - "retentionNumber": "retentionNumber configures the retention policy based on the number of backups", - "retentionSize": "retentionSize configures the retention policy based on the size of backups", -} - -func (RetentionPolicy) SwaggerDoc() map[string]string { - return map_RetentionPolicy -} - -var map_RetentionSizeConfig = map[string]string{ - "": "RetentionSizeConfig specifies the configuration of the retention policy on the total size of backups", - "maxSizeOfBackupsGb": "maxSizeOfBackupsGb defines the total size in GB of backups to retain. If the current total size backups exceeds MaxSizeOfBackupsGb then the oldest backup will be removed before a new backup is initiated.", -} - -func (RetentionSizeConfig) SwaggerDoc() map[string]string { - return map_RetentionSizeConfig -} - -var map_AdditionalAlertmanagerConfig = map[string]string{ - "": "AdditionalAlertmanagerConfig represents configuration for additional Alertmanager instances. The `AdditionalAlertmanagerConfig` resource defines settings for how a component communicates with additional Alertmanager instances.", - "name": "name is a unique identifier for this Alertmanager configuration entry. The name must be a valid DNS subdomain (RFC 1123): lowercase alphanumeric characters, hyphens, or periods, and must start and end with an alphanumeric character. Minimum length is 1 character (empty string is invalid). Maximum length is 253 characters.", - "authorization": "authorization configures the authentication method for Alertmanager connections. Supports bearer token authentication. When omitted, no authentication is used.", - "pathPrefix": "pathPrefix defines an optional URL path prefix to prepend to the Alertmanager API endpoints. For example, if your Alertmanager is behind a reverse proxy at \"/alertmanager/\", set this to \"/alertmanager\" so requests go to \"/alertmanager/api/v1/alerts\" instead of \"/api/v1/alerts\". This is commonly needed when Alertmanager is deployed behind ingress controllers or load balancers. When no prefix is needed, omit this field; do not set it to \"/\" as that would produce paths with double slashes (e.g. \"//api/v1/alerts\"). Must start with \"/\", must not end with \"/\", and must not be exactly \"/\". Must not contain query strings (\"?\") or fragments (\"#\").", - "scheme": "scheme defines the URL scheme to use when communicating with Alertmanager instances. Possible values are `HTTP` or `HTTPS`. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is `HTTP`.", - "staticConfigs": "staticConfigs is a list of statically configured Alertmanager endpoints in the form of `:`. Each entry must be a valid hostname, IPv4 address, or IPv6 address (in brackets) followed by a colon and a valid port number (1-65535). Examples: \"alertmanager.example.com:9093\", \"192.168.1.100:9093\", \"[::1]:9093\" At least one endpoint must be specified (minimum 1, maximum 10 endpoints). Each entry must be unique and non-empty (empty string is invalid).", - "timeoutSeconds": "timeoutSeconds defines the timeout in seconds for requests to Alertmanager. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Currently the default is 10 seconds. Minimum value is 1 second. Maximum value is 600 seconds (10 minutes).", - "tlsConfig": "tlsConfig defines the TLS settings to use for Alertmanager connections. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", -} - -func (AdditionalAlertmanagerConfig) SwaggerDoc() map[string]string { - return map_AdditionalAlertmanagerConfig -} - -var map_AlertmanagerConfig = map[string]string{ - "": "alertmanagerConfig provides configuration options for the default Alertmanager instance that runs in the `openshift-monitoring` namespace. Use this configuration to control whether the default Alertmanager is deployed, how it logs, and how its pods are scheduled.", - "deploymentMode": "deploymentMode determines whether the default Alertmanager instance should be deployed as part of the monitoring stack. Allowed values are Disabled, DefaultConfig, and CustomConfig. When set to Disabled, the Alertmanager instance will not be deployed. When set to DefaultConfig, the platform will deploy Alertmanager with default settings. When set to CustomConfig, the Alertmanager will be deployed with custom configuration.", - "customConfig": "customConfig must be set when deploymentMode is CustomConfig, and must be unset otherwise. When set to CustomConfig, the Alertmanager will be deployed with custom configuration.", -} - -func (AlertmanagerConfig) SwaggerDoc() map[string]string { - return map_AlertmanagerConfig -} - -var map_AlertmanagerCustomConfig = map[string]string{ - "": "AlertmanagerCustomConfig represents the configuration for a custom Alertmanager deployment. alertmanagerCustomConfig provides configuration options for the default Alertmanager instance that runs in the `openshift-monitoring` namespace. Use this configuration to control whether user-defined namespaces are selected for AlertmanagerConfig lookups, how it logs, and how its pods are scheduled.", - "userAlertmanagerConfigSelection": "userAlertmanagerConfigSelection is an optional field that controls whether user-defined namespaces can be selected for AlertmanagerConfig lookups on the platform Alertmanager instance in the `openshift-monitoring` namespace. Valid values are Selectable and None. When set to Selectable, the platform Alertmanager discovers AlertmanagerConfig resources in user-defined namespaces. This is equivalent to `enableUserAlertmanagerConfig: true` in the cluster-monitoring-config ConfigMap. When set to None, user-defined namespaces are not selected for AlertmanagerConfig lookups on the platform Alertmanager. This is equivalent to `enableUserAlertmanagerConfig: false` in the cluster-monitoring-config ConfigMap. This setting only applies when the user-workload monitoring Alertmanager is not enabled. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is `None`.", - "logLevel": "logLevel defines the verbosity of logs emitted by Alertmanager. This field allows users to control the amount and severity of logs generated, which can be useful for debugging issues or reducing noise in production environments. Allowed values are Error, Warn, Info, and Debug. When set to Error, only errors will be logged. When set to Warn, both warnings and errors will be logged. When set to Info, general information, warnings, and errors will all be logged. When set to Debug, detailed debugging information will be logged. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `Info`.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`.", - "resources": "resources defines the compute resource requests and limits for the Alertmanager container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 4m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "secrets": "secrets defines a list of secrets that need to be mounted into the Alertmanager. The secrets must reside within the same namespace as the Alertmanager object. They will be added as volumes named secret- and mounted at /etc/alertmanager/secrets/ within the 'alertmanager' container of the Alertmanager Pods.\n\nThese secrets can be used to authenticate Alertmanager with endpoint receivers. For example, you can use secrets to: - Provide certificates for TLS authentication with receivers that require private CA certificates - Store credentials for Basic HTTP authentication with receivers that require password-based auth - Store any other authentication credentials needed by your alert receivers\n\nThis field is optional. Maximum length for this list is 10. Minimum length for this list is 1. Entries in this list must be unique.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Alertmanager Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", - "volumeClaimTemplate": "volumeClaimTemplate defines persistent storage for Alertmanager. Use this setting to configure the persistent volume claim, including storage class and volume size. If omitted, the Pod uses ephemeral storage and alert data will not persist across restarts.", -} - -func (AlertmanagerCustomConfig) SwaggerDoc() map[string]string { - return map_AlertmanagerCustomConfig -} - -var map_Audit = map[string]string{ - "": "Audit profile configurations", - "profile": "profile is a required field for configuring the audit log level of the Kubernetes Metrics Server. Allowed values are None, Metadata, Request, or RequestResponse. When set to None, audit logging is disabled and no audit events are recorded. When set to Metadata, only request metadata (such as requesting user, timestamp, resource, verb, etc.) is logged, but not the request or response body. When set to Request, event metadata and the request body are logged, but not the response body. When set to RequestResponse, event metadata, request body, and response body are all logged, providing the most detailed audit information.\n\nSee: https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy for more information about auditing and log levels.", -} - -func (Audit) SwaggerDoc() map[string]string { - return map_Audit -} - -var map_AuthorizationConfig = map[string]string{ - "": "AuthorizationConfig defines the authentication method for Alertmanager connections.", - "type": "type specifies the authentication type to use. Valid value is \"BearerToken\" (bearer token authentication). When set to BearerToken, the bearerToken field must be specified.", - "bearerToken": "bearerToken defines the secret reference containing the bearer token. Required when type is \"BearerToken\", and forbidden otherwise. The secret must exist in the openshift-monitoring namespace.", -} - -func (AuthorizationConfig) SwaggerDoc() map[string]string { - return map_AuthorizationConfig -} - -var map_BasicAuth = map[string]string{ - "": "BasicAuth defines basic authentication settings for the remote write endpoint URL.", - "username": "username defines the secret reference containing the username for basic authentication. The secret must exist in the openshift-monitoring namespace.", - "password": "password defines the secret reference containing the password for basic authentication. The secret must exist in the openshift-monitoring namespace.", -} - -func (BasicAuth) SwaggerDoc() map[string]string { - return map_BasicAuth -} - -var map_ClusterMonitoring = map[string]string{ - "": "ClusterMonitoring is the Custom Resource object which holds the current status of Cluster Monitoring Operator. CMO is a central component of the monitoring stack.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. ClusterMonitoring is the Schema for the Cluster Monitoring Operators API", - "metadata": "metadata is the standard object metadata.", - "spec": "spec holds user configuration for the Cluster Monitoring Operator", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (ClusterMonitoring) SwaggerDoc() map[string]string { - return map_ClusterMonitoring -} - -var map_ClusterMonitoringList = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list metadata.", - "items": "items is a list of ClusterMonitoring", -} - -func (ClusterMonitoringList) SwaggerDoc() map[string]string { - return map_ClusterMonitoringList -} - -var map_ClusterMonitoringSpec = map[string]string{ - "": "ClusterMonitoringSpec defines the desired state of Cluster Monitoring Operator", - "userDefined": "userDefined set the deployment mode for user-defined monitoring in addition to the default platform monitoring. userDefined is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is `Disabled`.", - "alertmanagerConfig": "alertmanagerConfig allows users to configure how the default Alertmanager instance should be deployed in the `openshift-monitoring` namespace. alertmanagerConfig is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `DefaultConfig`.", - "prometheusConfig": "prometheusConfig provides configuration options for the default platform Prometheus instance that runs in the `openshift-monitoring` namespace. This configuration applies only to the platform Prometheus instance; user-workload Prometheus instances are configured separately.\n\nThis field allows you to customize how the platform Prometheus is deployed and operated, including:\n - Pod scheduling (node selectors, tolerations, topology spread constraints)\n - Resource allocation (CPU, memory requests/limits)\n - Retention policies (how long metrics are stored)\n - External integrations (remote write, additional alertmanagers)\n\nThis field is optional. When omitted, the platform chooses reasonable defaults, which may change over time.", - "metricsServerConfig": "metricsServerConfig is an optional field that can be used to configure the Kubernetes Metrics Server that runs in the openshift-monitoring namespace. Specifically, it can configure how the Metrics Server instance is deployed, pod scheduling, its audit policy and log verbosity. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "prometheusOperatorConfig": "prometheusOperatorConfig is an optional field that can be used to configure the Prometheus Operator component. Specifically, it can configure how the Prometheus Operator instance is deployed, pod scheduling, and resource allocation. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "prometheusOperatorAdmissionWebhookConfig": "prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the admission webhook component of Prometheus Operator that runs in the openshift-monitoring namespace. The admission webhook validates PrometheusRule and AlertmanagerConfig objects to ensure they are semantically valid, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects between API versions. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "openShiftStateMetricsConfig": "openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics agent that runs in the openshift-monitoring namespace. The openshift-state-metrics agent generates metrics about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "telemeterClientConfig": "telemeterClientConfig is an optional field that can be used to configure the Telemeter Client component that runs in the openshift-monitoring namespace. The Telemeter Client collects selected monitoring metrics and forwards them to Red Hat for telemetry purposes. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. When set, at least one field must be specified within telemeterClientConfig.", - "thanosQuerierConfig": "thanosQuerierConfig is an optional field that can be used to configure the Thanos Querier component that runs in the openshift-monitoring namespace. The Thanos Querier provides a global query view by aggregating and deduplicating metrics from multiple Prometheus instances. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default deploys the Thanos Querier on linux nodes with 5m CPU and 12Mi memory requests, and no custom tolerations or topology spread constraints. When set, at least one field must be specified within thanosQuerierConfig.", - "nodeExporterConfig": "nodeExporterConfig is an optional field that can be used to configure the node-exporter agent that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "monitoringPluginConfig": "monitoringPluginConfig is an optional field that can be used to configure the monitoring plugin that runs as a dynamic plugin of the OpenShift web console. The monitoring plugin provides the monitoring UI in the OpenShift web console for visualizing metrics, alerts, and dashboards. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default deploys the monitoring-plugin as a single-replica Deployment on linux nodes with 10m CPU and 50Mi memory requests, and no custom tolerations or topology spread constraints. When set, at least one field must be specified within monitoringPluginConfig.", - "kubeStateMetricsConfig": "kubeStateMetricsConfig is an optional field that can be used to configure the kube-state-metrics agent that runs in the openshift-monitoring namespace. kube-state-metrics generates metrics about the state of Kubernetes objects such as Deployments, Nodes, and Pods. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", -} - -func (ClusterMonitoringSpec) SwaggerDoc() map[string]string { - return map_ClusterMonitoringSpec -} - -var map_ClusterMonitoringStatus = map[string]string{ - "": "ClusterMonitoringStatus defines the observed state of ClusterMonitoring", -} - -func (ClusterMonitoringStatus) SwaggerDoc() map[string]string { - return map_ClusterMonitoringStatus -} - -var map_ContainerResource = map[string]string{ - "": "ContainerResource defines a single resource requirement for a container.", - "name": "name of the resource (e.g. \"cpu\", \"memory\", \"hugepages-2Mi\"). This field is required. name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character.", - "request": "request is the minimum amount of the resource required (e.g. \"2Mi\", \"1Gi\"). This field is optional. When limit is specified, request cannot be greater than limit. The value must be greater than 0 when specified.", - "limit": "limit is the maximum amount of the resource allowed (e.g. \"2Mi\", \"1Gi\"). This field is optional. When request is specified, limit cannot be less than request. The value must be greater than 0 when specified.", -} - -func (ContainerResource) SwaggerDoc() map[string]string { - return map_ContainerResource -} - -var map_DropEqualActionConfig = map[string]string{ - "": "DropEqualActionConfig configures the DropEqual action. Drops targets for which the concatenated source_labels do match the value of target_label. Requires Prometheus >= v2.41.0.", - "targetLabel": "targetLabel is the label name whose value is compared to the concatenated source_labels; targets that match are dropped. Must be between 1 and 128 characters in length.", -} - -func (DropEqualActionConfig) SwaggerDoc() map[string]string { - return map_DropEqualActionConfig -} - -var map_HashModActionConfig = map[string]string{ - "": "HashModActionConfig configures the HashMod action. target_label is set to the modulus of a hash of the concatenated source_labels (target = hash % modulus).", - "targetLabel": "targetLabel is the label name where the hash modulus result is written. Must be between 1 and 128 characters in length.", - "modulus": "modulus is the divisor applied to the hash of the concatenated source label values (target = hash % modulus). Required when using the HashMod action so the intended behavior is explicit. Must be between 1 and 1000000.", -} - -func (HashModActionConfig) SwaggerDoc() map[string]string { - return map_HashModActionConfig -} - -var map_KeepEqualActionConfig = map[string]string{ - "": "KeepEqualActionConfig configures the KeepEqual action. Drops targets for which the concatenated source_labels do not match the value of target_label. Requires Prometheus >= v2.41.0.", - "targetLabel": "targetLabel is the label name whose value is compared to the concatenated source_labels; targets that do not match are dropped. Must be between 1 and 128 characters in length.", -} - -func (KeepEqualActionConfig) SwaggerDoc() map[string]string { - return map_KeepEqualActionConfig -} - -var map_KubeStateMetricsConfig = map[string]string{ - "": "KubeStateMetricsConfig provides configuration options for the kube-state-metrics agent that runs in the `openshift-monitoring` namespace. kube-state-metrics generates metrics about the state of Kubernetes objects such as Deployments, Nodes, and Pods.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the kube-state-metrics container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 4m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, no tolerations are applied. This default is subject to change over time. When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries. Each toleration's operator, when specified, must be either \"Exists\" or \"Equal\". Each toleration's effect, when specified, must be one of \"NoSchedule\", \"PreferNoSchedule\", or \"NoExecute\". An empty or unset effect means match all effects.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how kube-state-metrics Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nThis field maps directly to the `topologySpreadConstraints` field in the Pod spec. When omitted, no topology spread constraints are applied. This default is subject to change over time. When specified, topologySpreadConstraints must contain at least 1 entry and must not contain more than 10 entries. Entries must have unique topologyKey and whenUnsatisfiable pairs. Each entry's whenUnsatisfiable must be either \"DoNotSchedule\" or \"ScheduleAnyway\". Each entry's maxSkew must be at least 1. When minDomains is specified, it must be at least 1 and whenUnsatisfiable must be \"DoNotSchedule\".", - "additionalResourceLabels": "additionalResourceLabels defines additional Kubernetes resource labels to expose as metrics in kube-state-metrics. Currently, only \"Job\" and \"CronJob\" resources are supported due to cardinality concerns. Each entry specifies a resource name and a list of Kubernetes label names to expose. Use \"*\" in the labels list to expose all labels for a given resource. additionalResourceLabels is optional. When omitted, no additional Kubernetes object labels are exposed as metrics by kube-state-metrics beyond its built-in metric labels (e.g. namespace, job_name). Use this field to opt in to exposing specific Kubernetes labels as metric labels for the supported resource types. Minimum length for this list is 1. Maximum length for this list is 2. Each resource name must be unique within this list.", -} - -func (KubeStateMetricsConfig) SwaggerDoc() map[string]string { - return map_KubeStateMetricsConfig -} - -var map_KubeStateMetricsResourceLabels = map[string]string{ - "": "KubeStateMetricsResourceLabels defines which Kubernetes labels to expose as metrics for a given resource type in kube-state-metrics.", - "resource": "resource is the Kubernetes resource name whose labels should be exposed as metrics. Currently, only \"Job\" and \"CronJob\" are supported due to cardinality concerns. Valid values are \"Job\" and \"CronJob\". This field is required.", - "labels": "labels is the list of Kubernetes label names to expose as metrics for this resource. Use \"*\" to expose all labels for the specified resource. When \"*\" is specified, it must be the only entry in the list; mixing \"*\" with specific label names is not allowed. This field is required. Each label name must be unique within this list. Minimum length for this list is 1. Maximum length for this list is 50.", -} - -func (KubeStateMetricsResourceLabels) SwaggerDoc() map[string]string { - return map_KubeStateMetricsResourceLabels -} - -var map_Label = map[string]string{ - "": "Label represents a key/value pair for external labels.", - "key": "key is the name of the label. Prometheus supports UTF-8 label names, so any valid UTF-8 string is allowed. Must be between 1 and 128 characters in length.", - "value": "value is the value of the label. Must be between 1 and 128 characters in length.", -} - -func (Label) SwaggerDoc() map[string]string { - return map_Label -} - -var map_LabelMapActionConfig = map[string]string{ - "": "LabelMapActionConfig configures the LabelMap action. Regex is matched against all source label names (not just source_labels). Matching label values are copied to new label names given by replacement, with match group references (${1}, ${2}, ...) substituted.", - "replacement": "replacement is the template for new label names; match group references (${1}, ${2}, ...) are substituted from the matched label name. Required when using the LabelMap action so the intended behavior is explicit and the platform does not need to apply defaults. Use \"$1\" for the first capture group, \"$2\" for the second, etc. Must be between 1 and 255 characters in length. Empty string is invalid as it would produce invalid label names.", -} - -func (LabelMapActionConfig) SwaggerDoc() map[string]string { - return map_LabelMapActionConfig -} - -var map_LowercaseActionConfig = map[string]string{ - "": "LowercaseActionConfig configures the Lowercase action. Maps the concatenated source_labels to their lower case and writes to target_label. Requires Prometheus >= v2.36.0.", - "targetLabel": "targetLabel is the label name where the lower-cased value is written. Must be between 1 and 128 characters in length.", -} - -func (LowercaseActionConfig) SwaggerDoc() map[string]string { - return map_LowercaseActionConfig -} - -var map_MetadataConfig = map[string]string{ - "": "MetadataConfig defines whether and how to send series metadata to remote write storage.", - "sendPolicy": "sendPolicy specifies whether to send metadata and how it is configured. Default: send metadata using platform-chosen defaults (e.g. send interval 30 seconds). Custom: send metadata using the settings in the custom field.", - "custom": "custom defines custom metadata send settings. Required when sendPolicy is Custom (must have at least one property), and forbidden when sendPolicy is Default.", -} - -func (MetadataConfig) SwaggerDoc() map[string]string { - return map_MetadataConfig -} - -var map_MetadataConfigCustom = map[string]string{ - "": "MetadataConfigCustom defines custom settings for sending series metadata when sendPolicy is Custom. At least one property must be set when sendPolicy is Custom (e.g. sendIntervalSeconds).", - "sendIntervalSeconds": "sendIntervalSeconds is the interval in seconds at which metadata is sent. When omitted, the platform chooses a reasonable default (e.g. 30 seconds). Minimum value is 1 second. Maximum value is 86400 seconds (24 hours).", -} - -func (MetadataConfigCustom) SwaggerDoc() map[string]string { - return map_MetadataConfigCustom -} - -var map_MetricsServerConfig = map[string]string{ - "": "MetricsServerConfig provides configuration options for the Metrics Server instance that runs in the `openshift-monitoring` namespace. Use this configuration to control how the Metrics Server instance is deployed, how it logs, and how its pods are scheduled.", - "audit": "audit defines the audit configuration used by the Metrics Server instance. audit is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default sets audit.profile to Metadata", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "verbosity": "verbosity defines the verbosity of log messages for Metrics Server. Valid values are Errors, Info, Trace, TraceAll and omitted. When set to Errors, only critical messages and errors are logged. When set to Info, only basic information messages are logged. When set to Trace, information useful for general debugging is logged. When set to TraceAll, detailed information about metric scraping is logged. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `Errors`", - "resources": "resources defines the compute resource requests and limits for the Metrics Server container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 4m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Metrics Server Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (MetricsServerConfig) SwaggerDoc() map[string]string { - return map_MetricsServerConfig -} - -var map_MonitoringPluginConfig = map[string]string{ - "": "MonitoringPluginConfig provides configuration options for the monitoring plugin that runs as a dynamic plugin of the OpenShift web console. The monitoring plugin provides the monitoring UI in the OpenShift web console for visualizing metrics, alerts, and dashboards. At least one field must be specified; an empty monitoringPluginConfig object is not allowed.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the monitoring-plugin container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 10m\n - name: memory\n request: 50Mi\n\nWhen specified, resources must contain at least 1 entry and must not exceed 5 entries.", - "tolerations": "tolerations defines the tolerations required for the monitoring-plugin Pods. This field is optional.\n\nWhen omitted, the monitoring-plugin Pods will not have any tolerations, which means they will only be scheduled on nodes with no taints. When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how monitoring-plugin Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. When specified, this list must contain at least 1 entry and must not exceed 10 entries.", -} - -func (MonitoringPluginConfig) SwaggerDoc() map[string]string { - return map_MonitoringPluginConfig -} - -var map_NodeExporterCollectorBuddyInfoConfig = map[string]string{ - "": "NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the buddyinfo collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the buddyinfo collector is active and memory fragmentation statistics are collected. When set to \"DoNotCollect\", the buddyinfo collector is inactive.", -} - -func (NodeExporterCollectorBuddyInfoConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorBuddyInfoConfig -} - -var map_NodeExporterCollectorConfig = map[string]string{ - "": "NodeExporterCollectorConfig defines settings for individual collectors of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. At least one collector must be specified.", - "cpuFreq": "cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. cpuFreq is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on many-core nodes when collectionPolicy is Collect.", - "tcpStat": "tcpStat configures the tcpstat collector, which collects TCP connection statistics. tcpStat is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable when debugging TCP connection behavior or capacity at the node level.", - "ethtool": "ethtool configures the ethtool collector, which collects ethernet device statistics. ethtool is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters.", - "netDev": "netDev configures the netdev collector, which collects network device statistics. netDev is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled. Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces.", - "netClass": "netClass configures the netclass collector, which collects information about network devices. netClass is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is enabled with netlink mode active. Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning.", - "buddyInfo": "buddyInfo configures the buddyinfo collector, which collects statistics about memory fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. buddyInfo is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only.", - "mountStats": "mountStats configures the mountstats collector, which collects statistics about NFS volume I/O activities. mountStats is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you care about per-mount NFS client statistics.", - "ksmd": "ksmd configures the ksmd collector, which collects statistics from the kernel same-page merger daemon. ksmd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable on nodes where KSM is in use and you want visibility into merging activity.", - "processes": "processes configures the processes collector, which collects statistics from processes and threads running in the system. processes is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable for process/thread-level insight; can be expensive on busy nodes.", - "systemd": "systemd configures the systemd collector, which collects statistics on the systemd daemon and its managed services. systemd is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. Enable when you need metrics for specific units; scope units carefully.", - "softirqs": "softirqs configures the softirqs collector, which exposes detailed softirq statistics from /proc/softirqs. softirqs is optional. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is disabled. Enable when you need visibility into kernel softirq processing across CPUs.", -} - -func (NodeExporterCollectorConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorConfig -} - -var map_NodeExporterCollectorCpufreqConfig = map[string]string{ - "": "NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the cpufreq collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the cpufreq collector is active and CPU frequency statistics are collected. When set to \"DoNotCollect\", the cpufreq collector is inactive.", -} - -func (NodeExporterCollectorCpufreqConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorCpufreqConfig -} - -var map_NodeExporterCollectorEthtoolConfig = map[string]string{ - "": "NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector of the node-exporter agent. The ethtool collector collects ethernet device statistics. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the ethtool collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ethtool collector is active and ethernet device statistics are collected. When set to \"DoNotCollect\", the ethtool collector is inactive.", -} - -func (NodeExporterCollectorEthtoolConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorEthtoolConfig -} - -var map_NodeExporterCollectorKSMDConfig = map[string]string{ - "": "NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector of the node-exporter agent. The ksmd collector collects statistics from the kernel same-page merger daemon. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the ksmd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the ksmd collector is active and kernel same-page merger statistics are collected. When set to \"DoNotCollect\", the ksmd collector is inactive.", -} - -func (NodeExporterCollectorKSMDConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorKSMDConfig -} - -var map_NodeExporterCollectorMountStatsConfig = map[string]string{ - "": "NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. It is disabled by default. Enabling this collector may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage.", - "collectionPolicy": "collectionPolicy declares whether the mountstats collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the mountstats collector is active and NFS volume I/O statistics are collected. When set to \"DoNotCollect\", the mountstats collector is inactive.", -} - -func (NodeExporterCollectorMountStatsConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorMountStatsConfig -} - -var map_NodeExporterCollectorNetClassCollectConfig = map[string]string{ - "": "NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector when it is actively collecting metrics. At least one field must be specified.", - "statsGatherer": "statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). statsGatherer is optional. Valid values are \"Sysfs\" and \"Netlink\". When set to \"Netlink\", the netlink implementation is used; when set to \"Sysfs\", the sysfs implementation is used. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is Netlink.", -} - -func (NodeExporterCollectorNetClassCollectConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorNetClassCollectConfig -} - -var map_NodeExporterCollectorNetClassConfig = map[string]string{ - "": "NodeExporterCollectorNetClassConfig provides configuration for the netclass collector of the node-exporter agent. The netclass collector collects information about network devices such as network speed, MTU, and carrier status. It is enabled by default. When collectionPolicy is DoNotCollect, the collect field must not be set.", - "collectionPolicy": "collectionPolicy declares whether the netclass collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netclass collector is active and network class information is collected. When set to \"DoNotCollect\", the netclass collector is inactive and the corresponding metrics become unavailable. When set to \"DoNotCollect\", the collect field must not be set.", - "collect": "collect contains configuration options that apply only when the netclass collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. collect may only be set when collectionPolicy is Collect. When set, at least one field must be specified within collect.", -} - -func (NodeExporterCollectorNetClassConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorNetClassConfig -} - -var map_NodeExporterCollectorNetDevConfig = map[string]string{ - "": "NodeExporterCollectorNetDevConfig provides configuration for the netdev collector of the node-exporter agent. The netdev collector collects network device statistics such as bytes, packets, errors, and drops per device. It is enabled by default.", - "collectionPolicy": "collectionPolicy declares whether the netdev collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the netdev collector is active and network device statistics are collected. When set to \"DoNotCollect\", the netdev collector is inactive and the corresponding metrics become unavailable.", -} - -func (NodeExporterCollectorNetDevConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorNetDevConfig -} - -var map_NodeExporterCollectorProcessesConfig = map[string]string{ - "": "NodeExporterCollectorProcessesConfig provides configuration for the processes collector of the node-exporter agent. The processes collector collects statistics from processes and threads running in the system. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the processes collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the processes collector is active and process/thread statistics are collected. When set to \"DoNotCollect\", the processes collector is inactive.", -} - -func (NodeExporterCollectorProcessesConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorProcessesConfig -} - -var map_NodeExporterCollectorSoftirqsConfig = map[string]string{ - "": "NodeExporterCollectorSoftirqsConfig provides configuration for the softirqs collector of the node-exporter agent. The softirqs collector exposes detailed softirq statistics from /proc/softirqs. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the softirqs collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the softirqs collector is active and softirq statistics are collected. When set to \"DoNotCollect\", the softirqs collector is inactive.", -} - -func (NodeExporterCollectorSoftirqsConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorSoftirqsConfig -} - -var map_NodeExporterCollectorSystemdCollectConfig = map[string]string{ - "": "NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector when it is actively collecting metrics. At least one field must be specified.", - "units": "units is a list of regular expression patterns that match systemd units to be included by the systemd collector. units is optional. By default, the list is empty, so the collector exposes no metrics for systemd units. Each entry is a regular expression pattern and must be at least 1 character and at most 1024 characters. Maximum length for this list is 50. Minimum length for this list is 1. Entries in this list must be unique.", -} - -func (NodeExporterCollectorSystemdCollectConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorSystemdCollectConfig -} - -var map_NodeExporterCollectorSystemdConfig = map[string]string{ - "": "NodeExporterCollectorSystemdConfig provides configuration for the systemd collector of the node-exporter agent. The systemd collector collects statistics on the systemd daemon and its managed services. It is disabled by default. Enabling this collector with a long list of selected units may produce metrics with high cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment for excessive memory usage. When collectionPolicy is DoNotCollect, the collect field must not be set.", - "collectionPolicy": "collectionPolicy declares whether the systemd collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the systemd collector is active and systemd unit statistics are collected. When set to \"DoNotCollect\", the systemd collector is inactive and the collect field must not be set.", - "collect": "collect contains configuration options that apply only when the systemd collector is actively collecting metrics (i.e. when collectionPolicy is Collect). collect is optional and may be omitted even when collectionPolicy is Collect. collect may only be set when collectionPolicy is Collect. When set, at least one field must be specified within collect.", -} - -func (NodeExporterCollectorSystemdConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorSystemdConfig -} - -var map_NodeExporterCollectorTcpStatConfig = map[string]string{ - "": "NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector of the node-exporter agent. The tcpstat collector collects TCP connection statistics. It is disabled by default.", - "collectionPolicy": "collectionPolicy declares whether the tcpstat collector collects metrics. This field is required. Valid values are \"Collect\" and \"DoNotCollect\". When set to \"Collect\", the tcpstat collector is active and TCP connection statistics are collected. When set to \"DoNotCollect\", the tcpstat collector is inactive.", -} - -func (NodeExporterCollectorTcpStatConfig) SwaggerDoc() map[string]string { - return map_NodeExporterCollectorTcpStatConfig -} - -var map_NodeExporterConfig = map[string]string{ - "": "NodeExporterConfig provides configuration options for the node-exporter agent that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and network statistics. At least one field must be specified.", - "resources": "resources defines the compute resource requests and limits for the node-exporter container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 8m\n limit: null\n - name: memory\n request: 32Mi\n limit: null", - "collectors": "collectors configures which node-exporter metric collectors are enabled. collectors is optional. Each collector can be individually enabled or disabled. Some collectors may have additional configuration options.\n\nWhen omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "maxProcs": "maxProcs sets the target number of CPUs on which the node-exporter process will run. maxProcs is optional. Use this setting to override the default value, which is set either to 4 or to the number of CPUs on the host, whichever is smaller. The default value is computed at runtime and set via the GOMAXPROCS environment variable before node-exporter is launched. If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, you can change this value to 1, which limits node-exporter to running on one CPU. For nodes with a high CPU count, setting the limit to a low number saves resources by preventing Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the maxProcs value is set too low and there are many metrics to collect. The minimum value is 1 and the maximum value is 1024. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is min(4, number of host CPUs).", - "ignoredNetworkDevices": "ignoredNetworkDevices is a list of regular expression patterns that match network devices to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. ignoredNetworkDevices is optional.\n\nWhen omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded to minimize the impact on memory usage. When set as an empty list, no devices are excluded. If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. Maximum length for this list is 50. Each entry must be at least 1 character and at most 1024 characters long.", -} - -func (NodeExporterConfig) SwaggerDoc() map[string]string { - return map_NodeExporterConfig -} - -var map_OAuth2 = map[string]string{ - "": "OAuth2 defines OAuth2 authentication settings for the remote write endpoint.", - "clientId": "clientId defines the secret reference containing the OAuth2 client ID. The secret must exist in the openshift-monitoring namespace.", - "clientSecret": "clientSecret defines the secret reference containing the OAuth2 client secret. The secret must exist in the openshift-monitoring namespace.", - "tokenUrl": "tokenUrl is the URL to fetch the token from. Must be a valid URL with http or https scheme. Must be between 1 and 2048 characters in length.", - "scopes": "scopes is a list of OAuth2 scopes to request. When omitted, no scopes are requested. Maximum of 20 scopes can be specified. Each scope must be between 1 and 256 characters.", - "endpointParams": "endpointParams defines additional parameters to append to the token URL. When omitted, no additional parameters are sent. Maximum of 20 parameters can be specified. Entries must have unique names (name is the list key).", -} - -func (OAuth2) SwaggerDoc() map[string]string { - return map_OAuth2 -} - -var map_OAuth2EndpointParam = map[string]string{ - "": "OAuth2EndpointParam defines a name/value parameter for the OAuth2 token URL.", - "name": "name is the parameter name. Must be between 1 and 256 characters.", - "value": "value is the optional parameter value. When omitted, the query parameter is applied as ?name (no value). When set (including to the empty string), it is applied as ?name=value. Empty string may be used when the external system expects a parameter with an empty value (e.g. ?parameter=\"\"). Must be between 0 and 2048 characters when present (aligned with common URL length recommendations).", -} - -func (OAuth2EndpointParam) SwaggerDoc() map[string]string { - return map_OAuth2EndpointParam -} - -var map_OpenShiftStateMetricsConfig = map[string]string{ - "": "OpenShiftStateMetricsConfig provides configuration options for the openshift-state-metrics agent that runs in the `openshift-monitoring` namespace. The openshift-state-metrics agent generates metrics about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the openshift-state-metrics container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 1m\n limit: null\n - name: memory\n request: 32Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how openshift-state-metrics Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (OpenShiftStateMetricsConfig) SwaggerDoc() map[string]string { - return map_OpenShiftStateMetricsConfig -} - -var map_PrometheusConfig = map[string]string{ - "": "PrometheusConfig provides configuration options for the Prometheus instance. Use this configuration to control Prometheus deployment, pod scheduling, resource allocation, retention policies, and external integrations.", - "additionalAlertmanagerConfigs": "additionalAlertmanagerConfigs configures additional Alertmanager instances that receive alerts from the Prometheus component. This is useful for organizations that need to:\n - Send alerts to external monitoring systems (like PagerDuty, Slack, or custom webhooks)\n - Route different types of alerts to different teams or systems\n - Integrate with existing enterprise alerting infrastructure\n - Maintain separate alert routing for compliance or organizational requirements\nWhen omitted, no additional Alertmanager instances are configured (default behavior). When provided, at least one configuration must be specified (minimum 1, maximum 10 items). Entries must have unique names (name is the list key).", - "enforcedBodySizeLimitBytes": "enforcedBodySizeLimitBytes enforces a body size limit (in bytes) for Prometheus scraped metrics. If a scraped target's body response is larger than the limit, the scrape will fail. This helps protect Prometheus from targets that return excessively large responses. The value is specified in bytes (e.g., 4194304 for 4MB, 1073741824 for 1GB). When omitted, the Cluster Monitoring Operator automatically calculates an appropriate limit based on cluster capacity. Set an explicit value to override the automatic calculation. Minimum value is 10240 (10kB). Maximum value is 1073741824 (1GB).", - "externalLabels": "externalLabels defines labels to be attached to time series and alerts when communicating with external systems such as federation, remote storage, and Alertmanager. These labels are not stored with metrics on disk; they are only added when data leaves Prometheus (e.g., during federation queries, remote write, or alert notifications). At least 1 label must be specified when set, with a maximum of 50 labels allowed. Each label key must be unique within this list. When omitted, no external labels are applied.", - "logLevel": "logLevel defines the verbosity of logs emitted by Prometheus. This field allows users to control the amount and severity of logs generated, which can be useful for debugging issues or reducing noise in production environments. Allowed values are Error, Warn, Info, and Debug. When set to Error, only errors will be logged. When set to Warn, both warnings and errors will be logged. When set to Info, general information, warnings, and errors will all be logged. When set to Debug, detailed debugging information will be logged. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `Info`.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least one key-value pair (minimum of 1) and must not contain more than 10 entries.", - "queryLogFile": "queryLogFile specifies the file to which PromQL queries are logged. This setting can be either a filename, in which case the queries are saved to an `emptyDir` volume at `/var/log/prometheus`, or a full path to a location where an `emptyDir` volume will be mounted and the queries saved. Writing to `/dev/stderr`, `/dev/stdout` or `/dev/null` is supported, but writing to any other `/dev/` path is not supported. Relative paths are also not supported. By default, PromQL queries are not logged. Must be an absolute path starting with `/` or a simple filename without path separators. Must not contain consecutive slashes, end with a slash, or include '..' path traversal. Must contain only alphanumeric characters, '.', '_', '-', or '/'. Must be between 1 and 255 characters in length.", - "remoteWrite": "remoteWrite defines the remote write configuration, including URL, authentication, and relabeling settings. Remote write allows Prometheus to send metrics it collects to external long-term storage systems. When omitted, no remote write endpoints are configured. When provided, at least one configuration must be specified (minimum 1, maximum 10 items). Entries must have unique names (name is the list key).", - "resources": "resources defines the compute resource requests and limits for the Prometheus container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 4m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "retention": "retention configures how long Prometheus retains metrics data and how much storage it can use. When omitted, the platform chooses reasonable defaults (currently 15d retention, no size limit).", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10 Minimum length for this list is 1", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Prometheus Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1 Entries must have unique topologyKey and whenUnsatisfiable pairs.", - "collectionProfile": "collectionProfile defines the metrics collection profile that Prometheus uses to collect metrics from the platform components. Supported values are `Full` or `Minimal`. In the `Full` profile (default), Prometheus collects all metrics that are exposed by the platform components. In the `Minimal` profile, Prometheus only collects metrics necessary for the default platform alerts, recording rules, telemetry and console dashboards. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is `Full`.", - "volumeClaimTemplate": "volumeClaimTemplate defines persistent storage for Prometheus. Use this setting to configure the persistent volume claim, including storage class and volume size. If omitted, the Pod uses ephemeral storage and Prometheus data will not persist across restarts.", -} - -func (PrometheusConfig) SwaggerDoc() map[string]string { - return map_PrometheusConfig -} - -var map_PrometheusOperatorAdmissionWebhookConfig = map[string]string{ - "": "PrometheusOperatorAdmissionWebhookConfig provides configuration options for the admission webhook component of Prometheus Operator that runs in the `openshift-monitoring` namespace. The admission webhook validates PrometheusRule and AlertmanagerConfig objects, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects between API versions.", - "resources": "resources defines the compute resource requests and limits for the prometheus-operator-admission-webhook container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 5m\n limit: null\n - name: memory\n request: 30Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how admission webhook Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (PrometheusOperatorAdmissionWebhookConfig) SwaggerDoc() map[string]string { - return map_PrometheusOperatorAdmissionWebhookConfig -} - -var map_PrometheusOperatorConfig = map[string]string{ - "": "PrometheusOperatorConfig provides configuration options for the Prometheus Operator instance Use this configuration to control how the Prometheus Operator instance is deployed, how it logs, and how its pods are scheduled.", - "logLevel": "logLevel defines the verbosity of logs emitted by Prometheus Operator. This field allows users to control the amount and severity of logs generated, which can be useful for debugging issues or reducing noise in production environments. Allowed values are Error, Warn, Info, and Debug. When set to Error, only errors will be logged. When set to Warn, both warnings and errors will be logged. When set to Info, general information, warnings, and errors will all be logged. When set to Debug, detailed debugging information will be logged. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `Info`.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the Prometheus Operator container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 4m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Prometheus Operator Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (PrometheusOperatorConfig) SwaggerDoc() map[string]string { - return map_PrometheusOperatorConfig -} - -var map_PrometheusRemoteWriteHeader = map[string]string{ - "": "PrometheusRemoteWriteHeader defines a custom HTTP header for remote write requests. The header name must not be one of the reserved headers set by Prometheus (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate). Header names must contain only case-insensitive alphanumeric characters, hyphens (-), and underscores (_); other characters (e.g. emoji) are rejected by validation. Validation is enforced on the Headers field in RemoteWriteSpec.", - "name": "name is the HTTP header name. Must not be a reserved header (see type documentation). Must contain only alphanumeric characters, hyphens, and underscores; invalid characters are rejected. Must be between 1 and 256 characters.", - "value": "value is the HTTP header value. Must be at most 4096 characters.", -} - -func (PrometheusRemoteWriteHeader) SwaggerDoc() map[string]string { - return map_PrometheusRemoteWriteHeader -} - -var map_QueueConfig = map[string]string{ - "": "QueueConfig allows tuning configuration for remote write queue parameters. Configure this when you need to control throughput, backpressure, or retry behavior—for example to avoid overloading the remote endpoint, to reduce memory usage, or to tune for high-cardinality workloads. Consider capacity, maxShards, and batchSendDeadlineSeconds for throughput; minBackoffMilliseconds and maxBackoffMilliseconds for retries; and rateLimitedAction when the remote returns HTTP 429.", - "capacity": "capacity is the number of samples to buffer per shard before we start dropping them. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is 10000. Minimum value is 1. Maximum value is 1000000.", - "maxShards": "maxShards is the maximum number of shards, i.e. amount of concurrency. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is 200. Minimum value is 1. Maximum value is 10000.", - "minShards": "minShards is the minimum number of shards, i.e. amount of concurrency. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is 1. Minimum value is 1. Maximum value is 10000.", - "maxSamplesPerSend": "maxSamplesPerSend is the maximum number of samples per send. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is 1000. Minimum value is 1. Maximum value is 100000.", - "batchSendDeadlineSeconds": "batchSendDeadlineSeconds is the maximum time in seconds a sample will wait in buffer before being sent. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Minimum value is 1 second. Maximum value is 3600 seconds (1 hour).", - "minBackoffMilliseconds": "minBackoffMilliseconds is the minimum retry delay in milliseconds. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Minimum value is 1 millisecond. Maximum value is 3600000 milliseconds (1 hour).", - "maxBackoffMilliseconds": "maxBackoffMilliseconds is the maximum retry delay in milliseconds. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Minimum value is 1 millisecond. Maximum value is 3600000 milliseconds (1 hour).", - "rateLimitedAction": "rateLimitedAction controls what to do when the remote write endpoint returns HTTP 429 (Too Many Requests). When omitted, no retries are performed on rate limit responses. When set to \"Retry\", Prometheus will retry such requests using the backoff settings above. Valid value when set is \"Retry\".", -} - -func (QueueConfig) SwaggerDoc() map[string]string { - return map_QueueConfig -} - -var map_RelabelActionConfig = map[string]string{ - "": "RelabelActionConfig represents the action to perform and its configuration. Exactly one action-specific configuration must be specified based on the action type.", - "type": "type specifies the action to perform on the matched labels. Allowed values are Replace, Lowercase, Uppercase, Keep, Drop, KeepEqual, DropEqual, HashMod, LabelMap, LabelDrop, LabelKeep.\n\nWhen set to Replace, regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. If regex does not match, no replacement takes place.\n\nWhen set to Lowercase, the concatenated source_labels are mapped to their lower case. Requires Prometheus >= v2.36.0.\n\nWhen set to Uppercase, the concatenated source_labels are mapped to their upper case. Requires Prometheus >= v2.36.0.\n\nWhen set to Keep, targets for which regex does not match the concatenated source_labels are dropped.\n\nWhen set to Drop, targets for which regex matches the concatenated source_labels are dropped.\n\nWhen set to KeepEqual, targets for which the concatenated source_labels do not match target_label are dropped. Requires Prometheus >= v2.41.0.\n\nWhen set to DropEqual, targets for which the concatenated source_labels do match target_label are dropped. Requires Prometheus >= v2.41.0.\n\nWhen set to HashMod, target_label is set to the modulus of a hash of the concatenated source_labels.\n\nWhen set to LabelMap, regex is matched against all source label names (not just source_labels); matching label values are copied to new names given by replacement with ${1}, ${2}, ... substituted.\n\nWhen set to LabelDrop, regex is matched against all label names; any label that matches is removed.\n\nWhen set to LabelKeep, regex is matched against all label names; any label that does not match is removed.", - "replace": "replace configures the Replace action. Required when type is Replace, and forbidden otherwise.", - "hashMod": "hashMod configures the HashMod action. Required when type is HashMod, and forbidden otherwise.", - "labelMap": "labelMap configures the LabelMap action. Required when type is LabelMap, and forbidden otherwise.", - "lowercase": "lowercase configures the Lowercase action. Required when type is Lowercase, and forbidden otherwise. Requires Prometheus >= v2.36.0.", - "uppercase": "uppercase configures the Uppercase action. Required when type is Uppercase, and forbidden otherwise. Requires Prometheus >= v2.36.0.", - "keepEqual": "keepEqual configures the KeepEqual action. Required when type is KeepEqual, and forbidden otherwise. Requires Prometheus >= v2.41.0.", - "dropEqual": "dropEqual configures the DropEqual action. Required when type is DropEqual, and forbidden otherwise. Requires Prometheus >= v2.41.0.", -} - -func (RelabelActionConfig) SwaggerDoc() map[string]string { - return map_RelabelActionConfig -} - -var map_RelabelConfig = map[string]string{ - "": "RelabelConfig represents a relabeling rule.", - "name": "name is a unique identifier for this relabel configuration. Must contain only alphanumeric characters, hyphens, and underscores. Must be between 1 and 63 characters in length.", - "sourceLabels": "sourceLabels specifies which label names to extract from each series for this relabeling rule. The values of these labels are joined together using the configured separator, and the resulting string is then matched against the regular expression. If a referenced label does not exist on a series, Prometheus substitutes an empty string. When omitted, the rule operates without extracting source labels (useful for actions like labelmap). Minimum of 1 and maximum of 10 source labels can be specified, each between 1 and 128 characters. Each entry must be unique. Label names beginning with \"__\" (two underscores) are reserved for internal Prometheus use and are not allowed. Label names SHOULD start with a letter (a-z, A-Z) or underscore (_), followed by zero or more letters, digits (0-9), or underscores for best compatibility. While Prometheus supports UTF-8 characters in label names (since v3.0.0), using the recommended character set ensures better compatibility with the wider ecosystem (tooling, third-party instrumentation, etc.).", - "separator": "separator is the character sequence used to join source label values. Common examples: \";\", \",\", \"::\", \"|||\". When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is \";\". Must be between 1 and 5 characters in length when specified.", - "regex": "regex is the regular expression to match against the concatenated source label values. Must be a valid RE2 regular expression (https://github.com/google/re2/wiki/Syntax). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is \"(.*)\" to match everything. Must be between 1 and 1000 characters in length when specified.", - "action": "action defines the action to perform on the matched labels and its configuration. Exactly one action-specific configuration must be specified based on the action type.", -} - -func (RelabelConfig) SwaggerDoc() map[string]string { - return map_RelabelConfig -} - -var map_RemoteWriteAuthorization = map[string]string{ - "": "RemoteWriteAuthorization defines the authorization method for a remote write endpoint. Nested config requirements depend on the type discriminator: Authorization requires authorization, BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs.", - "type": "type specifies the authorization method to use. Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount.\n\nWhen set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field.\n\nWhen set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set.\n\nWhen set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set.\n\nWhen set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set.\n\nWhen set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path.", - "authorization": "authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). Required when type is \"Authorization\", and forbidden otherwise. The secret must exist in the openshift-monitoring namespace.", - "basicAuth": "basicAuth defines HTTP basic authentication credentials. Required when type is \"BasicAuth\", and forbidden otherwise.", - "oauth2": "oauth2 defines OAuth2 client credentials authentication. Required when type is \"OAuth2\", and forbidden otherwise.", - "sigv4": "sigv4 defines AWS Signature Version 4 authentication. Required when type is \"SigV4\", and forbidden otherwise.", -} - -func (RemoteWriteAuthorization) SwaggerDoc() map[string]string { - return map_RemoteWriteAuthorization -} - -var map_RemoteWriteSpec = map[string]string{ - "": "RemoteWriteSpec represents configuration for remote write endpoints.", - "url": "url is the URL of the remote write endpoint. Must be a valid URL with http or https scheme and a non-empty hostname. Query parameters, fragments, and user information (e.g. user:password@host) are not allowed. Empty string is invalid. Must be between 1 and 2048 characters in length.", - "name": "name is a required identifier for this remote write configuration (name is the list key for the remoteWrite list). This name is used in metrics and logging to differentiate remote write queues. Must contain only alphanumeric characters, hyphens, and underscores. Must be between 1 and 63 characters in length.", - "authorization": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", - "headers": "headers specifies the custom HTTP headers to be sent along with each remote write request. Sending custom headers makes the configuration of a proxy in between optional and helps the receiver recognize the given source better. Clients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure them in such a way as to send reserved headers. Headers set by Prometheus cannot be overwritten. When omitted, no custom headers are sent. Maximum of 50 headers can be specified. Each header name must be unique. Each header name must contain only alphanumeric characters, hyphens, and underscores, and must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate).", - "metadataConfig": "metadataConfig configures the sending of series metadata to remote storage. When omitted, no metadata is sent. When set to sendPolicy: Default, metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). When set to sendPolicy: Custom, metadata is sent using the settings in the custom field (e.g. custom.sendIntervalSeconds).", - "proxyUrl": "proxyUrl defines an optional proxy URL. If the cluster-wide proxy is enabled, it replaces the proxyUrl setting. The cluster-wide proxy supports both HTTP and HTTPS proxies, with HTTPS taking precedence. When omitted, no proxy is used. Must be a valid URL with http or https scheme. Must be between 1 and 2048 characters in length.", - "queueConfig": "queueConfig allows tuning configuration for remote write queue parameters. When omitted, default queue configuration is used.", - "remoteTimeoutSeconds": "remoteTimeoutSeconds defines the timeout in seconds for requests to the remote write endpoint. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. Minimum value is 1 second. Maximum value is 600 seconds (10 minutes).", - "exemplarsMode": "exemplarsMode controls whether exemplars are sent via remote write. Valid values are \"Send\", \"DoNotSend\" and omitted. When set to \"Send\", Prometheus is configured to store a maximum of 100,000 exemplars in memory and send them with remote write. Note that this setting only applies to user-defined monitoring. It is not applicable to default in-cluster monitoring. When omitted or set to \"DoNotSend\", exemplars are not sent.", - "tlsConfig": "tlsConfig defines TLS authentication settings for the remote write endpoint. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "writeRelabelConfigs": "writeRelabelConfigs is a list of relabeling rules to apply before sending data to the remote endpoint. When omitted, no relabeling is performed and all metrics are sent as-is. Minimum of 1 and maximum of 10 relabeling rules can be specified. Each rule must have a unique name.", -} - -func (RemoteWriteSpec) SwaggerDoc() map[string]string { - return map_RemoteWriteSpec -} - -var map_ReplaceActionConfig = map[string]string{ - "": "ReplaceActionConfig configures the Replace action. Regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. No replacement if regex does not match.", - "targetLabel": "targetLabel is the label name where the replacement result is written. Must be between 1 and 128 characters in length.", - "replacement": "replacement is the value written to target_label when regex matches; match group references (${1}, ${2}, ...) are substituted. Required when using the Replace action so the intended behavior is explicit and the platform does not need to apply defaults. Use \"$1\" for the first capture group, \"$2\" for the second, etc. Use an empty string (\"\") to explicitly clear the target label value. Must be between 0 and 255 characters in length.", -} - -func (ReplaceActionConfig) SwaggerDoc() map[string]string { - return map_ReplaceActionConfig -} - -var map_Retention = map[string]string{ - "": "Retention configures how long Prometheus retains metrics data and how much storage it can use.", - "duration": "duration is an optional field that specifies how long Prometheus retains metrics data. Valid values are Prometheus-style duration strings with unit suffixes y, w, d, h, m, s, or ms (for example, \"15d\", \"24h\", or \"5d1h30m\"). Each unit value must be a positive integer. Composite durations must follow the fixed unit order y, w, d, h, m, s, ms. Must be at least 1 character and at most 64 characters. When set to \"0\", time-based retention is disabled. This is the only supported form for disabling time-based retention; other zero-duration representations such as \"0d\", \"0h\", or \"0y\" are rejected. Prometheus automatically deletes data older than this duration. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is `15d`.", - "size": "size is an optional field that specifies the maximum storage size that Prometheus can use for data blocks and the write-ahead log (WAL). Valid values are byte-size strings with an optional decimal prefix and a unit suffix B, KB, MB, GB, TB, EB, PB, or their binary equivalents KiB, MiB, GiB, TiB, EiB, PiB (for example, \"500MiB\", \"10GiB\"). The numeric value must be greater than zero. Must be at least 1 character and at most 32 characters. When set to \"0\", no size limit is enforced. This is the only supported form for disabling size-based retention; other zero-size representations such as \"0B\" or \"0MiB\" are rejected. When the limit is reached, Prometheus deletes oldest data first. When omitted, no size limit is enforced and Prometheus uses available PersistentVolume capacity.", -} - -func (Retention) SwaggerDoc() map[string]string { - return map_Retention -} - -var map_SecretKeySelector = map[string]string{ - "": "SecretKeySelector selects a key of a Secret in the `openshift-monitoring` namespace.", - "name": "name is the name of the secret in the `openshift-monitoring` namespace to select from. Must be a valid Kubernetes secret name (lowercase alphanumeric, '-' or '.', start/end with alphanumeric). Must be between 1 and 253 characters in length.", - "key": "key is the key of the secret to select from. Must consist of alphanumeric characters, '-', '_', or '.'. Must be between 1 and 253 characters in length.", -} - -func (SecretKeySelector) SwaggerDoc() map[string]string { - return map_SecretKeySelector -} - -var map_Sigv4 = map[string]string{ - "": "Sigv4 defines AWS Signature Version 4 authentication settings. At least one of region, accessKey/secretKey, profile, or roleArn must be set so the platform can perform authentication.", - "region": "region is the AWS region. When omitted, the region is derived from the environment or instance metadata. Must be between 1 and 128 characters.", - "accessKey": "accessKey defines the secret reference containing the AWS access key ID. The secret must exist in the openshift-monitoring namespace. When omitted, the access key is derived from the environment or instance metadata.", - "secretKey": "secretKey defines the secret reference containing the AWS secret access key. The secret must exist in the openshift-monitoring namespace. When omitted, the secret key is derived from the environment or instance metadata.", - "profile": "profile is the named AWS profile used to authenticate. When omitted, the default profile is used. Must be between 1 and 128 characters.", - "roleArn": "roleArn is the AWS Role ARN, an alternative to using AWS API keys. When omitted, API keys are used for authentication. Must be a valid AWS ARN format (e.g., \"arn:aws:iam::123456789012:role/MyRole\"). Must be between 1 and 512 characters.", -} - -func (Sigv4) SwaggerDoc() map[string]string { - return map_Sigv4 -} - -var map_TLSConfig = map[string]string{ - "": "TLSConfig represents TLS configuration for Alertmanager connections. At least one TLS configuration option must be specified. For mutual TLS (mTLS), both cert and key must be specified together, or both omitted.", - "ca": "ca is an optional CA certificate to use for TLS connections. When omitted, the system's default CA bundle is used.", - "cert": "cert is an optional client certificate to use for mutual TLS connections. When omitted, no client certificate is presented.", - "key": "key is an optional client key to use for mutual TLS connections. When omitted, no client key is used.", - "serverName": "serverName is an optional server name to use for TLS connections. When specified, must be a valid DNS subdomain as per RFC 1123. When omitted, the server name is derived from the URL. Must be between 1 and 253 characters in length.", - "certificateVerification": "certificateVerification determines the policy for TLS certificate verification. Allowed values are \"Verify\" (performs certificate verification, secure) and \"SkipVerify\" (skips verification, insecure). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default value is \"Verify\".", -} - -func (TLSConfig) SwaggerDoc() map[string]string { - return map_TLSConfig -} - -var map_TelemeterClientConfig = map[string]string{ - "": "TelemeterClientConfig provides configuration options for the Telemeter Client component that runs in the `openshift-monitoring` namespace. The Telemeter Client collects selected monitoring metrics and forwards them to Red Hat for telemetry purposes. At least one field must be specified.", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the Telemeter Client container. This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. When not specified, defaults are used by the platform. Requests cannot exceed limits. This field is optional. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 1m\n limit: null\n - name: memory\n request: 40Mi\n limit: null\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Telemeter Client Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Default is empty list. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (TelemeterClientConfig) SwaggerDoc() map[string]string { - return map_TelemeterClientConfig -} - -var map_ThanosQuerierConfig = map[string]string{ - "": "ThanosQuerierConfig provides configuration options for the Thanos Querier component that runs in the `openshift-monitoring` namespace. At least one field must be specified; an empty thanosQuerierConfig object is not allowed.", - "logLevel": "logLevel defines the verbosity of logs emitted by Thanos Querier. logLevel is optional. Allowed values are Error, Warn, Info, and Debug. When set to Error, only errors will be logged. When set to Warn, both warnings and errors will be logged. When set to Info, general information, warnings, and errors will all be logged. When set to Debug, detailed debugging information will be logged. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is `Info`.", - "requestLogging": "requestLogging configures request logging for Thanos Querier. requestLogging is optional. When provided, the policy field within is required. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default behavior is to not log any requests.", - "crossOriginRequestPolicy": "crossOriginRequestPolicy configures the CORS (Cross-Origin Resource Sharing) policy for Thanos Querier's HTTP endpoints. crossOriginRequestPolicy is optional. Valid values are \"AllowAll\" and \"DenyAll\". When set to \"AllowAll\", CORS headers are added to responses, allowing cross-origin requests from any domain. When set to \"DenyAll\", no CORS headers are added and cross-origin requests are rejected by the browser. When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. The current default value is \"DenyAll\".", - "nodeSelector": "nodeSelector defines the nodes on which the Pods are scheduled. nodeSelector is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default value is `kubernetes.io/os: linux`. When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries.", - "resources": "resources defines the compute resource requests and limits for the Thanos Querier container. resources is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Requests cannot exceed limits. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ This is a simplified API that maps to Kubernetes ResourceRequirements. The current default values are:\n resources:\n - name: cpu\n request: 5m\n - name: memory\n request: 12Mi\nMaximum length for this list is 5. Minimum length for this list is 1. Each resource name must be unique within this list.", - "tolerations": "tolerations defines tolerations for the pods. tolerations is optional.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1.", - "topologySpreadConstraints": "topologySpreadConstraints defines rules for how Thanos Querier Pods should be distributed across topology domains such as zones, nodes, or other user-defined labels. topologySpreadConstraints is optional. This helps improve high availability and resource efficiency by avoiding placing too many replicas in the same failure domain.\n\nWhen omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. This field maps directly to the `topologySpreadConstraints` field in the Pod spec. Defaults are empty/unset. Maximum length for this list is 10. Minimum length for this list is 1. Entries must have unique topologyKey and whenUnsatisfiable pairs.", -} - -func (ThanosQuerierConfig) SwaggerDoc() map[string]string { - return map_ThanosQuerierConfig -} - -var map_ThanosQuerierRequestLoggingConfig = map[string]string{ - "": "ThanosQuerierRequestLoggingConfig configures request logging for Thanos Querier.", - "policy": "policy determines which HTTP and gRPC requests are logged by Thanos Querier. Valid values are \"AllRequests\" and \"NoRequests\". When set to \"AllRequests\", every request received by Thanos Querier is logged with method, path, and response status. The log level for request logs is derived from the logLevel field. When set to \"NoRequests\", request logging is turned off.", -} - -func (ThanosQuerierRequestLoggingConfig) SwaggerDoc() map[string]string { - return map_ThanosQuerierRequestLoggingConfig -} - -var map_UppercaseActionConfig = map[string]string{ - "": "UppercaseActionConfig configures the Uppercase action. Maps the concatenated source_labels to their upper case and writes to target_label. Requires Prometheus >= v2.36.0.", - "targetLabel": "targetLabel is the label name where the upper-cased value is written. Must be between 1 and 128 characters in length.", -} - -func (UppercaseActionConfig) SwaggerDoc() map[string]string { - return map_UppercaseActionConfig -} - -var map_UserDefinedMonitoring = map[string]string{ - "": "UserDefinedMonitoring config for user-defined projects.", - "mode": "mode defines the different configurations of UserDefinedMonitoring Valid values are Disabled and NamespaceIsolated Disabled disables monitoring for user-defined projects. This restricts the default monitoring stack, installed in the openshift-monitoring project, to monitor only platform namespaces, which prevents any custom monitoring configurations or resources from being applied to user-defined namespaces. NamespaceIsolated enables monitoring for user-defined projects with namespace-scoped tenancy. This ensures that metrics, alerts, and monitoring data are isolated at the namespace level. The current default value is `Disabled`.", -} - -func (UserDefinedMonitoring) SwaggerDoc() map[string]string { - return map_UserDefinedMonitoring -} - -var map_CRIOCredentialProviderConfig = map[string]string{ - "": "CRIOCredentialProviderConfig holds cluster-wide singleton resource configurations for CRI-O credential provider, the name of this instance is \"cluster\". CRI-O credential provider is a binary shipped with CRI-O that provides a way to obtain container image pull credentials from external sources. For example, it can be used to fetch mirror registry credentials from secrets resources in the cluster within the same namespace the pod will be running in. CRIOCredentialProviderConfig configuration specifies the pod image sources registries that should trigger the CRI-O credential provider execution, which will resolve the CRI-O mirror configurations and obtain the necessary credentials for pod creation. Note: Configuration changes will only take effect after the kubelet restarts, which is automatically managed by the cluster during rollout.\n\nThe resource is a singleton named \"cluster\".\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the desired configuration of the CRI-O Credential Provider. This field is required and must be provided when creating the resource.", - "status": "status represents the current state of the CRIOCredentialProviderConfig. When omitted or nil, it indicates that the status has not yet been set by the controller. The controller will populate this field with validation conditions and operational state.", -} - -func (CRIOCredentialProviderConfig) SwaggerDoc() map[string]string { - return map_CRIOCredentialProviderConfig -} - -var map_CRIOCredentialProviderConfigList = map[string]string{ - "": "CRIOCredentialProviderConfigList contains a list of CRIOCredentialProviderConfig resources\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (CRIOCredentialProviderConfigList) SwaggerDoc() map[string]string { - return map_CRIOCredentialProviderConfigList -} - -var map_CRIOCredentialProviderConfigSpec = map[string]string{ - "": "CRIOCredentialProviderConfigSpec defines the desired configuration of the CRI-O Credential Provider.", - "matchImages": "matchImages is a list of string patterns used to determine whether the CRI-O credential provider should be invoked for a given image. This list is passed to the kubelet CredentialProviderConfig, and if any pattern matches the requested image, CRI-O credential provider will be invoked to obtain credentials for pulling that image or its mirrors. Depending on the platform, the CRI-O credential provider may be installed alongside an existing platform specific provider. Conflicts between the existing platform specific provider image match configuration and this list will be handled by the following precedence rule: credentials from built-in kubelet providers (e.g., ECR, GCR, ACR) take precedence over those from the CRIOCredentialProviderConfig when both match the same image. To avoid uncertainty, it is recommended to avoid configuring your private image patterns to overlap with existing platform specific provider config(e.g., the entries from https://github.com/openshift/machine-config-operator/blob/main/templates/common/aws/files/etc-kubernetes-credential-providers-ecr-credential-provider.yaml). You can check the resource's Status conditions to see if any entries were ignored due to exact matches with known built-in provider patterns.\n\nThis field is optional, the items of the list must contain between 1 and 50 entries. The list is treated as a set, so duplicate entries are not allowed.\n\nFor more details, see: https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/ https://github.com/cri-o/crio-credential-provider#architecture\n\nEach entry in matchImages is a pattern which can optionally contain a port and a path. Each entry must be no longer than 512 characters. Wildcards ('*') are supported for full subdomain labels, such as '*.k8s.io' or 'k8s.*.io', and for top-level domains, such as 'k8s.*' (which matches 'k8s.io' or 'k8s.net'). A global wildcard '*' (matching any domain) is not allowed. Wildcards may replace an entire hostname label (e.g., *.example.com), but they cannot appear within a label (e.g., f*oo.example.com) and are not allowed in the port or path. For example, 'example.*.com' is valid, but 'exa*mple.*.com' is not. Each wildcard matches only a single domain label, so '*.io' does **not** match '*.k8s.io'.\n\nA match exists between an image and a matchImage when all of the below are true: Both contain the same number of domain parts and each part matches. The URL path of an matchImages must be a prefix of the target image URL path. If the matchImages contains a port, then the port must match in the image as well.\n\nExample values of matchImages: - 123456789.dkr.ecr.us-east-1.amazonaws.com - *.azurecr.io - gcr.io - *.*.registry.io - registry.io:8080/path", -} - -func (CRIOCredentialProviderConfigSpec) SwaggerDoc() map[string]string { - return map_CRIOCredentialProviderConfigSpec -} - -var map_CRIOCredentialProviderConfigStatus = map[string]string{ - "": "CRIOCredentialProviderConfigStatus defines the observed state of CRIOCredentialProviderConfig", - "conditions": "conditions represent the latest available observations of the configuration state. When omitted, it indicates that no conditions have been reported yet. The maximum number of conditions is 16. Conditions are stored as a map keyed by condition type, ensuring uniqueness.\n\nExpected condition types include: \"Validated\": indicates whether the matchImages configuration is valid", -} - -func (CRIOCredentialProviderConfigStatus) SwaggerDoc() map[string]string { - return map_CRIOCredentialProviderConfigStatus -} - -var map_GatherConfig = map[string]string{ - "": "gatherConfig provides data gathering configuration options.", - "dataPolicy": "dataPolicy allows user to enable additional global obfuscation of the IP addresses and base domain in the Insights archive data. Valid values are \"None\" and \"ObfuscateNetworking\". When set to None the data is not obfuscated. When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", - "disabledGatherers": "disabledGatherers is a list of gatherers to be excluded from the gathering. All the gatherers can be disabled by providing \"all\" value. If all the gatherers are disabled, the Insights operator does not gather any data. The format for the disabledGatherer should be: {gatherer}/{function} where the function is optional. Gatherer consists of a lowercase letters only that may include underscores (_). Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\" An example of disabling gatherers looks like this: `disabledGatherers: [\"clusterconfig/machine_configs\", \"workloads/workload_info\"]`", - "storage": "storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. If omitted, the gathering job will use ephemeral storage.", -} - -func (GatherConfig) SwaggerDoc() map[string]string { - return map_GatherConfig -} - -var map_InsightsDataGather = map[string]string{ - "": "\n\nInsightsDataGather provides data gather configuration options for the the Insights Operator.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (InsightsDataGather) SwaggerDoc() map[string]string { - return map_InsightsDataGather -} - -var map_InsightsDataGatherList = map[string]string{ - "": "InsightsDataGatherList is a collection of items\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (InsightsDataGatherList) SwaggerDoc() map[string]string { - return map_InsightsDataGatherList -} - -var map_InsightsDataGatherSpec = map[string]string{ - "gatherConfig": "gatherConfig spec attribute includes all the configuration options related to gathering of the Insights data and its uploading to the ingress.", -} - -func (InsightsDataGatherSpec) SwaggerDoc() map[string]string { - return map_InsightsDataGatherSpec -} - -var map_PersistentVolumeClaimReference = map[string]string{ - "": "persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.", - "name": "name is a string that follows the DNS1123 subdomain format. It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.", -} - -func (PersistentVolumeClaimReference) SwaggerDoc() map[string]string { - return map_PersistentVolumeClaimReference -} - -var map_PersistentVolumeConfig = map[string]string{ - "": "persistentVolumeConfig provides configuration options for PersistentVolume storage.", - "claim": "claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. The PersistentVolumeClaim must be created in the openshift-insights namespace.", - "mountPath": "mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default mount path is /var/lib/insights-operator The path may not exceed 1024 characters and must not contain a colon.", -} - -func (PersistentVolumeConfig) SwaggerDoc() map[string]string { - return map_PersistentVolumeConfig -} - -var map_Storage = map[string]string{ - "": "storage provides persistent storage configuration options for gathering jobs. If the type is set to PersistentVolume, then the PersistentVolume must be defined. If the type is set to Ephemeral, then the PersistentVolume must not be defined.", - "type": "type is a required field that specifies the type of storage that will be used to store the Insights data archive. Valid values are \"PersistentVolume\" and \"Ephemeral\". When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field.", - "persistentVolume": "persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. The PersistentVolume must be created in the openshift-insights namespace.", -} - -func (Storage) SwaggerDoc() map[string]string { - return map_Storage -} - -var map_CertificateConfig = map[string]string{ - "": "CertificateConfig specifies configuration parameters for certificates. At least one property must be specified.", - "key": "key specifies the cryptographic parameters for the certificate's key pair. Currently this is the only configurable parameter. When omitted in an overrides entry, the key configuration from defaults is used.", -} - -func (CertificateConfig) SwaggerDoc() map[string]string { - return map_CertificateConfig -} - -var map_CustomPKIPolicy = map[string]string{ - "": "CustomPKIPolicy contains administrator-specified cryptographic configuration. Administrators must specify defaults for all certificates and may optionally override specific categories of certificates.", -} - -func (CustomPKIPolicy) SwaggerDoc() map[string]string { - return map_CustomPKIPolicy -} - -var map_DefaultCertificateConfig = map[string]string{ - "": "DefaultCertificateConfig specifies the default certificate configuration parameters. All fields are required to ensure that defaults are fully specified for all certificates.", - "key": "key specifies the cryptographic parameters for the certificate's key pair. This field is required in defaults to ensure all certificates have a well-defined key configuration.", -} - -func (DefaultCertificateConfig) SwaggerDoc() map[string]string { - return map_DefaultCertificateConfig -} - -var map_ECDSAKeyConfig = map[string]string{ - "": "ECDSAKeyConfig specifies parameters for ECDSA key generation.", - "curve": "curve specifies the NIST elliptic curve for ECDSA keys. Valid values are \"P256\", \"P384\", and \"P521\".\n\nWhen set to P256, the NIST P-256 curve (also known as secp256r1) is used, providing 128-bit security.\n\nWhen set to P384, the NIST P-384 curve (also known as secp384r1) is used, providing 192-bit security.\n\nWhen set to P521, the NIST P-521 curve (also known as secp521r1) is used, providing 256-bit security.", -} - -func (ECDSAKeyConfig) SwaggerDoc() map[string]string { - return map_ECDSAKeyConfig -} - -var map_KeyConfig = map[string]string{ - "": "KeyConfig specifies cryptographic parameters for key generation.", - "algorithm": "algorithm specifies the key generation algorithm. Valid values are \"RSA\" and \"ECDSA\".\n\nWhen set to RSA, the rsa field must be specified and the generated key will be an RSA key with the configured key size.\n\nWhen set to ECDSA, the ecdsa field must be specified and the generated key will be an ECDSA key using the configured elliptic curve.", - "rsa": "rsa specifies RSA key parameters. Required when algorithm is RSA, and forbidden otherwise.", - "ecdsa": "ecdsa specifies ECDSA key parameters. Required when algorithm is ECDSA, and forbidden otherwise.", -} - -func (KeyConfig) SwaggerDoc() map[string]string { - return map_KeyConfig -} - -var map_PKI = map[string]string{ - "": "PKI configures cryptographic parameters for certificates generated internally by OpenShift components.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", -} - -func (PKI) SwaggerDoc() map[string]string { - return map_PKI -} - -var map_PKICertificateManagement = map[string]string{ - "": "PKICertificateManagement determines whether components use hardcoded defaults (Unmanaged), follow OpenShift best practices (Default), or use administrator-specified cryptographic parameters (Custom). This provides flexibility for organizations with specific compliance requirements or security policies while maintaining backwards compatibility for existing clusters.", - "mode": "mode determines how PKI configuration is managed. Valid values are \"Unmanaged\", \"Default\", and \"Custom\".\n\nWhen set to Unmanaged, components use their existing hardcoded certificate generation behavior, exactly as if this feature did not exist. Each component generates certificates using whatever parameters it was using before this feature. While most components use RSA 2048, some may use different parameters. Use of this mode might prevent upgrading to the next major OpenShift release.\n\nWhen set to Default, OpenShift-recommended best practices for certificate generation are applied. The specific parameters may evolve across OpenShift releases to adopt improved cryptographic standards. In the initial release, this matches Unmanaged behavior for each component. In future releases, this may adopt ECDSA or larger RSA keys based on industry best practices. Recommended for most customers who want to benefit from security improvements automatically.\n\nWhen set to Custom, the certificate management parameters can be set explicitly. Use the custom field to specify certificate generation parameters.", - "custom": "custom contains administrator-specified cryptographic configuration. Use the defaults and category override fields to specify certificate generation parameters. Required when mode is Custom, and forbidden otherwise.", -} - -func (PKICertificateManagement) SwaggerDoc() map[string]string { - return map_PKICertificateManagement -} - -var map_PKIList = map[string]string{ - "": "PKIList is a collection of PKI resources.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of PKI resources", -} - -func (PKIList) SwaggerDoc() map[string]string { - return map_PKIList -} - -var map_PKIProfile = map[string]string{ - "": "PKIProfile defines the certificate generation parameters that OpenShift components use to create certificates. Category overrides take precedence over defaults.", - "defaults": "defaults specifies the default certificate configuration that applies to all certificates unless overridden by a category override.", - "signerCertificates": "signerCertificates optionally overrides certificate parameters for certificate authority (CA) certificates that sign other certificates. When set, these parameters take precedence over defaults for all signer certificates. When omitted, the defaults are used for signer certificates.", - "servingCertificates": "servingCertificates optionally overrides certificate parameters for TLS server certificates used to serve HTTPS endpoints. When set, these parameters take precedence over defaults for all serving certificates. When omitted, the defaults are used for serving certificates.", - "clientCertificates": "clientCertificates optionally overrides certificate parameters for client authentication certificates used to authenticate to servers. When set, these parameters take precedence over defaults for all client certificates. When omitted, the defaults are used for client certificates.", -} - -func (PKIProfile) SwaggerDoc() map[string]string { - return map_PKIProfile -} - -var map_PKISpec = map[string]string{ - "": "PKISpec holds the specification for PKI configuration.", - "certificateManagement": "certificateManagement specifies how PKI configuration is managed for internally-generated certificates. This controls the certificate generation approach for all OpenShift components that create certificates internally, including certificate authorities, serving certificates, and client certificates.", -} - -func (PKISpec) SwaggerDoc() map[string]string { - return map_PKISpec -} - -var map_RSAKeyConfig = map[string]string{ - "": "RSAKeyConfig specifies parameters for RSA key generation.", - "keySize": "keySize specifies the size of RSA keys in bits. Valid values are multiples of 1024 from 2048 to 8192.", -} - -func (RSAKeyConfig) SwaggerDoc() map[string]string { - return map_RSAKeyConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/config/v1alpha2/Makefile b/vendor/github.com/openshift/api/config/v1alpha2/Makefile deleted file mode 100644 index 933e5dd43..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="config.openshift.io/v1alpha2" diff --git a/vendor/github.com/openshift/api/config/v1alpha2/doc.go b/vendor/github.com/openshift/api/config/v1alpha2/doc.go deleted file mode 100644 index 5777844e2..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.config.v1alpha2 - -// +groupName=config.openshift.io -// Package v1alpha2 is the v1alpha2 version of the API. -package v1alpha2 diff --git a/vendor/github.com/openshift/api/config/v1alpha2/register.go b/vendor/github.com/openshift/api/config/v1alpha2/register.go deleted file mode 100644 index dfd9e6f0e..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package v1alpha2 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha2"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &InsightsDataGather{}, - &InsightsDataGatherList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/config/v1alpha2/types_insights.go b/vendor/github.com/openshift/api/config/v1alpha2/types_insights.go deleted file mode 100644 index fbe666249..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/types_insights.go +++ /dev/null @@ -1,221 +0,0 @@ -package v1alpha2 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// InsightsDataGather provides data gather configuration options for the the Insights Operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=insightsdatagathers,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2195 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:enable:FeatureGate=InsightsConfig -// +openshift:compatibility-gen:level=4 -// +openshift:capability=Insights -type InsightsDataGather struct { - metav1.TypeMeta `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // spec holds user settable values for configuration - // +required - Spec InsightsDataGatherSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status InsightsDataGatherStatus `json:"status"` -} - -type InsightsDataGatherSpec struct { - // gatherConfig is an optional spec attribute that includes all the configuration options related to gathering of the Insights data and its uploading to the ingress. - // +optional - GatherConfig GatherConfig `json:"gatherConfig"` -} - -type InsightsDataGatherStatus struct{} - -// gatherConfig provides data gathering configuration options. -type GatherConfig struct { - // dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. - // It may not exceed 2 items and must not contain duplicates. - // Valid values are ObfuscateNetworking and WorkloadNames. - // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. - // When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead. - // When omitted no obfuscation is applied. - // +kubebuilder:validation:MaxItems=2 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="dataPolicy items must be unique" - // +listType=atomic - // +optional - DataPolicy []DataPolicyOption `json:"dataPolicy"` - // gatherers is a required field that specifies the configuration of the gatherers. - // +required - Gatherers Gatherers `json:"gatherers"` - // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. - // If omitted, the gathering job will use ephemeral storage. - // +optional - Storage *Storage `json:"storage,omitempty"` -} - -// +kubebuilder:validation:XValidation:rule="has(self.mode) && self.mode == 'Custom' ? has(self.custom) : !has(self.custom)",message="custom is required when mode is Custom, and forbidden otherwise" -type Gatherers struct { - // mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. - // When set to All, all gatherers wil run and gather data. - // When set to None, all gatherers will be disabled and no data will be gathered. - // When set to Custom, the custom configuration from the custom field will be applied. - // +required - Mode GatheringMode `json:"mode"` - // custom provides gathering configuration. - // It is required when mode is Custom, and forbidden otherwise. - // Custom configuration allows user to disable only a subset of gatherers. - // Gatherers that are not explicitly disabled in custom configuration will run. - // +optional - Custom *Custom `json:"custom,omitempty"` -} - -// custom provides the custom configuration of gatherers -type Custom struct { - // configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. - // It may not exceed 100 items and each gatherer can be present only once. - // It is possible to disable an entire set of gatherers while allowing a specific function within that set. - // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - // +kubebuilder:validation:MaxItems=100 - // +listType=map - // +listMapKey=name - // +required - Configs []GathererConfig `json:"configs"` -} - -// gatheringMode defines the valid gathering modes. -// +kubebuilder:validation:Enum=All;None;Custom -type GatheringMode string - -const ( - // Enabled enables all gatherers - GatheringModeAll GatheringMode = "All" - // Disabled disables all gatherers - GatheringModeNone GatheringMode = "None" - // Custom applies the configuration from GatheringConfig. - GatheringModeCustom GatheringMode = "Custom" -) - -// dataPolicyOption declares valid data policy options -// +kubebuilder:validation:Enum=ObfuscateNetworking;WorkloadNames -type DataPolicyOption string - -const ( - // IP addresses and cluster domain name are obfuscated - DataPolicyOptionObfuscateNetworking DataPolicyOption = "ObfuscateNetworking" - // Data from Deployment Validation Operator are obfuscated - DataPolicyOptionObfuscateWorkloadNames DataPolicyOption = "WorkloadNames" -) - -// storage provides persistent storage configuration options for gathering jobs. -// If the type is set to PersistentVolume, then the PersistentVolume must be defined. -// If the type is set to Ephemeral, then the PersistentVolume must not be defined. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'PersistentVolume' ? has(self.persistentVolume) : !has(self.persistentVolume)",message="persistentVolume is required when type is PersistentVolume, and forbidden otherwise" -type Storage struct { - // type is a required field that specifies the type of storage that will be used to store the Insights data archive. - // Valid values are "PersistentVolume" and "Ephemeral". - // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. - // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field. - // +required - Type StorageType `json:"type"` - // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. - // The PersistentVolume must be created in the openshift-insights namespace. - // +optional - PersistentVolume *PersistentVolumeConfig `json:"persistentVolume,omitempty"` -} - -// storageType declares valid storage types -// +kubebuilder:validation:Enum=PersistentVolume;Ephemeral -type StorageType string - -const ( - // StorageTypePersistentVolume storage type - StorageTypePersistentVolume StorageType = "PersistentVolume" - // StorageTypeEphemeral storage type - StorageTypeEphemeral StorageType = "Ephemeral" -) - -// persistentVolumeConfig provides configuration options for PersistentVolume storage. -type PersistentVolumeConfig struct { - // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. - // The PersistentVolumeClaim must be created in the openshift-insights namespace. - // +required - Claim PersistentVolumeClaimReference `json:"claim"` - // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default mount path is /var/lib/insights-operator - // The path may not exceed 1024 characters and must not contain a colon. - // +kubebuilder:validation:MaxLength=1024 - // +kubebuilder:validation:XValidation:rule="!self.contains(':')",message="mountPath must not contain a colon" - // +optional - MountPath string `json:"mountPath,omitempty"` -} - -// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim. -type PersistentVolumeClaimReference struct { - // name is a string that follows the DNS1123 subdomain format. - // It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character. - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +kubebuilder:validation:MaxLength:=253 - // +required - Name string `json:"name"` -} - -// gathererConfig allows to configure specific gatherers -type GathererConfig struct { - // name is the required name of a specific gatherer - // It may not exceed 256 characters. - // The format for a gatherer name is: {gatherer}/{function} where the function is optional. - // Gatherer consists of a lowercase letters only that may include underscores (_). - // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). - // The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:XValidation:rule=`self.matches("^[a-z]+[_a-z]*[a-z]([/a-z][_a-z]*)?[a-z]$")`,message=`gatherer name must be in the format of {gatherer}/{function} where the gatherer and function are lowercase letters only that may include underscores (_) and are separated by a forward slash (/) if the function is provided` - // +required - Name string `json:"name"` - // state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". - // When set to Enabled the gatherer will run. - // When set to Disabled the gatherer will not run. - // +required - State GathererState `json:"state"` -} - -// state declares valid gatherer state types. -// +kubebuilder:validation:Enum=Enabled;Disabled -type GathererState string - -const ( - // GathererStateEnabled gatherer state, which means that the gatherer will run. - GathererStateEnabled GathererState = "Enabled" - // GathererStateDisabled gatherer state, which means that the gatherer will not run. - GathererStateDisabled GathererState = "Disabled" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InsightsDataGatherList is a collection of items -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type InsightsDataGatherList struct { - metav1.TypeMeta `json:",inline"` - // metadata is the required standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +required - metav1.ListMeta `json:"metadata"` - // items is the required list of InsightsDataGather objects - // it may not exceed 100 items - // +kubebuilder:validation:MaxItems=100 - // +required - Items []InsightsDataGather `json:"items"` -} diff --git a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.deepcopy.go deleted file mode 100644 index 27586f99b..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.deepcopy.go +++ /dev/null @@ -1,243 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha2 - -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 *Custom) DeepCopyInto(out *Custom) { - *out = *in - if in.Configs != nil { - in, out := &in.Configs, &out.Configs - *out = make([]GathererConfig, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Custom. -func (in *Custom) DeepCopy() *Custom { - if in == nil { - return nil - } - out := new(Custom) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GatherConfig) DeepCopyInto(out *GatherConfig) { - *out = *in - if in.DataPolicy != nil { - in, out := &in.DataPolicy, &out.DataPolicy - *out = make([]DataPolicyOption, len(*in)) - copy(*out, *in) - } - in.Gatherers.DeepCopyInto(&out.Gatherers) - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = new(Storage) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatherConfig. -func (in *GatherConfig) DeepCopy() *GatherConfig { - if in == nil { - return nil - } - out := new(GatherConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GathererConfig) DeepCopyInto(out *GathererConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GathererConfig. -func (in *GathererConfig) DeepCopy() *GathererConfig { - if in == nil { - return nil - } - out := new(GathererConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Gatherers) DeepCopyInto(out *Gatherers) { - *out = *in - if in.Custom != nil { - in, out := &in.Custom, &out.Custom - *out = new(Custom) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gatherers. -func (in *Gatherers) DeepCopy() *Gatherers { - if in == nil { - return nil - } - out := new(Gatherers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsDataGather) DeepCopyInto(out *InsightsDataGather) { - *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 InsightsDataGather. -func (in *InsightsDataGather) DeepCopy() *InsightsDataGather { - if in == nil { - return nil - } - out := new(InsightsDataGather) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsDataGather) 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 *InsightsDataGatherList) DeepCopyInto(out *InsightsDataGatherList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]InsightsDataGather, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherList. -func (in *InsightsDataGatherList) DeepCopy() *InsightsDataGatherList { - if in == nil { - return nil - } - out := new(InsightsDataGatherList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsDataGatherList) 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 *InsightsDataGatherSpec) DeepCopyInto(out *InsightsDataGatherSpec) { - *out = *in - in.GatherConfig.DeepCopyInto(&out.GatherConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherSpec. -func (in *InsightsDataGatherSpec) DeepCopy() *InsightsDataGatherSpec { - if in == nil { - return nil - } - out := new(InsightsDataGatherSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsDataGatherStatus) DeepCopyInto(out *InsightsDataGatherStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsDataGatherStatus. -func (in *InsightsDataGatherStatus) DeepCopy() *InsightsDataGatherStatus { - if in == nil { - return nil - } - out := new(InsightsDataGatherStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimReference) DeepCopyInto(out *PersistentVolumeClaimReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimReference. -func (in *PersistentVolumeClaimReference) DeepCopy() *PersistentVolumeClaimReference { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeConfig) DeepCopyInto(out *PersistentVolumeConfig) { - *out = *in - out.Claim = in.Claim - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeConfig. -func (in *PersistentVolumeConfig) DeepCopy() *PersistentVolumeConfig { - if in == nil { - return nil - } - out := new(PersistentVolumeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Storage) DeepCopyInto(out *Storage) { - *out = *in - if in.PersistentVolume != nil { - in, out := &in.PersistentVolume, &out.PersistentVolume - *out = new(PersistentVolumeConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. -func (in *Storage) DeepCopy() *Storage { - if in == nil { - return nil - } - out := new(Storage) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 1f73e723e..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -insightsdatagathers.config.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2195 - CRDName: insightsdatagathers.config.openshift.io - Capability: Insights - Category: "" - FeatureGates: - - InsightsConfig - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: config.openshift.io - HasStatus: true - KindName: InsightsDataGather - Labels: {} - PluralName: insightsdatagathers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - InsightsConfig - Version: v1alpha2 - diff --git a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.model_name.go b/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.model_name.go deleted file mode 100644 index d05e8558c..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.model_name.go +++ /dev/null @@ -1,61 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha2 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Custom) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.Custom" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GatherConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.GatherConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GathererConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.GathererConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Gatherers) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.Gatherers" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGather) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.InsightsDataGather" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherList) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.InsightsDataGatherList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherSpec) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.InsightsDataGatherSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsDataGatherStatus) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.InsightsDataGatherStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PersistentVolumeClaimReference) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.PersistentVolumeClaimReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PersistentVolumeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.PersistentVolumeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Storage) OpenAPIModelName() string { - return "com.github.openshift.api.config.v1alpha2.Storage" -} diff --git a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 695c0c70a..000000000 --- a/vendor/github.com/openshift/api/config/v1alpha2/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,111 +0,0 @@ -package v1alpha2 - -// 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_Custom = map[string]string{ - "": "custom provides the custom configuration of gatherers", - "configs": "configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. It may not exceed 100 items and each gatherer can be present only once. It is possible to disable an entire set of gatherers while allowing a specific function within that set. The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", -} - -func (Custom) SwaggerDoc() map[string]string { - return map_Custom -} - -var map_GatherConfig = map[string]string{ - "": "gatherConfig provides data gathering configuration options.", - "dataPolicy": "dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. It may not exceed 2 items and must not contain duplicates. Valid values are ObfuscateNetworking and WorkloadNames. When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead. When omitted no obfuscation is applied.", - "gatherers": "gatherers is a required field that specifies the configuration of the gatherers.", - "storage": "storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. If omitted, the gathering job will use ephemeral storage.", -} - -func (GatherConfig) SwaggerDoc() map[string]string { - return map_GatherConfig -} - -var map_GathererConfig = map[string]string{ - "": "gathererConfig allows to configure specific gatherers", - "name": "name is the required name of a specific gatherer It may not exceed 256 characters. The format for a gatherer name is: {gatherer}/{function} where the function is optional. Gatherer consists of a lowercase letters only that may include underscores (_). Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. Run the following command to get the names of last active gatherers: \"oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'\"", - "state": "state is a required field that allows you to configure specific gatherer. Valid values are \"Enabled\" and \"Disabled\". When set to Enabled the gatherer will run. When set to Disabled the gatherer will not run.", -} - -func (GathererConfig) SwaggerDoc() map[string]string { - return map_GathererConfig -} - -var map_Gatherers = map[string]string{ - "mode": "mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. When set to All, all gatherers wil run and gather data. When set to None, all gatherers will be disabled and no data will be gathered. When set to Custom, the custom configuration from the custom field will be applied.", - "custom": "custom provides gathering configuration. It is required when mode is Custom, and forbidden otherwise. Custom configuration allows user to disable only a subset of gatherers. Gatherers that are not explicitly disabled in custom configuration will run.", -} - -func (Gatherers) SwaggerDoc() map[string]string { - return map_Gatherers -} - -var map_InsightsDataGather = map[string]string{ - "": "\n\nInsightsDataGather provides data gather configuration options for the the Insights Operator.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (InsightsDataGather) SwaggerDoc() map[string]string { - return map_InsightsDataGather -} - -var map_InsightsDataGatherList = map[string]string{ - "": "InsightsDataGatherList is a collection of items Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the required standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the required list of InsightsDataGather objects it may not exceed 100 items", -} - -func (InsightsDataGatherList) SwaggerDoc() map[string]string { - return map_InsightsDataGatherList -} - -var map_InsightsDataGatherSpec = map[string]string{ - "gatherConfig": "gatherConfig is an optional spec attribute that includes all the configuration options related to gathering of the Insights data and its uploading to the ingress.", -} - -func (InsightsDataGatherSpec) SwaggerDoc() map[string]string { - return map_InsightsDataGatherSpec -} - -var map_PersistentVolumeClaimReference = map[string]string{ - "": "persistentVolumeClaimReference is a reference to a PersistentVolumeClaim.", - "name": "name is a string that follows the DNS1123 subdomain format. It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character.", -} - -func (PersistentVolumeClaimReference) SwaggerDoc() map[string]string { - return map_PersistentVolumeClaimReference -} - -var map_PersistentVolumeConfig = map[string]string{ - "": "persistentVolumeConfig provides configuration options for PersistentVolume storage.", - "claim": "claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. The PersistentVolumeClaim must be created in the openshift-insights namespace.", - "mountPath": "mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default mount path is /var/lib/insights-operator The path may not exceed 1024 characters and must not contain a colon.", -} - -func (PersistentVolumeConfig) SwaggerDoc() map[string]string { - return map_PersistentVolumeConfig -} - -var map_Storage = map[string]string{ - "": "storage provides persistent storage configuration options for gathering jobs. If the type is set to PersistentVolume, then the PersistentVolume must be defined. If the type is set to Ephemeral, then the PersistentVolume must not be defined.", - "type": "type is a required field that specifies the type of storage that will be used to store the Insights data archive. Valid values are \"PersistentVolume\" and \"Ephemeral\". When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field.", - "persistentVolume": "persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. The PersistentVolume must be created in the openshift-insights namespace.", -} - -func (Storage) SwaggerDoc() map[string]string { - return map_Storage -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/console/.codegen.yaml b/vendor/github.com/openshift/api/console/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/console/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/console/OWNERS b/vendor/github.com/openshift/api/console/OWNERS deleted file mode 100644 index d39278070..000000000 --- a/vendor/github.com/openshift/api/console/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -reviewers: - - jhadvig - - spadgett diff --git a/vendor/github.com/openshift/api/console/install.go b/vendor/github.com/openshift/api/console/install.go deleted file mode 100644 index 147d023b7..000000000 --- a/vendor/github.com/openshift/api/console/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package console - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - consolev1 "github.com/openshift/api/console/v1" -) - -const ( - GroupName = "console.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(consolev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/console/v1/Makefile b/vendor/github.com/openshift/api/console/v1/Makefile deleted file mode 100644 index 8c350e0a4..000000000 --- a/vendor/github.com/openshift/api/console/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="console.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/console/v1/doc.go b/vendor/github.com/openshift/api/console/v1/doc.go deleted file mode 100644 index f6c62bd19..000000000 --- a/vendor/github.com/openshift/api/console/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.console.v1 - -// +groupName=console.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/console/v1/register.go b/vendor/github.com/openshift/api/console/v1/register.go deleted file mode 100644 index 22319469f..000000000 --- a/vendor/github.com/openshift/api/console/v1/register.go +++ /dev/null @@ -1,53 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "console.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// addKnownTypes adds types to API group -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ConsoleCLIDownload{}, - &ConsoleCLIDownloadList{}, - &ConsoleExternalLogLink{}, - &ConsoleExternalLogLinkList{}, - &ConsoleLink{}, - &ConsoleLinkList{}, - &ConsoleNotification{}, - &ConsoleNotificationList{}, - &ConsolePlugin{}, - &ConsolePluginList{}, - &ConsoleQuickStart{}, - &ConsoleQuickStartList{}, - &ConsoleSample{}, - &ConsoleSampleList{}, - &ConsoleYAMLSample{}, - &ConsoleYAMLSampleList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/console/v1/types.go b/vendor/github.com/openshift/api/console/v1/types.go deleted file mode 100644 index 24dcd5ca0..000000000 --- a/vendor/github.com/openshift/api/console/v1/types.go +++ /dev/null @@ -1,10 +0,0 @@ -package v1 - -// Represents a standard link that could be generated in HTML -type Link struct { - // text is the display text for the link - Text string `json:"text"` - // href is the absolute URL for the link. Must use https:// for web URLs or mailto: for email links. - // +kubebuilder:validation:Pattern=`^(https://|mailto:)` - Href string `json:"href"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go b/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go deleted file mode 100644 index cd61e14a8..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_cli_download.go +++ /dev/null @@ -1,64 +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 - -// ConsoleCLIDownload is an extension for configuring openshift web console command line interface (CLI) downloads. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoleclidownloads,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift web console command line interface (CLI) downloads." -// +kubebuilder:metadata:annotations="displayName=ConsoleCLIDownload" -// +kubebuilder:printcolumn:name=Display name,JSONPath=.spec.displayName,type=string -// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date -// +openshift:compatibility-gen:level=2 -type ConsoleCLIDownload struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ConsoleCLIDownloadSpec `json:"spec"` -} - -// ConsoleCLIDownloadSpec is the desired cli download configuration. -type ConsoleCLIDownloadSpec struct { - // displayName is the display name of the CLI download. - DisplayName string `json:"displayName"` - // description is the description of the CLI download (can include markdown). - Description string `json:"description"` - // links is a list of objects that provide CLI download link details. - Links []CLIDownloadLink `json:"links"` -} - -type CLIDownloadLink struct { - // text is the display text for the link - // +optional - Text string `json:"text"` - // href is the absolute secure URL for the link (must use https) - // +kubebuilder:validation:Pattern=`^https://` - Href string `json:"href"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleCLIDownloadList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleCLIDownload `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_external_log_links.go b/vendor/github.com/openshift/api/console/v1/types_console_external_log_links.go deleted file mode 100644 index 0824e49c1..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_external_log_links.go +++ /dev/null @@ -1,76 +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 - -// ConsoleExternalLogLink is an extension for customizing OpenShift web console log links. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoleexternalloglinks,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=ConsoleExternalLogLink is an extension for customizing OpenShift web console log links." -// +kubebuilder:metadata:annotations="displayName=ConsoleExternalLogLinks" -// +kubebuilder:printcolumn:name=Text,JSONPath=.spec.text,type=string -// +kubebuilder:printcolumn:name=HrefTemplate,JSONPath=.spec.hrefTemplate,type=string -// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date -// +openshift:compatibility-gen:level=2 -type ConsoleExternalLogLink struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ConsoleExternalLogLinkSpec `json:"spec"` -} - -// ConsoleExternalLogLinkSpec is the desired log link configuration. -// The log link will appear on the logs tab of the pod details page. -type ConsoleExternalLogLinkSpec struct { - // text is the display text for the link - Text string `json:"text"` - // hrefTemplate is an absolute secure URL (must use https) for the log link including - // variables to be replaced. Variables are specified in the URL with the format ${variableName}, - // for instance, ${containerName} and will be replaced with the corresponding values - // from the resource. Resource is a pod. - // Supported variables are: - // - ${resourceName} - name of the resource which containes the logs - // - ${resourceUID} - UID of the resource which contains the logs - // - e.g. `11111111-2222-3333-4444-555555555555` - // - ${containerName} - name of the resource's container that contains the logs - // - ${resourceNamespace} - namespace of the resource that contains the logs - // - ${resourceNamespaceUID} - namespace UID of the resource that contains the logs - // - ${podLabels} - JSON representation of labels matching the pod with the logs - // - e.g. `{"key1":"value1","key2":"value2"}` - // - // e.g., https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels} - // +kubebuilder:validation:Pattern=`^https://` - HrefTemplate string `json:"hrefTemplate"` - // namespaceFilter is a regular expression used to restrict a log link to a - // matching set of namespaces (e.g., `^openshift-`). The string is converted - // into a regular expression using the JavaScript RegExp constructor. - // If not specified, links will be displayed for all the namespaces. - // +optional - NamespaceFilter string `json:"namespaceFilter,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleExternalLogLinkList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleExternalLogLink `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_link.go b/vendor/github.com/openshift/api/console/v1/types_console_link.go deleted file mode 100644 index a84572925..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_link.go +++ /dev/null @@ -1,106 +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 - -// ConsoleLink is an extension for customizing OpenShift web console links. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consolelinks,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for customizing OpenShift web console links" -// +kubebuilder:metadata:annotations="displayName=ConsoleLinks" -// +kubebuilder:printcolumn:name=Text,JSONPath=.spec.text,type=string -// +kubebuilder:printcolumn:name=URL,JSONPath=.spec.href,type=string -// +kubebuilder:printcolumn:name=Location,JSONPath=.spec.location,type=string -// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date -// +openshift:compatibility-gen:level=2 -type ConsoleLink struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ConsoleLinkSpec `json:"spec"` -} - -// ConsoleLinkSpec is the desired console link configuration. -type ConsoleLinkSpec struct { - Link `json:",inline"` - // location determines which location in the console the link will be appended to (ApplicationMenu, HelpMenu, UserMenu, NamespaceDashboard). - Location ConsoleLinkLocation `json:"location"` - // applicationMenu holds information about section and icon used for the link in the - // application menu, and it is applicable only when location is set to ApplicationMenu. - // - // +optional - ApplicationMenu *ApplicationMenuSpec `json:"applicationMenu,omitempty"` - // namespaceDashboard holds information about namespaces in which the dashboard link should - // appear, and it is applicable only when location is set to NamespaceDashboard. - // If not specified, the link will appear in all namespaces. - // - // +optional - NamespaceDashboard *NamespaceDashboardSpec `json:"namespaceDashboard,omitempty"` -} - -// ApplicationMenuSpec is the specification of the desired section and icon used for the link in the application menu. -type ApplicationMenuSpec struct { - // section is the section of the application menu in which the link should appear. - // This can be any text that will appear as a subheading in the application menu dropdown. - // A new section will be created if the text does not match text of an existing section. - Section string `json:"section"` - // imageURL is the URL for the icon used in front of the link in the application menu. - // The URL must be an HTTPS URL or a Data URI. The image should be square and will be shown at 24x24 pixels. - // +optional - ImageURL string `json:"imageURL,omitempty"` -} - -// NamespaceDashboardSpec is a specification of namespaces in which the dashboard link should appear. -// If both namespaces and namespaceSelector are specified, the link will appear in namespaces that match either -type NamespaceDashboardSpec struct { - // namespaces is an array of namespace names in which the dashboard link should appear. - // - // +optional - Namespaces []string `json:"namespaces,omitempty"` - // namespaceSelector is used to select the Namespaces that should contain dashboard link by label. - // If the namespace labels match, dashboard link will be shown for the namespaces. - // - // +optional - NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` -} - -// ConsoleLinkLocationSelector is a set of possible menu targets to which a link may be appended. -// +kubebuilder:validation:Pattern=`^(ApplicationMenu|HelpMenu|UserMenu|NamespaceDashboard)$` -type ConsoleLinkLocation string - -const ( - // HelpMenu indicates that the link should appear in the help menu in the console. - HelpMenu ConsoleLinkLocation = "HelpMenu" - // UserMenu indicates that the link should appear in the user menu in the console. - UserMenu ConsoleLinkLocation = "UserMenu" - // ApplicationMenu indicates that the link should appear inside the application menu of the console. - ApplicationMenu ConsoleLinkLocation = "ApplicationMenu" - // NamespaceDashboard indicates that the link should appear in the namespaced dashboard of the console. - NamespaceDashboard ConsoleLinkLocation = "NamespaceDashboard" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleLinkList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleLink `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_notification.go b/vendor/github.com/openshift/api/console/v1/types_console_notification.go deleted file mode 100644 index 0571ca77f..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_notification.go +++ /dev/null @@ -1,79 +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 - -// ConsoleNotification is the extension for configuring openshift web console notifications. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consolenotifications,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift web console notifications." -// +kubebuilder:metadata:annotations="displayName=ConsoleNotification" -// +kubebuilder:printcolumn:name=Text,JSONPath=.spec.text,type=string -// +kubebuilder:printcolumn:name=Location,JSONPath=.spec.location,type=string -// +kubebuilder:printcolumn:name=Age,JSONPath=.metadata.creationTimestamp,type=date -// +openshift:compatibility-gen:level=2 -type ConsoleNotification struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ConsoleNotificationSpec `json:"spec"` -} - -// ConsoleNotificationSpec is the desired console notification configuration. -type ConsoleNotificationSpec struct { - // text is the visible text of the notification. - Text string `json:"text"` - // location is the location of the notification in the console. - // Valid values are: "BannerTop", "BannerBottom", "BannerTopBottom". - // +optional - Location ConsoleNotificationLocation `json:"location,omitempty"` - // link is an object that holds notification link details. - // +optional - Link *Link `json:"link,omitempty"` - // color is the color of the text for the notification as CSS data type color. - // +optional - Color string `json:"color,omitempty"` - // backgroundColor is the color of the background for the notification as CSS data type color. - // +optional - BackgroundColor string `json:"backgroundColor,omitempty"` -} - -// ConsoleNotificationLocationSelector is a set of possible notification targets -// to which a notification may be appended. -// +kubebuilder:validation:Pattern=`^(BannerTop|BannerBottom|BannerTopBottom)$` -type ConsoleNotificationLocation string - -const ( - // BannerTop indicates that the notification should appear at the top of the console. - BannerTop ConsoleNotificationLocation = "BannerTop" - // BannerBottom indicates that the notification should appear at the bottom of the console. - BannerBottom ConsoleNotificationLocation = "BannerBottom" - // BannerTopBottom indicates that the notification should appear both at the top and at the bottom of the console. - BannerTopBottom ConsoleNotificationLocation = "BannerTopBottom" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleNotificationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleNotification `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_plugin.go b/vendor/github.com/openshift/api/console/v1/types_console_plugin.go deleted file mode 100644 index c63db50d5..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_plugin.go +++ /dev/null @@ -1,385 +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 -// +openshift:compatibility-gen:level=1 - -// ConsolePlugin is an extension for customizing OpenShift web console by -// dynamically loading code from another service running on the cluster. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoleplugins,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1186 -// +openshift:file-pattern=operatorOrdering=90 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift web console plugins." -// +kubebuilder:metadata:annotations="displayName=ConsolePlugin" -// +kubebuilder:metadata:annotations="service.beta.openshift.io/inject-cabundle=true" -type ConsolePlugin struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec contains the desired configuration for the console plugin. - // +required - Spec ConsolePluginSpec `json:"spec"` -} - -// ConsolePluginSpec is the desired plugin configuration. -type ConsolePluginSpec struct { - // displayName is the display name of the plugin. - // The dispalyName should be between 1 and 128 characters. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - DisplayName string `json:"displayName"` - // backend holds the configuration of backend which is serving console's plugin . - // +required - Backend ConsolePluginBackend `json:"backend"` - // proxy is a list of proxies that describe various service type - // to which the plugin needs to connect to. - // +listType=atomic - // +optional - Proxy []ConsolePluginProxy `json:"proxy,omitempty"` - // i18n is the configuration of plugin's localization resources. - // +optional - I18n ConsolePluginI18n `json:"i18n"` - // contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin. - // Each directive specifies a list of values, appropriate for the given directive type, - // for example a list of remote endpoints for fetch directives such as ScriptSrc. - // Console web application uses CSP to detect and mitigate certain types of attacks, - // such as cross-site scripting (XSS) and data injection attacks. - // Dynamic plugins should specify this field if need to load assets from outside - // the cluster or if violation reports are observed. Dynamic plugins should always prefer - // loading their assets from within the cluster, either by vendoring them, or fetching - // from a cluster service. - // CSP violation reports can be viewed in the browser's console logs during development and - // testing of the plugin in the OpenShift web console. - // Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. - // Each of the available directives may be defined only once in the list. - // The value 'self' is automatically included in all fetch directives by the OpenShift web - // console's backend. - // For more information about the CSP directives, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy - // - // The OpenShift web console server aggregates the CSP directives and values across - // its own default values and all enabled ConsolePlugin CRs, merging them into a single - // policy string that is sent to the browser via `Content-Security-Policy` HTTP response header. - // - // Example: - // ConsolePlugin A directives: - // script-src: https://script1.com/, https://script2.com/ - // font-src: https://font1.com/ - // - // ConsolePlugin B directives: - // script-src: https://script2.com/, https://script3.com/ - // font-src: https://font2.com/ - // img-src: https://img1.com/ - // - // Unified set of CSP directives, passed to the OpenShift web console server: - // script-src: https://script1.com/, https://script2.com/, https://script3.com/ - // font-src: https://font1.com/, https://font2.com/ - // img-src: https://img1.com/ - // - // OpenShift web console server CSP response header: - // Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none' - // - // +kubebuilder:validation:MaxItems=5 - // +kubebuilder:validation:XValidation:rule="self.map(x, x.values.map(y, y.size()).sum()).sum() < 8192",message="the total combined size of values of all directives must not exceed 8192 (8kb)" - // +listType=map - // +listMapKey=directive - // +optional - ContentSecurityPolicy []ConsolePluginCSP `json:"contentSecurityPolicy"` -} - -// DirectiveType is an enumeration of OpenShift web console supported CSP directives. -// LoadType is an enumeration of i18n loading types. -// +kubebuilder:validation:Enum:="DefaultSrc";"ScriptSrc";"StyleSrc";"ImgSrc";"FontSrc";"ConnectSrc" -// +enum -type DirectiveType string - -const ( - // DefaultSrc directive serves as a fallback for the other CSP fetch directives. - // For more information about the DefaultSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src - DefaultSrc DirectiveType = "DefaultSrc" - // ScriptSrc directive specifies valid sources for JavaScript. - // For more information about the ScriptSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src - ScriptSrc DirectiveType = "ScriptSrc" - // StyleSrc directive specifies valid sources for stylesheets. - // For more information about the StyleSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src - StyleSrc DirectiveType = "StyleSrc" - // ImgSrc directive specifies a valid sources of images and favicons. - // For more information about the ImgSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src - ImgSrc DirectiveType = "ImgSrc" - // FontSrc directive specifies valid sources for fonts loaded using @font-face. - // For more information about the FontSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src - FontSrc DirectiveType = "FontSrc" - // ConnectSrc directive restricts the URLs which can be loaded using script interfaces. - // For more information about the ConnectSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src - ConnectSrc DirectiveType = "ConnectSrc" -) - -// CSPDirectiveValue is single value for a Content-Security-Policy directive. -// Each directive value must have a maximum length of 1024 characters and must not contain -// whitespace, commas (,), semicolons (;) or single quotes ('). The value '*' is not permitted. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=1024 -// +kubebuilder:validation:XValidation:rule="!self.contains(\"'\")",message="CSP directive value cannot contain a quote" -// +kubebuilder:validation:XValidation:rule="!self.matches('\\\\s')",message="CSP directive value cannot contain a whitespace" -// +kubebuilder:validation:XValidation:rule="!self.contains(',')",message="CSP directive value cannot contain a comma" -// +kubebuilder:validation:XValidation:rule="!self.contains(';')",message="CSP directive value cannot contain a semi-colon" -// +kubebuilder:validation:XValidation:rule="self != '*'",message="CSP directive value cannot be a wildcard" -type CSPDirectiveValue string - -// ConsolePluginCSP holds configuration for a specific CSP directive -type ConsolePluginCSP struct { - // directive specifies which Content-Security-Policy directive to configure. - // Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. - // DefaultSrc directive serves as a fallback for the other CSP fetch directives. - // For more information about the DefaultSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src - // ScriptSrc directive specifies valid sources for JavaScript. - // For more information about the ScriptSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src - // StyleSrc directive specifies valid sources for stylesheets. - // For more information about the StyleSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src - // ImgSrc directive specifies a valid sources of images and favicons. - // For more information about the ImgSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src - // FontSrc directive specifies valid sources for fonts loaded using @font-face. - // For more information about the FontSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src - // ConnectSrc directive restricts the URLs which can be loaded using script interfaces. - // For more information about the ConnectSrc directive, see: - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src - // +required - Directive DirectiveType `json:"directive"` - // values defines an array of values to append to the console defaults for this directive. - // Each ConsolePlugin may define their own directives with their values. These will be set - // by the OpenShift web console's backend, as part of its Content-Security-Policy header. - // The array can contain at most 16 values. Each directive value must have a maximum length - // of 1024 characters and must not contain whitespace, commas (,), semicolons (;) or single - // quotes ('). The value '*' is not permitted. - // Each value in the array must be unique. - // - // +required - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))",message="each CSP directive value must be unique" - // +listType=atomic - Values []CSPDirectiveValue `json:"values"` -} - -// LoadType is an enumeration of i18n loading types -// +kubebuilder:validation:Enum:=Preload;Lazy;"" -type LoadType string - -const ( - // Preload will load all plugin's localization resources during - // loading of the plugin. - Preload LoadType = "Preload" - // Lazy wont preload any plugin's localization resources, instead - // will leave thier loading to runtime's lazy-loading. - Lazy LoadType = "Lazy" - // Empty is the default value of the LoadType field and it's - // purpose is to improve discoverability of the field. The - // the behaviour is equivalent to Lazy type. - Empty LoadType = "" -) - -// ConsolePluginI18n holds information on localization resources that are served by -// the dynamic plugin. -type ConsolePluginI18n struct { - // loadType indicates how the plugin's localization resource should be loaded. - // Valid values are Preload, Lazy and the empty string. - // When set to Preload, all localization resources are fetched when the plugin is loaded. - // When set to Lazy, localization resources are lazily loaded as and when they are required by the console. - // When omitted or set to the empty string, the behaviour is equivalent to Lazy type. - // +required - LoadType LoadType `json:"loadType"` -} - -// ConsolePluginProxy holds information on various service types -// to which console's backend will proxy the plugin's requests. -type ConsolePluginProxy struct { - // endpoint provides information about endpoint to which the request is proxied to. - // +required - Endpoint ConsolePluginProxyEndpoint `json:"endpoint"` - // alias is a proxy name that identifies the plugin's proxy. An alias name - // should be unique per plugin. The console backend exposes following - // proxy endpoint: - // - // /api/proxy/plugin///? - // - // Request example path: - // - // /api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver - // - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +kubebuilder:validation:Pattern=`^[A-Za-z0-9-_]+$` - Alias string `json:"alias"` - // caCertificate provides the cert authority certificate contents, - // in case the proxied Service is using custom service CA. - // By default, the service CA bundle provided by the service-ca operator is used. - // +kubebuilder:validation:Pattern=`^-----BEGIN CERTIFICATE-----([\s\S]*)-----END CERTIFICATE-----\s?$` - // +optional - CACertificate string `json:"caCertificate,omitempty"` - // authorization provides information about authorization type, - // which the proxied request should contain - // +kubebuilder:default:="None" - // +optional - Authorization AuthorizationType `json:"authorization,omitempty"` -} - -// ConsolePluginProxyEndpoint holds information about the endpoint to which -// request will be proxied to. -// +union -type ConsolePluginProxyEndpoint struct { - // type is the type of the console plugin's proxy. Currently only "Service" is supported. - // - // --- - // + When handling unknown values, consumers should report an error and stop processing the plugin. - // - // +required - // +unionDiscriminator - Type ConsolePluginProxyType `json:"type"` - // service is an in-cluster Service that the plugin will connect to. - // The Service must use HTTPS. The console backend exposes an endpoint - // in order to proxy communication between the plugin and the Service. - // Note: service field is required for now, since currently only "Service" - // type is supported. - // +optional - Service *ConsolePluginProxyServiceConfig `json:"service,omitempty"` -} - -// ProxyType is an enumeration of available proxy types -// +kubebuilder:validation:Enum:=Service -type ConsolePluginProxyType string - -const ( - // ProxyTypeService is used when proxying communication to a Service - ProxyTypeService ConsolePluginProxyType = "Service" -) - -// AuthorizationType is an enumerate of available authorization types -// +kubebuilder:validation:Enum:=UserToken;None -type AuthorizationType string - -const ( - // UserToken indicates that the proxied request should contain the logged-in user's - // OpenShift access token in the "Authorization" request header. For example: - // - // Authorization: Bearer sha256~kV46hPnEYhCWFnB85r5NrprAxggzgb6GOeLbgcKNsH0 - // - UserToken AuthorizationType = "UserToken" - // None indicates that proxied request wont contain authorization of any type. - None AuthorizationType = "None" -) - -// ProxyTypeServiceConfig holds information on Service to which -// console's backend will proxy the plugin's requests. -type ConsolePluginProxyServiceConfig struct { - // name of Service that the plugin needs to connect to. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Name string `json:"name"` - // namespace of Service that the plugin needs to connect to - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Namespace string `json:"namespace"` - // port on which the Service that the plugin needs to connect to - // is listening on. - // +required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - Port int32 `json:"port"` -} - -// ConsolePluginBackendType is an enumeration of available backend types -// +kubebuilder:validation:Enum:=Service -type ConsolePluginBackendType string - -const ( - // Service is used when plugin's backend is served by a Kubernetes Service - Service ConsolePluginBackendType = "Service" -) - -// ConsolePluginBackend holds information about the endpoint which serves -// the console's plugin -// +union -type ConsolePluginBackend struct { - // type is the backend type which servers the console's plugin. Currently only "Service" is supported. - // - // --- - // + When handling unknown values, consumers should report an error and stop processing the plugin. - // - // +required - // +unionDiscriminator - Type ConsolePluginBackendType `json:"type"` - // service is a Kubernetes Service that exposes the plugin using a - // deployment with an HTTP server. The Service must use HTTPS and - // Service serving certificate. The console backend will proxy the - // plugins assets from the Service using the service CA bundle. - // +optional - Service *ConsolePluginService `json:"service,omitempty"` -} - -// ConsolePluginService holds information on Service that is serving -// console dynamic plugin assets. -type ConsolePluginService struct { - // name of Service that is serving the plugin assets. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Name string `json:"name"` - // namespace of Service that is serving the plugin assets. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - Namespace string `json:"namespace"` - // port on which the Service that is serving the plugin is listening to. - // +required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - Port int32 `json:"port"` - // basePath is the path to the plugin's assets. The primary asset it the - // manifest file called `plugin-manifest.json`, which is a JSON document - // that contains metadata about the plugin and the extensions. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9.\-_~!$&'()*+,;=:@\/]*$` - // +kubebuilder:default:="/" - // +optional - BasePath string `json:"basePath,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=1 - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ConsolePluginList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsolePlugin `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_quick_start.go b/vendor/github.com/openshift/api/console/v1/types_console_quick_start.go deleted file mode 100644 index 1eef701e8..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_quick_start.go +++ /dev/null @@ -1,138 +0,0 @@ -package v1 - -import ( - authorizationv1 "k8s.io/api/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ConsoleQuickStart is an extension for guiding user through various -// workflows in the OpenShift web console. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consolequickstarts,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/750 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for guiding user through various workflows in the OpenShift web console." -// +kubebuilder:metadata:annotations="displayName=ConsoleQuickStart" -// +openshift:compatibility-gen:level=2 -type ConsoleQuickStart struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +required - Spec ConsoleQuickStartSpec `json:"spec"` -} - -// ConsoleQuickStartSpec is the desired quick start configuration. -type ConsoleQuickStartSpec struct { - // displayName is the display name of the Quick Start. - // +kubebuilder:validation:MinLength=1 - // +required - DisplayName string `json:"displayName"` - // icon is a base64 encoded image that will be displayed beside the Quick Start display name. - // The icon should be an vector image for easy scaling. The size of the icon should be 40x40. - // +optional - Icon string `json:"icon,omitempty"` - // tags is a list of strings that describe the Quick Start. - // +optional - Tags []string `json:"tags,omitempty"` - // durationMinutes describes approximately how many minutes it will take to complete the Quick Start. - // +kubebuilder:validation:Minimum=1 - // +required - DurationMinutes int `json:"durationMinutes"` - // description is the description of the Quick Start. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +required - Description string `json:"description"` - // prerequisites contains all prerequisites that need to be met before taking a Quick Start. (includes markdown) - // +optional - Prerequisites []string `json:"prerequisites,omitempty"` - // introduction describes the purpose of the Quick Start. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +required - Introduction string `json:"introduction"` - // tasks is the list of steps the user has to perform to complete the Quick Start. - // +kubebuilder:validation:MinItems=1 - // +required - Tasks []ConsoleQuickStartTask `json:"tasks"` - // conclusion sums up the Quick Start and suggests the possible next steps. (includes markdown) - // +optional - Conclusion string `json:"conclusion,omitempty"` - // nextQuickStart is a list of the following Quick Starts, suggested for the user to try. - // +optional - NextQuickStart []string `json:"nextQuickStart,omitempty"` - // accessReviewResources contains a list of resources that the user's access - // will be reviewed against in order for the user to complete the Quick Start. - // The Quick Start will be hidden if any of the access reviews fail. - // +optional - AccessReviewResources []authorizationv1.ResourceAttributes `json:"accessReviewResources,omitempty"` -} - -// ConsoleQuickStartTask is a single step in a Quick Start. -type ConsoleQuickStartTask struct { - // title describes the task and is displayed as a step heading. - // +kubebuilder:validation:MinLength=1 - // +required - Title string `json:"title"` - // description describes the steps needed to complete the task. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +required - Description string `json:"description"` - // review contains instructions to validate the task is complete. The user will select 'Yes' or 'No'. - // using a radio button, which indicates whether the step was completed successfully. - // +optional - Review *ConsoleQuickStartTaskReview `json:"review,omitempty"` - // summary contains information about the passed step. - // +optional - Summary *ConsoleQuickStartTaskSummary `json:"summary,omitempty"` -} - -// ConsoleQuickStartTaskReview contains instructions that validate a task was completed successfully. -type ConsoleQuickStartTaskReview struct { - // instructions contains steps that user needs to take in order - // to validate his work after going through a task. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +required - Instructions string `json:"instructions"` - // failedTaskHelp contains suggestions for a failed task review and is shown at the end of task. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +required - FailedTaskHelp string `json:"failedTaskHelp"` -} - -// ConsoleQuickStartTaskSummary contains information about a passed step. -type ConsoleQuickStartTaskSummary struct { - // success describes the succesfully passed task. - // +kubebuilder:validation:MinLength=1 - // +required - Success string `json:"success"` - // failed briefly describes the unsuccessfully passed task. (includes markdown) - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Failed string `json:"failed"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleQuickStartList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleQuickStart `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_sample.go b/vendor/github.com/openshift/api/console/v1/types_console_sample.go deleted file mode 100644 index c296059b7..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_sample.go +++ /dev/null @@ -1,273 +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 - -// ConsoleSample is an extension to customizing OpenShift web console by adding samples. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consolesamples,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=ConsoleSample is an extension to customizing OpenShift web console by adding samples." -// +kubebuilder:metadata:annotations="displayName=ConsoleSample" -// +openshift:compatibility-gen:level=1 -type ConsoleSample struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec contains configuration for a console sample. - // +required - Spec ConsoleSampleSpec `json:"spec"` -} - -// ConsoleSampleSpec is the desired sample for the web console. -// Samples will appear with their title, descriptions and a badge in a samples catalog. -type ConsoleSampleSpec struct { - // title is the display name of the sample. - // - // It is required and must be no more than 50 characters in length. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=50 - Title string `json:"title"` - - // abstract is a short introduction to the sample. - // - // It is required and must be no more than 100 characters in length. - // - // The abstract is shown on the sample card tile below the title and provider - // and is limited to three lines of content. - // +required - // +kubebuilder:validation:MaxLength=100 - Abstract string `json:"abstract"` - - // description is a long form explanation of the sample. - // - // It is required and can have a maximum length of **4096** characters. - // - // It is a README.md-like content for additional information, links, pre-conditions, and other instructions. - // It will be rendered as Markdown so that it can contain line breaks, links, and other simple formatting. - // +required - // +kubebuilder:validation:MaxLength=4096 - Description string `json:"description"` - - // icon is an optional base64 encoded image and shown beside the sample title. - // - // The format must follow the data: URL format and can have a maximum size of **10 KB**. - // - // data:[][;base64], - // - // For example: - // - // data:image;base64, plus the base64 encoded image. - // - // Vector images can also be used. SVG icons must start with: - // - // data:image/svg+xml;base64, plus the base64 encoded SVG image. - // - // All sample catalog icons will be shown on a white background (also when the dark theme is used). - // The web console ensures that different aspect ratios work correctly. - // Currently, the surface of the icon is at most 40x100px. - // - // For more information on the data URL format, please visit - // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs. - // +optional - // +kubebuilder:validation:Pattern=`^data:([a-z/\.+0-9]*;(([-a-zA-Z0-9=])*;)?)?base64,` - // +kubebuilder:validation:MaxLength=14000 - Icon string `json:"icon"` - - // type is an optional label to group multiple samples. - // - // It is optional and must be no more than 20 characters in length. - // - // Recommendation is a singular term like "Builder Image", "Devfile" or "Serverless Function". - // - // Currently, the type is shown a badge on the sample card tile in the top right corner. - // +optional - // +kubebuilder:validation:MaxLength=20 - Type string `json:"type"` - - // provider is an optional label to honor who provides the sample. - // - // It is optional and must be no more than 50 characters in length. - // - // A provider can be a company like "Red Hat" or an organization like "CNCF" or "Knative". - // - // Currently, the provider is only shown on the sample card tile below the title with the prefix "Provided by " - // +optional - // +kubebuilder:validation:MaxLength=50 - Provider string `json:"provider"` - - // tags are optional string values that can be used to find samples in the samples catalog. - // - // Examples of common tags may be "Java", "Quarkus", etc. - // - // They will be displayed on the samples details page. - // +optional - // +listType=set - // +kubebuilder:validation:MaxItems:=10 - Tags []string `json:"tags"` - - // source defines where to deploy the sample service from. - // The sample may be sourced from an external git repository or container image. - // +required - Source ConsoleSampleSource `json:"source"` -} - -// ConsoleSampleSourceType is an enumeration of the supported sample types. -// Unsupported samples types will be ignored in the web console. -// +kubebuilder:validation:Enum:="GitImport";"ContainerImport" -// +enum -type ConsoleSampleSourceType string - -const ( - // A sample that let the user import code from a git repository. - GitImport ConsoleSampleSourceType = "GitImport" - // A sample that let the user import a container image. - ContainerImport ConsoleSampleSourceType = "ContainerImport" -) - -// ConsoleSampleSource is the actual sample definition and can hold different sample types. -// Unsupported sample types will be ignored in the web console. -// +union -// +kubebuilder:validation:XValidation:rule="self.type == 'GitImport' ? has(self.gitImport) : !has(self.gitImport)",message="source.gitImport is required when source.type is GitImport, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="self.type == 'ContainerImport' ? has(self.containerImport) : !has(self.containerImport)",message="source.containerImport is required when source.type is ContainerImport, and forbidden otherwise" -type ConsoleSampleSource struct { - // type of the sample, currently supported: "GitImport";"ContainerImport" - // +unionDiscriminator - // +required - Type ConsoleSampleSourceType `json:"type"` - - // gitImport allows the user to import code from a git repository. - // +unionMember - // +optional - GitImport *ConsoleSampleGitImportSource `json:"gitImport,omitempty"` - - // containerImport allows the user import a container image. - // +unionMember - // +optional - ContainerImport *ConsoleSampleContainerImportSource `json:"containerImport,omitempty"` -} - -// ConsoleSampleGitImportSource let the user import code from a public Git repository. -type ConsoleSampleGitImportSource struct { - // repository contains the reference to the actual Git repository. - // +required - Repository ConsoleSampleGitImportSourceRepository `json:"repository"` - // service contains configuration for the Service resource created for this sample. - // +optional - // +kubebuilder:default={"targetPort": 8080} - // +default:={"targetPort": 8080} - Service ConsoleSampleGitImportSourceService `json:"service"` -} - -// ConsoleSampleGitImportSourceRepository let the user import code from a public git repository. -type ConsoleSampleGitImportSourceRepository struct { - // url of the Git repository that contains a HTTP service. - // The HTTP service must be exposed on the default port (8080) unless - // otherwise configured with the port field. - // - // Only public repositories on GitHub, GitLab and Bitbucket are currently supported: - // - // - https://github.com// - // - https://gitlab.com// - // - https://bitbucket.org// - // - // The url must have a maximum length of 256 characters. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern=`^https:\/\/(github.com|gitlab.com|bitbucket.org)\/[a-zA-Z0-9-]+\/[a-zA-Z0-9-]+(.git)?$` - URL string `json:"url"` - // revision is the git revision at which to clone the git repository - // Can be used to clone a specific branch, tag or commit SHA. - // Must be at most 256 characters in length. - // When omitted the repository's default branch is used. - // +optional - // +kubebuilder:validation:MaxLength=256 - Revision string `json:"revision"` - // contextDir is used to specify a directory within the repository to build the - // component. - // Must start with `/` and have a maximum length of 256 characters. - // When omitted, the default value is to build from the root of the repository. - // +optional - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:Pattern=`^/` - ContextDir string `json:"contextDir"` -} - -// ConsoleSampleGitImportSourceService let the samples author define defaults -// for the Service created for this sample. -type ConsoleSampleGitImportSourceService struct { - // targetPort is the port that the service listens on for HTTP requests. - // This port will be used for Service created for this sample. - // Port must be in the range 1 to 65535. - // Default port is 8080. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=8080 - // +default:=8080 - TargetPort int32 `json:"targetPort,omitempty"` -} - -// ConsoleSampleContainerImportSource let the user import a container image. -type ConsoleSampleContainerImportSource struct { - // reference to a container image that provides a HTTP service. - // The service must be exposed on the default port (8080) unless - // otherwise configured with the port field. - // - // Supported formats: - // - / - // - docker.io// - // - quay.io// - // - quay.io//@sha256: - // - quay.io//: - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=256 - Image string `json:"image"` - // service contains configuration for the Service resource created for this sample. - // +optional - // +kubebuilder:default={"targetPort": 8080} - // +default:={"targetPort": 8080} - Service ConsoleSampleContainerImportSourceService `json:"service"` -} - -// ConsoleSampleContainerImportSourceService let the samples author define defaults -// for the Service created for this sample. -type ConsoleSampleContainerImportSourceService struct { - // targetPort is the port that the service listens on for HTTP requests. - // This port will be used for Service and Route created for this sample. - // Port must be in the range 1 to 65535. - // Default port is 8080. - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=8080 - // +default:=8080 - TargetPort int32 `json:"targetPort,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConsoleSampleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleSample `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/types_console_yaml_sample.go b/vendor/github.com/openshift/api/console/v1/types_console_yaml_sample.go deleted file mode 100644 index 9cdfa53f4..000000000 --- a/vendor/github.com/openshift/api/console/v1/types_console_yaml_sample.go +++ /dev/null @@ -1,74 +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 - -// ConsoleYAMLSample is an extension for customizing OpenShift web console YAML samples. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoleyamlsamples,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/481 -// +openshift:file-pattern=operatorOrdering=00 -// +openshift:capability=Console -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift web console YAML samples." -// +kubebuilder:metadata:annotations="displayName=ConsoleYAMLSample" -// +openshift:compatibility-gen:level=2 -type ConsoleYAMLSample struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - Spec ConsoleYAMLSampleSpec `json:"spec"` -} - -// ConsoleYAMLSampleSpec is the desired YAML sample configuration. -// Samples will appear with their descriptions in a samples sidebar -// when creating a resources in the web console. -type ConsoleYAMLSampleSpec struct { - // targetResource contains apiVersion and kind of the resource - // YAML sample is representating. - TargetResource metav1.TypeMeta `json:"targetResource"` - // title of the YAML sample. - Title ConsoleYAMLSampleTitle `json:"title"` - // description of the YAML sample. - Description ConsoleYAMLSampleDescription `json:"description"` - // yaml is the YAML sample to display. - YAML ConsoleYAMLSampleYAML `json:"yaml"` - // snippet indicates that the YAML sample is not the full YAML resource - // definition, but a fragment that can be inserted into the existing - // YAML document at the user's cursor. - // +optional - Snippet bool `json:"snippet"` -} - -// ConsoleYAMLSampleTitle of the YAML sample. -// +kubebuilder:validation:Pattern=`^(.|\s)*\S(.|\s)*$` -type ConsoleYAMLSampleTitle string - -// ConsoleYAMLSampleDescription of the YAML sample. -// +kubebuilder:validation:Pattern=`^(.|\s)*\S(.|\s)*$` -type ConsoleYAMLSampleDescription string - -// ConsoleYAMLSampleYAML is the YAML sample to display. -// +kubebuilder:validation:Pattern=`^(.|\s)*\S(.|\s)*$` -type ConsoleYAMLSampleYAML string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type ConsoleYAMLSampleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ConsoleYAMLSample `json:"items"` -} diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go deleted file mode 100644 index 7bb91394e..000000000 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1062 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - authorizationv1 "k8s.io/api/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *ApplicationMenuSpec) DeepCopyInto(out *ApplicationMenuSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ApplicationMenuSpec. -func (in *ApplicationMenuSpec) DeepCopy() *ApplicationMenuSpec { - if in == nil { - return nil - } - out := new(ApplicationMenuSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CLIDownloadLink) DeepCopyInto(out *CLIDownloadLink) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CLIDownloadLink. -func (in *CLIDownloadLink) DeepCopy() *CLIDownloadLink { - if in == nil { - return nil - } - out := new(CLIDownloadLink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleCLIDownload) DeepCopyInto(out *ConsoleCLIDownload) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownload. -func (in *ConsoleCLIDownload) DeepCopy() *ConsoleCLIDownload { - if in == nil { - return nil - } - out := new(ConsoleCLIDownload) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleCLIDownload) 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 *ConsoleCLIDownloadList) DeepCopyInto(out *ConsoleCLIDownloadList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleCLIDownload, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownloadList. -func (in *ConsoleCLIDownloadList) DeepCopy() *ConsoleCLIDownloadList { - if in == nil { - return nil - } - out := new(ConsoleCLIDownloadList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleCLIDownloadList) 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 *ConsoleCLIDownloadSpec) DeepCopyInto(out *ConsoleCLIDownloadSpec) { - *out = *in - if in.Links != nil { - in, out := &in.Links, &out.Links - *out = make([]CLIDownloadLink, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCLIDownloadSpec. -func (in *ConsoleCLIDownloadSpec) DeepCopy() *ConsoleCLIDownloadSpec { - if in == nil { - return nil - } - out := new(ConsoleCLIDownloadSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleExternalLogLink) DeepCopyInto(out *ConsoleExternalLogLink) { - *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 ConsoleExternalLogLink. -func (in *ConsoleExternalLogLink) DeepCopy() *ConsoleExternalLogLink { - if in == nil { - return nil - } - out := new(ConsoleExternalLogLink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleExternalLogLink) 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 *ConsoleExternalLogLinkList) DeepCopyInto(out *ConsoleExternalLogLinkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleExternalLogLink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleExternalLogLinkList. -func (in *ConsoleExternalLogLinkList) DeepCopy() *ConsoleExternalLogLinkList { - if in == nil { - return nil - } - out := new(ConsoleExternalLogLinkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleExternalLogLinkList) 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 *ConsoleExternalLogLinkSpec) DeepCopyInto(out *ConsoleExternalLogLinkSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleExternalLogLinkSpec. -func (in *ConsoleExternalLogLinkSpec) DeepCopy() *ConsoleExternalLogLinkSpec { - if in == nil { - return nil - } - out := new(ConsoleExternalLogLinkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleLink) DeepCopyInto(out *ConsoleLink) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLink. -func (in *ConsoleLink) DeepCopy() *ConsoleLink { - if in == nil { - return nil - } - out := new(ConsoleLink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleLink) 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 *ConsoleLinkList) DeepCopyInto(out *ConsoleLinkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleLink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLinkList. -func (in *ConsoleLinkList) DeepCopy() *ConsoleLinkList { - if in == nil { - return nil - } - out := new(ConsoleLinkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleLinkList) 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 *ConsoleLinkSpec) DeepCopyInto(out *ConsoleLinkSpec) { - *out = *in - out.Link = in.Link - if in.ApplicationMenu != nil { - in, out := &in.ApplicationMenu, &out.ApplicationMenu - *out = new(ApplicationMenuSpec) - **out = **in - } - if in.NamespaceDashboard != nil { - in, out := &in.NamespaceDashboard, &out.NamespaceDashboard - *out = new(NamespaceDashboardSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleLinkSpec. -func (in *ConsoleLinkSpec) DeepCopy() *ConsoleLinkSpec { - if in == nil { - return nil - } - out := new(ConsoleLinkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleNotification) DeepCopyInto(out *ConsoleNotification) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotification. -func (in *ConsoleNotification) DeepCopy() *ConsoleNotification { - if in == nil { - return nil - } - out := new(ConsoleNotification) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleNotification) 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 *ConsoleNotificationList) DeepCopyInto(out *ConsoleNotificationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleNotification, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotificationList. -func (in *ConsoleNotificationList) DeepCopy() *ConsoleNotificationList { - if in == nil { - return nil - } - out := new(ConsoleNotificationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleNotificationList) 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 *ConsoleNotificationSpec) DeepCopyInto(out *ConsoleNotificationSpec) { - *out = *in - if in.Link != nil { - in, out := &in.Link, &out.Link - *out = new(Link) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleNotificationSpec. -func (in *ConsoleNotificationSpec) DeepCopy() *ConsoleNotificationSpec { - if in == nil { - return nil - } - out := new(ConsoleNotificationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePlugin) DeepCopyInto(out *ConsolePlugin) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePlugin. -func (in *ConsolePlugin) DeepCopy() *ConsolePlugin { - if in == nil { - return nil - } - out := new(ConsolePlugin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsolePlugin) 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 *ConsolePluginBackend) DeepCopyInto(out *ConsolePluginBackend) { - *out = *in - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ConsolePluginService) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginBackend. -func (in *ConsolePluginBackend) DeepCopy() *ConsolePluginBackend { - if in == nil { - return nil - } - out := new(ConsolePluginBackend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginCSP) DeepCopyInto(out *ConsolePluginCSP) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]CSPDirectiveValue, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginCSP. -func (in *ConsolePluginCSP) DeepCopy() *ConsolePluginCSP { - if in == nil { - return nil - } - out := new(ConsolePluginCSP) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginI18n) DeepCopyInto(out *ConsolePluginI18n) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginI18n. -func (in *ConsolePluginI18n) DeepCopy() *ConsolePluginI18n { - if in == nil { - return nil - } - out := new(ConsolePluginI18n) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginList) DeepCopyInto(out *ConsolePluginList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsolePlugin, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginList. -func (in *ConsolePluginList) DeepCopy() *ConsolePluginList { - if in == nil { - return nil - } - out := new(ConsolePluginList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsolePluginList) 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 *ConsolePluginProxy) DeepCopyInto(out *ConsolePluginProxy) { - *out = *in - in.Endpoint.DeepCopyInto(&out.Endpoint) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginProxy. -func (in *ConsolePluginProxy) DeepCopy() *ConsolePluginProxy { - if in == nil { - return nil - } - out := new(ConsolePluginProxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginProxyEndpoint) DeepCopyInto(out *ConsolePluginProxyEndpoint) { - *out = *in - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ConsolePluginProxyServiceConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginProxyEndpoint. -func (in *ConsolePluginProxyEndpoint) DeepCopy() *ConsolePluginProxyEndpoint { - if in == nil { - return nil - } - out := new(ConsolePluginProxyEndpoint) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginProxyServiceConfig) DeepCopyInto(out *ConsolePluginProxyServiceConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginProxyServiceConfig. -func (in *ConsolePluginProxyServiceConfig) DeepCopy() *ConsolePluginProxyServiceConfig { - if in == nil { - return nil - } - out := new(ConsolePluginProxyServiceConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginService) DeepCopyInto(out *ConsolePluginService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginService. -func (in *ConsolePluginService) DeepCopy() *ConsolePluginService { - if in == nil { - return nil - } - out := new(ConsolePluginService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsolePluginSpec) DeepCopyInto(out *ConsolePluginSpec) { - *out = *in - in.Backend.DeepCopyInto(&out.Backend) - if in.Proxy != nil { - in, out := &in.Proxy, &out.Proxy - *out = make([]ConsolePluginProxy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.I18n = in.I18n - if in.ContentSecurityPolicy != nil { - in, out := &in.ContentSecurityPolicy, &out.ContentSecurityPolicy - *out = make([]ConsolePluginCSP, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsolePluginSpec. -func (in *ConsolePluginSpec) DeepCopy() *ConsolePluginSpec { - if in == nil { - return nil - } - out := new(ConsolePluginSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleQuickStart) DeepCopyInto(out *ConsoleQuickStart) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStart. -func (in *ConsoleQuickStart) DeepCopy() *ConsoleQuickStart { - if in == nil { - return nil - } - out := new(ConsoleQuickStart) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleQuickStart) 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 *ConsoleQuickStartList) DeepCopyInto(out *ConsoleQuickStartList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleQuickStart, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStartList. -func (in *ConsoleQuickStartList) DeepCopy() *ConsoleQuickStartList { - if in == nil { - return nil - } - out := new(ConsoleQuickStartList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleQuickStartList) 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 *ConsoleQuickStartSpec) DeepCopyInto(out *ConsoleQuickStartSpec) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Prerequisites != nil { - in, out := &in.Prerequisites, &out.Prerequisites - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Tasks != nil { - in, out := &in.Tasks, &out.Tasks - *out = make([]ConsoleQuickStartTask, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.NextQuickStart != nil { - in, out := &in.NextQuickStart, &out.NextQuickStart - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AccessReviewResources != nil { - in, out := &in.AccessReviewResources, &out.AccessReviewResources - *out = make([]authorizationv1.ResourceAttributes, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStartSpec. -func (in *ConsoleQuickStartSpec) DeepCopy() *ConsoleQuickStartSpec { - if in == nil { - return nil - } - out := new(ConsoleQuickStartSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleQuickStartTask) DeepCopyInto(out *ConsoleQuickStartTask) { - *out = *in - if in.Review != nil { - in, out := &in.Review, &out.Review - *out = new(ConsoleQuickStartTaskReview) - **out = **in - } - if in.Summary != nil { - in, out := &in.Summary, &out.Summary - *out = new(ConsoleQuickStartTaskSummary) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStartTask. -func (in *ConsoleQuickStartTask) DeepCopy() *ConsoleQuickStartTask { - if in == nil { - return nil - } - out := new(ConsoleQuickStartTask) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleQuickStartTaskReview) DeepCopyInto(out *ConsoleQuickStartTaskReview) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStartTaskReview. -func (in *ConsoleQuickStartTaskReview) DeepCopy() *ConsoleQuickStartTaskReview { - if in == nil { - return nil - } - out := new(ConsoleQuickStartTaskReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleQuickStartTaskSummary) DeepCopyInto(out *ConsoleQuickStartTaskSummary) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleQuickStartTaskSummary. -func (in *ConsoleQuickStartTaskSummary) DeepCopy() *ConsoleQuickStartTaskSummary { - if in == nil { - return nil - } - out := new(ConsoleQuickStartTaskSummary) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSample) DeepCopyInto(out *ConsoleSample) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSample. -func (in *ConsoleSample) DeepCopy() *ConsoleSample { - if in == nil { - return nil - } - out := new(ConsoleSample) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleSample) 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 *ConsoleSampleContainerImportSource) DeepCopyInto(out *ConsoleSampleContainerImportSource) { - *out = *in - out.Service = in.Service - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleContainerImportSource. -func (in *ConsoleSampleContainerImportSource) DeepCopy() *ConsoleSampleContainerImportSource { - if in == nil { - return nil - } - out := new(ConsoleSampleContainerImportSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleContainerImportSourceService) DeepCopyInto(out *ConsoleSampleContainerImportSourceService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleContainerImportSourceService. -func (in *ConsoleSampleContainerImportSourceService) DeepCopy() *ConsoleSampleContainerImportSourceService { - if in == nil { - return nil - } - out := new(ConsoleSampleContainerImportSourceService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleGitImportSource) DeepCopyInto(out *ConsoleSampleGitImportSource) { - *out = *in - out.Repository = in.Repository - out.Service = in.Service - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleGitImportSource. -func (in *ConsoleSampleGitImportSource) DeepCopy() *ConsoleSampleGitImportSource { - if in == nil { - return nil - } - out := new(ConsoleSampleGitImportSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleGitImportSourceRepository) DeepCopyInto(out *ConsoleSampleGitImportSourceRepository) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleGitImportSourceRepository. -func (in *ConsoleSampleGitImportSourceRepository) DeepCopy() *ConsoleSampleGitImportSourceRepository { - if in == nil { - return nil - } - out := new(ConsoleSampleGitImportSourceRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleGitImportSourceService) DeepCopyInto(out *ConsoleSampleGitImportSourceService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleGitImportSourceService. -func (in *ConsoleSampleGitImportSourceService) DeepCopy() *ConsoleSampleGitImportSourceService { - if in == nil { - return nil - } - out := new(ConsoleSampleGitImportSourceService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleList) DeepCopyInto(out *ConsoleSampleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleSample, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleList. -func (in *ConsoleSampleList) DeepCopy() *ConsoleSampleList { - if in == nil { - return nil - } - out := new(ConsoleSampleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleSampleList) 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 *ConsoleSampleSource) DeepCopyInto(out *ConsoleSampleSource) { - *out = *in - if in.GitImport != nil { - in, out := &in.GitImport, &out.GitImport - *out = new(ConsoleSampleGitImportSource) - **out = **in - } - if in.ContainerImport != nil { - in, out := &in.ContainerImport, &out.ContainerImport - *out = new(ConsoleSampleContainerImportSource) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleSource. -func (in *ConsoleSampleSource) DeepCopy() *ConsoleSampleSource { - if in == nil { - return nil - } - out := new(ConsoleSampleSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSampleSpec) DeepCopyInto(out *ConsoleSampleSpec) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.Source.DeepCopyInto(&out.Source) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSampleSpec. -func (in *ConsoleSampleSpec) DeepCopy() *ConsoleSampleSpec { - if in == nil { - return nil - } - out := new(ConsoleSampleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleYAMLSample) DeepCopyInto(out *ConsoleYAMLSample) { - *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 ConsoleYAMLSample. -func (in *ConsoleYAMLSample) DeepCopy() *ConsoleYAMLSample { - if in == nil { - return nil - } - out := new(ConsoleYAMLSample) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleYAMLSample) 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 *ConsoleYAMLSampleList) DeepCopyInto(out *ConsoleYAMLSampleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ConsoleYAMLSample, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleYAMLSampleList. -func (in *ConsoleYAMLSampleList) DeepCopy() *ConsoleYAMLSampleList { - if in == nil { - return nil - } - out := new(ConsoleYAMLSampleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleYAMLSampleList) 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 *ConsoleYAMLSampleSpec) DeepCopyInto(out *ConsoleYAMLSampleSpec) { - *out = *in - out.TargetResource = in.TargetResource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleYAMLSampleSpec. -func (in *ConsoleYAMLSampleSpec) DeepCopy() *ConsoleYAMLSampleSpec { - if in == nil { - return nil - } - out := new(ConsoleYAMLSampleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Link) DeepCopyInto(out *Link) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Link. -func (in *Link) DeepCopy() *Link { - if in == nil { - return nil - } - out := new(Link) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceDashboardSpec) DeepCopyInto(out *NamespaceDashboardSpec) { - *out = *in - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceDashboardSpec. -func (in *NamespaceDashboardSpec) DeepCopy() *NamespaceDashboardSpec { - if in == nil { - return nil - } - out := new(NamespaceDashboardSpec) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 26524d0a1..000000000 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,225 +0,0 @@ -consoleclidownloads.console.openshift.io: - Annotations: - description: Extension for configuring openshift web console command line interface - (CLI) downloads. - displayName: ConsoleCLIDownload - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consoleclidownloads.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: true - KindName: ConsoleCLIDownload - Labels: {} - PluralName: consoleclidownloads - PrinterColumns: - - jsonPath: .spec.displayName - name: Display name - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consoleexternalloglinks.console.openshift.io: - Annotations: - description: ConsoleExternalLogLink is an extension for customizing OpenShift - web console log links. - displayName: ConsoleExternalLogLinks - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consoleexternalloglinks.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: true - KindName: ConsoleExternalLogLink - Labels: {} - PluralName: consoleexternalloglinks - PrinterColumns: - - jsonPath: .spec.text - name: Text - type: string - - jsonPath: .spec.hrefTemplate - name: HrefTemplate - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consolelinks.console.openshift.io: - Annotations: - description: Extension for customizing OpenShift web console links - displayName: ConsoleLinks - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consolelinks.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: true - KindName: ConsoleLink - Labels: {} - PluralName: consolelinks - PrinterColumns: - - jsonPath: .spec.text - name: Text - type: string - - jsonPath: .spec.href - name: URL - type: string - - jsonPath: .spec.location - name: Location - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consolenotifications.console.openshift.io: - Annotations: - description: Extension for configuring openshift web console notifications. - displayName: ConsoleNotification - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consolenotifications.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: true - KindName: ConsoleNotification - Labels: {} - PluralName: consolenotifications - PrinterColumns: - - jsonPath: .spec.text - name: Text - type: string - - jsonPath: .spec.location - name: Location - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consoleplugins.console.openshift.io: - Annotations: - description: Extension for configuring openshift web console plugins. - displayName: ConsolePlugin - service.beta.openshift.io/inject-cabundle: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1186 - CRDName: consoleplugins.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "90" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: false - KindName: ConsolePlugin - Labels: {} - PluralName: consoleplugins - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consolequickstarts.console.openshift.io: - Annotations: - description: Extension for guiding user through various workflows in the OpenShift - web console. - displayName: ConsoleQuickStart - ApprovedPRNumber: https://github.com/openshift/api/pull/750 - CRDName: consolequickstarts.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: false - KindName: ConsoleQuickStart - Labels: {} - PluralName: consolequickstarts - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consolesamples.console.openshift.io: - Annotations: - description: ConsoleSample is an extension to customizing OpenShift web console - by adding samples. - displayName: ConsoleSample - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consolesamples.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: false - KindName: ConsoleSample - Labels: {} - PluralName: consolesamples - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consoleyamlsamples.console.openshift.io: - Annotations: - description: Extension for configuring openshift web console YAML samples. - displayName: ConsoleYAMLSample - ApprovedPRNumber: https://github.com/openshift/api/pull/481 - CRDName: consoleyamlsamples.console.openshift.io - Capability: Console - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: console.openshift.io - HasStatus: false - KindName: ConsoleYAMLSample - Labels: {} - PluralName: consoleyamlsamples - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/console/v1/zz_generated.model_name.go deleted file mode 100644 index d5c9c2bc5..000000000 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.model_name.go +++ /dev/null @@ -1,226 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ApplicationMenuSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ApplicationMenuSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CLIDownloadLink) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.CLIDownloadLink" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleCLIDownload) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleCLIDownload" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleCLIDownloadList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleCLIDownloadList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleCLIDownloadSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleCLIDownloadSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleExternalLogLink) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleExternalLogLink" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleExternalLogLinkList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleExternalLogLinkList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleExternalLogLinkSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleExternalLogLinkSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleLink) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleLink" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleLinkList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleLinkList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleLinkSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleLinkSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleNotification) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleNotification" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleNotificationList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleNotificationList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleNotificationSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleNotificationSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePlugin) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePlugin" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginBackend) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginBackend" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginCSP) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginCSP" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginI18n) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginI18n" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginProxy) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginProxy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginProxyEndpoint) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginProxyEndpoint" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginProxyServiceConfig) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginProxyServiceConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginService) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsolePluginSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsolePluginSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStart) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStart" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStartList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStartList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStartSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStartSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStartTask) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStartTask" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStartTaskReview) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStartTaskReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleQuickStartTaskSummary) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleQuickStartTaskSummary" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSample) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSample" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleContainerImportSource) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleContainerImportSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleContainerImportSourceService) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleContainerImportSourceService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleGitImportSource) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleGitImportSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleGitImportSourceRepository) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceRepository" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleGitImportSourceService) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleGitImportSourceService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleSource) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSampleSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleSampleSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleYAMLSample) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleYAMLSample" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleYAMLSampleList) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleYAMLSampleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleYAMLSampleSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.ConsoleYAMLSampleSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Link) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.Link" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamespaceDashboardSpec) OpenAPIModelName() string { - return "com.github.openshift.api.console.v1.NamespaceDashboardSpec" -} diff --git a/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 606b95caf..000000000 --- a/vendor/github.com/openshift/api/console/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,472 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Link = map[string]string{ - "": "Represents a standard link that could be generated in HTML", - "text": "text is the display text for the link", - "href": "href is the absolute URL for the link. Must use https:// for web URLs or mailto: for email links.", -} - -func (Link) SwaggerDoc() map[string]string { - return map_Link -} - -var map_CLIDownloadLink = map[string]string{ - "text": "text is the display text for the link", - "href": "href is the absolute secure URL for the link (must use https)", -} - -func (CLIDownloadLink) SwaggerDoc() map[string]string { - return map_CLIDownloadLink -} - -var map_ConsoleCLIDownload = map[string]string{ - "": "ConsoleCLIDownload is an extension for configuring openshift web console command line interface (CLI) downloads.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleCLIDownload) SwaggerDoc() map[string]string { - return map_ConsoleCLIDownload -} - -var map_ConsoleCLIDownloadList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleCLIDownloadList) SwaggerDoc() map[string]string { - return map_ConsoleCLIDownloadList -} - -var map_ConsoleCLIDownloadSpec = map[string]string{ - "": "ConsoleCLIDownloadSpec is the desired cli download configuration.", - "displayName": "displayName is the display name of the CLI download.", - "description": "description is the description of the CLI download (can include markdown).", - "links": "links is a list of objects that provide CLI download link details.", -} - -func (ConsoleCLIDownloadSpec) SwaggerDoc() map[string]string { - return map_ConsoleCLIDownloadSpec -} - -var map_ConsoleExternalLogLink = map[string]string{ - "": "ConsoleExternalLogLink is an extension for customizing OpenShift web console log links.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleExternalLogLink) SwaggerDoc() map[string]string { - return map_ConsoleExternalLogLink -} - -var map_ConsoleExternalLogLinkList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleExternalLogLinkList) SwaggerDoc() map[string]string { - return map_ConsoleExternalLogLinkList -} - -var map_ConsoleExternalLogLinkSpec = map[string]string{ - "": "ConsoleExternalLogLinkSpec is the desired log link configuration. The log link will appear on the logs tab of the pod details page.", - "text": "text is the display text for the link", - "hrefTemplate": "hrefTemplate is an absolute secure URL (must use https) for the log link including variables to be replaced. Variables are specified in the URL with the format ${variableName}, for instance, ${containerName} and will be replaced with the corresponding values from the resource. Resource is a pod. Supported variables are: - ${resourceName} - name of the resource which containes the logs - ${resourceUID} - UID of the resource which contains the logs\n - e.g. `11111111-2222-3333-4444-555555555555`\n- ${containerName} - name of the resource's container that contains the logs - ${resourceNamespace} - namespace of the resource that contains the logs - ${resourceNamespaceUID} - namespace UID of the resource that contains the logs - ${podLabels} - JSON representation of labels matching the pod with the logs\n - e.g. `{\"key1\":\"value1\",\"key2\":\"value2\"}`\n\ne.g., https://example.com/logs?resourceName=${resourceName}&containerName=${containerName}&resourceNamespace=${resourceNamespace}&podLabels=${podLabels}", - "namespaceFilter": "namespaceFilter is a regular expression used to restrict a log link to a matching set of namespaces (e.g., `^openshift-`). The string is converted into a regular expression using the JavaScript RegExp constructor. If not specified, links will be displayed for all the namespaces.", -} - -func (ConsoleExternalLogLinkSpec) SwaggerDoc() map[string]string { - return map_ConsoleExternalLogLinkSpec -} - -var map_ApplicationMenuSpec = map[string]string{ - "": "ApplicationMenuSpec is the specification of the desired section and icon used for the link in the application menu.", - "section": "section is the section of the application menu in which the link should appear. This can be any text that will appear as a subheading in the application menu dropdown. A new section will be created if the text does not match text of an existing section.", - "imageURL": "imageURL is the URL for the icon used in front of the link in the application menu. The URL must be an HTTPS URL or a Data URI. The image should be square and will be shown at 24x24 pixels.", -} - -func (ApplicationMenuSpec) SwaggerDoc() map[string]string { - return map_ApplicationMenuSpec -} - -var map_ConsoleLink = map[string]string{ - "": "ConsoleLink is an extension for customizing OpenShift web console links.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleLink) SwaggerDoc() map[string]string { - return map_ConsoleLink -} - -var map_ConsoleLinkList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleLinkList) SwaggerDoc() map[string]string { - return map_ConsoleLinkList -} - -var map_ConsoleLinkSpec = map[string]string{ - "": "ConsoleLinkSpec is the desired console link configuration.", - "location": "location determines which location in the console the link will be appended to (ApplicationMenu, HelpMenu, UserMenu, NamespaceDashboard).", - "applicationMenu": "applicationMenu holds information about section and icon used for the link in the application menu, and it is applicable only when location is set to ApplicationMenu.", - "namespaceDashboard": "namespaceDashboard holds information about namespaces in which the dashboard link should appear, and it is applicable only when location is set to NamespaceDashboard. If not specified, the link will appear in all namespaces.", -} - -func (ConsoleLinkSpec) SwaggerDoc() map[string]string { - return map_ConsoleLinkSpec -} - -var map_NamespaceDashboardSpec = map[string]string{ - "": "NamespaceDashboardSpec is a specification of namespaces in which the dashboard link should appear. If both namespaces and namespaceSelector are specified, the link will appear in namespaces that match either", - "namespaces": "namespaces is an array of namespace names in which the dashboard link should appear.", - "namespaceSelector": "namespaceSelector is used to select the Namespaces that should contain dashboard link by label. If the namespace labels match, dashboard link will be shown for the namespaces.", -} - -func (NamespaceDashboardSpec) SwaggerDoc() map[string]string { - return map_NamespaceDashboardSpec -} - -var map_ConsoleNotification = map[string]string{ - "": "ConsoleNotification is the extension for configuring openshift web console notifications.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleNotification) SwaggerDoc() map[string]string { - return map_ConsoleNotification -} - -var map_ConsoleNotificationList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleNotificationList) SwaggerDoc() map[string]string { - return map_ConsoleNotificationList -} - -var map_ConsoleNotificationSpec = map[string]string{ - "": "ConsoleNotificationSpec is the desired console notification configuration.", - "text": "text is the visible text of the notification.", - "location": "location is the location of the notification in the console. Valid values are: \"BannerTop\", \"BannerBottom\", \"BannerTopBottom\".", - "link": "link is an object that holds notification link details.", - "color": "color is the color of the text for the notification as CSS data type color.", - "backgroundColor": "backgroundColor is the color of the background for the notification as CSS data type color.", -} - -func (ConsoleNotificationSpec) SwaggerDoc() map[string]string { - return map_ConsoleNotificationSpec -} - -var map_ConsolePlugin = map[string]string{ - "": "ConsolePlugin is an extension for customizing OpenShift web console by dynamically loading code from another service running on the cluster.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec contains the desired configuration for the console plugin.", -} - -func (ConsolePlugin) SwaggerDoc() map[string]string { - return map_ConsolePlugin -} - -var map_ConsolePluginBackend = map[string]string{ - "": "ConsolePluginBackend holds information about the endpoint which serves the console's plugin", - "type": "type is the backend type which servers the console's plugin. Currently only \"Service\" is supported.", - "service": "service is a Kubernetes Service that exposes the plugin using a deployment with an HTTP server. The Service must use HTTPS and Service serving certificate. The console backend will proxy the plugins assets from the Service using the service CA bundle.", -} - -func (ConsolePluginBackend) SwaggerDoc() map[string]string { - return map_ConsolePluginBackend -} - -var map_ConsolePluginCSP = map[string]string{ - "": "ConsolePluginCSP holds configuration for a specific CSP directive", - "directive": "directive specifies which Content-Security-Policy directive to configure. Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. DefaultSrc directive serves as a fallback for the other CSP fetch directives. For more information about the DefaultSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/default-src ScriptSrc directive specifies valid sources for JavaScript. For more information about the ScriptSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src StyleSrc directive specifies valid sources for stylesheets. For more information about the StyleSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src ImgSrc directive specifies a valid sources of images and favicons. For more information about the ImgSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/img-src FontSrc directive specifies valid sources for fonts loaded using @font-face. For more information about the FontSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/font-src ConnectSrc directive restricts the URLs which can be loaded using script interfaces. For more information about the ConnectSrc directive, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/connect-src", - "values": "values defines an array of values to append to the console defaults for this directive. Each ConsolePlugin may define their own directives with their values. These will be set by the OpenShift web console's backend, as part of its Content-Security-Policy header. The array can contain at most 16 values. Each directive value must have a maximum length of 1024 characters and must not contain whitespace, commas (,), semicolons (;) or single quotes ('). The value '*' is not permitted. Each value in the array must be unique.", -} - -func (ConsolePluginCSP) SwaggerDoc() map[string]string { - return map_ConsolePluginCSP -} - -var map_ConsolePluginI18n = map[string]string{ - "": "ConsolePluginI18n holds information on localization resources that are served by the dynamic plugin.", - "loadType": "loadType indicates how the plugin's localization resource should be loaded. Valid values are Preload, Lazy and the empty string. When set to Preload, all localization resources are fetched when the plugin is loaded. When set to Lazy, localization resources are lazily loaded as and when they are required by the console. When omitted or set to the empty string, the behaviour is equivalent to Lazy type.", -} - -func (ConsolePluginI18n) SwaggerDoc() map[string]string { - return map_ConsolePluginI18n -} - -var map_ConsolePluginList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsolePluginList) SwaggerDoc() map[string]string { - return map_ConsolePluginList -} - -var map_ConsolePluginProxy = map[string]string{ - "": "ConsolePluginProxy holds information on various service types to which console's backend will proxy the plugin's requests.", - "endpoint": "endpoint provides information about endpoint to which the request is proxied to.", - "alias": "alias is a proxy name that identifies the plugin's proxy. An alias name should be unique per plugin. The console backend exposes following proxy endpoint:\n\n/api/proxy/plugin///?\n\nRequest example path:\n\n/api/proxy/plugin/acm/search/pods?namespace=openshift-apiserver", - "caCertificate": "caCertificate provides the cert authority certificate contents, in case the proxied Service is using custom service CA. By default, the service CA bundle provided by the service-ca operator is used. ", - "authorization": "authorization provides information about authorization type, which the proxied request should contain", -} - -func (ConsolePluginProxy) SwaggerDoc() map[string]string { - return map_ConsolePluginProxy -} - -var map_ConsolePluginProxyEndpoint = map[string]string{ - "": "ConsolePluginProxyEndpoint holds information about the endpoint to which request will be proxied to.", - "type": "type is the type of the console plugin's proxy. Currently only \"Service\" is supported.", - "service": "service is an in-cluster Service that the plugin will connect to. The Service must use HTTPS. The console backend exposes an endpoint in order to proxy communication between the plugin and the Service. Note: service field is required for now, since currently only \"Service\" type is supported.", -} - -func (ConsolePluginProxyEndpoint) SwaggerDoc() map[string]string { - return map_ConsolePluginProxyEndpoint -} - -var map_ConsolePluginProxyServiceConfig = map[string]string{ - "": "ProxyTypeServiceConfig holds information on Service to which console's backend will proxy the plugin's requests.", - "name": "name of Service that the plugin needs to connect to.", - "namespace": "namespace of Service that the plugin needs to connect to", - "port": "port on which the Service that the plugin needs to connect to is listening on.", -} - -func (ConsolePluginProxyServiceConfig) SwaggerDoc() map[string]string { - return map_ConsolePluginProxyServiceConfig -} - -var map_ConsolePluginService = map[string]string{ - "": "ConsolePluginService holds information on Service that is serving console dynamic plugin assets.", - "name": "name of Service that is serving the plugin assets.", - "namespace": "namespace of Service that is serving the plugin assets.", - "port": "port on which the Service that is serving the plugin is listening to.", - "basePath": "basePath is the path to the plugin's assets. The primary asset it the manifest file called `plugin-manifest.json`, which is a JSON document that contains metadata about the plugin and the extensions.", -} - -func (ConsolePluginService) SwaggerDoc() map[string]string { - return map_ConsolePluginService -} - -var map_ConsolePluginSpec = map[string]string{ - "": "ConsolePluginSpec is the desired plugin configuration.", - "displayName": "displayName is the display name of the plugin. The dispalyName should be between 1 and 128 characters.", - "backend": "backend holds the configuration of backend which is serving console's plugin .", - "proxy": "proxy is a list of proxies that describe various service type to which the plugin needs to connect to.", - "i18n": "i18n is the configuration of plugin's localization resources.", - "contentSecurityPolicy": "contentSecurityPolicy is a list of Content-Security-Policy (CSP) directives for the plugin. Each directive specifies a list of values, appropriate for the given directive type, for example a list of remote endpoints for fetch directives such as ScriptSrc. Console web application uses CSP to detect and mitigate certain types of attacks, such as cross-site scripting (XSS) and data injection attacks. Dynamic plugins should specify this field if need to load assets from outside the cluster or if violation reports are observed. Dynamic plugins should always prefer loading their assets from within the cluster, either by vendoring them, or fetching from a cluster service. CSP violation reports can be viewed in the browser's console logs during development and testing of the plugin in the OpenShift web console. Available directive types are DefaultSrc, ScriptSrc, StyleSrc, ImgSrc, FontSrc and ConnectSrc. Each of the available directives may be defined only once in the list. The value 'self' is automatically included in all fetch directives by the OpenShift web console's backend. For more information about the CSP directives, see: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy\n\nThe OpenShift web console server aggregates the CSP directives and values across its own default values and all enabled ConsolePlugin CRs, merging them into a single policy string that is sent to the browser via `Content-Security-Policy` HTTP response header.\n\nExample:\n ConsolePlugin A directives:\n script-src: https://script1.com/, https://script2.com/\n font-src: https://font1.com/\n\n ConsolePlugin B directives:\n script-src: https://script2.com/, https://script3.com/\n font-src: https://font2.com/\n img-src: https://img1.com/\n\n Unified set of CSP directives, passed to the OpenShift web console server:\n script-src: https://script1.com/, https://script2.com/, https://script3.com/\n font-src: https://font1.com/, https://font2.com/\n img-src: https://img1.com/\n\n OpenShift web console server CSP response header:\n Content-Security-Policy: default-src 'self'; base-uri 'self'; script-src 'self' https://script1.com/ https://script2.com/ https://script3.com/; font-src 'self' https://font1.com/ https://font2.com/; img-src 'self' https://img1.com/; style-src 'self'; frame-src 'none'; object-src 'none'", -} - -func (ConsolePluginSpec) SwaggerDoc() map[string]string { - return map_ConsolePluginSpec -} - -var map_ConsoleQuickStart = map[string]string{ - "": "ConsoleQuickStart is an extension for guiding user through various workflows in the OpenShift web console.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleQuickStart) SwaggerDoc() map[string]string { - return map_ConsoleQuickStart -} - -var map_ConsoleQuickStartList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleQuickStartList) SwaggerDoc() map[string]string { - return map_ConsoleQuickStartList -} - -var map_ConsoleQuickStartSpec = map[string]string{ - "": "ConsoleQuickStartSpec is the desired quick start configuration.", - "displayName": "displayName is the display name of the Quick Start.", - "icon": "icon is a base64 encoded image that will be displayed beside the Quick Start display name. The icon should be an vector image for easy scaling. The size of the icon should be 40x40.", - "tags": "tags is a list of strings that describe the Quick Start.", - "durationMinutes": "durationMinutes describes approximately how many minutes it will take to complete the Quick Start.", - "description": "description is the description of the Quick Start. (includes markdown)", - "prerequisites": "prerequisites contains all prerequisites that need to be met before taking a Quick Start. (includes markdown)", - "introduction": "introduction describes the purpose of the Quick Start. (includes markdown)", - "tasks": "tasks is the list of steps the user has to perform to complete the Quick Start.", - "conclusion": "conclusion sums up the Quick Start and suggests the possible next steps. (includes markdown)", - "nextQuickStart": "nextQuickStart is a list of the following Quick Starts, suggested for the user to try.", - "accessReviewResources": "accessReviewResources contains a list of resources that the user's access will be reviewed against in order for the user to complete the Quick Start. The Quick Start will be hidden if any of the access reviews fail.", -} - -func (ConsoleQuickStartSpec) SwaggerDoc() map[string]string { - return map_ConsoleQuickStartSpec -} - -var map_ConsoleQuickStartTask = map[string]string{ - "": "ConsoleQuickStartTask is a single step in a Quick Start.", - "title": "title describes the task and is displayed as a step heading.", - "description": "description describes the steps needed to complete the task. (includes markdown)", - "review": "review contains instructions to validate the task is complete. The user will select 'Yes' or 'No'. using a radio button, which indicates whether the step was completed successfully.", - "summary": "summary contains information about the passed step.", -} - -func (ConsoleQuickStartTask) SwaggerDoc() map[string]string { - return map_ConsoleQuickStartTask -} - -var map_ConsoleQuickStartTaskReview = map[string]string{ - "": "ConsoleQuickStartTaskReview contains instructions that validate a task was completed successfully.", - "instructions": "instructions contains steps that user needs to take in order to validate his work after going through a task. (includes markdown)", - "failedTaskHelp": "failedTaskHelp contains suggestions for a failed task review and is shown at the end of task. (includes markdown)", -} - -func (ConsoleQuickStartTaskReview) SwaggerDoc() map[string]string { - return map_ConsoleQuickStartTaskReview -} - -var map_ConsoleQuickStartTaskSummary = map[string]string{ - "": "ConsoleQuickStartTaskSummary contains information about a passed step.", - "success": "success describes the succesfully passed task.", - "failed": "failed briefly describes the unsuccessfully passed task. (includes markdown)", -} - -func (ConsoleQuickStartTaskSummary) SwaggerDoc() map[string]string { - return map_ConsoleQuickStartTaskSummary -} - -var map_ConsoleSample = map[string]string{ - "": "ConsoleSample is an extension to customizing OpenShift web console by adding samples.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec contains configuration for a console sample.", -} - -func (ConsoleSample) SwaggerDoc() map[string]string { - return map_ConsoleSample -} - -var map_ConsoleSampleContainerImportSource = map[string]string{ - "": "ConsoleSampleContainerImportSource let the user import a container image.", - "image": "reference to a container image that provides a HTTP service. The service must be exposed on the default port (8080) unless otherwise configured with the port field.\n\nSupported formats:\n - /\n - docker.io//\n - quay.io//\n - quay.io//@sha256:\n - quay.io//:", - "service": "service contains configuration for the Service resource created for this sample.", -} - -func (ConsoleSampleContainerImportSource) SwaggerDoc() map[string]string { - return map_ConsoleSampleContainerImportSource -} - -var map_ConsoleSampleContainerImportSourceService = map[string]string{ - "": "ConsoleSampleContainerImportSourceService let the samples author define defaults for the Service created for this sample.", - "targetPort": "targetPort is the port that the service listens on for HTTP requests. This port will be used for Service and Route created for this sample. Port must be in the range 1 to 65535. Default port is 8080.", -} - -func (ConsoleSampleContainerImportSourceService) SwaggerDoc() map[string]string { - return map_ConsoleSampleContainerImportSourceService -} - -var map_ConsoleSampleGitImportSource = map[string]string{ - "": "ConsoleSampleGitImportSource let the user import code from a public Git repository.", - "repository": "repository contains the reference to the actual Git repository.", - "service": "service contains configuration for the Service resource created for this sample.", -} - -func (ConsoleSampleGitImportSource) SwaggerDoc() map[string]string { - return map_ConsoleSampleGitImportSource -} - -var map_ConsoleSampleGitImportSourceRepository = map[string]string{ - "": "ConsoleSampleGitImportSourceRepository let the user import code from a public git repository.", - "url": "url of the Git repository that contains a HTTP service. The HTTP service must be exposed on the default port (8080) unless otherwise configured with the port field.\n\nOnly public repositories on GitHub, GitLab and Bitbucket are currently supported:\n\n - https://github.com//\n - https://gitlab.com//\n - https://bitbucket.org//\n\nThe url must have a maximum length of 256 characters.", - "revision": "revision is the git revision at which to clone the git repository Can be used to clone a specific branch, tag or commit SHA. Must be at most 256 characters in length. When omitted the repository's default branch is used.", - "contextDir": "contextDir is used to specify a directory within the repository to build the component. Must start with `/` and have a maximum length of 256 characters. When omitted, the default value is to build from the root of the repository.", -} - -func (ConsoleSampleGitImportSourceRepository) SwaggerDoc() map[string]string { - return map_ConsoleSampleGitImportSourceRepository -} - -var map_ConsoleSampleGitImportSourceService = map[string]string{ - "": "ConsoleSampleGitImportSourceService let the samples author define defaults for the Service created for this sample.", - "targetPort": "targetPort is the port that the service listens on for HTTP requests. This port will be used for Service created for this sample. Port must be in the range 1 to 65535. Default port is 8080.", -} - -func (ConsoleSampleGitImportSourceService) SwaggerDoc() map[string]string { - return map_ConsoleSampleGitImportSourceService -} - -var map_ConsoleSampleList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleSampleList) SwaggerDoc() map[string]string { - return map_ConsoleSampleList -} - -var map_ConsoleSampleSource = map[string]string{ - "": "ConsoleSampleSource is the actual sample definition and can hold different sample types. Unsupported sample types will be ignored in the web console.", - "type": "type of the sample, currently supported: \"GitImport\";\"ContainerImport\"", - "gitImport": "gitImport allows the user to import code from a git repository.", - "containerImport": "containerImport allows the user import a container image.", -} - -func (ConsoleSampleSource) SwaggerDoc() map[string]string { - return map_ConsoleSampleSource -} - -var map_ConsoleSampleSpec = map[string]string{ - "": "ConsoleSampleSpec is the desired sample for the web console. Samples will appear with their title, descriptions and a badge in a samples catalog.", - "title": "title is the display name of the sample.\n\nIt is required and must be no more than 50 characters in length.", - "abstract": "abstract is a short introduction to the sample.\n\nIt is required and must be no more than 100 characters in length.\n\nThe abstract is shown on the sample card tile below the title and provider and is limited to three lines of content.", - "description": "description is a long form explanation of the sample.\n\nIt is required and can have a maximum length of **4096** characters.\n\nIt is a README.md-like content for additional information, links, pre-conditions, and other instructions. It will be rendered as Markdown so that it can contain line breaks, links, and other simple formatting.", - "icon": "icon is an optional base64 encoded image and shown beside the sample title.\n\nThe format must follow the data: URL format and can have a maximum size of **10 KB**.\n\n data:[][;base64],\n\nFor example:\n\n data:image;base64, plus the base64 encoded image.\n\nVector images can also be used. SVG icons must start with:\n\n data:image/svg+xml;base64, plus the base64 encoded SVG image.\n\nAll sample catalog icons will be shown on a white background (also when the dark theme is used). The web console ensures that different aspect ratios work correctly. Currently, the surface of the icon is at most 40x100px.\n\nFor more information on the data URL format, please visit https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs.", - "type": "type is an optional label to group multiple samples.\n\nIt is optional and must be no more than 20 characters in length.\n\nRecommendation is a singular term like \"Builder Image\", \"Devfile\" or \"Serverless Function\".\n\nCurrently, the type is shown a badge on the sample card tile in the top right corner.", - "provider": "provider is an optional label to honor who provides the sample.\n\nIt is optional and must be no more than 50 characters in length.\n\nA provider can be a company like \"Red Hat\" or an organization like \"CNCF\" or \"Knative\".\n\nCurrently, the provider is only shown on the sample card tile below the title with the prefix \"Provided by \"", - "tags": "tags are optional string values that can be used to find samples in the samples catalog.\n\nExamples of common tags may be \"Java\", \"Quarkus\", etc.\n\nThey will be displayed on the samples details page.", - "source": "source defines where to deploy the sample service from. The sample may be sourced from an external git repository or container image.", -} - -func (ConsoleSampleSpec) SwaggerDoc() map[string]string { - return map_ConsoleSampleSpec -} - -var map_ConsoleYAMLSample = map[string]string{ - "": "ConsoleYAMLSample is an extension for customizing OpenShift web console YAML samples.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleYAMLSample) SwaggerDoc() map[string]string { - return map_ConsoleYAMLSample -} - -var map_ConsoleYAMLSampleList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleYAMLSampleList) SwaggerDoc() map[string]string { - return map_ConsoleYAMLSampleList -} - -var map_ConsoleYAMLSampleSpec = map[string]string{ - "": "ConsoleYAMLSampleSpec is the desired YAML sample configuration. Samples will appear with their descriptions in a samples sidebar when creating a resources in the web console.", - "targetResource": "targetResource contains apiVersion and kind of the resource YAML sample is representating.", - "title": "title of the YAML sample.", - "description": "description of the YAML sample.", - "yaml": "yaml is the YAML sample to display.", - "snippet": "snippet indicates that the YAML sample is not the full YAML resource definition, but a fragment that can be inserted into the existing YAML document at the user's cursor.", -} - -func (ConsoleYAMLSampleSpec) SwaggerDoc() map[string]string { - return map_ConsoleYAMLSampleSpec -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/envtest-releases.yaml b/vendor/github.com/openshift/api/envtest-releases.yaml deleted file mode 100644 index ea376ded5..000000000 --- a/vendor/github.com/openshift/api/envtest-releases.yaml +++ /dev/null @@ -1,118 +0,0 @@ -releases: - v1.28.15: - envtest-v1.28.15-darwin-amd64.tar.gz: - hash: 79e04e7e264e6907da73d27c04d50be7bfa702b059e66f21331c9c8e16daa6ff960e750c1910804b7aa2a5bd79488a5bd082b76a7bab003e613a2cdbb2a8b80d - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.28.15-darwin-amd64.tar.gz - envtest-v1.28.15-darwin-arm64.tar.gz: - hash: 9646d169cf5161793ded60fa2ffde705d8fdde7c7c77833be9a77909f5804b909f28d56b2b0b93bd200d8057db3e37da9fe1683368ae38777ea62609135d0b4d - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.28.15-darwin-arm64.tar.gz - envtest-v1.28.15-linux-amd64.tar.gz: - hash: bc7e3deabbb3c7ee5e572e1392041af9d2fa40a51eb88dcabdaf57ff2a476e81efbd837a87f1f0849a5083dcb7c0b4b2fc16107da4cf3308805eee377fb383c1 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.28.15-linux-amd64.tar.gz - envtest-v1.28.15-linux-arm64.tar.gz: - hash: 17ec8d5f7de118b66d1621d8b25b4f0a891e4a641d5e845d14c0da4cb2e258b6bf788fe6b5334b27beb12d9e67f7c8f2c2ded6023bf9a7e79ac3b483b8cdfcc2 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.28.15-linux-arm64.tar.gz - v1.29.7: - envtest-v1.29.7-darwin-amd64.tar.gz: - hash: 4a97f9162ee882632aafda20e562dfb4011879f9ec6c8ffa4922e566933fc35292171cc837b50860e2e91238d820931a1fb8c3280541a180f6e9057178c71889 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.29.7-darwin-amd64.tar.gz - envtest-v1.29.7-darwin-arm64.tar.gz: - hash: e810e04c14b1bba79c90c755ecb8b13094132a86339e78d1fe39029b9825b90b663d538b29d6ab4d905c22728efdf278881ee3f434f2215bc77157dee90a2bde - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.29.7-darwin-arm64.tar.gz - envtest-v1.29.7-linux-amd64.tar.gz: - hash: 91dcf683c95541691b8b9fdd332b0d3df56f8969b57c14797e990b9861ad71b2954f402913b5579f6afb99dce19817ba49542e2e276c7f70aeeb857a5ec1d57c - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.29.7-linux-amd64.tar.gz - envtest-v1.29.7-linux-arm64.tar.gz: - hash: 912333dee15e9cc068ebc5ef25591e16b9732cc70c23435efa72af352cffa9c25236d3982db910bd3a06172e9d57fc0d50585996f17c66ae1b80f0e2d3ef37b5 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.29.7-linux-arm64.tar.gz - v1.30.3: - envtest-v1.30.3-darwin-amd64.tar.gz: - hash: 81ab2ad5841522976d9a5fc58642b745cf308230b0f2e634acfb2d5c8f288ef837f7b82144a5e91db607d86885101e06dd473a68bcac0d71be2297edc4aaa92e - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.30.3-darwin-amd64.tar.gz - envtest-v1.30.3-darwin-arm64.tar.gz: - hash: 8913c1e2e4b6eab0c92d9ddc611cea1b8a5173374e7544a667366ea66bc98a7d3442f21d34e7da65ba2dbe8e5778b2b0497943514b7b3639fc793bd0e98086f5 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.30.3-darwin-arm64.tar.gz - envtest-v1.30.3-linux-amd64.tar.gz: - hash: 6e81caf1d20c608b0149f36ca8dc6d68e97b22e07f69f1f0788d6c0057ae92fcaae402d26b6766819a31dac1911c6d07bf0328f152d6dd52dcebee94009de024 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.30.3-linux-amd64.tar.gz - envtest-v1.30.3-linux-arm64.tar.gz: - hash: deb395d5e9578a58786c42b4e7d878b4aef984ac2dce510031fbecf12092162a4aee1cde774f1527cfae90f6885382dc7b3d79ec379b7f4160c3a35fad7cbc3b - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.30.3-linux-arm64.tar.gz - v1.31.1: - envtest-v1.31.1-darwin-amd64.tar.gz: - hash: c884c6a9751f12f57ede0dc3d8dfffdb0f60f7111d6d01ca0693b66d663dfbd37c21ab6a9e571d1a6f649ed7db54b04b069ab0aff6366b2db2f5d3d8ba84a296 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.1-darwin-amd64.tar.gz - envtest-v1.31.1-darwin-arm64.tar.gz: - hash: c760be21c579a516cad8fbafd0f202229f5e074da1869958b84ae8dca295ffb33eb6fd4fd0b66349c31c4adff1561e7dd188137885e3661e34c0a14e12ada20e - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.1-darwin-arm64.tar.gz - envtest-v1.31.1-linux-amd64.tar.gz: - hash: a683fad736249b681d50c40715068ecb64f3ef22a85f29387eb61435c36dfe0cebf0bc7e109e237071cd856bc0e37d79a732309fd8d0b16fba6e019cf5c6e8b6 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.1-linux-amd64.tar.gz - envtest-v1.31.1-linux-arm64.tar.gz: - hash: 86fa42c6a3d92e438e35d6066587d0e4f36b910885e10520868959ece2fe740d99abc735f69d6ebe8920291f70d3819b169ad5ddd2db805f8f56a3b83eee3893 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.1-linux-arm64.tar.gz - v1.31.2: - envtest-v1.31.2-darwin-amd64.tar.gz: - hash: 4356c4495be7adc311868569bd69c5c17bfdabc243db3c656ac598be87698647e59d030a5f3c659b5ee0084bb0a9d33ea1faa2f5abfe0d762ec3368877cfd17f - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.2-darwin-amd64.tar.gz - envtest-v1.31.2-darwin-arm64.tar.gz: - hash: e1a759927343dfbbdff2909b7ea0046eb5c6840aea763b8d5d8229931fa35dcdcd5659fdace7a4eab1e41bc0b04c683aa96508f26aa38b3b5d3945799cb02324 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.2-darwin-arm64.tar.gz - envtest-v1.31.2-linux-amd64.tar.gz: - hash: c9efa849326afc471aff9ee17109491fe3e4d6d76b6d24e6ee8787ef44776abdc57ce6e96f013abf86c91d4ee94660e617a1623d9a71dd95238b6b6bd800aef7 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.2-linux-amd64.tar.gz - envtest-v1.31.2-linux-arm64.tar.gz: - hash: f6ad42b701537ddfd6873e9700f8e73927763878eaf36a5437d71fb62bffda91ce7f502e13f9ef4b508d37973ccddd3d847eba0d7150f7acb5495fd82558fbad - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.31.2-linux-arm64.tar.gz - v1.32.1: - envtest-v1.32.1-darwin-amd64.tar.gz: - hash: e81d0b8e9d58bcefc8e741e298698670a39bf77923623fb8554b1a4b201a033678d2949e18dcf6933722c69f954b0de93c8f7136ff0641f69e5128a5a3fb6b26 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.32.1-darwin-amd64.tar.gz - envtest-v1.32.1-darwin-arm64.tar.gz: - hash: 57be0af5cbf72b659c14f955205fa9a95da9af9213bc9b6a5a1090394a0cd5f98c57127b3d8a69dc349bc33112f52505a6f030369bb09a27f9fb2c13a66475d1 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.32.1-darwin-arm64.tar.gz - envtest-v1.32.1-linux-amd64.tar.gz: - hash: 711c6d6d9443dce6b465403149837d636f440091b77ec45753d9c60fea0d6ba7811b0045ebf16f7b74504d1f47fcf1da90d7c810a18be31311c90f068d9fd1fd - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.32.1-linux-amd64.tar.gz - envtest-v1.32.1-linux-arm64.tar.gz: - hash: 0bc52e6344ae0753715bc39c2878696c72a3129356df484835586165238361c109ad3e1ebd354af8ecdf1026c3a2b98ed225ad0c6dd348cb3ff128a7cfdcc2f8 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.32.1-linux-arm64.tar.gz - v1.33.2: - envtest-v1.33.2-darwin-amd64.tar.gz: - hash: d032acdc6f365059e20e22de6f78dd298e4cc48b379639c777032a97b7fe6a1d0c933f2a48879506231d57e4be9407ffc56b46485958023a766c4db3f1efb89e - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.33.2-darwin-amd64.tar.gz - envtest-v1.33.2-darwin-arm64.tar.gz: - hash: 51aa29ab015a1d1825e7155137fe30a2aafd311faf63486118d0dd026a9163c65d61e004a42b8e3ff624529734610b4dafdc12220d11d6c159ca9b3622f64497 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.33.2-darwin-arm64.tar.gz - envtest-v1.33.2-linux-amd64.tar.gz: - hash: 4f2749f668c49ac67651ca2c284252eea722aa37389c3808957a0e1a7783adf1c183aa07ff9623357b761b96022828bbd09dff019527032a474d923676835faf - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.33.2-linux-amd64.tar.gz - envtest-v1.33.2-linux-arm64.tar.gz: - hash: 9936eba66fd0170808268da4c0609b7e7d4d1b0de8607b0d3a9091539b4ec881041a9e08e7b4839708b11139bcc850acd34dfc0305ed955cc61fc3fae9da58f5 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.33.2-linux-arm64.tar.gz - v1.34.1: - envtest-v1.34.1-darwin-amd64.tar.gz: - hash: 3bf575e77d35803b81685969915d70ae23f2267bafd1fe17087126d6fcdfe67590d2f51ce59ff8f0d06e5d94b0f4d0ac3c16de1544008e9c617499cfc51844c5 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.34.1-darwin-amd64.tar.gz - envtest-v1.34.1-darwin-arm64.tar.gz: - hash: 3c9c1d457d3fbb5c5cfb6e6c4ac31b41172cf413b9a81f8f53ac717a643f730d135d4d09549f9d78685c23704a7e3f12c891896dc23c4b1a211a10e1fd9bc043 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.34.1-darwin-arm64.tar.gz - envtest-v1.34.1-linux-amd64.tar.gz: - hash: e5aeda6d9f9456e27c5c001bc4476a0bccc06f1431c2a9752a2ac040f69671927204dcc254bba8ebb2fb91d0e32620abfaba6daad6a80dbe376d93e57fcd2431 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.34.1-linux-amd64.tar.gz - envtest-v1.34.1-linux-arm64.tar.gz: - hash: e2ee7e47ceeba56624fd869922ab9851200482ef835c09fe3dd57c9806a992a7e1f56641906510ebb095514953aa8a3af68d45a82be45b94981a50e894ac6e42 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.34.1-linux-arm64.tar.gz - v1.35.1: - envtest-v1.35.1-darwin-amd64.tar.gz: - hash: 8b788ca564d0d2d49000b572b9c83a87f71978b7dcbb0c969dde5bf8923869dcb5860b8f905af9a3772431ba7e575c4215d1bcfa5d2857bd8db440272f252ddd - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.35.1-darwin-amd64.tar.gz - envtest-v1.35.1-darwin-arm64.tar.gz: - hash: d650d7a96c69efdc7321579d597b9dbd9ef71df5ea1e0f00815edb31eb0f4a40599fe223b9d0f2a114be32657ff842136a3ab65e646b08a0fce50d6871bcec71 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.35.1-darwin-arm64.tar.gz - envtest-v1.35.1-linux-amd64.tar.gz: - hash: 70e4e66f842d53cce174a3499feb04e0493ada374148c687da4e7ddc0e20e10dd6fa5e2cd765bd80b7d3dca3cd8388460503a0335e15f71212b333386fb3c2b1 - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.35.1-linux-amd64.tar.gz - envtest-v1.35.1-linux-arm64.tar.gz: - hash: 309308f9c66f9e2e5192c65a333a388faaaa903841f26f8a96b8f13a5eb3039bcbb818ef6ddbb5803a9cfa9b25e37249a0aed5d472badb25539696569923f87f - selfLink: https://storage.googleapis.com/openshift-kubebuilder-tools/envtest-v1.35.1-linux-arm64.tar.gz diff --git a/vendor/github.com/openshift/api/etcd/README.md b/vendor/github.com/openshift/api/etcd/README.md deleted file mode 100644 index b92d553df..000000000 --- a/vendor/github.com/openshift/api/etcd/README.md +++ /dev/null @@ -1,211 +0,0 @@ -# etcd.openshift.io API Group - -This API group contains CRDs related to etcd cluster management in Two Node OpenShift with Fencing deployments. - -## API Versions - -### v1alpha1 - -Contains the `PacemakerCluster` custom resource for monitoring Pacemaker cluster health in Two Node OpenShift with Fencing deployments. - -#### PacemakerCluster - -- **Feature Gate**: `DualReplica` -- **Component**: `two-node-fencing` -- **Scope**: Cluster-scoped singleton resource (must be named "cluster") -- **Resource Path**: `pacemakerclusters.etcd.openshift.io` - -The `PacemakerCluster` resource provides visibility into the health and status of a Pacemaker-managed cluster. -It is periodically updated by the cluster-etcd-operator's status collector. - -### Status Subresource Design - -This resource uses the standard Kubernetes status subresource pattern (`+kubebuilder:subresource:status`). -The status collector creates the resource without status, then immediately populates it via the `/status` endpoint. - -**Why not atomic create-with-status?** - -We initially explored removing the status subresource to allow creating the resource with status in a single -atomic operation. This would ensure the resource is never observed in an incomplete state. However: - -1. The Kubernetes API server strips the `status` field from create requests when a status subresource is enabled -2. Without the subresource, we cannot use separate RBAC for spec vs status updates -3. The OpenShift API test framework assumes status subresource exists for status update tests - -The status collector performs a two-step operation: create resource, then immediately update status. -The brief window where status is empty is acceptable since the healthcheck controller handles missing status gracefully. - -### Pacemaker Resources - -A **pacemaker resource** is a unit of work managed by pacemaker. In pacemaker terminology, resources are services -or applications that pacemaker monitors, starts, stops, and moves between nodes to maintain high availability. - -For Two Node OpenShift with Fencing, we manage three resource types: -- **Kubelet**: The Kubernetes node agent and a prerequisite for etcd -- **Etcd**: The distributed key-value store -- **FencingAgent**: Used to isolate failed nodes during a quorum loss event (tracked separately) - -### Status Structure - -```yaml -status: # Optional on creation, populated via status subresource - conditions: # Required when status present (min 3 items) - - type: Healthy - - type: InService - - type: NodeCountAsExpected - lastUpdated: # Required when status present, cannot decrease - nodes: # Control-plane nodes (0-5, expects 2 for TNF) - - nodeName: # RFC 1123 subdomain name - addresses: # Required: List of node addresses (1-8 items) - - type: InternalIP # Currently only InternalIP is supported - address: # First address used for etcd peer URLs - conditions: # Required: Node-level conditions (min 9 items) - - type: Healthy - - type: Online - - type: InService - - type: Active - - type: Ready - - type: Clean - - type: Member - - type: FencingAvailable - - type: FencingHealthy - resources: # Required: Pacemaker resources on this node (min 2) - - name: Kubelet # Both Kubelet and Etcd must be present - conditions: # Required: Resource-level conditions (min 8 items) - - type: Healthy - - type: InService - - type: Managed - - type: Enabled - - type: Operational - - type: Active - - type: Started - - type: Schedulable - - name: Etcd - conditions: [...] # Same 8 conditions as Kubelet (abbreviated) - fencingAgents: # Required: Fencing agents for THIS node (1-8) - - name: # e.g., "master-0_redfish" (unique, max 300 chars) - method: # Fencing method: "Redfish" or "IPMI" - conditions: [...] # Same 8 conditions as resources (abbreviated) -``` - -### Fencing Agents - -Fencing agents are STONITH (Shoot The Other Node In The Head) devices used to isolate failed nodes. -Unlike regular pacemaker resources (Kubelet, Etcd), fencing agents are tracked separately because: - -1. **Mapping by target, not schedule**: Resources are mapped to the node where they are scheduled to run. - Fencing agents are mapped to the node they can *fence* (their target), regardless of which node - their monitoring operations are scheduled on. - -2. **Multiple agents per node**: A node can have multiple fencing agents for redundancy - (e.g., both Redfish and IPMI). Expected: 1 per node, supported: up to 8. - -3. **Health tracking via two node-level conditions**: - - **FencingAvailable**: True if at least one agent is healthy (fencing works), False if all agents unhealthy (degrades operator) - - **FencingHealthy**: True if all agents are healthy (ideal state), False if any agent is unhealthy (emits warning events) - -### Cluster-Level Conditions - -| Condition | True | False | -|-----------|------|-------| -| `Healthy` | Cluster is healthy (`ClusterHealthy`) | Cluster has issues (`ClusterUnhealthy`) | -| `InService` | In service (`InService`) | In maintenance (`InMaintenance`) | -| `NodeCountAsExpected` | Node count is as expected (`AsExpected`) | Wrong count (`InsufficientNodes`, `ExcessiveNodes`) | - -### Node-Level Conditions - -| Condition | True | False | -|-----------|------|-------| -| `Healthy` | Node is healthy (`NodeHealthy`) | Node has issues (`NodeUnhealthy`) | -| `Online` | Node is online (`Online`) | Node is offline (`Offline`) | -| `InService` | In service (`InService`) | In maintenance (`InMaintenance`) | -| `Active` | Node is active (`Active`) | Node is in standby (`Standby`) | -| `Ready` | Node is ready (`Ready`) | Node is pending (`Pending`) | -| `Clean` | Node is clean (`Clean`) | Node is unclean (`Unclean`) | -| `Member` | Node is a member (`Member`) | Not a member (`NotMember`) | -| `FencingAvailable` | At least one agent healthy (`FencingAvailable`) | All agents unhealthy (`FencingUnavailable`) - degrades operator | -| `FencingHealthy` | All agents healthy (`FencingHealthy`) | Some agents unhealthy (`FencingUnhealthy`) - emits warnings | - -### Resource-Level Conditions - -Each resource in the `resources` array and each fencing agent in the `fencingAgents` array has its own conditions. - -| Condition | True | False | -|-----------|------|-------| -| `Healthy` | Resource is healthy (`ResourceHealthy`) | Resource has issues (`ResourceUnhealthy`) | -| `InService` | In service (`InService`) | In maintenance (`InMaintenance`) | -| `Managed` | Managed by pacemaker (`Managed`) | Not managed (`Unmanaged`) | -| `Enabled` | Resource is enabled (`Enabled`) | Resource is disabled (`Disabled`) | -| `Operational` | Resource is operational (`Operational`) | Resource has failed (`Failed`) | -| `Active` | Resource is active (`Active`) | Resource is not active (`Inactive`) | -| `Started` | Resource is started (`Started`) | Resource is stopped (`Stopped`) | -| `Schedulable` | Resource is schedulable (`Schedulable`) | Resource is not schedulable (`Unschedulable`) | - -### Validation Rules - -**Resource naming:** -- Resource name must be "cluster" (singleton) - -**Node name validation:** -- Must be a lowercase RFC 1123 subdomain name -- Consists of lowercase alphanumeric characters, '-' or '.' -- Must start and end with an alphanumeric character -- Maximum 253 characters - -**Node addresses:** -- Uses `PacemakerNodeAddress` type (similar to `corev1.NodeAddress` but with IP validation) -- Currently only `InternalIP` type is supported -- Pacemaker allows multiple addresses for Corosync communication between nodes (1-8 addresses) -- The first address in the list is used for IP-based peer URLs for etcd membership -- IP validation: - - Must be a valid global unicast IPv4 or IPv6 address - - Must be in canonical form (e.g., `192.168.1.1` not `192.168.001.001`, or `2001:db8::1` not `2001:0db8::1`) - - Excludes loopback, link-local, and multicast addresses - - Maximum length is 39 characters (full IPv6 address) - -**Timestamp validation:** -- `lastUpdated` is required when status is present -- Once set, cannot be set to an earlier timestamp (validation uses `!has(oldSelf.lastUpdated)` to handle initial creation) -- Timestamps must always increase (prevents stale updates from overwriting newer data) - -**Status fields:** -- `status` - Optional on creation (pointer type), populated via status subresource -- When status is present, all fields within are required: - - `conditions` - Required array of cluster conditions (min 3 items) - - `lastUpdated` - Required timestamp for staleness detection - - `nodes` - Required array of control-plane node statuses (min 0, max 5; empty allowed for catastrophic failures) - -**Node fields (when node present):** -- `nodeName` - Required, RFC 1123 subdomain -- `addresses` - Required (min 1, max 8 items) -- `conditions` - Required (min 9 items with specific types enforced via XValidation) -- `resources` - Required (min 2 items: Kubelet and Etcd) -- `fencingAgents` - Required (min 1, max 8 items) - -**Conditions validation:** -- Cluster-level: MinItems=3 (Healthy, InService, NodeCountAsExpected) -- Node-level: MinItems=9 (Healthy, Online, InService, Active, Ready, Clean, Member, FencingAvailable, FencingHealthy) -- Resource-level: MinItems=8 (Healthy, InService, Managed, Enabled, Operational, Active, Started, Schedulable) -- Fencing agent-level: MinItems=8 (same conditions as resources) - -All condition arrays have XValidation rules to ensure specific condition types are present. - -**Resource names:** -- Valid values are: `Kubelet`, `Etcd` -- Both resources must be present in each node's `resources` array - -**Fencing agent fields:** -- `name`: Unique identifier for the fencing agent (e.g., "master-0_redfish") - - Must be unique within the `fencingAgents` array - - May contain alphanumeric characters, dots, hyphens, and underscores (`^[a-zA-Z0-9._-]+$`) - - Maximum 300 characters (provides headroom beyond 253 node name + underscore + method) -- `method`: Fencing method enum - valid values are `Redfish` or `IPMI` -- `conditions`: Required, same 8 conditions as resources - -Note: The target node is implied by the parent `PacemakerClusterNodeStatus` - fencing agents are nested under the node they can fence. - -### Usage - -The cluster-etcd-operator healthcheck controller watches this resource and updates operator conditions based on -the cluster state. The aggregate `Healthy` conditions at each level (cluster, node, resource) provide a quick -way to determine overall health. diff --git a/vendor/github.com/openshift/api/etcd/install.go b/vendor/github.com/openshift/api/etcd/install.go deleted file mode 100644 index 659816d81..000000000 --- a/vendor/github.com/openshift/api/etcd/install.go +++ /dev/null @@ -1,27 +0,0 @@ -package etcd - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - v1alpha1 "github.com/openshift/api/etcd/v1alpha1" - v1 "github.com/openshift/api/etcd/v1" -) - -const ( - GroupName = "etcd.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(v1.Install, v1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/etcd/v1/Makefile b/vendor/github.com/openshift/api/etcd/v1/Makefile deleted file mode 100644 index 6fa6435a2..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="etcd.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/etcd/v1/doc.go b/vendor/github.com/openshift/api/etcd/v1/doc.go deleted file mode 100644 index d1c4632de..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.etcd.v1 -// +openshift:featuregated-schema-gen=true -// +groupName=etcd.openshift.io -package v1 diff --git a/vendor/github.com/openshift/api/etcd/v1/register.go b/vendor/github.com/openshift/api/etcd/v1/register.go deleted file mode 100644 index 1b5926304..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "etcd.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &PacemakerCluster{}, - &PacemakerClusterList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/etcd/v1/types_pacemakercluster.go b/vendor/github.com/openshift/api/etcd/v1/types_pacemakercluster.go deleted file mode 100644 index a481f5e1b..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/types_pacemakercluster.go +++ /dev/null @@ -1,737 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// PacemakerCluster is used in Two Node OpenShift with Fencing deployments to monitor the health -// of etcd running under pacemaker. - -// Cluster-level condition types for PacemakerCluster.status.conditions -const ( - // ClusterHealthyConditionType tracks the overall health of the pacemaker cluster. - // This is an aggregate condition that reflects the health of all cluster-level conditions and node health. - // Specifically, it aggregates the following conditions: - // - ClusterInServiceConditionType - // - ClusterNodeCountAsExpectedConditionType - // - NodeHealthyConditionType (for each node) - // When True, the cluster is healthy with reason "ClusterHealthy". - // When False, the cluster is unhealthy with reason "ClusterUnhealthy". - ClusterHealthyConditionType = "Healthy" - - // ClusterInServiceConditionType tracks whether the cluster is in service (not in maintenance mode). - // Maintenance mode is a cluster-wide setting that prevents pacemaker from starting or stopping resources. - // When True, the cluster is in service with reason "InService". This is the normal operating state. - // When False, the cluster is in maintenance mode with reason "InMaintenance". This is an unexpected state. - ClusterInServiceConditionType = "InService" - - // ClusterNodeCountAsExpectedConditionType tracks whether the cluster has the expected number of nodes. - // For Two Node OpenShift with Fencing, we are expecting exactly 2 nodes. - // When True, the expected number of nodes are present with reason "AsExpected". - // When False, the node count is incorrect with reason "InsufficientNodes" or "ExcessiveNodes". - ClusterNodeCountAsExpectedConditionType = "NodeCountAsExpected" -) - -// ClusterHealthy condition reasons -const ( - // ClusterHealthyReasonHealthy means the pacemaker cluster is healthy and operating normally. - ClusterHealthyReasonHealthy = "ClusterHealthy" - - // ClusterHealthyReasonUnhealthy means the pacemaker cluster has issues that need investigation. - ClusterHealthyReasonUnhealthy = "ClusterUnhealthy" -) - -// ClusterInService condition reasons -const ( - // ClusterInServiceReasonInService means the cluster is in service (not in maintenance mode). - // This is the normal operating state. - ClusterInServiceReasonInService = "InService" - - // ClusterInServiceReasonInMaintenance means the cluster is in maintenance mode. - // In maintenance mode, pacemaker will not start or stop any resources. Entering and exiting this state requires - // manual user intervention, and is unexpected during normal cluster operation. - ClusterInServiceReasonInMaintenance = "InMaintenance" -) - -// ClusterNodeCountAsExpected condition reasons -const ( - // ClusterNodeCountAsExpectedReasonAsExpected means the expected number of nodes are present. - // For Two Node OpenShift with Fencing, we are expecting exactly 2 nodes. This is the expected healthy state. - ClusterNodeCountAsExpectedReasonAsExpected = "AsExpected" - - // ClusterNodeCountAsExpectedReasonInsufficientNodes means fewer nodes than expected are present. - // For Two Node OpenShift with Fencing, this means that less than 2 nodes are present. Under normal operation, this will only happen during - // a node replacement operation. It's also possible to enter this state with manual user intervention, but - // will also require user intervention to restore normal functionality. - ClusterNodeCountAsExpectedReasonInsufficientNodes = "InsufficientNodes" - - // ClusterNodeCountAsExpectedReasonExcessiveNodes means more nodes than expected are present. - // For Two Node OpenShift with Fencing, this means more than 2 nodes are present. This should be investigated as it is unexpected and should - // never happen during normal cluster operation. It is possible to enter this state with manual user intervention, - // but will also require user intervention to restore normal functionality. - ClusterNodeCountAsExpectedReasonExcessiveNodes = "ExcessiveNodes" -) - -// Node-level condition types for PacemakerCluster.status.nodes[].conditions -const ( - // NodeHealthyConditionType tracks the overall health of a node in the pacemaker cluster. - // This is an aggregate condition that reflects the health of all node-level conditions and resource health. - // Specifically, it aggregates the following conditions: - // - NodeOnlineConditionType - // - NodeInServiceConditionType - // - NodeActiveConditionType - // - NodeReadyConditionType - // - NodeCleanConditionType - // - NodeMemberConditionType - // - NodeFencingAvailableConditionType - // - NodeFencingHealthyConditionType - // - ResourceHealthyConditionType (for each resource in the node's resources list) - // When True, the node is healthy with reason "NodeHealthy". - // When False, the node is unhealthy with reason "NodeUnhealthy". - NodeHealthyConditionType = "Healthy" - - // NodeOnlineConditionType tracks whether a node is online. - // When True, the node is online with reason "Online". This is the normal operating state. - // When False, the node is offline with reason "Offline". This can occur during reboots, failures, maintenance, or replacement. - NodeOnlineConditionType = "Online" - - // NodeInServiceConditionType tracks whether a node is in service (not in maintenance mode). - // A node in maintenance mode is ignored by pacemaker while maintenance mode is active. - // When True, the node is in service with reason "InService". This is the normal operating state. - // When False, the node is in maintenance mode with reason "InMaintenance". This is an unexpected state. - NodeInServiceConditionType = "InService" - - // NodeActiveConditionType tracks whether a node is active (not in standby mode). - // When a node enters standby mode, pacemaker moves its resources to other nodes in the cluster. - // In Two Node OpenShift with Fencing, we do not use standby mode during normal operation. - // When True, the node is active with reason "Active". This is the normal operating state. - // When False, the node is in standby mode with reason "Standby". This is an unexpected state. - NodeActiveConditionType = "Active" - - // NodeReadyConditionType tracks whether a node is ready (not in a pending state). - // A node in a pending state is in the process of joining or leaving the cluster. - // When True, the node is ready with reason "Ready". This is the normal operating state. - // When False, the node is pending with reason "Pending". This is expected to be temporary. - NodeReadyConditionType = "Ready" - - // NodeCleanConditionType tracks whether a node is in a clean state. - // An unclean state means that pacemaker was unable to confirm the node's state, which signifies issues - // in fencing, communication, or configuration. - // When True, the node is clean with reason "Clean". This is the normal operating state. - // When False, the node is unclean with reason "Unclean". This is an unexpected state. - NodeCleanConditionType = "Clean" - - // NodeMemberConditionType tracks whether a node is a member of the cluster. - // Some configurations may use remote nodes or ping nodes, which are nodes that are not members. - // For Two Node OpenShift with Fencing, we expect both nodes to be members. - // When True, the node is a member with reason "Member". This is the normal operating state. - // When False, the node is not a member with reason "NotMember". This is an unexpected state. - NodeMemberConditionType = "Member" - - // NodeFencingAvailableConditionType tracks whether a node can be fenced by at least one fencing agent. - // For Two Node OpenShift with Fencing, each node needs at least one healthy fencing agent to ensure - // that the cluster can recover from a node failure via STONITH (Shoot The Other Node In The Head). - // When True, at least one fencing agent is healthy with reason "FencingAvailable". - // When False, all fencing agents are unhealthy with reason "FencingUnavailable". This is a critical - // state that should degrade the operator. - NodeFencingAvailableConditionType = "FencingAvailable" - - // NodeFencingHealthyConditionType tracks whether all fencing agents for a node are healthy. - // This is an aggregate condition that reflects the health of all fencing agents targeting this node. - // When True, all fencing agents are healthy with reason "FencingHealthy". - // When False, one or more fencing agents are unhealthy with reason "FencingUnhealthy". Warning events - // should be emitted for failing agents, but the operator should not be degraded if FencingAvailable is True. - NodeFencingHealthyConditionType = "FencingHealthy" -) - -// NodeHealthy condition reasons -const ( - // NodeHealthyReasonHealthy means the node is healthy and operating normally. - NodeHealthyReasonHealthy = "NodeHealthy" - - // NodeHealthyReasonUnhealthy means the node has issues that need investigation. - NodeHealthyReasonUnhealthy = "NodeUnhealthy" -) - -// NodeOnline condition reasons -const ( - // NodeOnlineReasonOnline means the node is online. This is the normal operating state. - NodeOnlineReasonOnline = "Online" - - // NodeOnlineReasonOffline means the node is offline. - NodeOnlineReasonOffline = "Offline" -) - -// NodeInService condition reasons -const ( - // NodeInServiceReasonInService means the node is in service (not in maintenance mode). - // This is the normal operating state. - NodeInServiceReasonInService = "InService" - - // NodeInServiceReasonInMaintenance means the node is in maintenance mode. - // This is an unexpected state. - NodeInServiceReasonInMaintenance = "InMaintenance" -) - -// NodeActive condition reasons -const ( - // NodeActiveReasonActive means the node is active (not in standby mode). - // This is the normal operating state. - NodeActiveReasonActive = "Active" - - // NodeActiveReasonStandby means the node is in standby mode. - // This is an unexpected state. - NodeActiveReasonStandby = "Standby" -) - -// NodeReady condition reasons -const ( - // NodeReadyReasonReady means the node is ready (not in a pending state). - // This is the normal operating state. - NodeReadyReasonReady = "Ready" - - // NodeReadyReasonPending means the node is joining or leaving the cluster. - // This state is expected to be temporary. - NodeReadyReasonPending = "Pending" -) - -// NodeClean condition reasons -const ( - // NodeCleanReasonClean means the node is in a clean state. - // This is the normal operating state. - NodeCleanReasonClean = "Clean" - - // NodeCleanReasonUnclean means the node is in an unclean state. - // Pacemaker was unable to confirm the node's state, which signifies issues in fencing, communication, or configuration. - // This is an unexpected state. - NodeCleanReasonUnclean = "Unclean" -) - -// NodeMember condition reasons -const ( - // NodeMemberReasonMember means the node is a member of the cluster. - // For Two Node OpenShift with Fencing, we expect both nodes to be members. This is the normal operating state. - NodeMemberReasonMember = "Member" - - // NodeMemberReasonNotMember means the node is not a member of the cluster. - // This is an unexpected state. - NodeMemberReasonNotMember = "NotMember" -) - -// NodeFencingAvailable condition reasons -const ( - // NodeFencingAvailableReasonAvailable means at least one fencing agent for this node is healthy. - // The cluster can fence this node if needed. This is the normal operating state. - NodeFencingAvailableReasonAvailable = "FencingAvailable" - - // NodeFencingAvailableReasonUnavailable means all fencing agents for this node are unhealthy. - // The cluster cannot fence this node, which compromises high availability. - // This is a critical state that should degrade the operator. - NodeFencingAvailableReasonUnavailable = "FencingUnavailable" -) - -// NodeFencingHealthy condition reasons -const ( - // NodeFencingHealthyReasonHealthy means all fencing agents for this node are healthy. - // This is the ideal operating state with full redundancy. - NodeFencingHealthyReasonHealthy = "FencingHealthy" - - // NodeFencingHealthyReasonUnhealthy means one or more fencing agents for this node are unhealthy. - // Warning events should be emitted for failing agents, but the operator should not be degraded - // if FencingAvailable is still True. - NodeFencingHealthyReasonUnhealthy = "FencingUnhealthy" -) - -// Resource-level condition types for PacemakerCluster.status.nodes[].resources[].conditions -const ( - // ResourceHealthyConditionType tracks the overall health of a pacemaker resource. - // This is an aggregate condition that reflects the health of all resource-level conditions. - // Specifically, it aggregates the following conditions: - // - ResourceInServiceConditionType - // - ResourceManagedConditionType - // - ResourceEnabledConditionType - // - ResourceOperationalConditionType - // - ResourceActiveConditionType - // - ResourceStartedConditionType - // - ResourceSchedulableConditionType - // When True, the resource is healthy with reason "ResourceHealthy". - // When False, the resource is unhealthy with reason "ResourceUnhealthy". - ResourceHealthyConditionType = "Healthy" - - // ResourceInServiceConditionType tracks whether a resource is in service (not in maintenance mode). - // Resources in maintenance mode are not monitored or moved by pacemaker. - // In Two Node OpenShift with Fencing, we do not expect any resources to be in maintenance mode. - // When True, the resource is in service with reason "InService". This is the normal operating state. - // When False, the resource is in maintenance mode with reason "InMaintenance". This is an unexpected state. - ResourceInServiceConditionType = "InService" - - // ResourceManagedConditionType tracks whether a resource is managed by pacemaker. - // Resources that are not managed by pacemaker are effectively invisible to the pacemaker HA logic. - // For Two Node OpenShift with Fencing, all resources are expected to be managed. - // When True, the resource is managed with reason "Managed". This is the normal operating state. - // When False, the resource is not managed with reason "Unmanaged". This is an unexpected state. - ResourceManagedConditionType = "Managed" - - // ResourceEnabledConditionType tracks whether a resource is enabled. - // Resources that are disabled are stopped and not automatically managed or started by the cluster. - // In Two Node OpenShift with Fencing, we do not expect any resources to be disabled. - // When True, the resource is enabled with reason "Enabled". This is the normal operating state. - // When False, the resource is disabled with reason "Disabled". This is an unexpected state. - ResourceEnabledConditionType = "Enabled" - - // ResourceOperationalConditionType tracks whether a resource is operational (not failed). - // A failed resource is one that is not able to start or is in an error state. - // When True, the resource is operational with reason "Operational". This is the normal operating state. - // When False, the resource has failed with reason "Failed". This is an unexpected state. - ResourceOperationalConditionType = "Operational" - - // ResourceActiveConditionType tracks whether a resource is active. - // An active resource is running on a cluster node. - // In Two Node OpenShift with Fencing, all resources are expected to be active. - // When True, the resource is active with reason "Active". This is the normal operating state. - // When False, the resource is not active with reason "Inactive". This is an unexpected state. - ResourceActiveConditionType = "Active" - - // ResourceStartedConditionType tracks whether a resource is started. - // It's normal for a resource like etcd to become stopped in the event of a quorum loss event because - // the pacemaker recovery logic will fence a node and restore etcd quorum on the surviving node as a cluster-of-one. - // A resource that stays stopped for an extended period of time is an unexpected state and should be investigated. - // When True, the resource is started with reason "Started". This is the normal operating state. - // When False, the resource is not started with reason "Stopped". This is expected to be temporary. - ResourceStartedConditionType = "Started" - - // ResourceSchedulableConditionType tracks whether a resource is schedulable (not blocked). - // A resource that is not schedulable is unable to start or move to a different node. - // In Two Node OpenShift with Fencing, we do not expect any resources to be unschedulable. - // When True, the resource is schedulable with reason "Schedulable". This is the normal operating state. - // When False, the resource is not schedulable with reason "Unschedulable". This is an unexpected state. - ResourceSchedulableConditionType = "Schedulable" -) - -// ResourceHealthy condition reasons -const ( - // ResourceHealthyReasonHealthy means the resource is healthy and operating normally. - ResourceHealthyReasonHealthy = "ResourceHealthy" - - // ResourceHealthyReasonUnhealthy means the resource has issues that need investigation. - ResourceHealthyReasonUnhealthy = "ResourceUnhealthy" -) - -// ResourceInService condition reasons -const ( - // ResourceInServiceReasonInService means the resource is in service (not in maintenance mode). - // This is the normal operating state. - ResourceInServiceReasonInService = "InService" - - // ResourceInServiceReasonInMaintenance means the resource is in maintenance mode. - // Resources in maintenance mode are not monitored or moved by pacemaker. This is an unexpected state. - ResourceInServiceReasonInMaintenance = "InMaintenance" -) - -// ResourceManaged condition reasons -const ( - // ResourceManagedReasonManaged means the resource is managed by pacemaker. - // This is the normal operating state. - ResourceManagedReasonManaged = "Managed" - - // ResourceManagedReasonUnmanaged means the resource is not managed by pacemaker. - // Resources that are not managed by pacemaker are effectively invisible to the pacemaker HA logic. - // This is an unexpected state. - ResourceManagedReasonUnmanaged = "Unmanaged" -) - -// ResourceEnabled condition reasons -const ( - // ResourceEnabledReasonEnabled means the resource is enabled. - // This is the normal operating state. - ResourceEnabledReasonEnabled = "Enabled" - - // ResourceEnabledReasonDisabled means the resource is disabled. - // Resources that are disabled are stopped and not automatically managed or started by the cluster. - // This is an unexpected state. - ResourceEnabledReasonDisabled = "Disabled" -) - -// ResourceOperational condition reasons -const ( - // ResourceOperationalReasonOperational means the resource is operational (not failed). - // This is the normal operating state. - ResourceOperationalReasonOperational = "Operational" - - // ResourceOperationalReasonFailed means the resource has failed. - // A failed resource is one that is not able to start or is in an error state. This is an unexpected state. - ResourceOperationalReasonFailed = "Failed" -) - -// ResourceActive condition reasons -const ( - // ResourceActiveReasonActive means the resource is active. - // An active resource is running on a cluster node. This is the normal operating state. - ResourceActiveReasonActive = "Active" - - // ResourceActiveReasonInactive means the resource is not active. - // This is an unexpected state. - ResourceActiveReasonInactive = "Inactive" -) - -// ResourceStarted condition reasons -const ( - // ResourceStartedReasonStarted means the resource is started. - // This is the normal operating state. - ResourceStartedReasonStarted = "Started" - - // ResourceStartedReasonStopped means the resource is stopped. - // It's normal for a resource like etcd to become stopped in the event of a quorum loss event because - // the pacemaker recovery logic will fence a node and restore etcd quorum on the surviving node as a cluster-of-one. - // A resource that stays stopped for an extended period of time is an unexpected state and should be investigated. - ResourceStartedReasonStopped = "Stopped" -) - -// ResourceSchedulable condition reasons -const ( - // ResourceSchedulableReasonSchedulable means the resource is schedulable (not blocked). - // This is the normal operating state. - ResourceSchedulableReasonSchedulable = "Schedulable" - - // ResourceSchedulableReasonUnschedulable means the resource is not schedulable (blocked). - // A resource that is not schedulable is unable to start or move to a different node. This is an unexpected state. - ResourceSchedulableReasonUnschedulable = "Unschedulable" -) - -// PacemakerNodeAddressType represents the type of a node address. -// Currently only InternalIP is supported. -// +kubebuilder:validation:Enum=InternalIP -// +enum -type PacemakerNodeAddressType string - -const ( - // PacemakerNodeInternalIP is an internal IP address assigned to the node. - // This is typically the IP address used for intra-cluster communication. - PacemakerNodeInternalIP PacemakerNodeAddressType = "InternalIP" -) - -// PacemakerNodeAddress contains information for a node's address. -// This is similar to corev1.NodeAddress but adds validation for IP addresses. -type PacemakerNodeAddress struct { - // type is the type of node address. - // Currently only "InternalIP" is supported. - // +required - Type PacemakerNodeAddressType `json:"type,omitempty"` - - // address is the node address. - // For InternalIP, this must be a valid global unicast IPv4 or IPv6 address in canonical form. - // Canonical form means the shortest standard representation (e.g., "192.168.1.1" not "192.168.001.001", - // or "2001:db8::1" not "2001:0db8::1"). Maximum length is 39 characters (full IPv6 address). - // Global unicast includes private/RFC1918 addresses but excludes loopback, link-local, and multicast. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=39 - // +kubebuilder:validation:XValidation:rule="isIP(self) && ip.isCanonical(self) && ip(self).isGlobalUnicast()",message="must be a valid global unicast IPv4 or IPv6 address in canonical form" - // +required - Address string `json:"address,omitempty"` -} - -// PacemakerClusterResourceName represents the name of a pacemaker resource. -// Fencing agents are tracked separately in the fencingAgents field. -// +kubebuilder:validation:Enum=Kubelet;Etcd -// +enum -type PacemakerClusterResourceName string - -// PacemakerClusterResourceName values -const ( - // PacemakerClusterResourceNameKubelet is the kubelet pacemaker resource. - // The kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. - PacemakerClusterResourceNameKubelet PacemakerClusterResourceName = "Kubelet" - - // PacemakerClusterResourceNameEtcd is the etcd pacemaker resource. - // The etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. - PacemakerClusterResourceNameEtcd PacemakerClusterResourceName = "Etcd" -) - -// FencingMethod represents the method used by a fencing agent to isolate failed nodes. -// Valid values are "Redfish" and "IPMI". -// +kubebuilder:validation:Enum=Redfish;IPMI -// +enum -type FencingMethod string - -// FencingMethod values -const ( - // FencingMethodRedfish uses Redfish, a standard RESTful API for server management. - FencingMethodRedfish FencingMethod = "Redfish" - - // FencingMethodIPMI uses IPMI (Intelligent Platform Management Interface), a hardware management interface. - FencingMethodIPMI FencingMethod = "IPMI" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// PacemakerCluster represents the current state of the pacemaker cluster as reported by the pcs status command. -// PacemakerCluster is a cluster-scoped singleton resource. The name of this instance is "cluster". This -// resource provides a view into the health and status of a pacemaker-managed cluster in Two Node OpenShift with Fencing deployments. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=pacemakerclusters,scope=Cluster,singular=pacemakercluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2544 -// +openshift:file-pattern=cvoRunLevel=0000_25,operatorName=etcd,operatorOrdering=01,operatorComponent=two-node-fencing -// +openshift:enable:FeatureGate=DualReplica -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="PacemakerCluster must be named 'cluster'" -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.status) || has(self.status)",message="status may not be removed once set" -type PacemakerCluster struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +required - metav1.ObjectMeta `json:"metadata,omitempty"` - - // status contains the actual pacemaker cluster status information collected from the cluster. - // The goal of this status is to be able to quickly identify if pacemaker is in a healthy state. - // In Two Node OpenShift with Fencing, a healthy pacemaker cluster has 2 nodes, both of which have healthy kubelet, etcd, and fencing resources. - // This field is optional on creation - the status collector populates it immediately after creating - // the resource via the status subresource. - // +optional - Status PacemakerClusterStatus `json:"status,omitzero"` -} - -// PacemakerClusterStatus contains the actual pacemaker cluster status information. As part of validating the status -// object, we need to ensure that the lastUpdated timestamp may not be set to an earlier timestamp than the current value. -// The validation rule checks if oldSelf has lastUpdated before comparing, to handle the initial status creation case. -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.lastUpdated) || self.lastUpdated >= oldSelf.lastUpdated",message="lastUpdated may not be set to an earlier timestamp" -type PacemakerClusterStatus struct { - // conditions represent the observations of the pacemaker cluster's current state. - // Known condition types are: "Healthy", "InService", "NodeCountAsExpected". - // The "Healthy" condition is an aggregate that tracks the overall health of the cluster. - // The "InService" condition tracks whether the cluster is in service (not in maintenance mode). - // The "NodeCountAsExpected" condition tracks whether the expected number of nodes are present. - // Each of these conditions is required, so the array must contain at least 3 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=3 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'NodeCountAsExpected')",message="conditions must contain a condition of type NodeCountAsExpected" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // lastUpdated is the timestamp when this status was last updated. This is useful for identifying - // stale status reports. It must be a valid timestamp in RFC3339 format. Once set, this field cannot - // be removed and cannot be set to an earlier timestamp than the current value. - // +kubebuilder:validation:Format=date-time - // +required - LastUpdated metav1.Time `json:"lastUpdated,omitempty,omitzero"` - - // nodes provides detailed status for each control-plane node in the Pacemaker cluster. - // While Pacemaker supports up to 32 nodes, the limit is set to 5 (max OpenShift control-plane nodes). - // For Two Node OpenShift with Fencing, exactly 2 nodes are expected in a healthy cluster. - // An empty list indicates a catastrophic failure where Pacemaker reports no nodes. - // +listType=map - // +listMapKey=nodeName - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=5 - // +required - Nodes *[]PacemakerClusterNodeStatus `json:"nodes,omitempty"` -} - -// PacemakerClusterNodeStatus represents the status of a single node in the pacemaker cluster including -// the node's conditions and the health of critical resources running on that node. -type PacemakerClusterNodeStatus struct { - // conditions represent the observations of the node's current state. - // Known condition types are: "Healthy", "Online", "InService", "Active", "Ready", "Clean", "Member", - // "FencingAvailable", "FencingHealthy". - // The "Healthy" condition is an aggregate that tracks the overall health of the node. - // The "Online" condition tracks whether the node is online. - // The "InService" condition tracks whether the node is in service (not in maintenance mode). - // The "Active" condition tracks whether the node is active (not in standby mode). - // The "Ready" condition tracks whether the node is ready (not in a pending state). - // The "Clean" condition tracks whether the node is in a clean (status known) state. - // The "Member" condition tracks whether the node is a member of the cluster. - // The "FencingAvailable" condition tracks whether this node can be fenced by at least one healthy agent. - // The "FencingHealthy" condition tracks whether all fencing agents for this node are healthy. - // Each of these conditions is required, so the array must contain at least 9 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=9 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Online')",message="conditions must contain a condition of type Online" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Ready')",message="conditions must contain a condition of type Ready" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Clean')",message="conditions must contain a condition of type Clean" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Member')",message="conditions must contain a condition of type Member" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'FencingAvailable')",message="conditions must contain a condition of type FencingAvailable" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'FencingHealthy')",message="conditions must contain a condition of type FencingHealthy" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // nodeName is the name of the node. This is expected to match the Kubernetes node's name, which must be a lowercase - // RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with - // an alphanumeric character, and be at most 253 characters in length. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="nodeName must be a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" - // +required - NodeName string `json:"nodeName,omitempty"` - - // addresses is a list of IP addresses for the node. - // Pacemaker allows multiple IP addresses for Corosync communication between nodes. - // The first address in this list is used for IP-based peer URLs for etcd membership. - // Each address must be a valid global unicast IPv4 or IPv6 address in canonical form - // (e.g., "192.168.1.1" not "192.168.001.001", or "2001:db8::1" not "2001:0db8::1"). - // This excludes loopback, link-local, and multicast addresses. - // +listType=atomic - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=8 - // +required - Addresses []PacemakerNodeAddress `json:"addresses,omitempty"` - - // resources contains the status of pacemaker resources scheduled on this node. - // Each resource entry includes the resource name and its health conditions. - // For Two Node OpenShift with Fencing, we track Kubelet and Etcd resources per node. - // Both resources are required to be present, so the array must contain at least 2 items. - // Valid resource names are "Kubelet" and "Etcd". - // Fencing agents are tracked separately in the fencingAgents field. - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems=2 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.exists(r, r.name == 'Kubelet')",message="resources must contain a resource named Kubelet" - // +kubebuilder:validation:XValidation:rule="self.exists(r, r.name == 'Etcd')",message="resources must contain a resource named Etcd" - // +required - Resources []PacemakerClusterResourceStatus `json:"resources,omitempty"` - - // fencingAgents contains the status of fencing agents that can fence this node. - // Unlike resources (which are scheduled to run on this node), fencing agents are mapped - // to the node they can fence (their target), not the node where monitoring operations run. - // Each fencing agent entry includes a unique name, fencing type, target node, and health conditions. - // A node is considered fence-capable if at least one fencing agent is healthy. - // A healthy node is expected to have at least 1 fencing agent, but the list may be empty - // when fencing agent discovery fails. - // Names must be unique within this array. - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name))",message="fencing agent names must be unique" - // +required - FencingAgents []PacemakerClusterFencingAgentStatus `json:"fencingAgents,omitempty"` -} - -// PacemakerClusterFencingAgentStatus represents the status of a fencing agent that can fence a node. -// Fencing agents are STONITH (Shoot The Other Node In The Head) devices used to isolate failed nodes. -// Unlike regular pacemaker resources, fencing agents are mapped to their target node (the node they -// can fence), not the node where their monitoring operations are scheduled. -type PacemakerClusterFencingAgentStatus struct { - // conditions represent the observations of the fencing agent's current state. - // Known condition types are: "Healthy", "InService", "Managed", "Enabled", "Operational", - // "Active", "Started", "Schedulable". - // The "Healthy" condition is an aggregate that tracks the overall health of the fencing agent. - // The "InService" condition tracks whether the fencing agent is in service (not in maintenance mode). - // The "Managed" condition tracks whether the fencing agent is managed by pacemaker. - // The "Enabled" condition tracks whether the fencing agent is enabled. - // The "Operational" condition tracks whether the fencing agent is operational (not failed). - // The "Active" condition tracks whether the fencing agent is active (available to be used). - // The "Started" condition tracks whether the fencing agent is started. - // The "Schedulable" condition tracks whether the fencing agent is schedulable (not blocked). - // Each of these conditions is required, so the array must contain at least 8 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=8 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Managed')",message="conditions must contain a condition of type Managed" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Enabled')",message="conditions must contain a condition of type Enabled" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Operational')",message="conditions must contain a condition of type Operational" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Started')",message="conditions must contain a condition of type Started" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Schedulable')",message="conditions must contain a condition of type Schedulable" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // name is the unique identifier for this fencing agent (e.g., "master-0_redfish"). - // The name must be unique within the fencingAgents array for this node. - // It may contain alphanumeric characters, dots, hyphens, and underscores. - // Maximum length is 300 characters, providing headroom beyond the typical format of - // _ (253 for RFC 1123 node name + 1 underscore + type). - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=300 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._-]+$')",message="name must contain only alphanumeric characters, dots, hyphens, and underscores" - // +required - Name string `json:"name,omitempty"` - - // method is the fencing method used by this agent. - // Valid values are "Redfish" and "IPMI". - // Redfish is a standard RESTful API for server management. - // IPMI (Intelligent Platform Management Interface) is a hardware management interface. - // +required - Method FencingMethod `json:"method,omitempty"` -} - -// PacemakerClusterResourceStatus represents the status of a pacemaker resource scheduled on a node. -// A pacemaker resource is a unit of work managed by pacemaker. In pacemaker terminology, resources are services or -// applications that pacemaker monitors, starts, stops, and moves between nodes to maintain high availability. -// For Two Node OpenShift with Fencing, we track two resources per node: -// - Kubelet (the Kubernetes node agent and a prerequisite for etcd) -// - Etcd (the distributed key-value store) -// -// Fencing agents are tracked separately in the fencingAgents field because they are mapped to -// their target node (the node they can fence), not the node where monitoring operations are scheduled. -type PacemakerClusterResourceStatus struct { - // conditions represent the observations of the resource's current state. - // Known condition types are: "Healthy", "InService", "Managed", "Enabled", "Operational", - // "Active", "Started", "Schedulable". - // The "Healthy" condition is an aggregate that tracks the overall health of the resource. - // The "InService" condition tracks whether the resource is in service (not in maintenance mode). - // The "Managed" condition tracks whether the resource is managed by pacemaker. - // The "Enabled" condition tracks whether the resource is enabled. - // The "Operational" condition tracks whether the resource is operational (not failed). - // The "Active" condition tracks whether the resource is active (available to be used). - // The "Started" condition tracks whether the resource is started. - // The "Schedulable" condition tracks whether the resource is schedulable (not blocked). - // Each of these conditions is required, so the array must contain at least 8 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=8 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Managed')",message="conditions must contain a condition of type Managed" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Enabled')",message="conditions must contain a condition of type Enabled" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Operational')",message="conditions must contain a condition of type Operational" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Started')",message="conditions must contain a condition of type Started" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Schedulable')",message="conditions must contain a condition of type Schedulable" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // name is the name of the pacemaker resource. - // Valid values are "Kubelet" and "Etcd". - // The Kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. - // The Etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. - // Fencing agents are tracked separately in the node's fencingAgents field. - // +required - Name PacemakerClusterResourceName `json:"name,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// PacemakerClusterList contains a list of PacemakerCluster objects. PacemakerCluster is a cluster-scoped singleton -// resource; only one instance named "cluster" may exist. This list type exists only to satisfy Kubernetes API -// conventions. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type PacemakerClusterList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items is a list of PacemakerCluster objects. - Items []PacemakerCluster `json:"items"` -} diff --git a/vendor/github.com/openshift/api/etcd/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/etcd/v1/zz_generated.deepcopy.go deleted file mode 100644 index c529240e4..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,210 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *PacemakerCluster) DeepCopyInto(out *PacemakerCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerCluster. -func (in *PacemakerCluster) DeepCopy() *PacemakerCluster { - if in == nil { - return nil - } - out := new(PacemakerCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PacemakerCluster) 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 *PacemakerClusterFencingAgentStatus) DeepCopyInto(out *PacemakerClusterFencingAgentStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterFencingAgentStatus. -func (in *PacemakerClusterFencingAgentStatus) DeepCopy() *PacemakerClusterFencingAgentStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterFencingAgentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterList) DeepCopyInto(out *PacemakerClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PacemakerCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterList. -func (in *PacemakerClusterList) DeepCopy() *PacemakerClusterList { - if in == nil { - return nil - } - out := new(PacemakerClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PacemakerClusterList) 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 *PacemakerClusterNodeStatus) DeepCopyInto(out *PacemakerClusterNodeStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]PacemakerNodeAddress, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]PacemakerClusterResourceStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FencingAgents != nil { - in, out := &in.FencingAgents, &out.FencingAgents - *out = make([]PacemakerClusterFencingAgentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterNodeStatus. -func (in *PacemakerClusterNodeStatus) DeepCopy() *PacemakerClusterNodeStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterNodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterResourceStatus) DeepCopyInto(out *PacemakerClusterResourceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterResourceStatus. -func (in *PacemakerClusterResourceStatus) DeepCopy() *PacemakerClusterResourceStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterResourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterStatus) DeepCopyInto(out *PacemakerClusterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.LastUpdated.DeepCopyInto(&out.LastUpdated) - if in.Nodes != nil { - in, out := &in.Nodes, &out.Nodes - *out = new([]PacemakerClusterNodeStatus) - if **in != nil { - in, out := *in, *out - *out = make([]PacemakerClusterNodeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterStatus. -func (in *PacemakerClusterStatus) DeepCopy() *PacemakerClusterStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerNodeAddress) DeepCopyInto(out *PacemakerNodeAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerNodeAddress. -func (in *PacemakerNodeAddress) DeepCopy() *PacemakerNodeAddress { - if in == nil { - return nil - } - out := new(PacemakerNodeAddress) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/etcd/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/etcd/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 1a11a877c..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pacemakerclusters.etcd.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2544 - CRDName: pacemakerclusters.etcd.openshift.io - Capability: "" - Category: "" - FeatureGates: - - DualReplica - FilenameOperatorName: etcd - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_25" - GroupName: etcd.openshift.io - HasStatus: true - KindName: PacemakerCluster - Labels: {} - PluralName: pacemakerclusters - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - DualReplica - Version: v1 - diff --git a/vendor/github.com/openshift/api/etcd/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/etcd/v1/zz_generated.model_name.go deleted file mode 100644 index 9e13a7167..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/zz_generated.model_name.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerCluster) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerCluster" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterFencingAgentStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerClusterFencingAgentStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterList) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerClusterList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterNodeStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerClusterNodeStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterResourceStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerClusterResourceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerClusterStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerNodeAddress) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1.PacemakerNodeAddress" -} diff --git a/vendor/github.com/openshift/api/etcd/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/etcd/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index e9e47b47c..000000000 --- a/vendor/github.com/openshift/api/etcd/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,89 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_PacemakerCluster = map[string]string{ - "": "PacemakerCluster represents the current state of the pacemaker cluster as reported by the pcs status command. PacemakerCluster is a cluster-scoped singleton resource. The name of this instance is \"cluster\". This resource provides a view into the health and status of a pacemaker-managed cluster in Two Node OpenShift with Fencing deployments.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "status": "status contains the actual pacemaker cluster status information collected from the cluster. The goal of this status is to be able to quickly identify if pacemaker is in a healthy state. In Two Node OpenShift with Fencing, a healthy pacemaker cluster has 2 nodes, both of which have healthy kubelet, etcd, and fencing resources. This field is optional on creation - the status collector populates it immediately after creating the resource via the status subresource.", -} - -func (PacemakerCluster) SwaggerDoc() map[string]string { - return map_PacemakerCluster -} - -var map_PacemakerClusterFencingAgentStatus = map[string]string{ - "": "PacemakerClusterFencingAgentStatus represents the status of a fencing agent that can fence a node. Fencing agents are STONITH (Shoot The Other Node In The Head) devices used to isolate failed nodes. Unlike regular pacemaker resources, fencing agents are mapped to their target node (the node they can fence), not the node where their monitoring operations are scheduled.", - "conditions": "conditions represent the observations of the fencing agent's current state. Known condition types are: \"Healthy\", \"InService\", \"Managed\", \"Enabled\", \"Operational\", \"Active\", \"Started\", \"Schedulable\". The \"Healthy\" condition is an aggregate that tracks the overall health of the fencing agent. The \"InService\" condition tracks whether the fencing agent is in service (not in maintenance mode). The \"Managed\" condition tracks whether the fencing agent is managed by pacemaker. The \"Enabled\" condition tracks whether the fencing agent is enabled. The \"Operational\" condition tracks whether the fencing agent is operational (not failed). The \"Active\" condition tracks whether the fencing agent is active (available to be used). The \"Started\" condition tracks whether the fencing agent is started. The \"Schedulable\" condition tracks whether the fencing agent is schedulable (not blocked). Each of these conditions is required, so the array must contain at least 8 items.", - "name": "name is the unique identifier for this fencing agent (e.g., \"master-0_redfish\"). The name must be unique within the fencingAgents array for this node. It may contain alphanumeric characters, dots, hyphens, and underscores. Maximum length is 300 characters, providing headroom beyond the typical format of _ (253 for RFC 1123 node name + 1 underscore + type).", - "method": "method is the fencing method used by this agent. Valid values are \"Redfish\" and \"IPMI\". Redfish is a standard RESTful API for server management. IPMI (Intelligent Platform Management Interface) is a hardware management interface.", -} - -func (PacemakerClusterFencingAgentStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterFencingAgentStatus -} - -var map_PacemakerClusterList = map[string]string{ - "": "PacemakerClusterList contains a list of PacemakerCluster objects. PacemakerCluster is a cluster-scoped singleton resource; only one instance named \"cluster\" may exist. This list type exists only to satisfy Kubernetes API conventions.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of PacemakerCluster objects.", -} - -func (PacemakerClusterList) SwaggerDoc() map[string]string { - return map_PacemakerClusterList -} - -var map_PacemakerClusterNodeStatus = map[string]string{ - "": "PacemakerClusterNodeStatus represents the status of a single node in the pacemaker cluster including the node's conditions and the health of critical resources running on that node.", - "conditions": "conditions represent the observations of the node's current state. Known condition types are: \"Healthy\", \"Online\", \"InService\", \"Active\", \"Ready\", \"Clean\", \"Member\", \"FencingAvailable\", \"FencingHealthy\". The \"Healthy\" condition is an aggregate that tracks the overall health of the node. The \"Online\" condition tracks whether the node is online. The \"InService\" condition tracks whether the node is in service (not in maintenance mode). The \"Active\" condition tracks whether the node is active (not in standby mode). The \"Ready\" condition tracks whether the node is ready (not in a pending state). The \"Clean\" condition tracks whether the node is in a clean (status known) state. The \"Member\" condition tracks whether the node is a member of the cluster. The \"FencingAvailable\" condition tracks whether this node can be fenced by at least one healthy agent. The \"FencingHealthy\" condition tracks whether all fencing agents for this node are healthy. Each of these conditions is required, so the array must contain at least 9 items.", - "nodeName": "nodeName is the name of the node. This is expected to match the Kubernetes node's name, which must be a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character, and be at most 253 characters in length.", - "addresses": "addresses is a list of IP addresses for the node. Pacemaker allows multiple IP addresses for Corosync communication between nodes. The first address in this list is used for IP-based peer URLs for etcd membership. Each address must be a valid global unicast IPv4 or IPv6 address in canonical form (e.g., \"192.168.1.1\" not \"192.168.001.001\", or \"2001:db8::1\" not \"2001:0db8::1\"). This excludes loopback, link-local, and multicast addresses.", - "resources": "resources contains the status of pacemaker resources scheduled on this node. Each resource entry includes the resource name and its health conditions. For Two Node OpenShift with Fencing, we track Kubelet and Etcd resources per node. Both resources are required to be present, so the array must contain at least 2 items. Valid resource names are \"Kubelet\" and \"Etcd\". Fencing agents are tracked separately in the fencingAgents field.", - "fencingAgents": "fencingAgents contains the status of fencing agents that can fence this node. Unlike resources (which are scheduled to run on this node), fencing agents are mapped to the node they can fence (their target), not the node where monitoring operations run. Each fencing agent entry includes a unique name, fencing type, target node, and health conditions. A node is considered fence-capable if at least one fencing agent is healthy. A healthy node is expected to have at least 1 fencing agent, but the list may be empty when fencing agent discovery fails. Names must be unique within this array.", -} - -func (PacemakerClusterNodeStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterNodeStatus -} - -var map_PacemakerClusterResourceStatus = map[string]string{ - "": "PacemakerClusterResourceStatus represents the status of a pacemaker resource scheduled on a node. A pacemaker resource is a unit of work managed by pacemaker. In pacemaker terminology, resources are services or applications that pacemaker monitors, starts, stops, and moves between nodes to maintain high availability. For Two Node OpenShift with Fencing, we track two resources per node:\n - Kubelet (the Kubernetes node agent and a prerequisite for etcd)\n - Etcd (the distributed key-value store)\n\nFencing agents are tracked separately in the fencingAgents field because they are mapped to their target node (the node they can fence), not the node where monitoring operations are scheduled.", - "conditions": "conditions represent the observations of the resource's current state. Known condition types are: \"Healthy\", \"InService\", \"Managed\", \"Enabled\", \"Operational\", \"Active\", \"Started\", \"Schedulable\". The \"Healthy\" condition is an aggregate that tracks the overall health of the resource. The \"InService\" condition tracks whether the resource is in service (not in maintenance mode). The \"Managed\" condition tracks whether the resource is managed by pacemaker. The \"Enabled\" condition tracks whether the resource is enabled. The \"Operational\" condition tracks whether the resource is operational (not failed). The \"Active\" condition tracks whether the resource is active (available to be used). The \"Started\" condition tracks whether the resource is started. The \"Schedulable\" condition tracks whether the resource is schedulable (not blocked). Each of these conditions is required, so the array must contain at least 8 items.", - "name": "name is the name of the pacemaker resource. Valid values are \"Kubelet\" and \"Etcd\". The Kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. The Etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. Fencing agents are tracked separately in the node's fencingAgents field.", -} - -func (PacemakerClusterResourceStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterResourceStatus -} - -var map_PacemakerClusterStatus = map[string]string{ - "": "PacemakerClusterStatus contains the actual pacemaker cluster status information. As part of validating the status object, we need to ensure that the lastUpdated timestamp may not be set to an earlier timestamp than the current value. The validation rule checks if oldSelf has lastUpdated before comparing, to handle the initial status creation case.", - "conditions": "conditions represent the observations of the pacemaker cluster's current state. Known condition types are: \"Healthy\", \"InService\", \"NodeCountAsExpected\". The \"Healthy\" condition is an aggregate that tracks the overall health of the cluster. The \"InService\" condition tracks whether the cluster is in service (not in maintenance mode). The \"NodeCountAsExpected\" condition tracks whether the expected number of nodes are present. Each of these conditions is required, so the array must contain at least 3 items.", - "lastUpdated": "lastUpdated is the timestamp when this status was last updated. This is useful for identifying stale status reports. It must be a valid timestamp in RFC3339 format. Once set, this field cannot be removed and cannot be set to an earlier timestamp than the current value.", - "nodes": "nodes provides detailed status for each control-plane node in the Pacemaker cluster. While Pacemaker supports up to 32 nodes, the limit is set to 5 (max OpenShift control-plane nodes). For Two Node OpenShift with Fencing, exactly 2 nodes are expected in a healthy cluster. An empty list indicates a catastrophic failure where Pacemaker reports no nodes.", -} - -func (PacemakerClusterStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterStatus -} - -var map_PacemakerNodeAddress = map[string]string{ - "": "PacemakerNodeAddress contains information for a node's address. This is similar to corev1.NodeAddress but adds validation for IP addresses.", - "type": "type is the type of node address. Currently only \"InternalIP\" is supported.", - "address": "address is the node address. For InternalIP, this must be a valid global unicast IPv4 or IPv6 address in canonical form. Canonical form means the shortest standard representation (e.g., \"192.168.1.1\" not \"192.168.001.001\", or \"2001:db8::1\" not \"2001:0db8::1\"). Maximum length is 39 characters (full IPv6 address). Global unicast includes private/RFC1918 addresses but excludes loopback, link-local, and multicast.", -} - -func (PacemakerNodeAddress) SwaggerDoc() map[string]string { - return map_PacemakerNodeAddress -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/Makefile b/vendor/github.com/openshift/api/etcd/v1alpha1/Makefile deleted file mode 100644 index 3d019662a..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="etcd.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/doc.go b/vendor/github.com/openshift/api/etcd/v1alpha1/doc.go deleted file mode 100644 index c93f9a586..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.etcd.v1alpha1 -// +openshift:featuregated-schema-gen=true -// +groupName=etcd.openshift.io -package v1alpha1 diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/register.go b/vendor/github.com/openshift/api/etcd/v1alpha1/register.go deleted file mode 100644 index 1dc6482f8..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "etcd.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &PacemakerCluster{}, - &PacemakerClusterList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/types_pacemakercluster.go b/vendor/github.com/openshift/api/etcd/v1alpha1/types_pacemakercluster.go deleted file mode 100644 index b62741347..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/types_pacemakercluster.go +++ /dev/null @@ -1,737 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// PacemakerCluster is used in Two Node OpenShift with Fencing deployments to monitor the health -// of etcd running under pacemaker. - -// Cluster-level condition types for PacemakerCluster.status.conditions -const ( - // ClusterHealthyConditionType tracks the overall health of the pacemaker cluster. - // This is an aggregate condition that reflects the health of all cluster-level conditions and node health. - // Specifically, it aggregates the following conditions: - // - ClusterInServiceConditionType - // - ClusterNodeCountAsExpectedConditionType - // - NodeHealthyConditionType (for each node) - // When True, the cluster is healthy with reason "ClusterHealthy". - // When False, the cluster is unhealthy with reason "ClusterUnhealthy". - ClusterHealthyConditionType = "Healthy" - - // ClusterInServiceConditionType tracks whether the cluster is in service (not in maintenance mode). - // Maintenance mode is a cluster-wide setting that prevents pacemaker from starting or stopping resources. - // When True, the cluster is in service with reason "InService". This is the normal operating state. - // When False, the cluster is in maintenance mode with reason "InMaintenance". This is an unexpected state. - ClusterInServiceConditionType = "InService" - - // ClusterNodeCountAsExpectedConditionType tracks whether the cluster has the expected number of nodes. - // For Two Node OpenShift with Fencing, we are expecting exactly 2 nodes. - // When True, the expected number of nodes are present with reason "AsExpected". - // When False, the node count is incorrect with reason "InsufficientNodes" or "ExcessiveNodes". - ClusterNodeCountAsExpectedConditionType = "NodeCountAsExpected" -) - -// ClusterHealthy condition reasons -const ( - // ClusterHealthyReasonHealthy means the pacemaker cluster is healthy and operating normally. - ClusterHealthyReasonHealthy = "ClusterHealthy" - - // ClusterHealthyReasonUnhealthy means the pacemaker cluster has issues that need investigation. - ClusterHealthyReasonUnhealthy = "ClusterUnhealthy" -) - -// ClusterInService condition reasons -const ( - // ClusterInServiceReasonInService means the cluster is in service (not in maintenance mode). - // This is the normal operating state. - ClusterInServiceReasonInService = "InService" - - // ClusterInServiceReasonInMaintenance means the cluster is in maintenance mode. - // In maintenance mode, pacemaker will not start or stop any resources. Entering and exiting this state requires - // manual user intervention, and is unexpected during normal cluster operation. - ClusterInServiceReasonInMaintenance = "InMaintenance" -) - -// ClusterNodeCountAsExpected condition reasons -const ( - // ClusterNodeCountAsExpectedReasonAsExpected means the expected number of nodes are present. - // For Two Node OpenShift with Fencing, we are expecting exactly 2 nodes. This is the expected healthy state. - ClusterNodeCountAsExpectedReasonAsExpected = "AsExpected" - - // ClusterNodeCountAsExpectedReasonInsufficientNodes means fewer nodes than expected are present. - // For Two Node OpenShift with Fencing, this means that less than 2 nodes are present. Under normal operation, this will only happen during - // a node replacement operation. It's also possible to enter this state with manual user intervention, but - // will also require user intervention to restore normal functionality. - ClusterNodeCountAsExpectedReasonInsufficientNodes = "InsufficientNodes" - - // ClusterNodeCountAsExpectedReasonExcessiveNodes means more nodes than expected are present. - // For Two Node OpenShift with Fencing, this means more than 2 nodes are present. This should be investigated as it is unexpected and should - // never happen during normal cluster operation. It is possible to enter this state with manual user intervention, - // but will also require user intervention to restore normal functionality. - ClusterNodeCountAsExpectedReasonExcessiveNodes = "ExcessiveNodes" -) - -// Node-level condition types for PacemakerCluster.status.nodes[].conditions -const ( - // NodeHealthyConditionType tracks the overall health of a node in the pacemaker cluster. - // This is an aggregate condition that reflects the health of all node-level conditions and resource health. - // Specifically, it aggregates the following conditions: - // - NodeOnlineConditionType - // - NodeInServiceConditionType - // - NodeActiveConditionType - // - NodeReadyConditionType - // - NodeCleanConditionType - // - NodeMemberConditionType - // - NodeFencingAvailableConditionType - // - NodeFencingHealthyConditionType - // - ResourceHealthyConditionType (for each resource in the node's resources list) - // When True, the node is healthy with reason "NodeHealthy". - // When False, the node is unhealthy with reason "NodeUnhealthy". - NodeHealthyConditionType = "Healthy" - - // NodeOnlineConditionType tracks whether a node is online. - // When True, the node is online with reason "Online". This is the normal operating state. - // When False, the node is offline with reason "Offline". This can occur during reboots, failures, maintenance, or replacement. - NodeOnlineConditionType = "Online" - - // NodeInServiceConditionType tracks whether a node is in service (not in maintenance mode). - // A node in maintenance mode is ignored by pacemaker while maintenance mode is active. - // When True, the node is in service with reason "InService". This is the normal operating state. - // When False, the node is in maintenance mode with reason "InMaintenance". This is an unexpected state. - NodeInServiceConditionType = "InService" - - // NodeActiveConditionType tracks whether a node is active (not in standby mode). - // When a node enters standby mode, pacemaker moves its resources to other nodes in the cluster. - // In Two Node OpenShift with Fencing, we do not use standby mode during normal operation. - // When True, the node is active with reason "Active". This is the normal operating state. - // When False, the node is in standby mode with reason "Standby". This is an unexpected state. - NodeActiveConditionType = "Active" - - // NodeReadyConditionType tracks whether a node is ready (not in a pending state). - // A node in a pending state is in the process of joining or leaving the cluster. - // When True, the node is ready with reason "Ready". This is the normal operating state. - // When False, the node is pending with reason "Pending". This is expected to be temporary. - NodeReadyConditionType = "Ready" - - // NodeCleanConditionType tracks whether a node is in a clean state. - // An unclean state means that pacemaker was unable to confirm the node's state, which signifies issues - // in fencing, communication, or configuration. - // When True, the node is clean with reason "Clean". This is the normal operating state. - // When False, the node is unclean with reason "Unclean". This is an unexpected state. - NodeCleanConditionType = "Clean" - - // NodeMemberConditionType tracks whether a node is a member of the cluster. - // Some configurations may use remote nodes or ping nodes, which are nodes that are not members. - // For Two Node OpenShift with Fencing, we expect both nodes to be members. - // When True, the node is a member with reason "Member". This is the normal operating state. - // When False, the node is not a member with reason "NotMember". This is an unexpected state. - NodeMemberConditionType = "Member" - - // NodeFencingAvailableConditionType tracks whether a node can be fenced by at least one fencing agent. - // For Two Node OpenShift with Fencing, each node needs at least one healthy fencing agent to ensure - // that the cluster can recover from a node failure via STONITH (Shoot The Other Node In The Head). - // When True, at least one fencing agent is healthy with reason "FencingAvailable". - // When False, all fencing agents are unhealthy with reason "FencingUnavailable". This is a critical - // state that should degrade the operator. - NodeFencingAvailableConditionType = "FencingAvailable" - - // NodeFencingHealthyConditionType tracks whether all fencing agents for a node are healthy. - // This is an aggregate condition that reflects the health of all fencing agents targeting this node. - // When True, all fencing agents are healthy with reason "FencingHealthy". - // When False, one or more fencing agents are unhealthy with reason "FencingUnhealthy". Warning events - // should be emitted for failing agents, but the operator should not be degraded if FencingAvailable is True. - NodeFencingHealthyConditionType = "FencingHealthy" -) - -// NodeHealthy condition reasons -const ( - // NodeHealthyReasonHealthy means the node is healthy and operating normally. - NodeHealthyReasonHealthy = "NodeHealthy" - - // NodeHealthyReasonUnhealthy means the node has issues that need investigation. - NodeHealthyReasonUnhealthy = "NodeUnhealthy" -) - -// NodeOnline condition reasons -const ( - // NodeOnlineReasonOnline means the node is online. This is the normal operating state. - NodeOnlineReasonOnline = "Online" - - // NodeOnlineReasonOffline means the node is offline. - NodeOnlineReasonOffline = "Offline" -) - -// NodeInService condition reasons -const ( - // NodeInServiceReasonInService means the node is in service (not in maintenance mode). - // This is the normal operating state. - NodeInServiceReasonInService = "InService" - - // NodeInServiceReasonInMaintenance means the node is in maintenance mode. - // This is an unexpected state. - NodeInServiceReasonInMaintenance = "InMaintenance" -) - -// NodeActive condition reasons -const ( - // NodeActiveReasonActive means the node is active (not in standby mode). - // This is the normal operating state. - NodeActiveReasonActive = "Active" - - // NodeActiveReasonStandby means the node is in standby mode. - // This is an unexpected state. - NodeActiveReasonStandby = "Standby" -) - -// NodeReady condition reasons -const ( - // NodeReadyReasonReady means the node is ready (not in a pending state). - // This is the normal operating state. - NodeReadyReasonReady = "Ready" - - // NodeReadyReasonPending means the node is joining or leaving the cluster. - // This state is expected to be temporary. - NodeReadyReasonPending = "Pending" -) - -// NodeClean condition reasons -const ( - // NodeCleanReasonClean means the node is in a clean state. - // This is the normal operating state. - NodeCleanReasonClean = "Clean" - - // NodeCleanReasonUnclean means the node is in an unclean state. - // Pacemaker was unable to confirm the node's state, which signifies issues in fencing, communication, or configuration. - // This is an unexpected state. - NodeCleanReasonUnclean = "Unclean" -) - -// NodeMember condition reasons -const ( - // NodeMemberReasonMember means the node is a member of the cluster. - // For Two Node OpenShift with Fencing, we expect both nodes to be members. This is the normal operating state. - NodeMemberReasonMember = "Member" - - // NodeMemberReasonNotMember means the node is not a member of the cluster. - // This is an unexpected state. - NodeMemberReasonNotMember = "NotMember" -) - -// NodeFencingAvailable condition reasons -const ( - // NodeFencingAvailableReasonAvailable means at least one fencing agent for this node is healthy. - // The cluster can fence this node if needed. This is the normal operating state. - NodeFencingAvailableReasonAvailable = "FencingAvailable" - - // NodeFencingAvailableReasonUnavailable means all fencing agents for this node are unhealthy. - // The cluster cannot fence this node, which compromises high availability. - // This is a critical state that should degrade the operator. - NodeFencingAvailableReasonUnavailable = "FencingUnavailable" -) - -// NodeFencingHealthy condition reasons -const ( - // NodeFencingHealthyReasonHealthy means all fencing agents for this node are healthy. - // This is the ideal operating state with full redundancy. - NodeFencingHealthyReasonHealthy = "FencingHealthy" - - // NodeFencingHealthyReasonUnhealthy means one or more fencing agents for this node are unhealthy. - // Warning events should be emitted for failing agents, but the operator should not be degraded - // if FencingAvailable is still True. - NodeFencingHealthyReasonUnhealthy = "FencingUnhealthy" -) - -// Resource-level condition types for PacemakerCluster.status.nodes[].resources[].conditions -const ( - // ResourceHealthyConditionType tracks the overall health of a pacemaker resource. - // This is an aggregate condition that reflects the health of all resource-level conditions. - // Specifically, it aggregates the following conditions: - // - ResourceInServiceConditionType - // - ResourceManagedConditionType - // - ResourceEnabledConditionType - // - ResourceOperationalConditionType - // - ResourceActiveConditionType - // - ResourceStartedConditionType - // - ResourceSchedulableConditionType - // When True, the resource is healthy with reason "ResourceHealthy". - // When False, the resource is unhealthy with reason "ResourceUnhealthy". - ResourceHealthyConditionType = "Healthy" - - // ResourceInServiceConditionType tracks whether a resource is in service (not in maintenance mode). - // Resources in maintenance mode are not monitored or moved by pacemaker. - // In Two Node OpenShift with Fencing, we do not expect any resources to be in maintenance mode. - // When True, the resource is in service with reason "InService". This is the normal operating state. - // When False, the resource is in maintenance mode with reason "InMaintenance". This is an unexpected state. - ResourceInServiceConditionType = "InService" - - // ResourceManagedConditionType tracks whether a resource is managed by pacemaker. - // Resources that are not managed by pacemaker are effectively invisible to the pacemaker HA logic. - // For Two Node OpenShift with Fencing, all resources are expected to be managed. - // When True, the resource is managed with reason "Managed". This is the normal operating state. - // When False, the resource is not managed with reason "Unmanaged". This is an unexpected state. - ResourceManagedConditionType = "Managed" - - // ResourceEnabledConditionType tracks whether a resource is enabled. - // Resources that are disabled are stopped and not automatically managed or started by the cluster. - // In Two Node OpenShift with Fencing, we do not expect any resources to be disabled. - // When True, the resource is enabled with reason "Enabled". This is the normal operating state. - // When False, the resource is disabled with reason "Disabled". This is an unexpected state. - ResourceEnabledConditionType = "Enabled" - - // ResourceOperationalConditionType tracks whether a resource is operational (not failed). - // A failed resource is one that is not able to start or is in an error state. - // When True, the resource is operational with reason "Operational". This is the normal operating state. - // When False, the resource has failed with reason "Failed". This is an unexpected state. - ResourceOperationalConditionType = "Operational" - - // ResourceActiveConditionType tracks whether a resource is active. - // An active resource is running on a cluster node. - // In Two Node OpenShift with Fencing, all resources are expected to be active. - // When True, the resource is active with reason "Active". This is the normal operating state. - // When False, the resource is not active with reason "Inactive". This is an unexpected state. - ResourceActiveConditionType = "Active" - - // ResourceStartedConditionType tracks whether a resource is started. - // It's normal for a resource like etcd to become stopped in the event of a quorum loss event because - // the pacemaker recovery logic will fence a node and restore etcd quorum on the surviving node as a cluster-of-one. - // A resource that stays stopped for an extended period of time is an unexpected state and should be investigated. - // When True, the resource is started with reason "Started". This is the normal operating state. - // When False, the resource is not started with reason "Stopped". This is expected to be temporary. - ResourceStartedConditionType = "Started" - - // ResourceSchedulableConditionType tracks whether a resource is schedulable (not blocked). - // A resource that is not schedulable is unable to start or move to a different node. - // In Two Node OpenShift with Fencing, we do not expect any resources to be unschedulable. - // When True, the resource is schedulable with reason "Schedulable". This is the normal operating state. - // When False, the resource is not schedulable with reason "Unschedulable". This is an unexpected state. - ResourceSchedulableConditionType = "Schedulable" -) - -// ResourceHealthy condition reasons -const ( - // ResourceHealthyReasonHealthy means the resource is healthy and operating normally. - ResourceHealthyReasonHealthy = "ResourceHealthy" - - // ResourceHealthyReasonUnhealthy means the resource has issues that need investigation. - ResourceHealthyReasonUnhealthy = "ResourceUnhealthy" -) - -// ResourceInService condition reasons -const ( - // ResourceInServiceReasonInService means the resource is in service (not in maintenance mode). - // This is the normal operating state. - ResourceInServiceReasonInService = "InService" - - // ResourceInServiceReasonInMaintenance means the resource is in maintenance mode. - // Resources in maintenance mode are not monitored or moved by pacemaker. This is an unexpected state. - ResourceInServiceReasonInMaintenance = "InMaintenance" -) - -// ResourceManaged condition reasons -const ( - // ResourceManagedReasonManaged means the resource is managed by pacemaker. - // This is the normal operating state. - ResourceManagedReasonManaged = "Managed" - - // ResourceManagedReasonUnmanaged means the resource is not managed by pacemaker. - // Resources that are not managed by pacemaker are effectively invisible to the pacemaker HA logic. - // This is an unexpected state. - ResourceManagedReasonUnmanaged = "Unmanaged" -) - -// ResourceEnabled condition reasons -const ( - // ResourceEnabledReasonEnabled means the resource is enabled. - // This is the normal operating state. - ResourceEnabledReasonEnabled = "Enabled" - - // ResourceEnabledReasonDisabled means the resource is disabled. - // Resources that are disabled are stopped and not automatically managed or started by the cluster. - // This is an unexpected state. - ResourceEnabledReasonDisabled = "Disabled" -) - -// ResourceOperational condition reasons -const ( - // ResourceOperationalReasonOperational means the resource is operational (not failed). - // This is the normal operating state. - ResourceOperationalReasonOperational = "Operational" - - // ResourceOperationalReasonFailed means the resource has failed. - // A failed resource is one that is not able to start or is in an error state. This is an unexpected state. - ResourceOperationalReasonFailed = "Failed" -) - -// ResourceActive condition reasons -const ( - // ResourceActiveReasonActive means the resource is active. - // An active resource is running on a cluster node. This is the normal operating state. - ResourceActiveReasonActive = "Active" - - // ResourceActiveReasonInactive means the resource is not active. - // This is an unexpected state. - ResourceActiveReasonInactive = "Inactive" -) - -// ResourceStarted condition reasons -const ( - // ResourceStartedReasonStarted means the resource is started. - // This is the normal operating state. - ResourceStartedReasonStarted = "Started" - - // ResourceStartedReasonStopped means the resource is stopped. - // It's normal for a resource like etcd to become stopped in the event of a quorum loss event because - // the pacemaker recovery logic will fence a node and restore etcd quorum on the surviving node as a cluster-of-one. - // A resource that stays stopped for an extended period of time is an unexpected state and should be investigated. - ResourceStartedReasonStopped = "Stopped" -) - -// ResourceSchedulable condition reasons -const ( - // ResourceSchedulableReasonSchedulable means the resource is schedulable (not blocked). - // This is the normal operating state. - ResourceSchedulableReasonSchedulable = "Schedulable" - - // ResourceSchedulableReasonUnschedulable means the resource is not schedulable (blocked). - // A resource that is not schedulable is unable to start or move to a different node. This is an unexpected state. - ResourceSchedulableReasonUnschedulable = "Unschedulable" -) - -// PacemakerNodeAddressType represents the type of a node address. -// Currently only InternalIP is supported. -// +kubebuilder:validation:Enum=InternalIP -// +enum -type PacemakerNodeAddressType string - -const ( - // PacemakerNodeInternalIP is an internal IP address assigned to the node. - // This is typically the IP address used for intra-cluster communication. - PacemakerNodeInternalIP PacemakerNodeAddressType = "InternalIP" -) - -// PacemakerNodeAddress contains information for a node's address. -// This is similar to corev1.NodeAddress but adds validation for IP addresses. -type PacemakerNodeAddress struct { - // type is the type of node address. - // Currently only "InternalIP" is supported. - // +required - Type PacemakerNodeAddressType `json:"type,omitempty"` - - // address is the node address. - // For InternalIP, this must be a valid global unicast IPv4 or IPv6 address in canonical form. - // Canonical form means the shortest standard representation (e.g., "192.168.1.1" not "192.168.001.001", - // or "2001:db8::1" not "2001:0db8::1"). Maximum length is 39 characters (full IPv6 address). - // Global unicast includes private/RFC1918 addresses but excludes loopback, link-local, and multicast. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=39 - // +kubebuilder:validation:XValidation:rule="isIP(self) && ip.isCanonical(self) && ip(self).isGlobalUnicast()",message="must be a valid global unicast IPv4 or IPv6 address in canonical form" - // +required - Address string `json:"address,omitempty"` -} - -// PacemakerClusterResourceName represents the name of a pacemaker resource. -// Fencing agents are tracked separately in the fencingAgents field. -// +kubebuilder:validation:Enum=Kubelet;Etcd -// +enum -type PacemakerClusterResourceName string - -// PacemakerClusterResourceName values -const ( - // PacemakerClusterResourceNameKubelet is the kubelet pacemaker resource. - // The kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. - PacemakerClusterResourceNameKubelet PacemakerClusterResourceName = "Kubelet" - - // PacemakerClusterResourceNameEtcd is the etcd pacemaker resource. - // The etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. - PacemakerClusterResourceNameEtcd PacemakerClusterResourceName = "Etcd" -) - -// FencingMethod represents the method used by a fencing agent to isolate failed nodes. -// Valid values are "Redfish" and "IPMI". -// +kubebuilder:validation:Enum=Redfish;IPMI -// +enum -type FencingMethod string - -// FencingMethod values -const ( - // FencingMethodRedfish uses Redfish, a standard RESTful API for server management. - FencingMethodRedfish FencingMethod = "Redfish" - - // FencingMethodIPMI uses IPMI (Intelligent Platform Management Interface), a hardware management interface. - FencingMethodIPMI FencingMethod = "IPMI" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// PacemakerCluster represents the current state of the pacemaker cluster as reported by the pcs status command. -// PacemakerCluster is a cluster-scoped singleton resource. The name of this instance is "cluster". This -// resource provides a view into the health and status of a pacemaker-managed cluster in Two Node OpenShift with Fencing deployments. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=pacemakerclusters,scope=Cluster,singular=pacemakercluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2544 -// +openshift:file-pattern=cvoRunLevel=0000_25,operatorName=etcd,operatorOrdering=01,operatorComponent=two-node-fencing -// +openshift:enable:FeatureGate=DualReplica -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="PacemakerCluster must be named 'cluster'" -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.status) || has(self.status)",message="status may not be removed once set" -type PacemakerCluster struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +required - metav1.ObjectMeta `json:"metadata,omitempty"` - - // status contains the actual pacemaker cluster status information collected from the cluster. - // The goal of this status is to be able to quickly identify if pacemaker is in a healthy state. - // In Two Node OpenShift with Fencing, a healthy pacemaker cluster has 2 nodes, both of which have healthy kubelet, etcd, and fencing resources. - // This field is optional on creation - the status collector populates it immediately after creating - // the resource via the status subresource. - // +optional - Status PacemakerClusterStatus `json:"status,omitzero"` -} - -// PacemakerClusterStatus contains the actual pacemaker cluster status information. As part of validating the status -// object, we need to ensure that the lastUpdated timestamp may not be set to an earlier timestamp than the current value. -// The validation rule checks if oldSelf has lastUpdated before comparing, to handle the initial status creation case. -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.lastUpdated) || self.lastUpdated >= oldSelf.lastUpdated",message="lastUpdated may not be set to an earlier timestamp" -type PacemakerClusterStatus struct { - // conditions represent the observations of the pacemaker cluster's current state. - // Known condition types are: "Healthy", "InService", "NodeCountAsExpected". - // The "Healthy" condition is an aggregate that tracks the overall health of the cluster. - // The "InService" condition tracks whether the cluster is in service (not in maintenance mode). - // The "NodeCountAsExpected" condition tracks whether the expected number of nodes are present. - // Each of these conditions is required, so the array must contain at least 3 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=3 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'NodeCountAsExpected')",message="conditions must contain a condition of type NodeCountAsExpected" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // lastUpdated is the timestamp when this status was last updated. This is useful for identifying - // stale status reports. It must be a valid timestamp in RFC3339 format. Once set, this field cannot - // be removed and cannot be set to an earlier timestamp than the current value. - // +kubebuilder:validation:Format=date-time - // +required - LastUpdated metav1.Time `json:"lastUpdated,omitempty,omitzero"` - - // nodes provides detailed status for each control-plane node in the Pacemaker cluster. - // While Pacemaker supports up to 32 nodes, the limit is set to 5 (max OpenShift control-plane nodes). - // For Two Node OpenShift with Fencing, exactly 2 nodes are expected in a healthy cluster. - // An empty list indicates a catastrophic failure where Pacemaker reports no nodes. - // +listType=map - // +listMapKey=nodeName - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=5 - // +required - Nodes *[]PacemakerClusterNodeStatus `json:"nodes,omitempty"` -} - -// PacemakerClusterNodeStatus represents the status of a single node in the pacemaker cluster including -// the node's conditions and the health of critical resources running on that node. -type PacemakerClusterNodeStatus struct { - // conditions represent the observations of the node's current state. - // Known condition types are: "Healthy", "Online", "InService", "Active", "Ready", "Clean", "Member", - // "FencingAvailable", "FencingHealthy". - // The "Healthy" condition is an aggregate that tracks the overall health of the node. - // The "Online" condition tracks whether the node is online. - // The "InService" condition tracks whether the node is in service (not in maintenance mode). - // The "Active" condition tracks whether the node is active (not in standby mode). - // The "Ready" condition tracks whether the node is ready (not in a pending state). - // The "Clean" condition tracks whether the node is in a clean (status known) state. - // The "Member" condition tracks whether the node is a member of the cluster. - // The "FencingAvailable" condition tracks whether this node can be fenced by at least one healthy agent. - // The "FencingHealthy" condition tracks whether all fencing agents for this node are healthy. - // Each of these conditions is required, so the array must contain at least 9 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=9 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Online')",message="conditions must contain a condition of type Online" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Ready')",message="conditions must contain a condition of type Ready" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Clean')",message="conditions must contain a condition of type Clean" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Member')",message="conditions must contain a condition of type Member" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'FencingAvailable')",message="conditions must contain a condition of type FencingAvailable" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'FencingHealthy')",message="conditions must contain a condition of type FencingHealthy" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // nodeName is the name of the node. This is expected to match the Kubernetes node's name, which must be a lowercase - // RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with - // an alphanumeric character, and be at most 253 characters in length. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="nodeName must be a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" - // +required - NodeName string `json:"nodeName,omitempty"` - - // addresses is a list of IP addresses for the node. - // Pacemaker allows multiple IP addresses for Corosync communication between nodes. - // The first address in this list is used for IP-based peer URLs for etcd membership. - // Each address must be a valid global unicast IPv4 or IPv6 address in canonical form - // (e.g., "192.168.1.1" not "192.168.001.001", or "2001:db8::1" not "2001:0db8::1"). - // This excludes loopback, link-local, and multicast addresses. - // +listType=atomic - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=8 - // +required - Addresses []PacemakerNodeAddress `json:"addresses,omitempty"` - - // resources contains the status of pacemaker resources scheduled on this node. - // Each resource entry includes the resource name and its health conditions. - // For Two Node OpenShift with Fencing, we track Kubelet and Etcd resources per node. - // Both resources are required to be present, so the array must contain at least 2 items. - // Valid resource names are "Kubelet" and "Etcd". - // Fencing agents are tracked separately in the fencingAgents field. - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems=2 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.exists(r, r.name == 'Kubelet')",message="resources must contain a resource named Kubelet" - // +kubebuilder:validation:XValidation:rule="self.exists(r, r.name == 'Etcd')",message="resources must contain a resource named Etcd" - // +required - Resources []PacemakerClusterResourceStatus `json:"resources,omitempty"` - - // fencingAgents contains the status of fencing agents that can fence this node. - // Unlike resources (which are scheduled to run on this node), fencing agents are mapped - // to the node they can fence (their target), not the node where monitoring operations run. - // Each fencing agent entry includes a unique name, fencing type, target node, and health conditions. - // A node is considered fence-capable if at least one fencing agent is healthy. - // A healthy node is expected to have at least 1 fencing agent, but the list may be empty - // when fencing agent discovery fails. - // Names must be unique within this array. - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=8 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name))",message="fencing agent names must be unique" - // +required - FencingAgents []PacemakerClusterFencingAgentStatus `json:"fencingAgents,omitempty"` -} - -// PacemakerClusterFencingAgentStatus represents the status of a fencing agent that can fence a node. -// Fencing agents are STONITH (Shoot The Other Node In The Head) devices used to isolate failed nodes. -// Unlike regular pacemaker resources, fencing agents are mapped to their target node (the node they -// can fence), not the node where their monitoring operations are scheduled. -type PacemakerClusterFencingAgentStatus struct { - // conditions represent the observations of the fencing agent's current state. - // Known condition types are: "Healthy", "InService", "Managed", "Enabled", "Operational", - // "Active", "Started", "Schedulable". - // The "Healthy" condition is an aggregate that tracks the overall health of the fencing agent. - // The "InService" condition tracks whether the fencing agent is in service (not in maintenance mode). - // The "Managed" condition tracks whether the fencing agent is managed by pacemaker. - // The "Enabled" condition tracks whether the fencing agent is enabled. - // The "Operational" condition tracks whether the fencing agent is operational (not failed). - // The "Active" condition tracks whether the fencing agent is active (available to be used). - // The "Started" condition tracks whether the fencing agent is started. - // The "Schedulable" condition tracks whether the fencing agent is schedulable (not blocked). - // Each of these conditions is required, so the array must contain at least 8 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=8 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Managed')",message="conditions must contain a condition of type Managed" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Enabled')",message="conditions must contain a condition of type Enabled" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Operational')",message="conditions must contain a condition of type Operational" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Started')",message="conditions must contain a condition of type Started" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Schedulable')",message="conditions must contain a condition of type Schedulable" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // name is the unique identifier for this fencing agent (e.g., "master-0_redfish"). - // The name must be unique within the fencingAgents array for this node. - // It may contain alphanumeric characters, dots, hyphens, and underscores. - // Maximum length is 300 characters, providing headroom beyond the typical format of - // _ (253 for RFC 1123 node name + 1 underscore + type). - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=300 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._-]+$')",message="name must contain only alphanumeric characters, dots, hyphens, and underscores" - // +required - Name string `json:"name,omitempty"` - - // method is the fencing method used by this agent. - // Valid values are "Redfish" and "IPMI". - // Redfish is a standard RESTful API for server management. - // IPMI (Intelligent Platform Management Interface) is a hardware management interface. - // +required - Method FencingMethod `json:"method,omitempty"` -} - -// PacemakerClusterResourceStatus represents the status of a pacemaker resource scheduled on a node. -// A pacemaker resource is a unit of work managed by pacemaker. In pacemaker terminology, resources are services or -// applications that pacemaker monitors, starts, stops, and moves between nodes to maintain high availability. -// For Two Node OpenShift with Fencing, we track two resources per node: -// - Kubelet (the Kubernetes node agent and a prerequisite for etcd) -// - Etcd (the distributed key-value store) -// -// Fencing agents are tracked separately in the fencingAgents field because they are mapped to -// their target node (the node they can fence), not the node where monitoring operations are scheduled. -type PacemakerClusterResourceStatus struct { - // conditions represent the observations of the resource's current state. - // Known condition types are: "Healthy", "InService", "Managed", "Enabled", "Operational", - // "Active", "Started", "Schedulable". - // The "Healthy" condition is an aggregate that tracks the overall health of the resource. - // The "InService" condition tracks whether the resource is in service (not in maintenance mode). - // The "Managed" condition tracks whether the resource is managed by pacemaker. - // The "Enabled" condition tracks whether the resource is enabled. - // The "Operational" condition tracks whether the resource is operational (not failed). - // The "Active" condition tracks whether the resource is active (available to be used). - // The "Started" condition tracks whether the resource is started. - // The "Schedulable" condition tracks whether the resource is schedulable (not blocked). - // Each of these conditions is required, so the array must contain at least 8 items. - // +listType=map - // +listMapKey=type - // +kubebuilder:validation:MinItems=8 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Healthy')",message="conditions must contain a condition of type Healthy" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'InService')",message="conditions must contain a condition of type InService" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Managed')",message="conditions must contain a condition of type Managed" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Enabled')",message="conditions must contain a condition of type Enabled" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Operational')",message="conditions must contain a condition of type Operational" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Active')",message="conditions must contain a condition of type Active" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Started')",message="conditions must contain a condition of type Started" - // +kubebuilder:validation:XValidation:rule="self.exists(c, c.type == 'Schedulable')",message="conditions must contain a condition of type Schedulable" - // +required - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // name is the name of the pacemaker resource. - // Valid values are "Kubelet" and "Etcd". - // The Kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. - // The Etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. - // Fencing agents are tracked separately in the node's fencingAgents field. - // +required - Name PacemakerClusterResourceName `json:"name,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// PacemakerClusterList contains a list of PacemakerCluster objects. PacemakerCluster is a cluster-scoped singleton -// resource; only one instance named "cluster" may exist. This list type exists only to satisfy Kubernetes API -// conventions. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type PacemakerClusterList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items is a list of PacemakerCluster objects. - Items []PacemakerCluster `json:"items"` -} diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 17bf97851..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,210 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *PacemakerCluster) DeepCopyInto(out *PacemakerCluster) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerCluster. -func (in *PacemakerCluster) DeepCopy() *PacemakerCluster { - if in == nil { - return nil - } - out := new(PacemakerCluster) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PacemakerCluster) 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 *PacemakerClusterFencingAgentStatus) DeepCopyInto(out *PacemakerClusterFencingAgentStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterFencingAgentStatus. -func (in *PacemakerClusterFencingAgentStatus) DeepCopy() *PacemakerClusterFencingAgentStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterFencingAgentStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterList) DeepCopyInto(out *PacemakerClusterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PacemakerCluster, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterList. -func (in *PacemakerClusterList) DeepCopy() *PacemakerClusterList { - if in == nil { - return nil - } - out := new(PacemakerClusterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PacemakerClusterList) 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 *PacemakerClusterNodeStatus) DeepCopyInto(out *PacemakerClusterNodeStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]PacemakerNodeAddress, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]PacemakerClusterResourceStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.FencingAgents != nil { - in, out := &in.FencingAgents, &out.FencingAgents - *out = make([]PacemakerClusterFencingAgentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterNodeStatus. -func (in *PacemakerClusterNodeStatus) DeepCopy() *PacemakerClusterNodeStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterNodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterResourceStatus) DeepCopyInto(out *PacemakerClusterResourceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterResourceStatus. -func (in *PacemakerClusterResourceStatus) DeepCopy() *PacemakerClusterResourceStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterResourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerClusterStatus) DeepCopyInto(out *PacemakerClusterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.LastUpdated.DeepCopyInto(&out.LastUpdated) - if in.Nodes != nil { - in, out := &in.Nodes, &out.Nodes - *out = new([]PacemakerClusterNodeStatus) - if **in != nil { - in, out := *in, *out - *out = make([]PacemakerClusterNodeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerClusterStatus. -func (in *PacemakerClusterStatus) DeepCopy() *PacemakerClusterStatus { - if in == nil { - return nil - } - out := new(PacemakerClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PacemakerNodeAddress) DeepCopyInto(out *PacemakerNodeAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PacemakerNodeAddress. -func (in *PacemakerNodeAddress) DeepCopy() *PacemakerNodeAddress { - if in == nil { - return nil - } - out := new(PacemakerNodeAddress) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index f5a64682a..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -pacemakerclusters.etcd.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2544 - CRDName: pacemakerclusters.etcd.openshift.io - Capability: "" - Category: "" - FeatureGates: - - DualReplica - FilenameOperatorName: etcd - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_25" - GroupName: etcd.openshift.io - HasStatus: true - KindName: PacemakerCluster - Labels: {} - PluralName: pacemakerclusters - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - DualReplica - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 11fac8dad..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerCluster) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerCluster" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterFencingAgentStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerClusterFencingAgentStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterList) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerClusterList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterNodeStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerClusterNodeStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterResourceStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerClusterResourceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerClusterStatus) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerClusterStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PacemakerNodeAddress) OpenAPIModelName() string { - return "com.github.openshift.api.etcd.v1alpha1.PacemakerNodeAddress" -} diff --git a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index dc6f22428..000000000 --- a/vendor/github.com/openshift/api/etcd/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,89 +0,0 @@ -package v1alpha1 - -// 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_PacemakerCluster = map[string]string{ - "": "PacemakerCluster represents the current state of the pacemaker cluster as reported by the pcs status command. PacemakerCluster is a cluster-scoped singleton resource. The name of this instance is \"cluster\". This resource provides a view into the health and status of a pacemaker-managed cluster in Two Node OpenShift with Fencing deployments.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "status": "status contains the actual pacemaker cluster status information collected from the cluster. The goal of this status is to be able to quickly identify if pacemaker is in a healthy state. In Two Node OpenShift with Fencing, a healthy pacemaker cluster has 2 nodes, both of which have healthy kubelet, etcd, and fencing resources. This field is optional on creation - the status collector populates it immediately after creating the resource via the status subresource.", -} - -func (PacemakerCluster) SwaggerDoc() map[string]string { - return map_PacemakerCluster -} - -var map_PacemakerClusterFencingAgentStatus = map[string]string{ - "": "PacemakerClusterFencingAgentStatus represents the status of a fencing agent that can fence a node. Fencing agents are STONITH (Shoot The Other Node In The Head) devices used to isolate failed nodes. Unlike regular pacemaker resources, fencing agents are mapped to their target node (the node they can fence), not the node where their monitoring operations are scheduled.", - "conditions": "conditions represent the observations of the fencing agent's current state. Known condition types are: \"Healthy\", \"InService\", \"Managed\", \"Enabled\", \"Operational\", \"Active\", \"Started\", \"Schedulable\". The \"Healthy\" condition is an aggregate that tracks the overall health of the fencing agent. The \"InService\" condition tracks whether the fencing agent is in service (not in maintenance mode). The \"Managed\" condition tracks whether the fencing agent is managed by pacemaker. The \"Enabled\" condition tracks whether the fencing agent is enabled. The \"Operational\" condition tracks whether the fencing agent is operational (not failed). The \"Active\" condition tracks whether the fencing agent is active (available to be used). The \"Started\" condition tracks whether the fencing agent is started. The \"Schedulable\" condition tracks whether the fencing agent is schedulable (not blocked). Each of these conditions is required, so the array must contain at least 8 items.", - "name": "name is the unique identifier for this fencing agent (e.g., \"master-0_redfish\"). The name must be unique within the fencingAgents array for this node. It may contain alphanumeric characters, dots, hyphens, and underscores. Maximum length is 300 characters, providing headroom beyond the typical format of _ (253 for RFC 1123 node name + 1 underscore + type).", - "method": "method is the fencing method used by this agent. Valid values are \"Redfish\" and \"IPMI\". Redfish is a standard RESTful API for server management. IPMI (Intelligent Platform Management Interface) is a hardware management interface.", -} - -func (PacemakerClusterFencingAgentStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterFencingAgentStatus -} - -var map_PacemakerClusterList = map[string]string{ - "": "PacemakerClusterList contains a list of PacemakerCluster objects. PacemakerCluster is a cluster-scoped singleton resource; only one instance named \"cluster\" may exist. This list type exists only to satisfy Kubernetes API conventions.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of PacemakerCluster objects.", -} - -func (PacemakerClusterList) SwaggerDoc() map[string]string { - return map_PacemakerClusterList -} - -var map_PacemakerClusterNodeStatus = map[string]string{ - "": "PacemakerClusterNodeStatus represents the status of a single node in the pacemaker cluster including the node's conditions and the health of critical resources running on that node.", - "conditions": "conditions represent the observations of the node's current state. Known condition types are: \"Healthy\", \"Online\", \"InService\", \"Active\", \"Ready\", \"Clean\", \"Member\", \"FencingAvailable\", \"FencingHealthy\". The \"Healthy\" condition is an aggregate that tracks the overall health of the node. The \"Online\" condition tracks whether the node is online. The \"InService\" condition tracks whether the node is in service (not in maintenance mode). The \"Active\" condition tracks whether the node is active (not in standby mode). The \"Ready\" condition tracks whether the node is ready (not in a pending state). The \"Clean\" condition tracks whether the node is in a clean (status known) state. The \"Member\" condition tracks whether the node is a member of the cluster. The \"FencingAvailable\" condition tracks whether this node can be fenced by at least one healthy agent. The \"FencingHealthy\" condition tracks whether all fencing agents for this node are healthy. Each of these conditions is required, so the array must contain at least 9 items.", - "nodeName": "nodeName is the name of the node. This is expected to match the Kubernetes node's name, which must be a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character, and be at most 253 characters in length.", - "addresses": "addresses is a list of IP addresses for the node. Pacemaker allows multiple IP addresses for Corosync communication between nodes. The first address in this list is used for IP-based peer URLs for etcd membership. Each address must be a valid global unicast IPv4 or IPv6 address in canonical form (e.g., \"192.168.1.1\" not \"192.168.001.001\", or \"2001:db8::1\" not \"2001:0db8::1\"). This excludes loopback, link-local, and multicast addresses.", - "resources": "resources contains the status of pacemaker resources scheduled on this node. Each resource entry includes the resource name and its health conditions. For Two Node OpenShift with Fencing, we track Kubelet and Etcd resources per node. Both resources are required to be present, so the array must contain at least 2 items. Valid resource names are \"Kubelet\" and \"Etcd\". Fencing agents are tracked separately in the fencingAgents field.", - "fencingAgents": "fencingAgents contains the status of fencing agents that can fence this node. Unlike resources (which are scheduled to run on this node), fencing agents are mapped to the node they can fence (their target), not the node where monitoring operations run. Each fencing agent entry includes a unique name, fencing type, target node, and health conditions. A node is considered fence-capable if at least one fencing agent is healthy. A healthy node is expected to have at least 1 fencing agent, but the list may be empty when fencing agent discovery fails. Names must be unique within this array.", -} - -func (PacemakerClusterNodeStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterNodeStatus -} - -var map_PacemakerClusterResourceStatus = map[string]string{ - "": "PacemakerClusterResourceStatus represents the status of a pacemaker resource scheduled on a node. A pacemaker resource is a unit of work managed by pacemaker. In pacemaker terminology, resources are services or applications that pacemaker monitors, starts, stops, and moves between nodes to maintain high availability. For Two Node OpenShift with Fencing, we track two resources per node:\n - Kubelet (the Kubernetes node agent and a prerequisite for etcd)\n - Etcd (the distributed key-value store)\n\nFencing agents are tracked separately in the fencingAgents field because they are mapped to their target node (the node they can fence), not the node where monitoring operations are scheduled.", - "conditions": "conditions represent the observations of the resource's current state. Known condition types are: \"Healthy\", \"InService\", \"Managed\", \"Enabled\", \"Operational\", \"Active\", \"Started\", \"Schedulable\". The \"Healthy\" condition is an aggregate that tracks the overall health of the resource. The \"InService\" condition tracks whether the resource is in service (not in maintenance mode). The \"Managed\" condition tracks whether the resource is managed by pacemaker. The \"Enabled\" condition tracks whether the resource is enabled. The \"Operational\" condition tracks whether the resource is operational (not failed). The \"Active\" condition tracks whether the resource is active (available to be used). The \"Started\" condition tracks whether the resource is started. The \"Schedulable\" condition tracks whether the resource is schedulable (not blocked). Each of these conditions is required, so the array must contain at least 8 items.", - "name": "name is the name of the pacemaker resource. Valid values are \"Kubelet\" and \"Etcd\". The Kubelet resource is a prerequisite for etcd in Two Node OpenShift with Fencing deployments. The Etcd resource may temporarily transition to stopped during pacemaker quorum-recovery operations. Fencing agents are tracked separately in the node's fencingAgents field.", -} - -func (PacemakerClusterResourceStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterResourceStatus -} - -var map_PacemakerClusterStatus = map[string]string{ - "": "PacemakerClusterStatus contains the actual pacemaker cluster status information. As part of validating the status object, we need to ensure that the lastUpdated timestamp may not be set to an earlier timestamp than the current value. The validation rule checks if oldSelf has lastUpdated before comparing, to handle the initial status creation case.", - "conditions": "conditions represent the observations of the pacemaker cluster's current state. Known condition types are: \"Healthy\", \"InService\", \"NodeCountAsExpected\". The \"Healthy\" condition is an aggregate that tracks the overall health of the cluster. The \"InService\" condition tracks whether the cluster is in service (not in maintenance mode). The \"NodeCountAsExpected\" condition tracks whether the expected number of nodes are present. Each of these conditions is required, so the array must contain at least 3 items.", - "lastUpdated": "lastUpdated is the timestamp when this status was last updated. This is useful for identifying stale status reports. It must be a valid timestamp in RFC3339 format. Once set, this field cannot be removed and cannot be set to an earlier timestamp than the current value.", - "nodes": "nodes provides detailed status for each control-plane node in the Pacemaker cluster. While Pacemaker supports up to 32 nodes, the limit is set to 5 (max OpenShift control-plane nodes). For Two Node OpenShift with Fencing, exactly 2 nodes are expected in a healthy cluster. An empty list indicates a catastrophic failure where Pacemaker reports no nodes.", -} - -func (PacemakerClusterStatus) SwaggerDoc() map[string]string { - return map_PacemakerClusterStatus -} - -var map_PacemakerNodeAddress = map[string]string{ - "": "PacemakerNodeAddress contains information for a node's address. This is similar to corev1.NodeAddress but adds validation for IP addresses.", - "type": "type is the type of node address. Currently only \"InternalIP\" is supported.", - "address": "address is the node address. For InternalIP, this must be a valid global unicast IPv4 or IPv6 address in canonical form. Canonical form means the shortest standard representation (e.g., \"192.168.1.1\" not \"192.168.001.001\", or \"2001:db8::1\" not \"2001:0db8::1\"). Maximum length is 39 characters (full IPv6 address). Global unicast includes private/RFC1918 addresses but excludes loopback, link-local, and multicast.", -} - -func (PacemakerNodeAddress) SwaggerDoc() map[string]string { - return map_PacemakerNodeAddress -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/features.md b/vendor/github.com/openshift/api/features.md deleted file mode 100644 index c78d40269..000000000 --- a/vendor/github.com/openshift/api/features.md +++ /dev/null @@ -1,127 +0,0 @@ -| FeatureGate | Default on Hypershift | Default on SelfManagedHA | DevPreviewNoUpgrade on Hypershift | DevPreviewNoUpgrade on SelfManagedHA | OKD on Hypershift | OKD on SelfManagedHA | TechPreviewNoUpgrade on Hypershift | TechPreviewNoUpgrade on SelfManagedHA | -| ------ | --- | --- | --- | --- | --- | --- | --- | --- | -| ClientsAllowCBOR| | | | | | | | | -| ClusterAPIInstall| | | | | | | | | -| EventedPLEG| | | | | | | | | -| MachineAPIMigrationAzure| | | | | | | | | -| MachineAPIMigrationBareMetal| | | | | | | | | -| MachineAPIMigrationGCP| | | | | | | | | -| MachineAPIMigrationPowerVS| | | | | | | | | -| MachineAPIOperatorDisableMachineHealthCheckController| | | | | | | | | -| MultiArchInstallAzure| | | | | | | | | -| ShortCertRotation| | | | | | | | | -| KarpenterOperator| | | | Enabled | | | | | -| MutableTopology| | | | Enabled | | | | | -| AuthenticationComponentProxy| | | | Enabled | | | | Enabled | -| ClusterAPIComputeInstall| | | Enabled | Enabled | | | | | -| ClusterAPIControlPlaneInstall| | | Enabled | Enabled | | | | | -| ClusterUpdatePreflight| | | Enabled | Enabled | | | | | -| ConfidentialCluster| | | Enabled | Enabled | | | | | -| Example2| | | Enabled | Enabled | | | | | -| MachineAPIMigrationVSphere| | | Enabled | Enabled | | | | | -| NetworkConnect| | | Enabled | Enabled | | | | | -| NewOLMBoxCutterRuntime| | | | Enabled | | | | Enabled | -| NewOLMCatalogdAPIV1Metas| | | | Enabled | | | | Enabled | -| NewOLMConfigAPI| | | | Enabled | | | | Enabled | -| NewOLMOwnSingleNamespace| | | | Enabled | | | | Enabled | -| NewOLMPreflightPermissionChecks| | | | Enabled | | | | Enabled | -| NoRegistryClusterInstall| | | | Enabled | | | | Enabled | -| OLMLifecycleAndCompatibility| | | | Enabled | | | | Enabled | -| ProvisioningRequestAvailable| | | Enabled | Enabled | | | | | -| AWSClusterHostedDNS| | | Enabled | Enabled | | | Enabled | Enabled | -| AWSDedicatedHosts| | | Enabled | Enabled | | | Enabled | Enabled | -| AWSDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| AWSEuropeanSovereignCloudInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| AdditionalStorageConfig| | | Enabled | Enabled | | | Enabled | Enabled | -| AutomatedEtcdBackup| | | Enabled | Enabled | | | Enabled | Enabled | -| AzureDedicatedHosts| | | Enabled | Enabled | | | Enabled | Enabled | -| AzureDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| AzureMultiDisk| | | Enabled | Enabled | | | Enabled | Enabled | -| BootcNodeManagement| | | Enabled | Enabled | | | Enabled | Enabled | -| CBORServingAndStorage| | | Enabled | Enabled | | | Enabled | Enabled | -| CRDCompatibilityRequirementOperator| | | Enabled | Enabled | | | Enabled | Enabled | -| CRIOCredentialProviderConfig| | | Enabled | Enabled | | | Enabled | Enabled | -| ClientsPreferCBOR| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIInstallIBMCloud| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagement| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementAWS| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementAzure| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementBareMetal| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementGCP| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementOpenStack| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementPowerVS| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterAPIMachineManagementVSphere| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterMonitoringConfig| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterUpdateAcceptRisks| | | Enabled | Enabled | | | Enabled | Enabled | -| ClusterVersionOperatorConfiguration| | | Enabled | Enabled | | | Enabled | Enabled | -| ConfigurablePKI| | | Enabled | Enabled | | | Enabled | Enabled | -| DNSNameResolver| | | Enabled | Enabled | | | Enabled | Enabled | -| DyanmicServiceEndpointIBMCloud| | | Enabled | Enabled | | | Enabled | Enabled | -| EtcdBackendQuota| | | Enabled | Enabled | | | Enabled | Enabled | -| Example| | | Enabled | Enabled | | | Enabled | Enabled | -| ExternalOIDCExternalClaimsSourcing| | | Enabled | Enabled | | | Enabled | Enabled | -| ExternalOIDCWithUpstreamParity| | | Enabled | Enabled | | | Enabled | Enabled | -| ExternalSnapshotMetadata| | | Enabled | Enabled | | | Enabled | Enabled | -| GCPCustomAPIEndpoints| | | Enabled | Enabled | | | Enabled | Enabled | -| GCPCustomAPIEndpointsInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| GCPDualStackInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| HyperShiftOnlyDynamicResourceAllocation| Enabled | | Enabled | | Enabled | | Enabled | | -| ImageModeStatusReporting| | | Enabled | Enabled | | | Enabled | Enabled | -| IngressComponentRouteLabels| | | Enabled | Enabled | | | Enabled | Enabled | -| IngressControllerDynamicConfigurationManager| | | Enabled | Enabled | | | Enabled | Enabled | -| IngressControllerMultipleHAProxyVersions| | | Enabled | Enabled | | | Enabled | Enabled | -| IrreconcilableMachineConfig| | | Enabled | Enabled | | | Enabled | Enabled | -| KMSEncryption| | | Enabled | Enabled | | | Enabled | Enabled | -| MachineAPIMigration| | | Enabled | Enabled | | | Enabled | Enabled | -| MachineAPIMigrationAWS| | | Enabled | Enabled | | | Enabled | Enabled | -| MachineAPIMigrationOpenStack| | | Enabled | Enabled | | | Enabled | Enabled | -| MaxUnavailableStatefulSet| | | Enabled | Enabled | | | Enabled | Enabled | -| MinimumKubeletVersion| | | Enabled | Enabled | | | Enabled | Enabled | -| MixedCPUsAllocation| | | Enabled | Enabled | | | Enabled | Enabled | -| MultiDiskSetup| | | Enabled | Enabled | | | Enabled | Enabled | -| NetworkObservabilityInstall| | | Enabled | Enabled | | | Enabled | Enabled | -| NewOLM| | Enabled | | Enabled | | Enabled | | Enabled | -| NewOLMWebhookProviderOpenshiftServiceCA| | Enabled | | Enabled | | Enabled | | Enabled | -| NoOverlayMode| | | Enabled | Enabled | | | Enabled | Enabled | -| NutanixMultiSubnets| | | Enabled | Enabled | | | Enabled | Enabled | -| OVNObservability| | | Enabled | Enabled | | | Enabled | Enabled | -| OnPremDNSRecords| | | Enabled | Enabled | | | Enabled | Enabled | -| SELinuxMount| | | Enabled | Enabled | | | Enabled | Enabled | -| SELinuxMountGAReadiness| | | Enabled | Enabled | | | Enabled | Enabled | -| SignatureStores| | | Enabled | Enabled | | | Enabled | Enabled | -| TLSAdherence| | | Enabled | Enabled | | | Enabled | Enabled | -| TLSGroupPreferences| | | Enabled | Enabled | | | Enabled | Enabled | -| VSphereConfigurableMaxAllowedBlockVolumesPerNode| | | Enabled | Enabled | | | Enabled | Enabled | -| VSphereMultiVCenterDay2| | | Enabled | Enabled | | | Enabled | Enabled | -| VolumeGroupSnapshot| | | Enabled | Enabled | | | Enabled | Enabled | -| OSStreams| | Enabled | Enabled | Enabled | | Enabled | Enabled | Enabled | -| AWSClusterHostedDNSInstall| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| AWSServiceLBNetworkSecurityGroup| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| AzureWorkloadIdentity| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| BootImageSkewEnforcement| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| BuildCSIVolumes| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| DualReplica| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| EVPN| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| EventTTL| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| ExternalOIDC| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| ExternalOIDCWithUIDAndExtraClaimMappings| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| GatewayAPIWithoutOLM| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| ImageStreamImportMode| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| InsightsConfig| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| InsightsOnDemandDataGather| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| KMSv1| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| ManagedBootImagesCPMS| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| MetricsCollectionProfiles| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| MutableCSINodeAllocatableCount| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| MutatingAdmissionPolicy| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| OpenShiftPodSecurityAdmission| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| RouteExternalCertificate| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| ServiceAccountTokenNodeBinding| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| SigstoreImageVerification| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| SigstoreImageVerificationPKI| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| StoragePerformantSecurityPolicy| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| UpgradeStatus| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| VSphereHostVMGroupZonal| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| VSphereMixedNodeEnv| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| VSphereMultiDisk| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | -| VSphereMultiNetworks| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | diff --git a/vendor/github.com/openshift/api/features/features.go b/vendor/github.com/openshift/api/features/features.go deleted file mode 100644 index b45bef770..000000000 --- a/vendor/github.com/openshift/api/features/features.go +++ /dev/null @@ -1,1063 +0,0 @@ -package features - -import ( - configv1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/util/sets" -) - -// Generating this many versions future proofs us until at least 2040. -const ( - minOpenshiftVersion uint64 = 4 - maxOpenshiftVersion uint64 = 10 -) - -func FeatureSets(version uint64, clusterProfile ClusterProfileName, featureSet configv1.FeatureSet) *FeatureGateEnabledDisabled { - enabledDisabled := &FeatureGateEnabledDisabled{} - - for name, statuses := range allFeatureGates { - enabled := false - - for _, status := range statuses { - if status.isEnabled(version, clusterProfile, featureSet) { - enabled = true - break - } - } - - if enabled { - enabledDisabled.Enabled = append(enabledDisabled.Enabled, FeatureGateDescription{ - FeatureGateAttributes: configv1.FeatureGateAttributes{ - Name: name, - }, - }) - } else { - enabledDisabled.Disabled = append(enabledDisabled.Disabled, FeatureGateDescription{ - FeatureGateAttributes: configv1.FeatureGateAttributes{ - Name: name, - }, - }) - } - } - - return enabledDisabled -} - -func AllFeatureSets() map[uint64]map[ClusterProfileName]map[configv1.FeatureSet]*FeatureGateEnabledDisabled { - versions := sets.New[uint64]() - for version := minOpenshiftVersion; version <= maxOpenshiftVersion; version++ { - versions.Insert(version) - } - - clusterProfiles := sets.New[ClusterProfileName](AllClusterProfiles...) - featureSets := sets.New[configv1.FeatureSet](configv1.AllFixedFeatureSets...) - - // Check for versions explicitly being set among the gates. - for _, statuses := range allFeatureGates { - for _, status := range statuses { - versions.Insert(status.version.UnsortedList()...) - } - } - - ret := map[uint64]map[ClusterProfileName]map[configv1.FeatureSet]*FeatureGateEnabledDisabled{} - for version := range versions { - ret[version] = map[ClusterProfileName]map[configv1.FeatureSet]*FeatureGateEnabledDisabled{} - for clusterProfile := range clusterProfiles { - ret[version][clusterProfile] = map[configv1.FeatureSet]*FeatureGateEnabledDisabled{} - for featureSet := range featureSets { - ret[version][clusterProfile][featureSet] = FeatureSets(version, clusterProfile, featureSet) - } - } - } - - return ret -} - -var ( - allFeatureGates = map[configv1.FeatureGateName][]featureGateStatus{} - - FeatureGateServiceAccountTokenNodeBinding = newFeatureGate("ServiceAccountTokenNodeBinding"). - reportProblemsToJiraComponent("apiserver-auth"). - contactPerson("ibihim"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4193"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMutatingAdmissionPolicy = newFeatureGate("MutatingAdmissionPolicy"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("benluddy"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/3962"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateOpenShiftPodSecurityAdmission = newFeatureGate("OpenShiftPodSecurityAdmission"). - reportProblemsToJiraComponent("auth"). - contactPerson("ibihim"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/899"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateBuildCSIVolumes = newFeatureGate("BuildCSIVolumes"). - reportProblemsToJiraComponent("builds"). - contactPerson("adkaplan"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAzureWorkloadIdentity = newFeatureGate("AzureWorkloadIdentity"). - reportProblemsToJiraComponent("cloud-credential-operator"). - contactPerson("abutcher"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAzureDedicatedHosts = newFeatureGate("AzureDedicatedHosts"). - reportProblemsToJiraComponent("installer"). - contactPerson("rvanderp3"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1783"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMaxUnavailableStatefulSet = newFeatureGate("MaxUnavailableStatefulSet"). - reportProblemsToJiraComponent("apps"). - contactPerson("atiratree"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/961"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateEventedPLEG = newFeatureGate("EventedPLEG"). - reportProblemsToJiraComponent("node"). - contactPerson("sairameshv"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/3386"). - mustRegister() - - FeatureGateSigstoreImageVerification = newFeatureGate("SigstoreImageVerification"). - reportProblemsToJiraComponent("node"). - contactPerson("sgrunert"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateSigstoreImageVerificationPKI = newFeatureGate("SigstoreImageVerificationPKI"). - reportProblemsToJiraComponent("node"). - contactPerson("QiWang"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1658"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateCRIOCredentialProviderConfig = newFeatureGate("CRIOCredentialProviderConfig"). - reportProblemsToJiraComponent("node"). - contactPerson("QiWang"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1861"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateVSphereHostVMGroupZonal = newFeatureGate("VSphereHostVMGroupZonal"). - reportProblemsToJiraComponent("splat"). - contactPerson("jcpowermac"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1677"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateVSphereMultiDisk = newFeatureGate("VSphereMultiDisk"). - reportProblemsToJiraComponent("splat"). - contactPerson("vr4manta"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1709"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateRouteExternalCertificate = newFeatureGate("RouteExternalCertificate"). - reportProblemsToJiraComponent("router"). - contactPerson("chiragkyal"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNetworkConnect = newFeatureGate("NetworkConnect"). - reportProblemsToJiraComponent("Networking/ovn-kubernetes"). - contactPerson("tssurya"). - productScope(ocpSpecific). - enhancementPR("https://github.com/ovn-kubernetes/ovn-kubernetes/pull/5246"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNoOverlayMode = newFeatureGate("NoOverlayMode"). - reportProblemsToJiraComponent("Networking/ovn-kubernetes"). - contactPerson("pliurh"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1859"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateEVPN = newFeatureGate("EVPN"). - reportProblemsToJiraComponent("Networking/ovn-kubernetes"). - contactPerson("jcaamano"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1862"). - enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateOVNObservability = newFeatureGate("OVNObservability"). - reportProblemsToJiraComponent("Networking"). - contactPerson("npinaeva"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateBackendQuotaGiB = newFeatureGate("EtcdBackendQuota"). - reportProblemsToJiraComponent("etcd"). - contactPerson("hasbro17"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAutomatedEtcdBackup = newFeatureGate("AutomatedEtcdBackup"). - reportProblemsToJiraComponent("etcd"). - contactPerson("hasbro17"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMachineAPIOperatorDisableMachineHealthCheckController = newFeatureGate("MachineAPIOperatorDisableMachineHealthCheckController"). - reportProblemsToJiraComponent("ecoproject"). - contactPerson("msluiter"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - mustRegister() - - FeatureGateDNSNameResolver = newFeatureGate("DNSNameResolver"). - reportProblemsToJiraComponent("dns"). - contactPerson("miciah"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateImageModeStatusReporting = newFeatureGate("ImageModeStatusReporting"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("ijanssen"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1809"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIInstall = newFeatureGate("ClusterAPIInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("vincepri"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - mustRegister() - - FeatureGateAWSClusterHostedDNS = newFeatureGate("AWSClusterHostedDNS"). - reportProblemsToJiraComponent("Installer"). - contactPerson("barbacbd"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMixedCPUsAllocation = newFeatureGate("MixedCPUsAllocation"). - reportProblemsToJiraComponent("NodeTuningOperator"). - contactPerson("titzhak"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateManagedBootImagesCPMS = newFeatureGate("ManagedBootImagesCPMS"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("djoshy"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1818"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateBootImageSkewEnforcement = newFeatureGate("BootImageSkewEnforcement"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("djoshy"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1761"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateBootcNodeManagement = newFeatureGate("BootcNodeManagement"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("inesqyx"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateSignatureStores = newFeatureGate("SignatureStores"). - reportProblemsToJiraComponent("Cluster Version Operator"). - contactPerson("lmohanty"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateKMSv1 = newFeatureGate("KMSv1"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("dgrisonnet"). - productScope(kubernetes). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAdditionalStorageConfig = newFeatureGate("AdditionalStorageConfig"). - reportProblemsToJiraComponent("node"). - contactPerson("saschagrunert"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1934"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateUpgradeStatus = newFeatureGate("UpgradeStatus"). - reportProblemsToJiraComponent("Cluster Version Operator"). - contactPerson("pmuller"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateVolumeGroupSnapshot = newFeatureGate("VolumeGroupSnapshot"). - reportProblemsToJiraComponent("Storage / Kubernetes External Components"). - contactPerson("fbertina"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/3476"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateExternalSnapshotMetadata = newFeatureGate("ExternalSnapshotMetadata"). - reportProblemsToJiraComponent("Storage / Kubernetes External Components"). - contactPerson("rbednar"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/3314"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateExternalOIDC = newFeatureGate("ExternalOIDC"). - reportProblemsToJiraComponent("authentication"). - contactPerson("liouk"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1596"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAuthenticationComponentProxy = newFeatureGate("AuthenticationComponentProxy"). - reportProblemsToJiraComponent("authentication"). - contactPerson("liouk"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/2015"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateExternalOIDCWithAdditionalClaimMappings = newFeatureGate("ExternalOIDCWithUIDAndExtraClaimMappings"). - reportProblemsToJiraComponent("authentication"). - contactPerson("bpalmer"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1777"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateExternalOIDCWithUpstreamParity = newFeatureGate("ExternalOIDCWithUpstreamParity"). - reportProblemsToJiraComponent("authentication"). - contactPerson("saldawam"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1763"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateExternalOIDCExternalClaimsSourcing = newFeatureGate("ExternalOIDCExternalClaimsSourcing"). - reportProblemsToJiraComponent("authentication"). - contactPerson("bpalmer"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1907"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateExample = newFeatureGate("Example"). - reportProblemsToJiraComponent("cluster-config"). - contactPerson("deads"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateExample2 = newFeatureGate("Example2"). - reportProblemsToJiraComponent("cluster-config"). - contactPerson("JoelSpeed"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLM = newFeatureGate("NewOLM"). - reportProblemsToJiraComponent("olm"). - contactPerson("joe"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inClusterProfile(SelfManaged), inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMCatalogdAPIV1Metas = newFeatureGate("NewOLMCatalogdAPIV1Metas"). - reportProblemsToJiraComponent("olm"). - contactPerson("jordank"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1749"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMPreflightPermissionChecks = newFeatureGate("NewOLMPreflightPermissionChecks"). - reportProblemsToJiraComponent("olm"). - contactPerson("tshort"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1768"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMOwnSingleNamespace = newFeatureGate("NewOLMOwnSingleNamespace"). - reportProblemsToJiraComponent("olm"). - contactPerson("nschieder"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1849"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMWebhookProviderOpenshiftServiceCA = newFeatureGate("NewOLMWebhookProviderOpenshiftServiceCA"). - reportProblemsToJiraComponent("olm"). - contactPerson("pegoncal"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1844"). - enable(inClusterProfile(SelfManaged), inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMBoxCutterRuntime = newFeatureGate("NewOLMBoxCutterRuntime"). - reportProblemsToJiraComponent("olm"). - contactPerson("pegoncal"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1890"). - enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateNewOLMConfigAPI = newFeatureGate("NewOLMConfigAPI"). - reportProblemsToJiraComponent("olm"). - contactPerson("tmshort"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1915"). - enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateOLMLifecycleAndCompatibility = newFeatureGate("OLMLifecycleAndCompatibility"). - reportProblemsToJiraComponent("olm"). - contactPerson("joelanford"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1991"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateInsightsOnDemandDataGather = newFeatureGate("InsightsOnDemandDataGather"). - reportProblemsToJiraComponent("insights"). - contactPerson("tremes"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateInsightsConfig = newFeatureGate("InsightsConfig"). - reportProblemsToJiraComponent("insights"). - contactPerson("tremes"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateMetricsCollectionProfiles = newFeatureGate("MetricsCollectionProfiles"). - reportProblemsToJiraComponent("Monitoring"). - contactPerson("rexagod"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIInstallIBMCloud = newFeatureGate("ClusterAPIInstallIBMCloud"). - reportProblemsToJiraComponent("Installer"). - contactPerson("cjschaef"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMachineAPIMigration = newFeatureGate("MachineAPIMigration"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMachineAPIMigrationAWS = newFeatureGate("MachineAPIMigrationAWS"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMachineAPIMigrationOpenStack = newFeatureGate("MachineAPIMigrationOpenStack"). - reportProblemsToJiraComponent("Cloud Compute / OpenStack Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateMachineAPIMigrationVSphere = newFeatureGate("MachineAPIMigrationVSphere"). - reportProblemsToJiraComponent("SPLAT"). - contactPerson("jcpowermac"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMachineAPIMigrationAzure = newFeatureGate("MachineAPIMigrationAzure"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - mustRegister() - - FeatureGateMachineAPIMigrationBareMetal = newFeatureGate("MachineAPIMigrationBareMetal"). - reportProblemsToJiraComponent("Cloud Compute / BareMetal Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - mustRegister() - - FeatureGateMachineAPIMigrationGCP = newFeatureGate("MachineAPIMigrationGCP"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - mustRegister() - - FeatureGateMachineAPIMigrationPowerVS = newFeatureGate("MachineAPIMigrationPowerVS"). - reportProblemsToJiraComponent("Cloud Compute / IBM Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - mustRegister() - - FeatureGateClusterAPIMachineManagement = newFeatureGate("ClusterAPIMachineManagement"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementAWS = newFeatureGate("ClusterAPIMachineManagementAWS"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementAzure = newFeatureGate("ClusterAPIMachineManagementAzure"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementBareMetal = newFeatureGate("ClusterAPIMachineManagementBareMetal"). - reportProblemsToJiraComponent("Cloud Compute / BareMetal Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementGCP = newFeatureGate("ClusterAPIMachineManagementGCP"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementPowerVS = newFeatureGate("ClusterAPIMachineManagementPowerVS"). - reportProblemsToJiraComponent("Cloud Compute / IBM Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementOpenStack = newFeatureGate("ClusterAPIMachineManagementOpenStack"). - reportProblemsToJiraComponent("Cloud Compute / OpenStack Provider"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIMachineManagementVSphere = newFeatureGate("ClusterAPIMachineManagementVSphere"). - reportProblemsToJiraComponent("SPLAT"). - contactPerson("jcpowermac"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterMonitoringConfig = newFeatureGate("ClusterMonitoringConfig"). - reportProblemsToJiraComponent("Monitoring"). - contactPerson("marioferh"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMultiArchInstallAzure = newFeatureGate("MultiArchInstallAzure"). - reportProblemsToJiraComponent("Installer"). - contactPerson("r4f4"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - mustRegister() - - FeatureGateImageStreamImportMode = newFeatureGate("ImageStreamImportMode"). - reportProblemsToJiraComponent("Multi-Arch"). - contactPerson("psundara"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateVSphereMultiNetworks = newFeatureGate("VSphereMultiNetworks"). - reportProblemsToJiraComponent("SPLAT"). - contactPerson("rvanderp"). - productScope(ocpSpecific). - enhancementPR(legacyFeatureGateWithoutEnhancement). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateIngressControllerDynamicConfigurationManager = newFeatureGate("IngressControllerDynamicConfigurationManager"). - reportProblemsToJiraComponent("Networking/router"). - contactPerson("miciah"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1687"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateIngressComponentRouteLabels = newFeatureGate("IngressComponentRouteLabels"). - reportProblemsToJiraComponent("Management Console"). - contactPerson("leoli"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/2033"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateIngressControllerMultipleHAProxyVersions = newFeatureGate("IngressControllerMultipleHAProxyVersions"). - reportProblemsToJiraComponent("Networking/router"). - contactPerson("miciah"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1965"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateMinimumKubeletVersion = newFeatureGate("MinimumKubeletVersion"). - reportProblemsToJiraComponent("Node"). - contactPerson("haircommander"). - productScope(ocpSpecific). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - enhancementPR("https://github.com/openshift/enhancements/pull/1697"). - mustRegister() - - FeatureGateNutanixMultiSubnets = newFeatureGate("NutanixMultiSubnets"). - reportProblemsToJiraComponent("Cloud Compute / Nutanix Provider"). - contactPerson("yanhli"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1711"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateKMSEncryption = newFeatureGate("KMSEncryption"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("ardaguclu"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1900"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateCVOConfiguration = newFeatureGate("ClusterVersionOperatorConfiguration"). - reportProblemsToJiraComponent("Cluster Version Operator"). - contactPerson("dhurta"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1492"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterUpdateAcceptRisks = newFeatureGate("ClusterUpdateAcceptRisks"). - reportProblemsToJiraComponent("Cluster Version Operator"). - contactPerson("hongkliu"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1807"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterUpdatePreflight = newFeatureGate("ClusterUpdatePreflight"). - reportProblemsToJiraComponent("Cluster Version Operator"). - contactPerson("fao89"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1930"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateGCPCustomAPIEndpoints = newFeatureGate("GCPCustomAPIEndpoints"). - reportProblemsToJiraComponent("Installer"). - contactPerson("barbacbd"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1492"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateDyanmicServiceEndpointIBMCloud = newFeatureGate("DyanmicServiceEndpointIBMCloud"). - reportProblemsToJiraComponent("Cloud Compute / IBM Provider"). - contactPerson("jared-hayes-dev"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1712"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateSELinuxMount = newFeatureGate("SELinuxMount"). - reportProblemsToJiraComponent("Storage / Kubernetes"). - contactPerson("jsafrane"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/1710"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateDualReplica = newFeatureGate("DualReplica"). - reportProblemsToJiraComponent("Two Node Fencing"). - contactPerson("jaypoulz"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1675"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureShortCertRotation = newFeatureGate("ShortCertRotation"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("vrutkovs"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1670"). - mustRegister() - - FeatureGateVSphereConfigurableMaxAllowedBlockVolumesPerNode = newFeatureGate("VSphereConfigurableMaxAllowedBlockVolumesPerNode"). - reportProblemsToJiraComponent("Storage / Kubernetes External Components"). - contactPerson("rbednar"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1748"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAzureMultiDisk = newFeatureGate("AzureMultiDisk"). - reportProblemsToJiraComponent("splat"). - contactPerson("jcpowermac"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1779"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateStoragePerformantSecurityPolicy = newFeatureGate("StoragePerformantSecurityPolicy"). - reportProblemsToJiraComponent("Storage / Kubernetes External Components"). - contactPerson("hekumar"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1804"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMultiDiskSetup = newFeatureGate("MultiDiskSetup"). - reportProblemsToJiraComponent("splat"). - contactPerson("jcpowermac"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1805"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAWSDedicatedHosts = newFeatureGate("AWSDedicatedHosts"). - reportProblemsToJiraComponent("splat"). - contactPerson("rvanderp3"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1781"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateVSphereMixedNodeEnv = newFeatureGate("VSphereMixedNodeEnv"). - reportProblemsToJiraComponent("splat"). - contactPerson("vr4manta"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1772"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateVSphereMultiVCenterDay2 = newFeatureGate("VSphereMultiVCenterDay2"). - reportProblemsToJiraComponent("splat"). - contactPerson("vr4manta"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1961"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAWSServiceLBNetworkSecurityGroup = newFeatureGate("AWSServiceLBNetworkSecurityGroup"). - reportProblemsToJiraComponent("Cloud Compute / Cloud Controller Manager"). - contactPerson("mtulio"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1802"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateNoRegistryClusterInstall = newFeatureGate("NoRegistryClusterInstall"). - reportProblemsToJiraComponent("Installer / Agent based installation"). - contactPerson("andfasano"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1821"). - enable(inClusterProfile(SelfManaged), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAWSClusterHostedDNSInstall = newFeatureGate("AWSClusterHostedDNSInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("barbacbd"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1468"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateGCPCustomAPIEndpointsInstall = newFeatureGate("GCPCustomAPIEndpointsInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("barbacbd"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1492"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateIrreconcilableMachineConfig = newFeatureGate("IrreconcilableMachineConfig"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("pabrodri"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1785"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateAWSDualStackInstall = newFeatureGate("AWSDualStackInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("sadasu"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1806"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAzureDualStackInstall = newFeatureGate("AzureDualStackInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("jhixson74"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1806"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateGCPDualStackInstall = newFeatureGate("GCPDualStackInstall"). - reportProblemsToJiraComponent("Installer"). - contactPerson("barbacbd"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1806"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureCBORServingAndStorage = newFeatureGate("CBORServingAndStorage"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("benluddy"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4222"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureCBORClientsAllowCBOR = newFeatureGate("ClientsAllowCBOR"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("benluddy"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4222"). - mustRegister() - - FeatureClientsPreferCBOR = newFeatureGate("ClientsPreferCBOR"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("benluddy"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4222"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureEventTTL = newFeatureGate("EventTTL"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("tjungblu"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1857"). - enable(inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateMutableCSINodeAllocatableCount = newFeatureGate("MutableCSINodeAllocatableCount"). - reportProblemsToJiraComponent("Storage / Kubernetes External Components"). - contactPerson("jsafrane"). - productScope(kubernetes). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4876"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade(), inDefault(), inOKD()). - mustRegister() - FeatureGateOSStreams = newFeatureGate("OSStreams"). - reportProblemsToJiraComponent("MachineConfigOperator"). - contactPerson("pabrodri"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1874"). - enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade(), inDefault(), inOKD()). - enable(inClusterProfile(Hypershift), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateCRDCompatibilityRequirementOperator = newFeatureGate("CRDCompatibilityRequirementOperator"). - reportProblemsToJiraComponent("Cloud Compute / Cluster API Providers"). - contactPerson("ddonati"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1845"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateOnPremDNSRecords = newFeatureGate("OnPremDNSRecords"). - reportProblemsToJiraComponent("Networking / On-Prem DNS"). - contactPerson("bnemec"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1803"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateProvisioningRequestAvailable = newFeatureGate("ProvisioningRequestAvailable"). - reportProblemsToJiraComponent("Cluster Autoscaler"). - contactPerson("elmiko"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1752"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateHyperShiftOnlyDynamicResourceAllocation = newFeatureGate("HyperShiftOnlyDynamicResourceAllocation"). - reportProblemsToJiraComponent("hypershift"). - contactPerson("csrwng"). - productScope(ocpSpecific). - enhancementPR("https://github.com/kubernetes/enhancements/issues/4381"). - enable(inClusterProfile(Hypershift), inDefault(), inOKD(), inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateConfigurablePKI = newFeatureGate("ConfigurablePKI"). - reportProblemsToJiraComponent("kube-apiserver"). - contactPerson("sanchezl"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1882"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIControlPlaneInstall = newFeatureGate("ClusterAPIControlPlaneInstall"). - reportProblemsToJiraComponent("Installer / openshift-installer"). - contactPerson("patrickdillon"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateClusterAPIComputeInstall = newFeatureGate("ClusterAPIComputeInstall"). - reportProblemsToJiraComponent("Installer / openshift-installer"). - contactPerson("patrickdillon"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1465"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateAWSEuropeanSovereignCloudInstall = newFeatureGate("AWSEuropeanSovereignCloudInstall"). - reportProblemsToJiraComponent("Installer / openshift-installer"). - contactPerson("tthvo"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1952"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateGatewayAPIWithoutOLM = newFeatureGate("GatewayAPIWithoutOLM"). - reportProblemsToJiraComponent("Routing"). - contactPerson("miciah"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1933"). - enable(inDefault(), inOKD(), inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateTLSAdherence = newFeatureGate("TLSAdherence"). - reportProblemsToJiraComponent("HPCASE / TLS Adherence"). - contactPerson("joelanford"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1910"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateConfidentialCluster = newFeatureGate("ConfidentialCluster"). - reportProblemsToJiraComponent("ConfidentialClusters"). - contactPerson("fjin"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1962"). - enable(inDevPreviewNoUpgrade()). - mustRegister() - FeatureGateNetworkObservabilityInstall = newFeatureGate("NetworkObservabilityInstall"). - reportProblemsToJiraComponent("netobserv"). - contactPerson("jtakvori"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1908"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateTLSGroupPreferences = newFeatureGate("TLSGroupPreferences"). - reportProblemsToJiraComponent("Networking / router"). - contactPerson("davidesalerno"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/1894"). - enable(inDevPreviewNoUpgrade(), inTechPreviewNoUpgrade()). - mustRegister() - - FeatureGateMutableTopology = newFeatureGate("MutableTopology"). - reportProblemsToJiraComponent("Mutable Topology"). - contactPerson("jaypoulz"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/2008"). - enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateSELinuxMountGAReadiness = newFeatureGate("SELinuxMountGAReadiness"). - reportProblemsToJiraComponent("Storage / Operators"). - contactPerson("jsafrane"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/2010"). - enable(inTechPreviewNoUpgrade(), inDevPreviewNoUpgrade()). - mustRegister() - - FeatureGateKarpenterOperator = newFeatureGate("KarpenterOperator"). - reportProblemsToJiraComponent("Karpenter"). - contactPerson("maxcao13"). - productScope(ocpSpecific). - enhancementPR("https://github.com/openshift/enhancements/pull/2007"). - enable(inClusterProfile(SelfManaged), inDevPreviewNoUpgrade()). - mustRegister() -) diff --git a/vendor/github.com/openshift/api/features/legacyfeaturegates.go b/vendor/github.com/openshift/api/features/legacyfeaturegates.go deleted file mode 100644 index a82089b9f..000000000 --- a/vendor/github.com/openshift/api/features/legacyfeaturegates.go +++ /dev/null @@ -1,105 +0,0 @@ -package features - -import "k8s.io/apimachinery/pkg/util/sets" - -var legacyFeatureGates = sets.New( - "AWSClusterHostedDNS", - // never add to this list, if you think you have an exception ask @deads2k - "AWSEFSDriverVolumeMetrics", - // never add to this list, if you think you have an exception ask @deads2k - "AlibabaPlatform", - // never add to this list, if you think you have an exception ask @deads2k - "AutomatedEtcdBackup", - // never add to this list, if you think you have an exception ask @deads2k - "AzureWorkloadIdentity", - // never add to this list, if you think you have an exception ask @deads2k - "BootcNodeManagement", - // never add to this list, if you think you have an exception ask @deads2k - "BuildCSIVolumes", - // never add to this list, if you think you have an exception ask @deads2k - "ClusterAPIInstall", - // never add to this list, if you think you have an exception ask @deads2k - "ClusterAPIInstallIBMCloud", - // never add to this list, if you think you have an exception ask @deads2k - "ClusterMonitoringConfig", - // never add to this list, if you think you have an exception ask @deads2k - "DNSNameResolver", - // never add to this list, if you think you have an exception ask @deads2k - "EtcdBackendQuota", - // never add to this list, if you think you have an exception ask @deads2k - "Example", - // never add to this list, if you think you have an exception ask @deads2k - "Example2", - // never add to this list, if you think you have an exception ask @deads2k - "GCPClusterHostedDNS", - // never add to this list, if you think you have an exception ask @deads2k - "HardwareSpeed", - // never add to this list, if you think you have an exception ask @deads2k - "ImageStreamImportMode", - // never add to this list, if you think you have an exception ask @deads2k - "IngressControllerDynamicConfigurationManager", - // never add to this list, if you think you have an exception ask @deads2k - "IngressControllerLBSubnetsAWS", - // never add to this list, if you think you have an exception ask @deads2k - "InsightsConfig", - // never add to this list, if you think you have an exception ask @deads2k - "InsightsConfigAPI", - // never add to this list, if you think you have an exception ask @deads2k - "InsightsOnDemandDataGather", - // never add to this list, if you think you have an exception ask @deads2k - "InsightsRuntimeExtractor", - // never add to this list, if you think you have an exception ask @deads2k - "KMSv1", - // never add to this list, if you think you have an exception ask @deads2k - "MachineAPIMigration", - // never add to this list, if you think you have an exception ask @deads2k - "MachineAPIOperatorDisableMachineHealthCheckController", - // never add to this list, if you think you have an exception ask @deads2k - "MachineAPIProviderOpenStack", - // never add to this list, if you think you have an exception ask @deads2k - "MachineConfigNodes", - // never add to this list, if you think you have an exception ask @deads2k - "ManagedBootImages", - // never add to this list, if you think you have an exception ask @deads2k - "ManagedBootImagesAWS", - // never add to this list, if you think you have an exception ask @deads2k - "MetricsCollectionProfiles", - // never add to this list, if you think you have an exception ask @deads2k - "MixedCPUsAllocation", - // never add to this list, if you think you have an exception ask @deads2k - "MultiArchInstallAWS", - // never add to this list, if you think you have an exception ask @deads2k - "MultiArchInstallAzure", - // never add to this list, if you think you have an exception ask @deads2k - "MultiArchInstallGCP", - // never add to this list, if you think you have an exception ask @deads2k - "NewOLM", - // never add to this list, if you think you have an exception ask @deads2k - "OVNObservability", - // never add to this list, if you think you have an exception ask @deads2k - "PersistentIPsForVirtualization", - // never add to this list, if you think you have an exception ask @deads2k - "PinnedImages", - // never add to this list, if you think you have an exception ask @deads2k - "PrivateHostedZoneAWS", - // never add to this list, if you think you have an exception ask @deads2k - "RouteExternalCertificate", - // never add to this list, if you think you have an exception ask @deads2k - "SetEIPForNLBIngressController", - // never add to this list, if you think you have an exception ask @deads2k - "SignatureStores", - // never add to this list, if you think you have an exception ask @deads2k - "SigstoreImageVerification", - // never add to this list, if you think you have an exception ask @deads2k - "UpgradeStatus", - // never add to this list, if you think you have an exception ask @deads2k - "VSphereControlPlaneMachineSet", - // never add to this list, if you think you have an exception ask @deads2k - "VSphereDriverConfiguration", - // never add to this list, if you think you have an exception ask @deads2k - "VSphereMultiNetworks", - // never add to this list, if you think you have an exception ask @deads2k - "VSphereMultiVCenters", - // never add to this list, if you think you have an exception ask @deads2k - "VSphereStaticIPs", -) diff --git a/vendor/github.com/openshift/api/features/util.go b/vendor/github.com/openshift/api/features/util.go deleted file mode 100644 index e2b35d93a..000000000 --- a/vendor/github.com/openshift/api/features/util.go +++ /dev/null @@ -1,284 +0,0 @@ -package features - -import ( - "fmt" - "net/url" - "strings" - - configv1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/util/sets" -) - -// FeatureGateDescription is a golang-only interface used to contains details for a feature gate. -type FeatureGateDescription struct { - // FeatureGateAttributes is the information that appears in the API - FeatureGateAttributes configv1.FeatureGateAttributes - - // OwningJiraComponent is the jira component that owns most of the impl and first assignment for the bug. - // This is the team that owns the feature long term. - OwningJiraComponent string - // ResponsiblePerson is the person who is on the hook for first contact. This is often, but not always, a team lead. - // It is someone who can make the promise on the behalf of the team. - ResponsiblePerson string - // OwningProduct is the product that owns the lifecycle of the gate. - OwningProduct OwningProduct - // EnhancementPR is the PR for the enhancement. - EnhancementPR string -} - -type FeatureGateEnabledDisabled struct { - Enabled []FeatureGateDescription - Disabled []FeatureGateDescription -} - -type ClusterProfileName string - -var ( - Hypershift = ClusterProfileName("include.release.openshift.io/ibm-cloud-managed") - SelfManaged = ClusterProfileName("include.release.openshift.io/self-managed-high-availability") - AllClusterProfiles = []ClusterProfileName{Hypershift, SelfManaged} -) - -type OwningProduct string - -var ( - ocpSpecific = OwningProduct("OCP") - kubernetes = OwningProduct("Kubernetes") -) - -type featureGateEnableOption func(s *featureGateStatus) - -type versionOperator string - -var ( - equal = versionOperator("=") - greaterThan = versionOperator(">") - greaterThanOrEqual = versionOperator(">=") - lessThan = versionOperator("<") - lessThanOrEqual = versionOperator("<=") -) - -func inVersion(version uint64, op versionOperator) featureGateEnableOption { - return func(s *featureGateStatus) { - switch op { - case equal: - s.version.Insert(version) - case greaterThan: - for v := version + 1; v <= maxOpenshiftVersion; v++ { - s.version.Insert(v) - } - case greaterThanOrEqual: - for v := version; v <= maxOpenshiftVersion; v++ { - s.version.Insert(v) - } - case lessThan: - for v := minOpenshiftVersion; v < version; v++ { - s.version.Insert(v) - } - case lessThanOrEqual: - for v := minOpenshiftVersion; v <= version; v++ { - s.version.Insert(v) - } - default: - panic(fmt.Sprintf("invalid version operator: %s", op)) - } - } -} - -func inClusterProfile(clusterProfile ClusterProfileName) featureGateEnableOption { - return func(s *featureGateStatus) { - s.clusterProfile.Insert(clusterProfile) - } -} - -func withFeatureSet(featureSet configv1.FeatureSet) featureGateEnableOption { - return func(s *featureGateStatus) { - s.featureSets.Insert(featureSet) - } -} - -func inDefault() featureGateEnableOption { - return withFeatureSet(configv1.Default) -} - -func inTechPreviewNoUpgrade() featureGateEnableOption { - return withFeatureSet(configv1.TechPreviewNoUpgrade) -} - -func inDevPreviewNoUpgrade() featureGateEnableOption { - return withFeatureSet(configv1.DevPreviewNoUpgrade) -} - -func inCustomNoUpgrade() featureGateEnableOption { - return withFeatureSet(configv1.CustomNoUpgrade) -} - -func inOKD() featureGateEnableOption { - return withFeatureSet(configv1.OKD) -} - -type featureGateBuilder struct { - name string - owningJiraComponent string - responsiblePerson string - owningProduct OwningProduct - enhancementPRURL string - - status []featureGateStatus -} -type featureGateStatus struct { - version sets.Set[uint64] - clusterProfile sets.Set[ClusterProfileName] - featureSets sets.Set[configv1.FeatureSet] -} - -func (s *featureGateStatus) isEnabled(version uint64, clusterProfile ClusterProfileName, featureSet configv1.FeatureSet) bool { - // If either version or clusterprofile are empty, match all. - matchesVersion := len(s.version) == 0 || s.version.Has(version) - matchesClusterProfile := len(s.clusterProfile) == 0 || s.clusterProfile.Has(clusterProfile) - - matchesFeatureSet := s.featureSets.Has(featureSet) - - return matchesVersion && matchesClusterProfile && matchesFeatureSet -} - -const ( - legacyFeatureGateWithoutEnhancement = "FeatureGate predates 4.18" -) - -// newFeatureGate featuregate are disabled in every FeatureSet and selectively enabled -func newFeatureGate(name string) *featureGateBuilder { - return &featureGateBuilder{ - name: name, - } -} - -func (b *featureGateBuilder) reportProblemsToJiraComponent(owningJiraComponent string) *featureGateBuilder { - b.owningJiraComponent = owningJiraComponent - return b -} - -func (b *featureGateBuilder) contactPerson(responsiblePerson string) *featureGateBuilder { - b.responsiblePerson = responsiblePerson - return b -} - -func (b *featureGateBuilder) productScope(owningProduct OwningProduct) *featureGateBuilder { - b.owningProduct = owningProduct - return b -} - -func (b *featureGateBuilder) enhancementPR(url string) *featureGateBuilder { - b.enhancementPRURL = url - return b -} - -func (b *featureGateBuilder) enable(opts ...featureGateEnableOption) *featureGateBuilder { - status := featureGateStatus{ - version: sets.New[uint64](), - clusterProfile: sets.New[ClusterProfileName](), - featureSets: sets.New[configv1.FeatureSet](), - } - - for _, opt := range opts { - opt(&status) - } - - b.status = append(b.status, status) - - return b -} - -func (b *featureGateBuilder) register() (configv1.FeatureGateName, error) { - if len(b.name) == 0 { - return "", fmt.Errorf("missing name") - } - if len(b.owningJiraComponent) == 0 { - return "", fmt.Errorf("missing owningJiraComponent") - } - if len(b.responsiblePerson) == 0 { - return "", fmt.Errorf("missing responsiblePerson") - } - if len(b.owningProduct) == 0 { - return "", fmt.Errorf("missing owningProduct") - } - _, enhancementPRErr := url.Parse(b.enhancementPRURL) - switch { - case b.enhancementPRURL == legacyFeatureGateWithoutEnhancement: - if !legacyFeatureGates.Has(b.name) { - return "", fmt.Errorf("FeatureGate/%s is a new feature gate, not an existing one. It must have an enhancementPR with GA Graduation Criteria like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/####", b.name) - } - - case len(b.enhancementPRURL) == 0: - return "", fmt.Errorf("FeatureGate/%s is missing an enhancementPR with GA Graduation Criteria like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/####", b.name) - - case !strings.HasPrefix(b.enhancementPRURL, "https://github.com/openshift/enhancements/pull/") && - !strings.HasPrefix(b.enhancementPRURL, "https://github.com/kubernetes/enhancements/issues/") && - !strings.HasPrefix(b.enhancementPRURL, "https://github.com/ovn-kubernetes/ovn-kubernetes/pull/"): - return "", fmt.Errorf("FeatureGate/%s enhancementPR format is incorrect; must be like https://github.com/openshift/enhancements/pull/#### or https://github.com/kubernetes/enhancements/issues/#### or https://github.com/ovn-kubernetes/ovn-kubernetes/pull/####", b.name) - - case enhancementPRErr != nil: - return "", fmt.Errorf("FeatureGate/%s is enhancementPR is invalid: %w", b.name, enhancementPRErr) - } - - featureGateName := configv1.FeatureGateName(b.name) - - allFeatureGates[featureGateName] = b.status - - return featureGateName, nil -} - -func (b *featureGateBuilder) mustRegister() configv1.FeatureGateName { - ret, err := b.register() - if err != nil { - panic(err) - } - return ret -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateEnabledDisabled) DeepCopyInto(out *FeatureGateEnabledDisabled) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = make([]FeatureGateDescription, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]FeatureGateDescription, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateEnabledDisabled. -func (in *FeatureGateEnabledDisabled) DeepCopy() *FeatureGateEnabledDisabled { - if in == nil { - return nil - } - out := new(FeatureGateEnabledDisabled) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeatureGateDescription) DeepCopyInto(out *FeatureGateDescription) { - *out = *in - out.FeatureGateAttributes = in.FeatureGateAttributes - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureGateDescription. -func (in *FeatureGateDescription) DeepCopy() *FeatureGateDescription { - if in == nil { - return nil - } - out := new(FeatureGateDescription) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/helm/.codegen.yaml b/vendor/github.com/openshift/api/helm/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/helm/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/helm/install.go b/vendor/github.com/openshift/api/helm/install.go deleted file mode 100644 index 6c8f51892..000000000 --- a/vendor/github.com/openshift/api/helm/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package helm - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - helmv1beta1 "github.com/openshift/api/helm/v1beta1" -) - -const ( - GroupName = "helm.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(helmv1beta1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/Makefile b/vendor/github.com/openshift/api/helm/v1beta1/Makefile deleted file mode 100644 index d61590833..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="helm.openshift.io/v1beta1" diff --git a/vendor/github.com/openshift/api/helm/v1beta1/doc.go b/vendor/github.com/openshift/api/helm/v1beta1/doc.go deleted file mode 100644 index 85ecec82b..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.helm.v1beta1 - -// +kubebuilder:validation:Optional -// +groupName=helm.openshift.io -// Package v1 is the v1 version of the API. -package v1beta1 diff --git a/vendor/github.com/openshift/api/helm/v1beta1/register.go b/vendor/github.com/openshift/api/helm/v1beta1/register.go deleted file mode 100644 index 1301eb008..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "helm.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &HelmChartRepository{}, - &HelmChartRepositoryList{}, - &ProjectHelmChartRepository{}, - &ProjectHelmChartRepositoryList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.go b/vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.go deleted file mode 100644 index 793cb1938..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/types_helm_chart_repository.go +++ /dev/null @@ -1,105 +0,0 @@ -package v1beta1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:plural=helmchartrepositories - -// HelmChartRepository holds cluster-wide configuration for proxied Helm chart repository -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=helmchartrepositories,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/598 -// +openshift:file-pattern=operatorOrdering=00 -type HelmChartRepository struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec HelmChartRepositorySpec `json:"spec"` - - // Observed status of the repository within the cluster.. - // +optional - Status HelmChartRepositoryStatus `json:"status"` -} - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=2 -type HelmChartRepositoryList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []HelmChartRepository `json:"items"` -} - -// Helm chart repository exposed within the cluster -type HelmChartRepositorySpec struct { - - // If set to true, disable the repo usage in the cluster/namespace - // +optional - Disabled bool `json:"disabled,omitempty"` - - // Optional associated human readable repository name, it can be used by UI for displaying purposes - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=100 - // +optional - DisplayName string `json:"name,omitempty"` - - // Optional human readable repository description, it can be used by UI for displaying purposes - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - // +optional - Description string `json:"description,omitempty"` - - // Required configuration for connecting to the chart repo - ConnectionConfig ConnectionConfig `json:"connectionConfig"` -} - -type ConnectionConfig struct { - - // Chart repository URL - // +kubebuilder:validation:Pattern=`^https?:\/\/` - // +kubebuilder:validation:MaxLength=2048 - 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-bundle.crt" is used to locate the data. - // If empty, the default system roots are used. - // The namespace for this config map is openshift-config. - // +optional - CA configv1.ConfigMapNameReference `json:"ca,omitempty"` - - // tlsClientConfig is an optional reference to a secret by name that contains the - // PEM-encoded TLS client certificate and private key to present when connecting to the server. - // The key "tls.crt" is used to locate the client certificate. - // The key "tls.key" is used to locate the private key. - // The namespace for this secret is openshift-config. - // +optional - TLSClientConfig configv1.SecretNameReference `json:"tlsClientConfig,omitempty"` -} - -type HelmChartRepositoryStatus struct { - - // conditions is a list of conditions and their statuses - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/types_project_helm_chart_repository.go b/vendor/github.com/openshift/api/helm/v1beta1/types_project_helm_chart_repository.go deleted file mode 100644 index 8049c4fe5..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/types_project_helm_chart_repository.go +++ /dev/null @@ -1,103 +0,0 @@ -package v1beta1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:plural=projecthelmchartrepositories - -// ProjectHelmChartRepository holds namespace-wide configuration for proxied Helm chart repository -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=projecthelmchartrepositories,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1084 -// +openshift:file-pattern=operatorOrdering=00 -type ProjectHelmChartRepository struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec ProjectHelmChartRepositorySpec `json:"spec"` - - // Observed status of the repository within the namespace.. - // +optional - Status HelmChartRepositoryStatus `json:"status"` -} - -// Project Helm chart repository exposed within a namespace -type ProjectHelmChartRepositorySpec struct { - - // If set to true, disable the repo usage in the namespace - // +optional - Disabled bool `json:"disabled,omitempty"` - - // Optional associated human readable repository name, it can be used by UI for displaying purposes - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=100 - // +optional - DisplayName string `json:"name,omitempty"` - - // Optional human readable repository description, it can be used by UI for displaying purposes - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - // +optional - Description string `json:"description,omitempty"` - - // Required configuration for connecting to the chart repo - ProjectConnectionConfig ConnectionConfigNamespaceScoped `json:"connectionConfig"` -} - -type ConnectionConfigNamespaceScoped struct { - - // Chart repository URL - // +kubebuilder:validation:Pattern=`^https?:\/\/` - // +kubebuilder:validation:MaxLength=2048 - 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-bundle.crt" is used to locate the data. - // If empty, the default system roots are used. - // The namespace for this configmap must be same as the namespace where the project helm chart repository is getting instantiated. - // +optional - CA configv1.ConfigMapNameReference `json:"ca,omitempty"` - - // tlsClientConfig is an optional reference to a secret by name that contains the - // PEM-encoded TLS client certificate and private key to present when connecting to the server. - // The key "tls.crt" is used to locate the client certificate. - // The key "tls.key" is used to locate the private key. - // The namespace for this secret must be same as the namespace where the project helm chart repository is getting instantiated. - // +optional - TLSClientConfig configv1.SecretNameReference `json:"tlsClientConfig,omitempty"` - - // basicAuthConfig is an optional reference to a secret by name that contains - // the basic authentication credentials to present when connecting to the server. - // The key "username" is used locate the username. - // The key "password" is used to locate the password. - // The namespace for this secret must be same as the namespace where the project helm chart repository is getting instantiated. - // +optional - BasicAuthConfig configv1.SecretNameReference `json:"basicAuthConfig,omitempty"` -} - -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=2 -type ProjectHelmChartRepositoryList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ProjectHelmChartRepository `json:"items"` -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 278e68110..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,227 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *ConnectionConfig) DeepCopyInto(out *ConnectionConfig) { - *out = *in - out.CA = in.CA - out.TLSClientConfig = in.TLSClientConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionConfig. -func (in *ConnectionConfig) DeepCopy() *ConnectionConfig { - if in == nil { - return nil - } - out := new(ConnectionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConnectionConfigNamespaceScoped) DeepCopyInto(out *ConnectionConfigNamespaceScoped) { - *out = *in - out.CA = in.CA - out.TLSClientConfig = in.TLSClientConfig - out.BasicAuthConfig = in.BasicAuthConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConnectionConfigNamespaceScoped. -func (in *ConnectionConfigNamespaceScoped) DeepCopy() *ConnectionConfigNamespaceScoped { - if in == nil { - return nil - } - out := new(ConnectionConfigNamespaceScoped) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChartRepository) DeepCopyInto(out *HelmChartRepository) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartRepository. -func (in *HelmChartRepository) DeepCopy() *HelmChartRepository { - if in == nil { - return nil - } - out := new(HelmChartRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmChartRepository) 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 *HelmChartRepositoryList) DeepCopyInto(out *HelmChartRepositoryList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HelmChartRepository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartRepositoryList. -func (in *HelmChartRepositoryList) DeepCopy() *HelmChartRepositoryList { - if in == nil { - return nil - } - out := new(HelmChartRepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HelmChartRepositoryList) 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 *HelmChartRepositorySpec) DeepCopyInto(out *HelmChartRepositorySpec) { - *out = *in - out.ConnectionConfig = in.ConnectionConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartRepositorySpec. -func (in *HelmChartRepositorySpec) DeepCopy() *HelmChartRepositorySpec { - if in == nil { - return nil - } - out := new(HelmChartRepositorySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HelmChartRepositoryStatus) DeepCopyInto(out *HelmChartRepositoryStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HelmChartRepositoryStatus. -func (in *HelmChartRepositoryStatus) DeepCopy() *HelmChartRepositoryStatus { - if in == nil { - return nil - } - out := new(HelmChartRepositoryStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectHelmChartRepository) DeepCopyInto(out *ProjectHelmChartRepository) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectHelmChartRepository. -func (in *ProjectHelmChartRepository) DeepCopy() *ProjectHelmChartRepository { - if in == nil { - return nil - } - out := new(ProjectHelmChartRepository) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectHelmChartRepository) 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 *ProjectHelmChartRepositoryList) DeepCopyInto(out *ProjectHelmChartRepositoryList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ProjectHelmChartRepository, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectHelmChartRepositoryList. -func (in *ProjectHelmChartRepositoryList) DeepCopy() *ProjectHelmChartRepositoryList { - if in == nil { - return nil - } - out := new(ProjectHelmChartRepositoryList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectHelmChartRepositoryList) 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 *ProjectHelmChartRepositorySpec) DeepCopyInto(out *ProjectHelmChartRepositorySpec) { - *out = *in - out.ProjectConnectionConfig = in.ProjectConnectionConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectHelmChartRepositorySpec. -func (in *ProjectHelmChartRepositorySpec) DeepCopy() *ProjectHelmChartRepositorySpec { - if in == nil { - return nil - } - out := new(ProjectHelmChartRepositorySpec) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 218c072c1..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,42 +0,0 @@ -helmchartrepositories.helm.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/598 - CRDName: helmchartrepositories.helm.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: helm.openshift.io - HasStatus: true - KindName: HelmChartRepository - Labels: {} - PluralName: helmchartrepositories - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1beta1 - -projecthelmchartrepositories.helm.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1084 - CRDName: projecthelmchartrepositories.helm.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: helm.openshift.io - HasStatus: true - KindName: ProjectHelmChartRepository - Labels: {} - PluralName: projecthelmchartrepositories - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1beta1 - diff --git a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.model_name.go b/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.model_name.go deleted file mode 100644 index 4cf8aee34..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.model_name.go +++ /dev/null @@ -1,51 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1beta1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConnectionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.ConnectionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConnectionConfigNamespaceScoped) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.ConnectionConfigNamespaceScoped" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HelmChartRepository) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.HelmChartRepository" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HelmChartRepositoryList) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.HelmChartRepositoryList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HelmChartRepositorySpec) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.HelmChartRepositorySpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HelmChartRepositoryStatus) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.HelmChartRepositoryStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectHelmChartRepository) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.ProjectHelmChartRepository" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectHelmChartRepositoryList) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.ProjectHelmChartRepositoryList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectHelmChartRepositorySpec) OpenAPIModelName() string { - return "com.github.openshift.api.helm.v1beta1.ProjectHelmChartRepositorySpec" -} diff --git a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 42d986f23..000000000 --- a/vendor/github.com/openshift/api/helm/v1beta1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,107 +0,0 @@ -package v1beta1 - -// 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_ConnectionConfig = map[string]string{ - "url": "Chart repository 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-bundle.crt\" is used to locate the data. If empty, the default system roots are used. The namespace for this config map is openshift-config.", - "tlsClientConfig": "tlsClientConfig is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate and private key to present when connecting to the server. The key \"tls.crt\" is used to locate the client certificate. The key \"tls.key\" is used to locate the private key. The namespace for this secret is openshift-config.", -} - -func (ConnectionConfig) SwaggerDoc() map[string]string { - return map_ConnectionConfig -} - -var map_HelmChartRepository = map[string]string{ - "": "HelmChartRepository holds cluster-wide configuration for proxied Helm chart repository\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "Observed status of the repository within the cluster..", -} - -func (HelmChartRepository) SwaggerDoc() map[string]string { - return map_HelmChartRepository -} - -var map_HelmChartRepositoryList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (HelmChartRepositoryList) SwaggerDoc() map[string]string { - return map_HelmChartRepositoryList -} - -var map_HelmChartRepositorySpec = map[string]string{ - "": "Helm chart repository exposed within the cluster", - "disabled": "If set to true, disable the repo usage in the cluster/namespace", - "name": "Optional associated human readable repository name, it can be used by UI for displaying purposes", - "description": "Optional human readable repository description, it can be used by UI for displaying purposes", - "connectionConfig": "Required configuration for connecting to the chart repo", -} - -func (HelmChartRepositorySpec) SwaggerDoc() map[string]string { - return map_HelmChartRepositorySpec -} - -var map_HelmChartRepositoryStatus = map[string]string{ - "conditions": "conditions is a list of conditions and their statuses", -} - -func (HelmChartRepositoryStatus) SwaggerDoc() map[string]string { - return map_HelmChartRepositoryStatus -} - -var map_ConnectionConfigNamespaceScoped = map[string]string{ - "url": "Chart repository 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-bundle.crt\" is used to locate the data. If empty, the default system roots are used. The namespace for this configmap must be same as the namespace where the project helm chart repository is getting instantiated.", - "tlsClientConfig": "tlsClientConfig is an optional reference to a secret by name that contains the PEM-encoded TLS client certificate and private key to present when connecting to the server. The key \"tls.crt\" is used to locate the client certificate. The key \"tls.key\" is used to locate the private key. The namespace for this secret must be same as the namespace where the project helm chart repository is getting instantiated.", - "basicAuthConfig": "basicAuthConfig is an optional reference to a secret by name that contains the basic authentication credentials to present when connecting to the server. The key \"username\" is used locate the username. The key \"password\" is used to locate the password. The namespace for this secret must be same as the namespace where the project helm chart repository is getting instantiated.", -} - -func (ConnectionConfigNamespaceScoped) SwaggerDoc() map[string]string { - return map_ConnectionConfigNamespaceScoped -} - -var map_ProjectHelmChartRepository = map[string]string{ - "": "ProjectHelmChartRepository holds namespace-wide configuration for proxied Helm chart repository\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "Observed status of the repository within the namespace..", -} - -func (ProjectHelmChartRepository) SwaggerDoc() map[string]string { - return map_ProjectHelmChartRepository -} - -var map_ProjectHelmChartRepositoryList = map[string]string{ - "": "Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ProjectHelmChartRepositoryList) SwaggerDoc() map[string]string { - return map_ProjectHelmChartRepositoryList -} - -var map_ProjectHelmChartRepositorySpec = map[string]string{ - "": "Project Helm chart repository exposed within a namespace", - "disabled": "If set to true, disable the repo usage in the namespace", - "name": "Optional associated human readable repository name, it can be used by UI for displaying purposes", - "description": "Optional human readable repository description, it can be used by UI for displaying purposes", - "connectionConfig": "Required configuration for connecting to the chart repo", -} - -func (ProjectHelmChartRepositorySpec) SwaggerDoc() map[string]string { - return map_ProjectHelmChartRepositorySpec -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/image/.codegen.yaml b/vendor/github.com/openshift/api/image/.codegen.yaml deleted file mode 100644 index a2d9bd200..000000000 --- a/vendor/github.com/openshift/api/image/.codegen.yaml +++ /dev/null @@ -1,7 +0,0 @@ -swaggerdocs: - commentPolicy: Warn -protobuf: - disabled: false - disabledVersions: - - "1.0" - - pre012 diff --git a/vendor/github.com/openshift/api/image/OWNERS b/vendor/github.com/openshift/api/image/OWNERS deleted file mode 100644 index c12602811..000000000 --- a/vendor/github.com/openshift/api/image/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: - - bparees - - dmage - - legionus - - miminar diff --git a/vendor/github.com/openshift/api/image/docker10/doc.go b/vendor/github.com/openshift/api/image/docker10/doc.go deleted file mode 100644 index cc194d24d..000000000 --- a/vendor/github.com/openshift/api/image/docker10/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// +k8s:deepcopy-gen=package,register - -// Package docker10 is the docker10 version of the API. -package docker10 diff --git a/vendor/github.com/openshift/api/image/docker10/register.go b/vendor/github.com/openshift/api/image/docker10/register.go deleted file mode 100644 index 3d5ad268a..000000000 --- a/vendor/github.com/openshift/api/image/docker10/register.go +++ /dev/null @@ -1,47 +0,0 @@ -package docker10 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - GroupName = "image.openshift.io" - LegacyGroupName = "" -) - -// SchemeGroupVersion is group version used to register these objects -var ( - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "1.0"} - LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "1.0"} - - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - LegacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes) - - AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme - - // Install is a function which adds this version to a scheme - Install = SchemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &DockerImage{}, - ) - return nil -} - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(LegacySchemeGroupVersion, - &DockerImage{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/image/docker10/types_docker.go b/vendor/github.com/openshift/api/image/docker10/types_docker.go deleted file mode 100644 index 03f0f67fc..000000000 --- a/vendor/github.com/openshift/api/image/docker10/types_docker.go +++ /dev/null @@ -1,60 +0,0 @@ -package docker10 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DockerImage is the type representing a container image and its various properties when -// retrieved from the Docker client API. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type DockerImage struct { - metav1.TypeMeta `json:",inline"` - - ID string `json:"Id"` - Parent string `json:"Parent,omitempty"` - Comment string `json:"Comment,omitempty"` - Created metav1.Time `json:"Created,omitempty"` - Container string `json:"Container,omitempty"` - ContainerConfig DockerConfig `json:"ContainerConfig,omitempty"` - DockerVersion string `json:"DockerVersion,omitempty"` - Author string `json:"Author,omitempty"` - Config *DockerConfig `json:"Config,omitempty"` - Architecture string `json:"Architecture,omitempty"` - Size int64 `json:"Size,omitempty"` -} - -// DockerConfig is the list of configuration options used when creating a container. -type DockerConfig struct { - Hostname string `json:"Hostname,omitempty"` - Domainname string `json:"Domainname,omitempty"` - User string `json:"User,omitempty"` - Memory int64 `json:"Memory,omitempty"` - MemorySwap int64 `json:"MemorySwap,omitempty"` - CPUShares int64 `json:"CpuShares,omitempty"` - CPUSet string `json:"Cpuset,omitempty"` - AttachStdin bool `json:"AttachStdin,omitempty"` - AttachStdout bool `json:"AttachStdout,omitempty"` - AttachStderr bool `json:"AttachStderr,omitempty"` - PortSpecs []string `json:"PortSpecs,omitempty"` - ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` - Tty bool `json:"Tty,omitempty"` - OpenStdin bool `json:"OpenStdin,omitempty"` - StdinOnce bool `json:"StdinOnce,omitempty"` - Env []string `json:"Env,omitempty"` - Cmd []string `json:"Cmd,omitempty"` - DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only - Image string `json:"Image,omitempty"` - Volumes map[string]struct{} `json:"Volumes,omitempty"` - VolumesFrom string `json:"VolumesFrom,omitempty"` - WorkingDir string `json:"WorkingDir,omitempty"` - Entrypoint []string `json:"Entrypoint,omitempty"` - NetworkDisabled bool `json:"NetworkDisabled,omitempty"` - SecurityOpts []string `json:"SecurityOpts,omitempty"` - OnBuild []string `json:"OnBuild,omitempty"` - Labels map[string]string `json:"Labels,omitempty"` -} diff --git a/vendor/github.com/openshift/api/image/docker10/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/image/docker10/zz_generated.deepcopy.go deleted file mode 100644 index be828dbe4..000000000 --- a/vendor/github.com/openshift/api/image/docker10/zz_generated.deepcopy.go +++ /dev/null @@ -1,114 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package docker10 - -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 *DockerConfig) DeepCopyInto(out *DockerConfig) { - *out = *in - if in.PortSpecs != nil { - in, out := &in.PortSpecs, &out.PortSpecs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExposedPorts != nil { - in, out := &in.ExposedPorts, &out.ExposedPorts - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Cmd != nil { - in, out := &in.Cmd, &out.Cmd - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNS != nil { - in, out := &in.DNS, &out.DNS - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Entrypoint != nil { - in, out := &in.Entrypoint, &out.Entrypoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityOpts != nil { - in, out := &in.SecurityOpts, &out.SecurityOpts - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OnBuild != nil { - in, out := &in.OnBuild, &out.OnBuild - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfig. -func (in *DockerConfig) DeepCopy() *DockerConfig { - if in == nil { - return nil - } - out := new(DockerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerImage) DeepCopyInto(out *DockerImage) { - *out = *in - out.TypeMeta = in.TypeMeta - in.Created.DeepCopyInto(&out.Created) - in.ContainerConfig.DeepCopyInto(&out.ContainerConfig) - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(DockerConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerImage. -func (in *DockerImage) DeepCopy() *DockerImage { - if in == nil { - return nil - } - out := new(DockerImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DockerImage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/openshift/api/image/docker10/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/image/docker10/zz_generated.swagger_doc_generated.go deleted file mode 100644 index e818f784a..000000000 --- a/vendor/github.com/openshift/api/image/docker10/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,30 +0,0 @@ -package docker10 - -// 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_DockerConfig = map[string]string{ - "": "DockerConfig is the list of configuration options used when creating a container.", -} - -func (DockerConfig) SwaggerDoc() map[string]string { - return map_DockerConfig -} - -var map_DockerImage = map[string]string{ - "": "DockerImage is the type representing a container image and its various properties when retrieved from the Docker client API.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (DockerImage) SwaggerDoc() map[string]string { - return map_DockerImage -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/image/dockerpre012/deepcopy.go b/vendor/github.com/openshift/api/image/dockerpre012/deepcopy.go deleted file mode 100644 index ddeb4403c..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/deepcopy.go +++ /dev/null @@ -1,18 +0,0 @@ -package dockerpre012 - -// DeepCopyInto is manually built to copy the (probably bugged) time.Time -func (in *ImagePre012) DeepCopyInto(out *ImagePre012) { - *out = *in - out.Created = in.Created - in.ContainerConfig.DeepCopyInto(&out.ContainerConfig) - if in.Config != nil { - in, out := &in.Config, &out.Config - if *in == nil { - *out = nil - } else { - *out = new(Config) - (*in).DeepCopyInto(*out) - } - } - return -} diff --git a/vendor/github.com/openshift/api/image/dockerpre012/doc.go b/vendor/github.com/openshift/api/image/dockerpre012/doc.go deleted file mode 100644 index e4a56260f..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// +k8s:deepcopy-gen=package,register - -// Package dockerpre012 is the dockerpre012 version of the API. -package dockerpre012 diff --git a/vendor/github.com/openshift/api/image/dockerpre012/register.go b/vendor/github.com/openshift/api/image/dockerpre012/register.go deleted file mode 100644 index 7ce2adb0a..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/register.go +++ /dev/null @@ -1,46 +0,0 @@ -package dockerpre012 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - GroupName = "image.openshift.io" - LegacyGroupName = "" -) - -var ( - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "pre012"} - LegacySchemeGroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "pre012"} - - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - - LegacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes) - AddToSchemeInCoreGroup = LegacySchemeBuilder.AddToScheme - - // Install is a function which adds this version to a scheme - Install = SchemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &DockerImage{}, - ) - return nil -} - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(LegacySchemeGroupVersion, - &DockerImage{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/image/dockerpre012/types_docker.go b/vendor/github.com/openshift/api/image/dockerpre012/types_docker.go deleted file mode 100644 index 1111892a9..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/types_docker.go +++ /dev/null @@ -1,140 +0,0 @@ -package dockerpre012 - -import ( - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DockerImage is for earlier versions of the Docker API (pre-012 to be specific). It is also the -// version of metadata that the container image registry uses to persist metadata. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type DockerImage struct { - metav1.TypeMeta `json:",inline"` - - ID string `json:"id"` - Parent string `json:"parent,omitempty"` - Comment string `json:"comment,omitempty"` - Created metav1.Time `json:"created"` - Container string `json:"container,omitempty"` - ContainerConfig DockerConfig `json:"container_config,omitempty"` - DockerVersion string `json:"docker_version,omitempty"` - Author string `json:"author,omitempty"` - Config *DockerConfig `json:"config,omitempty"` - Architecture string `json:"architecture,omitempty"` - Size int64 `json:"size,omitempty"` -} - -// DockerConfig is the list of configuration options used when creating a container. -type DockerConfig struct { - Hostname string `json:"Hostname,omitempty"` - Domainname string `json:"Domainname,omitempty"` - User string `json:"User,omitempty"` - Memory int64 `json:"Memory,omitempty"` - MemorySwap int64 `json:"MemorySwap,omitempty"` - CPUShares int64 `json:"CpuShares,omitempty"` - CPUSet string `json:"Cpuset,omitempty"` - AttachStdin bool `json:"AttachStdin,omitempty"` - AttachStdout bool `json:"AttachStdout,omitempty"` - AttachStderr bool `json:"AttachStderr,omitempty"` - PortSpecs []string `json:"PortSpecs,omitempty"` - ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` - Tty bool `json:"Tty,omitempty"` - OpenStdin bool `json:"OpenStdin,omitempty"` - StdinOnce bool `json:"StdinOnce,omitempty"` - Env []string `json:"Env,omitempty"` - Cmd []string `json:"Cmd,omitempty"` - DNS []string `json:"Dns,omitempty"` // For Docker API v1.9 and below only - Image string `json:"Image,omitempty"` - Volumes map[string]struct{} `json:"Volumes,omitempty"` - VolumesFrom string `json:"VolumesFrom,omitempty"` - WorkingDir string `json:"WorkingDir,omitempty"` - Entrypoint []string `json:"Entrypoint,omitempty"` - NetworkDisabled bool `json:"NetworkDisabled,omitempty"` - SecurityOpts []string `json:"SecurityOpts,omitempty"` - OnBuild []string `json:"OnBuild,omitempty"` - // This field is not supported in pre012 and will always be empty. - Labels map[string]string `json:"Labels,omitempty"` -} - -// ImagePre012 serves the same purpose as the Image type except that it is for -// earlier versions of the Docker API (pre-012 to be specific) -// Exists only for legacy conversion, copy of type from fsouza/go-dockerclient -type ImagePre012 struct { - ID string `json:"id"` - Parent string `json:"parent,omitempty"` - Comment string `json:"comment,omitempty"` - Created time.Time `json:"created"` - Container string `json:"container,omitempty"` - ContainerConfig Config `json:"container_config,omitempty"` - DockerVersion string `json:"docker_version,omitempty"` - Author string `json:"author,omitempty"` - Config *Config `json:"config,omitempty"` - Architecture string `json:"architecture,omitempty"` - Size int64 `json:"size,omitempty"` -} - -// Config is the list of configuration options used when creating a container. -// Config does not contain the options that are specific to starting a container on a -// given host. Those are contained in HostConfig -// Exists only for legacy conversion, copy of type from fsouza/go-dockerclient -type Config struct { - Hostname string `json:"Hostname,omitempty" yaml:"Hostname,omitempty"` - Domainname string `json:"Domainname,omitempty" yaml:"Domainname,omitempty"` - User string `json:"User,omitempty" yaml:"User,omitempty"` - Memory int64 `json:"Memory,omitempty" yaml:"Memory,omitempty"` - MemorySwap int64 `json:"MemorySwap,omitempty" yaml:"MemorySwap,omitempty"` - MemoryReservation int64 `json:"MemoryReservation,omitempty" yaml:"MemoryReservation,omitempty"` - KernelMemory int64 `json:"KernelMemory,omitempty" yaml:"KernelMemory,omitempty"` - PidsLimit int64 `json:"PidsLimit,omitempty" yaml:"PidsLimit,omitempty"` - CPUShares int64 `json:"CpuShares,omitempty" yaml:"CpuShares,omitempty"` - CPUSet string `json:"Cpuset,omitempty" yaml:"Cpuset,omitempty"` - AttachStdin bool `json:"AttachStdin,omitempty" yaml:"AttachStdin,omitempty"` - AttachStdout bool `json:"AttachStdout,omitempty" yaml:"AttachStdout,omitempty"` - AttachStderr bool `json:"AttachStderr,omitempty" yaml:"AttachStderr,omitempty"` - PortSpecs []string `json:"PortSpecs,omitempty" yaml:"PortSpecs,omitempty"` - ExposedPorts map[Port]struct{} `json:"ExposedPorts,omitempty" yaml:"ExposedPorts,omitempty"` - StopSignal string `json:"StopSignal,omitempty" yaml:"StopSignal,omitempty"` - Tty bool `json:"Tty,omitempty" yaml:"Tty,omitempty"` - OpenStdin bool `json:"OpenStdin,omitempty" yaml:"OpenStdin,omitempty"` - StdinOnce bool `json:"StdinOnce,omitempty" yaml:"StdinOnce,omitempty"` - Env []string `json:"Env,omitempty" yaml:"Env,omitempty"` - Cmd []string `json:"Cmd" yaml:"Cmd"` - DNS []string `json:"Dns,omitempty" yaml:"Dns,omitempty"` // For Docker API v1.9 and below only - Image string `json:"Image,omitempty" yaml:"Image,omitempty"` - Volumes map[string]struct{} `json:"Volumes,omitempty" yaml:"Volumes,omitempty"` - VolumeDriver string `json:"VolumeDriver,omitempty" yaml:"VolumeDriver,omitempty"` - VolumesFrom string `json:"VolumesFrom,omitempty" yaml:"VolumesFrom,omitempty"` - WorkingDir string `json:"WorkingDir,omitempty" yaml:"WorkingDir,omitempty"` - MacAddress string `json:"MacAddress,omitempty" yaml:"MacAddress,omitempty"` - Entrypoint []string `json:"Entrypoint" yaml:"Entrypoint"` - NetworkDisabled bool `json:"NetworkDisabled,omitempty" yaml:"NetworkDisabled,omitempty"` - SecurityOpts []string `json:"SecurityOpts,omitempty" yaml:"SecurityOpts,omitempty"` - OnBuild []string `json:"OnBuild,omitempty" yaml:"OnBuild,omitempty"` - Mounts []Mount `json:"Mounts,omitempty" yaml:"Mounts,omitempty"` - Labels map[string]string `json:"Labels,omitempty" yaml:"Labels,omitempty"` -} - -// Mount represents a mount point in the container. -// -// It has been added in the version 1.20 of the Docker API, available since -// Docker 1.8. -// Exists only for legacy conversion, copy of type from fsouza/go-dockerclient -type Mount struct { - Name string - Source string - Destination string - Driver string - Mode string - RW bool -} - -// Port represents the port number and the protocol, in the form -// /. For example: 80/tcp. -// Exists only for legacy conversion, copy of type from fsouza/go-dockerclient -type Port string diff --git a/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.deepcopy.go deleted file mode 100644 index c3c9b29d2..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.deepcopy.go +++ /dev/null @@ -1,217 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package dockerpre012 - -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 *Config) DeepCopyInto(out *Config) { - *out = *in - if in.PortSpecs != nil { - in, out := &in.PortSpecs, &out.PortSpecs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExposedPorts != nil { - in, out := &in.ExposedPorts, &out.ExposedPorts - *out = make(map[Port]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Cmd != nil { - in, out := &in.Cmd, &out.Cmd - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNS != nil { - in, out := &in.DNS, &out.DNS - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Entrypoint != nil { - in, out := &in.Entrypoint, &out.Entrypoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityOpts != nil { - in, out := &in.SecurityOpts, &out.SecurityOpts - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OnBuild != nil { - in, out := &in.OnBuild, &out.OnBuild - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Mounts != nil { - in, out := &in.Mounts, &out.Mounts - *out = make([]Mount, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. -func (in *Config) DeepCopy() *Config { - if in == nil { - return nil - } - out := new(Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerConfig) DeepCopyInto(out *DockerConfig) { - *out = *in - if in.PortSpecs != nil { - in, out := &in.PortSpecs, &out.PortSpecs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExposedPorts != nil { - in, out := &in.ExposedPorts, &out.ExposedPorts - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Cmd != nil { - in, out := &in.Cmd, &out.Cmd - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DNS != nil { - in, out := &in.DNS, &out.DNS - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make(map[string]struct{}, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Entrypoint != nil { - in, out := &in.Entrypoint, &out.Entrypoint - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SecurityOpts != nil { - in, out := &in.SecurityOpts, &out.SecurityOpts - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OnBuild != nil { - in, out := &in.OnBuild, &out.OnBuild - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfig. -func (in *DockerConfig) DeepCopy() *DockerConfig { - if in == nil { - return nil - } - out := new(DockerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerImage) DeepCopyInto(out *DockerImage) { - *out = *in - out.TypeMeta = in.TypeMeta - in.Created.DeepCopyInto(&out.Created) - in.ContainerConfig.DeepCopyInto(&out.ContainerConfig) - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(DockerConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerImage. -func (in *DockerImage) DeepCopy() *DockerImage { - if in == nil { - return nil - } - out := new(DockerImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DockerImage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePre012. -func (in *ImagePre012) DeepCopy() *ImagePre012 { - if in == nil { - return nil - } - out := new(ImagePre012) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Mount) DeepCopyInto(out *Mount) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Mount. -func (in *Mount) DeepCopy() *Mount { - if in == nil { - return nil - } - out := new(Mount) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 04900e809..000000000 --- a/vendor/github.com/openshift/api/image/dockerpre012/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,55 +0,0 @@ -package dockerpre012 - -// 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_Config = map[string]string{ - "": "Config is the list of configuration options used when creating a container. Config does not contain the options that are specific to starting a container on a given host. Those are contained in HostConfig Exists only for legacy conversion, copy of type from fsouza/go-dockerclient", -} - -func (Config) SwaggerDoc() map[string]string { - return map_Config -} - -var map_DockerConfig = map[string]string{ - "": "DockerConfig is the list of configuration options used when creating a container.", - "Labels": "This field is not supported in pre012 and will always be empty.", -} - -func (DockerConfig) SwaggerDoc() map[string]string { - return map_DockerConfig -} - -var map_DockerImage = map[string]string{ - "": "DockerImage is for earlier versions of the Docker API (pre-012 to be specific). It is also the version of metadata that the container image registry uses to persist metadata.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (DockerImage) SwaggerDoc() map[string]string { - return map_DockerImage -} - -var map_ImagePre012 = map[string]string{ - "": "ImagePre012 serves the same purpose as the Image type except that it is for earlier versions of the Docker API (pre-012 to be specific) Exists only for legacy conversion, copy of type from fsouza/go-dockerclient", -} - -func (ImagePre012) SwaggerDoc() map[string]string { - return map_ImagePre012 -} - -var map_Mount = map[string]string{ - "": "Mount represents a mount point in the container.\n\nIt has been added in the version 1.20 of the Docker API, available since Docker 1.8. Exists only for legacy conversion, copy of type from fsouza/go-dockerclient", -} - -func (Mount) SwaggerDoc() map[string]string { - return map_Mount -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/image/install.go b/vendor/github.com/openshift/api/image/install.go deleted file mode 100644 index 5b146faa7..000000000 --- a/vendor/github.com/openshift/api/image/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package image - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - imagev1 "github.com/openshift/api/image/v1" -) - -const ( - GroupName = "image.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(imagev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/image/v1/consts.go b/vendor/github.com/openshift/api/image/v1/consts.go deleted file mode 100644 index 11f57a44a..000000000 --- a/vendor/github.com/openshift/api/image/v1/consts.go +++ /dev/null @@ -1,69 +0,0 @@ -package v1 - -import corev1 "k8s.io/api/core/v1" - -const ( - // ManagedByOpenShiftAnnotation indicates that an image is managed by OpenShift's registry. - ManagedByOpenShiftAnnotation = "openshift.io/image.managed" - - // DockerImageRepositoryCheckAnnotation indicates that OpenShift has - // attempted to import tag and image information from an external Docker - // image repository. - DockerImageRepositoryCheckAnnotation = "openshift.io/image.dockerRepositoryCheck" - - // InsecureRepositoryAnnotation may be set true on an image stream to allow insecure access to pull content. - InsecureRepositoryAnnotation = "openshift.io/image.insecureRepository" - - // ExcludeImageSecretAnnotation indicates that a secret should not be returned by imagestream/secrets. - ExcludeImageSecretAnnotation = "openshift.io/image.excludeSecret" - - // DockerImageLayersOrderAnnotation describes layers order in the docker image. - DockerImageLayersOrderAnnotation = "image.openshift.io/dockerLayersOrder" - - // DockerImageLayersOrderAscending indicates that image layers are sorted in - // the order of their addition (from oldest to latest) - DockerImageLayersOrderAscending = "ascending" - - // DockerImageLayersOrderDescending indicates that layers are sorted in - // reversed order of their addition (from newest to oldest). - DockerImageLayersOrderDescending = "descending" - - // ImporterPreferArchAnnotation represents an architecture that should be - // selected if an image uses a manifest list and it should be - // downconverted. - ImporterPreferArchAnnotation = "importer.image.openshift.io/prefer-arch" - - // ImporterPreferOSAnnotation represents an operation system that should - // be selected if an image uses a manifest list and it should be - // downconverted. - ImporterPreferOSAnnotation = "importer.image.openshift.io/prefer-os" - - // ImageManifestBlobStoredAnnotation indicates that manifest and config blobs of image are stored in on - // storage of integrated Docker registry. - ImageManifestBlobStoredAnnotation = "image.openshift.io/manifestBlobStored" - - // DefaultImageTag is used when an image tag is needed and the configuration does not specify a tag to use. - DefaultImageTag = "latest" - - // ResourceImageStreams represents a number of image streams in a project. - ResourceImageStreams corev1.ResourceName = "openshift.io/imagestreams" - - // ResourceImageStreamImages represents a number of unique references to images in all image stream - // statuses of a project. - ResourceImageStreamImages corev1.ResourceName = "openshift.io/images" - - // ResourceImageStreamTags represents a number of unique references to images in all image stream specs - // of a project. - ResourceImageStreamTags corev1.ResourceName = "openshift.io/image-tags" - - // Limit that applies to images. Used with a max["storage"] LimitRangeItem to set - // the maximum size of an image. - LimitTypeImage corev1.LimitType = "openshift.io/Image" - - // Limit that applies to image streams. Used with a max[resource] LimitRangeItem to set the maximum number - // of resource. Where the resource is one of "openshift.io/images" and "openshift.io/image-tags". - LimitTypeImageStream corev1.LimitType = "openshift.io/ImageStream" - - // The supported type of image signature. - ImageSignatureTypeAtomicImageV1 string = "AtomicImageV1" -) diff --git a/vendor/github.com/openshift/api/image/v1/doc.go b/vendor/github.com/openshift/api/image/v1/doc.go deleted file mode 100644 index c55344ebc..000000000 --- a/vendor/github.com/openshift/api/image/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/image/apis/image -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.image.v1 - -// +groupName=image.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/image/v1/generated.pb.go b/vendor/github.com/openshift/api/image/v1/generated.pb.go deleted file mode 100644 index c10c09b3c..000000000 --- a/vendor/github.com/openshift/api/image/v1/generated.pb.go +++ /dev/null @@ -1,10349 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/image/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v11 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *DockerImageReference) Reset() { *m = DockerImageReference{} } - -func (m *Image) Reset() { *m = Image{} } - -func (m *ImageBlobReferences) Reset() { *m = ImageBlobReferences{} } - -func (m *ImageImportSpec) Reset() { *m = ImageImportSpec{} } - -func (m *ImageImportStatus) Reset() { *m = ImageImportStatus{} } - -func (m *ImageLayer) Reset() { *m = ImageLayer{} } - -func (m *ImageLayerData) Reset() { *m = ImageLayerData{} } - -func (m *ImageList) Reset() { *m = ImageList{} } - -func (m *ImageLookupPolicy) Reset() { *m = ImageLookupPolicy{} } - -func (m *ImageManifest) Reset() { *m = ImageManifest{} } - -func (m *ImageSignature) Reset() { *m = ImageSignature{} } - -func (m *ImageStream) Reset() { *m = ImageStream{} } - -func (m *ImageStreamImage) Reset() { *m = ImageStreamImage{} } - -func (m *ImageStreamImport) Reset() { *m = ImageStreamImport{} } - -func (m *ImageStreamImportSpec) Reset() { *m = ImageStreamImportSpec{} } - -func (m *ImageStreamImportStatus) Reset() { *m = ImageStreamImportStatus{} } - -func (m *ImageStreamLayers) Reset() { *m = ImageStreamLayers{} } - -func (m *ImageStreamList) Reset() { *m = ImageStreamList{} } - -func (m *ImageStreamMapping) Reset() { *m = ImageStreamMapping{} } - -func (m *ImageStreamSpec) Reset() { *m = ImageStreamSpec{} } - -func (m *ImageStreamStatus) Reset() { *m = ImageStreamStatus{} } - -func (m *ImageStreamTag) Reset() { *m = ImageStreamTag{} } - -func (m *ImageStreamTagList) Reset() { *m = ImageStreamTagList{} } - -func (m *ImageTag) Reset() { *m = ImageTag{} } - -func (m *ImageTagList) Reset() { *m = ImageTagList{} } - -func (m *NamedTagEventList) Reset() { *m = NamedTagEventList{} } - -func (m *RepositoryImportSpec) Reset() { *m = RepositoryImportSpec{} } - -func (m *RepositoryImportStatus) Reset() { *m = RepositoryImportStatus{} } - -func (m *SecretList) Reset() { *m = SecretList{} } - -func (m *SignatureCondition) Reset() { *m = SignatureCondition{} } - -func (m *SignatureGenericEntity) Reset() { *m = SignatureGenericEntity{} } - -func (m *SignatureIssuer) Reset() { *m = SignatureIssuer{} } - -func (m *SignatureSubject) Reset() { *m = SignatureSubject{} } - -func (m *TagEvent) Reset() { *m = TagEvent{} } - -func (m *TagEventCondition) Reset() { *m = TagEventCondition{} } - -func (m *TagImportPolicy) Reset() { *m = TagImportPolicy{} } - -func (m *TagReference) Reset() { *m = TagReference{} } - -func (m *TagReferencePolicy) Reset() { *m = TagReferencePolicy{} } - -func (m *DockerImageReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *DockerImageReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *DockerImageReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0x2a - i -= len(m.Tag) - copy(dAtA[i:], m.Tag) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Tag))) - i-- - dAtA[i] = 0x22 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x12 - i -= len(m.Registry) - copy(dAtA[i:], m.Registry) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Registry))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Image) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Image) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Image) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.DockerImageManifests) > 0 { - for iNdEx := len(m.DockerImageManifests) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DockerImageManifests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - i -= len(m.DockerImageConfig) - copy(dAtA[i:], m.DockerImageConfig) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageConfig))) - i-- - dAtA[i] = 0x52 - i -= len(m.DockerImageManifestMediaType) - copy(dAtA[i:], m.DockerImageManifestMediaType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageManifestMediaType))) - i-- - dAtA[i] = 0x4a - if len(m.DockerImageSignatures) > 0 { - for iNdEx := len(m.DockerImageSignatures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DockerImageSignatures[iNdEx]) - copy(dAtA[i:], m.DockerImageSignatures[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageSignatures[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.Signatures) > 0 { - for iNdEx := len(m.Signatures) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Signatures[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.DockerImageLayers) > 0 { - for iNdEx := len(m.DockerImageLayers) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.DockerImageLayers[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.DockerImageManifest) - copy(dAtA[i:], m.DockerImageManifest) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageManifest))) - i-- - dAtA[i] = 0x2a - i -= len(m.DockerImageMetadataVersion) - copy(dAtA[i:], m.DockerImageMetadataVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageMetadataVersion))) - i-- - dAtA[i] = 0x22 - { - size, err := m.DockerImageMetadata.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.DockerImageReference) - copy(dAtA[i:], m.DockerImageReference) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageReference))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageBlobReferences) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageBlobReferences) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageBlobReferences) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Manifests) > 0 { - for iNdEx := len(m.Manifests) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Manifests[iNdEx]) - copy(dAtA[i:], m.Manifests[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Manifests[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i-- - if m.ImageMissing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - if m.Config != nil { - i -= len(*m.Config) - copy(dAtA[i:], *m.Config) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Config))) - i-- - dAtA[i] = 0x12 - } - if len(m.Layers) > 0 { - for iNdEx := len(m.Layers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Layers[iNdEx]) - copy(dAtA[i:], m.Layers[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Layers[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ImageImportSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageImportSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageImportSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ReferencePolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - i-- - if m.IncludeManifest { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - { - size, err := m.ImportPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.To != nil { - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageImportStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageImportStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageImportStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Manifests) > 0 { - for iNdEx := len(m.Manifests) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Manifests[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - i -= len(m.Tag) - copy(dAtA[i:], m.Tag) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Tag))) - i-- - dAtA[i] = 0x1a - if m.Image != nil { - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageLayer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageLayer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageLayer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.MediaType) - copy(dAtA[i:], m.MediaType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MediaType))) - i-- - dAtA[i] = 0x1a - i = encodeVarintGenerated(dAtA, i, uint64(m.LayerSize)) - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageLayerData) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageLayerData) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageLayerData) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.MediaType) - copy(dAtA[i:], m.MediaType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MediaType))) - i-- - dAtA[i] = 0x12 - if m.LayerSize != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.LayerSize)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *ImageList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageLookupPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageLookupPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageLookupPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.Local { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - return len(dAtA) - i, nil -} - -func (m *ImageManifest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageManifest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageManifest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Variant) - copy(dAtA[i:], m.Variant) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Variant))) - i-- - dAtA[i] = 0x32 - i -= len(m.OS) - copy(dAtA[i:], m.OS) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.OS))) - i-- - dAtA[i] = 0x2a - i -= len(m.Architecture) - copy(dAtA[i:], m.Architecture) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architecture))) - i-- - dAtA[i] = 0x22 - i = encodeVarintGenerated(dAtA, i, uint64(m.ManifestSize)) - i-- - dAtA[i] = 0x18 - i -= len(m.MediaType) - copy(dAtA[i:], m.MediaType) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MediaType))) - i-- - dAtA[i] = 0x12 - i -= len(m.Digest) - copy(dAtA[i:], m.Digest) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Digest))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageSignature) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageSignature) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageSignature) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IssuedTo != nil { - { - size, err := m.IssuedTo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if m.IssuedBy != nil { - { - size, err := m.IssuedBy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - if m.Created != nil { - { - size, err := m.Created.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - if len(m.SignedClaims) > 0 { - keysForSignedClaims := make([]string, 0, len(m.SignedClaims)) - for k := range m.SignedClaims { - keysForSignedClaims = append(keysForSignedClaims, string(k)) - } - sort.Strings(keysForSignedClaims) - for iNdEx := len(keysForSignedClaims) - 1; iNdEx >= 0; iNdEx-- { - v := m.SignedClaims[string(keysForSignedClaims[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForSignedClaims[iNdEx]) - copy(dAtA[i:], keysForSignedClaims[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForSignedClaims[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.ImageIdentity) - copy(dAtA[i:], m.ImageIdentity) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImageIdentity))) - i-- - dAtA[i] = 0x2a - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if m.Content != nil { - i -= len(m.Content) - copy(dAtA[i:], m.Content) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Content))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStream) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStream) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStream) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamImage) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamImage) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamImage) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamImport) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamImport) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamImport) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamImportSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamImportSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamImportSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Images) > 0 { - for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Repository != nil { - { - size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i-- - if m.Import { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *ImageStreamImportStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamImportStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamImportStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Images) > 0 { - for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if m.Repository != nil { - { - size, err := m.Repository.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Import != nil { - { - size, err := m.Import.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ImageStreamLayers) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamLayers) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamLayers) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Images) > 0 { - keysForImages := make([]string, 0, len(m.Images)) - for k := range m.Images { - keysForImages = append(keysForImages, string(k)) - } - sort.Strings(keysForImages) - for iNdEx := len(keysForImages) - 1; iNdEx >= 0; iNdEx-- { - v := m.Images[string(keysForImages[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForImages[iNdEx]) - copy(dAtA[i:], keysForImages[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForImages[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Blobs) > 0 { - keysForBlobs := make([]string, 0, len(m.Blobs)) - for k := range m.Blobs { - keysForBlobs = append(keysForBlobs, string(k)) - } - sort.Strings(keysForBlobs) - for iNdEx := len(keysForBlobs) - 1; iNdEx >= 0; iNdEx-- { - v := m.Blobs[string(keysForBlobs[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForBlobs[iNdEx]) - copy(dAtA[i:], keysForBlobs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForBlobs[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamMapping) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamMapping) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamMapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Tag) - copy(dAtA[i:], m.Tag) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Tag))) - i-- - dAtA[i] = 0x1a - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LookupPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.DockerImageRepository) - copy(dAtA[i:], m.DockerImageRepository) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageRepository))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.PublicDockerImageRepository) - copy(dAtA[i:], m.PublicDockerImageRepository) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PublicDockerImageRepository))) - i-- - dAtA[i] = 0x1a - if len(m.Tags) > 0 { - for iNdEx := len(m.Tags) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Tags[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.DockerImageRepository) - copy(dAtA[i:], m.DockerImageRepository) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageRepository))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamTag) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamTag) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamTag) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.LookupPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) - i-- - dAtA[i] = 0x18 - if m.Tag != nil { - { - size, err := m.Tag.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageStreamTagList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageStreamTagList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageStreamTagList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageTag) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageTag) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageTag) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Image != nil { - { - size, err := m.Image.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Spec != nil { - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ImageTagList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ImageTagList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ImageTagList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NamedTagEventList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NamedTagEventList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NamedTagEventList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Tag) - copy(dAtA[i:], m.Tag) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Tag))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RepositoryImportSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepositoryImportSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RepositoryImportSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ReferencePolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - i-- - if m.IncludeManifest { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - { - size, err := m.ImportPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RepositoryImportStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RepositoryImportStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RepositoryImportStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AdditionalTags) > 0 { - for iNdEx := len(m.AdditionalTags) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AdditionalTags[iNdEx]) - copy(dAtA[i:], m.AdditionalTags[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdditionalTags[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.Images) > 0 { - for iNdEx := len(m.Images) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Images[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecretList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecretList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecretList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SignatureCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignatureCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignatureCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x32 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x2a - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.LastProbeTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SignatureGenericEntity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignatureGenericEntity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignatureGenericEntity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.CommonName) - copy(dAtA[i:], m.CommonName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CommonName))) - i-- - dAtA[i] = 0x12 - i -= len(m.Organization) - copy(dAtA[i:], m.Organization) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Organization))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SignatureIssuer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignatureIssuer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignatureIssuer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.SignatureGenericEntity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SignatureSubject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SignatureSubject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SignatureSubject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.PublicKeyID) - copy(dAtA[i:], m.PublicKeyID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PublicKeyID))) - i-- - dAtA[i] = 0x12 - { - size, err := m.SignatureGenericEntity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TagEvent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagEvent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagEvent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) - i-- - dAtA[i] = 0x20 - i -= len(m.Image) - copy(dAtA[i:], m.Image) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Image))) - i-- - dAtA[i] = 0x1a - i -= len(m.DockerImageReference) - copy(dAtA[i:], m.DockerImageReference) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DockerImageReference))) - i-- - dAtA[i] = 0x12 - { - size, err := m.Created.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TagEventCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagEventCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagEventCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.Generation)) - i-- - dAtA[i] = 0x30 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TagImportPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagImportPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagImportPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.ImportMode) - copy(dAtA[i:], m.ImportMode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ImportMode))) - i-- - dAtA[i] = 0x1a - i-- - if m.Scheduled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i-- - if m.Insecure { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *TagReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ReferencePolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - { - size, err := m.ImportPolicy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - if m.Generation != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Generation)) - i-- - dAtA[i] = 0x28 - } - i-- - if m.Reference { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - if m.From != nil { - { - size, err := m.From.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Annotations) > 0 { - keysForAnnotations := make([]string, 0, len(m.Annotations)) - for k := range m.Annotations { - keysForAnnotations = append(keysForAnnotations, string(k)) - } - sort.Strings(keysForAnnotations) - for iNdEx := len(keysForAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.Annotations[string(keysForAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAnnotations[iNdEx]) - copy(dAtA[i:], keysForAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TagReferencePolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TagReferencePolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TagReferencePolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *DockerImageReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Registry) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Tag) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ID) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Image) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DockerImageReference) - n += 1 + l + sovGenerated(uint64(l)) - l = m.DockerImageMetadata.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DockerImageMetadataVersion) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DockerImageManifest) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.DockerImageLayers) > 0 { - for _, e := range m.DockerImageLayers { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Signatures) > 0 { - for _, e := range m.Signatures { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.DockerImageSignatures) > 0 { - for _, b := range m.DockerImageSignatures { - l = len(b) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.DockerImageManifestMediaType) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DockerImageConfig) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.DockerImageManifests) > 0 { - for _, e := range m.DockerImageManifests { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageBlobReferences) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Layers) > 0 { - for _, s := range m.Layers { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Config != nil { - l = len(*m.Config) - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if len(m.Manifests) > 0 { - for _, s := range m.Manifests { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageImportSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.To != nil { - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.ImportPolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = m.ReferencePolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageImportStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Image != nil { - l = m.Image.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Tag) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Manifests) > 0 { - for _, e := range m.Manifests { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageLayer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.LayerSize)) - l = len(m.MediaType) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageLayerData) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LayerSize != nil { - n += 1 + sovGenerated(uint64(*m.LayerSize)) - } - l = len(m.MediaType) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageLookupPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - return n -} - -func (m *ImageManifest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Digest) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.MediaType) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ManifestSize)) - l = len(m.Architecture) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.OS) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Variant) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageSignature) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Content != nil { - l = len(m.Content) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.ImageIdentity) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.SignedClaims) > 0 { - for k, v := range m.SignedClaims { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.Created != nil { - l = m.Created.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.IssuedBy != nil { - l = m.IssuedBy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.IssuedTo != nil { - l = m.IssuedTo.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ImageStream) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamImage) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Image.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamImport) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamImportSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - if m.Repository != nil { - l = m.Repository.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Images) > 0 { - for _, e := range m.Images { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageStreamImportStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Import != nil { - l = m.Import.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Repository != nil { - l = m.Repository.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Images) > 0 { - for _, e := range m.Images { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageStreamLayers) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Blobs) > 0 { - for k, v := range m.Blobs { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Images) > 0 { - for k, v := range m.Images { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *ImageStreamList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageStreamMapping) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Image.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Tag) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DockerImageRepository) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Tags) > 0 { - for _, e := range m.Tags { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.LookupPolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DockerImageRepository) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Tags) > 0 { - for _, e := range m.Tags { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.PublicDockerImageRepository) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamTag) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Tag != nil { - l = m.Tag.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.Generation)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.Image.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LookupPolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ImageStreamTagList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ImageTag) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Spec != nil { - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Image != nil { - l = m.Image.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ImageTagList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *NamedTagEventList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Tag) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RepositoryImportSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ImportPolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - l = m.ReferencePolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RepositoryImportStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Images) > 0 { - for _, e := range m.Images { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.AdditionalTags) > 0 { - for _, s := range m.AdditionalTags { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SecretList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SignatureCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastProbeTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SignatureGenericEntity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Organization) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CommonName) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SignatureIssuer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.SignatureGenericEntity.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SignatureSubject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.SignatureGenericEntity.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.PublicKeyID) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TagEvent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Created.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DockerImageReference) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Image) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Generation)) - return n -} - -func (m *TagEventCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Generation)) - return n -} - -func (m *TagImportPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - n += 2 - l = len(m.ImportMode) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TagReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Annotations) > 0 { - for k, v := range m.Annotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.From != nil { - l = m.From.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - if m.Generation != nil { - n += 1 + sovGenerated(uint64(*m.Generation)) - } - l = m.ImportPolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ReferencePolicy.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TagReferencePolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *DockerImageReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DockerImageReference{`, - `Registry:` + fmt.Sprintf("%v", this.Registry) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Tag:` + fmt.Sprintf("%v", this.Tag) + `,`, - `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `}`, - }, "") - return s -} -func (this *Image) String() string { - if this == nil { - return "nil" - } - repeatedStringForDockerImageLayers := "[]ImageLayer{" - for _, f := range this.DockerImageLayers { - repeatedStringForDockerImageLayers += strings.Replace(strings.Replace(f.String(), "ImageLayer", "ImageLayer", 1), `&`, ``, 1) + "," - } - repeatedStringForDockerImageLayers += "}" - repeatedStringForSignatures := "[]ImageSignature{" - for _, f := range this.Signatures { - repeatedStringForSignatures += strings.Replace(strings.Replace(f.String(), "ImageSignature", "ImageSignature", 1), `&`, ``, 1) + "," - } - repeatedStringForSignatures += "}" - repeatedStringForDockerImageManifests := "[]ImageManifest{" - for _, f := range this.DockerImageManifests { - repeatedStringForDockerImageManifests += strings.Replace(strings.Replace(f.String(), "ImageManifest", "ImageManifest", 1), `&`, ``, 1) + "," - } - repeatedStringForDockerImageManifests += "}" - s := strings.Join([]string{`&Image{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DockerImageReference:` + fmt.Sprintf("%v", this.DockerImageReference) + `,`, - `DockerImageMetadata:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DockerImageMetadata), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `DockerImageMetadataVersion:` + fmt.Sprintf("%v", this.DockerImageMetadataVersion) + `,`, - `DockerImageManifest:` + fmt.Sprintf("%v", this.DockerImageManifest) + `,`, - `DockerImageLayers:` + repeatedStringForDockerImageLayers + `,`, - `Signatures:` + repeatedStringForSignatures + `,`, - `DockerImageSignatures:` + fmt.Sprintf("%v", this.DockerImageSignatures) + `,`, - `DockerImageManifestMediaType:` + fmt.Sprintf("%v", this.DockerImageManifestMediaType) + `,`, - `DockerImageConfig:` + fmt.Sprintf("%v", this.DockerImageConfig) + `,`, - `DockerImageManifests:` + repeatedStringForDockerImageManifests + `,`, - `}`, - }, "") - return s -} -func (this *ImageBlobReferences) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageBlobReferences{`, - `Layers:` + fmt.Sprintf("%v", this.Layers) + `,`, - `Config:` + valueToStringGenerated(this.Config) + `,`, - `ImageMissing:` + fmt.Sprintf("%v", this.ImageMissing) + `,`, - `Manifests:` + fmt.Sprintf("%v", this.Manifests) + `,`, - `}`, - }, "") - return s -} -func (this *ImageImportSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageImportSpec{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `To:` + strings.Replace(fmt.Sprintf("%v", this.To), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `ImportPolicy:` + strings.Replace(strings.Replace(this.ImportPolicy.String(), "TagImportPolicy", "TagImportPolicy", 1), `&`, ``, 1) + `,`, - `IncludeManifest:` + fmt.Sprintf("%v", this.IncludeManifest) + `,`, - `ReferencePolicy:` + strings.Replace(strings.Replace(this.ReferencePolicy.String(), "TagReferencePolicy", "TagReferencePolicy", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageImportStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForManifests := "[]Image{" - for _, f := range this.Manifests { - repeatedStringForManifests += strings.Replace(strings.Replace(f.String(), "Image", "Image", 1), `&`, ``, 1) + "," - } - repeatedStringForManifests += "}" - s := strings.Join([]string{`&ImageImportStatus{`, - `Status:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "v1.Status", 1), `&`, ``, 1) + `,`, - `Image:` + strings.Replace(this.Image.String(), "Image", "Image", 1) + `,`, - `Tag:` + fmt.Sprintf("%v", this.Tag) + `,`, - `Manifests:` + repeatedStringForManifests + `,`, - `}`, - }, "") - return s -} -func (this *ImageLayer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageLayer{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `LayerSize:` + fmt.Sprintf("%v", this.LayerSize) + `,`, - `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, - `}`, - }, "") - return s -} -func (this *ImageLayerData) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageLayerData{`, - `LayerSize:` + valueToStringGenerated(this.LayerSize) + `,`, - `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, - `}`, - }, "") - return s -} -func (this *ImageList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Image{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Image", "Image", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ImageList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ImageLookupPolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageLookupPolicy{`, - `Local:` + fmt.Sprintf("%v", this.Local) + `,`, - `}`, - }, "") - return s -} -func (this *ImageManifest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageManifest{`, - `Digest:` + fmt.Sprintf("%v", this.Digest) + `,`, - `MediaType:` + fmt.Sprintf("%v", this.MediaType) + `,`, - `ManifestSize:` + fmt.Sprintf("%v", this.ManifestSize) + `,`, - `Architecture:` + fmt.Sprintf("%v", this.Architecture) + `,`, - `OS:` + fmt.Sprintf("%v", this.OS) + `,`, - `Variant:` + fmt.Sprintf("%v", this.Variant) + `,`, - `}`, - }, "") - return s -} -func (this *ImageSignature) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]SignatureCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "SignatureCondition", "SignatureCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - keysForSignedClaims := make([]string, 0, len(this.SignedClaims)) - for k := range this.SignedClaims { - keysForSignedClaims = append(keysForSignedClaims, k) - } - sort.Strings(keysForSignedClaims) - mapStringForSignedClaims := "map[string]string{" - for _, k := range keysForSignedClaims { - mapStringForSignedClaims += fmt.Sprintf("%v: %v,", k, this.SignedClaims[k]) - } - mapStringForSignedClaims += "}" - s := strings.Join([]string{`&ImageSignature{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Content:` + valueToStringGenerated(this.Content) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `ImageIdentity:` + fmt.Sprintf("%v", this.ImageIdentity) + `,`, - `SignedClaims:` + mapStringForSignedClaims + `,`, - `Created:` + strings.Replace(fmt.Sprintf("%v", this.Created), "Time", "v1.Time", 1) + `,`, - `IssuedBy:` + strings.Replace(this.IssuedBy.String(), "SignatureIssuer", "SignatureIssuer", 1) + `,`, - `IssuedTo:` + strings.Replace(this.IssuedTo.String(), "SignatureSubject", "SignatureSubject", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStream) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageStream{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageStreamSpec", "ImageStreamSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageStreamStatus", "ImageStreamStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamImage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageStreamImage{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamImport) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageStreamImport{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ImageStreamImportSpec", "ImageStreamImportSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ImageStreamImportStatus", "ImageStreamImportStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamImportSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForImages := "[]ImageImportSpec{" - for _, f := range this.Images { - repeatedStringForImages += strings.Replace(strings.Replace(f.String(), "ImageImportSpec", "ImageImportSpec", 1), `&`, ``, 1) + "," - } - repeatedStringForImages += "}" - s := strings.Join([]string{`&ImageStreamImportSpec{`, - `Import:` + fmt.Sprintf("%v", this.Import) + `,`, - `Repository:` + strings.Replace(this.Repository.String(), "RepositoryImportSpec", "RepositoryImportSpec", 1) + `,`, - `Images:` + repeatedStringForImages + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamImportStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForImages := "[]ImageImportStatus{" - for _, f := range this.Images { - repeatedStringForImages += strings.Replace(strings.Replace(f.String(), "ImageImportStatus", "ImageImportStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForImages += "}" - s := strings.Join([]string{`&ImageStreamImportStatus{`, - `Import:` + strings.Replace(this.Import.String(), "ImageStream", "ImageStream", 1) + `,`, - `Repository:` + strings.Replace(this.Repository.String(), "RepositoryImportStatus", "RepositoryImportStatus", 1) + `,`, - `Images:` + repeatedStringForImages + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamLayers) String() string { - if this == nil { - return "nil" - } - keysForBlobs := make([]string, 0, len(this.Blobs)) - for k := range this.Blobs { - keysForBlobs = append(keysForBlobs, k) - } - sort.Strings(keysForBlobs) - mapStringForBlobs := "map[string]ImageLayerData{" - for _, k := range keysForBlobs { - mapStringForBlobs += fmt.Sprintf("%v: %v,", k, this.Blobs[k]) - } - mapStringForBlobs += "}" - keysForImages := make([]string, 0, len(this.Images)) - for k := range this.Images { - keysForImages = append(keysForImages, k) - } - sort.Strings(keysForImages) - mapStringForImages := "map[string]ImageBlobReferences{" - for _, k := range keysForImages { - mapStringForImages += fmt.Sprintf("%v: %v,", k, this.Images[k]) - } - mapStringForImages += "}" - s := strings.Join([]string{`&ImageStreamLayers{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Blobs:` + mapStringForBlobs + `,`, - `Images:` + mapStringForImages + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ImageStream{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ImageStream", "ImageStream", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ImageStreamList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamMapping) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageStreamMapping{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, - `Tag:` + fmt.Sprintf("%v", this.Tag) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForTags := "[]TagReference{" - for _, f := range this.Tags { - repeatedStringForTags += strings.Replace(strings.Replace(f.String(), "TagReference", "TagReference", 1), `&`, ``, 1) + "," - } - repeatedStringForTags += "}" - s := strings.Join([]string{`&ImageStreamSpec{`, - `DockerImageRepository:` + fmt.Sprintf("%v", this.DockerImageRepository) + `,`, - `Tags:` + repeatedStringForTags + `,`, - `LookupPolicy:` + strings.Replace(strings.Replace(this.LookupPolicy.String(), "ImageLookupPolicy", "ImageLookupPolicy", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForTags := "[]NamedTagEventList{" - for _, f := range this.Tags { - repeatedStringForTags += strings.Replace(strings.Replace(f.String(), "NamedTagEventList", "NamedTagEventList", 1), `&`, ``, 1) + "," - } - repeatedStringForTags += "}" - s := strings.Join([]string{`&ImageStreamStatus{`, - `DockerImageRepository:` + fmt.Sprintf("%v", this.DockerImageRepository) + `,`, - `Tags:` + repeatedStringForTags + `,`, - `PublicDockerImageRepository:` + fmt.Sprintf("%v", this.PublicDockerImageRepository) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamTag) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]TagEventCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "TagEventCondition", "TagEventCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ImageStreamTag{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Tag:` + strings.Replace(this.Tag.String(), "TagReference", "TagReference", 1) + `,`, - `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `Image:` + strings.Replace(strings.Replace(this.Image.String(), "Image", "Image", 1), `&`, ``, 1) + `,`, - `LookupPolicy:` + strings.Replace(strings.Replace(this.LookupPolicy.String(), "ImageLookupPolicy", "ImageLookupPolicy", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageStreamTagList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ImageStreamTag{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ImageStreamTag", "ImageStreamTag", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ImageStreamTagList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ImageTag) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ImageTag{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(this.Spec.String(), "TagReference", "TagReference", 1) + `,`, - `Status:` + strings.Replace(this.Status.String(), "NamedTagEventList", "NamedTagEventList", 1) + `,`, - `Image:` + strings.Replace(this.Image.String(), "Image", "Image", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ImageTagList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ImageTag{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ImageTag", "ImageTag", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ImageTagList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *NamedTagEventList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]TagEvent{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TagEvent", "TagEvent", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - repeatedStringForConditions := "[]TagEventCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "TagEventCondition", "TagEventCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&NamedTagEventList{`, - `Tag:` + fmt.Sprintf("%v", this.Tag) + `,`, - `Items:` + repeatedStringForItems + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *RepositoryImportSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RepositoryImportSpec{`, - `From:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `ImportPolicy:` + strings.Replace(strings.Replace(this.ImportPolicy.String(), "TagImportPolicy", "TagImportPolicy", 1), `&`, ``, 1) + `,`, - `IncludeManifest:` + fmt.Sprintf("%v", this.IncludeManifest) + `,`, - `ReferencePolicy:` + strings.Replace(strings.Replace(this.ReferencePolicy.String(), "TagReferencePolicy", "TagReferencePolicy", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RepositoryImportStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForImages := "[]ImageImportStatus{" - for _, f := range this.Images { - repeatedStringForImages += strings.Replace(strings.Replace(f.String(), "ImageImportStatus", "ImageImportStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForImages += "}" - s := strings.Join([]string{`&RepositoryImportStatus{`, - `Status:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Status), "Status", "v1.Status", 1), `&`, ``, 1) + `,`, - `Images:` + repeatedStringForImages + `,`, - `AdditionalTags:` + fmt.Sprintf("%v", this.AdditionalTags) + `,`, - `}`, - }, "") - return s -} -func (this *SecretList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Secret{" - for _, f := range this.Items { - repeatedStringForItems += fmt.Sprintf("%v", f) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&SecretList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *SignatureCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignatureCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastProbeTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastProbeTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *SignatureGenericEntity) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignatureGenericEntity{`, - `Organization:` + fmt.Sprintf("%v", this.Organization) + `,`, - `CommonName:` + fmt.Sprintf("%v", this.CommonName) + `,`, - `}`, - }, "") - return s -} -func (this *SignatureIssuer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignatureIssuer{`, - `SignatureGenericEntity:` + strings.Replace(strings.Replace(this.SignatureGenericEntity.String(), "SignatureGenericEntity", "SignatureGenericEntity", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *SignatureSubject) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SignatureSubject{`, - `SignatureGenericEntity:` + strings.Replace(strings.Replace(this.SignatureGenericEntity.String(), "SignatureGenericEntity", "SignatureGenericEntity", 1), `&`, ``, 1) + `,`, - `PublicKeyID:` + fmt.Sprintf("%v", this.PublicKeyID) + `,`, - `}`, - }, "") - return s -} -func (this *TagEvent) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TagEvent{`, - `Created:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Created), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `DockerImageReference:` + fmt.Sprintf("%v", this.DockerImageReference) + `,`, - `Image:` + fmt.Sprintf("%v", this.Image) + `,`, - `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `}`, - }, "") - return s -} -func (this *TagEventCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TagEventCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Generation:` + fmt.Sprintf("%v", this.Generation) + `,`, - `}`, - }, "") - return s -} -func (this *TagImportPolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TagImportPolicy{`, - `Insecure:` + fmt.Sprintf("%v", this.Insecure) + `,`, - `Scheduled:` + fmt.Sprintf("%v", this.Scheduled) + `,`, - `ImportMode:` + fmt.Sprintf("%v", this.ImportMode) + `,`, - `}`, - }, "") - return s -} -func (this *TagReference) String() string { - if this == nil { - return "nil" - } - keysForAnnotations := make([]string, 0, len(this.Annotations)) - for k := range this.Annotations { - keysForAnnotations = append(keysForAnnotations, k) - } - sort.Strings(keysForAnnotations) - mapStringForAnnotations := "map[string]string{" - for _, k := range keysForAnnotations { - mapStringForAnnotations += fmt.Sprintf("%v: %v,", k, this.Annotations[k]) - } - mapStringForAnnotations += "}" - s := strings.Join([]string{`&TagReference{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Annotations:` + mapStringForAnnotations + `,`, - `From:` + strings.Replace(fmt.Sprintf("%v", this.From), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `Reference:` + fmt.Sprintf("%v", this.Reference) + `,`, - `Generation:` + valueToStringGenerated(this.Generation) + `,`, - `ImportPolicy:` + strings.Replace(strings.Replace(this.ImportPolicy.String(), "TagImportPolicy", "TagImportPolicy", 1), `&`, ``, 1) + `,`, - `ReferencePolicy:` + strings.Replace(strings.Replace(this.ReferencePolicy.String(), "TagReferencePolicy", "TagReferencePolicy", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TagReferencePolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TagReferencePolicy{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *DockerImageReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: DockerImageReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: DockerImageReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Registry", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Registry = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Image) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Image: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageReference", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageReference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageMetadata", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.DockerImageMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageMetadataVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageMetadataVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageManifest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageManifest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageLayers", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageLayers = append(m.DockerImageLayers, ImageLayer{}) - if err := m.DockerImageLayers[len(m.DockerImageLayers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Signatures", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Signatures = append(m.Signatures, ImageSignature{}) - if err := m.Signatures[len(m.Signatures)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageSignatures", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageSignatures = append(m.DockerImageSignatures, make([]byte, postIndex-iNdEx)) - copy(m.DockerImageSignatures[len(m.DockerImageSignatures)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageManifestMediaType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageManifestMediaType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageConfig", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageConfig = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageManifests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageManifests = append(m.DockerImageManifests, ImageManifest{}) - if err := m.DockerImageManifests[len(m.DockerImageManifests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageBlobReferences) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageBlobReferences: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageBlobReferences: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Layers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Layers = append(m.Layers, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Config = &s - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageMissing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ImageMissing = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Manifests", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Manifests = append(m.Manifests, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageImportSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageImportSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.To == nil { - m.To = &v11.LocalObjectReference{} - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ImportPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeManifest = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReferencePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ReferencePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageImportStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageImportStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Image == nil { - m.Image = &Image{} - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Manifests", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Manifests = append(m.Manifests, Image{}) - if err := m.Manifests[len(m.Manifests)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageLayer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageLayer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageLayer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LayerSize", wireType) - } - m.LayerSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.LayerSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MediaType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageLayerData) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageLayerData: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageLayerData: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field LayerSize", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.LayerSize = &v - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MediaType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Image{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageLookupPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageLookupPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageLookupPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Local", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Local = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageManifest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageManifest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageManifest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Digest", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Digest = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MediaType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MediaType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ManifestSize", wireType) - } - m.ManifestSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ManifestSize |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Architecture", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Architecture = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OS", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OS = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Variant", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Variant = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageSignature) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageSignature: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageSignature: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Content", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Content = append(m.Content[:0], dAtA[iNdEx:postIndex]...) - if m.Content == nil { - m.Content = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, SignatureCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageIdentity", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageIdentity = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignedClaims", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SignedClaims == nil { - m.SignedClaims = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.SignedClaims[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Created == nil { - m.Created = &v1.Time{} - } - if err := m.Created.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IssuedBy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IssuedBy == nil { - m.IssuedBy = &SignatureIssuer{} - } - if err := m.IssuedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IssuedTo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.IssuedTo == nil { - m.IssuedTo = &SignatureSubject{} - } - if err := m.IssuedTo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStream) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStream: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStream: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamImage) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamImage: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamImage: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamImport) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamImport: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamImport: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamImportSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamImportSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Import", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Import = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Repository == nil { - m.Repository = &RepositoryImportSpec{} - } - if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Images = append(m.Images, ImageImportSpec{}) - if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamImportStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamImportStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Import", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Import == nil { - m.Import = &ImageStream{} - } - if err := m.Import.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Repository", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Repository == nil { - m.Repository = &RepositoryImportStatus{} - } - if err := m.Repository.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Images = append(m.Images, ImageImportStatus{}) - if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamLayers) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamLayers: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamLayers: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Blobs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Blobs == nil { - m.Blobs = make(map[string]ImageLayerData) - } - var mapkey string - mapvalue := &ImageLayerData{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ImageLayerData{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Blobs[mapkey] = *mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Images == nil { - m.Images = make(map[string]ImageBlobReferences) - } - var mapkey string - mapvalue := &ImageBlobReferences{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ImageBlobReferences{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Images[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ImageStream{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamMapping) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamMapping: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamMapping: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageRepository", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageRepository = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, TagReference{}) - if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LookupPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LookupPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageRepository", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageRepository = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tags", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tags = append(m.Tags, NamedTagEventList{}) - if err := m.Tags[len(m.Tags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicDockerImageRepository", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicDockerImageRepository = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamTag) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamTag: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamTag: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Tag == nil { - m.Tag = &TagReference{} - } - if err := m.Tag.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) - } - m.Generation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Generation |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, TagEventCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LookupPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LookupPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageStreamTagList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageStreamTagList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageStreamTagList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ImageStreamTag{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageTag) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageTag: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageTag: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Spec == nil { - m.Spec = &TagReference{} - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &NamedTagEventList{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Image == nil { - m.Image = &Image{} - } - if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ImageTagList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ImageTagList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ImageTagList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ImageTag{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NamedTagEventList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NamedTagEventList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NamedTagEventList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Tag", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Tag = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, TagEvent{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, TagEventCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepositoryImportSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepositoryImportSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepositoryImportSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ImportPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IncludeManifest", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IncludeManifest = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReferencePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ReferencePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RepositoryImportStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RepositoryImportStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RepositoryImportStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Images", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Images = append(m.Images, ImageImportStatus{}) - if err := m.Images[len(m.Images)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalTags = append(m.AdditionalTags, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecretList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecretList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecretList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, v11.Secret{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignatureCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignatureCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = SignatureConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastProbeTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastProbeTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignatureGenericEntity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignatureGenericEntity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureGenericEntity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Organization", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Organization = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CommonName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CommonName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignatureIssuer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignatureIssuer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureIssuer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignatureGenericEntity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SignatureGenericEntity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SignatureSubject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SignatureSubject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SignatureSubject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SignatureGenericEntity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SignatureGenericEntity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagEvent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagEvent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagEvent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Created", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Created.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DockerImageReference", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DockerImageReference = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Image = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) - } - m.Generation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Generation |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagEventCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagEventCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagEventCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = TagEventConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) - } - m.Generation = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Generation |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagImportPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagImportPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagImportPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Insecure", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Insecure = bool(v != 0) - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Scheduled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Scheduled = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportMode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImportMode = ImportModeType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Annotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Annotations == nil { - m.Annotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Annotations[mapkey] = mapvalue - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.From == nil { - m.From = &v11.ObjectReference{} - } - if err := m.From.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Reference = bool(v != 0) - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Generation", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Generation = &v - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImportPolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ImportPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ReferencePolicy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ReferencePolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TagReferencePolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TagReferencePolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TagReferencePolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = TagReferencePolicyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/image/v1/generated.proto b/vendor/github.com/openshift/api/image/v1/generated.proto deleted file mode 100644 index 74d8d66c4..000000000 --- a/vendor/github.com/openshift/api/image/v1/generated.proto +++ /dev/null @@ -1,752 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.image.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/image/v1"; - -// DockerImageReference points to a container image. -message DockerImageReference { - // Registry is the registry that contains the container image - optional string registry = 1; - - // Namespace is the namespace that contains the container image - optional string namespace = 2; - - // Name is the name of the container image - optional string name = 3; - - // Tag is which tag of the container image is being referenced - optional string tag = 4; - - // ID is the identifier for the container image - optional string iD = 5; -} - -// Image is an immutable representation of a container image and its metadata at a point in time. -// Images are named by taking a hash of their contents (metadata and content) and any change -// in format, content, or metadata results in a new name. The images resource is primarily -// for use by cluster administrators and integrations like the cluster image registry - end -// users, instead, access images via the imagestreamtags or imagestreamimages resources. While -// image metadata is stored in the API, any integration that implements the container image -// registry API must provide its own storage for the raw manifest data, image config, and -// layer contents. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Image { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // dockerImageReference is the string that can be used to pull this image. - optional string dockerImageReference = 2; - - // dockerImageMetadata contains metadata about this image - // +patchStrategy=replace - // +kubebuilder:pruning:PreserveUnknownFields - optional .k8s.io.apimachinery.pkg.runtime.RawExtension dockerImageMetadata = 3; - - // dockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" - optional string dockerImageMetadataVersion = 4; - - // dockerImageManifest is the raw JSON of the manifest - optional string dockerImageManifest = 5; - - // dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. - repeated ImageLayer dockerImageLayers = 6; - - // signatures holds all signatures of the image. - // +patchMergeKey=name - // +patchStrategy=merge - repeated ImageSignature signatures = 7; - - // dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. - repeated bytes dockerImageSignatures = 8; - - // dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. - optional string dockerImageManifestMediaType = 9; - - // dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. - // Will not be set when the image represents a manifest list. - optional string dockerImageConfig = 10; - - // dockerImageManifests holds information about sub-manifests when the image represents a manifest list. - // When this field is present, no DockerImageLayers should be specified. - repeated ImageManifest dockerImageManifests = 11; -} - -// ImageBlobReferences describes the blob references within an image. -message ImageBlobReferences { - // imageMissing is true if the image is referenced by the image stream but the image - // object has been deleted from the API by an administrator. When this field is set, - // layers and config fields may be empty and callers that depend on the image metadata - // should consider the image to be unavailable for download or viewing. - // +optional - optional bool imageMissing = 3; - - // layers is the list of blobs that compose this image, from base layer to top layer. - // All layers referenced by this array will be defined in the blobs map. Some images - // may have zero layers. - // +optional - repeated string layers = 1; - - // config, if set, is the blob that contains the image config. Some images do - // not have separate config blobs and this field will be set to nil if so. - // +optional - optional string config = 2; - - // manifests is the list of other image names that this image points - // to. For a single architecture image, it is empty. For a multi-arch - // image, it consists of the digests of single architecture images, - // such images shouldn't have layers nor config. - // +optional - repeated string manifests = 4; -} - -// ImageImportSpec describes a request to import a specific image. -message ImageImportSpec { - // from is the source of an image to import; only kind DockerImage is allowed - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used - optional .k8s.io.api.core.v1.LocalObjectReference to = 2; - - // importPolicy is the policy controlling how the image is imported - optional TagImportPolicy importPolicy = 3; - - // referencePolicy defines how other components should consume the image - optional TagReferencePolicy referencePolicy = 5; - - // includeManifest determines if the manifest for each image is returned in the response - optional bool includeManifest = 4; -} - -// ImageImportStatus describes the result of an image import. -message ImageImportStatus { - // status is the status of the image import, including errors encountered while retrieving the image - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 1; - - // image is the metadata of that image, if the image was located - optional Image image = 2; - - // tag is the tag this image was located under, if any - optional string tag = 3; - - // manifests holds sub-manifests metadata when importing a manifest list - repeated Image manifests = 4; -} - -// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. -message ImageLayer { - // name of the layer as defined by the underlying store. - optional string name = 1; - - // size of the layer in bytes as defined by the underlying store. - optional int64 size = 2; - - // mediaType of the referenced object. - optional string mediaType = 3; -} - -// ImageLayerData contains metadata about an image layer. -message ImageLayerData { - // size of the layer in bytes as defined by the underlying store. This field is - // optional if the necessary information about size is not available. - optional int64 size = 1; - - // mediaType of the referenced object. - optional string mediaType = 2; -} - -// ImageList is a list of Image objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of images - repeated Image items = 2; -} - -// ImageLookupPolicy describes how an image stream can be used to override the image references -// used by pods, builds, and other resources in a namespace. -message ImageLookupPolicy { - // local will change the docker short image references (like "mysql" or - // "php:latest") on objects in this namespace to the image ID whenever they match - // this image stream, instead of reaching out to a remote registry. The name will - // be fully qualified to an image ID if found. The tag's referencePolicy is taken - // into account on the replaced value. Only works within the current namespace. - optional bool local = 3; -} - -// ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular -// Image object. -message ImageManifest { - // digest is the unique identifier for the manifest. It refers to an Image object. - optional string digest = 1; - - // mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, - // application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json. - optional string mediaType = 2; - - // manifestSize represents the size of the raw object contents, in bytes. - optional int64 manifestSize = 3; - - // architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. - optional string architecture = 4; - - // os specifies the operating system, for example `linux`. - optional string os = 5; - - // variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU - // variant of the ARM CPU. - optional string variant = 6; -} - -// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims -// as long as the signature is trusted. Based on this information it is possible to restrict runnable images -// to those matching cluster-wide policy. -// Mandatory fields should be parsed by clients doing image verification. The others are parsed from -// signature's content by the server. They serve just an informative purpose. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageSignature { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Required: Describes a type of stored blob. - optional string type = 2; - - // Required: An opaque binary string which is an image's signature. - optional bytes content = 3; - - // conditions represent the latest available observations of a signature's current state. - // +patchMergeKey=type - // +patchStrategy=merge - repeated SignatureCondition conditions = 4; - - // A human readable string representing image's identity. It could be a product name and version, or an - // image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2"). - optional string imageIdentity = 5; - - // Contains claims from the signature. - map signedClaims = 6; - - // If specified, it is the time of signature's creation. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time created = 7; - - // If specified, it holds information about an issuer of signing certificate or key (a person or entity - // who signed the signing certificate or key). - optional SignatureIssuer issuedBy = 8; - - // If specified, it holds information about a subject of signing certificate or key (a person or entity - // who signed the image). - optional SignatureSubject issuedTo = 9; -} - -// An ImageStream stores a mapping of tags to images, metadata overrides that are applied -// when images are tagged in a stream, and an optional reference to a container image -// repository on a registry. Users typically update the spec.tags field to point to external -// images which are imported from container registries using credentials in your namespace -// with the pull secret type, or to existing image stream tags and images which are -// immediately accessible for tagging or pulling. The history of images applied to a tag -// is visible in the status.tags field and any user who can view an image stream is allowed -// to tag that image into their own image streams. Access to pull images from the integrated -// registry is granted by having the "get imagestreams/layers" permission on a given image -// stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both -// spec and status for that tag to be removed. Image stream history is retained until an -// administrator runs the prune operation, which removes references that are no longer in -// use. To preserve a historical image, ensure there is a tag in spec pointing to that image -// by its digest. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStream { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec describes the desired state of this stream - // +optional - optional ImageStreamSpec spec = 2; - - // status describes the current state of this stream - // +optional - optional ImageStreamStatus status = 3; -} - -// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. -// User interfaces and regular users can use this resource to access the metadata details of -// a tagged image in the image stream history for viewing, since Image resources are not -// directly accessible to end users. A not found error will be returned if no such image is -// referenced by a tag within the ImageStream. Images are created when spec tags are set on -// an image stream that represent an image in an external registry, when pushing to the -// integrated registry, or when tagging an existing image from one image stream to another. -// The name of an image stream image is in the form "@", where the digest is -// the content addressible identifier for the image (sha256:xxxxx...). You can use -// ImageStreamImages as the from.kind of an image stream spec tag to reference an image -// exactly. The only operations supported on the imagestreamimage endpoint are retrieving -// the image. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamImage { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // image associated with the ImageStream and image name. - optional Image image = 2; -} - -// The image stream import resource provides an easy way for a user to find and import container images -// from other container image registries into the server. Individual images or an entire image repository may -// be imported, and users may choose to see the results of the import prior to tagging the resulting -// images into the specified image stream. -// -// This API is intended for end-user tools that need to see the metadata of the image prior to import -// (for instance, to generate an application from it). Clients that know the desired image can continue -// to create spec.tags directly into their image streams. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamImport { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is a description of the images that the user wishes to import - optional ImageStreamImportSpec spec = 2; - - // status is the result of importing the image - optional ImageStreamImportStatus status = 3; -} - -// ImageStreamImportSpec defines what images should be imported. -message ImageStreamImportSpec { - // import indicates whether to perform an import - if so, the specified tags are set on the spec - // and status of the image stream defined by the type meta. - optional bool import = 1; - - // repository is an optional import of an entire container image repository. A maximum limit on the - // number of tags imported this way is imposed by the server. - optional RepositoryImportSpec repository = 2; - - // images are a list of individual images to import. - repeated ImageImportSpec images = 3; -} - -// ImageStreamImportStatus contains information about the status of an image stream import. -message ImageStreamImportStatus { - // import is the image stream that was successfully updated or created when 'to' was set. - // +optional - optional ImageStream import = 1; - - // repository is set if spec.repository was set to the outcome of the import - // +optional - optional RepositoryImportStatus repository = 2; - - // images is set with the result of importing spec.images - // +optional - repeated ImageImportStatus images = 3; -} - -// ImageStreamLayers describes information about the layers referenced by images in this -// image stream. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamLayers { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // blobs is a map of blob name to metadata about the blob. - map blobs = 2; - - // images is a map between an image name and the names of the blobs and config that - // comprise the image. - map images = 3; -} - -// ImageStreamList is a list of ImageStream objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of imageStreams - repeated ImageStream items = 2; -} - -// ImageStreamMapping represents a mapping from a single image stream tag to a container -// image as well as the reference to the container image stream the image came from. This -// resource is used by privileged integrators to create an image resource and to associate -// it with an image stream in the status tags field. Creating an ImageStreamMapping will -// allow any user who can view the image stream to tag or pull that image, so only create -// mappings where the user has proven they have access to the image contents directly. -// The only operation supported for this resource is create and the metadata name and -// namespace should be set to the image stream containing the tag that should be updated. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamMapping { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // image is a container image. - optional Image image = 2; - - // tag is a string value this image can be located with inside the stream. - optional string tag = 3; -} - -// ImageStreamSpec represents options for ImageStreams. -message ImageStreamSpec { - // lookupPolicy controls how other resources reference images within this namespace. - optional ImageLookupPolicy lookupPolicy = 3; - - // dockerImageRepository is optional, if specified this stream is backed by a container repository on this server - // Deprecated: This field is deprecated as of v3.7 and will be removed in a future release. - // Specify the source for the tags to be imported in each tag via the spec.tags.from reference instead. - optional string dockerImageRepository = 1; - - // tags map arbitrary string values to specific image locators - // +patchMergeKey=name - // +patchStrategy=merge - repeated TagReference tags = 2; -} - -// ImageStreamStatus contains information about the state of this image stream. -message ImageStreamStatus { - // dockerImageRepository represents the effective location this stream may be accessed at. - // May be empty until the server determines where the repository is located - // +optional - optional string dockerImageRepository = 1; - - // publicDockerImageRepository represents the public location from where the image can - // be pulled outside the cluster. This field may be empty if the administrator - // has not exposed the integrated registry externally. - // +optional - optional string publicDockerImageRepository = 3; - - // tags are a historical record of images associated with each tag. The first entry in the - // TagEvent array is the currently tagged image. - // +patchMergeKey=tag - // +patchStrategy=merge - // +optional - repeated NamedTagEventList tags = 2; -} - -// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. -// Use this resource to interact with the tags and images in an image stream by tag, or -// to see the image details for a particular tag. The image associated with this resource -// is the most recently successfully tagged, imported, or pushed image (as described in the -// image stream status.tags.items list for this tag). If an import is in progress or has -// failed the previous image will be shown. Deleting an image stream tag clears both the -// status and spec fields of an image stream. If no image can be retrieved for a given tag, -// a not found error will be returned. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamTag { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // tag is the spec tag associated with this image stream tag, and it may be null - // if only pushes have occurred to this image stream. - optional TagReference tag = 2; - - // generation is the current generation of the tagged image - if tag is provided - // and this value is not equal to the tag generation, a user has requested an - // import that has not completed, or conditions will be filled out indicating any - // error. - optional int64 generation = 3; - - // lookupPolicy indicates whether this tag will handle image references in this - // namespace. - optional ImageLookupPolicy lookupPolicy = 6; - - // conditions is an array of conditions that apply to the image stream tag. - repeated TagEventCondition conditions = 4; - - // image associated with the ImageStream and tag. - optional Image image = 5; -} - -// ImageStreamTagList is a list of ImageStreamTag objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageStreamTagList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of image stream tags - repeated ImageStreamTag items = 2; -} - -// ImageTag represents a single tag within an image stream and includes the spec, -// the status history, and the currently referenced image (if any) of the provided -// tag. This type replaces the ImageStreamTag by providing a full view of the tag. -// ImageTags are returned for every spec or status tag present on the image stream. -// If no tag exists in either form, a not found error will be returned by the API. -// A create operation will succeed if no spec tag has already been defined and the -// spec field is set. Delete will remove both spec and status elements from the -// image stream. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageTag { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is the spec tag associated with this image stream tag, and it may be null - // if only pushes have occurred to this image stream. - optional TagReference spec = 2; - - // status is the status tag details associated with this image stream tag, and it - // may be null if no push or import has been performed. - optional NamedTagEventList status = 3; - - // image is the details of the most recent image stream status tag, and it may be - // null if import has not completed or an administrator has deleted the image - // object. To verify this is the most recent image, you must verify the generation - // of the most recent status.items entry matches the spec tag (if a spec tag is - // set). This field will not be set when listing image tags. - optional Image image = 4; -} - -// ImageTagList is a list of ImageTag objects. When listing image tags, the image -// field is not populated. Tags are returned in alphabetical order by image stream -// and then tag. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ImageTagList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of image stream tags - repeated ImageTag items = 2; -} - -// NamedTagEventList relates a tag to its image history. -message NamedTagEventList { - // tag is the tag for which the history is recorded - optional string tag = 1; - - // Standard object's metadata. - repeated TagEvent items = 2; - - // conditions is an array of conditions that apply to the tag event list. - repeated TagEventCondition conditions = 3; -} - -// RepositoryImportSpec describes a request to import images from a container image repository. -message RepositoryImportSpec { - // from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed - optional .k8s.io.api.core.v1.ObjectReference from = 1; - - // importPolicy is the policy controlling how the image is imported - optional TagImportPolicy importPolicy = 2; - - // referencePolicy defines how other components should consume the image - optional TagReferencePolicy referencePolicy = 4; - - // includeManifest determines if the manifest for each image is returned in the response - optional bool includeManifest = 3; -} - -// RepositoryImportStatus describes the result of an image repository import -message RepositoryImportStatus { - // status reflects whether any failure occurred during import - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 1; - - // images is a list of images successfully retrieved by the import of the repository. - repeated ImageImportStatus images = 2; - - // additionalTags are tags that exist in the repository but were not imported because - // a maximum limit of automatic imports was applied. - repeated string additionalTags = 3; -} - -// SecretList is a list of Secret. -// +openshift:compatibility-gen:level=1 -message SecretList { - // Standard list metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is a list of secret objects. - // More info: https://kubernetes.io/docs/concepts/configuration/secret - repeated .k8s.io.api.core.v1.Secret items = 2; -} - -// SignatureCondition describes an image signature condition of particular kind at particular probe time. -message SignatureCondition { - // type of signature condition, Complete or Failed. - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - optional string status = 2; - - // Last time the condition was checked. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastProbeTime = 3; - - // Last time the condition transit from one status to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // (brief) reason for the condition's last transition. - optional string reason = 5; - - // Human readable message indicating details about last transition. - optional string message = 6; -} - -// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject -// of signing certificate or key. -message SignatureGenericEntity { - // organization name. - optional string organization = 1; - - // Common name (e.g. openshift-signing-service). - optional string commonName = 2; -} - -// SignatureIssuer holds information about an issuer of signing certificate or key. -message SignatureIssuer { - optional SignatureGenericEntity signatureGenericEntity = 1; -} - -// SignatureSubject holds information about a person or entity who created the signature. -message SignatureSubject { - optional SignatureGenericEntity signatureGenericEntity = 1; - - // If present, it is a human readable key id of public key belonging to the subject used to verify image - // signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. - // 0x685ebe62bf278440). - optional string publicKeyID = 2; -} - -// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. -message TagEvent { - // created holds the time the TagEvent was created - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time created = 1; - - // dockerImageReference is the string that can be used to pull this image - optional string dockerImageReference = 2; - - // image is the image - optional string image = 3; - - // generation is the spec tag generation that resulted in this tag being updated - optional int64 generation = 4; -} - -// TagEventCondition contains condition information for a tag event. -message TagEventCondition { - // type of tag event condition, currently only ImportSuccess - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - optional string status = 2; - - // lastTransitionTime is the time the condition transitioned from one status to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is a brief machine readable explanation for the condition's last transition. - optional string reason = 4; - - // message is a human readable description of the details about last transition, complementing reason. - optional string message = 5; - - // generation is the spec tag generation that this status corresponds to - optional int64 generation = 6; -} - -// TagImportPolicy controls how images related to this tag will be imported. -message TagImportPolicy { - // insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. - optional bool insecure = 1; - - // scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported - optional bool scheduled = 2; - - // importMode describes how to import an image manifest. - optional string importMode = 3; -} - -// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. -message TagReference { - // name of the tag - optional string name = 1; - - // Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags. - // +optional - map annotations = 2; - - // Optional; if specified, a reference to another image that this tag should point to. Valid values - // are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references - // can only reference a tag within this same ImageStream. - optional .k8s.io.api.core.v1.ObjectReference from = 3; - - // reference states if the tag will be imported. Default value is false, which means the tag will - // be imported. - optional bool reference = 4; - - // generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference - // is changed the generation is set to match the current stream generation (which is incremented every - // time spec is changed). Other processes in the system like the image importer observe that the - // generation of spec tag is newer than the generation recorded in the status and use that as a trigger - // to import the newest remote tag. To trigger a new import, clients may set this value to zero which - // will reset the generation to the latest stream generation. Legacy clients will send this value as - // nil which will be merged with the current tag generation. - // +optional - optional int64 generation = 5; - - // importPolicy is information that controls how images may be imported by the server. - optional TagImportPolicy importPolicy = 6; - - // referencePolicy defines how other components should consume the image. - optional TagReferencePolicy referencePolicy = 7; -} - -// TagReferencePolicy describes how pull-specs for images in this image stream tag are generated when -// image change triggers in deployment configs or builds are resolved. This allows the image stream -// author to control how images are accessed. -message TagReferencePolicy { - // type determines how the image pull spec should be transformed when the image stream tag is used in - // deployment config triggers or new builds. The default value is `Source`, indicating the original - // location of the image should be used (if imported). The user may also specify `Local`, indicating - // that the pull spec should point to the integrated container image registry and leverage the registry's - // ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this - // image to be managed from the image stream's namespace, so others on the platform can access a remote - // image but have no access to the remote secret. It also allows the image layers to be mirrored into - // the local registry which the images can still be pulled even if the upstream registry is unavailable. - optional string type = 1; -} - diff --git a/vendor/github.com/openshift/api/image/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/image/v1/generated.protomessage.pb.go deleted file mode 100644 index 68da6c960..000000000 --- a/vendor/github.com/openshift/api/image/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,82 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*DockerImageReference) ProtoMessage() {} - -func (*Image) ProtoMessage() {} - -func (*ImageBlobReferences) ProtoMessage() {} - -func (*ImageImportSpec) ProtoMessage() {} - -func (*ImageImportStatus) ProtoMessage() {} - -func (*ImageLayer) ProtoMessage() {} - -func (*ImageLayerData) ProtoMessage() {} - -func (*ImageList) ProtoMessage() {} - -func (*ImageLookupPolicy) ProtoMessage() {} - -func (*ImageManifest) ProtoMessage() {} - -func (*ImageSignature) ProtoMessage() {} - -func (*ImageStream) ProtoMessage() {} - -func (*ImageStreamImage) ProtoMessage() {} - -func (*ImageStreamImport) ProtoMessage() {} - -func (*ImageStreamImportSpec) ProtoMessage() {} - -func (*ImageStreamImportStatus) ProtoMessage() {} - -func (*ImageStreamLayers) ProtoMessage() {} - -func (*ImageStreamList) ProtoMessage() {} - -func (*ImageStreamMapping) ProtoMessage() {} - -func (*ImageStreamSpec) ProtoMessage() {} - -func (*ImageStreamStatus) ProtoMessage() {} - -func (*ImageStreamTag) ProtoMessage() {} - -func (*ImageStreamTagList) ProtoMessage() {} - -func (*ImageTag) ProtoMessage() {} - -func (*ImageTagList) ProtoMessage() {} - -func (*NamedTagEventList) ProtoMessage() {} - -func (*RepositoryImportSpec) ProtoMessage() {} - -func (*RepositoryImportStatus) ProtoMessage() {} - -func (*SecretList) ProtoMessage() {} - -func (*SignatureCondition) ProtoMessage() {} - -func (*SignatureGenericEntity) ProtoMessage() {} - -func (*SignatureIssuer) ProtoMessage() {} - -func (*SignatureSubject) ProtoMessage() {} - -func (*TagEvent) ProtoMessage() {} - -func (*TagEventCondition) ProtoMessage() {} - -func (*TagImportPolicy) ProtoMessage() {} - -func (*TagReference) ProtoMessage() {} - -func (*TagReferencePolicy) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/image/v1/legacy.go b/vendor/github.com/openshift/api/image/v1/legacy.go deleted file mode 100644 index 02bbaa290..000000000 --- a/vendor/github.com/openshift/api/image/v1/legacy.go +++ /dev/null @@ -1,33 +0,0 @@ -package v1 - -import ( - "github.com/openshift/api/image/docker10" - "github.com/openshift/api/image/dockerpre012" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, docker10.AddToSchemeInCoreGroup, dockerpre012.AddToSchemeInCoreGroup, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Image{}, - &ImageList{}, - &ImageSignature{}, - &ImageStream{}, - &ImageStreamList{}, - &ImageStreamMapping{}, - &ImageStreamTag{}, - &ImageStreamTagList{}, - &ImageStreamImage{}, - &ImageStreamImport{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/image/v1/register.go b/vendor/github.com/openshift/api/image/v1/register.go deleted file mode 100644 index 0d924103a..000000000 --- a/vendor/github.com/openshift/api/image/v1/register.go +++ /dev/null @@ -1,54 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/openshift/api/image/docker10" - "github.com/openshift/api/image/dockerpre012" -) - -var ( - GroupName = "image.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, docker10.AddToScheme, dockerpre012.AddToScheme, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Image{}, - &ImageList{}, - &ImageSignature{}, - &ImageStream{}, - &ImageStreamList{}, - &ImageStreamMapping{}, - &ImageStreamTag{}, - &ImageStreamTagList{}, - &ImageStreamImage{}, - &ImageStreamLayers{}, - &ImageStreamImport{}, - &ImageTag{}, - &ImageTagList{}, - &SecretList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/image/v1/types.go b/vendor/github.com/openshift/api/image/v1/types.go deleted file mode 100644 index e45d6b10d..000000000 --- a/vendor/github.com/openshift/api/image/v1/types.go +++ /dev/null @@ -1,772 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageList is a list of Image objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of images - Items []Image `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Image is an immutable representation of a container image and its metadata at a point in time. -// Images are named by taking a hash of their contents (metadata and content) and any change -// in format, content, or metadata results in a new name. The images resource is primarily -// for use by cluster administrators and integrations like the cluster image registry - end -// users, instead, access images via the imagestreamtags or imagestreamimages resources. While -// image metadata is stored in the API, any integration that implements the container image -// registry API must provide its own storage for the raw manifest data, image config, and -// layer contents. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Image struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // dockerImageReference is the string that can be used to pull this image. - DockerImageReference string `json:"dockerImageReference,omitempty" protobuf:"bytes,2,opt,name=dockerImageReference"` - // dockerImageMetadata contains metadata about this image - // +patchStrategy=replace - // +kubebuilder:pruning:PreserveUnknownFields - DockerImageMetadata runtime.RawExtension `json:"dockerImageMetadata,omitempty" patchStrategy:"replace" protobuf:"bytes,3,opt,name=dockerImageMetadata"` - // dockerImageMetadataVersion conveys the version of the object, which if empty defaults to "1.0" - DockerImageMetadataVersion string `json:"dockerImageMetadataVersion,omitempty" protobuf:"bytes,4,opt,name=dockerImageMetadataVersion"` - // dockerImageManifest is the raw JSON of the manifest - DockerImageManifest string `json:"dockerImageManifest,omitempty" protobuf:"bytes,5,opt,name=dockerImageManifest"` - // dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list. - DockerImageLayers []ImageLayer `json:"dockerImageLayers,omitempty" protobuf:"bytes,6,rep,name=dockerImageLayers"` - // signatures holds all signatures of the image. - // +patchMergeKey=name - // +patchStrategy=merge - Signatures []ImageSignature `json:"signatures,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,7,rep,name=signatures"` - // dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1. - DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty" protobuf:"bytes,8,rep,name=dockerImageSignatures"` - // dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2. - DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty" protobuf:"bytes,9,opt,name=dockerImageManifestMediaType"` - // dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. - // Will not be set when the image represents a manifest list. - DockerImageConfig string `json:"dockerImageConfig,omitempty" protobuf:"bytes,10,opt,name=dockerImageConfig"` - // dockerImageManifests holds information about sub-manifests when the image represents a manifest list. - // When this field is present, no DockerImageLayers should be specified. - DockerImageManifests []ImageManifest `json:"dockerImageManifests,omitempty" protobuf:"bytes,11,rep,name=dockerImageManifests"` -} - -// ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular -// Image object. -type ImageManifest struct { - // digest is the unique identifier for the manifest. It refers to an Image object. - Digest string `json:"digest" protobuf:"bytes,1,opt,name=digest"` - // mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, - // application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json. - MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` - // manifestSize represents the size of the raw object contents, in bytes. - ManifestSize int64 `json:"manifestSize" protobuf:"varint,3,opt,name=manifestSize"` - // architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`. - Architecture string `json:"architecture" protobuf:"bytes,4,opt,name=architecture"` - // os specifies the operating system, for example `linux`. - OS string `json:"os" protobuf:"bytes,5,opt,name=os"` - // variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU - // variant of the ARM CPU. - Variant string `json:"variant,omitempty" protobuf:"bytes,6,opt,name=variant"` -} - -// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none. -type ImageLayer struct { - // name of the layer as defined by the underlying store. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // size of the layer in bytes as defined by the underlying store. - LayerSize int64 `json:"size" protobuf:"varint,2,opt,name=size"` - // mediaType of the referenced object. - MediaType string `json:"mediaType" protobuf:"bytes,3,opt,name=mediaType"` -} - -// +genclient -// +genclient:onlyVerbs=create,delete -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims -// as long as the signature is trusted. Based on this information it is possible to restrict runnable images -// to those matching cluster-wide policy. -// Mandatory fields should be parsed by clients doing image verification. The others are parsed from -// signature's content by the server. They serve just an informative purpose. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageSignature struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Required: Describes a type of stored blob. - Type string `json:"type" protobuf:"bytes,2,opt,name=type"` - // Required: An opaque binary string which is an image's signature. - Content []byte `json:"content" protobuf:"bytes,3,opt,name=content"` - // conditions represent the latest available observations of a signature's current state. - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []SignatureCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,4,rep,name=conditions"` - - // Following metadata fields will be set by server if the signature content is successfully parsed and - // the information available. - - // A human readable string representing image's identity. It could be a product name and version, or an - // image pull spec (e.g. "registry.access.redhat.com/rhel7/rhel:7.2"). - ImageIdentity string `json:"imageIdentity,omitempty" protobuf:"bytes,5,opt,name=imageIdentity"` - // Contains claims from the signature. - SignedClaims map[string]string `json:"signedClaims,omitempty" protobuf:"bytes,6,rep,name=signedClaims"` - // If specified, it is the time of signature's creation. - Created *metav1.Time `json:"created,omitempty" protobuf:"bytes,7,opt,name=created"` - // If specified, it holds information about an issuer of signing certificate or key (a person or entity - // who signed the signing certificate or key). - IssuedBy *SignatureIssuer `json:"issuedBy,omitempty" protobuf:"bytes,8,opt,name=issuedBy"` - // If specified, it holds information about a subject of signing certificate or key (a person or entity - // who signed the image). - IssuedTo *SignatureSubject `json:"issuedTo,omitempty" protobuf:"bytes,9,opt,name=issuedTo"` -} - -// SignatureConditionType is a type of image signature condition. -type SignatureConditionType string - -// SignatureCondition describes an image signature condition of particular kind at particular probe time. -type SignatureCondition struct { - // type of signature condition, Complete or Failed. - Type SignatureConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=SignatureConditionType"` - // status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` - // Last time the condition was checked. - LastProbeTime metav1.Time `json:"lastProbeTime,omitempty" protobuf:"bytes,3,opt,name=lastProbeTime"` - // Last time the condition transit from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // (brief) reason for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // Human readable message indicating details about last transition. - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} - -// SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject -// of signing certificate or key. -type SignatureGenericEntity struct { - // organization name. - Organization string `json:"organization,omitempty" protobuf:"bytes,1,opt,name=organization"` - // Common name (e.g. openshift-signing-service). - CommonName string `json:"commonName,omitempty" protobuf:"bytes,2,opt,name=commonName"` -} - -// SignatureIssuer holds information about an issuer of signing certificate or key. -type SignatureIssuer struct { - SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` -} - -// SignatureSubject holds information about a person or entity who created the signature. -type SignatureSubject struct { - SignatureGenericEntity `json:",inline" protobuf:"bytes,1,opt,name=signatureGenericEntity"` - // If present, it is a human readable key id of public key belonging to the subject used to verify image - // signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. - // 0x685ebe62bf278440). - PublicKeyID string `json:"publicKeyID" protobuf:"bytes,2,opt,name=publicKeyID"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamList is a list of ImageStream objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of imageStreams - Items []ImageStream `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:method=Secrets,verb=get,subresource=secrets,result=github.com/openshift/api/image/v1.SecretList -// +genclient:method=Layers,verb=get,subresource=layers,result=github.com/openshift/api/image/v1.ImageStreamLayers -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// An ImageStream stores a mapping of tags to images, metadata overrides that are applied -// when images are tagged in a stream, and an optional reference to a container image -// repository on a registry. Users typically update the spec.tags field to point to external -// images which are imported from container registries using credentials in your namespace -// with the pull secret type, or to existing image stream tags and images which are -// immediately accessible for tagging or pulling. The history of images applied to a tag -// is visible in the status.tags field and any user who can view an image stream is allowed -// to tag that image into their own image streams. Access to pull images from the integrated -// registry is granted by having the "get imagestreams/layers" permission on a given image -// stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both -// spec and status for that tag to be removed. Image stream history is retained until an -// administrator runs the prune operation, which removes references that are no longer in -// use. To preserve a historical image, ensure there is a tag in spec pointing to that image -// by its digest. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStream struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec describes the desired state of this stream - // +optional - Spec ImageStreamSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status describes the current state of this stream - // +optional - Status ImageStreamStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ImageStreamSpec represents options for ImageStreams. -type ImageStreamSpec struct { - // lookupPolicy controls how other resources reference images within this namespace. - LookupPolicy ImageLookupPolicy `json:"lookupPolicy,omitempty" protobuf:"bytes,3,opt,name=lookupPolicy"` - // dockerImageRepository is optional, if specified this stream is backed by a container repository on this server - // Deprecated: This field is deprecated as of v3.7 and will be removed in a future release. - // Specify the source for the tags to be imported in each tag via the spec.tags.from reference instead. - DockerImageRepository string `json:"dockerImageRepository,omitempty" protobuf:"bytes,1,opt,name=dockerImageRepository"` - // tags map arbitrary string values to specific image locators - // +patchMergeKey=name - // +patchStrategy=merge - Tags []TagReference `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"name" protobuf:"bytes,2,rep,name=tags"` -} - -// ImageLookupPolicy describes how an image stream can be used to override the image references -// used by pods, builds, and other resources in a namespace. -type ImageLookupPolicy struct { - // local will change the docker short image references (like "mysql" or - // "php:latest") on objects in this namespace to the image ID whenever they match - // this image stream, instead of reaching out to a remote registry. The name will - // be fully qualified to an image ID if found. The tag's referencePolicy is taken - // into account on the replaced value. Only works within the current namespace. - Local bool `json:"local" protobuf:"varint,3,opt,name=local"` -} - -// TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track. -type TagReference struct { - // name of the tag - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags. - // +optional - Annotations map[string]string `json:"annotations" protobuf:"bytes,2,rep,name=annotations"` - // Optional; if specified, a reference to another image that this tag should point to. Valid values - // are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references - // can only reference a tag within this same ImageStream. - From *corev1.ObjectReference `json:"from,omitempty" protobuf:"bytes,3,opt,name=from"` - // reference states if the tag will be imported. Default value is false, which means the tag will - // be imported. - Reference bool `json:"reference,omitempty" protobuf:"varint,4,opt,name=reference"` - // generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference - // is changed the generation is set to match the current stream generation (which is incremented every - // time spec is changed). Other processes in the system like the image importer observe that the - // generation of spec tag is newer than the generation recorded in the status and use that as a trigger - // to import the newest remote tag. To trigger a new import, clients may set this value to zero which - // will reset the generation to the latest stream generation. Legacy clients will send this value as - // nil which will be merged with the current tag generation. - // +optional - Generation *int64 `json:"generation" protobuf:"varint,5,opt,name=generation"` - // importPolicy is information that controls how images may be imported by the server. - ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,6,opt,name=importPolicy"` - // referencePolicy defines how other components should consume the image. - ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,7,opt,name=referencePolicy"` -} - -// TagImportPolicy controls how images related to this tag will be imported. -type TagImportPolicy struct { - // insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import. - Insecure bool `json:"insecure,omitempty" protobuf:"varint,1,opt,name=insecure"` - // scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported - Scheduled bool `json:"scheduled,omitempty" protobuf:"varint,2,opt,name=scheduled"` - // importMode describes how to import an image manifest. - ImportMode ImportModeType `json:"importMode,omitempty" protobuf:"bytes,3,opt,name=importMode,casttype=ImportModeType"` -} - -// ImportModeType describes how to import an image manifest. -type ImportModeType string - -const ( - // ImportModeLegacy indicates that the legacy behaviour should be used. - // For manifest lists, the legacy behaviour will discard the manifest list and import a single - // sub-manifest. In this case, the platform is chosen in the following order of priority: - // 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. - // This mode is the default. - ImportModeLegacy ImportModeType = "Legacy" - // ImportModePreserveOriginal indicates that the original manifest will be preserved. - // For manifest lists, the manifest list and all its sub-manifests will be imported. - ImportModePreserveOriginal ImportModeType = "PreserveOriginal" -) - -// TagReferencePolicyType describes how pull-specs for images in an image stream tag are generated when -// image change triggers are fired. -type TagReferencePolicyType string - -const ( - // SourceTagReferencePolicy indicates the image's original location should be used when the image stream tag - // is resolved into other resources (builds and deployment configurations). - SourceTagReferencePolicy TagReferencePolicyType = "Source" - // LocalTagReferencePolicy indicates the image should prefer to pull via the local integrated registry, - // falling back to the remote location if the integrated registry has not been configured. The reference will - // use the internal DNS name or registry service IP. - LocalTagReferencePolicy TagReferencePolicyType = "Local" -) - -// TagReferencePolicy describes how pull-specs for images in this image stream tag are generated when -// image change triggers in deployment configs or builds are resolved. This allows the image stream -// author to control how images are accessed. -type TagReferencePolicy struct { - // type determines how the image pull spec should be transformed when the image stream tag is used in - // deployment config triggers or new builds. The default value is `Source`, indicating the original - // location of the image should be used (if imported). The user may also specify `Local`, indicating - // that the pull spec should point to the integrated container image registry and leverage the registry's - // ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this - // image to be managed from the image stream's namespace, so others on the platform can access a remote - // image but have no access to the remote secret. It also allows the image layers to be mirrored into - // the local registry which the images can still be pulled even if the upstream registry is unavailable. - Type TagReferencePolicyType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagReferencePolicyType"` -} - -// ImageStreamStatus contains information about the state of this image stream. -type ImageStreamStatus struct { - // dockerImageRepository represents the effective location this stream may be accessed at. - // May be empty until the server determines where the repository is located - // +optional - DockerImageRepository string `json:"dockerImageRepository" protobuf:"bytes,1,opt,name=dockerImageRepository"` - // publicDockerImageRepository represents the public location from where the image can - // be pulled outside the cluster. This field may be empty if the administrator - // has not exposed the integrated registry externally. - // +optional - PublicDockerImageRepository string `json:"publicDockerImageRepository,omitempty" protobuf:"bytes,3,opt,name=publicDockerImageRepository"` - // tags are a historical record of images associated with each tag. The first entry in the - // TagEvent array is the currently tagged image. - // +patchMergeKey=tag - // +patchStrategy=merge - // +optional - Tags []NamedTagEventList `json:"tags,omitempty" patchStrategy:"merge" patchMergeKey:"tag" protobuf:"bytes,2,rep,name=tags"` -} - -// NamedTagEventList relates a tag to its image history. -type NamedTagEventList struct { - // tag is the tag for which the history is recorded - Tag string `json:"tag" protobuf:"bytes,1,opt,name=tag"` - // Standard object's metadata. - Items []TagEvent `json:"items" protobuf:"bytes,2,rep,name=items"` - // conditions is an array of conditions that apply to the tag event list. - Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` -} - -// TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag. -type TagEvent struct { - // created holds the time the TagEvent was created - Created metav1.Time `json:"created" protobuf:"bytes,1,opt,name=created"` - // dockerImageReference is the string that can be used to pull this image - DockerImageReference string `json:"dockerImageReference" protobuf:"bytes,2,opt,name=dockerImageReference"` - // image is the image - Image string `json:"image" protobuf:"bytes,3,opt,name=image"` - // generation is the spec tag generation that resulted in this tag being updated - Generation int64 `json:"generation" protobuf:"varint,4,opt,name=generation"` -} - -type TagEventConditionType string - -// These are valid conditions of TagEvents. -const ( - // ImportSuccess with status False means the import of the specific tag failed - ImportSuccess TagEventConditionType = "ImportSuccess" -) - -// TagEventCondition contains condition information for a tag event. -type TagEventCondition struct { - // type of tag event condition, currently only ImportSuccess - Type TagEventConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TagEventConditionType"` - // status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` - // lastTransitionTime is the time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // reason is a brief machine readable explanation for the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // message is a human readable description of the details about last transition, complementing reason. - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` - // generation is the spec tag generation that this status corresponds to - Generation int64 `json:"generation" protobuf:"varint,6,opt,name=generation"` -} - -// +genclient -// +genclient:skipVerbs=get,list,create,update,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=k8s.io/apimachinery/pkg/apis/meta/v1.Status -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamMapping represents a mapping from a single image stream tag to a container -// image as well as the reference to the container image stream the image came from. This -// resource is used by privileged integrators to create an image resource and to associate -// it with an image stream in the status tags field. Creating an ImageStreamMapping will -// allow any user who can view the image stream to tag or pull that image, so only create -// mappings where the user has proven they have access to the image contents directly. -// The only operation supported for this resource is create and the metadata name and -// namespace should be set to the image stream containing the tag that should be updated. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamMapping struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // image is a container image. - Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` - // tag is a string value this image can be located with inside the stream. - Tag string `json:"tag" protobuf:"bytes,3,opt,name=tag"` -} - -// +genclient -// +genclient:onlyVerbs=get,list,create,update,delete -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. -// Use this resource to interact with the tags and images in an image stream by tag, or -// to see the image details for a particular tag. The image associated with this resource -// is the most recently successfully tagged, imported, or pushed image (as described in the -// image stream status.tags.items list for this tag). If an import is in progress or has -// failed the previous image will be shown. Deleting an image stream tag clears both the -// status and spec fields of an image stream. If no image can be retrieved for a given tag, -// a not found error will be returned. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamTag struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // tag is the spec tag associated with this image stream tag, and it may be null - // if only pushes have occurred to this image stream. - Tag *TagReference `json:"tag" protobuf:"bytes,2,opt,name=tag"` - - // generation is the current generation of the tagged image - if tag is provided - // and this value is not equal to the tag generation, a user has requested an - // import that has not completed, or conditions will be filled out indicating any - // error. - Generation int64 `json:"generation" protobuf:"varint,3,opt,name=generation"` - - // lookupPolicy indicates whether this tag will handle image references in this - // namespace. - LookupPolicy ImageLookupPolicy `json:"lookupPolicy" protobuf:"varint,6,opt,name=lookupPolicy"` - - // conditions is an array of conditions that apply to the image stream tag. - Conditions []TagEventCondition `json:"conditions,omitempty" protobuf:"bytes,4,rep,name=conditions"` - - // image associated with the ImageStream and tag. - Image Image `json:"image" protobuf:"bytes,5,opt,name=image"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamTagList is a list of ImageStreamTag objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamTagList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of image stream tags - Items []ImageStreamTag `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:onlyVerbs=get,list,create,update,delete -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageTag represents a single tag within an image stream and includes the spec, -// the status history, and the currently referenced image (if any) of the provided -// tag. This type replaces the ImageStreamTag by providing a full view of the tag. -// ImageTags are returned for every spec or status tag present on the image stream. -// If no tag exists in either form, a not found error will be returned by the API. -// A create operation will succeed if no spec tag has already been defined and the -// spec field is set. Delete will remove both spec and status elements from the -// image stream. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageTag struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec is the spec tag associated with this image stream tag, and it may be null - // if only pushes have occurred to this image stream. - Spec *TagReference `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status is the status tag details associated with this image stream tag, and it - // may be null if no push or import has been performed. - Status *NamedTagEventList `json:"status" protobuf:"bytes,3,opt,name=status"` - // image is the details of the most recent image stream status tag, and it may be - // null if import has not completed or an administrator has deleted the image - // object. To verify this is the most recent image, you must verify the generation - // of the most recent status.items entry matches the spec tag (if a spec tag is - // set). This field will not be set when listing image tags. - Image *Image `json:"image" protobuf:"bytes,4,opt,name=image"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageTagList is a list of ImageTag objects. When listing image tags, the image -// field is not populated. Tags are returned in alphabetical order by image stream -// and then tag. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageTagList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of image stream tags - Items []ImageTag `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:onlyVerbs=get -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. -// User interfaces and regular users can use this resource to access the metadata details of -// a tagged image in the image stream history for viewing, since Image resources are not -// directly accessible to end users. A not found error will be returned if no such image is -// referenced by a tag within the ImageStream. Images are created when spec tags are set on -// an image stream that represent an image in an external registry, when pushing to the -// integrated registry, or when tagging an existing image from one image stream to another. -// The name of an image stream image is in the form "@", where the digest is -// the content addressible identifier for the image (sha256:xxxxx...). You can use -// ImageStreamImages as the from.kind of an image stream spec tag to reference an image -// exactly. The only operations supported on the imagestreamimage endpoint are retrieving -// the image. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamImage struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // image associated with the ImageStream and image name. - Image Image `json:"image" protobuf:"bytes,2,opt,name=image"` -} - -// DockerImageReference points to a container image. -type DockerImageReference struct { - // Registry is the registry that contains the container image - Registry string `protobuf:"bytes,1,opt,name=registry"` - // Namespace is the namespace that contains the container image - Namespace string `protobuf:"bytes,2,opt,name=namespace"` - // Name is the name of the container image - Name string `protobuf:"bytes,3,opt,name=name"` - // Tag is which tag of the container image is being referenced - Tag string `protobuf:"bytes,4,opt,name=tag"` - // ID is the identifier for the container image - ID string `protobuf:"bytes,5,opt,name=iD"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageStreamLayers describes information about the layers referenced by images in this -// image stream. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamLayers struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // blobs is a map of blob name to metadata about the blob. - Blobs map[string]ImageLayerData `json:"blobs" protobuf:"bytes,2,rep,name=blobs"` - // images is a map between an image name and the names of the blobs and config that - // comprise the image. - Images map[string]ImageBlobReferences `json:"images" protobuf:"bytes,3,rep,name=images"` -} - -// ImageBlobReferences describes the blob references within an image. -type ImageBlobReferences struct { - // imageMissing is true if the image is referenced by the image stream but the image - // object has been deleted from the API by an administrator. When this field is set, - // layers and config fields may be empty and callers that depend on the image metadata - // should consider the image to be unavailable for download or viewing. - // +optional - ImageMissing bool `json:"imageMissing" protobuf:"varint,3,opt,name=imageMissing"` - // layers is the list of blobs that compose this image, from base layer to top layer. - // All layers referenced by this array will be defined in the blobs map. Some images - // may have zero layers. - // +optional - Layers []string `json:"layers" protobuf:"bytes,1,rep,name=layers"` - // config, if set, is the blob that contains the image config. Some images do - // not have separate config blobs and this field will be set to nil if so. - // +optional - Config *string `json:"config" protobuf:"bytes,2,opt,name=config"` - // manifests is the list of other image names that this image points - // to. For a single architecture image, it is empty. For a multi-arch - // image, it consists of the digests of single architecture images, - // such images shouldn't have layers nor config. - // +optional - Manifests []string `json:"manifests,omitempty" protobuf:"bytes,4,rep,name=manifests"` -} - -// ImageLayerData contains metadata about an image layer. -type ImageLayerData struct { - // size of the layer in bytes as defined by the underlying store. This field is - // optional if the necessary information about size is not available. - LayerSize *int64 `json:"size" protobuf:"varint,1,opt,name=size"` - // mediaType of the referenced object. - MediaType string `json:"mediaType" protobuf:"bytes,2,opt,name=mediaType"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// The image stream import resource provides an easy way for a user to find and import container images -// from other container image registries into the server. Individual images or an entire image repository may -// be imported, and users may choose to see the results of the import prior to tagging the resulting -// images into the specified image stream. -// -// This API is intended for end-user tools that need to see the metadata of the image prior to import -// (for instance, to generate an application from it). Clients that know the desired image can continue -// to create spec.tags directly into their image streams. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImageStreamImport struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec is a description of the images that the user wishes to import - Spec ImageStreamImportSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status is the result of importing the image - Status ImageStreamImportStatus `json:"status" protobuf:"bytes,3,opt,name=status"` -} - -// ImageStreamImportSpec defines what images should be imported. -type ImageStreamImportSpec struct { - // import indicates whether to perform an import - if so, the specified tags are set on the spec - // and status of the image stream defined by the type meta. - Import bool `json:"import" protobuf:"varint,1,opt,name=import"` - // repository is an optional import of an entire container image repository. A maximum limit on the - // number of tags imported this way is imposed by the server. - Repository *RepositoryImportSpec `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` - // images are a list of individual images to import. - Images []ImageImportSpec `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` -} - -// ImageStreamImportStatus contains information about the status of an image stream import. -type ImageStreamImportStatus struct { - // import is the image stream that was successfully updated or created when 'to' was set. - // +optional - Import *ImageStream `json:"import,omitempty" protobuf:"bytes,1,opt,name=import"` - // repository is set if spec.repository was set to the outcome of the import - // +optional - Repository *RepositoryImportStatus `json:"repository,omitempty" protobuf:"bytes,2,opt,name=repository"` - // images is set with the result of importing spec.images - // +optional - Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,3,rep,name=images"` -} - -// RepositoryImportSpec describes a request to import images from a container image repository. -type RepositoryImportSpec struct { - // from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - - // importPolicy is the policy controlling how the image is imported - ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,2,opt,name=importPolicy"` - // referencePolicy defines how other components should consume the image - ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,4,opt,name=referencePolicy"` - // includeManifest determines if the manifest for each image is returned in the response - IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,3,opt,name=includeManifest"` -} - -// RepositoryImportStatus describes the result of an image repository import -type RepositoryImportStatus struct { - // status reflects whether any failure occurred during import - Status metav1.Status `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` - // images is a list of images successfully retrieved by the import of the repository. - Images []ImageImportStatus `json:"images,omitempty" protobuf:"bytes,2,rep,name=images"` - // additionalTags are tags that exist in the repository but were not imported because - // a maximum limit of automatic imports was applied. - AdditionalTags []string `json:"additionalTags,omitempty" protobuf:"bytes,3,rep,name=additionalTags"` -} - -// ImageImportSpec describes a request to import a specific image. -type ImageImportSpec struct { - // from is the source of an image to import; only kind DockerImage is allowed - From corev1.ObjectReference `json:"from" protobuf:"bytes,1,opt,name=from"` - // to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used - To *corev1.LocalObjectReference `json:"to,omitempty" protobuf:"bytes,2,opt,name=to"` - - // importPolicy is the policy controlling how the image is imported - ImportPolicy TagImportPolicy `json:"importPolicy,omitempty" protobuf:"bytes,3,opt,name=importPolicy"` - // referencePolicy defines how other components should consume the image - ReferencePolicy TagReferencePolicy `json:"referencePolicy,omitempty" protobuf:"bytes,5,opt,name=referencePolicy"` - // includeManifest determines if the manifest for each image is returned in the response - IncludeManifest bool `json:"includeManifest,omitempty" protobuf:"varint,4,opt,name=includeManifest"` -} - -// ImageImportStatus describes the result of an image import. -type ImageImportStatus struct { - // status is the status of the image import, including errors encountered while retrieving the image - Status metav1.Status `json:"status" protobuf:"bytes,1,opt,name=status"` - // image is the metadata of that image, if the image was located - Image *Image `json:"image,omitempty" protobuf:"bytes,2,opt,name=image"` - // tag is the tag this image was located under, if any - Tag string `json:"tag,omitempty" protobuf:"bytes,3,opt,name=tag"` - // manifests holds sub-manifests metadata when importing a manifest list - Manifests []Image `json:"manifests,omitempty" protobuf:"bytes,4,rep,name=manifests"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SecretList is a list of Secret. -// +openshift:compatibility-gen:level=1 -type SecretList corev1.SecretList diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go deleted file mode 100644 index af6eee05c..000000000 --- a/vendor/github.com/openshift/api/image/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1045 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - 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 *DockerImageReference) DeepCopyInto(out *DockerImageReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerImageReference. -func (in *DockerImageReference) DeepCopy() *DockerImageReference { - if in == nil { - return nil - } - out := new(DockerImageReference) - 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 - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.DockerImageMetadata.DeepCopyInto(&out.DockerImageMetadata) - if in.DockerImageLayers != nil { - in, out := &in.DockerImageLayers, &out.DockerImageLayers - *out = make([]ImageLayer, len(*in)) - copy(*out, *in) - } - if in.Signatures != nil { - in, out := &in.Signatures, &out.Signatures - *out = make([]ImageSignature, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DockerImageSignatures != nil { - in, out := &in.DockerImageSignatures, &out.DockerImageSignatures - *out = make([][]byte, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = make([]byte, len(*in)) - copy(*out, *in) - } - } - } - if in.DockerImageManifests != nil { - in, out := &in.DockerImageManifests, &out.DockerImageManifests - *out = make([]ImageManifest, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Image) 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 *ImageBlobReferences) DeepCopyInto(out *ImageBlobReferences) { - *out = *in - if in.Layers != nil { - in, out := &in.Layers, &out.Layers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Config != nil { - in, out := &in.Config, &out.Config - *out = new(string) - **out = **in - } - if in.Manifests != nil { - in, out := &in.Manifests, &out.Manifests - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageBlobReferences. -func (in *ImageBlobReferences) DeepCopy() *ImageBlobReferences { - if in == nil { - return nil - } - out := new(ImageBlobReferences) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageImportSpec) DeepCopyInto(out *ImageImportSpec) { - *out = *in - out.From = in.From - if in.To != nil { - in, out := &in.To, &out.To - *out = new(corev1.LocalObjectReference) - **out = **in - } - out.ImportPolicy = in.ImportPolicy - out.ReferencePolicy = in.ReferencePolicy - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageImportSpec. -func (in *ImageImportSpec) DeepCopy() *ImageImportSpec { - if in == nil { - return nil - } - out := new(ImageImportSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageImportStatus) DeepCopyInto(out *ImageImportStatus) { - *out = *in - in.Status.DeepCopyInto(&out.Status) - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - (*in).DeepCopyInto(*out) - } - if in.Manifests != nil { - in, out := &in.Manifests, &out.Manifests - *out = make([]Image, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageImportStatus. -func (in *ImageImportStatus) DeepCopy() *ImageImportStatus { - if in == nil { - return nil - } - out := new(ImageImportStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageLayer) DeepCopyInto(out *ImageLayer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageLayer. -func (in *ImageLayer) DeepCopy() *ImageLayer { - if in == nil { - return nil - } - out := new(ImageLayer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageLayerData) DeepCopyInto(out *ImageLayerData) { - *out = *in - if in.LayerSize != nil { - in, out := &in.LayerSize, &out.LayerSize - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageLayerData. -func (in *ImageLayerData) DeepCopy() *ImageLayerData { - if in == nil { - return nil - } - out := new(ImageLayerData) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageList) DeepCopyInto(out *ImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Image, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageList. -func (in *ImageList) DeepCopy() *ImageList { - if in == nil { - return nil - } - out := new(ImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageList) 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 *ImageLookupPolicy) DeepCopyInto(out *ImageLookupPolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageLookupPolicy. -func (in *ImageLookupPolicy) DeepCopy() *ImageLookupPolicy { - if in == nil { - return nil - } - out := new(ImageLookupPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageManifest) DeepCopyInto(out *ImageManifest) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageManifest. -func (in *ImageManifest) DeepCopy() *ImageManifest { - if in == nil { - return nil - } - out := new(ImageManifest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageSignature) DeepCopyInto(out *ImageSignature) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Content != nil { - in, out := &in.Content, &out.Content - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]SignatureCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SignedClaims != nil { - in, out := &in.SignedClaims, &out.SignedClaims - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Created != nil { - in, out := &in.Created, &out.Created - *out = (*in).DeepCopy() - } - if in.IssuedBy != nil { - in, out := &in.IssuedBy, &out.IssuedBy - *out = new(SignatureIssuer) - **out = **in - } - if in.IssuedTo != nil { - in, out := &in.IssuedTo, &out.IssuedTo - *out = new(SignatureSubject) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageSignature. -func (in *ImageSignature) DeepCopy() *ImageSignature { - if in == nil { - return nil - } - out := new(ImageSignature) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageSignature) 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 *ImageStream) DeepCopyInto(out *ImageStream) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStream. -func (in *ImageStream) DeepCopy() *ImageStream { - if in == nil { - return nil - } - out := new(ImageStream) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStream) 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 *ImageStreamImage) DeepCopyInto(out *ImageStreamImage) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Image.DeepCopyInto(&out.Image) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamImage. -func (in *ImageStreamImage) DeepCopy() *ImageStreamImage { - if in == nil { - return nil - } - out := new(ImageStreamImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamImage) 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 *ImageStreamImport) DeepCopyInto(out *ImageStreamImport) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamImport. -func (in *ImageStreamImport) DeepCopy() *ImageStreamImport { - if in == nil { - return nil - } - out := new(ImageStreamImport) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamImport) 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 *ImageStreamImportSpec) DeepCopyInto(out *ImageStreamImportSpec) { - *out = *in - if in.Repository != nil { - in, out := &in.Repository, &out.Repository - *out = new(RepositoryImportSpec) - **out = **in - } - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]ImageImportSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamImportSpec. -func (in *ImageStreamImportSpec) DeepCopy() *ImageStreamImportSpec { - if in == nil { - return nil - } - out := new(ImageStreamImportSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStreamImportStatus) DeepCopyInto(out *ImageStreamImportStatus) { - *out = *in - if in.Import != nil { - in, out := &in.Import, &out.Import - *out = new(ImageStream) - (*in).DeepCopyInto(*out) - } - if in.Repository != nil { - in, out := &in.Repository, &out.Repository - *out = new(RepositoryImportStatus) - (*in).DeepCopyInto(*out) - } - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]ImageImportStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamImportStatus. -func (in *ImageStreamImportStatus) DeepCopy() *ImageStreamImportStatus { - if in == nil { - return nil - } - out := new(ImageStreamImportStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStreamLayers) DeepCopyInto(out *ImageStreamLayers) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Blobs != nil { - in, out := &in.Blobs, &out.Blobs - *out = make(map[string]ImageLayerData, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make(map[string]ImageBlobReferences, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamLayers. -func (in *ImageStreamLayers) DeepCopy() *ImageStreamLayers { - if in == nil { - return nil - } - out := new(ImageStreamLayers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamLayers) 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 *ImageStreamList) DeepCopyInto(out *ImageStreamList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageStream, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamList. -func (in *ImageStreamList) DeepCopy() *ImageStreamList { - if in == nil { - return nil - } - out := new(ImageStreamList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamList) 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 *ImageStreamMapping) DeepCopyInto(out *ImageStreamMapping) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Image.DeepCopyInto(&out.Image) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamMapping. -func (in *ImageStreamMapping) DeepCopy() *ImageStreamMapping { - if in == nil { - return nil - } - out := new(ImageStreamMapping) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamMapping) 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 *ImageStreamSpec) DeepCopyInto(out *ImageStreamSpec) { - *out = *in - out.LookupPolicy = in.LookupPolicy - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]TagReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamSpec. -func (in *ImageStreamSpec) DeepCopy() *ImageStreamSpec { - if in == nil { - return nil - } - out := new(ImageStreamSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStreamStatus) DeepCopyInto(out *ImageStreamStatus) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]NamedTagEventList, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamStatus. -func (in *ImageStreamStatus) DeepCopy() *ImageStreamStatus { - if in == nil { - return nil - } - out := new(ImageStreamStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageStreamTag) DeepCopyInto(out *ImageStreamTag) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Tag != nil { - in, out := &in.Tag, &out.Tag - *out = new(TagReference) - (*in).DeepCopyInto(*out) - } - out.LookupPolicy = in.LookupPolicy - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]TagEventCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Image.DeepCopyInto(&out.Image) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamTag. -func (in *ImageStreamTag) DeepCopy() *ImageStreamTag { - if in == nil { - return nil - } - out := new(ImageStreamTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamTag) 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 *ImageStreamTagList) DeepCopyInto(out *ImageStreamTagList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageStreamTag, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageStreamTagList. -func (in *ImageStreamTagList) DeepCopy() *ImageStreamTagList { - if in == nil { - return nil - } - out := new(ImageStreamTagList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageStreamTagList) 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 *ImageTag) DeepCopyInto(out *ImageTag) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = new(TagReference) - (*in).DeepCopyInto(*out) - } - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(NamedTagEventList) - (*in).DeepCopyInto(*out) - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(Image) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTag. -func (in *ImageTag) DeepCopy() *ImageTag { - if in == nil { - return nil - } - out := new(ImageTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageTag) 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 *ImageTagList) DeepCopyInto(out *ImageTagList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageTag, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageTagList. -func (in *ImageTagList) DeepCopy() *ImageTagList { - if in == nil { - return nil - } - out := new(ImageTagList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageTagList) 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 *NamedTagEventList) DeepCopyInto(out *NamedTagEventList) { - *out = *in - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]TagEvent, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]TagEventCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedTagEventList. -func (in *NamedTagEventList) DeepCopy() *NamedTagEventList { - if in == nil { - return nil - } - out := new(NamedTagEventList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryImportSpec) DeepCopyInto(out *RepositoryImportSpec) { - *out = *in - out.From = in.From - out.ImportPolicy = in.ImportPolicy - out.ReferencePolicy = in.ReferencePolicy - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryImportSpec. -func (in *RepositoryImportSpec) DeepCopy() *RepositoryImportSpec { - if in == nil { - return nil - } - out := new(RepositoryImportSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryImportStatus) DeepCopyInto(out *RepositoryImportStatus) { - *out = *in - in.Status.DeepCopyInto(&out.Status) - if in.Images != nil { - in, out := &in.Images, &out.Images - *out = make([]ImageImportStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalTags != nil { - in, out := &in.AdditionalTags, &out.AdditionalTags - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryImportStatus. -func (in *RepositoryImportStatus) DeepCopy() *RepositoryImportStatus { - if in == nil { - return nil - } - out := new(RepositoryImportStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretList) DeepCopyInto(out *SecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Secret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList. -func (in *SecretList) DeepCopy() *SecretList { - if in == nil { - return nil - } - out := new(SecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecretList) 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 *SignatureCondition) DeepCopyInto(out *SignatureCondition) { - *out = *in - in.LastProbeTime.DeepCopyInto(&out.LastProbeTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureCondition. -func (in *SignatureCondition) DeepCopy() *SignatureCondition { - if in == nil { - return nil - } - out := new(SignatureCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SignatureGenericEntity) DeepCopyInto(out *SignatureGenericEntity) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureGenericEntity. -func (in *SignatureGenericEntity) DeepCopy() *SignatureGenericEntity { - if in == nil { - return nil - } - out := new(SignatureGenericEntity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SignatureIssuer) DeepCopyInto(out *SignatureIssuer) { - *out = *in - out.SignatureGenericEntity = in.SignatureGenericEntity - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureIssuer. -func (in *SignatureIssuer) DeepCopy() *SignatureIssuer { - if in == nil { - return nil - } - out := new(SignatureIssuer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SignatureSubject) DeepCopyInto(out *SignatureSubject) { - *out = *in - out.SignatureGenericEntity = in.SignatureGenericEntity - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SignatureSubject. -func (in *SignatureSubject) DeepCopy() *SignatureSubject { - if in == nil { - return nil - } - out := new(SignatureSubject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagEvent) DeepCopyInto(out *TagEvent) { - *out = *in - in.Created.DeepCopyInto(&out.Created) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagEvent. -func (in *TagEvent) DeepCopy() *TagEvent { - if in == nil { - return nil - } - out := new(TagEvent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagEventCondition) DeepCopyInto(out *TagEventCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagEventCondition. -func (in *TagEventCondition) DeepCopy() *TagEventCondition { - if in == nil { - return nil - } - out := new(TagEventCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagImportPolicy) DeepCopyInto(out *TagImportPolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagImportPolicy. -func (in *TagImportPolicy) DeepCopy() *TagImportPolicy { - if in == nil { - return nil - } - out := new(TagImportPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagReference) DeepCopyInto(out *TagReference) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.From != nil { - in, out := &in.From, &out.From - *out = new(corev1.ObjectReference) - **out = **in - } - if in.Generation != nil { - in, out := &in.Generation, &out.Generation - *out = new(int64) - **out = **in - } - out.ImportPolicy = in.ImportPolicy - out.ReferencePolicy = in.ReferencePolicy - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagReference. -func (in *TagReference) DeepCopy() *TagReference { - if in == nil { - return nil - } - out := new(TagReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagReferencePolicy) DeepCopyInto(out *TagReferencePolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagReferencePolicy. -func (in *TagReferencePolicy) DeepCopy() *TagReferencePolicy { - if in == nil { - return nil - } - out := new(TagReferencePolicy) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/image/v1/zz_generated.model_name.go deleted file mode 100644 index e1c8b2bc9..000000000 --- a/vendor/github.com/openshift/api/image/v1/zz_generated.model_name.go +++ /dev/null @@ -1,196 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DockerImageReference) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.DockerImageReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Image) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.Image" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageBlobReferences) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageBlobReferences" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageImportSpec) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageImportSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageImportStatus) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageImportStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageLayer) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageLayer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageLayerData) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageLayerData" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageLookupPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageLookupPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageManifest) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageManifest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageSignature) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageSignature" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStream) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStream" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamImage) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamImage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamImport) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamImport" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamImportSpec) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamImportSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamImportStatus) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamImportStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamLayers) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamLayers" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamMapping) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamMapping" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamSpec) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamStatus) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamTag) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamTag" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageStreamTagList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageStreamTagList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageTag) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageTag" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageTagList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.ImageTagList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedTagEventList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.NamedTagEventList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RepositoryImportSpec) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.RepositoryImportSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RepositoryImportStatus) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.RepositoryImportStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretList) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.SecretList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SignatureCondition) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.SignatureCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SignatureGenericEntity) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.SignatureGenericEntity" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SignatureIssuer) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.SignatureIssuer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SignatureSubject) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.SignatureSubject" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagEvent) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.TagEvent" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagEventCondition) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.TagEventCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagImportPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.TagImportPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagReference) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.TagReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagReferencePolicy) OpenAPIModelName() string { - return "com.github.openshift.api.image.v1.TagReferencePolicy" -} diff --git a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 9671768f6..000000000 --- a/vendor/github.com/openshift/api/image/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,444 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_DockerImageReference = map[string]string{ - "": "DockerImageReference points to a container image.", - "Registry": "Registry is the registry that contains the container image", - "Namespace": "Namespace is the namespace that contains the container image", - "Name": "Name is the name of the container image", - "Tag": "Tag is which tag of the container image is being referenced", - "ID": "ID is the identifier for the container image", -} - -func (DockerImageReference) SwaggerDoc() map[string]string { - return map_DockerImageReference -} - -var map_Image = map[string]string{ - "": "Image is an immutable representation of a container image and its metadata at a point in time. Images are named by taking a hash of their contents (metadata and content) and any change in format, content, or metadata results in a new name. The images resource is primarily for use by cluster administrators and integrations like the cluster image registry - end users, instead, access images via the imagestreamtags or imagestreamimages resources. While image metadata is stored in the API, any integration that implements the container image registry API must provide its own storage for the raw manifest data, image config, and layer contents.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "dockerImageReference": "dockerImageReference is the string that can be used to pull this image.", - "dockerImageMetadata": "dockerImageMetadata contains metadata about this image", - "dockerImageMetadataVersion": "dockerImageMetadataVersion conveys the version of the object, which if empty defaults to \"1.0\"", - "dockerImageManifest": "dockerImageManifest is the raw JSON of the manifest", - "dockerImageLayers": "dockerImageLayers represents the layers in the image. May not be set if the image does not define that data or if the image represents a manifest list.", - "signatures": "signatures holds all signatures of the image.", - "dockerImageSignatures": "dockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.", - "dockerImageManifestMediaType": "dockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.", - "dockerImageConfig": "dockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2. Will not be set when the image represents a manifest list.", - "dockerImageManifests": "dockerImageManifests holds information about sub-manifests when the image represents a manifest list. When this field is present, no DockerImageLayers should be specified.", -} - -func (Image) SwaggerDoc() map[string]string { - return map_Image -} - -var map_ImageBlobReferences = map[string]string{ - "": "ImageBlobReferences describes the blob references within an image.", - "imageMissing": "imageMissing is true if the image is referenced by the image stream but the image object has been deleted from the API by an administrator. When this field is set, layers and config fields may be empty and callers that depend on the image metadata should consider the image to be unavailable for download or viewing.", - "layers": "layers is the list of blobs that compose this image, from base layer to top layer. All layers referenced by this array will be defined in the blobs map. Some images may have zero layers.", - "config": "config, if set, is the blob that contains the image config. Some images do not have separate config blobs and this field will be set to nil if so.", - "manifests": "manifests is the list of other image names that this image points to. For a single architecture image, it is empty. For a multi-arch image, it consists of the digests of single architecture images, such images shouldn't have layers nor config.", -} - -func (ImageBlobReferences) SwaggerDoc() map[string]string { - return map_ImageBlobReferences -} - -var map_ImageImportSpec = map[string]string{ - "": "ImageImportSpec describes a request to import a specific image.", - "from": "from is the source of an image to import; only kind DockerImage is allowed", - "to": "to is a tag in the current image stream to assign the imported image to, if name is not specified the default tag from from.name will be used", - "importPolicy": "importPolicy is the policy controlling how the image is imported", - "referencePolicy": "referencePolicy defines how other components should consume the image", - "includeManifest": "includeManifest determines if the manifest for each image is returned in the response", -} - -func (ImageImportSpec) SwaggerDoc() map[string]string { - return map_ImageImportSpec -} - -var map_ImageImportStatus = map[string]string{ - "": "ImageImportStatus describes the result of an image import.", - "status": "status is the status of the image import, including errors encountered while retrieving the image", - "image": "image is the metadata of that image, if the image was located", - "tag": "tag is the tag this image was located under, if any", - "manifests": "manifests holds sub-manifests metadata when importing a manifest list", -} - -func (ImageImportStatus) SwaggerDoc() map[string]string { - return map_ImageImportStatus -} - -var map_ImageLayer = map[string]string{ - "": "ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.", - "name": "name of the layer as defined by the underlying store.", - "size": "size of the layer in bytes as defined by the underlying store.", - "mediaType": "mediaType of the referenced object.", -} - -func (ImageLayer) SwaggerDoc() map[string]string { - return map_ImageLayer -} - -var map_ImageLayerData = map[string]string{ - "": "ImageLayerData contains metadata about an image layer.", - "size": "size of the layer in bytes as defined by the underlying store. This field is optional if the necessary information about size is not available.", - "mediaType": "mediaType of the referenced object.", -} - -func (ImageLayerData) SwaggerDoc() map[string]string { - return map_ImageLayerData -} - -var map_ImageList = map[string]string{ - "": "ImageList is a list of Image objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of images", -} - -func (ImageList) SwaggerDoc() map[string]string { - return map_ImageList -} - -var map_ImageLookupPolicy = map[string]string{ - "": "ImageLookupPolicy describes how an image stream can be used to override the image references used by pods, builds, and other resources in a namespace.", - "local": "local will change the docker short image references (like \"mysql\" or \"php:latest\") on objects in this namespace to the image ID whenever they match this image stream, instead of reaching out to a remote registry. The name will be fully qualified to an image ID if found. The tag's referencePolicy is taken into account on the replaced value. Only works within the current namespace.", -} - -func (ImageLookupPolicy) SwaggerDoc() map[string]string { - return map_ImageLookupPolicy -} - -var map_ImageManifest = map[string]string{ - "": "ImageManifest represents sub-manifests of a manifest list. The Digest field points to a regular Image object.", - "digest": "digest is the unique identifier for the manifest. It refers to an Image object.", - "mediaType": "mediaType defines the type of the manifest, possible values are application/vnd.oci.image.manifest.v1+json, application/vnd.docker.distribution.manifest.v2+json or application/vnd.docker.distribution.manifest.v1+json.", - "manifestSize": "manifestSize represents the size of the raw object contents, in bytes.", - "architecture": "architecture specifies the supported CPU architecture, for example `amd64` or `ppc64le`.", - "os": "os specifies the operating system, for example `linux`.", - "variant": "variant is an optional field repreenting a variant of the CPU, for example v6 to specify a particular CPU variant of the ARM CPU.", -} - -func (ImageManifest) SwaggerDoc() map[string]string { - return map_ImageManifest -} - -var map_ImageSignature = map[string]string{ - "": "ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims as long as the signature is trusted. Based on this information it is possible to restrict runnable images to those matching cluster-wide policy. Mandatory fields should be parsed by clients doing image verification. The others are parsed from signature's content by the server. They serve just an informative purpose.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "type": "Required: Describes a type of stored blob.", - "content": "Required: An opaque binary string which is an image's signature.", - "conditions": "conditions represent the latest available observations of a signature's current state.", - "imageIdentity": "A human readable string representing image's identity. It could be a product name and version, or an image pull spec (e.g. \"registry.access.redhat.com/rhel7/rhel:7.2\").", - "signedClaims": "Contains claims from the signature.", - "created": "If specified, it is the time of signature's creation.", - "issuedBy": "If specified, it holds information about an issuer of signing certificate or key (a person or entity who signed the signing certificate or key).", - "issuedTo": "If specified, it holds information about a subject of signing certificate or key (a person or entity who signed the image).", -} - -func (ImageSignature) SwaggerDoc() map[string]string { - return map_ImageSignature -} - -var map_ImageStream = map[string]string{ - "": "An ImageStream stores a mapping of tags to images, metadata overrides that are applied when images are tagged in a stream, and an optional reference to a container image repository on a registry. Users typically update the spec.tags field to point to external images which are imported from container registries using credentials in your namespace with the pull secret type, or to existing image stream tags and images which are immediately accessible for tagging or pulling. The history of images applied to a tag is visible in the status.tags field and any user who can view an image stream is allowed to tag that image into their own image streams. Access to pull images from the integrated registry is granted by having the \"get imagestreams/layers\" permission on a given image stream. Users may remove a tag by deleting the imagestreamtag resource, which causes both spec and status for that tag to be removed. Image stream history is retained until an administrator runs the prune operation, which removes references that are no longer in use. To preserve a historical image, ensure there is a tag in spec pointing to that image by its digest.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec describes the desired state of this stream", - "status": "status describes the current state of this stream", -} - -func (ImageStream) SwaggerDoc() map[string]string { - return map_ImageStream -} - -var map_ImageStreamImage = map[string]string{ - "": "ImageStreamImage represents an Image that is retrieved by image name from an ImageStream. User interfaces and regular users can use this resource to access the metadata details of a tagged image in the image stream history for viewing, since Image resources are not directly accessible to end users. A not found error will be returned if no such image is referenced by a tag within the ImageStream. Images are created when spec tags are set on an image stream that represent an image in an external registry, when pushing to the integrated registry, or when tagging an existing image from one image stream to another. The name of an image stream image is in the form \"@\", where the digest is the content addressible identifier for the image (sha256:xxxxx...). You can use ImageStreamImages as the from.kind of an image stream spec tag to reference an image exactly. The only operations supported on the imagestreamimage endpoint are retrieving the image.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "image": "image associated with the ImageStream and image name.", -} - -func (ImageStreamImage) SwaggerDoc() map[string]string { - return map_ImageStreamImage -} - -var map_ImageStreamImport = map[string]string{ - "": "The image stream import resource provides an easy way for a user to find and import container images from other container image registries into the server. Individual images or an entire image repository may be imported, and users may choose to see the results of the import prior to tagging the resulting images into the specified image stream.\n\nThis API is intended for end-user tools that need to see the metadata of the image prior to import (for instance, to generate an application from it). Clients that know the desired image can continue to create spec.tags directly into their image streams.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is a description of the images that the user wishes to import", - "status": "status is the result of importing the image", -} - -func (ImageStreamImport) SwaggerDoc() map[string]string { - return map_ImageStreamImport -} - -var map_ImageStreamImportSpec = map[string]string{ - "": "ImageStreamImportSpec defines what images should be imported.", - "import": "import indicates whether to perform an import - if so, the specified tags are set on the spec and status of the image stream defined by the type meta.", - "repository": "repository is an optional import of an entire container image repository. A maximum limit on the number of tags imported this way is imposed by the server.", - "images": "images are a list of individual images to import.", -} - -func (ImageStreamImportSpec) SwaggerDoc() map[string]string { - return map_ImageStreamImportSpec -} - -var map_ImageStreamImportStatus = map[string]string{ - "": "ImageStreamImportStatus contains information about the status of an image stream import.", - "import": "import is the image stream that was successfully updated or created when 'to' was set.", - "repository": "repository is set if spec.repository was set to the outcome of the import", - "images": "images is set with the result of importing spec.images", -} - -func (ImageStreamImportStatus) SwaggerDoc() map[string]string { - return map_ImageStreamImportStatus -} - -var map_ImageStreamLayers = map[string]string{ - "": "ImageStreamLayers describes information about the layers referenced by images in this image stream.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "blobs": "blobs is a map of blob name to metadata about the blob.", - "images": "images is a map between an image name and the names of the blobs and config that comprise the image.", -} - -func (ImageStreamLayers) SwaggerDoc() map[string]string { - return map_ImageStreamLayers -} - -var map_ImageStreamList = map[string]string{ - "": "ImageStreamList is a list of ImageStream objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of imageStreams", -} - -func (ImageStreamList) SwaggerDoc() map[string]string { - return map_ImageStreamList -} - -var map_ImageStreamMapping = map[string]string{ - "": "ImageStreamMapping represents a mapping from a single image stream tag to a container image as well as the reference to the container image stream the image came from. This resource is used by privileged integrators to create an image resource and to associate it with an image stream in the status tags field. Creating an ImageStreamMapping will allow any user who can view the image stream to tag or pull that image, so only create mappings where the user has proven they have access to the image contents directly. The only operation supported for this resource is create and the metadata name and namespace should be set to the image stream containing the tag that should be updated.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "image": "image is a container image.", - "tag": "tag is a string value this image can be located with inside the stream.", -} - -func (ImageStreamMapping) SwaggerDoc() map[string]string { - return map_ImageStreamMapping -} - -var map_ImageStreamSpec = map[string]string{ - "": "ImageStreamSpec represents options for ImageStreams.", - "lookupPolicy": "lookupPolicy controls how other resources reference images within this namespace.", - "dockerImageRepository": "dockerImageRepository is optional, if specified this stream is backed by a container repository on this server Deprecated: This field is deprecated as of v3.7 and will be removed in a future release. Specify the source for the tags to be imported in each tag via the spec.tags.from reference instead.", - "tags": "tags map arbitrary string values to specific image locators", -} - -func (ImageStreamSpec) SwaggerDoc() map[string]string { - return map_ImageStreamSpec -} - -var map_ImageStreamStatus = map[string]string{ - "": "ImageStreamStatus contains information about the state of this image stream.", - "dockerImageRepository": "dockerImageRepository represents the effective location this stream may be accessed at. May be empty until the server determines where the repository is located", - "publicDockerImageRepository": "publicDockerImageRepository represents the public location from where the image can be pulled outside the cluster. This field may be empty if the administrator has not exposed the integrated registry externally.", - "tags": "tags are a historical record of images associated with each tag. The first entry in the TagEvent array is the currently tagged image.", -} - -func (ImageStreamStatus) SwaggerDoc() map[string]string { - return map_ImageStreamStatus -} - -var map_ImageStreamTag = map[string]string{ - "": "ImageStreamTag represents an Image that is retrieved by tag name from an ImageStream. Use this resource to interact with the tags and images in an image stream by tag, or to see the image details for a particular tag. The image associated with this resource is the most recently successfully tagged, imported, or pushed image (as described in the image stream status.tags.items list for this tag). If an import is in progress or has failed the previous image will be shown. Deleting an image stream tag clears both the status and spec fields of an image stream. If no image can be retrieved for a given tag, a not found error will be returned.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "tag": "tag is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.", - "generation": "generation is the current generation of the tagged image - if tag is provided and this value is not equal to the tag generation, a user has requested an import that has not completed, or conditions will be filled out indicating any error.", - "lookupPolicy": "lookupPolicy indicates whether this tag will handle image references in this namespace.", - "conditions": "conditions is an array of conditions that apply to the image stream tag.", - "image": "image associated with the ImageStream and tag.", -} - -func (ImageStreamTag) SwaggerDoc() map[string]string { - return map_ImageStreamTag -} - -var map_ImageStreamTagList = map[string]string{ - "": "ImageStreamTagList is a list of ImageStreamTag objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of image stream tags", -} - -func (ImageStreamTagList) SwaggerDoc() map[string]string { - return map_ImageStreamTagList -} - -var map_ImageTag = map[string]string{ - "": "ImageTag represents a single tag within an image stream and includes the spec, the status history, and the currently referenced image (if any) of the provided tag. This type replaces the ImageStreamTag by providing a full view of the tag. ImageTags are returned for every spec or status tag present on the image stream. If no tag exists in either form, a not found error will be returned by the API. A create operation will succeed if no spec tag has already been defined and the spec field is set. Delete will remove both spec and status elements from the image stream.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the spec tag associated with this image stream tag, and it may be null if only pushes have occurred to this image stream.", - "status": "status is the status tag details associated with this image stream tag, and it may be null if no push or import has been performed.", - "image": "image is the details of the most recent image stream status tag, and it may be null if import has not completed or an administrator has deleted the image object. To verify this is the most recent image, you must verify the generation of the most recent status.items entry matches the spec tag (if a spec tag is set). This field will not be set when listing image tags.", -} - -func (ImageTag) SwaggerDoc() map[string]string { - return map_ImageTag -} - -var map_ImageTagList = map[string]string{ - "": "ImageTagList is a list of ImageTag objects. When listing image tags, the image field is not populated. Tags are returned in alphabetical order by image stream and then tag.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of image stream tags", -} - -func (ImageTagList) SwaggerDoc() map[string]string { - return map_ImageTagList -} - -var map_NamedTagEventList = map[string]string{ - "": "NamedTagEventList relates a tag to its image history.", - "tag": "tag is the tag for which the history is recorded", - "items": "Standard object's metadata.", - "conditions": "conditions is an array of conditions that apply to the tag event list.", -} - -func (NamedTagEventList) SwaggerDoc() map[string]string { - return map_NamedTagEventList -} - -var map_RepositoryImportSpec = map[string]string{ - "": "RepositoryImportSpec describes a request to import images from a container image repository.", - "from": "from is the source for the image repository to import; only kind DockerImage and a name of a container image repository is allowed", - "importPolicy": "importPolicy is the policy controlling how the image is imported", - "referencePolicy": "referencePolicy defines how other components should consume the image", - "includeManifest": "includeManifest determines if the manifest for each image is returned in the response", -} - -func (RepositoryImportSpec) SwaggerDoc() map[string]string { - return map_RepositoryImportSpec -} - -var map_RepositoryImportStatus = map[string]string{ - "": "RepositoryImportStatus describes the result of an image repository import", - "status": "status reflects whether any failure occurred during import", - "images": "images is a list of images successfully retrieved by the import of the repository.", - "additionalTags": "additionalTags are tags that exist in the repository but were not imported because a maximum limit of automatic imports was applied.", -} - -func (RepositoryImportStatus) SwaggerDoc() map[string]string { - return map_RepositoryImportStatus -} - -var map_SignatureCondition = map[string]string{ - "": "SignatureCondition describes an image signature condition of particular kind at particular probe time.", - "type": "type of signature condition, Complete or Failed.", - "status": "status of the condition, one of True, False, Unknown.", - "lastProbeTime": "Last time the condition was checked.", - "lastTransitionTime": "Last time the condition transit from one status to another.", - "reason": "(brief) reason for the condition's last transition.", - "message": "Human readable message indicating details about last transition.", -} - -func (SignatureCondition) SwaggerDoc() map[string]string { - return map_SignatureCondition -} - -var map_SignatureGenericEntity = map[string]string{ - "": "SignatureGenericEntity holds a generic information about a person or entity who is an issuer or a subject of signing certificate or key.", - "organization": "organization name.", - "commonName": "Common name (e.g. openshift-signing-service).", -} - -func (SignatureGenericEntity) SwaggerDoc() map[string]string { - return map_SignatureGenericEntity -} - -var map_SignatureIssuer = map[string]string{ - "": "SignatureIssuer holds information about an issuer of signing certificate or key.", -} - -func (SignatureIssuer) SwaggerDoc() map[string]string { - return map_SignatureIssuer -} - -var map_SignatureSubject = map[string]string{ - "": "SignatureSubject holds information about a person or entity who created the signature.", - "publicKeyID": "If present, it is a human readable key id of public key belonging to the subject used to verify image signature. It should contain at least 64 lowest bits of public key's fingerprint (e.g. 0x685ebe62bf278440).", -} - -func (SignatureSubject) SwaggerDoc() map[string]string { - return map_SignatureSubject -} - -var map_TagEvent = map[string]string{ - "": "TagEvent is used by ImageStreamStatus to keep a historical record of images associated with a tag.", - "created": "created holds the time the TagEvent was created", - "dockerImageReference": "dockerImageReference is the string that can be used to pull this image", - "image": "image is the image", - "generation": "generation is the spec tag generation that resulted in this tag being updated", -} - -func (TagEvent) SwaggerDoc() map[string]string { - return map_TagEvent -} - -var map_TagEventCondition = map[string]string{ - "": "TagEventCondition contains condition information for a tag event.", - "type": "type of tag event condition, currently only ImportSuccess", - "status": "status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "lastTransitionTime is the time the condition transitioned from one status to another.", - "reason": "reason is a brief machine readable explanation for the condition's last transition.", - "message": "message is a human readable description of the details about last transition, complementing reason.", - "generation": "generation is the spec tag generation that this status corresponds to", -} - -func (TagEventCondition) SwaggerDoc() map[string]string { - return map_TagEventCondition -} - -var map_TagImportPolicy = map[string]string{ - "": "TagImportPolicy controls how images related to this tag will be imported.", - "insecure": "insecure is true if the server may bypass certificate verification or connect directly over HTTP during image import.", - "scheduled": "scheduled indicates to the server that this tag should be periodically checked to ensure it is up to date, and imported", - "importMode": "importMode describes how to import an image manifest.", -} - -func (TagImportPolicy) SwaggerDoc() map[string]string { - return map_TagImportPolicy -} - -var map_TagReference = map[string]string{ - "": "TagReference specifies optional annotations for images using this tag and an optional reference to an ImageStreamTag, ImageStreamImage, or DockerImage this tag should track.", - "name": "name of the tag", - "annotations": "Optional; if specified, annotations that are applied to images retrieved via ImageStreamTags.", - "from": "Optional; if specified, a reference to another image that this tag should point to. Valid values are ImageStreamTag, ImageStreamImage, and DockerImage. ImageStreamTag references can only reference a tag within this same ImageStream.", - "reference": "reference states if the tag will be imported. Default value is false, which means the tag will be imported.", - "generation": "generation is a counter that tracks mutations to the spec tag (user intent). When a tag reference is changed the generation is set to match the current stream generation (which is incremented every time spec is changed). Other processes in the system like the image importer observe that the generation of spec tag is newer than the generation recorded in the status and use that as a trigger to import the newest remote tag. To trigger a new import, clients may set this value to zero which will reset the generation to the latest stream generation. Legacy clients will send this value as nil which will be merged with the current tag generation.", - "importPolicy": "importPolicy is information that controls how images may be imported by the server.", - "referencePolicy": "referencePolicy defines how other components should consume the image.", -} - -func (TagReference) SwaggerDoc() map[string]string { - return map_TagReference -} - -var map_TagReferencePolicy = map[string]string{ - "": "TagReferencePolicy describes how pull-specs for images in this image stream tag are generated when image change triggers in deployment configs or builds are resolved. This allows the image stream author to control how images are accessed.", - "type": "type determines how the image pull spec should be transformed when the image stream tag is used in deployment config triggers or new builds. The default value is `Source`, indicating the original location of the image should be used (if imported). The user may also specify `Local`, indicating that the pull spec should point to the integrated container image registry and leverage the registry's ability to proxy the pull to an upstream registry. `Local` allows the credentials used to pull this image to be managed from the image stream's namespace, so others on the platform can access a remote image but have no access to the remote secret. It also allows the image layers to be mirrored into the local registry which the images can still be pulled even if the upstream registry is unavailable.", -} - -func (TagReferencePolicy) SwaggerDoc() map[string]string { - return map_TagReferencePolicy -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/imageregistry/.codegen.yaml b/vendor/github.com/openshift/api/imageregistry/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/imageregistry/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/imageregistry/install.go b/vendor/github.com/openshift/api/imageregistry/install.go deleted file mode 100644 index 4536c8f40..000000000 --- a/vendor/github.com/openshift/api/imageregistry/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package imageregistry - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - imageregistryv1 "github.com/openshift/api/imageregistry/v1" -) - -const ( - GroupName = "imageregistry.operator.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(imageregistryv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/Makefile b/vendor/github.com/openshift/api/imageregistry/v1/Makefile deleted file mode 100644 index ecef2e270..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="imageregistry.operator.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/imageregistry/v1/doc.go b/vendor/github.com/openshift/api/imageregistry/v1/doc.go deleted file mode 100644 index 46761bad0..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// +k8s:deepcopy-gen=package -// +groupName=imageregistry.operator.openshift.io -// +k8s:openapi-model-package=com.github.openshift.api.imageregistry.v1 -package v1 diff --git a/vendor/github.com/openshift/api/imageregistry/v1/register.go b/vendor/github.com/openshift/api/imageregistry/v1/register.go deleted file mode 100644 index b5f708c1b..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/register.go +++ /dev/null @@ -1,48 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - version = "v1" - groupName = "imageregistry.operator.openshift.io" -) - -var ( - scheme = runtime.NewScheme() - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - GroupVersion = schema.GroupVersion{Group: groupName, Version: version} - // Install is a function which adds this version to a scheme - Install = SchemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - AddToScheme(scheme) -} - -// addKnownTypes adds the set of types defined in this package to the supplied scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Config{}, - &ConfigList{}, - &ImagePruner{}, - &ImagePrunerList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/types.go b/vendor/github.com/openshift/api/imageregistry/v1/types.go deleted file mode 100644 index 4fea20540..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/types.go +++ /dev/null @@ -1,609 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - operatorv1 "github.com/openshift/api/operator/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ConfigList is a slice of Config objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []Config `json:"items"` -} - -const ( - // StorageManagementStateManaged indicates the operator is managing the underlying storage. - StorageManagementStateManaged = "Managed" - // StorageManagementStateUnmanaged indicates the operator is not managing the underlying - // storage. - StorageManagementStateUnmanaged = "Unmanaged" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Config is the configuration object for a registry instance managed by -// the registry operator -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=configs,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/519 -// +openshift:file-pattern=operatorOrdering=00 -type Config struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - Spec ImageRegistrySpec `json:"spec"` - // +optional - Status ImageRegistryStatus `json:"status,omitempty"` -} - -// ImageRegistrySpec defines the specs for the running registry. -type ImageRegistrySpec struct { - // operatorSpec allows operator specific configuration to be made. - operatorv1.OperatorSpec `json:",inline"` - // httpSecret is the value needed by the registry to secure uploads, generated by default. - // +optional - HTTPSecret string `json:"httpSecret,omitempty"` - // proxy defines the proxy to be used when calling master api, upstream - // registries, etc. - // +optional - Proxy ImageRegistryConfigProxy `json:"proxy,omitempty"` - // storage details for configuring registry storage, e.g. S3 bucket - // coordinates. - // +optional - Storage ImageRegistryConfigStorage `json:"storage,omitempty"` - // readOnly indicates whether the registry instance should reject attempts - // to push new images or delete existing ones. - // +optional - ReadOnly bool `json:"readOnly,omitempty"` - // disableRedirect controls whether to route all data through the Registry, - // rather than redirecting to the backend. - // +optional - DisableRedirect bool `json:"disableRedirect,omitempty"` - // requests controls how many parallel requests a given registry instance - // will handle before queuing additional requests. - // +optional - // +structType=atomic - Requests ImageRegistryConfigRequests `json:"requests,omitempty"` - // defaultRoute indicates whether an external facing route for the registry - // should be created using the default generated hostname. - // +optional - DefaultRoute bool `json:"defaultRoute,omitempty"` - // routes defines additional external facing routes which should be - // created for the registry. - // +optional - // +listType=atomic - Routes []ImageRegistryConfigRoute `json:"routes,omitempty"` - // replicas determines the number of registry instances to run. - Replicas int32 `json:"replicas"` - // logging is deprecated, use logLevel instead. - // +optional - Logging int64 `json:"logging,omitempty"` - // resources defines the resource requests+limits for the registry pod. - // +optional - // +structType=atomic - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` - // nodeSelector defines the node selection constraints for the registry - // pod. - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations defines the tolerations for the registry pod. - // +optional - // +listType=atomic - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // rolloutStrategy defines rollout strategy for the image registry - // deployment. - // +optional - // +kubebuilder:validation:Pattern=`^(RollingUpdate|Recreate)$` - RolloutStrategy string `json:"rolloutStrategy,omitempty"` - // affinity is a group of node affinity scheduling rules for the image registry pod(s). - // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - // topologySpreadConstraints specify how to spread matching pods among the given topology. - // +optional - // +listType=atomic - TopologySpreadConstraints []corev1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// ImageRegistryStatus reports image registry operational status. -type ImageRegistryStatus struct { - operatorv1.OperatorStatus `json:",inline"` - - // storageManaged is deprecated, please refer to Storage.managementState - // +required - StorageManaged bool `json:"storageManaged"` - // storage indicates the current applied storage configuration of the - // registry. - // +required - Storage ImageRegistryConfigStorage `json:"storage"` -} - -// ImageRegistryConfigProxy defines proxy configuration to be used by registry. -type ImageRegistryConfigProxy struct { - // http defines the proxy to be used by the image registry when - // accessing HTTP endpoints. - // +optional - HTTP string `json:"http,omitempty"` - // https defines the proxy to be used by the image registry when - // accessing HTTPS endpoints. - // +optional - HTTPS string `json:"https,omitempty"` - // noProxy defines a comma-separated list of host names that shouldn't - // go through any proxy. - // +optional - NoProxy string `json:"noProxy,omitempty"` -} - -// ImageRegistryConfigStorageS3CloudFront holds the configuration -// to use Amazon Cloudfront as the storage middleware in a registry. -// https://docs.docker.com/registry/configuration/#cloudfront -type ImageRegistryConfigStorageS3CloudFront struct { - // baseURL contains the SCHEME://HOST[/PATH] at which Cloudfront is served. - BaseURL string `json:"baseURL"` - // privateKey points to secret containing the private key, provided by AWS. - PrivateKey corev1.SecretKeySelector `json:"privateKey"` - // keypairID is key pair ID provided by AWS. - KeypairID string `json:"keypairID"` - // duration is the duration of the Cloudfront session. - // +optional - // +kubebuilder:validation:Format=duration - Duration metav1.Duration `json:"duration,omitempty"` -} - -// ImageRegistryConfigStorageEmptyDir is an place holder to be used when -// when registry is leveraging ephemeral storage. -type ImageRegistryConfigStorageEmptyDir struct{} - -// S3TrustedCASource references a config map with a CA certificate bundle in -// the "openshift-config" namespace. The key for the bundle in the -// config map is "ca-bundle.crt". -type S3TrustedCASource struct { - // name is the metadata.name of the referenced config map. - // This field must adhere to standard config map naming restrictions. - // The name must consist solely of alphanumeric characters, hyphens (-) - // and periods (.). It has a maximum length of 253 characters. - // If this field is not specified or is empty string, the default trust - // bundle will be used. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` - // +optional - Name string `json:"name"` -} - -// ImageRegistryConfigStorageS3 holds the information to configure -// the registry to use the AWS S3 service for backend storage -// https://docs.docker.com/registry/storage-drivers/s3/ -type ImageRegistryConfigStorageS3 struct { - // bucket is the bucket name in which you want to store the registry's - // data. - // Optional, will be generated if not provided. - // +optional - Bucket string `json:"bucket,omitempty"` - // region is the AWS region in which your bucket exists. - // Optional, will be set based on the installed AWS Region. - // +optional - Region string `json:"region,omitempty"` - // regionEndpoint is the endpoint for S3 compatible storage services. - // It should be a valid URL with scheme, e.g. https://s3.example.com. - // Optional, defaults based on the Region that is provided. - // +optional - RegionEndpoint string `json:"regionEndpoint,omitempty"` - // chunkSizeMiB defines the size of the multipart upload chunks of the S3 API. - // The S3 API requires multipart upload chunks to be at least 5MiB. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is 10 MiB. - // The value is an integer number of MiB. - // The minimum value is 5 and the maximum value is 5120 (5 GiB). - // +kubebuilder:validation:Minimum=5 - // +kubebuilder:validation:Maximum=5120 - // +optional - ChunkSizeMiB int32 `json:"chunkSizeMiB,omitempty"` - // encrypt specifies whether the registry stores the image in encrypted - // format or not. - // Optional, defaults to false. - // +optional - Encrypt bool `json:"encrypt,omitempty"` - // keyID is the KMS key ID to use for encryption. - // Optional, Encrypt must be true, or this parameter is ignored. - // +optional - KeyID string `json:"keyID,omitempty"` - // cloudFront configures Amazon Cloudfront as the storage middleware in a - // registry. - // +optional - CloudFront *ImageRegistryConfigStorageS3CloudFront `json:"cloudFront,omitempty"` - // virtualHostedStyle enables using S3 virtual hosted style bucket paths with - // a custom RegionEndpoint - // Optional, defaults to false. - // +optional - VirtualHostedStyle bool `json:"virtualHostedStyle"` - // trustedCA is a reference to a config map containing a CA bundle. The - // image registry and its operator use certificates from this bundle to - // verify S3 server certificates. - // - // The namespace for the config map referenced by trustedCA is - // "openshift-config". The key for the bundle in the config map is - // "ca-bundle.crt". - // +optional - TrustedCA S3TrustedCASource `json:"trustedCA"` -} - -// ImageRegistryConfigStorageGCS holds GCS configuration. -type ImageRegistryConfigStorageGCS struct { - // bucket is the bucket name in which you want to store the registry's - // data. - // Optional, will be generated if not provided. - // +optional - Bucket string `json:"bucket,omitempty"` - // region is the GCS location in which your bucket exists. - // Optional, will be set based on the installed GCS Region. - // +optional - Region string `json:"region,omitempty"` - // projectID is the Project ID of the GCP project that this bucket should - // be associated with. - // +optional - ProjectID string `json:"projectID,omitempty"` - // keyID is the KMS key ID to use for encryption. - // Optional, buckets are encrypted by default on GCP. - // This allows for the use of a custom encryption key. - // +optional - KeyID string `json:"keyID,omitempty"` -} - -// ImageRegistryConfigStorageSwift holds the information to configure -// the registry to use the OpenStack Swift service for backend storage -// https://docs.docker.com/registry/storage-drivers/swift/ -type ImageRegistryConfigStorageSwift struct { - // authURL defines the URL for obtaining an authentication token. - // +optional - AuthURL string `json:"authURL,omitempty"` - // authVersion specifies the OpenStack Auth's version. - // +optional - AuthVersion string `json:"authVersion,omitempty"` - // container defines the name of Swift container where to store the - // registry's data. - // +optional - Container string `json:"container,omitempty"` - // domain specifies Openstack's domain name for Identity v3 API. - // +optional - Domain string `json:"domain,omitempty"` - // domainID specifies Openstack's domain id for Identity v3 API. - // +optional - DomainID string `json:"domainID,omitempty"` - // tenant defines Openstack tenant name to be used by registry. - // +optional - Tenant string `json:"tenant,omitempty"` - // tenant defines Openstack tenant id to be used by registry. - // +optional - TenantID string `json:"tenantID,omitempty"` - // regionName defines Openstack's region in which container exists. - // +optional - RegionName string `json:"regionName,omitempty"` -} - -// ImageRegistryConfigStoragePVC holds Persistent Volume Claims data to -// be used by the registry. -type ImageRegistryConfigStoragePVC struct { - // claim defines the Persisent Volume Claim's name to be used. - // +optional - Claim string `json:"claim,omitempty"` -} - -// ImageRegistryConfigStorageAzure holds the information to configure -// the registry to use Azure Blob Storage for backend storage. -type ImageRegistryConfigStorageAzure struct { - // accountName defines the account to be used by the registry. - // +optional - AccountName string `json:"accountName,omitempty"` - // container defines Azure's container to be used by registry. - // +optional - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern=`^[0-9a-z]+(-[0-9a-z]+)*$` - Container string `json:"container,omitempty"` - // cloudName is the name of the Azure cloud environment to be used by the - // registry. If empty, the operator will set it based on the infrastructure - // object. - // +optional - CloudName string `json:"cloudName,omitempty"` - // networkAccess defines the network access properties for the storage account. - // Defaults to type: External. - // +kubebuilder:default={"type": "External"} - // +optional - NetworkAccess *AzureNetworkAccess `json:"networkAccess,omitempty"` -} - -// AzureNetworkAccess defines the network access properties for the storage account. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Internal' ? true : !has(self.internal)",message="internal is forbidden when type is not Internal" -// +union -type AzureNetworkAccess struct { - // type is the network access level to be used for the storage account. - // type: Internal means the storage account will be private, type: External - // means the storage account will be publicly accessible. - // Internal storage accounts are only exposed within the cluster's vnet. - // External storage accounts are publicly exposed on the internet. - // When type: Internal is used, a vnetName, subNetName and privateEndpointName - // may optionally be specified. If unspecificed, the image registry operator - // will discover vnet and subnet names, and generate a privateEndpointName. - // Defaults to "External". - // +kubebuilder:default:="External" - // +unionDiscriminator - // +optional - Type AzureNetworkAccessType `json:"type,omitempty"` - // internal defines the vnet and subnet names to configure a private - // endpoint and connect it to the storage account in order to make it - // private. - // when type: Internal and internal is unset, the image registry operator - // will discover vnet and subnet names, and generate a private endpoint - // name. - // +optional - Internal *AzureNetworkAccessInternal `json:"internal,omitempty"` -} - -type AzureNetworkAccessInternal struct { - // networkResourceGroupName is the resource group name where the cluster's vnet - // and subnet are. When omitted, the registry operator will use the cluster - // resource group (from in the infrastructure status). - // If you set a networkResourceGroupName on your install-config.yaml, that - // value will be used automatically (for clusters configured with publish:Internal). - // Note that both vnet and subnet must be in the same resource group. - // It must be between 1 and 90 characters in length and must consist only of - // alphanumeric characters, hyphens (-), periods (.) and underscores (_), and - // not end with a period. - // +kubebuilder:validation:MaxLength=90 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z_.-](?:[0-9A-Za-z_.-]*[0-9A-Za-z_-])?$` - // +optional - NetworkResourceGroupName string `json:"networkResourceGroupName,omitempty"` - // vnetName is the name of the vnet the registry operates in. When omitted, - // the registry operator will discover and set this by using the `kubernetes.io_cluster.` - // tag in the vnet resource. This tag is set automatically by the installer. - // Commonly, this will be the same vnet as the cluster. - // Advanced cluster network configurations should ensure the provided vnetName - // is the vnet of the nodes where the image registry pods are running from. - // It must be between 2 and 64 characters in length and must consist only of - // alphanumeric characters, hyphens (-), periods (.) and underscores (_). - // It must start with an alphanumeric character and end with an alphanumeric character or an underscore. - // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:MinLength=2 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z][0-9A-Za-z_.-]*[0-9A-Za-z_]$` - // +optional - VNetName string `json:"vnetName,omitempty"` - // subnetName is the name of the subnet the registry operates in. When omitted, - // the registry operator will discover and set this by using the `kubernetes.io_cluster.` - // tag in the vnet resource, then using one of listed subnets. - // Advanced cluster network configurations that use network security groups - // to protect subnets should ensure the provided subnetName has access to - // Azure Storage service. - // It must be between 1 and 80 characters in length and must consist only of - // alphanumeric characters, hyphens (-), periods (.) and underscores (_). - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z](?:[0-9A-Za-z_.-]*[0-9A-Za-z_])?$` - // +optional - SubnetName string `json:"subnetName,omitempty"` - // privateEndpointName is the name of the private endpoint for the registry. - // When provided, the registry will use it as the name of the private endpoint - // it will create for the storage account. When omitted, the registry will - // generate one. - // It must be between 2 and 64 characters in length and must consist only of - // alphanumeric characters, hyphens (-), periods (.) and underscores (_). - // It must start with an alphanumeric character and end with an alphanumeric character or an underscore. - // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:MinLength=2 - // +kubebuilder:validation:Pattern=`^[0-9A-Za-z][0-9A-Za-z_.-]*[0-9A-Za-z_]$` - // +optional - PrivateEndpointName string `json:"privateEndpointName,omitempty"` -} - -// AzureNetworkAccessType is the network access level to be used for the storage account. -// +kubebuilder:validation:Enum:="Internal";"External" -type AzureNetworkAccessType string - -const ( - // AzureNetworkAccessTypeInternal means the storage account will be private - AzureNetworkAccessTypeInternal AzureNetworkAccessType = "Internal" - // AzureNetworkAccessTypeExternal means the storage account will be publicly accessible - AzureNetworkAccessTypeExternal AzureNetworkAccessType = "External" -) - -// ImageRegistryConfigStorageIBMCOS holds the information to configure -// the registry to use IBM Cloud Object Storage for backend storage. -type ImageRegistryConfigStorageIBMCOS struct { - // bucket is the bucket name in which you want to store the registry's - // data. - // Optional, will be generated if not provided. - // +optional - Bucket string `json:"bucket,omitempty"` - // location is the IBM Cloud location in which your bucket exists. - // Optional, will be set based on the installed IBM Cloud location. - // +optional - Location string `json:"location,omitempty"` - // resourceGroupName is the name of the IBM Cloud resource group that this - // bucket and its service instance is associated with. - // Optional, will be set based on the installed IBM Cloud resource group. - // +optional - ResourceGroupName string `json:"resourceGroupName,omitempty"` - // resourceKeyCRN is the CRN of the IBM Cloud resource key that is created - // for the service instance. Commonly referred as a service credential and - // must contain HMAC type credentials. - // Optional, will be computed if not provided. - // +optional - // +kubebuilder:validation:Pattern=`^crn:.+:.+:.+:cloud-object-storage:.+:.+:.+:resource-key:.+$` - ResourceKeyCRN string `json:"resourceKeyCRN,omitempty"` - // serviceInstanceCRN is the CRN of the IBM Cloud Object Storage service - // instance that this bucket is associated with. - // Optional, will be computed if not provided. - // +optional - // +kubebuilder:validation:Pattern=`^crn:.+:.+:.+:cloud-object-storage:.+:.+:.+::$` - ServiceInstanceCRN string `json:"serviceInstanceCRN,omitempty"` -} - -// EndpointAccessibility defines the Alibaba VPC endpoint for storage -type EndpointAccessibility string - -// AlibabaEncryptionMethod defines an enumerable type for the encryption mode -type AlibabaEncryptionMethod string - -const ( - // InternalEndpoint sets the VPC endpoint to internal - InternalEndpoint EndpointAccessibility = "Internal" - // PublicEndpoint sets the VPC endpoint to public - PublicEndpoint EndpointAccessibility = "Public" - - // AES256 is an AlibabaEncryptionMethod. This means AES256 encryption - AES256 AlibabaEncryptionMethod = "AES256" - // KMS is an AlibabaEncryptionMethod. This means KMS encryption - KMS AlibabaEncryptionMethod = "KMS" -) - -// EncryptionAlibaba this a union type in kube parlance. Depending on the value for the AlibabaEncryptionMethod, -// different pointers may be used -type EncryptionAlibaba struct { - // method defines the different encrytion modes available - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `AES256`. - // +kubebuilder:validation:Enum="KMS";"AES256" - // +kubebuilder:default="AES256" - // +optional - Method AlibabaEncryptionMethod `json:"method,omitempty"` - - // kms (key management service) is an encryption type that holds the struct for KMS KeyID - // +optional - KMS *KMSEncryptionAlibaba `json:"kms,omitempty"` -} - -type KMSEncryptionAlibaba struct { - // keyID holds the KMS encryption key ID - // +required - // +kubebuilder:validation:MinLength=1 - KeyID string `json:"keyID"` -} - -// ImageRegistryConfigStorageAlibabaOSS holds Alibaba Cloud OSS configuration. -// Configures the registry to use Alibaba Cloud Object Storage Service for backend storage. -// More about oss, you can look at the [official documentation](https://www.alibabacloud.com/help/product/31815.htm) -type ImageRegistryConfigStorageAlibabaOSS struct { - // bucket is the bucket name in which you want to store the registry's data. - // About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default will be autogenerated in the form of -image-registry-- - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:Pattern=`^[0-9a-z]+(-[0-9a-z]+)*$` - // +optional - Bucket string `json:"bucket,omitempty"` - // region is the Alibaba Cloud Region in which your bucket exists. - // For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default will be based on the installed Alibaba Cloud Region. - // +optional - Region string `json:"region,omitempty"` - // endpointAccessibility specifies whether the registry use the OSS VPC internal endpoint - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `Internal`. - // +kubebuilder:validation:Enum="Internal";"Public";"" - // +kubebuilder:default="Internal" - // +optional - EndpointAccessibility EndpointAccessibility `json:"endpointAccessibility,omitempty"` - // encryption specifies whether you would like your data encrypted on the server side. - // More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm) - // +optional - Encryption *EncryptionAlibaba `json:"encryption,omitempty"` -} - -// ImageRegistryConfigStorage describes how the storage should be configured -// for the image registry. -type ImageRegistryConfigStorage struct { - // emptyDir represents ephemeral storage on the pod's host node. - // WARNING: this storage cannot be used with more than 1 replica and - // is not suitable for production use. When the pod is removed from a - // node for any reason, the data in the emptyDir is deleted forever. - // +optional - EmptyDir *ImageRegistryConfigStorageEmptyDir `json:"emptyDir,omitempty"` - // s3 represents configuration that uses Amazon Simple Storage Service. - // +optional - S3 *ImageRegistryConfigStorageS3 `json:"s3,omitempty"` - // gcs represents configuration that uses Google Cloud Storage. - // +optional - GCS *ImageRegistryConfigStorageGCS `json:"gcs,omitempty"` - // swift represents configuration that uses OpenStack Object Storage. - // +optional - Swift *ImageRegistryConfigStorageSwift `json:"swift,omitempty"` - // pvc represents configuration that uses a PersistentVolumeClaim. - // +optional - PVC *ImageRegistryConfigStoragePVC `json:"pvc,omitempty"` - // azure represents configuration that uses Azure Blob Storage. - // +optional - Azure *ImageRegistryConfigStorageAzure `json:"azure,omitempty"` - // ibmcos represents configuration that uses IBM Cloud Object Storage. - // +optional - IBMCOS *ImageRegistryConfigStorageIBMCOS `json:"ibmcos,omitempty"` - // oss represents configuration that uses Alibaba Cloud Object Storage Service. - // +optional - OSS *ImageRegistryConfigStorageAlibabaOSS `json:"oss,omitempty"` - // managementState indicates if the operator manages the underlying - // storage unit. If Managed the operator will remove the storage when - // this operator gets Removed. - // +optional - // +kubebuilder:validation:Pattern=`^(Managed|Unmanaged)$` - ManagementState string `json:"managementState,omitempty"` -} - -// ImageRegistryConfigRequests defines registry limits on requests read and write. -type ImageRegistryConfigRequests struct { - // read defines limits for image registry's reads. - // +optional - Read ImageRegistryConfigRequestsLimits `json:"read,omitempty"` - // write defines limits for image registry's writes. - // +optional - Write ImageRegistryConfigRequestsLimits `json:"write,omitempty"` -} - -// ImageRegistryConfigRequestsLimits holds configuration on the max, enqueued -// and waiting registry's API requests. -type ImageRegistryConfigRequestsLimits struct { - // maxRunning sets the maximum in flight api requests to the registry. - // +optional - MaxRunning int `json:"maxRunning,omitempty"` - // maxInQueue sets the maximum queued api requests to the registry. - // +optional - MaxInQueue int `json:"maxInQueue,omitempty"` - // maxWaitInQueue sets the maximum time a request can wait in the queue - // before being rejected. - // +optional - // +kubebuilder:validation:Format=duration - MaxWaitInQueue metav1.Duration `json:"maxWaitInQueue,omitempty"` -} - -// ImageRegistryConfigRoute holds information on external route access to image -// registry. -type ImageRegistryConfigRoute struct { - // name of the route to be created. - Name string `json:"name"` - // hostname for the route. - // +optional - Hostname string `json:"hostname,omitempty"` - // secretName points to secret containing the certificates to be used - // by the route. - // +optional - SecretName string `json:"secretName,omitempty"` -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go b/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go deleted file mode 100644 index 43aa2b5cf..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/types_imagepruner.go +++ /dev/null @@ -1,117 +0,0 @@ -package v1 - -import ( - "time" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - operatorv1 "github.com/openshift/api/operator/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImagePrunerList is a slice of ImagePruner objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ImagePrunerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - Items []ImagePruner `json:"items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImagePruner is the configuration object for an image registry pruner -// managed by the registry operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=imagepruners,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/555 -// +openshift:file-pattern=operatorOrdering=01 -type ImagePruner struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - Spec ImagePrunerSpec `json:"spec"` - // +optional - Status ImagePrunerStatus `json:"status"` -} - -// ImagePrunerSpec defines the specs for the running image pruner. -type ImagePrunerSpec struct { - // schedule specifies when to execute the job using standard cronjob syntax: https://wikipedia.org/wiki/Cron. - // Defaults to `0 0 * * *`. - // +optional - Schedule string `json:"schedule"` - // suspend specifies whether or not to suspend subsequent executions of this cronjob. - // Defaults to false. - // +optional - Suspend *bool `json:"suspend,omitempty"` - // keepTagRevisions specifies the number of image revisions for a tag in an image stream that will be preserved. - // Defaults to 3. - // +optional - KeepTagRevisions *int `json:"keepTagRevisions,omitempty"` - // keepYoungerThan specifies the minimum age in nanoseconds of an image and its referrers for it to be considered a candidate for pruning. - // DEPRECATED: This field is deprecated in favor of keepYoungerThanDuration. If both are set, this field is ignored and keepYoungerThanDuration takes precedence. - // +optional - KeepYoungerThan *time.Duration `json:"keepYoungerThan,omitempty"` - // keepYoungerThanDuration specifies the minimum age of an image and its referrers for it to be considered a candidate for pruning. - // Defaults to 60m (60 minutes). - // +optional - // +kubebuilder:validation:Format=duration - KeepYoungerThanDuration *metav1.Duration `json:"keepYoungerThanDuration,omitempty"` - // resources defines the resource requests and limits for the image pruner pod. - // +optional - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` - // affinity is a group of node affinity scheduling rules for the image pruner pod. - // +optional - Affinity *corev1.Affinity `json:"affinity,omitempty"` - // nodeSelector defines the node selection constraints for the image pruner pod. - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations defines the node tolerations for the image pruner pod. - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // successfulJobsHistoryLimit specifies how many successful image pruner jobs to retain. - // Defaults to 3 if not set. - // +optional - SuccessfulJobsHistoryLimit *int32 `json:"successfulJobsHistoryLimit,omitempty"` - // failedJobsHistoryLimit specifies how many failed image pruner jobs to retain. - // Defaults to 3 if not set. - // +optional - FailedJobsHistoryLimit *int32 `json:"failedJobsHistoryLimit,omitempty"` - // ignoreInvalidImageReferences indicates whether the pruner can ignore - // errors while parsing image references. - // +optional - IgnoreInvalidImageReferences bool `json:"ignoreInvalidImageReferences,omitempty"` - // logLevel sets the level of log output for the pruner job. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - // +optional - // +kubebuilder:default=Normal - LogLevel operatorv1.LogLevel `json:"logLevel,omitempty"` -} - -// ImagePrunerStatus reports image pruner operational status. -type ImagePrunerStatus struct { - // observedGeneration is the last generation change that has been applied. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // conditions is a list of conditions and their status. - // +optional - Conditions []operatorv1.OperatorCondition `json:"conditions,omitempty"` -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.deepcopy.go deleted file mode 100644 index 335bd2421..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,679 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - time "time" - - operatorv1 "github.com/openshift/api/operator/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AzureNetworkAccess) DeepCopyInto(out *AzureNetworkAccess) { - *out = *in - if in.Internal != nil { - in, out := &in.Internal, &out.Internal - *out = new(AzureNetworkAccessInternal) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureNetworkAccess. -func (in *AzureNetworkAccess) DeepCopy() *AzureNetworkAccess { - if in == nil { - return nil - } - out := new(AzureNetworkAccess) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureNetworkAccessInternal) DeepCopyInto(out *AzureNetworkAccessInternal) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureNetworkAccessInternal. -func (in *AzureNetworkAccessInternal) DeepCopy() *AzureNetworkAccessInternal { - if in == nil { - return nil - } - out := new(AzureNetworkAccessInternal) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Config) DeepCopyInto(out *Config) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. -func (in *Config) DeepCopy() *Config { - if in == nil { - return nil - } - out := new(Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Config) 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 *ConfigList) DeepCopyInto(out *ConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Config, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList. -func (in *ConfigList) DeepCopy() *ConfigList { - if in == nil { - return nil - } - out := new(ConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigList) 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 *EncryptionAlibaba) DeepCopyInto(out *EncryptionAlibaba) { - *out = *in - if in.KMS != nil { - in, out := &in.KMS, &out.KMS - *out = new(KMSEncryptionAlibaba) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionAlibaba. -func (in *EncryptionAlibaba) DeepCopy() *EncryptionAlibaba { - if in == nil { - return nil - } - out := new(EncryptionAlibaba) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImagePruner) DeepCopyInto(out *ImagePruner) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePruner. -func (in *ImagePruner) DeepCopy() *ImagePruner { - if in == nil { - return nil - } - out := new(ImagePruner) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImagePruner) 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 *ImagePrunerList) DeepCopyInto(out *ImagePrunerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImagePruner, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrunerList. -func (in *ImagePrunerList) DeepCopy() *ImagePrunerList { - if in == nil { - return nil - } - out := new(ImagePrunerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImagePrunerList) 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 *ImagePrunerSpec) DeepCopyInto(out *ImagePrunerSpec) { - *out = *in - if in.Suspend != nil { - in, out := &in.Suspend, &out.Suspend - *out = new(bool) - **out = **in - } - if in.KeepTagRevisions != nil { - in, out := &in.KeepTagRevisions, &out.KeepTagRevisions - *out = new(int) - **out = **in - } - if in.KeepYoungerThan != nil { - in, out := &in.KeepYoungerThan, &out.KeepYoungerThan - *out = new(time.Duration) - **out = **in - } - if in.KeepYoungerThanDuration != nil { - in, out := &in.KeepYoungerThanDuration, &out.KeepYoungerThanDuration - *out = new(metav1.Duration) - **out = **in - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - 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([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SuccessfulJobsHistoryLimit != nil { - in, out := &in.SuccessfulJobsHistoryLimit, &out.SuccessfulJobsHistoryLimit - *out = new(int32) - **out = **in - } - if in.FailedJobsHistoryLimit != nil { - in, out := &in.FailedJobsHistoryLimit, &out.FailedJobsHistoryLimit - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrunerSpec. -func (in *ImagePrunerSpec) DeepCopy() *ImagePrunerSpec { - if in == nil { - return nil - } - out := new(ImagePrunerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImagePrunerStatus) DeepCopyInto(out *ImagePrunerStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]operatorv1.OperatorCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePrunerStatus. -func (in *ImagePrunerStatus) DeepCopy() *ImagePrunerStatus { - if in == nil { - return nil - } - out := new(ImagePrunerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigProxy) DeepCopyInto(out *ImageRegistryConfigProxy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigProxy. -func (in *ImageRegistryConfigProxy) DeepCopy() *ImageRegistryConfigProxy { - if in == nil { - return nil - } - out := new(ImageRegistryConfigProxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigRequests) DeepCopyInto(out *ImageRegistryConfigRequests) { - *out = *in - out.Read = in.Read - out.Write = in.Write - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigRequests. -func (in *ImageRegistryConfigRequests) DeepCopy() *ImageRegistryConfigRequests { - if in == nil { - return nil - } - out := new(ImageRegistryConfigRequests) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigRequestsLimits) DeepCopyInto(out *ImageRegistryConfigRequestsLimits) { - *out = *in - out.MaxWaitInQueue = in.MaxWaitInQueue - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigRequestsLimits. -func (in *ImageRegistryConfigRequestsLimits) DeepCopy() *ImageRegistryConfigRequestsLimits { - if in == nil { - return nil - } - out := new(ImageRegistryConfigRequestsLimits) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigRoute) DeepCopyInto(out *ImageRegistryConfigRoute) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigRoute. -func (in *ImageRegistryConfigRoute) DeepCopy() *ImageRegistryConfigRoute { - if in == nil { - return nil - } - out := new(ImageRegistryConfigRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorage) DeepCopyInto(out *ImageRegistryConfigStorage) { - *out = *in - if in.EmptyDir != nil { - in, out := &in.EmptyDir, &out.EmptyDir - *out = new(ImageRegistryConfigStorageEmptyDir) - **out = **in - } - if in.S3 != nil { - in, out := &in.S3, &out.S3 - *out = new(ImageRegistryConfigStorageS3) - (*in).DeepCopyInto(*out) - } - if in.GCS != nil { - in, out := &in.GCS, &out.GCS - *out = new(ImageRegistryConfigStorageGCS) - **out = **in - } - if in.Swift != nil { - in, out := &in.Swift, &out.Swift - *out = new(ImageRegistryConfigStorageSwift) - **out = **in - } - if in.PVC != nil { - in, out := &in.PVC, &out.PVC - *out = new(ImageRegistryConfigStoragePVC) - **out = **in - } - if in.Azure != nil { - in, out := &in.Azure, &out.Azure - *out = new(ImageRegistryConfigStorageAzure) - (*in).DeepCopyInto(*out) - } - if in.IBMCOS != nil { - in, out := &in.IBMCOS, &out.IBMCOS - *out = new(ImageRegistryConfigStorageIBMCOS) - **out = **in - } - if in.OSS != nil { - in, out := &in.OSS, &out.OSS - *out = new(ImageRegistryConfigStorageAlibabaOSS) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorage. -func (in *ImageRegistryConfigStorage) DeepCopy() *ImageRegistryConfigStorage { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageAlibabaOSS) DeepCopyInto(out *ImageRegistryConfigStorageAlibabaOSS) { - *out = *in - if in.Encryption != nil { - in, out := &in.Encryption, &out.Encryption - *out = new(EncryptionAlibaba) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageAlibabaOSS. -func (in *ImageRegistryConfigStorageAlibabaOSS) DeepCopy() *ImageRegistryConfigStorageAlibabaOSS { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageAlibabaOSS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageAzure) DeepCopyInto(out *ImageRegistryConfigStorageAzure) { - *out = *in - if in.NetworkAccess != nil { - in, out := &in.NetworkAccess, &out.NetworkAccess - *out = new(AzureNetworkAccess) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageAzure. -func (in *ImageRegistryConfigStorageAzure) DeepCopy() *ImageRegistryConfigStorageAzure { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageAzure) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageEmptyDir) DeepCopyInto(out *ImageRegistryConfigStorageEmptyDir) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageEmptyDir. -func (in *ImageRegistryConfigStorageEmptyDir) DeepCopy() *ImageRegistryConfigStorageEmptyDir { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageEmptyDir) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageGCS) DeepCopyInto(out *ImageRegistryConfigStorageGCS) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageGCS. -func (in *ImageRegistryConfigStorageGCS) DeepCopy() *ImageRegistryConfigStorageGCS { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageGCS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageIBMCOS) DeepCopyInto(out *ImageRegistryConfigStorageIBMCOS) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageIBMCOS. -func (in *ImageRegistryConfigStorageIBMCOS) DeepCopy() *ImageRegistryConfigStorageIBMCOS { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageIBMCOS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStoragePVC) DeepCopyInto(out *ImageRegistryConfigStoragePVC) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStoragePVC. -func (in *ImageRegistryConfigStoragePVC) DeepCopy() *ImageRegistryConfigStoragePVC { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStoragePVC) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageS3) DeepCopyInto(out *ImageRegistryConfigStorageS3) { - *out = *in - if in.CloudFront != nil { - in, out := &in.CloudFront, &out.CloudFront - *out = new(ImageRegistryConfigStorageS3CloudFront) - (*in).DeepCopyInto(*out) - } - out.TrustedCA = in.TrustedCA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageS3. -func (in *ImageRegistryConfigStorageS3) DeepCopy() *ImageRegistryConfigStorageS3 { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageS3) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageS3CloudFront) DeepCopyInto(out *ImageRegistryConfigStorageS3CloudFront) { - *out = *in - in.PrivateKey.DeepCopyInto(&out.PrivateKey) - out.Duration = in.Duration - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageS3CloudFront. -func (in *ImageRegistryConfigStorageS3CloudFront) DeepCopy() *ImageRegistryConfigStorageS3CloudFront { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageS3CloudFront) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryConfigStorageSwift) DeepCopyInto(out *ImageRegistryConfigStorageSwift) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryConfigStorageSwift. -func (in *ImageRegistryConfigStorageSwift) DeepCopy() *ImageRegistryConfigStorageSwift { - if in == nil { - return nil - } - out := new(ImageRegistryConfigStorageSwift) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistrySpec) DeepCopyInto(out *ImageRegistrySpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - out.Proxy = in.Proxy - in.Storage.DeepCopyInto(&out.Storage) - out.Requests = in.Requests - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]ImageRegistryConfigRoute, len(*in)) - copy(*out, *in) - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - 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([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.TopologySpreadConstraints != nil { - in, out := &in.TopologySpreadConstraints, &out.TopologySpreadConstraints - *out = make([]corev1.TopologySpreadConstraint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistrySpec. -func (in *ImageRegistrySpec) DeepCopy() *ImageRegistrySpec { - if in == nil { - return nil - } - out := new(ImageRegistrySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageRegistryStatus) DeepCopyInto(out *ImageRegistryStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - in.Storage.DeepCopyInto(&out.Storage) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageRegistryStatus. -func (in *ImageRegistryStatus) DeepCopy() *ImageRegistryStatus { - if in == nil { - return nil - } - out := new(ImageRegistryStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSEncryptionAlibaba) DeepCopyInto(out *KMSEncryptionAlibaba) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSEncryptionAlibaba. -func (in *KMSEncryptionAlibaba) DeepCopy() *KMSEncryptionAlibaba { - if in == nil { - return nil - } - out := new(KMSEncryptionAlibaba) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *S3TrustedCASource) DeepCopyInto(out *S3TrustedCASource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new S3TrustedCASource. -func (in *S3TrustedCASource) DeepCopy() *S3TrustedCASource { - if in == nil { - return nil - } - out := new(S3TrustedCASource) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 95613c7ae..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,42 +0,0 @@ -configs.imageregistry.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/519 - CRDName: configs.imageregistry.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: imageregistry.operator.openshift.io - HasStatus: true - KindName: Config - Labels: {} - PluralName: configs - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -imagepruners.imageregistry.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/555 - CRDName: imagepruners.imageregistry.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "01" - FilenameRunLevel: "" - GroupName: imageregistry.operator.openshift.io - HasStatus: true - KindName: ImagePruner - Labels: {} - PluralName: imagepruners - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.model_name.go deleted file mode 100644 index bb51d1e7e..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.model_name.go +++ /dev/null @@ -1,141 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureNetworkAccess) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.AzureNetworkAccess" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureNetworkAccessInternal) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.AzureNetworkAccessInternal" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Config) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.Config" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EncryptionAlibaba) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.EncryptionAlibaba" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePruner) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImagePruner" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePrunerList) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImagePrunerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePrunerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImagePrunerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePrunerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImagePrunerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigProxy) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigProxy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigRequests) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigRequests" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigRequestsLimits) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigRequestsLimits" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigRoute) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigRoute" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorage) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageAlibabaOSS) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageAlibabaOSS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageAzure) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageAzure" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageEmptyDir) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageEmptyDir" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageGCS) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageGCS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageIBMCOS) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageIBMCOS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStoragePVC) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStoragePVC" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageS3) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageS3" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageS3CloudFront) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageS3CloudFront" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryConfigStorageSwift) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryConfigStorageSwift" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistrySpec) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistrySpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageRegistryStatus) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.ImageRegistryStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KMSEncryptionAlibaba) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.KMSEncryptionAlibaba" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in S3TrustedCASource) OpenAPIModelName() string { - return "com.github.openshift.api.imageregistry.v1.S3TrustedCASource" -} diff --git a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index f8b421ae8..000000000 --- a/vendor/github.com/openshift/api/imageregistry/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,334 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AzureNetworkAccess = map[string]string{ - "": "AzureNetworkAccess defines the network access properties for the storage account.", - "type": "type is the network access level to be used for the storage account. type: Internal means the storage account will be private, type: External means the storage account will be publicly accessible. Internal storage accounts are only exposed within the cluster's vnet. External storage accounts are publicly exposed on the internet. When type: Internal is used, a vnetName, subNetName and privateEndpointName may optionally be specified. If unspecificed, the image registry operator will discover vnet and subnet names, and generate a privateEndpointName. Defaults to \"External\".", - "internal": "internal defines the vnet and subnet names to configure a private endpoint and connect it to the storage account in order to make it private. when type: Internal and internal is unset, the image registry operator will discover vnet and subnet names, and generate a private endpoint name.", -} - -func (AzureNetworkAccess) SwaggerDoc() map[string]string { - return map_AzureNetworkAccess -} - -var map_AzureNetworkAccessInternal = map[string]string{ - "networkResourceGroupName": "networkResourceGroupName is the resource group name where the cluster's vnet and subnet are. When omitted, the registry operator will use the cluster resource group (from in the infrastructure status). If you set a networkResourceGroupName on your install-config.yaml, that value will be used automatically (for clusters configured with publish:Internal). Note that both vnet and subnet must be in the same resource group. It must be between 1 and 90 characters in length and must consist only of alphanumeric characters, hyphens (-), periods (.) and underscores (_), and not end with a period.", - "vnetName": "vnetName is the name of the vnet the registry operates in. When omitted, the registry operator will discover and set this by using the `kubernetes.io_cluster.` tag in the vnet resource. This tag is set automatically by the installer. Commonly, this will be the same vnet as the cluster. Advanced cluster network configurations should ensure the provided vnetName is the vnet of the nodes where the image registry pods are running from. It must be between 2 and 64 characters in length and must consist only of alphanumeric characters, hyphens (-), periods (.) and underscores (_). It must start with an alphanumeric character and end with an alphanumeric character or an underscore.", - "subnetName": "subnetName is the name of the subnet the registry operates in. When omitted, the registry operator will discover and set this by using the `kubernetes.io_cluster.` tag in the vnet resource, then using one of listed subnets. Advanced cluster network configurations that use network security groups to protect subnets should ensure the provided subnetName has access to Azure Storage service. It must be between 1 and 80 characters in length and must consist only of alphanumeric characters, hyphens (-), periods (.) and underscores (_).", - "privateEndpointName": "privateEndpointName is the name of the private endpoint for the registry. When provided, the registry will use it as the name of the private endpoint it will create for the storage account. When omitted, the registry will generate one. It must be between 2 and 64 characters in length and must consist only of alphanumeric characters, hyphens (-), periods (.) and underscores (_). It must start with an alphanumeric character and end with an alphanumeric character or an underscore.", -} - -func (AzureNetworkAccessInternal) SwaggerDoc() map[string]string { - return map_AzureNetworkAccessInternal -} - -var map_Config = map[string]string{ - "": "Config is the configuration object for a registry instance managed by the registry operator\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Config) SwaggerDoc() map[string]string { - return map_Config -} - -var map_ConfigList = map[string]string{ - "": "ConfigList is a slice of Config objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConfigList) SwaggerDoc() map[string]string { - return map_ConfigList -} - -var map_EncryptionAlibaba = map[string]string{ - "": "EncryptionAlibaba this a union type in kube parlance. Depending on the value for the AlibabaEncryptionMethod, different pointers may be used", - "method": "method defines the different encrytion modes available Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `AES256`.", - "kms": "kms (key management service) is an encryption type that holds the struct for KMS KeyID", -} - -func (EncryptionAlibaba) SwaggerDoc() map[string]string { - return map_EncryptionAlibaba -} - -var map_ImageRegistryConfigProxy = map[string]string{ - "": "ImageRegistryConfigProxy defines proxy configuration to be used by registry.", - "http": "http defines the proxy to be used by the image registry when accessing HTTP endpoints.", - "https": "https defines the proxy to be used by the image registry when accessing HTTPS endpoints.", - "noProxy": "noProxy defines a comma-separated list of host names that shouldn't go through any proxy.", -} - -func (ImageRegistryConfigProxy) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigProxy -} - -var map_ImageRegistryConfigRequests = map[string]string{ - "": "ImageRegistryConfigRequests defines registry limits on requests read and write.", - "read": "read defines limits for image registry's reads.", - "write": "write defines limits for image registry's writes.", -} - -func (ImageRegistryConfigRequests) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigRequests -} - -var map_ImageRegistryConfigRequestsLimits = map[string]string{ - "": "ImageRegistryConfigRequestsLimits holds configuration on the max, enqueued and waiting registry's API requests.", - "maxRunning": "maxRunning sets the maximum in flight api requests to the registry.", - "maxInQueue": "maxInQueue sets the maximum queued api requests to the registry.", - "maxWaitInQueue": "maxWaitInQueue sets the maximum time a request can wait in the queue before being rejected.", -} - -func (ImageRegistryConfigRequestsLimits) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigRequestsLimits -} - -var map_ImageRegistryConfigRoute = map[string]string{ - "": "ImageRegistryConfigRoute holds information on external route access to image registry.", - "name": "name of the route to be created.", - "hostname": "hostname for the route.", - "secretName": "secretName points to secret containing the certificates to be used by the route.", -} - -func (ImageRegistryConfigRoute) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigRoute -} - -var map_ImageRegistryConfigStorage = map[string]string{ - "": "ImageRegistryConfigStorage describes how the storage should be configured for the image registry.", - "emptyDir": "emptyDir represents ephemeral storage on the pod's host node. WARNING: this storage cannot be used with more than 1 replica and is not suitable for production use. When the pod is removed from a node for any reason, the data in the emptyDir is deleted forever.", - "s3": "s3 represents configuration that uses Amazon Simple Storage Service.", - "gcs": "gcs represents configuration that uses Google Cloud Storage.", - "swift": "swift represents configuration that uses OpenStack Object Storage.", - "pvc": "pvc represents configuration that uses a PersistentVolumeClaim.", - "azure": "azure represents configuration that uses Azure Blob Storage.", - "ibmcos": "ibmcos represents configuration that uses IBM Cloud Object Storage.", - "oss": "oss represents configuration that uses Alibaba Cloud Object Storage Service.", - "managementState": "managementState indicates if the operator manages the underlying storage unit. If Managed the operator will remove the storage when this operator gets Removed.", -} - -func (ImageRegistryConfigStorage) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorage -} - -var map_ImageRegistryConfigStorageAlibabaOSS = map[string]string{ - "": "ImageRegistryConfigStorageAlibabaOSS holds Alibaba Cloud OSS configuration. Configures the registry to use Alibaba Cloud Object Storage Service for backend storage. More about oss, you can look at the [official documentation](https://www.alibabacloud.com/help/product/31815.htm)", - "bucket": "bucket is the bucket name in which you want to store the registry's data. About Bucket naming, more details you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/257087.htm) Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default will be autogenerated in the form of -image-registry--", - "region": "region is the Alibaba Cloud Region in which your bucket exists. For a list of regions, you can look at the [official documentation](https://www.alibabacloud.com/help/doc-detail/31837.html). Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default will be based on the installed Alibaba Cloud Region.", - "endpointAccessibility": "endpointAccessibility specifies whether the registry use the OSS VPC internal endpoint Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `Internal`.", - "encryption": "encryption specifies whether you would like your data encrypted on the server side. More details, you can look cat the [official documentation](https://www.alibabacloud.com/help/doc-detail/117914.htm)", -} - -func (ImageRegistryConfigStorageAlibabaOSS) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageAlibabaOSS -} - -var map_ImageRegistryConfigStorageAzure = map[string]string{ - "": "ImageRegistryConfigStorageAzure holds the information to configure the registry to use Azure Blob Storage for backend storage.", - "accountName": "accountName defines the account to be used by the registry.", - "container": "container defines Azure's container to be used by registry.", - "cloudName": "cloudName is the name of the Azure cloud environment to be used by the registry. If empty, the operator will set it based on the infrastructure object.", - "networkAccess": "networkAccess defines the network access properties for the storage account. Defaults to type: External.", -} - -func (ImageRegistryConfigStorageAzure) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageAzure -} - -var map_ImageRegistryConfigStorageEmptyDir = map[string]string{ - "": "ImageRegistryConfigStorageEmptyDir is an place holder to be used when when registry is leveraging ephemeral storage.", -} - -func (ImageRegistryConfigStorageEmptyDir) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageEmptyDir -} - -var map_ImageRegistryConfigStorageGCS = map[string]string{ - "": "ImageRegistryConfigStorageGCS holds GCS configuration.", - "bucket": "bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided.", - "region": "region is the GCS location in which your bucket exists. Optional, will be set based on the installed GCS Region.", - "projectID": "projectID is the Project ID of the GCP project that this bucket should be associated with.", - "keyID": "keyID is the KMS key ID to use for encryption. Optional, buckets are encrypted by default on GCP. This allows for the use of a custom encryption key.", -} - -func (ImageRegistryConfigStorageGCS) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageGCS -} - -var map_ImageRegistryConfigStorageIBMCOS = map[string]string{ - "": "ImageRegistryConfigStorageIBMCOS holds the information to configure the registry to use IBM Cloud Object Storage for backend storage.", - "bucket": "bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided.", - "location": "location is the IBM Cloud location in which your bucket exists. Optional, will be set based on the installed IBM Cloud location.", - "resourceGroupName": "resourceGroupName is the name of the IBM Cloud resource group that this bucket and its service instance is associated with. Optional, will be set based on the installed IBM Cloud resource group.", - "resourceKeyCRN": "resourceKeyCRN is the CRN of the IBM Cloud resource key that is created for the service instance. Commonly referred as a service credential and must contain HMAC type credentials. Optional, will be computed if not provided.", - "serviceInstanceCRN": "serviceInstanceCRN is the CRN of the IBM Cloud Object Storage service instance that this bucket is associated with. Optional, will be computed if not provided.", -} - -func (ImageRegistryConfigStorageIBMCOS) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageIBMCOS -} - -var map_ImageRegistryConfigStoragePVC = map[string]string{ - "": "ImageRegistryConfigStoragePVC holds Persistent Volume Claims data to be used by the registry.", - "claim": "claim defines the Persisent Volume Claim's name to be used.", -} - -func (ImageRegistryConfigStoragePVC) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStoragePVC -} - -var map_ImageRegistryConfigStorageS3 = map[string]string{ - "": "ImageRegistryConfigStorageS3 holds the information to configure the registry to use the AWS S3 service for backend storage https://docs.docker.com/registry/storage-drivers/s3/", - "bucket": "bucket is the bucket name in which you want to store the registry's data. Optional, will be generated if not provided.", - "region": "region is the AWS region in which your bucket exists. Optional, will be set based on the installed AWS Region.", - "regionEndpoint": "regionEndpoint is the endpoint for S3 compatible storage services. It should be a valid URL with scheme, e.g. https://s3.example.com. Optional, defaults based on the Region that is provided.", - "chunkSizeMiB": "chunkSizeMiB defines the size of the multipart upload chunks of the S3 API. The S3 API requires multipart upload chunks to be at least 5MiB. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is 10 MiB. The value is an integer number of MiB. The minimum value is 5 and the maximum value is 5120 (5 GiB).", - "encrypt": "encrypt specifies whether the registry stores the image in encrypted format or not. Optional, defaults to false.", - "keyID": "keyID is the KMS key ID to use for encryption. Optional, Encrypt must be true, or this parameter is ignored.", - "cloudFront": "cloudFront configures Amazon Cloudfront as the storage middleware in a registry.", - "virtualHostedStyle": "virtualHostedStyle enables using S3 virtual hosted style bucket paths with a custom RegionEndpoint Optional, defaults to false.", - "trustedCA": "trustedCA is a reference to a config map containing a CA bundle. The image registry and its operator use certificates from this bundle to verify S3 server certificates.\n\nThe namespace for the config map referenced by trustedCA is \"openshift-config\". The key for the bundle in the config map is \"ca-bundle.crt\".", -} - -func (ImageRegistryConfigStorageS3) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageS3 -} - -var map_ImageRegistryConfigStorageS3CloudFront = map[string]string{ - "": "ImageRegistryConfigStorageS3CloudFront holds the configuration to use Amazon Cloudfront as the storage middleware in a registry. https://docs.docker.com/registry/configuration/#cloudfront", - "baseURL": "baseURL contains the SCHEME://HOST[/PATH] at which Cloudfront is served.", - "privateKey": "privateKey points to secret containing the private key, provided by AWS.", - "keypairID": "keypairID is key pair ID provided by AWS.", - "duration": "duration is the duration of the Cloudfront session.", -} - -func (ImageRegistryConfigStorageS3CloudFront) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageS3CloudFront -} - -var map_ImageRegistryConfigStorageSwift = map[string]string{ - "": "ImageRegistryConfigStorageSwift holds the information to configure the registry to use the OpenStack Swift service for backend storage https://docs.docker.com/registry/storage-drivers/swift/", - "authURL": "authURL defines the URL for obtaining an authentication token.", - "authVersion": "authVersion specifies the OpenStack Auth's version.", - "container": "container defines the name of Swift container where to store the registry's data.", - "domain": "domain specifies Openstack's domain name for Identity v3 API.", - "domainID": "domainID specifies Openstack's domain id for Identity v3 API.", - "tenant": "tenant defines Openstack tenant name to be used by registry.", - "tenantID": "tenant defines Openstack tenant id to be used by registry.", - "regionName": "regionName defines Openstack's region in which container exists.", -} - -func (ImageRegistryConfigStorageSwift) SwaggerDoc() map[string]string { - return map_ImageRegistryConfigStorageSwift -} - -var map_ImageRegistrySpec = map[string]string{ - "": "ImageRegistrySpec defines the specs for the running registry.", - "httpSecret": "httpSecret is the value needed by the registry to secure uploads, generated by default.", - "proxy": "proxy defines the proxy to be used when calling master api, upstream registries, etc.", - "storage": "storage details for configuring registry storage, e.g. S3 bucket coordinates.", - "readOnly": "readOnly indicates whether the registry instance should reject attempts to push new images or delete existing ones.", - "disableRedirect": "disableRedirect controls whether to route all data through the Registry, rather than redirecting to the backend.", - "requests": "requests controls how many parallel requests a given registry instance will handle before queuing additional requests.", - "defaultRoute": "defaultRoute indicates whether an external facing route for the registry should be created using the default generated hostname.", - "routes": "routes defines additional external facing routes which should be created for the registry.", - "replicas": "replicas determines the number of registry instances to run.", - "logging": "logging is deprecated, use logLevel instead.", - "resources": "resources defines the resource requests+limits for the registry pod.", - "nodeSelector": "nodeSelector defines the node selection constraints for the registry pod.", - "tolerations": "tolerations defines the tolerations for the registry pod.", - "rolloutStrategy": "rolloutStrategy defines rollout strategy for the image registry deployment.", - "affinity": "affinity is a group of node affinity scheduling rules for the image registry pod(s).", - "topologySpreadConstraints": "topologySpreadConstraints specify how to spread matching pods among the given topology.", -} - -func (ImageRegistrySpec) SwaggerDoc() map[string]string { - return map_ImageRegistrySpec -} - -var map_ImageRegistryStatus = map[string]string{ - "": "ImageRegistryStatus reports image registry operational status.", - "storageManaged": "storageManaged is deprecated, please refer to Storage.managementState", - "storage": "storage indicates the current applied storage configuration of the registry.", -} - -func (ImageRegistryStatus) SwaggerDoc() map[string]string { - return map_ImageRegistryStatus -} - -var map_KMSEncryptionAlibaba = map[string]string{ - "keyID": "keyID holds the KMS encryption key ID", -} - -func (KMSEncryptionAlibaba) SwaggerDoc() map[string]string { - return map_KMSEncryptionAlibaba -} - -var map_S3TrustedCASource = map[string]string{ - "": "S3TrustedCASource references a config map with a CA certificate bundle in the \"openshift-config\" namespace. The key for the bundle in the config map is \"ca-bundle.crt\".", - "name": "name is the metadata.name of the referenced config map. This field must adhere to standard config map naming restrictions. The name must consist solely of alphanumeric characters, hyphens (-) and periods (.). It has a maximum length of 253 characters. If this field is not specified or is empty string, the default trust bundle will be used.", -} - -func (S3TrustedCASource) SwaggerDoc() map[string]string { - return map_S3TrustedCASource -} - -var map_ImagePruner = map[string]string{ - "": "ImagePruner is the configuration object for an image registry pruner managed by the registry operator.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImagePruner) SwaggerDoc() map[string]string { - return map_ImagePruner -} - -var map_ImagePrunerList = map[string]string{ - "": "ImagePrunerList is a slice of ImagePruner objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImagePrunerList) SwaggerDoc() map[string]string { - return map_ImagePrunerList -} - -var map_ImagePrunerSpec = map[string]string{ - "": "ImagePrunerSpec defines the specs for the running image pruner.", - "schedule": "schedule specifies when to execute the job using standard cronjob syntax: https://wikipedia.org/wiki/Cron. Defaults to `0 0 * * *`.", - "suspend": "suspend specifies whether or not to suspend subsequent executions of this cronjob. Defaults to false.", - "keepTagRevisions": "keepTagRevisions specifies the number of image revisions for a tag in an image stream that will be preserved. Defaults to 3.", - "keepYoungerThan": "keepYoungerThan specifies the minimum age in nanoseconds of an image and its referrers for it to be considered a candidate for pruning. DEPRECATED: This field is deprecated in favor of keepYoungerThanDuration. If both are set, this field is ignored and keepYoungerThanDuration takes precedence.", - "keepYoungerThanDuration": "keepYoungerThanDuration specifies the minimum age of an image and its referrers for it to be considered a candidate for pruning. Defaults to 60m (60 minutes).", - "resources": "resources defines the resource requests and limits for the image pruner pod.", - "affinity": "affinity is a group of node affinity scheduling rules for the image pruner pod.", - "nodeSelector": "nodeSelector defines the node selection constraints for the image pruner pod.", - "tolerations": "tolerations defines the node tolerations for the image pruner pod.", - "successfulJobsHistoryLimit": "successfulJobsHistoryLimit specifies how many successful image pruner jobs to retain. Defaults to 3 if not set.", - "failedJobsHistoryLimit": "failedJobsHistoryLimit specifies how many failed image pruner jobs to retain. Defaults to 3 if not set.", - "ignoreInvalidImageReferences": "ignoreInvalidImageReferences indicates whether the pruner can ignore errors while parsing image references.", - "logLevel": "logLevel sets the level of log output for the pruner job.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", -} - -func (ImagePrunerSpec) SwaggerDoc() map[string]string { - return map_ImagePrunerSpec -} - -var map_ImagePrunerStatus = map[string]string{ - "": "ImagePrunerStatus reports image pruner operational status.", - "observedGeneration": "observedGeneration is the last generation change that has been applied.", - "conditions": "conditions is a list of conditions and their status.", -} - -func (ImagePrunerStatus) SwaggerDoc() map[string]string { - return map_ImagePrunerStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/install.go b/vendor/github.com/openshift/api/install.go deleted file mode 100644 index 6efcc1c29..000000000 --- a/vendor/github.com/openshift/api/install.go +++ /dev/null @@ -1,165 +0,0 @@ -package api - -import ( - kadmissionv1 "k8s.io/api/admission/v1" - kadmissionv1beta1 "k8s.io/api/admission/v1beta1" - kadmissionregistrationv1 "k8s.io/api/admissionregistration/v1" - kadmissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" - kappsv1 "k8s.io/api/apps/v1" - kappsv1beta1 "k8s.io/api/apps/v1beta1" - kappsv1beta2 "k8s.io/api/apps/v1beta2" - kauthenticationv1 "k8s.io/api/authentication/v1" - kauthenticationv1beta1 "k8s.io/api/authentication/v1beta1" - kauthorizationv1 "k8s.io/api/authorization/v1" - kauthorizationv1beta1 "k8s.io/api/authorization/v1beta1" - kautoscalingv1 "k8s.io/api/autoscaling/v1" - kautoscalingv2 "k8s.io/api/autoscaling/v2" - kbatchv1 "k8s.io/api/batch/v1" - kbatchv1beta1 "k8s.io/api/batch/v1beta1" - kcertificatesv1 "k8s.io/api/certificates/v1" - kcertificatesv1beta1 "k8s.io/api/certificates/v1beta1" - kcoordinationv1 "k8s.io/api/coordination/v1" - kcoordinationv1beta1 "k8s.io/api/coordination/v1beta1" - kcorev1 "k8s.io/api/core/v1" - keventsv1 "k8s.io/api/events/v1" - keventsv1beta1 "k8s.io/api/events/v1beta1" - kextensionsv1beta1 "k8s.io/api/extensions/v1beta1" - kflowcontrolv1beta1 "k8s.io/api/flowcontrol/v1beta1" - kflowcontrolv1beta2 "k8s.io/api/flowcontrol/v1beta2" - kimagepolicyv1alpha1 "k8s.io/api/imagepolicy/v1alpha1" - knetworkingv1 "k8s.io/api/networking/v1" - knetworkingv1beta1 "k8s.io/api/networking/v1beta1" - knodev1 "k8s.io/api/node/v1" - knodev1alpha1 "k8s.io/api/node/v1alpha1" - knodev1beta1 "k8s.io/api/node/v1beta1" - kpolicyv1 "k8s.io/api/policy/v1" - kpolicyv1beta1 "k8s.io/api/policy/v1beta1" - krbacv1 "k8s.io/api/rbac/v1" - krbacv1alpha1 "k8s.io/api/rbac/v1alpha1" - krbacv1beta1 "k8s.io/api/rbac/v1beta1" - kschedulingv1 "k8s.io/api/scheduling/v1" - kschedulingv1beta1 "k8s.io/api/scheduling/v1beta1" - kstoragev1 "k8s.io/api/storage/v1" - kstoragev1alpha1 "k8s.io/api/storage/v1alpha1" - kstoragev1beta1 "k8s.io/api/storage/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - - "github.com/openshift/api/apiextensions" - "github.com/openshift/api/apiserver" - "github.com/openshift/api/apps" - "github.com/openshift/api/authorization" - "github.com/openshift/api/build" - "github.com/openshift/api/cloudnetwork" - "github.com/openshift/api/config" - "github.com/openshift/api/console" - "github.com/openshift/api/etcd" - "github.com/openshift/api/helm" - "github.com/openshift/api/image" - "github.com/openshift/api/imageregistry" - "github.com/openshift/api/kubecontrolplane" - "github.com/openshift/api/machine" - "github.com/openshift/api/monitoring" - "github.com/openshift/api/network" - "github.com/openshift/api/networkoperator" - "github.com/openshift/api/oauth" - "github.com/openshift/api/openshiftcontrolplane" - "github.com/openshift/api/operator" - "github.com/openshift/api/operatorcontrolplane" - "github.com/openshift/api/osin" - "github.com/openshift/api/project" - "github.com/openshift/api/quota" - "github.com/openshift/api/route" - "github.com/openshift/api/samples" - "github.com/openshift/api/security" - "github.com/openshift/api/servicecertsigner" - "github.com/openshift/api/sharedresource" - "github.com/openshift/api/template" - "github.com/openshift/api/user" - - // just make sure this compiles. Don't add it to a scheme - _ "github.com/openshift/api/legacyconfig/v1" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder( - apiextensions.Install, - apiserver.Install, - apps.Install, - authorization.Install, - build.Install, - config.Install, - console.Install, - etcd.Install, - helm.Install, - image.Install, - imageregistry.Install, - kubecontrolplane.Install, - cloudnetwork.Install, - network.Install, - networkoperator.Install, - oauth.Install, - openshiftcontrolplane.Install, - operator.Install, - operatorcontrolplane.Install, - osin.Install, - project.Install, - quota.Install, - route.Install, - samples.Install, - security.Install, - servicecertsigner.Install, - sharedresource.Install, - template.Install, - user.Install, - machine.Install, - monitoring.Install, - ) - // Install is a function which adds every version of every openshift group to a scheme - Install = schemeBuilder.AddToScheme - - kubeSchemeBuilder = runtime.NewSchemeBuilder( - kadmissionv1.AddToScheme, - kadmissionv1beta1.AddToScheme, - kadmissionregistrationv1.AddToScheme, - kadmissionregistrationv1beta1.AddToScheme, - kappsv1.AddToScheme, - kappsv1beta1.AddToScheme, - kappsv1beta2.AddToScheme, - kauthenticationv1.AddToScheme, - kauthenticationv1beta1.AddToScheme, - kauthorizationv1.AddToScheme, - kauthorizationv1beta1.AddToScheme, - kautoscalingv1.AddToScheme, - kautoscalingv2.AddToScheme, - kbatchv1.AddToScheme, - kbatchv1beta1.AddToScheme, - kcertificatesv1.AddToScheme, - kcertificatesv1beta1.AddToScheme, - kcorev1.AddToScheme, - kcoordinationv1.AddToScheme, - kcoordinationv1beta1.AddToScheme, - keventsv1.AddToScheme, - keventsv1beta1.AddToScheme, - kextensionsv1beta1.AddToScheme, - kflowcontrolv1beta1.AddToScheme, - kflowcontrolv1beta2.AddToScheme, - kimagepolicyv1alpha1.AddToScheme, - knetworkingv1.AddToScheme, - knetworkingv1beta1.AddToScheme, - knodev1.AddToScheme, - knodev1alpha1.AddToScheme, - knodev1beta1.AddToScheme, - kpolicyv1.AddToScheme, - kpolicyv1beta1.AddToScheme, - krbacv1.AddToScheme, - krbacv1beta1.AddToScheme, - krbacv1alpha1.AddToScheme, - kschedulingv1.AddToScheme, - kschedulingv1beta1.AddToScheme, - kstoragev1.AddToScheme, - kstoragev1beta1.AddToScheme, - kstoragev1alpha1.AddToScheme, - ) - // InstallKube is a way to install all the external k8s.io/api types - InstallKube = kubeSchemeBuilder.AddToScheme -) diff --git a/vendor/github.com/openshift/api/kubecontrolplane/.codegen.yaml b/vendor/github.com/openshift/api/kubecontrolplane/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/kubecontrolplane/install.go b/vendor/github.com/openshift/api/kubecontrolplane/install.go deleted file mode 100644 index c34b77723..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package kubecontrolplane - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - kubecontrolplanev1 "github.com/openshift/api/kubecontrolplane/v1" -) - -const ( - GroupName = "kubecontrolplane.config.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(kubecontrolplanev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/doc.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/doc.go deleted file mode 100644 index 8f60e8e43..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.kubecontrolplane.v1 - -// +groupName=kubecontrolplane.config.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/register.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/register.go deleted file mode 100644 index f8abc8ad8..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/register.go +++ /dev/null @@ -1,38 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - osinv1 "github.com/openshift/api/osin/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "kubecontrolplane.config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, osinv1.Install, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &KubeAPIServerConfig{}, - &KubeControllerManagerConfig{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go deleted file mode 100644 index cd1ba7ec5..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/types.go +++ /dev/null @@ -1,236 +0,0 @@ -package v1 - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - configv1 "github.com/openshift/api/config/v1" - osinv1 "github.com/openshift/api/osin/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type KubeAPIServerConfig struct { - metav1.TypeMeta `json:",inline"` - - // provides the standard apiserver configuration - configv1.GenericAPIServerConfig `json:",inline"` - - // authConfig configures authentication options in addition to the standard - // oauth token and client certificate authenticators - AuthConfig MasterAuthConfig `json:"authConfig"` - - // aggregatorConfig has options for configuring the aggregator component of the API server. - AggregatorConfig AggregatorConfig `json:"aggregatorConfig"` - - // kubeletClientInfo contains information about how to connect to kubelets - KubeletClientInfo KubeletConnectionInfo `json:"kubeletClientInfo"` - - // servicesSubnet is the subnet to use for assigning service IPs - ServicesSubnet string `json:"servicesSubnet"` - // servicesNodePortRange is the range to use for assigning service public ports on a host. - ServicesNodePortRange string `json:"servicesNodePortRange"` - - // DEPRECATED: consolePublicURL has been deprecated and setting it has no effect. - ConsolePublicURL string `json:"consolePublicURL"` - - // userAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS! - // TODO I think we should just drop this feature. - UserAgentMatchingConfig UserAgentMatchingConfig `json:"userAgentMatchingConfig"` - - // imagePolicyConfig feeds the image policy admission plugin - // TODO make it an admission plugin config - ImagePolicyConfig KubeAPIServerImagePolicyConfig `json:"imagePolicyConfig"` - - // projectConfig feeds an admission plugin - // TODO make it an admission plugin config - ProjectConfig KubeAPIServerProjectConfig `json:"projectConfig"` - - // serviceAccountPublicKeyFiles is a list of files, each containing a PEM-encoded public RSA key. - // (If any file contains a private key, the public portion of the key is used) - // The list of public keys is used to verify presented service account tokens. - // Each key is tried in order until the list is exhausted or verification succeeds. - // If no keys are specified, no service account authentication will be available. - ServiceAccountPublicKeyFiles []string `json:"serviceAccountPublicKeyFiles"` - - // oauthConfig, if present start the /oauth endpoint in this process - OAuthConfig *osinv1.OAuthConfig `json:"oauthConfig"` - - // TODO this needs to be removed. - APIServerArguments map[string]Arguments `json:"apiServerArguments"` - - // minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. - // Specifically, the apiserver will deny most authorization requests of kubelets that are older - // than the specified version, only allowing the kubelet to get and update its node object, and perform - // subjectaccessreviews. - // This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, - // and will eventually be marked as not ready. - // Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99". - // Since the kubelet reports the version of the kubernetes release, not Openshift, this field references - // the underlying kubernetes version this version of Openshift is based off of. - // In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then - // they should set the minimumKubeletVersion to 1.30.0. - // When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. - // Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier. - // +kubebuilder:validation:XValidation:rule="self == \"\" || self.matches('^[0-9]*.[0-9]*.[0-9]*$')",message="minmumKubeletVersion must be in a semver compatible format of x.y.z, or empty" - // +kubebuilder:validation:MaxLength:=8 - // +openshift:enable:FeatureGate=MinimumKubeletVersion - // +optional - MinimumKubeletVersion string `json:"minimumKubeletVersion"` -} - -// Arguments masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type Arguments []string - -func (t Arguments) String() string { - return fmt.Sprintf("%v", []string(t)) -} - -type KubeAPIServerImagePolicyConfig struct { - // internalRegistryHostname sets the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. - InternalRegistryHostname string `json:"internalRegistryHostname"` - // 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. - ExternalRegistryHostnames []string `json:"externalRegistryHostnames"` -} - -type KubeAPIServerProjectConfig struct { - // defaultNodeSelector holds default project node label selector - DefaultNodeSelector string `json:"defaultNodeSelector"` -} - -// KubeletConnectionInfo holds information necessary for connecting to a kubelet -type KubeletConnectionInfo struct { - // port is the port to connect to kubelets on - Port uint32 `json:"port"` - // ca is the CA for verifying TLS connections to kubelets - CA string `json:"ca"` - // CertInfo is the TLS client cert information for securing communication to kubelets - // this is anonymous so that we can inline it for serialization - configv1.CertInfo `json:",inline"` -} - -// UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS! -type UserAgentMatchingConfig struct { - // requiredClients if this list is non-empty, then a User-Agent must match one of the UserAgentRegexes to be allowed - RequiredClients []UserAgentMatchRule `json:"requiredClients"` - - // deniedClients if this list is non-empty, then a User-Agent must not match any of the UserAgentRegexes - DeniedClients []UserAgentDenyRule `json:"deniedClients"` - - // defaultRejectionMessage is the message shown when rejecting a client. If it is not a set, a generic message is given. - DefaultRejectionMessage string `json:"defaultRejectionMessage"` -} - -// UserAgentMatchRule describes how to match a given request based on User-Agent and HTTPVerb -type UserAgentMatchRule struct { - // regex is a regex that is checked against the User-Agent. - // Known variants of oc clients - // 1. oc accessing kube resources: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 2. oc accessing openshift resources: oc/v1.1.3 (linux/amd64) openshift/b348c2f - // 3. openshift kubectl accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 4. openshift kubectl accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f - // 5. oadm accessing kube resources: oadm/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 6. oadm accessing openshift resources: oadm/v1.1.3 (linux/amd64) openshift/b348c2f - // 7. openshift cli accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 8. openshift cli accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f - Regex string `json:"regex"` - - // httpVerbs specifies which HTTP verbs should be matched. An empty list means "match all verbs". - HTTPVerbs []string `json:"httpVerbs"` -} - -// UserAgentDenyRule adds a rejection message that can be used to help a user figure out how to get an approved client -type UserAgentDenyRule struct { - UserAgentMatchRule `json:",inline"` - - // rejectionMessage is the message shown when rejecting a client. If it is not a set, the default message is used. - RejectionMessage string `json:"rejectionMessage"` -} - -// MasterAuthConfig configures authentication options in addition to the standard -// oauth token and client certificate authenticators -type MasterAuthConfig struct { - // requestHeader holds options for setting up a front proxy against the API. It is optional. - RequestHeader *RequestHeaderAuthenticationOptions `json:"requestHeader"` - // webhookTokenAuthenticators, if present configures remote token reviewers - WebhookTokenAuthenticators []WebhookTokenAuthenticator `json:"webhookTokenAuthenticators"` - // oauthMetadataFile is a path to a file containing the discovery endpoint for OAuth 2.0 Authorization - // Server Metadata for an external OAuth server. - // See IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 - // This option is mutually exclusive with OAuthConfig - OAuthMetadataFile string `json:"oauthMetadataFile"` -} - -// WebhookTokenAuthenticators holds the necessary configuation options for -// external token authenticators -type WebhookTokenAuthenticator struct { - // configFile is a path to a Kubeconfig file with the webhook configuration - ConfigFile string `json:"configFile"` - // cacheTTL indicates how long an authentication result should be cached. - // It takes a valid time duration string (e.g. "5m"). - // If empty, you get a default timeout of 2 minutes. - // If zero (e.g. "0m"), caching is disabled - CacheTTL string `json:"cacheTTL"` -} - -// RequestHeaderAuthenticationOptions provides options for setting up a front proxy against the entire -// API instead of against the /oauth endpoint. -type RequestHeaderAuthenticationOptions struct { - // clientCA is a file with the trusted signer certs. It is required. - ClientCA string `json:"clientCA"` - // clientCommonNames is a required list of common names to require a match from. - ClientCommonNames []string `json:"clientCommonNames"` - - // usernameHeaders is the list of headers to check for user information. First hit wins. - UsernameHeaders []string `json:"usernameHeaders"` - // groupHeaders is the set of headers to check for group information. All are unioned. - GroupHeaders []string `json:"groupHeaders"` - // extraHeaderPrefixes is the set of request header prefixes to inspect for user extra. X-Remote-Extra- is suggested. - ExtraHeaderPrefixes []string `json:"extraHeaderPrefixes"` -} - -// AggregatorConfig holds information required to make the aggregator function. -type AggregatorConfig struct { - // proxyClientInfo specifies the client cert/key to use when proxying to aggregated API servers - ProxyClientInfo configv1.CertInfo `json:"proxyClientInfo"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type KubeControllerManagerConfig struct { - metav1.TypeMeta `json:",inline"` - - // serviceServingCert provides support for the old alpha service serving cert signer CA bundle - ServiceServingCert ServiceServingCert `json:"serviceServingCert"` - - // projectConfig is an optimization for the daemonset controller - ProjectConfig KubeControllerManagerProjectConfig `json:"projectConfig"` - - // extendedArguments is used to configure the kube-controller-manager - ExtendedArguments map[string]Arguments `json:"extendedArguments"` -} - -type KubeControllerManagerProjectConfig struct { - // defaultNodeSelector holds default project node label selector - DefaultNodeSelector string `json:"defaultNodeSelector"` -} - -// ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for -// pods fulfilling a service to serve with. -type ServiceServingCert struct { - // certFile is a file containing a PEM-encoded certificate - CertFile string `json:"certFile"` -} diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.deepcopy.go deleted file mode 100644 index 2502e1fe3..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,379 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - osinv1 "github.com/openshift/api/osin/v1" - 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 *AggregatorConfig) DeepCopyInto(out *AggregatorConfig) { - *out = *in - out.ProxyClientInfo = in.ProxyClientInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatorConfig. -func (in *AggregatorConfig) DeepCopy() *AggregatorConfig { - if in == nil { - return nil - } - out := new(AggregatorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in Arguments) DeepCopyInto(out *Arguments) { - { - in := &in - *out = make(Arguments, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Arguments. -func (in Arguments) DeepCopy() Arguments { - if in == nil { - return nil - } - out := new(Arguments) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeAPIServerConfig) DeepCopyInto(out *KubeAPIServerConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.GenericAPIServerConfig.DeepCopyInto(&out.GenericAPIServerConfig) - in.AuthConfig.DeepCopyInto(&out.AuthConfig) - out.AggregatorConfig = in.AggregatorConfig - out.KubeletClientInfo = in.KubeletClientInfo - in.UserAgentMatchingConfig.DeepCopyInto(&out.UserAgentMatchingConfig) - in.ImagePolicyConfig.DeepCopyInto(&out.ImagePolicyConfig) - out.ProjectConfig = in.ProjectConfig - if in.ServiceAccountPublicKeyFiles != nil { - in, out := &in.ServiceAccountPublicKeyFiles, &out.ServiceAccountPublicKeyFiles - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.OAuthConfig != nil { - in, out := &in.OAuthConfig, &out.OAuthConfig - *out = new(osinv1.OAuthConfig) - (*in).DeepCopyInto(*out) - } - if in.APIServerArguments != nil { - in, out := &in.APIServerArguments, &out.APIServerArguments - *out = make(map[string]Arguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(Arguments, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerConfig. -func (in *KubeAPIServerConfig) DeepCopy() *KubeAPIServerConfig { - if in == nil { - return nil - } - out := new(KubeAPIServerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeAPIServerConfig) 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 *KubeAPIServerImagePolicyConfig) DeepCopyInto(out *KubeAPIServerImagePolicyConfig) { - *out = *in - if in.ExternalRegistryHostnames != nil { - in, out := &in.ExternalRegistryHostnames, &out.ExternalRegistryHostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerImagePolicyConfig. -func (in *KubeAPIServerImagePolicyConfig) DeepCopy() *KubeAPIServerImagePolicyConfig { - if in == nil { - return nil - } - out := new(KubeAPIServerImagePolicyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeAPIServerProjectConfig) DeepCopyInto(out *KubeAPIServerProjectConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerProjectConfig. -func (in *KubeAPIServerProjectConfig) DeepCopy() *KubeAPIServerProjectConfig { - if in == nil { - return nil - } - out := new(KubeAPIServerProjectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeControllerManagerConfig) DeepCopyInto(out *KubeControllerManagerConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ServiceServingCert = in.ServiceServingCert - out.ProjectConfig = in.ProjectConfig - if in.ExtendedArguments != nil { - in, out := &in.ExtendedArguments, &out.ExtendedArguments - *out = make(map[string]Arguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(Arguments, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerConfig. -func (in *KubeControllerManagerConfig) DeepCopy() *KubeControllerManagerConfig { - if in == nil { - return nil - } - out := new(KubeControllerManagerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeControllerManagerConfig) 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 *KubeControllerManagerProjectConfig) DeepCopyInto(out *KubeControllerManagerProjectConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerProjectConfig. -func (in *KubeControllerManagerProjectConfig) DeepCopy() *KubeControllerManagerProjectConfig { - if in == nil { - return nil - } - out := new(KubeControllerManagerProjectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeletConnectionInfo) DeepCopyInto(out *KubeletConnectionInfo) { - *out = *in - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConnectionInfo. -func (in *KubeletConnectionInfo) DeepCopy() *KubeletConnectionInfo { - if in == nil { - return nil - } - out := new(KubeletConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MasterAuthConfig) DeepCopyInto(out *MasterAuthConfig) { - *out = *in - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader - *out = new(RequestHeaderAuthenticationOptions) - (*in).DeepCopyInto(*out) - } - if in.WebhookTokenAuthenticators != nil { - in, out := &in.WebhookTokenAuthenticators, &out.WebhookTokenAuthenticators - *out = make([]WebhookTokenAuthenticator, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterAuthConfig. -func (in *MasterAuthConfig) DeepCopy() *MasterAuthConfig { - if in == nil { - return nil - } - out := new(MasterAuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderAuthenticationOptions) DeepCopyInto(out *RequestHeaderAuthenticationOptions) { - *out = *in - if in.ClientCommonNames != nil { - in, out := &in.ClientCommonNames, &out.ClientCommonNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.UsernameHeaders != nil { - in, out := &in.UsernameHeaders, &out.UsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupHeaders != nil { - in, out := &in.GroupHeaders, &out.GroupHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraHeaderPrefixes != nil { - in, out := &in.ExtraHeaderPrefixes, &out.ExtraHeaderPrefixes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderAuthenticationOptions. -func (in *RequestHeaderAuthenticationOptions) DeepCopy() *RequestHeaderAuthenticationOptions { - if in == nil { - return nil - } - out := new(RequestHeaderAuthenticationOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceServingCert) DeepCopyInto(out *ServiceServingCert) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceServingCert. -func (in *ServiceServingCert) DeepCopy() *ServiceServingCert { - if in == nil { - return nil - } - out := new(ServiceServingCert) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentDenyRule) DeepCopyInto(out *UserAgentDenyRule) { - *out = *in - in.UserAgentMatchRule.DeepCopyInto(&out.UserAgentMatchRule) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentDenyRule. -func (in *UserAgentDenyRule) DeepCopy() *UserAgentDenyRule { - if in == nil { - return nil - } - out := new(UserAgentDenyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentMatchRule) DeepCopyInto(out *UserAgentMatchRule) { - *out = *in - if in.HTTPVerbs != nil { - in, out := &in.HTTPVerbs, &out.HTTPVerbs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentMatchRule. -func (in *UserAgentMatchRule) DeepCopy() *UserAgentMatchRule { - if in == nil { - return nil - } - out := new(UserAgentMatchRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentMatchingConfig) DeepCopyInto(out *UserAgentMatchingConfig) { - *out = *in - if in.RequiredClients != nil { - in, out := &in.RequiredClients, &out.RequiredClients - *out = make([]UserAgentMatchRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DeniedClients != nil { - in, out := &in.DeniedClients, &out.DeniedClients - *out = make([]UserAgentDenyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentMatchingConfig. -func (in *UserAgentMatchingConfig) DeepCopy() *UserAgentMatchingConfig { - if in == nil { - return nil - } - out := new(UserAgentMatchingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookTokenAuthenticator) DeepCopyInto(out *WebhookTokenAuthenticator) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookTokenAuthenticator. -func (in *WebhookTokenAuthenticator) DeepCopy() *WebhookTokenAuthenticator { - if in == nil { - return nil - } - out := new(WebhookTokenAuthenticator) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.model_name.go deleted file mode 100644 index 404821349..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.model_name.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AggregatorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.AggregatorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeAPIServerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerImagePolicyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeAPIServerImagePolicyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerProjectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeAPIServerProjectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManagerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeControllerManagerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManagerProjectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeControllerManagerProjectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeletConnectionInfo) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.KubeletConnectionInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterAuthConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.MasterAuthConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RequestHeaderAuthenticationOptions) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.RequestHeaderAuthenticationOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceServingCert) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.ServiceServingCert" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentDenyRule) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.UserAgentDenyRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentMatchRule) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.UserAgentMatchRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentMatchingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.UserAgentMatchingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebhookTokenAuthenticator) OpenAPIModelName() string { - return "com.github.openshift.api.kubecontrolplane.v1.WebhookTokenAuthenticator" -} diff --git a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 7b5bef143..000000000 --- a/vendor/github.com/openshift/api/kubecontrolplane/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,162 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AggregatorConfig = map[string]string{ - "": "AggregatorConfig holds information required to make the aggregator function.", - "proxyClientInfo": "proxyClientInfo specifies the client cert/key to use when proxying to aggregated API servers", -} - -func (AggregatorConfig) SwaggerDoc() map[string]string { - return map_AggregatorConfig -} - -var map_KubeAPIServerConfig = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "authConfig": "authConfig configures authentication options in addition to the standard oauth token and client certificate authenticators", - "aggregatorConfig": "aggregatorConfig has options for configuring the aggregator component of the API server.", - "kubeletClientInfo": "kubeletClientInfo contains information about how to connect to kubelets", - "servicesSubnet": "servicesSubnet is the subnet to use for assigning service IPs", - "servicesNodePortRange": "servicesNodePortRange is the range to use for assigning service public ports on a host.", - "consolePublicURL": "DEPRECATED: consolePublicURL has been deprecated and setting it has no effect.", - "userAgentMatchingConfig": "userAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS!", - "imagePolicyConfig": "imagePolicyConfig feeds the image policy admission plugin", - "projectConfig": "projectConfig feeds an admission plugin", - "serviceAccountPublicKeyFiles": "serviceAccountPublicKeyFiles is a list of files, each containing a PEM-encoded public RSA key. (If any file contains a private key, the public portion of the key is used) The list of public keys is used to verify presented service account tokens. Each key is tried in order until the list is exhausted or verification succeeds. If no keys are specified, no service account authentication will be available.", - "oauthConfig": "oauthConfig, if present start the /oauth endpoint in this process", - "minimumKubeletVersion": "minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. Specifically, the apiserver will deny most authorization requests of kubelets that are older than the specified version, only allowing the kubelet to get and update its node object, and perform subjectaccessreviews. This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, and will eventually be marked as not ready. Its max length is 8, so maximum version allowed is either \"9.999.99\" or \"99.99.99\". Since the kubelet reports the version of the kubernetes release, not Openshift, this field references the underlying kubernetes version this version of Openshift is based off of. In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then they should set the minimumKubeletVersion to 1.30.0. When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. Thus, a kubelet with version \"1.0.0-ec.0\" will be compatible with minimumKubeletVersion \"1.0.0\" or earlier.", -} - -func (KubeAPIServerConfig) SwaggerDoc() map[string]string { - return map_KubeAPIServerConfig -} - -var map_KubeAPIServerImagePolicyConfig = map[string]string{ - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", - "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 (KubeAPIServerImagePolicyConfig) SwaggerDoc() map[string]string { - return map_KubeAPIServerImagePolicyConfig -} - -var map_KubeAPIServerProjectConfig = map[string]string{ - "defaultNodeSelector": "defaultNodeSelector holds default project node label selector", -} - -func (KubeAPIServerProjectConfig) SwaggerDoc() map[string]string { - return map_KubeAPIServerProjectConfig -} - -var map_KubeControllerManagerConfig = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "serviceServingCert": "serviceServingCert provides support for the old alpha service serving cert signer CA bundle", - "projectConfig": "projectConfig is an optimization for the daemonset controller", - "extendedArguments": "extendedArguments is used to configure the kube-controller-manager", -} - -func (KubeControllerManagerConfig) SwaggerDoc() map[string]string { - return map_KubeControllerManagerConfig -} - -var map_KubeControllerManagerProjectConfig = map[string]string{ - "defaultNodeSelector": "defaultNodeSelector holds default project node label selector", -} - -func (KubeControllerManagerProjectConfig) SwaggerDoc() map[string]string { - return map_KubeControllerManagerProjectConfig -} - -var map_KubeletConnectionInfo = map[string]string{ - "": "KubeletConnectionInfo holds information necessary for connecting to a kubelet", - "port": "port is the port to connect to kubelets on", - "ca": "ca is the CA for verifying TLS connections to kubelets", -} - -func (KubeletConnectionInfo) SwaggerDoc() map[string]string { - return map_KubeletConnectionInfo -} - -var map_MasterAuthConfig = map[string]string{ - "": "MasterAuthConfig configures authentication options in addition to the standard oauth token and client certificate authenticators", - "requestHeader": "requestHeader holds options for setting up a front proxy against the API. It is optional.", - "webhookTokenAuthenticators": "webhookTokenAuthenticators, if present configures remote token reviewers", - "oauthMetadataFile": "oauthMetadataFile is a path to a file containing the discovery endpoint for OAuth 2.0 Authorization Server Metadata for an external OAuth server. See IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This option is mutually exclusive with OAuthConfig", -} - -func (MasterAuthConfig) SwaggerDoc() map[string]string { - return map_MasterAuthConfig -} - -var map_RequestHeaderAuthenticationOptions = map[string]string{ - "": "RequestHeaderAuthenticationOptions provides options for setting up a front proxy against the entire API instead of against the /oauth endpoint.", - "clientCA": "clientCA is a file with the trusted signer certs. It is required.", - "clientCommonNames": "clientCommonNames is a required list of common names to require a match from.", - "usernameHeaders": "usernameHeaders is the list of headers to check for user information. First hit wins.", - "groupHeaders": "groupHeaders is the set of headers to check for group information. All are unioned.", - "extraHeaderPrefixes": "extraHeaderPrefixes is the set of request header prefixes to inspect for user extra. X-Remote-Extra- is suggested.", -} - -func (RequestHeaderAuthenticationOptions) SwaggerDoc() map[string]string { - return map_RequestHeaderAuthenticationOptions -} - -var map_ServiceServingCert = map[string]string{ - "": "ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for pods fulfilling a service to serve with.", - "certFile": "certFile is a file containing a PEM-encoded certificate", -} - -func (ServiceServingCert) SwaggerDoc() map[string]string { - return map_ServiceServingCert -} - -var map_UserAgentDenyRule = map[string]string{ - "": "UserAgentDenyRule adds a rejection message that can be used to help a user figure out how to get an approved client", - "rejectionMessage": "rejectionMessage is the message shown when rejecting a client. If it is not a set, the default message is used.", -} - -func (UserAgentDenyRule) SwaggerDoc() map[string]string { - return map_UserAgentDenyRule -} - -var map_UserAgentMatchRule = map[string]string{ - "": "UserAgentMatchRule describes how to match a given request based on User-Agent and HTTPVerb", - "regex": "regex is a regex that is checked against the User-Agent. Known variants of oc clients 1. oc accessing kube resources: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d 2. oc accessing openshift resources: oc/v1.1.3 (linux/amd64) openshift/b348c2f 3. openshift kubectl accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d 4. openshift kubectl accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f 5. oadm accessing kube resources: oadm/v1.2.0 (linux/amd64) kubernetes/bc4550d 6. oadm accessing openshift resources: oadm/v1.1.3 (linux/amd64) openshift/b348c2f 7. openshift cli accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d 8. openshift cli accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f", - "httpVerbs": "httpVerbs specifies which HTTP verbs should be matched. An empty list means \"match all verbs\".", -} - -func (UserAgentMatchRule) SwaggerDoc() map[string]string { - return map_UserAgentMatchRule -} - -var map_UserAgentMatchingConfig = map[string]string{ - "": "UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS!", - "requiredClients": "requiredClients if this list is non-empty, then a User-Agent must match one of the UserAgentRegexes to be allowed", - "deniedClients": "deniedClients if this list is non-empty, then a User-Agent must not match any of the UserAgentRegexes", - "defaultRejectionMessage": "defaultRejectionMessage is the message shown when rejecting a client. If it is not a set, a generic message is given.", -} - -func (UserAgentMatchingConfig) SwaggerDoc() map[string]string { - return map_UserAgentMatchingConfig -} - -var map_WebhookTokenAuthenticator = map[string]string{ - "": "WebhookTokenAuthenticators holds the necessary configuation options for external token authenticators", - "configFile": "configFile is a path to a Kubeconfig file with the webhook configuration", - "cacheTTL": "cacheTTL indicates how long an authentication result should be cached. It takes a valid time duration string (e.g. \"5m\"). If empty, you get a default timeout of 2 minutes. If zero (e.g. \"0m\"), caching is disabled", -} - -func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { - return map_WebhookTokenAuthenticator -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/doc.go b/vendor/github.com/openshift/api/legacyconfig/v1/doc.go deleted file mode 100644 index 151f0501e..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.legacyconfig.v1 - -// +groupName=legacy.config.openshift.io -// Package v1 is deprecated and exists to ease a transition to current APIs -package v1 diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/register.go b/vendor/github.com/openshift/api/legacyconfig/v1/register.go deleted file mode 100644 index 8ba752521..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/register.go +++ /dev/null @@ -1,46 +0,0 @@ -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - // Legacy is the 'v1' apiVersion of config - LegacyGroupName = "" - GroupVersion = schema.GroupVersion{Group: LegacyGroupName, Version: "v1"} - LegacySchemeGroupVersion = GroupVersion - legacySchemeBuilder = runtime.NewSchemeBuilder( - addKnownTypesToLegacy, - ) - InstallLegacy = legacySchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypesToLegacy(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(LegacySchemeGroupVersion, - &MasterConfig{}, - &NodeConfig{}, - &SessionSecrets{}, - - &BasicAuthPasswordIdentityProvider{}, - &AllowAllPasswordIdentityProvider{}, - &DenyAllPasswordIdentityProvider{}, - &HTPasswdPasswordIdentityProvider{}, - &LDAPPasswordIdentityProvider{}, - &KeystonePasswordIdentityProvider{}, - &RequestHeaderIdentityProvider{}, - &GitHubIdentityProvider{}, - &GitLabIdentityProvider{}, - &GoogleIdentityProvider{}, - &OpenIDIdentityProvider{}, - - &LDAPSyncConfig{}, - - &DefaultAdmissionConfig{}, - - &BuildDefaultsConfig{}, - &BuildOverridesConfig{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/serialization.go b/vendor/github.com/openshift/api/legacyconfig/v1/serialization.go deleted file mode 100644 index 145074273..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/serialization.go +++ /dev/null @@ -1,87 +0,0 @@ -package v1 - -import "k8s.io/apimachinery/pkg/runtime" - -var _ runtime.NestedObjectDecoder = &MasterConfig{} - -// DecodeNestedObjects handles encoding RawExtensions on the MasterConfig, ensuring the -// objects are decoded with the provided decoder. -func (c *MasterConfig) DecodeNestedObjects(d runtime.Decoder) error { - // decoding failures result in a runtime.Unknown object being created in Object and passed - // to conversion - for k, v := range c.AdmissionConfig.PluginConfig { - DecodeNestedRawExtensionOrUnknown(d, &v.Configuration) - c.AdmissionConfig.PluginConfig[k] = v - } - if c.OAuthConfig != nil { - for i := range c.OAuthConfig.IdentityProviders { - DecodeNestedRawExtensionOrUnknown(d, &c.OAuthConfig.IdentityProviders[i].Provider) - } - } - DecodeNestedRawExtensionOrUnknown(d, &c.AuditConfig.PolicyConfiguration) - return nil -} - -var _ runtime.NestedObjectEncoder = &MasterConfig{} - -// EncodeNestedObjects handles encoding RawExtensions on the MasterConfig, ensuring the -// objects are encoded with the provided encoder. -func (c *MasterConfig) EncodeNestedObjects(e runtime.Encoder) error { - for k, v := range c.AdmissionConfig.PluginConfig { - if err := EncodeNestedRawExtension(e, &v.Configuration); err != nil { - return err - } - c.AdmissionConfig.PluginConfig[k] = v - } - if c.OAuthConfig != nil { - for i := range c.OAuthConfig.IdentityProviders { - if err := EncodeNestedRawExtension(e, &c.OAuthConfig.IdentityProviders[i].Provider); err != nil { - return err - } - } - } - if err := EncodeNestedRawExtension(e, &c.AuditConfig.PolicyConfiguration); err != nil { - return err - } - return nil -} - -// DecodeNestedRawExtensionOrUnknown -func DecodeNestedRawExtensionOrUnknown(d runtime.Decoder, ext *runtime.RawExtension) { - if ext.Raw == nil || ext.Object != nil { - return - } - obj, gvk, err := d.Decode(ext.Raw, nil, nil) - if err != nil { - unk := &runtime.Unknown{Raw: ext.Raw} - if runtime.IsNotRegisteredError(err) { - if _, gvk, err := d.Decode(ext.Raw, nil, unk); err == nil { - unk.APIVersion = gvk.GroupVersion().String() - unk.Kind = gvk.Kind - ext.Object = unk - return - } - } - // TODO: record mime-type with the object - if gvk != nil { - unk.APIVersion = gvk.GroupVersion().String() - unk.Kind = gvk.Kind - } - obj = unk - } - ext.Object = obj -} - -// EncodeNestedRawExtension will encode the object in the RawExtension (if not nil) or -// return an error. -func EncodeNestedRawExtension(e runtime.Encoder, ext *runtime.RawExtension) error { - if ext.Raw != nil || ext.Object == nil { - return nil - } - data, err := runtime.Encode(e, ext.Object) - if err != nil { - return err - } - ext.Raw = data - return nil -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/stringsource.go b/vendor/github.com/openshift/api/legacyconfig/v1/stringsource.go deleted file mode 100644 index 6a5718c1d..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/stringsource.go +++ /dev/null @@ -1,31 +0,0 @@ -package v1 - -import "encoding/json" - -// UnmarshalJSON implements the json.Unmarshaller interface. -// If the value is a string, it sets the Value field of the StringSource. -// Otherwise, it is unmarshaled into the StringSourceSpec struct -func (s *StringSource) UnmarshalJSON(value []byte) error { - // If we can unmarshal to a simple string, just set the value - var simpleValue string - if err := json.Unmarshal(value, &simpleValue); err == nil { - s.Value = simpleValue - return nil - } - - // Otherwise do the full struct unmarshal - return json.Unmarshal(value, &s.StringSourceSpec) -} - -// MarshalJSON implements the json.Marshaller interface. -// If the StringSource contains only a string Value (or is empty), it is marshaled as a JSON string. -// Otherwise, the StringSourceSpec struct is marshaled as a JSON object. -func (s *StringSource) MarshalJSON() ([]byte, error) { - // If we have only a cleartext value set, do a simple string marshal - if s.StringSourceSpec == (StringSourceSpec{Value: s.Value}) { - return json.Marshal(s.Value) - } - - // Otherwise do the full struct marshal of the externalized bits - return json.Marshal(s.StringSourceSpec) -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/types.go b/vendor/github.com/openshift/api/legacyconfig/v1/types.go deleted file mode 100644 index f2db8e9cc..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/types.go +++ /dev/null @@ -1,1596 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - buildv1 "github.com/openshift/api/build/v1" -) - -type ExtendedArguments map[string][]string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NodeConfig is the fully specified config starting an OpenShift node -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type NodeConfig struct { - metav1.TypeMeta `json:",inline"` - - // nodeName is the value used to identify this particular node in the cluster. If possible, this should be your fully qualified hostname. - // If you're describing a set of static nodes to the master, this value must match one of the values in the list - NodeName string `json:"nodeName"` - - // Node may have multiple IPs, specify the IP to use for pod traffic routing - // If not specified, network parse/lookup on the nodeName is performed and the first non-loopback address is used - NodeIP string `json:"nodeIP"` - - // servingInfo describes how to start serving - ServingInfo ServingInfo `json:"servingInfo"` - - // masterKubeConfig is a filename for the .kubeconfig file that describes how to connect this node to the master - MasterKubeConfig string `json:"masterKubeConfig"` - - // masterClientConnectionOverrides provides overrides to the client connection used to connect to the master. - MasterClientConnectionOverrides *ClientConnectionOverrides `json:"masterClientConnectionOverrides"` - - // dnsDomain holds the domain suffix that will be used for the DNS search path inside each container. Defaults to - // 'cluster.local'. - DNSDomain string `json:"dnsDomain"` - - // dnsIP is the IP address that pods will use to access cluster DNS. Defaults to the service IP of the Kubernetes - // master. This IP must be listening on port 53 for compatibility with libc resolvers (which cannot be configured - // to resolve names from any other port). When running more complex local DNS configurations, this is often set - // to the local address of a DNS proxy like dnsmasq, which then will consult either the local DNS (see - // dnsBindAddress) or the master DNS. - DNSIP string `json:"dnsIP"` - - // dnsBindAddress is the ip:port to serve DNS on. If this is not set, the DNS server will not be started. - // Because most DNS resolvers will only listen on port 53, if you select an alternative port you will need - // a DNS proxy like dnsmasq to answer queries for containers. A common configuration is dnsmasq configured - // on a node IP listening on 53 and delegating queries for dnsDomain to this process, while sending other - // queries to the host environments nameservers. - DNSBindAddress string `json:"dnsBindAddress"` - - // dnsNameservers is a list of ip:port values of recursive nameservers to forward queries to when running - // a local DNS server if dnsBindAddress is set. If this value is empty, the DNS server will default to - // the nameservers listed in /etc/resolv.conf. If you have configured dnsmasq or another DNS proxy on the - // system, this value should be set to the upstream nameservers dnsmasq resolves with. - DNSNameservers []string `json:"dnsNameservers"` - - // dnsRecursiveResolvConf is a path to a resolv.conf file that contains settings for an upstream server. - // Only the nameservers and port fields are used. The file must exist and parse correctly. It adds extra - // nameservers to DNSNameservers if set. - DNSRecursiveResolvConf string `json:"dnsRecursiveResolvConf"` - - // Deprecated and maintained for backward compatibility, use NetworkConfig.NetworkPluginName instead - DeprecatedNetworkPluginName string `json:"networkPluginName,omitempty"` - - // networkConfig provides network options for the node - NetworkConfig NodeNetworkConfig `json:"networkConfig"` - - // volumeDirectory is the directory that volumes will be stored under - VolumeDirectory string `json:"volumeDirectory"` - - // imageConfig holds options that describe how to build image names for system components - ImageConfig ImageConfig `json:"imageConfig"` - - // allowDisabledDocker if true, the Kubelet will ignore errors from Docker. This means that a node can start on a machine that doesn't have docker started. - AllowDisabledDocker bool `json:"allowDisabledDocker"` - - // podManifestConfig holds the configuration for enabling the Kubelet to - // create pods based from a manifest file(s) placed locally on the node - PodManifestConfig *PodManifestConfig `json:"podManifestConfig"` - - // authConfig holds authn/authz configuration options - AuthConfig NodeAuthConfig `json:"authConfig"` - - // dockerConfig holds Docker related configuration options. - DockerConfig DockerConfig `json:"dockerConfig"` - - // kubeletArguments are key value pairs that will be passed directly to the Kubelet that match the Kubelet's - // command line arguments. These are not migrated or validated, so if you use them they may become invalid. - // These values override other settings in NodeConfig which may cause invalid configurations. - KubeletArguments ExtendedArguments `json:"kubeletArguments,omitempty"` - - // proxyArguments are key value pairs that will be passed directly to the Proxy that match the Proxy's - // command line arguments. These are not migrated or validated, so if you use them they may become invalid. - // These values override other settings in NodeConfig which may cause invalid configurations. - ProxyArguments ExtendedArguments `json:"proxyArguments,omitempty"` - - // iptablesSyncPeriod is how often iptable rules are refreshed - IPTablesSyncPeriod string `json:"iptablesSyncPeriod"` - - // enableUnidling controls whether or not the hybrid unidling proxy will be set up - EnableUnidling *bool `json:"enableUnidling"` - - // volumeConfig contains options for configuring volumes on the node. - VolumeConfig NodeVolumeConfig `json:"volumeConfig"` -} - -// NodeVolumeConfig contains options for configuring volumes on the node. -type NodeVolumeConfig struct { - // localQuota contains options for controlling local volume quota on the node. - LocalQuota LocalQuota `json:"localQuota"` -} - -// MasterVolumeConfig contains options for configuring volume plugins in the master node. -type MasterVolumeConfig struct { - // dynamicProvisioningEnabled is a boolean that toggles dynamic provisioning off when false, defaults to true - DynamicProvisioningEnabled *bool `json:"dynamicProvisioningEnabled"` -} - -// LocalQuota contains options for controlling local volume quota on the node. -type LocalQuota struct { - // FSGroup can be specified to enable a quota on local storage use per unique FSGroup ID. - // At present this is only implemented for emptyDir volumes, and if the underlying - // volumeDirectory is on an XFS filesystem. - PerFSGroup *resource.Quantity `json:"perFSGroup"` -} - -// NodeAuthConfig holds authn/authz configuration options -type NodeAuthConfig struct { - // authenticationCacheTTL indicates how long an authentication result should be cached. - // It takes a valid time duration string (e.g. "5m"). If empty, you get the default timeout. If zero (e.g. "0m"), caching is disabled - AuthenticationCacheTTL string `json:"authenticationCacheTTL"` - - // authenticationCacheSize indicates how many authentication results should be cached. If 0, the default cache size is used. - AuthenticationCacheSize int `json:"authenticationCacheSize"` - - // authorizationCacheTTL indicates how long an authorization result should be cached. - // It takes a valid time duration string (e.g. "5m"). If empty, you get the default timeout. If zero (e.g. "0m"), caching is disabled - AuthorizationCacheTTL string `json:"authorizationCacheTTL"` - - // authorizationCacheSize indicates how many authorization results should be cached. If 0, the default cache size is used. - AuthorizationCacheSize int `json:"authorizationCacheSize"` -} - -// NodeNetworkConfig provides network options for the node -type NodeNetworkConfig struct { - // networkPluginName is a string specifying the networking plugin - NetworkPluginName string `json:"networkPluginName"` - // Maximum transmission unit for the network packets - MTU uint32 `json:"mtu"` -} - -// DockerConfig holds Docker related configuration options. -type DockerConfig struct { - // execHandlerName is the name of the handler to use for executing - // commands in containers. - ExecHandlerName DockerExecHandlerType `json:"execHandlerName"` - // dockerShimSocket is the location of the dockershim socket the kubelet uses. - // Currently unix socket is supported on Linux, and tcp is supported on windows. - // Examples:'unix:///var/run/dockershim.sock', 'tcp://localhost:3735' - DockerShimSocket string `json:"dockerShimSocket"` - // dockerShimRootDirectory is the dockershim root directory. - DockershimRootDirectory string `json:"dockerShimRootDirectory"` -} - -type DockerExecHandlerType string - -const ( - // DockerExecHandlerNative uses Docker's exec API for executing commands in containers. - DockerExecHandlerNative DockerExecHandlerType = "native" - // DockerExecHandlerNsenter uses nsenter for executing commands in containers. - DockerExecHandlerNsenter DockerExecHandlerType = "nsenter" - - // ControllersDisabled indicates no controllers should be enabled. - ControllersDisabled = "none" - // ControllersAll indicates all controllers should be started. - ControllersAll = "*" -) - -// FeatureList contains a set of features -type FeatureList []string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MasterConfig holds the necessary configuration options for the OpenShift master -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type MasterConfig struct { - metav1.TypeMeta `json:",inline"` - - // servingInfo describes how to start serving - ServingInfo HTTPServingInfo `json:"servingInfo"` - - // authConfig configures authentication options in addition to the standard - // oauth token and client certificate authenticators - AuthConfig MasterAuthConfig `json:"authConfig"` - - // aggregatorConfig has options for configuring the aggregator component of the API server. - AggregatorConfig AggregatorConfig `json:"aggregatorConfig"` - - // CORSAllowedOrigins - CORSAllowedOrigins []string `json:"corsAllowedOrigins"` - - // apiLevels is a list of API levels that should be enabled on startup: v1 as examples - APILevels []string `json:"apiLevels"` - - // masterPublicURL is how clients can access the OpenShift API server - MasterPublicURL string `json:"masterPublicURL"` - - // controllers is a list of the controllers that should be started. If set to "none", no controllers - // will start automatically. The default value is "*" which will start all controllers. When - // using "*", you may exclude controllers by prepending a "-" in front of their name. No other - // values are recognized at this time. - Controllers string `json:"controllers"` - - // admissionConfig contains admission control plugin configuration. - AdmissionConfig AdmissionConfig `json:"admissionConfig"` - - // controllerConfig holds configuration values for controllers - ControllerConfig ControllerConfig `json:"controllerConfig"` - - // etcdStorageConfig contains information about how API resources are - // stored in Etcd. These values are only relevant when etcd is the - // backing store for the cluster. - EtcdStorageConfig EtcdStorageConfig `json:"etcdStorageConfig"` - - // etcdClientInfo contains information about how to connect to etcd - EtcdClientInfo EtcdConnectionInfo `json:"etcdClientInfo"` - // kubeletClientInfo contains information about how to connect to kubelets - KubeletClientInfo KubeletConnectionInfo `json:"kubeletClientInfo"` - - // KubernetesMasterConfig, if present start the kubernetes master in this process - KubernetesMasterConfig KubernetesMasterConfig `json:"kubernetesMasterConfig"` - // EtcdConfig, if present start etcd in this process - EtcdConfig *EtcdConfig `json:"etcdConfig"` - // OAuthConfig, if present start the /oauth endpoint in this process - OAuthConfig *OAuthConfig `json:"oauthConfig"` - - // DNSConfig, if present start the DNS server in this process - DNSConfig *DNSConfig `json:"dnsConfig"` - - // serviceAccountConfig holds options related to service accounts - ServiceAccountConfig ServiceAccountConfig `json:"serviceAccountConfig"` - - // masterClients holds all the client connection information for controllers and other system components - MasterClients MasterClients `json:"masterClients"` - - // imageConfig holds options that describe how to build image names for system components - ImageConfig ImageConfig `json:"imageConfig"` - - // imagePolicyConfig controls limits and behavior for importing images - ImagePolicyConfig ImagePolicyConfig `json:"imagePolicyConfig"` - - // policyConfig holds information about where to locate critical pieces of bootstrapping policy - PolicyConfig PolicyConfig `json:"policyConfig"` - - // projectConfig holds information about project creation and defaults - ProjectConfig ProjectConfig `json:"projectConfig"` - - // routingConfig holds information about routing and route generation - RoutingConfig RoutingConfig `json:"routingConfig"` - - // networkConfig to be passed to the compiled in network plugin - NetworkConfig MasterNetworkConfig `json:"networkConfig"` - - // MasterVolumeConfig contains options for configuring volume plugins in the master node. - VolumeConfig MasterVolumeConfig `json:"volumeConfig"` - - // jenkinsPipelineConfig holds information about the default Jenkins template - // used for JenkinsPipeline build strategy. - JenkinsPipelineConfig JenkinsPipelineConfig `json:"jenkinsPipelineConfig"` - - // auditConfig holds information related to auditing capabilities. - AuditConfig AuditConfig `json:"auditConfig"` - - // DisableOpenAPI avoids starting the openapi endpoint because it is very expensive. - // This option will be removed at a later time. It is never serialized. - DisableOpenAPI bool `json:"-"` -} - -// MasterAuthConfig configures authentication options in addition to the standard -// oauth token and client certificate authenticators -type MasterAuthConfig struct { - // requestHeader holds options for setting up a front proxy against the API. It is optional. - RequestHeader *RequestHeaderAuthenticationOptions `json:"requestHeader"` - // WebhookTokenAuthnConfig, if present configures remote token reviewers - WebhookTokenAuthenticators []WebhookTokenAuthenticator `json:"webhookTokenAuthenticators"` - // oauthMetadataFile is a path to a file containing the discovery endpoint for OAuth 2.0 Authorization - // Server Metadata for an external OAuth server. - // See IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 - // This option is mutually exclusive with OAuthConfig - OAuthMetadataFile string `json:"oauthMetadataFile"` -} - -// RequestHeaderAuthenticationOptions provides options for setting up a front proxy against the entire -// API instead of against the /oauth endpoint. -type RequestHeaderAuthenticationOptions struct { - // clientCA is a file with the trusted signer certs. It is required. - ClientCA string `json:"clientCA"` - // clientCommonNames is a required list of common names to require a match from. - ClientCommonNames []string `json:"clientCommonNames"` - - // usernameHeaders is the list of headers to check for user information. First hit wins. - UsernameHeaders []string `json:"usernameHeaders"` - // GroupNameHeader is the set of headers to check for group information. All are unioned. - GroupHeaders []string `json:"groupHeaders"` - // extraHeaderPrefixes is the set of request header prefixes to inspect for user extra. X-Remote-Extra- is suggested. - ExtraHeaderPrefixes []string `json:"extraHeaderPrefixes"` -} - -// AggregatorConfig holds information required to make the aggregator function. -type AggregatorConfig struct { - // proxyClientInfo specifies the client cert/key to use when proxying to aggregated API servers - ProxyClientInfo CertInfo `json:"proxyClientInfo"` -} - -type LogFormatType string - -type WebHookModeType string - -const ( - // LogFormatLegacy saves event in 1-line text format. - LogFormatLegacy LogFormatType = "legacy" - // LogFormatJson saves event in structured json format. - LogFormatJson LogFormatType = "json" - - // WebHookModeBatch indicates that the webhook should buffer audit events - // internally, sending batch updates either once a certain number of - // events have been received or a certain amount of time has passed. - WebHookModeBatch WebHookModeType = "batch" - // WebHookModeBlocking causes the webhook to block on every attempt to process - // a set of events. This causes requests to the API server to wait for a - // round trip to the external audit service before sending a response. - WebHookModeBlocking WebHookModeType = "blocking" -) - -// AuditConfig holds configuration for the audit capabilities -type AuditConfig struct { - // If this flag is set, audit log will be printed in the logs. - // The logs contains, method, user and a requested URL. - Enabled bool `json:"enabled"` - // All requests coming to the apiserver will be logged to this file. - AuditFilePath string `json:"auditFilePath"` - // Maximum number of days to retain old log files based on the timestamp encoded in their filename. - MaximumFileRetentionDays int `json:"maximumFileRetentionDays"` - // Maximum number of old log files to retain. - MaximumRetainedFiles int `json:"maximumRetainedFiles"` - // Maximum size in megabytes of the log file before it gets rotated. Defaults to 100MB. - MaximumFileSizeMegabytes int `json:"maximumFileSizeMegabytes"` - - // policyFile is a path to the file that defines the audit policy configuration. - PolicyFile string `json:"policyFile"` - // 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. - PolicyConfiguration runtime.RawExtension `json:"policyConfiguration"` - - // Format of saved audits (legacy or json). - LogFormat LogFormatType `json:"logFormat"` - - // Path to a .kubeconfig formatted file that defines the audit webhook configuration. - WebHookKubeConfig string `json:"webHookKubeConfig"` - // Strategy for sending audit events (block or batch). - WebHookMode WebHookModeType `json:"webHookMode"` -} - -// JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy -type JenkinsPipelineConfig struct { - // autoProvisionEnabled determines whether a Jenkins server will be spawned from the provided - // template when the first build config in the project with type JenkinsPipeline - // is created. When not specified this option defaults to true. - AutoProvisionEnabled *bool `json:"autoProvisionEnabled"` - // templateNamespace contains the namespace name where the Jenkins template is stored - TemplateNamespace string `json:"templateNamespace"` - // templateName is the name of the default Jenkins template - TemplateName string `json:"templateName"` - // serviceName is the name of the Jenkins service OpenShift uses to detect - // whether a Jenkins pipeline handler has already been installed in a project. - // This value *must* match a service name in the provided template. - ServiceName string `json:"serviceName"` - // parameters specifies a set of optional parameters to the Jenkins template. - Parameters map[string]string `json:"parameters"` -} - -// ImagePolicyConfig holds the necessary configuration options for limits and behavior for importing images -type ImagePolicyConfig struct { - // maxImagesBulkImportedPerRepository controls the number of images that are imported when a user - // does a bulk import of a container repository. This number defaults to 50 to prevent users from - // importing large numbers of images accidentally. Set -1 for no limit. - MaxImagesBulkImportedPerRepository int `json:"maxImagesBulkImportedPerRepository"` - // disableScheduledImport allows scheduled background import of images to be disabled. - DisableScheduledImport bool `json:"disableScheduledImport"` - // scheduledImageImportMinimumIntervalSeconds is the minimum number of seconds that can elapse between when image streams - // scheduled for background import are checked against the upstream repository. The default value is 15 minutes. - ScheduledImageImportMinimumIntervalSeconds int `json:"scheduledImageImportMinimumIntervalSeconds"` - // maxScheduledImageImportsPerMinute is the maximum number of scheduled image streams that will be imported in the - // background per minute. The default value is 60. Set to -1 for unlimited. - MaxScheduledImageImportsPerMinute int `json:"maxScheduledImageImportsPerMinute"` - // 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. - AllowedRegistriesForImport *AllowedRegistries `json:"allowedRegistriesForImport,omitempty"` - // internalRegistryHostname sets the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. - InternalRegistryHostname string `json:"internalRegistryHostname,omitempty"` - // externalRegistryHostname sets the hostname for the default external image - // registry. The external hostname should be set only when the image registry - // is exposed externally. The value is used in 'publicDockerImageRepository' - // field in ImageStreams. The value must be in "hostname[:port]" format. - ExternalRegistryHostname string `json:"externalRegistryHostname,omitempty"` - // additionalTrustedCA is a path to a pem bundle file containing additional CAs that - // should be trusted during imagestream import. - AdditionalTrustedCA string `json:"additionalTrustedCA,omitempty"` -} - -// AllowedRegistries represents a list of registries allowed for the image import. -type AllowedRegistries []RegistryLocation - -// RegistryLocation contains a location of the registry specified by the registry domain -// name. The domain name might include wildcards, like '*' or '??'. -type RegistryLocation struct { - // 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. - DomainName string `json:"domainName"` - // insecure indicates whether the registry is secure (https) or insecure (http) - // By default (if not specified) the registry is assumed as secure. - Insecure bool `json:"insecure,omitempty"` -} - -// holds the necessary configuration options for -type ProjectConfig struct { - // defaultNodeSelector holds default project node label selector - DefaultNodeSelector string `json:"defaultNodeSelector"` - - // 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. - // It is in the format namespace/template and it is optional. - // If it is not specified, a default template is used. - ProjectRequestTemplate string `json:"projectRequestTemplate"` - - // securityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled. - SecurityAllocator *SecurityAllocator `json:"securityAllocator"` -} - -// SecurityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled. -type SecurityAllocator struct { - // uidAllocatorRange defines the total set of Unix user IDs (UIDs) that will be allocated to projects automatically, and the size of the - // block each namespace gets. For example, 1000-1999/10 will allocate ten UIDs per namespace, and will be able to allocate up to 100 blocks - // before running out of space. The default is to allocate from 1 billion to 2 billion in 10k blocks (which is the expected size of the - // ranges container images will use once user namespaces are started). - UIDAllocatorRange string `json:"uidAllocatorRange"` - // mcsAllocatorRange defines the range of MCS categories that will be assigned to namespaces. The format is - // "/[,]". The default is "s0/2" and will allocate from c0 -> c1023, which means a total of 535k labels - // are available (1024 choose 2 ~ 535k). If this value is changed after startup, new projects may receive labels that are already allocated - // to other projects. Prefix may be any valid SELinux set of terms (including user, role, and type), although leaving them as the default - // will allow the server to set them automatically. - // - // Examples: - // * s0:/2 - Allocate labels from s0:c0,c0 to s0:c511,c511 - // * s0:/2,512 - Allocate labels from s0:c0,c0,c0 to s0:c511,c511,511 - // - MCSAllocatorRange string `json:"mcsAllocatorRange"` - // mcsLabelsPerProject defines the number of labels that should be reserved per project. The default is 5 to match the default UID and MCS - // ranges (100k namespaces, 535k/5 labels). - MCSLabelsPerProject int `json:"mcsLabelsPerProject"` -} - -// holds the necessary configuration options for -type PolicyConfig struct { - // userAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS! - UserAgentMatchingConfig UserAgentMatchingConfig `json:"userAgentMatchingConfig"` -} - -// UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS! -type UserAgentMatchingConfig struct { - // If this list is non-empty, then a User-Agent must match one of the UserAgentRegexes to be allowed - RequiredClients []UserAgentMatchRule `json:"requiredClients"` - - // If this list is non-empty, then a User-Agent must not match any of the UserAgentRegexes - DeniedClients []UserAgentDenyRule `json:"deniedClients"` - - // defaultRejectionMessage is the message shown when rejecting a client. If it is not a set, a generic message is given. - DefaultRejectionMessage string `json:"defaultRejectionMessage"` -} - -// UserAgentMatchRule describes how to match a given request based on User-Agent and HTTPVerb -type UserAgentMatchRule struct { - // UserAgentRegex is a regex that is checked against the User-Agent. - // Known variants of oc clients - // 1. oc accessing kube resources: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 2. oc accessing openshift resources: oc/v1.1.3 (linux/amd64) openshift/b348c2f - // 3. openshift kubectl accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 4. openshift kubectl accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f - // 5. oadm accessing kube resources: oadm/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 6. oadm accessing openshift resources: oadm/v1.1.3 (linux/amd64) openshift/b348c2f - // 7. openshift cli accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d - // 8. openshift cli accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f - Regex string `json:"regex"` - - // httpVerbs specifies which HTTP verbs should be matched. An empty list means "match all verbs". - HTTPVerbs []string `json:"httpVerbs"` -} - -// UserAgentDenyRule adds a rejection message that can be used to help a user figure out how to get an approved client -type UserAgentDenyRule struct { - UserAgentMatchRule `json:",inline"` - - // rejectionMessage is the message shown when rejecting a client. If it is not a set, the default message is used. - RejectionMessage string `json:"rejectionMessage"` -} - -// RoutingConfig holds the necessary configuration options for routing to subdomains -type RoutingConfig struct { - // subdomain is the suffix appended to $service.$namespace. to form the default route hostname - // DEPRECATED: This field is being replaced by routers setting their own defaults. This is the - // "default" route. - Subdomain string `json:"subdomain"` -} - -// MasterNetworkConfig to be passed to the compiled in network plugin -type MasterNetworkConfig struct { - // networkPluginName is the name of the network plugin to use - NetworkPluginName string `json:"networkPluginName"` - // clusterNetworkCIDR is the CIDR string to specify the global overlay network's L3 space. Deprecated, but maintained for backwards compatibility, use ClusterNetworks instead. - DeprecatedClusterNetworkCIDR string `json:"clusterNetworkCIDR,omitempty"` - // clusterNetworks is a list of ClusterNetwork objects that defines the global overlay network's L3 space by specifying a set of CIDR and netmasks that the SDN can allocate addressed from. If this is specified, then ClusterNetworkCIDR and HostSubnetLength may not be set. - ClusterNetworks []ClusterNetworkEntry `json:"clusterNetworks"` - // hostSubnetLength is the number of bits to allocate to each host's subnet e.g. 8 would mean a /24 network on the host. Deprecated, but maintained for backwards compatibility, use ClusterNetworks instead. - DeprecatedHostSubnetLength uint32 `json:"hostSubnetLength,omitempty"` - // ServiceNetwork is the CIDR string to specify the service networks - ServiceNetworkCIDR string `json:"serviceNetworkCIDR"` - // externalIPNetworkCIDRs controls what values are acceptable for the service external IP field. If empty, no externalIP - // may be set. It may contain a list of CIDRs which are checked for access. If a CIDR is prefixed with !, IPs in that - // CIDR will be rejected. Rejections will be applied first, then the IP checked against one of the allowed CIDRs. You - // should ensure this range does not overlap with your nodes, pods, or service CIDRs for security reasons. - ExternalIPNetworkCIDRs []string `json:"externalIPNetworkCIDRs"` - // ingressIPNetworkCIDR controls the range to assign ingress ips from for services of type LoadBalancer on bare - // metal. If empty, ingress ips will not be assigned. It may contain a single CIDR that will be allocated from. - // For security reasons, you should ensure that this range does not overlap with the CIDRs reserved for external ips, - // nodes, pods, or services. - IngressIPNetworkCIDR string `json:"ingressIPNetworkCIDR"` - // vxlanPort is the VXLAN port used by the cluster defaults. If it is not set, 4789 is the default value - VXLANPort uint32 `json:"vxlanPort,omitempty"` -} - -// ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips. -type ClusterNetworkEntry struct { - // cidr defines the total range of a cluster networks address space. - CIDR string `json:"cidr"` - // hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pod. - HostSubnetLength uint32 `json:"hostSubnetLength"` -} - -// ImageConfig holds the necessary configuration options for building image names for system components -type ImageConfig struct { - // format is the format of the name to be built for the system component - Format string `json:"format"` - // latest determines if the latest tag will be pulled from the registry - Latest bool `json:"latest"` -} - -// RemoteConnectionInfo holds information necessary for establishing a remote connection -type RemoteConnectionInfo struct { - // url is the remote URL to connect to - URL string `json:"url"` - // ca is the CA for verifying TLS connections - CA string `json:"ca"` - // CertInfo is the TLS client cert information to present - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` -} - -// KubeletConnectionInfo holds information necessary for connecting to a kubelet -type KubeletConnectionInfo struct { - // port is the port to connect to kubelets on - Port uint `json:"port"` - // ca is the CA for verifying TLS connections to kubelets - CA string `json:"ca"` - // CertInfo is the TLS client cert information for securing communication to kubelets - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` -} - -// EtcdConnectionInfo holds information necessary for connecting to an etcd server -type EtcdConnectionInfo struct { - // urls are the URLs for etcd - URLs []string `json:"urls"` - // ca is a file containing trusted roots for the etcd server certificates - CA string `json:"ca"` - // CertInfo is the TLS client cert information for securing communication to etcd - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` -} - -// EtcdStorageConfig holds the necessary configuration options for the etcd storage underlying OpenShift and Kubernetes -type EtcdStorageConfig struct { - // kubernetesStorageVersion is the API version that Kube resources in etcd should be - // serialized to. This value should *not* be advanced until all clients in the - // cluster that read from etcd have code that allows them to read the new version. - KubernetesStorageVersion string `json:"kubernetesStorageVersion"` - // kubernetesStoragePrefix is the path within etcd that the Kubernetes resources will - // be rooted under. This value, if changed, will mean existing objects in etcd will - // no longer be located. The default value is 'kubernetes.io'. - KubernetesStoragePrefix string `json:"kubernetesStoragePrefix"` - // openShiftStorageVersion is the API version that OS resources in etcd should be - // serialized to. This value should *not* be advanced until all clients in the - // cluster that read from etcd have code that allows them to read the new version. - OpenShiftStorageVersion string `json:"openShiftStorageVersion"` - // openShiftStoragePrefix 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. The default value is 'openshift.io'. - OpenShiftStoragePrefix string `json:"openShiftStoragePrefix"` -} - -// ServingInfo holds information about serving web pages -type ServingInfo struct { - // bindAddress is the ip:port to serve on - BindAddress string `json:"bindAddress"` - // bindNetwork is the type of network to bind to - defaults to "tcp4", accepts "tcp", - // "tcp4", and "tcp6" - BindNetwork string `json:"bindNetwork"` - // CertInfo is the TLS cert info for serving secure traffic. - // this is anonymous so that we can inline it for serialization - CertInfo `json:",inline"` - // clientCA is the certificate bundle for all the signers that you'll recognize for incoming client certificates - ClientCA string `json:"clientCA"` - // namedCertificates is a list of certificates to use to secure requests to specific hostnames - NamedCertificates []NamedCertificate `json:"namedCertificates"` - // minTLSVersion is the minimum TLS version supported. - // Values must match version names from https://golang.org/pkg/crypto/tls/#pkg-constants - MinTLSVersion string `json:"minTLSVersion,omitempty"` - // 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 - CipherSuites []string `json:"cipherSuites,omitempty"` -} - -// NamedCertificate specifies a certificate/key, and the names it should be served for -type NamedCertificate struct { - // 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. - Names []string `json:"names"` - // CertInfo is the TLS cert info for serving secure traffic - CertInfo `json:",inline"` -} - -// HTTPServingInfo holds configuration for serving HTTP -type HTTPServingInfo struct { - // ServingInfo is the HTTP serving information - ServingInfo `json:",inline"` - // maxRequestsInFlight is the number of concurrent requests allowed to the server. If zero, no limit. - MaxRequestsInFlight int `json:"maxRequestsInFlight"` - // requestTimeoutSeconds is the number of seconds before requests are timed out. The default is 60 minutes, if - // -1 there is no limit on requests. - RequestTimeoutSeconds int `json:"requestTimeoutSeconds"` -} - -// MasterClients holds references to `.kubeconfig` files that qualify master clients for OpenShift and Kubernetes -type MasterClients struct { - // openshiftLoopbackKubeConfig is a .kubeconfig filename for system components to loopback to this master - OpenShiftLoopbackKubeConfig string `json:"openshiftLoopbackKubeConfig"` - - // openshiftLoopbackClientConnectionOverrides specifies client overrides for system components to loop back to this master. - OpenShiftLoopbackClientConnectionOverrides *ClientConnectionOverrides `json:"openshiftLoopbackClientConnectionOverrides"` -} - -// ClientConnectionOverrides are a set of overrides to the default client connection settings. -type ClientConnectionOverrides struct { - // 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. - AcceptContentTypes string `json:"acceptContentTypes"` - // contentType is the content type used when sending data to the server from this client. - ContentType string `json:"contentType"` - - // qps controls the number of queries per second allowed for this connection. - QPS float32 `json:"qps"` - // burst allows extra queries to accumulate when a client is exceeding its rate. - Burst int32 `json:"burst"` -} - -// DNSConfig holds the necessary configuration options for DNS -type DNSConfig struct { - // bindAddress is the ip:port to serve DNS on - BindAddress string `json:"bindAddress"` - // bindNetwork is the type of network to bind to - defaults to "tcp4", accepts "tcp", - // "tcp4", and "tcp6" - BindNetwork string `json:"bindNetwork"` - // allowRecursiveQueries allows the DNS server on the master to answer queries recursively. Note that open - // resolvers can be used for DNS amplification attacks and the master DNS should not be made accessible - // to public networks. - AllowRecursiveQueries bool `json:"allowRecursiveQueries"` -} - -// WebhookTokenAuthenticators holds the necessary configuation options for -// external token authenticators -type WebhookTokenAuthenticator struct { - // configFile is a path to a Kubeconfig file with the webhook configuration - ConfigFile string `json:"configFile"` - // cacheTTL indicates how long an authentication result should be cached. - // It takes a valid time duration string (e.g. "5m"). - // If empty, you get a default timeout of 2 minutes. - // If zero (e.g. "0m"), caching is disabled - CacheTTL string `json:"cacheTTL"` -} - -// OAuthConfig holds the necessary configuration options for OAuth authentication -type OAuthConfig struct { - // masterCA is the CA for verifying the TLS connection back to the MasterURL. - MasterCA *string `json:"masterCA"` - - // masterURL is used for making server-to-server calls to exchange authorization codes for access tokens - MasterURL string `json:"masterURL"` - - // masterPublicURL is used for building valid client redirect URLs for internal and external access - MasterPublicURL string `json:"masterPublicURL"` - - // assetPublicURL is used for building valid client redirect URLs for external access - AssetPublicURL string `json:"assetPublicURL"` - - // alwaysShowProviderSelection will force the provider selection page to render even when there is only a single provider. - AlwaysShowProviderSelection bool `json:"alwaysShowProviderSelection"` - - // identityProviders is an ordered list of ways for a user to identify themselves - IdentityProviders []IdentityProvider `json:"identityProviders"` - - // grantConfig describes how to handle grants - GrantConfig GrantConfig `json:"grantConfig"` - - // sessionConfig hold information about configuring sessions. - SessionConfig *SessionConfig `json:"sessionConfig"` - - // tokenConfig contains options for authorization and access tokens - TokenConfig TokenConfig `json:"tokenConfig"` - - // templates allow you to customize pages like the login page. - Templates *OAuthTemplates `json:"templates"` -} - -// OAuthTemplates allow for customization of pages like the login page -type OAuthTemplates struct { - // login is a path to a file containing a go template used to render the login page. - // If unspecified, the default login page is used. - Login string `json:"login"` - - // providerSelection is a path to a file containing a go template used to render the provider selection page. - // If unspecified, the default provider selection page is used. - ProviderSelection string `json:"providerSelection"` - - // error is a path to a file containing a go template used to render error pages during the authentication or grant flow - // If unspecified, the default error page is used. - Error string `json:"error"` -} - -// ServiceAccountConfig holds the necessary configuration options for a service account -type ServiceAccountConfig struct { - // managedNames is a list of service account names that will be auto-created in every namespace. - // If no names are specified, the ServiceAccountsController will not be started. - ManagedNames []string `json:"managedNames"` - - // limitSecretReferences controls whether or not to allow a service account to reference any secret in a namespace - // without explicitly referencing them - LimitSecretReferences bool `json:"limitSecretReferences"` - - // privateKeyFile is a file containing a PEM-encoded private RSA key, used to sign service account tokens. - // If no private key is specified, the service account TokensController will not be started. - PrivateKeyFile string `json:"privateKeyFile"` - - // publicKeyFiles is a list of files, each containing a PEM-encoded public RSA key. - // (If any file contains a private key, the public portion of the key is used) - // The list of public keys is used to verify presented service account tokens. - // Each key is tried in order until the list is exhausted or verification succeeds. - // If no keys are specified, no service account authentication will be available. - PublicKeyFiles []string `json:"publicKeyFiles"` - - // masterCA is the CA for verifying the TLS connection back to the master. The service account controller will automatically - // inject the contents of this file into pods so they can verify connections to the master. - MasterCA string `json:"masterCA"` -} - -// 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 defined the default token - // inactivity timeout for tokens granted by any client. - // Setting it to nil means the feature is completely disabled (default) - // The default setting can be overridden on OAuthClient basis. - // 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: - // - 0: Tokens never time out - // - X: Tokens time out if there is no activity for X seconds - // The current minimum allowed value for X is 300 (5 minutes) - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` -} - -// SessionConfig specifies options for cookie-based sessions. Used by AuthRequestHandlerSession -type SessionConfig struct { - // sessionSecretsFile is a reference to a file containing a serialized SessionSecrets object - // If no file is specified, a random signing and encryption key are generated at each server start - SessionSecretsFile string `json:"sessionSecretsFile"` - // sessionMaxAgeSeconds specifies how long created sessions last. Used by AuthRequestHandlerSession - SessionMaxAgeSeconds int32 `json:"sessionMaxAgeSeconds"` - // sessionName is the cookie name used to store the session - SessionName string `json:"sessionName"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SessionSecrets list the secrets to use to sign/encrypt and authenticate/decrypt created sessions. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type SessionSecrets struct { - metav1.TypeMeta `json:",inline"` - - // secrets is a list of secrets - // New sessions are signed and encrypted using the first secret. - // Existing sessions are decrypted/authenticated by each secret until one succeeds. This allows rotating secrets. - Secrets []SessionSecret `json:"secrets"` -} - -// SessionSecret is a secret used to authenticate/decrypt cookie-based sessions -type SessionSecret struct { - // authentication is used to authenticate sessions using HMAC. Recommended to use a secret with 32 or 64 bytes. - Authentication string `json:"authentication"` - // encryption is used to encrypt sessions. Must be 16, 24, or 32 characters long, to select AES-128, AES- - Encryption string `json:"encryption"` -} - -// IdentityProvider provides identities for users authenticating using credentials -type IdentityProvider struct { - // name is used to qualify the identities returned by this provider - Name string `json:"name"` - // UseAsChallenger indicates whether to issue WWW-Authenticate challenges for this provider - UseAsChallenger bool `json:"challenge"` - // UseAsLogin indicates whether to use this identity provider for unauthenticated browsers to login against - UseAsLogin bool `json:"login"` - // mappingMethod determines how identities from this provider are mapped to users - MappingMethod string `json:"mappingMethod"` - // provider contains the information about how to set up a specific identity provider - Provider runtime.RawExtension `json:"provider"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BasicAuthPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // RemoteConnectionInfo contains information about how to connect to the external basic auth server - RemoteConnectionInfo `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AllowAllPasswordIdentityProvider provides identities for users authenticating using non-empty passwords -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type AllowAllPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DenyAllPasswordIdentityProvider provides no identities for users -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type DenyAllPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type HTPasswdPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // file is a reference to your htpasswd file - File string `json:"file"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type LDAPPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - // 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 - URL string `json:"url"` - // bindDN is an optional DN to bind with during the search phase. - BindDN string `json:"bindDN"` - // bindPassword is an optional password to bind with during the search phase. - BindPassword StringSource `json:"bindPassword"` - - // Insecure, if true, indicates the connection should not use TLS. - // Cannot be set to true with a URL scheme of "ldaps://" - // If false, "ldaps://" URLs connect using TLS, and "ldap://" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830 - Insecure bool `json:"insecure"` - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `json:"ca"` - // attributes maps LDAP attributes to identities - Attributes LDAPAttributeMapping `json:"attributes"` -} - -// LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields -type LDAPAttributeMapping struct { - // id is the list of attributes whose values should be used as the user ID. Required. - // 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" - 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" - 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 - Email []string `json:"email"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type KeystonePasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - // RemoteConnectionInfo contains information about how to connect to the keystone server - RemoteConnectionInfo `json:",inline"` - // Domain Name is required for keystone v3 - DomainName string `json:"domainName"` - // useKeystoneIdentity flag indicates that user should be authenticated by keystone ID, not by username - UseKeystoneIdentity bool `json:"useKeystoneIdentity"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type RequestHeaderIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // 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 - // 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} - LoginURL string `json:"loginURL"` - - // 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 - // 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} - ChallengeURL string `json:"challengeURL"` - - // clientCA is a file 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. - ClientCA string `json:"clientCA"` - // 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. - ClientCommonNames []string `json:"clientCommonNames"` - - // headers is the set of headers to check for identity information - Headers []string `json:"headers"` - // preferredUsernameHeaders is the set of headers to check for the preferred username - PreferredUsernameHeaders []string `json:"preferredUsernameHeaders"` - // nameHeaders is the set of headers to check for the display name - NameHeaders []string `json:"nameHeaders"` - // emailHeaders is the set of headers to check for the email address - EmailHeaders []string `json:"emailHeaders"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitHubIdentityProvider provides identities for users authenticating using GitHub credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GitHubIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret StringSource `json:"clientSecret"` - // organizations optionally restricts which organizations are allowed to log in - Organizations []string `json:"organizations"` - // teams optionally restricts which teams are allowed to log in. Format is /. - Teams []string `json:"teams"` - // 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 that is configured at /setup/settings#hostname. - Hostname string `json:"hostname"` - // ca is the optional trusted certificate authority bundle to use when making requests to the server. - // If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value. - CA string `json:"ca"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitLabIdentityProvider provides identities for users authenticating using GitLab credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GitLabIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `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 the oauth client secret - ClientSecret StringSource `json:"clientSecret"` - // legacy determines if OAuth2 or OIDC should be used - // If true, OAuth2 is used - // If false, OIDC is used - // If nil and the URL's host is gitlab.com, OIDC is used - // Otherwise, OAuth2 is used - // In a future release, nil will default to using OIDC - // Eventually this flag will be removed and only OIDC will be used - Legacy *bool `json:"legacy,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GoogleIdentityProvider provides identities for users authenticating using Google credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GoogleIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret StringSource `json:"clientSecret"` - - // hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to - HostedDomain string `json:"hostedDomain"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type OpenIDIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `json:"ca"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret StringSource `json:"clientSecret"` - - // extraScopes are any scopes to request in addition to the standard "openid" scope. - ExtraScopes []string `json:"extraScopes"` - - // extraAuthorizeParameters are any custom parameters to add to the authorize request. - ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters"` - - // urls to use to authenticate - URLs OpenIDURLs `json:"urls"` - - // claims mappings - Claims OpenIDClaims `json:"claims"` -} - -// OpenIDURLs are URLs to use when authenticating with an OpenID identity provider -type OpenIDURLs struct { - // authorize is the oauth authorization URL - Authorize string `json:"authorize"` - // token is the oauth token granting URL - Token string `json:"token"` - // userInfo is the optional userinfo URL. - // If present, a granted access_token is used to request claims - // If empty, a granted id_token is parsed for claims - UserInfo string `json:"userInfo"` -} - -// OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider -type OpenIDClaims struct { - // id is the list of claims whose values should be used as the user ID. Required. - // OpenID standard identity claim is "sub" - ID []string `json:"id"` - // 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 - 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 - 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 - Email []string `json:"email"` -} - -// GrantConfig holds the necessary configuration options for grant handlers -type GrantConfig struct { - // method determines the default strategy to use when an OAuth client requests a grant. - // 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 - Method GrantHandlerType `json:"method"` - - // serviceAccountMethod is used for determining client authorization for service account oauth client. - // It must be either: deny, prompt - ServiceAccountMethod GrantHandlerType `json:"serviceAccountMethod"` -} - -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" -) - -// EtcdConfig holds the necessary configuration options for connecting with an etcd database -type EtcdConfig struct { - // servingInfo describes how to start serving the etcd master - ServingInfo ServingInfo `json:"servingInfo"` - // address is the advertised host:port for client connections to etcd - Address string `json:"address"` - // peerServingInfo describes how to start serving the etcd peer - PeerServingInfo ServingInfo `json:"peerServingInfo"` - // peerAddress is the advertised host:port for peer connections to etcd - PeerAddress string `json:"peerAddress"` - - // StorageDir is the path to the etcd storage directory - StorageDir string `json:"storageDirectory"` -} - -// KubernetesMasterConfig holds the necessary configuration options for the Kubernetes master -type KubernetesMasterConfig struct { - // apiLevels is a list of API levels that should be enabled on startup: v1 as examples - APILevels []string `json:"apiLevels"` - // disabledAPIGroupVersions is a map of groups to the versions (or *) that should be disabled. - DisabledAPIGroupVersions map[string][]string `json:"disabledAPIGroupVersions"` - - // masterIP is the public IP address of kubernetes stuff. If empty, the first result from net.InterfaceAddrs will be used. - MasterIP string `json:"masterIP"` - // masterEndpointReconcileTTL sets the time to live in seconds of an endpoint record recorded by each master. The endpoints are checked - // at an interval that is 2/3 of this value and this value defaults to 15s if unset. In very large clusters, this value may be increased to - // reduce the possibility that the master endpoint record expires (due to other load on the etcd server) and causes masters to drop in and - // out of the kubernetes service record. It is not recommended to set this value below 15s. - MasterEndpointReconcileTTL int `json:"masterEndpointReconcileTTL"` - // servicesSubnet is the subnet to use for assigning service IPs - ServicesSubnet string `json:"servicesSubnet"` - // servicesNodePortRange is the range to use for assigning service public ports on a host. - ServicesNodePortRange string `json:"servicesNodePortRange"` - - // schedulerConfigFile points to a file that describes how to set up the scheduler. If empty, you get the default scheduling rules. - SchedulerConfigFile string `json:"schedulerConfigFile"` - - // podEvictionTimeout controls grace period for deleting pods on failed nodes. - // It takes valid time duration string. If empty, you get the default pod eviction timeout. - PodEvictionTimeout string `json:"podEvictionTimeout"` - // proxyClientInfo specifies the client cert/key to use when proxying to pods - ProxyClientInfo CertInfo `json:"proxyClientInfo"` - - // apiServerArguments are key value pairs that will be passed directly to the Kube apiserver that match the apiservers's - // command line arguments. These are not migrated, but if you reference a value that does not exist the server will not - // start. These values may override other settings in KubernetesMasterConfig which may cause invalid configurations. - APIServerArguments ExtendedArguments `json:"apiServerArguments"` - // controllerArguments are key value pairs that will be passed directly to the Kube controller manager that match the - // controller manager's command line arguments. These are not migrated, but if you reference a value that does not exist - // the server will not start. These values may override other settings in KubernetesMasterConfig which may cause invalid - // configurations. - ControllerArguments ExtendedArguments `json:"controllerArguments"` - // schedulerArguments are key value pairs that will be passed directly to the Kube scheduler that match the scheduler's - // command line arguments. These are not migrated, but if you reference a value that does not exist the server will not - // start. These values may override other settings in KubernetesMasterConfig which may cause invalid configurations. - SchedulerArguments ExtendedArguments `json:"schedulerArguments"` -} - -// CertInfo relates a certificate with a private key -type CertInfo struct { - // certFile is a file containing a PEM-encoded certificate - CertFile string `json:"certFile"` - // keyFile is a file containing a PEM-encoded private key for the certificate specified by CertFile - KeyFile string `json:"keyFile"` -} - -// PodManifestConfig holds the necessary configuration options for using pod manifests -type PodManifestConfig struct { - // path specifies the path for the pod manifest file or directory - // If its a directory, its expected to contain on or more manifest files - // This is used by the Kubelet to create pods on the node - Path string `json:"path"` - // fileCheckIntervalSeconds is the interval in seconds for checking the manifest file(s) for new data - // The interval needs to be a positive value - FileCheckIntervalSeconds int64 `json:"fileCheckIntervalSeconds"` -} - -// 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. -type StringSource struct { - // StringSourceSpec specifies the string value, or external location - StringSourceSpec `json:",inline"` -} - -// StringSourceSpec specifies a string value, or external location -type StringSourceSpec struct { - // value specifies the cleartext value, or an encrypted value if keyFile is specified. - Value string `json:"value"` - - // env specifies an envvar containing the cleartext value, or an encrypted value if the keyFile is specified. - Env string `json:"env"` - - // file references a file containing the cleartext value, or an encrypted value if a keyFile is specified. - File string `json:"file"` - - // keyFile references a file containing the key to use to decrypt the value. - KeyFile string `json:"keyFile"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// LDAPSyncConfig holds the necessary configuration options to define an LDAP group sync -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type LDAPSyncConfig struct { - metav1.TypeMeta `json:",inline"` - // Host is the scheme, host and port of the LDAP server to connect to: - // scheme://host:port - URL string `json:"url"` - // bindDN is an optional DN to bind to the LDAP server with - BindDN string `json:"bindDN"` - // bindPassword is an optional password to bind with during the search phase. - BindPassword StringSource `json:"bindPassword"` - - // Insecure, if true, indicates the connection should not use TLS. - // Cannot be set to true with a URL scheme of "ldaps://" - // If false, "ldaps://" URLs connect using TLS, and "ldap://" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830 - Insecure bool `json:"insecure"` - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `json:"ca"` - - // LDAPGroupUIDToOpenShiftGroupNameMapping is an optional direct mapping of LDAP group UIDs to - // OpenShift Group names - LDAPGroupUIDToOpenShiftGroupNameMapping map[string]string `json:"groupUIDNameMapping"` - - // RFC2307Config holds the configuration for extracting data from an LDAP server set up in a fashion - // similar to RFC2307: first-class group and user entries, with group membership determined by a - // multi-valued attribute on the group entry listing its members - RFC2307Config *RFC2307Config `json:"rfc2307,omitempty"` - - // ActiveDirectoryConfig holds the configuration for extracting data from an LDAP server set up in a - // fashion similar to that used in Active Directory: first-class user entries, with group membership - // determined by a multi-valued attribute on members listing groups they are a member of - ActiveDirectoryConfig *ActiveDirectoryConfig `json:"activeDirectory,omitempty"` - - // AugmentedActiveDirectoryConfig holds the configuration for extracting data from an LDAP server - // set up in a fashion similar to that used in Active Directory as described above, with one addition: - // first-class group entries exist and are used to hold metadata but not group membership - AugmentedActiveDirectoryConfig *AugmentedActiveDirectoryConfig `json:"augmentedActiveDirectory,omitempty"` -} - -// RFC2307Config holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP -// server using the RFC2307 schema -type RFC2307Config struct { - // AllGroupsQuery holds the template for an LDAP query that returns group entries. - AllGroupsQuery LDAPQuery `json:"groupsQuery"` - - // GroupUIDAttributes defines which attribute on an LDAP group entry will be interpreted as its unique identifier. - // (ldapGroupUID) - GroupUIDAttribute string `json:"groupUIDAttribute"` - - // groupNameAttributes defines which attributes on an LDAP group entry will be interpreted as its name to use for - // an OpenShift group - GroupNameAttributes []string `json:"groupNameAttributes"` - - // groupMembershipAttributes defines which attributes on an LDAP group entry will be interpreted as its members. - // The values contained in those attributes must be queryable by your UserUIDAttribute - GroupMembershipAttributes []string `json:"groupMembershipAttributes"` - - // AllUsersQuery holds the template for an LDAP query that returns user entries. - AllUsersQuery LDAPQuery `json:"usersQuery"` - - // userUIDAttribute defines which attribute on an LDAP user entry will be interpreted as its unique identifier. - // It must correspond to values that will be found from the GroupMembershipAttributes - UserUIDAttribute string `json:"userUIDAttribute"` - - // userNameAttributes defines which attributes on an LDAP user entry will be used, in order, as its OpenShift user name. - // The first attribute with a non-empty value is used. This should match your PreferredUsername setting for your LDAPPasswordIdentityProvider - UserNameAttributes []string `json:"userNameAttributes"` - - // tolerateMemberNotFoundErrors determines the behavior of the LDAP sync job when missing user entries are - // encountered. If 'true', an LDAP query for users that doesn't find any will be tolerated and an only - // and error will be logged. If 'false', the LDAP sync job will fail if a query for users doesn't find - // any. The default value is 'false'. Misconfigured LDAP sync jobs with this flag set to 'true' can cause - // group membership to be removed, so it is recommended to use this flag with caution. - TolerateMemberNotFoundErrors bool `json:"tolerateMemberNotFoundErrors"` - - // tolerateMemberOutOfScopeErrors determines the behavior of the LDAP sync job when out-of-scope user entries - // are encountered. If 'true', an LDAP query for a user that falls outside of the base DN given for the all - // user query will be tolerated and only an error will be logged. If 'false', the LDAP sync job will fail - // if a user query would search outside of the base DN specified by the all user query. Misconfigured LDAP - // sync jobs with this flag set to 'true' can result in groups missing users, so it is recommended to use - // this flag with caution. - TolerateMemberOutOfScopeErrors bool `json:"tolerateMemberOutOfScopeErrors"` -} - -// ActiveDirectoryConfig holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP -// server using the Active Directory schema -type ActiveDirectoryConfig struct { - // AllUsersQuery holds the template for an LDAP query that returns user entries. - AllUsersQuery LDAPQuery `json:"usersQuery"` - - // userNameAttributes defines which attributes on an LDAP user entry will be interpreted as its OpenShift user name. - UserNameAttributes []string `json:"userNameAttributes"` - - // groupMembershipAttributes defines which attributes on an LDAP user entry will be interpreted - // as the groups it is a member of - GroupMembershipAttributes []string `json:"groupMembershipAttributes"` -} - -// AugmentedActiveDirectoryConfig holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP -// server using the augmented Active Directory schema -type AugmentedActiveDirectoryConfig struct { - // AllUsersQuery holds the template for an LDAP query that returns user entries. - AllUsersQuery LDAPQuery `json:"usersQuery"` - - // userNameAttributes defines which attributes on an LDAP user entry will be interpreted as its OpenShift user name. - UserNameAttributes []string `json:"userNameAttributes"` - - // groupMembershipAttributes defines which attributes on an LDAP user entry will be interpreted - // as the groups it is a member of - GroupMembershipAttributes []string `json:"groupMembershipAttributes"` - - // AllGroupsQuery holds the template for an LDAP query that returns group entries. - AllGroupsQuery LDAPQuery `json:"groupsQuery"` - - // GroupUIDAttributes defines which attribute on an LDAP group entry will be interpreted as its unique identifier. - // (ldapGroupUID) - GroupUIDAttribute string `json:"groupUIDAttribute"` - - // groupNameAttributes defines which attributes on an LDAP group entry will be interpreted as its name to use for - // an OpenShift group - GroupNameAttributes []string `json:"groupNameAttributes"` -} - -// LDAPQuery holds the options necessary to build an LDAP query -type LDAPQuery struct { - // The DN of the branch of the directory where all searches should start from - BaseDN string `json:"baseDN"` - - // The (optional) scope of the search. Can be: - // base: only the base object, - // one: all object on the base level, - // sub: the entire subtree - // Defaults to the entire subtree if not set - Scope string `json:"scope"` - - // The (optional) behavior of the search with regards to alisases. Can be: - // never: never dereference aliases, - // search: only dereference in searching, - // base: only dereference in finding the base object, - // always: always dereference - // Defaults to always dereferencing if not set - DerefAliases string `json:"derefAliases"` - - // TimeLimit holds the limit of time in seconds that any request to the server can remain outstanding - // before the wait for a response is given up. If this is 0, no client-side limit is imposed - TimeLimit int `json:"timeout"` - - // filter is a valid LDAP search filter that retrieves all relevant entries from the LDAP server with the base DN - Filter string `json:"filter"` - - // pageSize is the maximum preferred page size, measured in LDAP entries. A page size of 0 means no paging will be done. - PageSize int `json:"pageSize"` -} - -// AdmissionPluginConfig holds the necessary configuration options for admission plugins -type AdmissionPluginConfig struct { - // location is the path to a configuration file that contains the plugin's - // configuration - Location string `json:"location"` - - // 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. - Configuration runtime.RawExtension `json:"configuration"` -} - -// AdmissionConfig holds the necessary configuration options for admission -type AdmissionConfig struct { - // pluginConfig allows specifying a configuration file per admission control plugin - PluginConfig map[string]*AdmissionPluginConfig `json:"pluginConfig"` - - // pluginOrderOverride is a list of admission control plugin names that will be installed - // on the master. Order is significant. If empty, a default list of plugins is used. - PluginOrderOverride []string `json:"pluginOrderOverride,omitempty"` -} - -// ControllerConfig holds configuration values for controllers -type ControllerConfig struct { - // controllers is a list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller "+ - // named 'foo', '-foo' disables the controller named 'foo'. - // Defaults to "*". - Controllers []string `json:"controllers"` - // election defines the configuration for electing a controller instance to make changes to - // the cluster. If unspecified, the ControllerTTL value is checked to determine whether the - // legacy direct etcd election code will be used. - Election *ControllerElectionConfig `json:"election"` - // serviceServingCert holds configuration for service serving cert signer which creates cert/key pairs for - // pods fulfilling a service to serve with. - ServiceServingCert ServiceServingCert `json:"serviceServingCert"` -} - -// ControllerElectionConfig contains configuration values for deciding how a controller -// will be elected to act as leader. -type ControllerElectionConfig struct { - // lockName is the resource name used to act as the lock for determining which controller - // instance should lead. - LockName string `json:"lockName"` - // lockNamespace is the resource namespace used to act as the lock for determining which - // controller instance should lead. It defaults to "kube-system" - LockNamespace string `json:"lockNamespace"` - // lockResource is the group and resource name to use to coordinate for the controller lock. - // If unset, defaults to "configmaps". - LockResource GroupResource `json:"lockResource"` -} - -// GroupResource points to a resource by its name and API group. -type GroupResource struct { - // group is the name of an API group - Group string `json:"group"` - // resource is the name of a resource. - Resource string `json:"resource"` -} - -// ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for -// pods fulfilling a service to serve with. -type ServiceServingCert struct { - // signer holds the signing information used to automatically sign serving certificates. - // If this value is nil, then certs are not signed automatically. - Signer *CertInfo `json:"signer"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DefaultAdmissionConfig can be used to enable or disable various admission plugins. -// When this type is present as the `configuration` object under `pluginConfig` and *if* the admission plugin supports it, -// this will cause an "off by default" admission plugin to be enabled -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type DefaultAdmissionConfig struct { - metav1.TypeMeta `json:",inline"` - - // disable turns off an admission plugin that is enabled by default. - Disable bool `json:"disable"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildDefaultsConfig controls the default information for Builds -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BuildDefaultsConfig struct { - metav1.TypeMeta `json:",inline"` - - // gitHTTPProxy is the location of the HTTPProxy for Git source - GitHTTPProxy string `json:"gitHTTPProxy,omitempty"` - - // gitHTTPSProxy is the location of the HTTPSProxy for Git source - GitHTTPSProxy string `json:"gitHTTPSProxy,omitempty"` - - // gitNoProxy is the list of domains for which the proxy should not be used - GitNoProxy string `json:"gitNoProxy,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 - Env []corev1.EnvVar `json:"env,omitempty"` - - // sourceStrategyDefaults are default values that apply to builds using the - // source strategy. - SourceStrategyDefaults *SourceStrategyDefaultsConfig `json:"sourceStrategyDefaults,omitempty"` - - // imageLabels is a list of 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. - ImageLabels []buildv1.ImageLabel `json:"imageLabels,omitempty"` - - // nodeSelector is a selector which must be true for the build pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // annotations are annotations that will be added to the build pod - Annotations map[string]string `json:"annotations,omitempty"` - - // resources defines resource requirements to execute the build. - Resources corev1.ResourceRequirements `json:"resources,omitempty"` -} - -// SourceStrategyDefaultsConfig contains values that apply to builds using the -// source strategy. -type SourceStrategyDefaultsConfig struct { - // incremental indicates if s2i build strategies should perform an incremental - // build or not - Incremental *bool `json:"incremental,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildOverridesConfig controls override settings for builds -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BuildOverridesConfig struct { - metav1.TypeMeta `json:",inline"` - - // forcePull indicates whether the build strategy should always be set to ForcePull=true - ForcePull bool `json:"forcePull"` - - // imageLabels is a list of 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. - ImageLabels []buildv1.ImageLabel `json:"imageLabels,omitempty"` - - // nodeSelector is a selector which must be true for the build pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // annotations are annotations that will be added to the build pod - Annotations map[string]string `json:"annotations,omitempty"` - - // tolerations is a list of Tolerations that will override any existing - // tolerations set on a build pod. - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.deepcopy.go deleted file mode 100644 index 842210c24..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,2143 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - buildv1 "github.com/openshift/api/build/v1" - corev1 "k8s.io/api/core/v1" - 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 *ActiveDirectoryConfig) DeepCopyInto(out *ActiveDirectoryConfig) { - *out = *in - out.AllUsersQuery = in.AllUsersQuery - if in.UserNameAttributes != nil { - in, out := &in.UserNameAttributes, &out.UserNameAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupMembershipAttributes != nil { - in, out := &in.GroupMembershipAttributes, &out.GroupMembershipAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ActiveDirectoryConfig. -func (in *ActiveDirectoryConfig) DeepCopy() *ActiveDirectoryConfig { - if in == nil { - return nil - } - out := new(ActiveDirectoryConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionConfig) DeepCopyInto(out *AdmissionConfig) { - *out = *in - if in.PluginConfig != nil { - in, out := &in.PluginConfig, &out.PluginConfig - *out = make(map[string]*AdmissionPluginConfig, len(*in)) - for key, val := range *in { - var outVal *AdmissionPluginConfig - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = new(AdmissionPluginConfig) - (*in).DeepCopyInto(*out) - } - (*out)[key] = outVal - } - } - if in.PluginOrderOverride != nil { - in, out := &in.PluginOrderOverride, &out.PluginOrderOverride - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionConfig. -func (in *AdmissionConfig) DeepCopy() *AdmissionConfig { - if in == nil { - return nil - } - out := new(AdmissionConfig) - 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 - in.Configuration.DeepCopyInto(&out.Configuration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionPluginConfig. -func (in *AdmissionPluginConfig) DeepCopy() *AdmissionPluginConfig { - if in == nil { - return nil - } - out := new(AdmissionPluginConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AggregatorConfig) DeepCopyInto(out *AggregatorConfig) { - *out = *in - out.ProxyClientInfo = in.ProxyClientInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AggregatorConfig. -func (in *AggregatorConfig) DeepCopy() *AggregatorConfig { - if in == nil { - return nil - } - out := new(AggregatorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AllowAllPasswordIdentityProvider) DeepCopyInto(out *AllowAllPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowAllPasswordIdentityProvider. -func (in *AllowAllPasswordIdentityProvider) DeepCopy() *AllowAllPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(AllowAllPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AllowAllPasswordIdentityProvider) 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 AllowedRegistries) DeepCopyInto(out *AllowedRegistries) { - { - in := &in - *out = make(AllowedRegistries, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedRegistries. -func (in AllowedRegistries) DeepCopy() AllowedRegistries { - if in == nil { - return nil - } - out := new(AllowedRegistries) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuditConfig) DeepCopyInto(out *AuditConfig) { - *out = *in - in.PolicyConfiguration.DeepCopyInto(&out.PolicyConfiguration) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuditConfig. -func (in *AuditConfig) DeepCopy() *AuditConfig { - if in == nil { - return nil - } - out := new(AuditConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AugmentedActiveDirectoryConfig) DeepCopyInto(out *AugmentedActiveDirectoryConfig) { - *out = *in - out.AllUsersQuery = in.AllUsersQuery - if in.UserNameAttributes != nil { - in, out := &in.UserNameAttributes, &out.UserNameAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupMembershipAttributes != nil { - in, out := &in.GroupMembershipAttributes, &out.GroupMembershipAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.AllGroupsQuery = in.AllGroupsQuery - if in.GroupNameAttributes != nil { - in, out := &in.GroupNameAttributes, &out.GroupNameAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AugmentedActiveDirectoryConfig. -func (in *AugmentedActiveDirectoryConfig) DeepCopy() *AugmentedActiveDirectoryConfig { - if in == nil { - return nil - } - out := new(AugmentedActiveDirectoryConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BasicAuthPasswordIdentityProvider) DeepCopyInto(out *BasicAuthPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.RemoteConnectionInfo = in.RemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthPasswordIdentityProvider. -func (in *BasicAuthPasswordIdentityProvider) DeepCopy() *BasicAuthPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(BasicAuthPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BasicAuthPasswordIdentityProvider) 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 *BuildDefaultsConfig) DeepCopyInto(out *BuildDefaultsConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SourceStrategyDefaults != nil { - in, out := &in.SourceStrategyDefaults, &out.SourceStrategyDefaults - *out = new(SourceStrategyDefaultsConfig) - (*in).DeepCopyInto(*out) - } - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]buildv1.ImageLabel, len(*in)) - copy(*out, *in) - } - 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.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.Resources.DeepCopyInto(&out.Resources) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildDefaultsConfig. -func (in *BuildDefaultsConfig) DeepCopy() *BuildDefaultsConfig { - if in == nil { - return nil - } - out := new(BuildDefaultsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildDefaultsConfig) 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 *BuildOverridesConfig) DeepCopyInto(out *BuildOverridesConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]buildv1.ImageLabel, len(*in)) - copy(*out, *in) - } - 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.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *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([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildOverridesConfig. -func (in *BuildOverridesConfig) DeepCopy() *BuildOverridesConfig { - if in == nil { - return nil - } - out := new(BuildOverridesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildOverridesConfig) 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 *CertInfo) DeepCopyInto(out *CertInfo) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CertInfo. -func (in *CertInfo) DeepCopy() *CertInfo { - if in == nil { - return nil - } - out := new(CertInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientConnectionOverrides) DeepCopyInto(out *ClientConnectionOverrides) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientConnectionOverrides. -func (in *ClientConnectionOverrides) DeepCopy() *ClientConnectionOverrides { - if in == nil { - return nil - } - out := new(ClientConnectionOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. -func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { - if in == nil { - return nil - } - out := new(ClusterNetworkEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerConfig) DeepCopyInto(out *ControllerConfig) { - *out = *in - if in.Controllers != nil { - in, out := &in.Controllers, &out.Controllers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Election != nil { - in, out := &in.Election, &out.Election - *out = new(ControllerElectionConfig) - **out = **in - } - in.ServiceServingCert.DeepCopyInto(&out.ServiceServingCert) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerConfig. -func (in *ControllerConfig) DeepCopy() *ControllerConfig { - if in == nil { - return nil - } - out := new(ControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControllerElectionConfig) DeepCopyInto(out *ControllerElectionConfig) { - *out = *in - out.LockResource = in.LockResource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControllerElectionConfig. -func (in *ControllerElectionConfig) DeepCopy() *ControllerElectionConfig { - if in == nil { - return nil - } - out := new(ControllerElectionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSConfig) DeepCopyInto(out *DNSConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSConfig. -func (in *DNSConfig) DeepCopy() *DNSConfig { - if in == nil { - return nil - } - out := new(DNSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DefaultAdmissionConfig) DeepCopyInto(out *DefaultAdmissionConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultAdmissionConfig. -func (in *DefaultAdmissionConfig) DeepCopy() *DefaultAdmissionConfig { - if in == nil { - return nil - } - out := new(DefaultAdmissionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DefaultAdmissionConfig) 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 *DenyAllPasswordIdentityProvider) DeepCopyInto(out *DenyAllPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DenyAllPasswordIdentityProvider. -func (in *DenyAllPasswordIdentityProvider) DeepCopy() *DenyAllPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(DenyAllPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DenyAllPasswordIdentityProvider) 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 *DockerConfig) DeepCopyInto(out *DockerConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerConfig. -func (in *DockerConfig) DeepCopy() *DockerConfig { - if in == nil { - return nil - } - out := new(DockerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdConfig) DeepCopyInto(out *EtcdConfig) { - *out = *in - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - in.PeerServingInfo.DeepCopyInto(&out.PeerServingInfo) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdConfig. -func (in *EtcdConfig) DeepCopy() *EtcdConfig { - if in == nil { - return nil - } - out := new(EtcdConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdConnectionInfo) DeepCopyInto(out *EtcdConnectionInfo) { - *out = *in - if in.URLs != nil { - in, out := &in.URLs, &out.URLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdConnectionInfo. -func (in *EtcdConnectionInfo) DeepCopy() *EtcdConnectionInfo { - if in == nil { - return nil - } - out := new(EtcdConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdStorageConfig) DeepCopyInto(out *EtcdStorageConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdStorageConfig. -func (in *EtcdStorageConfig) DeepCopy() *EtcdStorageConfig { - if in == nil { - return nil - } - out := new(EtcdStorageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ExtendedArguments) DeepCopyInto(out *ExtendedArguments) { - { - in := &in - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtendedArguments. -func (in ExtendedArguments) DeepCopy() ExtendedArguments { - if in == nil { - return nil - } - out := new(ExtendedArguments) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in FeatureList) DeepCopyInto(out *FeatureList) { - { - in := &in - *out = make(FeatureList, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeatureList. -func (in FeatureList) DeepCopy() FeatureList { - if in == nil { - return nil - } - out := new(FeatureList) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitHubIdentityProvider) DeepCopyInto(out *GitHubIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.Organizations != nil { - in, out := &in.Organizations, &out.Organizations - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Teams != nil { - in, out := &in.Teams, &out.Teams - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubIdentityProvider. -func (in *GitHubIdentityProvider) DeepCopy() *GitHubIdentityProvider { - if in == nil { - return nil - } - out := new(GitHubIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitHubIdentityProvider) 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 *GitLabIdentityProvider) DeepCopyInto(out *GitLabIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.Legacy != nil { - in, out := &in.Legacy, &out.Legacy - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabIdentityProvider. -func (in *GitLabIdentityProvider) DeepCopy() *GitLabIdentityProvider { - if in == nil { - return nil - } - out := new(GitLabIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitLabIdentityProvider) 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 *GoogleIdentityProvider) DeepCopyInto(out *GoogleIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleIdentityProvider. -func (in *GoogleIdentityProvider) DeepCopy() *GoogleIdentityProvider { - if in == nil { - return nil - } - out := new(GoogleIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleIdentityProvider) 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 *GrantConfig) DeepCopyInto(out *GrantConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrantConfig. -func (in *GrantConfig) DeepCopy() *GrantConfig { - if in == nil { - return nil - } - out := new(GrantConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupResource) DeepCopyInto(out *GroupResource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResource. -func (in *GroupResource) DeepCopy() *GroupResource { - if in == nil { - return nil - } - out := new(GroupResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTPasswdPasswordIdentityProvider) DeepCopyInto(out *HTPasswdPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTPasswdPasswordIdentityProvider. -func (in *HTPasswdPasswordIdentityProvider) DeepCopy() *HTPasswdPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(HTPasswdPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HTPasswdPasswordIdentityProvider) 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 *HTTPServingInfo) DeepCopyInto(out *HTTPServingInfo) { - *out = *in - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPServingInfo. -func (in *HTTPServingInfo) DeepCopy() *HTTPServingInfo { - if in == nil { - return nil - } - out := new(HTTPServingInfo) - in.DeepCopyInto(out) - return out -} - -// 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 - in.Provider.DeepCopyInto(&out.Provider) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProvider. -func (in *IdentityProvider) DeepCopy() *IdentityProvider { - if in == nil { - return nil - } - out := new(IdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageConfig) DeepCopyInto(out *ImageConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageConfig. -func (in *ImageConfig) DeepCopy() *ImageConfig { - if in == nil { - return nil - } - out := new(ImageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImagePolicyConfig) DeepCopyInto(out *ImagePolicyConfig) { - *out = *in - if in.AllowedRegistriesForImport != nil { - in, out := &in.AllowedRegistriesForImport, &out.AllowedRegistriesForImport - *out = new(AllowedRegistries) - if **in != nil { - in, out := *in, *out - *out = make([]RegistryLocation, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePolicyConfig. -func (in *ImagePolicyConfig) DeepCopy() *ImagePolicyConfig { - if in == nil { - return nil - } - out := new(ImagePolicyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JenkinsPipelineConfig) DeepCopyInto(out *JenkinsPipelineConfig) { - *out = *in - if in.AutoProvisionEnabled != nil { - in, out := &in.AutoProvisionEnabled, &out.AutoProvisionEnabled - *out = new(bool) - **out = **in - } - if in.Parameters != nil { - in, out := &in.Parameters, &out.Parameters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsPipelineConfig. -func (in *JenkinsPipelineConfig) DeepCopy() *JenkinsPipelineConfig { - if in == nil { - return nil - } - out := new(JenkinsPipelineConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeystonePasswordIdentityProvider) DeepCopyInto(out *KeystonePasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.RemoteConnectionInfo = in.RemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystonePasswordIdentityProvider. -func (in *KeystonePasswordIdentityProvider) DeepCopy() *KeystonePasswordIdentityProvider { - if in == nil { - return nil - } - out := new(KeystonePasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KeystonePasswordIdentityProvider) 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 *KubeletConnectionInfo) DeepCopyInto(out *KubeletConnectionInfo) { - *out = *in - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletConnectionInfo. -func (in *KubeletConnectionInfo) DeepCopy() *KubeletConnectionInfo { - if in == nil { - return nil - } - out := new(KubeletConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesMasterConfig) DeepCopyInto(out *KubernetesMasterConfig) { - *out = *in - if in.APILevels != nil { - in, out := &in.APILevels, &out.APILevels - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DisabledAPIGroupVersions != nil { - in, out := &in.DisabledAPIGroupVersions, &out.DisabledAPIGroupVersions - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - out.ProxyClientInfo = in.ProxyClientInfo - if in.APIServerArguments != nil { - in, out := &in.APIServerArguments, &out.APIServerArguments - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.ControllerArguments != nil { - in, out := &in.ControllerArguments, &out.ControllerArguments - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.SchedulerArguments != nil { - in, out := &in.SchedulerArguments, &out.SchedulerArguments - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesMasterConfig. -func (in *KubernetesMasterConfig) DeepCopy() *KubernetesMasterConfig { - if in == nil { - return nil - } - out := new(KubernetesMasterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPAttributeMapping) DeepCopyInto(out *LDAPAttributeMapping) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPAttributeMapping. -func (in *LDAPAttributeMapping) DeepCopy() *LDAPAttributeMapping { - if in == nil { - return nil - } - out := new(LDAPAttributeMapping) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPPasswordIdentityProvider) DeepCopyInto(out *LDAPPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.BindPassword = in.BindPassword - in.Attributes.DeepCopyInto(&out.Attributes) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPPasswordIdentityProvider. -func (in *LDAPPasswordIdentityProvider) DeepCopy() *LDAPPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(LDAPPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LDAPPasswordIdentityProvider) 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 *LDAPQuery) DeepCopyInto(out *LDAPQuery) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPQuery. -func (in *LDAPQuery) DeepCopy() *LDAPQuery { - if in == nil { - return nil - } - out := new(LDAPQuery) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPSyncConfig) DeepCopyInto(out *LDAPSyncConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - out.BindPassword = in.BindPassword - if in.LDAPGroupUIDToOpenShiftGroupNameMapping != nil { - in, out := &in.LDAPGroupUIDToOpenShiftGroupNameMapping, &out.LDAPGroupUIDToOpenShiftGroupNameMapping - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.RFC2307Config != nil { - in, out := &in.RFC2307Config, &out.RFC2307Config - *out = new(RFC2307Config) - (*in).DeepCopyInto(*out) - } - if in.ActiveDirectoryConfig != nil { - in, out := &in.ActiveDirectoryConfig, &out.ActiveDirectoryConfig - *out = new(ActiveDirectoryConfig) - (*in).DeepCopyInto(*out) - } - if in.AugmentedActiveDirectoryConfig != nil { - in, out := &in.AugmentedActiveDirectoryConfig, &out.AugmentedActiveDirectoryConfig - *out = new(AugmentedActiveDirectoryConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPSyncConfig. -func (in *LDAPSyncConfig) DeepCopy() *LDAPSyncConfig { - if in == nil { - return nil - } - out := new(LDAPSyncConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LDAPSyncConfig) 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 *LocalQuota) DeepCopyInto(out *LocalQuota) { - *out = *in - if in.PerFSGroup != nil { - in, out := &in.PerFSGroup, &out.PerFSGroup - x := (*in).DeepCopy() - *out = &x - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalQuota. -func (in *LocalQuota) DeepCopy() *LocalQuota { - if in == nil { - return nil - } - out := new(LocalQuota) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MasterAuthConfig) DeepCopyInto(out *MasterAuthConfig) { - *out = *in - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader - *out = new(RequestHeaderAuthenticationOptions) - (*in).DeepCopyInto(*out) - } - if in.WebhookTokenAuthenticators != nil { - in, out := &in.WebhookTokenAuthenticators, &out.WebhookTokenAuthenticators - *out = make([]WebhookTokenAuthenticator, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterAuthConfig. -func (in *MasterAuthConfig) DeepCopy() *MasterAuthConfig { - if in == nil { - return nil - } - out := new(MasterAuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MasterClients) DeepCopyInto(out *MasterClients) { - *out = *in - if in.OpenShiftLoopbackClientConnectionOverrides != nil { - in, out := &in.OpenShiftLoopbackClientConnectionOverrides, &out.OpenShiftLoopbackClientConnectionOverrides - *out = new(ClientConnectionOverrides) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterClients. -func (in *MasterClients) DeepCopy() *MasterClients { - if in == nil { - return nil - } - out := new(MasterClients) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MasterConfig) DeepCopyInto(out *MasterConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - in.AuthConfig.DeepCopyInto(&out.AuthConfig) - out.AggregatorConfig = in.AggregatorConfig - if in.CORSAllowedOrigins != nil { - in, out := &in.CORSAllowedOrigins, &out.CORSAllowedOrigins - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.APILevels != nil { - in, out := &in.APILevels, &out.APILevels - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.AdmissionConfig.DeepCopyInto(&out.AdmissionConfig) - in.ControllerConfig.DeepCopyInto(&out.ControllerConfig) - out.EtcdStorageConfig = in.EtcdStorageConfig - in.EtcdClientInfo.DeepCopyInto(&out.EtcdClientInfo) - out.KubeletClientInfo = in.KubeletClientInfo - in.KubernetesMasterConfig.DeepCopyInto(&out.KubernetesMasterConfig) - if in.EtcdConfig != nil { - in, out := &in.EtcdConfig, &out.EtcdConfig - *out = new(EtcdConfig) - (*in).DeepCopyInto(*out) - } - if in.OAuthConfig != nil { - in, out := &in.OAuthConfig, &out.OAuthConfig - *out = new(OAuthConfig) - (*in).DeepCopyInto(*out) - } - if in.DNSConfig != nil { - in, out := &in.DNSConfig, &out.DNSConfig - *out = new(DNSConfig) - **out = **in - } - in.ServiceAccountConfig.DeepCopyInto(&out.ServiceAccountConfig) - in.MasterClients.DeepCopyInto(&out.MasterClients) - out.ImageConfig = in.ImageConfig - in.ImagePolicyConfig.DeepCopyInto(&out.ImagePolicyConfig) - in.PolicyConfig.DeepCopyInto(&out.PolicyConfig) - in.ProjectConfig.DeepCopyInto(&out.ProjectConfig) - out.RoutingConfig = in.RoutingConfig - in.NetworkConfig.DeepCopyInto(&out.NetworkConfig) - in.VolumeConfig.DeepCopyInto(&out.VolumeConfig) - in.JenkinsPipelineConfig.DeepCopyInto(&out.JenkinsPipelineConfig) - in.AuditConfig.DeepCopyInto(&out.AuditConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterConfig. -func (in *MasterConfig) DeepCopy() *MasterConfig { - if in == nil { - return nil - } - out := new(MasterConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MasterConfig) 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 *MasterNetworkConfig) DeepCopyInto(out *MasterNetworkConfig) { - *out = *in - if in.ClusterNetworks != nil { - in, out := &in.ClusterNetworks, &out.ClusterNetworks - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.ExternalIPNetworkCIDRs != nil { - in, out := &in.ExternalIPNetworkCIDRs, &out.ExternalIPNetworkCIDRs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterNetworkConfig. -func (in *MasterNetworkConfig) DeepCopy() *MasterNetworkConfig { - if in == nil { - return nil - } - out := new(MasterNetworkConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MasterVolumeConfig) DeepCopyInto(out *MasterVolumeConfig) { - *out = *in - if in.DynamicProvisioningEnabled != nil { - in, out := &in.DynamicProvisioningEnabled, &out.DynamicProvisioningEnabled - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MasterVolumeConfig. -func (in *MasterVolumeConfig) DeepCopy() *MasterVolumeConfig { - if in == nil { - return nil - } - out := new(MasterVolumeConfig) - 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 - if in.Names != nil { - in, out := &in.Names, &out.Names - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedCertificate. -func (in *NamedCertificate) DeepCopy() *NamedCertificate { - if in == nil { - return nil - } - out := new(NamedCertificate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeAuthConfig) DeepCopyInto(out *NodeAuthConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeAuthConfig. -func (in *NodeAuthConfig) DeepCopy() *NodeAuthConfig { - if in == nil { - return nil - } - out := new(NodeAuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeConfig) DeepCopyInto(out *NodeConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - if in.MasterClientConnectionOverrides != nil { - in, out := &in.MasterClientConnectionOverrides, &out.MasterClientConnectionOverrides - *out = new(ClientConnectionOverrides) - **out = **in - } - if in.DNSNameservers != nil { - in, out := &in.DNSNameservers, &out.DNSNameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.NetworkConfig = in.NetworkConfig - out.ImageConfig = in.ImageConfig - if in.PodManifestConfig != nil { - in, out := &in.PodManifestConfig, &out.PodManifestConfig - *out = new(PodManifestConfig) - **out = **in - } - out.AuthConfig = in.AuthConfig - out.DockerConfig = in.DockerConfig - if in.KubeletArguments != nil { - in, out := &in.KubeletArguments, &out.KubeletArguments - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.ProxyArguments != nil { - in, out := &in.ProxyArguments, &out.ProxyArguments - *out = make(ExtendedArguments, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - if in.EnableUnidling != nil { - in, out := &in.EnableUnidling, &out.EnableUnidling - *out = new(bool) - **out = **in - } - in.VolumeConfig.DeepCopyInto(&out.VolumeConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeConfig. -func (in *NodeConfig) DeepCopy() *NodeConfig { - if in == nil { - return nil - } - out := new(NodeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeConfig) 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 *NodeNetworkConfig) DeepCopyInto(out *NodeNetworkConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeNetworkConfig. -func (in *NodeNetworkConfig) DeepCopy() *NodeNetworkConfig { - if in == nil { - return nil - } - out := new(NodeNetworkConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeVolumeConfig) DeepCopyInto(out *NodeVolumeConfig) { - *out = *in - in.LocalQuota.DeepCopyInto(&out.LocalQuota) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeVolumeConfig. -func (in *NodeVolumeConfig) DeepCopy() *NodeVolumeConfig { - if in == nil { - return nil - } - out := new(NodeVolumeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthConfig) DeepCopyInto(out *OAuthConfig) { - *out = *in - if in.MasterCA != nil { - in, out := &in.MasterCA, &out.MasterCA - *out = new(string) - **out = **in - } - if in.IdentityProviders != nil { - in, out := &in.IdentityProviders, &out.IdentityProviders - *out = make([]IdentityProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.GrantConfig = in.GrantConfig - if in.SessionConfig != nil { - in, out := &in.SessionConfig, &out.SessionConfig - *out = new(SessionConfig) - **out = **in - } - in.TokenConfig.DeepCopyInto(&out.TokenConfig) - if in.Templates != nil { - in, out := &in.Templates, &out.Templates - *out = new(OAuthTemplates) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthConfig. -func (in *OAuthConfig) DeepCopy() *OAuthConfig { - if in == nil { - return nil - } - out := new(OAuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthTemplates) DeepCopyInto(out *OAuthTemplates) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthTemplates. -func (in *OAuthTemplates) DeepCopy() *OAuthTemplates { - if in == nil { - return nil - } - out := new(OAuthTemplates) - 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 - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDClaims. -func (in *OpenIDClaims) DeepCopy() *OpenIDClaims { - if in == nil { - return nil - } - out := new(OpenIDClaims) - in.DeepCopyInto(out) - return out -} - -// 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.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.ExtraScopes != nil { - in, out := &in.ExtraScopes, &out.ExtraScopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraAuthorizeParameters != nil { - in, out := &in.ExtraAuthorizeParameters, &out.ExtraAuthorizeParameters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.URLs = in.URLs - in.Claims.DeepCopyInto(&out.Claims) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDIdentityProvider. -func (in *OpenIDIdentityProvider) DeepCopy() *OpenIDIdentityProvider { - if in == nil { - return nil - } - out := new(OpenIDIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenIDIdentityProvider) 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 *OpenIDURLs) DeepCopyInto(out *OpenIDURLs) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDURLs. -func (in *OpenIDURLs) DeepCopy() *OpenIDURLs { - if in == nil { - return nil - } - out := new(OpenIDURLs) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodManifestConfig) DeepCopyInto(out *PodManifestConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodManifestConfig. -func (in *PodManifestConfig) DeepCopy() *PodManifestConfig { - if in == nil { - return nil - } - out := new(PodManifestConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyConfig) DeepCopyInto(out *PolicyConfig) { - *out = *in - in.UserAgentMatchingConfig.DeepCopyInto(&out.UserAgentMatchingConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyConfig. -func (in *PolicyConfig) DeepCopy() *PolicyConfig { - if in == nil { - return nil - } - out := new(PolicyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectConfig) DeepCopyInto(out *ProjectConfig) { - *out = *in - if in.SecurityAllocator != nil { - in, out := &in.SecurityAllocator, &out.SecurityAllocator - *out = new(SecurityAllocator) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectConfig. -func (in *ProjectConfig) DeepCopy() *ProjectConfig { - if in == nil { - return nil - } - out := new(ProjectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RFC2307Config) DeepCopyInto(out *RFC2307Config) { - *out = *in - out.AllGroupsQuery = in.AllGroupsQuery - if in.GroupNameAttributes != nil { - in, out := &in.GroupNameAttributes, &out.GroupNameAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupMembershipAttributes != nil { - in, out := &in.GroupMembershipAttributes, &out.GroupMembershipAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.AllUsersQuery = in.AllUsersQuery - if in.UserNameAttributes != nil { - in, out := &in.UserNameAttributes, &out.UserNameAttributes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RFC2307Config. -func (in *RFC2307Config) DeepCopy() *RFC2307Config { - if in == nil { - return nil - } - out := new(RFC2307Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryLocation) DeepCopyInto(out *RegistryLocation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryLocation. -func (in *RegistryLocation) DeepCopy() *RegistryLocation { - if in == nil { - return nil - } - out := new(RegistryLocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RemoteConnectionInfo) DeepCopyInto(out *RemoteConnectionInfo) { - *out = *in - out.CertInfo = in.CertInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteConnectionInfo. -func (in *RemoteConnectionInfo) DeepCopy() *RemoteConnectionInfo { - if in == nil { - return nil - } - out := new(RemoteConnectionInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderAuthenticationOptions) DeepCopyInto(out *RequestHeaderAuthenticationOptions) { - *out = *in - if in.ClientCommonNames != nil { - in, out := &in.ClientCommonNames, &out.ClientCommonNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.UsernameHeaders != nil { - in, out := &in.UsernameHeaders, &out.UsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupHeaders != nil { - in, out := &in.GroupHeaders, &out.GroupHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraHeaderPrefixes != nil { - in, out := &in.ExtraHeaderPrefixes, &out.ExtraHeaderPrefixes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderAuthenticationOptions. -func (in *RequestHeaderAuthenticationOptions) DeepCopy() *RequestHeaderAuthenticationOptions { - if in == nil { - return nil - } - out := new(RequestHeaderAuthenticationOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderIdentityProvider) DeepCopyInto(out *RequestHeaderIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ClientCommonNames != nil { - in, out := &in.ClientCommonNames, &out.ClientCommonNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsernameHeaders != nil { - in, out := &in.PreferredUsernameHeaders, &out.PreferredUsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NameHeaders != nil { - in, out := &in.NameHeaders, &out.NameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailHeaders != nil { - in, out := &in.EmailHeaders, &out.EmailHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderIdentityProvider. -func (in *RequestHeaderIdentityProvider) DeepCopy() *RequestHeaderIdentityProvider { - if in == nil { - return nil - } - out := new(RequestHeaderIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RequestHeaderIdentityProvider) 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 *RoutingConfig) DeepCopyInto(out *RoutingConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingConfig. -func (in *RoutingConfig) DeepCopy() *RoutingConfig { - if in == nil { - return nil - } - out := new(RoutingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityAllocator) DeepCopyInto(out *SecurityAllocator) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityAllocator. -func (in *SecurityAllocator) DeepCopy() *SecurityAllocator { - if in == nil { - return nil - } - out := new(SecurityAllocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountConfig) DeepCopyInto(out *ServiceAccountConfig) { - *out = *in - if in.ManagedNames != nil { - in, out := &in.ManagedNames, &out.ManagedNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PublicKeyFiles != nil { - in, out := &in.PublicKeyFiles, &out.PublicKeyFiles - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountConfig. -func (in *ServiceAccountConfig) DeepCopy() *ServiceAccountConfig { - if in == nil { - return nil - } - out := new(ServiceAccountConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceServingCert) DeepCopyInto(out *ServiceServingCert) { - *out = *in - if in.Signer != nil { - in, out := &in.Signer, &out.Signer - *out = new(CertInfo) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceServingCert. -func (in *ServiceServingCert) DeepCopy() *ServiceServingCert { - if in == nil { - return nil - } - out := new(ServiceServingCert) - 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 - out.CertInfo = in.CertInfo - if in.NamedCertificates != nil { - in, out := &in.NamedCertificates, &out.NamedCertificates - *out = make([]NamedCertificate, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CipherSuites != nil { - in, out := &in.CipherSuites, &out.CipherSuites - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServingInfo. -func (in *ServingInfo) DeepCopy() *ServingInfo { - if in == nil { - return nil - } - out := new(ServingInfo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionConfig) DeepCopyInto(out *SessionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionConfig. -func (in *SessionConfig) DeepCopy() *SessionConfig { - if in == nil { - return nil - } - out := new(SessionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionSecret) DeepCopyInto(out *SessionSecret) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionSecret. -func (in *SessionSecret) DeepCopy() *SessionSecret { - if in == nil { - return nil - } - out := new(SessionSecret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionSecrets) DeepCopyInto(out *SessionSecrets) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]SessionSecret, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionSecrets. -func (in *SessionSecrets) DeepCopy() *SessionSecrets { - if in == nil { - return nil - } - out := new(SessionSecrets) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SessionSecrets) 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 *SourceStrategyDefaultsConfig) DeepCopyInto(out *SourceStrategyDefaultsConfig) { - *out = *in - if in.Incremental != nil { - in, out := &in.Incremental, &out.Incremental - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStrategyDefaultsConfig. -func (in *SourceStrategyDefaultsConfig) DeepCopy() *SourceStrategyDefaultsConfig { - if in == nil { - return nil - } - out := new(SourceStrategyDefaultsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StringSource) DeepCopyInto(out *StringSource) { - *out = *in - out.StringSourceSpec = in.StringSourceSpec - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringSource. -func (in *StringSource) DeepCopy() *StringSource { - if in == nil { - return nil - } - out := new(StringSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StringSourceSpec) DeepCopyInto(out *StringSourceSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StringSourceSpec. -func (in *StringSourceSpec) DeepCopy() *StringSourceSpec { - if in == nil { - return nil - } - out := new(StringSourceSpec) - 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 - if in.AccessTokenInactivityTimeoutSeconds != nil { - in, out := &in.AccessTokenInactivityTimeoutSeconds, &out.AccessTokenInactivityTimeoutSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenConfig. -func (in *TokenConfig) DeepCopy() *TokenConfig { - if in == nil { - return nil - } - out := new(TokenConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentDenyRule) DeepCopyInto(out *UserAgentDenyRule) { - *out = *in - in.UserAgentMatchRule.DeepCopyInto(&out.UserAgentMatchRule) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentDenyRule. -func (in *UserAgentDenyRule) DeepCopy() *UserAgentDenyRule { - if in == nil { - return nil - } - out := new(UserAgentDenyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentMatchRule) DeepCopyInto(out *UserAgentMatchRule) { - *out = *in - if in.HTTPVerbs != nil { - in, out := &in.HTTPVerbs, &out.HTTPVerbs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentMatchRule. -func (in *UserAgentMatchRule) DeepCopy() *UserAgentMatchRule { - if in == nil { - return nil - } - out := new(UserAgentMatchRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserAgentMatchingConfig) DeepCopyInto(out *UserAgentMatchingConfig) { - *out = *in - if in.RequiredClients != nil { - in, out := &in.RequiredClients, &out.RequiredClients - *out = make([]UserAgentMatchRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DeniedClients != nil { - in, out := &in.DeniedClients, &out.DeniedClients - *out = make([]UserAgentDenyRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserAgentMatchingConfig. -func (in *UserAgentMatchingConfig) DeepCopy() *UserAgentMatchingConfig { - if in == nil { - return nil - } - out := new(UserAgentMatchingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookTokenAuthenticator) DeepCopyInto(out *WebhookTokenAuthenticator) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookTokenAuthenticator. -func (in *WebhookTokenAuthenticator) DeepCopy() *WebhookTokenAuthenticator { - if in == nil { - return nil - } - out := new(WebhookTokenAuthenticator) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.model_name.go deleted file mode 100644 index 1010a860a..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.model_name.go +++ /dev/null @@ -1,406 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ActiveDirectoryConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ActiveDirectoryConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AdmissionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionPluginConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AdmissionPluginConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AggregatorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AggregatorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AllowAllPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AllowAllPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuditConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AuditConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AugmentedActiveDirectoryConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.AugmentedActiveDirectoryConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BasicAuthPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.BasicAuthPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildDefaultsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.BuildDefaultsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildOverridesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.BuildOverridesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CertInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.CertInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClientConnectionOverrides) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ClientConnectionOverrides" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetworkEntry) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ClusterNetworkEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControllerElectionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ControllerElectionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.DNSConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DefaultAdmissionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.DefaultAdmissionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DenyAllPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.DenyAllPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DockerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.DockerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.EtcdConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdConnectionInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.EtcdConnectionInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdStorageConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.EtcdStorageConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitHubIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.GitHubIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitLabIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.GitLabIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GoogleIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.GoogleIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GrantConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.GrantConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GroupResource) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.GroupResource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HTPasswdPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.HTPasswdPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HTTPServingInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.HTTPServingInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.IdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ImageConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePolicyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ImagePolicyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JenkinsPipelineConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.JenkinsPipelineConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KeystonePasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.KeystonePasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeletConnectionInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.KubeletConnectionInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubernetesMasterConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.KubernetesMasterConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPAttributeMapping) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.LDAPAttributeMapping" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.LDAPPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPQuery) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.LDAPQuery" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPSyncConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.LDAPSyncConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LocalQuota) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.LocalQuota" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterAuthConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.MasterAuthConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterClients) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.MasterClients" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.MasterConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterNetworkConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.MasterNetworkConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MasterVolumeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.MasterVolumeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NamedCertificate) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.NamedCertificate" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeAuthConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.NodeAuthConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.NodeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeNetworkConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.NodeNetworkConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeVolumeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.NodeVolumeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.OAuthConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthTemplates) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.OAuthTemplates" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDClaims) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.OpenIDClaims" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.OpenIDIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDURLs) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.OpenIDURLs" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodManifestConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.PodManifestConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PolicyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.PolicyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ProjectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RFC2307Config) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RFC2307Config" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RegistryLocation) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RegistryLocation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RemoteConnectionInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RemoteConnectionInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RequestHeaderAuthenticationOptions) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RequestHeaderAuthenticationOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RequestHeaderIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RequestHeaderIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoutingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.RoutingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityAllocator) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.SecurityAllocator" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ServiceAccountConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceServingCert) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ServiceServingCert" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServingInfo) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.ServingInfo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.SessionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionSecret) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.SessionSecret" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionSecrets) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.SessionSecrets" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceStrategyDefaultsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.SourceStrategyDefaultsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StringSource) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.StringSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StringSourceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.StringSourceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TokenConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.TokenConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentDenyRule) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.UserAgentDenyRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentMatchRule) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.UserAgentMatchRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserAgentMatchingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.UserAgentMatchingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebhookTokenAuthenticator) OpenAPIModelName() string { - return "com.github.openshift.api.legacyconfig.v1.WebhookTokenAuthenticator" -} diff --git a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index a915c0042..000000000 --- a/vendor/github.com/openshift/api/legacyconfig/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,977 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_ActiveDirectoryConfig = map[string]string{ - "": "ActiveDirectoryConfig holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP server using the Active Directory schema", - "usersQuery": "AllUsersQuery holds the template for an LDAP query that returns user entries.", - "userNameAttributes": "userNameAttributes defines which attributes on an LDAP user entry will be interpreted as its OpenShift user name.", - "groupMembershipAttributes": "groupMembershipAttributes defines which attributes on an LDAP user entry will be interpreted as the groups it is a member of", -} - -func (ActiveDirectoryConfig) SwaggerDoc() map[string]string { - return map_ActiveDirectoryConfig -} - -var map_AdmissionConfig = map[string]string{ - "": "AdmissionConfig holds the necessary configuration options for admission", - "pluginConfig": "pluginConfig allows specifying a configuration file per admission control plugin", - "pluginOrderOverride": "pluginOrderOverride is a list of admission control plugin names that will be installed on the master. Order is significant. If empty, a default list of plugins is used.", -} - -func (AdmissionConfig) SwaggerDoc() map[string]string { - return map_AdmissionConfig -} - -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_AggregatorConfig = map[string]string{ - "": "AggregatorConfig holds information required to make the aggregator function.", - "proxyClientInfo": "proxyClientInfo specifies the client cert/key to use when proxying to aggregated API servers", -} - -func (AggregatorConfig) SwaggerDoc() map[string]string { - return map_AggregatorConfig -} - -var map_AllowAllPasswordIdentityProvider = map[string]string{ - "": "AllowAllPasswordIdentityProvider provides identities for users authenticating using non-empty passwords\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (AllowAllPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_AllowAllPasswordIdentityProvider -} - -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_AugmentedActiveDirectoryConfig = map[string]string{ - "": "AugmentedActiveDirectoryConfig holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP server using the augmented Active Directory schema", - "usersQuery": "AllUsersQuery holds the template for an LDAP query that returns user entries.", - "userNameAttributes": "userNameAttributes defines which attributes on an LDAP user entry will be interpreted as its OpenShift user name.", - "groupMembershipAttributes": "groupMembershipAttributes defines which attributes on an LDAP user entry will be interpreted as the groups it is a member of", - "groupsQuery": "AllGroupsQuery holds the template for an LDAP query that returns group entries.", - "groupUIDAttribute": "GroupUIDAttributes defines which attribute on an LDAP group entry will be interpreted as its unique identifier. (ldapGroupUID)", - "groupNameAttributes": "groupNameAttributes defines which attributes on an LDAP group entry will be interpreted as its name to use for an OpenShift group", -} - -func (AugmentedActiveDirectoryConfig) SwaggerDoc() map[string]string { - return map_AugmentedActiveDirectoryConfig -} - -var map_BasicAuthPasswordIdentityProvider = map[string]string{ - "": "BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (BasicAuthPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_BasicAuthPasswordIdentityProvider -} - -var map_BuildDefaultsConfig = map[string]string{ - "": "BuildDefaultsConfig controls the default information for Builds\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "gitHTTPProxy": "gitHTTPProxy is the location of the HTTPProxy for Git source", - "gitHTTPSProxy": "gitHTTPSProxy is the location of the HTTPSProxy for Git source", - "gitNoProxy": "gitNoProxy is the list of domains for which the proxy should not be used", - "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", - "sourceStrategyDefaults": "sourceStrategyDefaults are default values that apply to builds using the source strategy.", - "imageLabels": "imageLabels is a list of 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.", - "nodeSelector": "nodeSelector is a selector which must be true for the build pod to fit on a node", - "annotations": "annotations are annotations that will be added to the build pod", - "resources": "resources defines resource requirements to execute the build.", -} - -func (BuildDefaultsConfig) SwaggerDoc() map[string]string { - return map_BuildDefaultsConfig -} - -var map_BuildOverridesConfig = map[string]string{ - "": "BuildOverridesConfig controls override settings for builds\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "forcePull": "forcePull indicates whether the build strategy should always be set to ForcePull=true", - "imageLabels": "imageLabels is a list of 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", - "annotations": "annotations are annotations that will be added to the build pod", - "tolerations": "tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", -} - -func (BuildOverridesConfig) SwaggerDoc() map[string]string { - return map_BuildOverridesConfig -} - -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{ - "": "ClientConnectionOverrides are a set of overrides to the default client connection settings.", - "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_ClusterNetworkEntry = map[string]string{ - "": "ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips.", - "cidr": "cidr defines the total range of a cluster networks address space.", - "hostSubnetLength": "hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pod.", -} - -func (ClusterNetworkEntry) SwaggerDoc() map[string]string { - return map_ClusterNetworkEntry -} - -var map_ControllerConfig = map[string]string{ - "": "ControllerConfig holds configuration values for controllers", - "controllers": "controllers is a list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller \"+ named 'foo', '-foo' disables the controller named 'foo'. Defaults to \"*\".", - "election": "election defines the configuration for electing a controller instance to make changes to the cluster. If unspecified, the ControllerTTL value is checked to determine whether the legacy direct etcd election code will be used.", - "serviceServingCert": "serviceServingCert holds configuration for service serving cert signer which creates cert/key pairs for pods fulfilling a service to serve with.", -} - -func (ControllerConfig) SwaggerDoc() map[string]string { - return map_ControllerConfig -} - -var map_ControllerElectionConfig = map[string]string{ - "": "ControllerElectionConfig contains configuration values for deciding how a controller will be elected to act as leader.", - "lockName": "lockName is the resource name used to act as the lock for determining which controller instance should lead.", - "lockNamespace": "lockNamespace is the resource namespace used to act as the lock for determining which controller instance should lead. It defaults to \"kube-system\"", - "lockResource": "lockResource is the group and resource name to use to coordinate for the controller lock. If unset, defaults to \"configmaps\".", -} - -func (ControllerElectionConfig) SwaggerDoc() map[string]string { - return map_ControllerElectionConfig -} - -var map_DNSConfig = map[string]string{ - "": "DNSConfig holds the necessary configuration options for DNS", - "bindAddress": "bindAddress is the ip:port to serve DNS on", - "bindNetwork": "bindNetwork is the type of network to bind to - defaults to \"tcp4\", accepts \"tcp\", \"tcp4\", and \"tcp6\"", - "allowRecursiveQueries": "allowRecursiveQueries allows the DNS server on the master to answer queries recursively. Note that open resolvers can be used for DNS amplification attacks and the master DNS should not be made accessible to public networks.", -} - -func (DNSConfig) SwaggerDoc() map[string]string { - return map_DNSConfig -} - -var map_DefaultAdmissionConfig = map[string]string{ - "": "DefaultAdmissionConfig can be used to enable or disable various admission plugins. When this type is present as the `configuration` object under `pluginConfig` and *if* the admission plugin supports it, this will cause an \"off by default\" admission plugin to be enabled\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "disable": "disable turns off an admission plugin that is enabled by default.", -} - -func (DefaultAdmissionConfig) SwaggerDoc() map[string]string { - return map_DefaultAdmissionConfig -} - -var map_DenyAllPasswordIdentityProvider = map[string]string{ - "": "DenyAllPasswordIdentityProvider provides no identities for users\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (DenyAllPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_DenyAllPasswordIdentityProvider -} - -var map_DockerConfig = map[string]string{ - "": "DockerConfig holds Docker related configuration options.", - "execHandlerName": "execHandlerName is the name of the handler to use for executing commands in containers.", - "dockerShimSocket": "dockerShimSocket is the location of the dockershim socket the kubelet uses. Currently unix socket is supported on Linux, and tcp is supported on windows. Examples:'unix:///var/run/dockershim.sock', 'tcp://localhost:3735'", - "dockerShimRootDirectory": "dockerShimRootDirectory is the dockershim root directory.", -} - -func (DockerConfig) SwaggerDoc() map[string]string { - return map_DockerConfig -} - -var map_EtcdConfig = map[string]string{ - "": "EtcdConfig holds the necessary configuration options for connecting with an etcd database", - "servingInfo": "servingInfo describes how to start serving the etcd master", - "address": "address is the advertised host:port for client connections to etcd", - "peerServingInfo": "peerServingInfo describes how to start serving the etcd peer", - "peerAddress": "peerAddress is the advertised host:port for peer connections to etcd", - "storageDirectory": "StorageDir is the path to the etcd storage directory", -} - -func (EtcdConfig) SwaggerDoc() map[string]string { - return map_EtcdConfig -} - -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{ - "": "EtcdStorageConfig holds the necessary configuration options for the etcd storage underlying OpenShift and Kubernetes", - "kubernetesStorageVersion": "kubernetesStorageVersion is the API version that Kube resources in etcd should be serialized to. This value should *not* be advanced until all clients in the cluster that read from etcd have code that allows them to read the new version.", - "kubernetesStoragePrefix": "kubernetesStoragePrefix is the path within etcd that the Kubernetes resources will be rooted under. This value, if changed, will mean existing objects in etcd will no longer be located. The default value is 'kubernetes.io'.", - "openShiftStorageVersion": "openShiftStorageVersion is the API version that OS resources in etcd should be serialized to. This value should *not* be advanced until all clients in the cluster that read from etcd have code that allows them to read the new version.", - "openShiftStoragePrefix": "openShiftStoragePrefix 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. The default value is 'openshift.io'.", -} - -func (EtcdStorageConfig) SwaggerDoc() map[string]string { - return map_EtcdStorageConfig -} - -var map_GitHubIdentityProvider = map[string]string{ - "": "GitHubIdentityProvider provides identities for users authenticating using GitHub credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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 that is configured at /setup/settings#hostname.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server. If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value.", -} - -func (GitHubIdentityProvider) SwaggerDoc() map[string]string { - return map_GitHubIdentityProvider -} - -var map_GitLabIdentityProvider = map[string]string{ - "": "GitLabIdentityProvider provides identities for users authenticating using GitLab credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "url": "url is the oauth server base URL", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "legacy": "legacy determines if OAuth2 or OIDC should be used If true, OAuth2 is used If false, OIDC is used If nil and the URL's host is gitlab.com, OIDC is used Otherwise, OAuth2 is used In a future release, nil will default to using OIDC Eventually this flag will be removed and only OIDC will be used", -} - -func (GitLabIdentityProvider) SwaggerDoc() map[string]string { - return map_GitLabIdentityProvider -} - -var map_GoogleIdentityProvider = map[string]string{ - "": "GoogleIdentityProvider provides identities for users authenticating using Google credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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_GrantConfig = map[string]string{ - "": "GrantConfig holds the necessary configuration options for grant handlers", - "method": "method determines the default strategy to use when an OAuth client requests a grant. This method will be used only if the specific OAuth client doesn't provide a strategy of their own. Valid grant handling methods are:\n - auto: always approves grant requests, useful for trusted clients\n - prompt: prompts the end user for approval of grant requests, useful for third-party clients\n - deny: always denies grant requests, useful for black-listed clients", - "serviceAccountMethod": "serviceAccountMethod is used for determining client authorization for service account oauth client. It must be either: deny, prompt", -} - -func (GrantConfig) SwaggerDoc() map[string]string { - return map_GrantConfig -} - -var map_GroupResource = map[string]string{ - "": "GroupResource points to a resource by its name and API group.", - "group": "group is the name of an API group", - "resource": "resource is the name of a resource.", -} - -func (GroupResource) SwaggerDoc() map[string]string { - return map_GroupResource -} - -var map_HTPasswdPasswordIdentityProvider = map[string]string{ - "": "HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "file": "file is a reference to your htpasswd file", -} - -func (HTPasswdPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_HTPasswdPasswordIdentityProvider -} - -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_IdentityProvider = map[string]string{ - "": "IdentityProvider provides identities for users authenticating using credentials", - "name": "name is used to qualify the identities returned by this provider", - "challenge": "UseAsChallenger indicates whether to issue WWW-Authenticate challenges for this provider", - "login": "UseAsLogin 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", - "provider": "provider contains the information about how to set up a specific identity provider", -} - -func (IdentityProvider) SwaggerDoc() map[string]string { - return map_IdentityProvider -} - -var map_ImageConfig = map[string]string{ - "": "ImageConfig holds the necessary configuration options for building image names for system components", - "format": "format is the format of the name to be built for the system component", - "latest": "latest determines if the latest tag will be pulled from the registry", -} - -func (ImageConfig) SwaggerDoc() map[string]string { - return map_ImageConfig -} - -var map_ImagePolicyConfig = map[string]string{ - "": "ImagePolicyConfig holds the necessary configuration options for limits and behavior for importing images", - "maxImagesBulkImportedPerRepository": "maxImagesBulkImportedPerRepository controls the number of images that are imported when a user does a bulk import of a container repository. This number defaults to 50 to prevent users from importing large numbers of images accidentally. Set -1 for no limit.", - "disableScheduledImport": "disableScheduledImport allows scheduled background import of images to be disabled.", - "scheduledImageImportMinimumIntervalSeconds": "scheduledImageImportMinimumIntervalSeconds is the minimum number of seconds that can elapse between when image streams scheduled for background import are checked against the upstream repository. The default value is 15 minutes.", - "maxScheduledImageImportsPerMinute": "maxScheduledImageImportsPerMinute is the maximum number of scheduled image streams that will be imported in the background per minute. The default value is 60. Set to -1 for unlimited.", - "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.", - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", - "externalRegistryHostname": "externalRegistryHostname sets the hostname for the default external image registry. The external hostname should be set only when the image registry is exposed externally. The value is used in 'publicDockerImageRepository' field in ImageStreams. The value must be in \"hostname[:port]\" format.", - "additionalTrustedCA": "additionalTrustedCA is a path to a pem bundle file containing additional CAs that should be trusted during imagestream import.", -} - -func (ImagePolicyConfig) SwaggerDoc() map[string]string { - return map_ImagePolicyConfig -} - -var map_JenkinsPipelineConfig = map[string]string{ - "": "JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy", - "autoProvisionEnabled": "autoProvisionEnabled determines whether a Jenkins server will be spawned from the provided template when the first build config in the project with type JenkinsPipeline is created. When not specified this option defaults to true.", - "templateNamespace": "templateNamespace contains the namespace name where the Jenkins template is stored", - "templateName": "templateName is the name of the default Jenkins template", - "serviceName": "serviceName is the name of the Jenkins service OpenShift uses to detect whether a Jenkins pipeline handler has already been installed in a project. This value *must* match a service name in the provided template.", - "parameters": "parameters specifies a set of optional parameters to the Jenkins template.", -} - -func (JenkinsPipelineConfig) SwaggerDoc() map[string]string { - return map_JenkinsPipelineConfig -} - -var map_KeystonePasswordIdentityProvider = map[string]string{ - "": "KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "domainName": "Domain Name is required for keystone v3", - "useKeystoneIdentity": "useKeystoneIdentity flag indicates that user should be authenticated by keystone ID, not by username", -} - -func (KeystonePasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_KeystonePasswordIdentityProvider -} - -var map_KubeletConnectionInfo = map[string]string{ - "": "KubeletConnectionInfo holds information necessary for connecting to a kubelet", - "port": "port is the port to connect to kubelets on", - "ca": "ca is the CA for verifying TLS connections to kubelets", -} - -func (KubeletConnectionInfo) SwaggerDoc() map[string]string { - return map_KubeletConnectionInfo -} - -var map_KubernetesMasterConfig = map[string]string{ - "": "KubernetesMasterConfig holds the necessary configuration options for the Kubernetes master", - "apiLevels": "apiLevels is a list of API levels that should be enabled on startup: v1 as examples", - "disabledAPIGroupVersions": "disabledAPIGroupVersions is a map of groups to the versions (or *) that should be disabled.", - "masterIP": "masterIP is the public IP address of kubernetes stuff. If empty, the first result from net.InterfaceAddrs will be used.", - "masterEndpointReconcileTTL": "masterEndpointReconcileTTL sets the time to live in seconds of an endpoint record recorded by each master. The endpoints are checked at an interval that is 2/3 of this value and this value defaults to 15s if unset. In very large clusters, this value may be increased to reduce the possibility that the master endpoint record expires (due to other load on the etcd server) and causes masters to drop in and out of the kubernetes service record. It is not recommended to set this value below 15s.", - "servicesSubnet": "servicesSubnet is the subnet to use for assigning service IPs", - "servicesNodePortRange": "servicesNodePortRange is the range to use for assigning service public ports on a host.", - "schedulerConfigFile": "schedulerConfigFile points to a file that describes how to set up the scheduler. If empty, you get the default scheduling rules.", - "podEvictionTimeout": "podEvictionTimeout controls grace period for deleting pods on failed nodes. It takes valid time duration string. If empty, you get the default pod eviction timeout.", - "proxyClientInfo": "proxyClientInfo specifies the client cert/key to use when proxying to pods", - "apiServerArguments": "apiServerArguments are key value pairs that will be passed directly to the Kube apiserver that match the apiservers's command line arguments. These are not migrated, but if you reference a value that does not exist the server will not start. These values may override other settings in KubernetesMasterConfig which may cause invalid configurations.", - "controllerArguments": "controllerArguments are key value pairs that will be passed directly to the Kube controller manager that match the controller manager's command line arguments. These are not migrated, but if you reference a value that does not exist the server will not start. These values may override other settings in KubernetesMasterConfig which may cause invalid configurations.", - "schedulerArguments": "schedulerArguments are key value pairs that will be passed directly to the Kube scheduler that match the scheduler's command line arguments. These are not migrated, but if you reference a value that does not exist the server will not start. These values may override other settings in KubernetesMasterConfig which may cause invalid configurations.", -} - -func (KubernetesMasterConfig) SwaggerDoc() map[string]string { - return map_KubernetesMasterConfig -} - -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. 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_LDAPPasswordIdentityProvider = map[string]string{ - "": "LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "url": "url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is\n 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 password to bind with during the search phase.", - "insecure": "Insecure, if true, indicates the connection should not use TLS. Cannot be set to true with a URL scheme of \"ldaps://\" If false, \"ldaps://\" URLs connect using TLS, and \"ldap://\" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "attributes": "attributes maps LDAP attributes to identities", -} - -func (LDAPPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_LDAPPasswordIdentityProvider -} - -var map_LDAPQuery = map[string]string{ - "": "LDAPQuery holds the options necessary to build an LDAP query", - "baseDN": "The DN of the branch of the directory where all searches should start from", - "scope": "The (optional) scope of the search. Can be: base: only the base object, one: all object on the base level, sub: the entire subtree Defaults to the entire subtree if not set", - "derefAliases": "The (optional) behavior of the search with regards to alisases. Can be: never: never dereference aliases, search: only dereference in searching, base: only dereference in finding the base object, always: always dereference Defaults to always dereferencing if not set", - "timeout": "TimeLimit holds the limit of time in seconds that any request to the server can remain outstanding before the wait for a response is given up. If this is 0, no client-side limit is imposed", - "filter": "filter is a valid LDAP search filter that retrieves all relevant entries from the LDAP server with the base DN", - "pageSize": "pageSize is the maximum preferred page size, measured in LDAP entries. A page size of 0 means no paging will be done.", -} - -func (LDAPQuery) SwaggerDoc() map[string]string { - return map_LDAPQuery -} - -var map_LDAPSyncConfig = map[string]string{ - "": "LDAPSyncConfig holds the necessary configuration options to define an LDAP group sync\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "url": "Host is the scheme, host and port of the LDAP server to connect to: scheme://host:port", - "bindDN": "bindDN is an optional DN to bind to the LDAP server with", - "bindPassword": "bindPassword is an optional password to bind with during the search phase.", - "insecure": "Insecure, if true, indicates the connection should not use TLS. Cannot be set to true with a URL scheme of \"ldaps://\" If false, \"ldaps://\" URLs connect using TLS, and \"ldap://\" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "groupUIDNameMapping": "LDAPGroupUIDToOpenShiftGroupNameMapping is an optional direct mapping of LDAP group UIDs to OpenShift Group names", - "rfc2307": "RFC2307Config holds the configuration for extracting data from an LDAP server set up in a fashion similar to RFC2307: first-class group and user entries, with group membership determined by a multi-valued attribute on the group entry listing its members", - "activeDirectory": "ActiveDirectoryConfig holds the configuration for extracting data from an LDAP server set up in a fashion similar to that used in Active Directory: first-class user entries, with group membership determined by a multi-valued attribute on members listing groups they are a member of", - "augmentedActiveDirectory": "AugmentedActiveDirectoryConfig holds the configuration for extracting data from an LDAP server set up in a fashion similar to that used in Active Directory as described above, with one addition: first-class group entries exist and are used to hold metadata but not group membership", -} - -func (LDAPSyncConfig) SwaggerDoc() map[string]string { - return map_LDAPSyncConfig -} - -var map_LocalQuota = map[string]string{ - "": "LocalQuota contains options for controlling local volume quota on the node.", - "perFSGroup": "FSGroup can be specified to enable a quota on local storage use per unique FSGroup ID. At present this is only implemented for emptyDir volumes, and if the underlying volumeDirectory is on an XFS filesystem.", -} - -func (LocalQuota) SwaggerDoc() map[string]string { - return map_LocalQuota -} - -var map_MasterAuthConfig = map[string]string{ - "": "MasterAuthConfig configures authentication options in addition to the standard oauth token and client certificate authenticators", - "requestHeader": "requestHeader holds options for setting up a front proxy against the API. It is optional.", - "webhookTokenAuthenticators": "WebhookTokenAuthnConfig, if present configures remote token reviewers", - "oauthMetadataFile": "oauthMetadataFile is a path to a file containing the discovery endpoint for OAuth 2.0 Authorization Server Metadata for an external OAuth server. See IETF Draft: // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 This option is mutually exclusive with OAuthConfig", -} - -func (MasterAuthConfig) SwaggerDoc() map[string]string { - return map_MasterAuthConfig -} - -var map_MasterClients = map[string]string{ - "": "MasterClients holds references to `.kubeconfig` files that qualify master clients for OpenShift and Kubernetes", - "openshiftLoopbackKubeConfig": "openshiftLoopbackKubeConfig is a .kubeconfig filename for system components to loopback to this master", - "openshiftLoopbackClientConnectionOverrides": "openshiftLoopbackClientConnectionOverrides specifies client overrides for system components to loop back to this master.", -} - -func (MasterClients) SwaggerDoc() map[string]string { - return map_MasterClients -} - -var map_MasterConfig = map[string]string{ - "": "MasterConfig holds the necessary configuration options for the OpenShift master\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "servingInfo": "servingInfo describes how to start serving", - "authConfig": "authConfig configures authentication options in addition to the standard oauth token and client certificate authenticators", - "aggregatorConfig": "aggregatorConfig has options for configuring the aggregator component of the API server.", - "corsAllowedOrigins": "CORSAllowedOrigins", - "apiLevels": "apiLevels is a list of API levels that should be enabled on startup: v1 as examples", - "masterPublicURL": "masterPublicURL is how clients can access the OpenShift API server", - "controllers": "controllers is a list of the controllers that should be started. If set to \"none\", no controllers will start automatically. The default value is \"*\" which will start all controllers. When using \"*\", you may exclude controllers by prepending a \"-\" in front of their name. No other values are recognized at this time.", - "admissionConfig": "admissionConfig contains admission control plugin configuration.", - "controllerConfig": "controllerConfig holds configuration values for controllers", - "etcdStorageConfig": "etcdStorageConfig contains information about how API resources are stored in Etcd. These values are only relevant when etcd is the backing store for the cluster.", - "etcdClientInfo": "etcdClientInfo contains information about how to connect to etcd", - "kubeletClientInfo": "kubeletClientInfo contains information about how to connect to kubelets", - "kubernetesMasterConfig": "KubernetesMasterConfig, if present start the kubernetes master in this process", - "etcdConfig": "EtcdConfig, if present start etcd in this process", - "oauthConfig": "OAuthConfig, if present start the /oauth endpoint in this process", - "dnsConfig": "DNSConfig, if present start the DNS server in this process", - "serviceAccountConfig": "serviceAccountConfig holds options related to service accounts", - "masterClients": "masterClients holds all the client connection information for controllers and other system components", - "imageConfig": "imageConfig holds options that describe how to build image names for system components", - "imagePolicyConfig": "imagePolicyConfig controls limits and behavior for importing images", - "policyConfig": "policyConfig holds information about where to locate critical pieces of bootstrapping policy", - "projectConfig": "projectConfig holds information about project creation and defaults", - "routingConfig": "routingConfig holds information about routing and route generation", - "networkConfig": "networkConfig to be passed to the compiled in network plugin", - "volumeConfig": "MasterVolumeConfig contains options for configuring volume plugins in the master node.", - "jenkinsPipelineConfig": "jenkinsPipelineConfig holds information about the default Jenkins template used for JenkinsPipeline build strategy.", - "auditConfig": "auditConfig holds information related to auditing capabilities.", -} - -func (MasterConfig) SwaggerDoc() map[string]string { - return map_MasterConfig -} - -var map_MasterNetworkConfig = map[string]string{ - "": "MasterNetworkConfig to be passed to the compiled in network plugin", - "networkPluginName": "networkPluginName is the name of the network plugin to use", - "clusterNetworkCIDR": "clusterNetworkCIDR is the CIDR string to specify the global overlay network's L3 space. Deprecated, but maintained for backwards compatibility, use ClusterNetworks instead.", - "clusterNetworks": "clusterNetworks is a list of ClusterNetwork objects that defines the global overlay network's L3 space by specifying a set of CIDR and netmasks that the SDN can allocate addressed from. If this is specified, then ClusterNetworkCIDR and HostSubnetLength may not be set.", - "hostSubnetLength": "hostSubnetLength is the number of bits to allocate to each host's subnet e.g. 8 would mean a /24 network on the host. Deprecated, but maintained for backwards compatibility, use ClusterNetworks instead.", - "serviceNetworkCIDR": "ServiceNetwork is the CIDR string to specify the service networks", - "externalIPNetworkCIDRs": "externalIPNetworkCIDRs controls what values are acceptable for the service external IP field. If empty, no externalIP may be set. It may contain a list of CIDRs which are checked for access. If a CIDR is prefixed with !, IPs in that CIDR will be rejected. Rejections will be applied first, then the IP checked against one of the allowed CIDRs. You should ensure this range does not overlap with your nodes, pods, or service CIDRs for security reasons.", - "ingressIPNetworkCIDR": "ingressIPNetworkCIDR controls the range to assign ingress ips from for services of type LoadBalancer on bare metal. If empty, ingress ips will not be assigned. It may contain a single CIDR that will be allocated from. For security reasons, you should ensure that this range does not overlap with the CIDRs reserved for external ips, nodes, pods, or services.", - "vxlanPort": "vxlanPort is the VXLAN port used by the cluster defaults. If it is not set, 4789 is the default value", -} - -func (MasterNetworkConfig) SwaggerDoc() map[string]string { - return map_MasterNetworkConfig -} - -var map_MasterVolumeConfig = map[string]string{ - "": "MasterVolumeConfig contains options for configuring volume plugins in the master node.", - "dynamicProvisioningEnabled": "dynamicProvisioningEnabled is a boolean that toggles dynamic provisioning off when false, defaults to true", -} - -func (MasterVolumeConfig) SwaggerDoc() map[string]string { - return map_MasterVolumeConfig -} - -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_NodeAuthConfig = map[string]string{ - "": "NodeAuthConfig holds authn/authz configuration options", - "authenticationCacheTTL": "authenticationCacheTTL indicates how long an authentication result should be cached. It takes a valid time duration string (e.g. \"5m\"). If empty, you get the default timeout. If zero (e.g. \"0m\"), caching is disabled", - "authenticationCacheSize": "authenticationCacheSize indicates how many authentication results should be cached. If 0, the default cache size is used.", - "authorizationCacheTTL": "authorizationCacheTTL indicates how long an authorization result should be cached. It takes a valid time duration string (e.g. \"5m\"). If empty, you get the default timeout. If zero (e.g. \"0m\"), caching is disabled", - "authorizationCacheSize": "authorizationCacheSize indicates how many authorization results should be cached. If 0, the default cache size is used.", -} - -func (NodeAuthConfig) SwaggerDoc() map[string]string { - return map_NodeAuthConfig -} - -var map_NodeConfig = map[string]string{ - "": "NodeConfig is the fully specified config starting an OpenShift node\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "nodeName": "nodeName is the value used to identify this particular node in the cluster. If possible, this should be your fully qualified hostname. If you're describing a set of static nodes to the master, this value must match one of the values in the list", - "nodeIP": "Node may have multiple IPs, specify the IP to use for pod traffic routing If not specified, network parse/lookup on the nodeName is performed and the first non-loopback address is used", - "servingInfo": "servingInfo describes how to start serving", - "masterKubeConfig": "masterKubeConfig is a filename for the .kubeconfig file that describes how to connect this node to the master", - "masterClientConnectionOverrides": "masterClientConnectionOverrides provides overrides to the client connection used to connect to the master.", - "dnsDomain": "dnsDomain holds the domain suffix that will be used for the DNS search path inside each container. Defaults to 'cluster.local'.", - "dnsIP": "dnsIP is the IP address that pods will use to access cluster DNS. Defaults to the service IP of the Kubernetes master. This IP must be listening on port 53 for compatibility with libc resolvers (which cannot be configured to resolve names from any other port). When running more complex local DNS configurations, this is often set to the local address of a DNS proxy like dnsmasq, which then will consult either the local DNS (see dnsBindAddress) or the master DNS.", - "dnsBindAddress": "dnsBindAddress is the ip:port to serve DNS on. If this is not set, the DNS server will not be started. Because most DNS resolvers will only listen on port 53, if you select an alternative port you will need a DNS proxy like dnsmasq to answer queries for containers. A common configuration is dnsmasq configured on a node IP listening on 53 and delegating queries for dnsDomain to this process, while sending other queries to the host environments nameservers.", - "dnsNameservers": "dnsNameservers is a list of ip:port values of recursive nameservers to forward queries to when running a local DNS server if dnsBindAddress is set. If this value is empty, the DNS server will default to the nameservers listed in /etc/resolv.conf. If you have configured dnsmasq or another DNS proxy on the system, this value should be set to the upstream nameservers dnsmasq resolves with.", - "dnsRecursiveResolvConf": "dnsRecursiveResolvConf is a path to a resolv.conf file that contains settings for an upstream server. Only the nameservers and port fields are used. The file must exist and parse correctly. It adds extra nameservers to DNSNameservers if set.", - "networkPluginName": "Deprecated and maintained for backward compatibility, use NetworkConfig.NetworkPluginName instead", - "networkConfig": "networkConfig provides network options for the node", - "volumeDirectory": "volumeDirectory is the directory that volumes will be stored under", - "imageConfig": "imageConfig holds options that describe how to build image names for system components", - "allowDisabledDocker": "allowDisabledDocker if true, the Kubelet will ignore errors from Docker. This means that a node can start on a machine that doesn't have docker started.", - "podManifestConfig": "podManifestConfig holds the configuration for enabling the Kubelet to create pods based from a manifest file(s) placed locally on the node", - "authConfig": "authConfig holds authn/authz configuration options", - "dockerConfig": "dockerConfig holds Docker related configuration options.", - "kubeletArguments": "kubeletArguments are key value pairs that will be passed directly to the Kubelet that match the Kubelet's command line arguments. These are not migrated or validated, so if you use them they may become invalid. These values override other settings in NodeConfig which may cause invalid configurations.", - "proxyArguments": "proxyArguments are key value pairs that will be passed directly to the Proxy that match the Proxy's command line arguments. These are not migrated or validated, so if you use them they may become invalid. These values override other settings in NodeConfig which may cause invalid configurations.", - "iptablesSyncPeriod": "iptablesSyncPeriod is how often iptable rules are refreshed", - "enableUnidling": "enableUnidling controls whether or not the hybrid unidling proxy will be set up", - "volumeConfig": "volumeConfig contains options for configuring volumes on the node.", -} - -func (NodeConfig) SwaggerDoc() map[string]string { - return map_NodeConfig -} - -var map_NodeNetworkConfig = map[string]string{ - "": "NodeNetworkConfig provides network options for the node", - "networkPluginName": "networkPluginName is a string specifying the networking plugin", - "mtu": "Maximum transmission unit for the network packets", -} - -func (NodeNetworkConfig) SwaggerDoc() map[string]string { - return map_NodeNetworkConfig -} - -var map_NodeVolumeConfig = map[string]string{ - "": "NodeVolumeConfig contains options for configuring volumes on the node.", - "localQuota": "localQuota contains options for controlling local volume quota on the node.", -} - -func (NodeVolumeConfig) SwaggerDoc() map[string]string { - return map_NodeVolumeConfig -} - -var map_OAuthConfig = map[string]string{ - "": "OAuthConfig holds the necessary configuration options for OAuth authentication", - "masterCA": "masterCA is the CA for verifying the TLS connection back to the MasterURL.", - "masterURL": "masterURL is used for making server-to-server calls to exchange authorization codes for access tokens", - "masterPublicURL": "masterPublicURL is used for building valid client redirect URLs for internal and external access", - "assetPublicURL": "assetPublicURL is used for building valid client redirect URLs for external access", - "alwaysShowProviderSelection": "alwaysShowProviderSelection will force the provider selection page to render even when there is only a single provider.", - "identityProviders": "identityProviders is an ordered list of ways for a user to identify themselves", - "grantConfig": "grantConfig describes how to handle grants", - "sessionConfig": "sessionConfig hold information about configuring sessions.", - "tokenConfig": "tokenConfig contains options for authorization and access tokens", - "templates": "templates allow you to customize pages like the login page.", -} - -func (OAuthConfig) SwaggerDoc() map[string]string { - return map_OAuthConfig -} - -var map_OAuthTemplates = map[string]string{ - "": "OAuthTemplates allow for customization of pages like the login page", - "login": "login is a path to a file containing a go template used to render the login page. If unspecified, the default login page is used.", - "providerSelection": "providerSelection is a path to a file containing a go template used to render the provider selection page. If unspecified, the default provider selection page is used.", - "error": "error is a path to a file containing a go template used to render error pages during the authentication or grant flow If unspecified, the default error page is used.", -} - -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", - "id": "id is the list of claims whose values should be used as the user ID. Required. OpenID standard identity claim is \"sub\"", - "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 id 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\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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_PodManifestConfig = map[string]string{ - "": "PodManifestConfig holds the necessary configuration options for using pod manifests", - "path": "path specifies the path for the pod manifest file or directory If its a directory, its expected to contain on or more manifest files This is used by the Kubelet to create pods on the node", - "fileCheckIntervalSeconds": "fileCheckIntervalSeconds is the interval in seconds for checking the manifest file(s) for new data The interval needs to be a positive value", -} - -func (PodManifestConfig) SwaggerDoc() map[string]string { - return map_PodManifestConfig -} - -var map_PolicyConfig = map[string]string{ - "": "holds the necessary configuration options for", - "userAgentMatchingConfig": "userAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS!", -} - -func (PolicyConfig) SwaggerDoc() map[string]string { - return map_PolicyConfig -} - -var map_ProjectConfig = map[string]string{ - "": "holds the necessary configuration options for", - "defaultNodeSelector": "defaultNodeSelector holds default project node label selector", - "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. It is in the format namespace/template and it is optional. If it is not specified, a default template is used.", - "securityAllocator": "securityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled.", -} - -func (ProjectConfig) SwaggerDoc() map[string]string { - return map_ProjectConfig -} - -var map_RFC2307Config = map[string]string{ - "": "RFC2307Config holds the necessary configuration options to define how an LDAP group sync interacts with an LDAP server using the RFC2307 schema", - "groupsQuery": "AllGroupsQuery holds the template for an LDAP query that returns group entries.", - "groupUIDAttribute": "GroupUIDAttributes defines which attribute on an LDAP group entry will be interpreted as its unique identifier. (ldapGroupUID)", - "groupNameAttributes": "groupNameAttributes defines which attributes on an LDAP group entry will be interpreted as its name to use for an OpenShift group", - "groupMembershipAttributes": "groupMembershipAttributes defines which attributes on an LDAP group entry will be interpreted as its members. The values contained in those attributes must be queryable by your UserUIDAttribute", - "usersQuery": "AllUsersQuery holds the template for an LDAP query that returns user entries.", - "userUIDAttribute": "userUIDAttribute defines which attribute on an LDAP user entry will be interpreted as its unique identifier. It must correspond to values that will be found from the GroupMembershipAttributes", - "userNameAttributes": "userNameAttributes defines which attributes on an LDAP user entry will be used, in order, as its OpenShift user name. The first attribute with a non-empty value is used. This should match your PreferredUsername setting for your LDAPPasswordIdentityProvider", - "tolerateMemberNotFoundErrors": "tolerateMemberNotFoundErrors determines the behavior of the LDAP sync job when missing user entries are encountered. If 'true', an LDAP query for users that doesn't find any will be tolerated and an only and error will be logged. If 'false', the LDAP sync job will fail if a query for users doesn't find any. The default value is 'false'. Misconfigured LDAP sync jobs with this flag set to 'true' can cause group membership to be removed, so it is recommended to use this flag with caution.", - "tolerateMemberOutOfScopeErrors": "tolerateMemberOutOfScopeErrors determines the behavior of the LDAP sync job when out-of-scope user entries are encountered. If 'true', an LDAP query for a user that falls outside of the base DN given for the all user query will be tolerated and only an error will be logged. If 'false', the LDAP sync job will fail if a user query would search outside of the base DN specified by the all user query. Misconfigured LDAP sync jobs with this flag set to 'true' can result in groups missing users, so it is recommended to use this flag with caution.", -} - -func (RFC2307Config) SwaggerDoc() map[string]string { - return map_RFC2307Config -} - -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_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_RequestHeaderAuthenticationOptions = map[string]string{ - "": "RequestHeaderAuthenticationOptions provides options for setting up a front proxy against the entire API instead of against the /oauth endpoint.", - "clientCA": "clientCA is a file with the trusted signer certs. It is required.", - "clientCommonNames": "clientCommonNames is a required list of common names to require a match from.", - "usernameHeaders": "usernameHeaders is the list of headers to check for user information. First hit wins.", - "groupHeaders": "GroupNameHeader is the set of headers to check for group information. All are unioned.", - "extraHeaderPrefixes": "extraHeaderPrefixes is the set of request header prefixes to inspect for user extra. X-Remote-Extra- is suggested.", -} - -func (RequestHeaderAuthenticationOptions) SwaggerDoc() map[string]string { - return map_RequestHeaderAuthenticationOptions -} - -var map_RequestHeaderIdentityProvider = map[string]string{ - "": "RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "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}", - "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}", - "clientCA": "clientCA is a file 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.", - "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_RoutingConfig = map[string]string{ - "": "RoutingConfig holds the necessary configuration options for routing to subdomains", - "subdomain": "subdomain is the suffix appended to $service.$namespace. to form the default route hostname DEPRECATED: This field is being replaced by routers setting their own defaults. This is the \"default\" route.", -} - -func (RoutingConfig) SwaggerDoc() map[string]string { - return map_RoutingConfig -} - -var map_SecurityAllocator = map[string]string{ - "": "SecurityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled.", - "uidAllocatorRange": "uidAllocatorRange defines the total set of Unix user IDs (UIDs) that will be allocated to projects automatically, and the size of the block each namespace gets. For example, 1000-1999/10 will allocate ten UIDs per namespace, and will be able to allocate up to 100 blocks before running out of space. The default is to allocate from 1 billion to 2 billion in 10k blocks (which is the expected size of the ranges container images will use once user namespaces are started).", - "mcsAllocatorRange": "mcsAllocatorRange defines the range of MCS categories that will be assigned to namespaces. The format is \"/[,]\". The default is \"s0/2\" and will allocate from c0 -> c1023, which means a total of 535k labels are available (1024 choose 2 ~ 535k). If this value is changed after startup, new projects may receive labels that are already allocated to other projects. Prefix may be any valid SELinux set of terms (including user, role, and type), although leaving them as the default will allow the server to set them automatically.\n\nExamples: * s0:/2 - Allocate labels from s0:c0,c0 to s0:c511,c511 * s0:/2,512 - Allocate labels from s0:c0,c0,c0 to s0:c511,c511,511", - "mcsLabelsPerProject": "mcsLabelsPerProject defines the number of labels that should be reserved per project. The default is 5 to match the default UID and MCS ranges (100k namespaces, 535k/5 labels).", -} - -func (SecurityAllocator) SwaggerDoc() map[string]string { - return map_SecurityAllocator -} - -var map_ServiceAccountConfig = map[string]string{ - "": "ServiceAccountConfig holds the necessary configuration options for a service account", - "managedNames": "managedNames is a list of service account names that will be auto-created in every namespace. If no names are specified, the ServiceAccountsController will not be started.", - "limitSecretReferences": "limitSecretReferences controls whether or not to allow a service account to reference any secret in a namespace without explicitly referencing them", - "privateKeyFile": "privateKeyFile is a file containing a PEM-encoded private RSA key, used to sign service account tokens. If no private key is specified, the service account TokensController will not be started.", - "publicKeyFiles": "publicKeyFiles is a list of files, each containing a PEM-encoded public RSA key. (If any file contains a private key, the public portion of the key is used) The list of public keys is used to verify presented service account tokens. Each key is tried in order until the list is exhausted or verification succeeds. If no keys are specified, no service account authentication will be available.", - "masterCA": "masterCA is the CA for verifying the TLS connection back to the master. The service account controller will automatically inject the contents of this file into pods so they can verify connections to the master.", -} - -func (ServiceAccountConfig) SwaggerDoc() map[string]string { - return map_ServiceAccountConfig -} - -var map_ServiceServingCert = map[string]string{ - "": "ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for pods fulfilling a service to serve with.", - "signer": "signer holds the signing information used to automatically sign serving certificates. If this value is nil, then certs are not signed automatically.", -} - -func (ServiceServingCert) SwaggerDoc() map[string]string { - return map_ServiceServingCert -} - -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_SessionConfig = map[string]string{ - "": "SessionConfig specifies options for cookie-based sessions. Used by AuthRequestHandlerSession", - "sessionSecretsFile": "sessionSecretsFile is a reference to a file containing a serialized SessionSecrets object If no file is specified, a random signing and encryption key are generated at each server start", - "sessionMaxAgeSeconds": "sessionMaxAgeSeconds specifies how long created sessions last. Used by AuthRequestHandlerSession", - "sessionName": "sessionName is the cookie name used to store the session", -} - -func (SessionConfig) SwaggerDoc() map[string]string { - return map_SessionConfig -} - -var map_SessionSecret = map[string]string{ - "": "SessionSecret is a secret used to authenticate/decrypt cookie-based sessions", - "authentication": "authentication is used to authenticate sessions using HMAC. Recommended to use a secret with 32 or 64 bytes.", - "encryption": "encryption is used to encrypt sessions. Must be 16, 24, or 32 characters long, to select AES-128, AES-", -} - -func (SessionSecret) SwaggerDoc() map[string]string { - return map_SessionSecret -} - -var map_SessionSecrets = map[string]string{ - "": "SessionSecrets list the secrets to use to sign/encrypt and authenticate/decrypt created sessions.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "secrets": "secrets is a list of secrets New sessions are signed and encrypted using the first secret. Existing sessions are decrypted/authenticated by each secret until one succeeds. This allows rotating secrets.", -} - -func (SessionSecrets) SwaggerDoc() map[string]string { - return map_SessionSecrets -} - -var map_SourceStrategyDefaultsConfig = map[string]string{ - "": "SourceStrategyDefaultsConfig contains values that apply to builds using the source strategy.", - "incremental": "incremental indicates if s2i build strategies should perform an incremental build or not", -} - -func (SourceStrategyDefaultsConfig) SwaggerDoc() map[string]string { - return map_SourceStrategyDefaultsConfig -} - -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_TokenConfig = map[string]string{ - "": "TokenConfig holds the necessary configuration options for authorization and access tokens", - "authorizeTokenMaxAgeSeconds": "authorizeTokenMaxAgeSeconds defines the maximum age of authorize tokens", - "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", - "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds defined the default token inactivity timeout for tokens granted by any client. Setting it to nil means the feature is completely disabled (default) The default setting can be overridden on OAuthClient basis. 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: - 0: Tokens never time out - X: Tokens time out if there is no activity for X seconds The current minimum allowed value for X is 300 (5 minutes)", -} - -func (TokenConfig) SwaggerDoc() map[string]string { - return map_TokenConfig -} - -var map_UserAgentDenyRule = map[string]string{ - "": "UserAgentDenyRule adds a rejection message that can be used to help a user figure out how to get an approved client", - "rejectionMessage": "rejectionMessage is the message shown when rejecting a client. If it is not a set, the default message is used.", -} - -func (UserAgentDenyRule) SwaggerDoc() map[string]string { - return map_UserAgentDenyRule -} - -var map_UserAgentMatchRule = map[string]string{ - "": "UserAgentMatchRule describes how to match a given request based on User-Agent and HTTPVerb", - "regex": "UserAgentRegex is a regex that is checked against the User-Agent. Known variants of oc clients 1. oc accessing kube resources: oc/v1.2.0 (linux/amd64) kubernetes/bc4550d 2. oc accessing openshift resources: oc/v1.1.3 (linux/amd64) openshift/b348c2f 3. openshift kubectl accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d 4. openshift kubectl accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f 5. oadm accessing kube resources: oadm/v1.2.0 (linux/amd64) kubernetes/bc4550d 6. oadm accessing openshift resources: oadm/v1.1.3 (linux/amd64) openshift/b348c2f 7. openshift cli accessing kube resources: openshift/v1.2.0 (linux/amd64) kubernetes/bc4550d 8. openshift cli accessing openshift resources: openshift/v1.1.3 (linux/amd64) openshift/b348c2f", - "httpVerbs": "httpVerbs specifies which HTTP verbs should be matched. An empty list means \"match all verbs\".", -} - -func (UserAgentMatchRule) SwaggerDoc() map[string]string { - return map_UserAgentMatchRule -} - -var map_UserAgentMatchingConfig = map[string]string{ - "": "UserAgentMatchingConfig controls how API calls from *voluntarily* identifying clients will be handled. THIS DOES NOT DEFEND AGAINST MALICIOUS CLIENTS!", - "requiredClients": "If this list is non-empty, then a User-Agent must match one of the UserAgentRegexes to be allowed", - "deniedClients": "If this list is non-empty, then a User-Agent must not match any of the UserAgentRegexes", - "defaultRejectionMessage": "defaultRejectionMessage is the message shown when rejecting a client. If it is not a set, a generic message is given.", -} - -func (UserAgentMatchingConfig) SwaggerDoc() map[string]string { - return map_UserAgentMatchingConfig -} - -var map_WebhookTokenAuthenticator = map[string]string{ - "": "WebhookTokenAuthenticators holds the necessary configuation options for external token authenticators", - "configFile": "configFile is a path to a Kubeconfig file with the webhook configuration", - "cacheTTL": "cacheTTL indicates how long an authentication result should be cached. It takes a valid time duration string (e.g. \"5m\"). If empty, you get a default timeout of 2 minutes. If zero (e.g. \"0m\"), caching is disabled", -} - -func (WebhookTokenAuthenticator) SwaggerDoc() map[string]string { - return map_WebhookTokenAuthenticator -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machine/.codegen.yaml b/vendor/github.com/openshift/api/machine/.codegen.yaml deleted file mode 100644 index bc2d86d4c..000000000 --- a/vendor/github.com/openshift/api/machine/.codegen.yaml +++ /dev/null @@ -1,3 +0,0 @@ -swaggerdocs: - commentPolicy: Warn - diff --git a/vendor/github.com/openshift/api/machine/OWNERS b/vendor/github.com/openshift/api/machine/OWNERS deleted file mode 100644 index 53e482c75..000000000 --- a/vendor/github.com/openshift/api/machine/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: - - JoelSpeed - - alexander-demichev - - mandre diff --git a/vendor/github.com/openshift/api/machine/install.go b/vendor/github.com/openshift/api/machine/install.go deleted file mode 100644 index 68df57704..000000000 --- a/vendor/github.com/openshift/api/machine/install.go +++ /dev/null @@ -1,32 +0,0 @@ -package machine - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - machinev1 "github.com/openshift/api/machine/v1" - machinev1alpha1 "github.com/openshift/api/machine/v1alpha1" - machinev1beta1 "github.com/openshift/api/machine/v1beta1" -) - -const ( - GroupName = "machine.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder( - machinev1beta1.Install, - machinev1.Install, - machinev1alpha1.Install, - ) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/machine/v1/Makefile b/vendor/github.com/openshift/api/machine/v1/Makefile deleted file mode 100644 index 767014ac1..000000000 --- a/vendor/github.com/openshift/api/machine/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="machine.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/machine/v1/common.go b/vendor/github.com/openshift/api/machine/v1/common.go deleted file mode 100644 index 941d22b1c..000000000 --- a/vendor/github.com/openshift/api/machine/v1/common.go +++ /dev/null @@ -1,13 +0,0 @@ -package v1 - -// InstanceTenancy indicates if instance should run on shared or single-tenant hardware. -type InstanceTenancy string - -const ( - // DefaultTenancy instance runs on shared hardware - DefaultTenancy InstanceTenancy = "default" - // DedicatedTenancy instance runs on single-tenant hardware - DedicatedTenancy InstanceTenancy = "dedicated" - // HostTenancy instance runs on a Dedicated Host, which is an isolated server with configurations that you can control. - HostTenancy InstanceTenancy = "host" -) diff --git a/vendor/github.com/openshift/api/machine/v1/doc.go b/vendor/github.com/openshift/api/machine/v1/doc.go deleted file mode 100644 index ceddf5bd7..000000000 --- a/vendor/github.com/openshift/api/machine/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.machine.v1 - -// +kubebuilder:validation:Optional -// +groupName=machine.openshift.io -package v1 diff --git a/vendor/github.com/openshift/api/machine/v1/register.go b/vendor/github.com/openshift/api/machine/v1/register.go deleted file mode 100644 index b950169bf..000000000 --- a/vendor/github.com/openshift/api/machine/v1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "machine.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &ControlPlaneMachineSet{}, - &ControlPlaneMachineSetList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go b/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go deleted file mode 100644 index 12a819672..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_alibabaprovider.go +++ /dev/null @@ -1,376 +0,0 @@ -/* -Copyright 2021 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 v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AlibabaDiskPerformanceLevel enum attribute to describe a disk's performance level -type AlibabaDiskPerformanceLevel string - -// AlibabaDiskCatagory enum attribute to deescribe a disk's category -type AlibabaDiskCategory string - -// AlibabaDiskEncryptionMode enum attribute to describe whether to enable or disable disk encryption -type AlibabaDiskEncryptionMode string - -// AlibabaDiskPreservationPolicy enum attribute to describe whether to preserve or delete a disk upon instance removal -type AlibabaDiskPreservationPolicy string - -// AlibabaResourceReferenceType enum attribute to identify the type of resource reference -type AlibabaResourceReferenceType string - -const ( - // DeleteWithInstance enum property to delete disk with instance deletion - DeleteWithInstance AlibabaDiskPreservationPolicy = "DeleteWithInstance" - // PreserveDisk enum property to determine disk preservation with instance deletion - PreserveDisk AlibabaDiskPreservationPolicy = "PreserveDisk" - - // AlibabaDiskEncryptionEnabled enum property to enable disk encryption - AlibabaDiskEncryptionEnabled AlibabaDiskEncryptionMode = "encrypted" - // AlibabaDiskEncryptionDisabled enum property to disable disk encryption - AlibabaDiskEncryptionDisabled AlibabaDiskEncryptionMode = "disabled" - - // AlibabaDiskPerformanceLevel0 enum property to set the level at PL0 - PL0 AlibabaDiskPerformanceLevel = "PL0" - // AlibabaDiskPerformanceLevel1 enum property to set the level at PL1 - PL1 AlibabaDiskPerformanceLevel = "PL1" - // AlibabaDiskPerformanceLevel2 enum property to set the level at PL2 - PL2 AlibabaDiskPerformanceLevel = "PL2" - // AlibabaDiskPerformanceLevel3 enum property to set the level at PL3 - PL3 AlibabaDiskPerformanceLevel = "PL3" - - // AlibabaDiskCategoryUltraDisk enum proprty to set the category of disk to ultra disk - AlibabaDiskCatagoryUltraDisk AlibabaDiskCategory = "cloud_efficiency" - // AlibabaDiskCategorySSD enum proprty to set the category of disk to standard SSD - AlibabaDiskCatagorySSD AlibabaDiskCategory = "cloud_ssd" - // AlibabaDiskCategoryESSD enum proprty to set the category of disk to ESSD - AlibabaDiskCatagoryESSD AlibabaDiskCategory = "cloud_essd" - // AlibabaDiskCategoryBasic enum proprty to set the category of disk to basic - AlibabaDiskCatagoryBasic AlibabaDiskCategory = "cloud" - - // AlibabaResourceReferenceTypeID enum property to identify an ID type resource reference - AlibabaResourceReferenceTypeID AlibabaResourceReferenceType = "ID" - // AlibabaResourceReferenceTypeName enum property to identify an Name type resource reference - AlibabaResourceReferenceTypeName AlibabaResourceReferenceType = "Name" - // AlibabaResourceReferenceTypeTags enum property to identify a tags type resource reference - AlibabaResourceReferenceTypeTags AlibabaResourceReferenceType = "Tags" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -type AlibabaCloudMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // More detail about alibabacloud ECS - // https://www.alibabacloud.com/help/doc-detail/25499.htm?spm=a2c63.l28256.b99.727.496d7453jF7Moz - - //The instance type of the instance. - InstanceType string `json:"instanceType"` - - // The ID of the vpc - VpcID string `json:"vpcId"` - - // The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the most recent region list. - RegionID string `json:"regionId"` - - // The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the most recent region list. - ZoneID string `json:"zoneId"` - - // The ID of the image used to create the instance. - ImageID string `json:"imageId"` - - // DataDisks holds information regarding the extra disks attached to the instance - // +optional - DataDisks []DataDiskProperties `json:"dataDisk,omitempty"` - - // securityGroups is a list of security group references to assign to the instance. - // A reference holds either the security group ID, the resource name, or the required tags to search. - // When more than one security group is returned for a tag search, all the groups are associated with the instance up to the - // maximum number of security groups to which an instance can belong. - // For more information, see the "Security group limits" section in Limits. - // https://www.alibabacloud.com/help/en/doc-detail/25412.htm - SecurityGroups []AlibabaResourceReference `json:"securityGroups,omitempty"` - - // bandwidth describes the internet bandwidth strategy for the instance - // +optional - Bandwidth BandwidthProperties `json:"bandwidth,omitempty"` - - // systemDisk holds the properties regarding the system disk for the instance - // +optional - SystemDisk SystemDiskProperties `json:"systemDisk,omitempty"` - - // vSwitch is a reference to the vswitch to use for this instance. - // A reference holds either the vSwitch ID, the resource name, or the required tags to search. - // When more than one vSwitch is returned for a tag search, only the first vSwitch returned will be used. - // This parameter is required when you create an instance of the VPC type. - // You can call the DescribeVSwitches operation to query the created vSwitches. - VSwitch AlibabaResourceReference `json:"vSwitch"` - - // ramRoleName is the name of the instance Resource Access Management (RAM) role. This allows the instance to perform API calls as this specified RAM role. - // +optional - RAMRoleName string `json:"ramRoleName,omitempty"` - - // resourceGroup references the resource group to which to assign the instance. - // A reference holds either the resource group ID, the resource name, or the required tags to search. - // When more than one resource group are returned for a search, an error will be produced and the Machine will not be created. - // Resource Groups do not support searching by tags. - ResourceGroup AlibabaResourceReference `json:"resourceGroup"` - - // tenancy specifies whether to create the instance on a dedicated host. - // Valid values: - // - // default: creates the instance on a non-dedicated host. - // host: creates the instance on a dedicated host. If you do not specify the DedicatedHostID parameter, Alibaba Cloud automatically selects a dedicated host for the instance. - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `default`. - // +optional - Tenancy InstanceTenancy `json:"tenancy,omitempty"` - - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance - // +optional - UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` - - // credentialsSecret is a reference to the secret with alibabacloud credentials. Otherwise, defaults to permissions - // provided by attached RAM role where the actuator is running. - // +optional - CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - - // Tags are the set of metadata to add to an instance. - // +optional - Tags []Tag `json:"tag,omitempty"` -} - -// ResourceTagReference is a reference to a specific AlibabaCloud resource by ID, or tags. -// Only one of ID or Tags may be specified. Specifying more than one will result in -// a validation error. -type AlibabaResourceReference struct { - // type identifies the resource reference type for this entry. - Type AlibabaResourceReferenceType `json:"type"` - - // id of resource - // +optional - ID *string `json:"id,omitempty"` - - // name of the resource - // +optional - Name *string `json:"name,omitempty"` - - // tags is a set of metadata based upon ECS object tags used to identify a resource. - // For details about usage when multiple resources are found, please see the owning parent field documentation. - // +optional - Tags *[]Tag `json:"tags,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AlibabaCloudMachineProviderConfigList contains a list of AlibabaCloudMachineProviderConfig -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AlibabaCloudMachineProviderConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []AlibabaCloudMachineProviderConfig `json:"items"` -} - -// AlibabaCloudMachineProviderStatus is the Schema for the alibabacloudmachineproviderconfig API -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AlibabaCloudMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // instanceId is the instance ID of the machine created in alibabacloud - // +optional - InstanceID *string `json:"instanceId,omitempty"` - - // instanceState is the state of the alibabacloud instance for this machine - // +optional - InstanceState *string `json:"instanceState,omitempty"` - - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// SystemDiskProperties contains the information regarding the system disk including performance, size, name, and category -type SystemDiskProperties struct { - // category is the category of the system disk. - // Valid values: - // cloud_essd: ESSD. When the parameter is set to this value, you can use the SystemDisk.PerformanceLevel parameter to specify the performance level of the disk. - // cloud_efficiency: ultra disk. - // cloud_ssd: standard SSD. - // cloud: basic disk. - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. - // Currently for other instances, the default is `cloud_efficiency`. - // +kubebuilder:validation:Enum="cloud_efficiency"; "cloud_ssd"; "cloud_essd"; "cloud" - // +optional - Category string `json:"category,omitempty"` - - // performanceLevel is the performance level of the ESSD used as the system disk. - // Valid values: - // - // PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. - // PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. - // PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. - // PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is `PL1`. - // For more information about ESSD performance levels, see ESSDs. - // +kubebuilder:validation:Enum="PL0"; "PL1"; "PL2"; "PL3" - // +optional - PerformanceLevel string `json:"performanceLevel,omitempty"` - - // name is the name of the system disk. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). - // Empty value means the platform chooses a default, which is subject to change over time. - // Currently the default is `""`. - // +kubebuilder:validation:MaxLength=128 - // +optional - Name string `json:"name,omitempty"` - - // size is the size of the system disk. Unit: GiB. Valid values: 20 to 500. - // The value must be at least 20 and greater than or equal to the size of the image. - // Empty value means the platform chooses a default, which is subject to change over time. - // Currently the default is `40` or the size of the image depending on whichever is greater. - // +optional - Size int64 `json:"size,omitempty"` -} - -// DataDisk contains the information regarding the datadisk attached to an instance -type DataDiskProperties struct { - // Name is the name of data disk N. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). - // - // Empty value means the platform chooses a default, which is subject to change over time. - // Currently the default is `""`. - // +optional - Name string `name:"diskName,omitempty"` - - // SnapshotID is the ID of the snapshot used to create data disk N. Valid values of N: 1 to 16. - // - // When the DataDisk.N.SnapshotID parameter is specified, the DataDisk.N.Size parameter is ignored. The data disk is created based on the size of the specified snapshot. - // Use snapshots created after July 15, 2013. Otherwise, an error is returned and your request is rejected. - // - // +optional - SnapshotID string `name:"snapshotId,omitempty"` - - // Size of the data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values: - // - // Valid values when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768 - // Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768 - // Valid values when DataDisk.N.Category is set to cloud_essd: 20 to 32768 - // Valid values when DataDisk.N.Category is set to cloud: 5 to 2000 - // The value of this parameter must be greater than or equal to the size of the snapshot specified by the SnapshotID parameter. - // +optional - Size int64 `name:"size,omitempty"` - - // DiskEncryption specifies whether to encrypt data disk N. - // - // Empty value means the platform chooses a default, which is subject to change over time. - // Currently the default is `disabled`. - // +kubebuilder:validation:Enum="encrypted";"disabled" - // +optional - DiskEncryption AlibabaDiskEncryptionMode `name:"diskEncryption,omitempty"` - - // PerformanceLevel is the performance level of the ESSD used as as data disk N. The N value must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is `PL1`. - // Valid values: - // - // PL0: A single ESSD can deliver up to 10,000 random read/write IOPS. - // PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. - // PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. - // PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. - // For more information about ESSD performance levels, see ESSDs. - // +kubebuilder:validation:Enum="PL0"; "PL1"; "PL2"; "PL3" - // +optional - PerformanceLevel AlibabaDiskPerformanceLevel `name:"performanceLevel,omitempty"` - - // Category describes the type of data disk N. - // Valid values: - // cloud_efficiency: ultra disk - // cloud_ssd: standard SSD - // cloud_essd: ESSD - // cloud: basic disk - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. - // Currently for other instances, the default is `cloud_efficiency`. - // +kubebuilder:validation:Enum="cloud_efficiency"; "cloud_ssd"; "cloud_essd"; "cloud" - // +optional - Category AlibabaDiskCategory `name:"category,omitempty"` - - // KMSKeyID is the ID of the Key Management Service (KMS) key to be used by data disk N. - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `""` which is interpreted as do not use KMSKey encryption. - // +optional - KMSKeyID string `name:"kmsKeyId,omitempty"` - - // DiskPreservation specifies whether to release data disk N along with the instance. - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `DeleteWithInstance` - // +kubebuilder:validation:Enum="DeleteWithInstance";"PreserveDisk" - // +optional - DiskPreservation AlibabaDiskPreservationPolicy `name:"diskPreservation,omitempty"` -} - -// Tag The tags of ECS Instance -type Tag struct { - // Key is the name of the key pair - Key string `name:"Key"` - // Value is the value or data of the key pair - Value string `name:"value"` -} - -// Bandwidth describes the bandwidth strategy for the network of the instance -type BandwidthProperties struct { - // internetMaxBandwidthIn is the maximum inbound public bandwidth. Unit: Mbit/s. Valid values: - // When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10. - // Currently the default is `10` when outbound bandwidth is less than or equal to 10 Mbit/s. - // When the purchased outbound public bandwidth is greater than 10, the valid values are 1 to the InternetMaxBandwidthOut value. - // Currently the default is the value used for `InternetMaxBandwidthOut` when outbound public bandwidth is greater than 10. - // +optional - InternetMaxBandwidthIn int64 `json:"internetMaxBandwidthIn,omitempty"` - - // internetMaxBandwidthOut is the maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. - // When a value greater than 0 is used then a public IP address is assigned to the instance. - // Empty value means no opinion and the platform chooses the a default, which is subject to change over time. - // Currently the default is `0` - // +optional - InternetMaxBandwidthOut int64 `json:"internetMaxBandwidthOut,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_aws.go b/vendor/github.com/openshift/api/machine/v1/types_aws.go deleted file mode 100644 index 5ad2b923f..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_aws.go +++ /dev/null @@ -1,51 +0,0 @@ -package v1 - -// AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. -// Only one of ID, ARN or Filters may be specified. Specifying more than one will result in -// a validation error. -// +union -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'ID' ? has(self.id) : !has(self.id)",message="id is required when type is ID, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'ARN' ? has(self.arn) : !has(self.arn)",message="arn is required when type is ARN, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Filters' ? has(self.filters) : !has(self.filters)",message="filters is required when type is Filters, and forbidden otherwise" -type AWSResourceReference struct { - // type determines how the reference will fetch the AWS resource. - // +unionDiscriminator - // +required - Type AWSResourceReferenceType `json:"type"` - // id of resource. - // +optional - ID *string `json:"id,omitempty"` - // arn of resource. - // +optional - ARN *string `json:"arn,omitempty"` - // filters is a set of filters used to identify a resource. - // +optional - // +listType=atomic - Filters *[]AWSResourceFilter `json:"filters,omitempty"` -} - -// AWSResourceReferenceType is an enumeration of different resource reference types. -// +kubebuilder:validation:Enum:="ID";"ARN";"Filters" -type AWSResourceReferenceType string - -const ( - // AWSIDReferenceType is a resource reference based on the object ID. - AWSIDReferenceType AWSResourceReferenceType = "ID" - - // AWSARNReferenceType is a resource reference based on the object ARN. - AWSARNReferenceType AWSResourceReferenceType = "ARN" - - // AWSFiltersReferenceType is a resource reference based on filters. - AWSFiltersReferenceType AWSResourceReferenceType = "Filters" -) - -// AWSResourceFilter is a filter used to identify an AWS resource -type AWSResourceFilter struct { - // name of the filter. Filter names are case-sensitive. - // +required - Name string `json:"name"` - // values includes one or more filter values. Filter values are case-sensitive. - // +optional - // +listType=atomic - Values []string `json:"values,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go b/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go deleted file mode 100644 index 25ffc9f46..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_controlplanemachineset.go +++ /dev/null @@ -1,486 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - machinev1beta1 "github.com/openshift/api/machine/v1beta1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:openapi-gen=true -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=controlplanemachinesets,scope=Namespaced -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas -// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".spec.replicas",description="Desired Replicas" -// +kubebuilder:printcolumn:name="Current",type="integer",JSONPath=".status.replicas",description="Current Replicas" -// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Ready Replicas" -// +kubebuilder:printcolumn:name="Updated",type="integer",JSONPath=".status.updatedReplicas",description="Updated Replicas" -// +kubebuilder:printcolumn:name="Unavailable",type="integer",JSONPath=".status.unavailableReplicas",description="Observed number of unavailable replicas" -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".spec.state",description="ControlPlaneMachineSet state" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="ControlPlaneMachineSet age" -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1112 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=control-plane-machine-set,operatorOrdering=01 -// +openshift:capability=MachineAPI -// +kubebuilder:metadata:annotations="exclude.release.openshift.io/internal-openshift-hosted=true" -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true - -// ControlPlaneMachineSet ensures that a specified number of control plane machine replicas are running at any given time. -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ControlPlaneMachineSet struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec ControlPlaneMachineSetSpec `json:"spec,omitempty"` - Status ControlPlaneMachineSetStatus `json:"status,omitempty"` -} - -// ControlPlaneMachineSet represents the configuration of the ControlPlaneMachineSet. -type ControlPlaneMachineSetSpec struct { - // machineNamePrefix is the prefix used when creating machine names. - // Each machine name will consist of this prefix, followed by - // a randomly generated string of 5 characters, and the index of the machine. - // It must be a lowercase RFC 1123 subdomain, consisting of lowercase - // alphanumeric characters, hyphens ('-'), and periods ('.'). - // Each block, separated by periods, must start and end with an alphanumeric character. - // Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted. - // The prefix must be between 1 and 245 characters in length. - // For example, if machineNamePrefix is set to 'control-plane', - // and three machines are created, their names might be: - // control-plane-abcde-0, control-plane-fghij-1, control-plane-klmno-2 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted." - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=245 - // +optional - MachineNamePrefix string `json:"machineNamePrefix,omitempty"` - - // state defines whether the ControlPlaneMachineSet is Active or Inactive. - // When Inactive, the ControlPlaneMachineSet will not take any action on the - // state of the Machines within the cluster. - // When Active, the ControlPlaneMachineSet will reconcile the Machines and - // will update the Machines as necessary. - // Once Active, a ControlPlaneMachineSet cannot be made Inactive. To prevent - // further action please remove the ControlPlaneMachineSet. - // +kubebuilder:default:="Inactive" - // +default="Inactive" - // +kubebuilder:validation:XValidation:rule="oldSelf != 'Active' || self == oldSelf",message="state cannot be changed once Active" - // +optional - State ControlPlaneMachineSetState `json:"state,omitempty"` - - // replicas defines how many Control Plane Machines should be - // created by this ControlPlaneMachineSet. - // This field is immutable and cannot be changed after cluster - // installation. - // The ControlPlaneMachineSet only operates with 3 or 5 node control planes, - // 3 and 5 are the only valid values for this field. - // +kubebuilder:validation:Enum:=3;5 - // +kubebuilder:default:=3 - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="replicas is immutable" - // +required - Replicas *int32 `json:"replicas"` - - // strategy defines how the ControlPlaneMachineSet will update - // Machines when it detects a change to the ProviderSpec. - // +kubebuilder:default:={type: RollingUpdate} - // +optional - Strategy ControlPlaneMachineSetStrategy `json:"strategy,omitempty"` - - // Label selector for Machines. Existing Machines selected by this - // selector will be the ones affected by this ControlPlaneMachineSet. - // It must match the template's labels. - // This field is considered immutable after creation of the resource. - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="selector is immutable" - // +required - Selector metav1.LabelSelector `json:"selector"` - - // template describes the Control Plane Machines that will be created - // by this ControlPlaneMachineSet. - // +required - Template ControlPlaneMachineSetTemplate `json:"template"` -} - -// ControlPlaneMachineSetState is an enumeration of the possible states of the -// ControlPlaneMachineSet resource. It allows it to be either Active or Inactive. -// +kubebuilder:validation:Enum:="Active";"Inactive" -type ControlPlaneMachineSetState string - -const ( - // ControlPlaneMachineSetStateActive is the value used to denote the ControlPlaneMachineSet - // should be active and should perform updates as required. - ControlPlaneMachineSetStateActive ControlPlaneMachineSetState = "Active" - - // ControlPlaneMachineSetStateInactive is the value used to denote the ControlPlaneMachineSet - // should be not active and should no perform any updates. - ControlPlaneMachineSetStateInactive ControlPlaneMachineSetState = "Inactive" -) - -// ControlPlaneMachineSetTemplate is a template used by the ControlPlaneMachineSet -// to create the Machines that it will manage in the future. -// +union -// + --- -// + This struct is a discriminated union which allows users to select the type of Machine -// + that the ControlPlaneMachineSet should create and manage. -// + For now, the only supported type is the OpenShift Machine API Machine, but in the future -// + we plan to expand this to allow other Machine types such as Cluster API Machines or a -// + future version of the Machine API Machine. -// +kubebuilder:validation:XValidation:rule="has(self.machineType) && self.machineType == 'machines_v1beta1_machine_openshift_io' ? has(self.machines_v1beta1_machine_openshift_io) : !has(self.machines_v1beta1_machine_openshift_io)",message="machines_v1beta1_machine_openshift_io configuration is required when machineType is machines_v1beta1_machine_openshift_io, and forbidden otherwise" -type ControlPlaneMachineSetTemplate struct { - // machineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. - // Currently, the only valid value is machines_v1beta1_machine_openshift_io. - // +unionDiscriminator - // +required - MachineType ControlPlaneMachineSetMachineType `json:"machineType"` - - // OpenShiftMachineV1Beta1Machine defines the template for creating Machines - // from the v1beta1.machine.openshift.io API group. - // +optional - OpenShiftMachineV1Beta1Machine *OpenShiftMachineV1Beta1MachineTemplate `json:"machines_v1beta1_machine_openshift_io,omitempty"` -} - -// ControlPlaneMachineSetMachineType is a enumeration of valid Machine types -// supported by the ControlPlaneMachineSet. -// +kubebuilder:validation:Enum:=machines_v1beta1_machine_openshift_io -type ControlPlaneMachineSetMachineType string - -const ( - // OpenShiftMachineV1Beta1MachineType is the OpenShift Machine API v1beta1 Machine type. - OpenShiftMachineV1Beta1MachineType ControlPlaneMachineSetMachineType = "machines_v1beta1_machine_openshift_io" -) - -// OpenShiftMachineV1Beta1MachineTemplate is a template for the ControlPlaneMachineSet to create -// Machines from the v1beta1.machine.openshift.io API group. -type OpenShiftMachineV1Beta1MachineTemplate struct { - // failureDomains is the list of failure domains (sometimes called - // availability zones) in which the ControlPlaneMachineSet should balance - // the Control Plane Machines. - // This will be merged into the ProviderSpec given in the template. - // This field is optional on platforms that do not require placement information. - // +optional - FailureDomains *FailureDomains `json:"failureDomains,omitempty"` - - // ObjectMeta is the standard object metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // Labels are required to match the ControlPlaneMachineSet selector. - // +required - ObjectMeta ControlPlaneMachineSetTemplateObjectMeta `json:"metadata"` - - // spec contains the desired configuration of the Control Plane Machines. - // The ProviderSpec within contains platform specific details - // for creating the Control Plane Machines. - // The ProviderSe should be complete apart from the platform specific - // failure domain field. This will be overridden when the Machines - // are created based on the FailureDomains field. - // +required - Spec machinev1beta1.MachineSpec `json:"spec"` -} - -// ControlPlaneMachineSetTemplateObjectMeta is a subset of the metav1.ObjectMeta struct. -// It allows users to specify labels and annotations that will be copied onto Machines -// created from this template. -type ControlPlaneMachineSetTemplateObjectMeta struct { - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: http://kubernetes.io/docs/user-guide/labels. - // This field must contain both the 'machine.openshift.io/cluster-api-machine-role' and 'machine.openshift.io/cluster-api-machine-type' labels, both with a value of 'master'. - // It must also contain a label with the key 'machine.openshift.io/cluster-api-cluster'. - // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-machine-role' in self && self['machine.openshift.io/cluster-api-machine-role'] == 'master'",message="label 'machine.openshift.io/cluster-api-machine-role' is required, and must have value 'master'" - // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-machine-type' in self && self['machine.openshift.io/cluster-api-machine-type'] == 'master'",message="label 'machine.openshift.io/cluster-api-machine-type' is required, and must have value 'master'" - // +kubebuilder:validation:XValidation:rule="'machine.openshift.io/cluster-api-cluster' in self",message="label 'machine.openshift.io/cluster-api-cluster' is required" - // +required - Labels map[string]string `json:"labels"` - - // annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: http://kubernetes.io/docs/user-guide/annotations - // +optional - Annotations map[string]string `json:"annotations,omitempty"` -} - -// ControlPlaneMachineSetStrategy defines the strategy for applying updates to the -// Control Plane Machines managed by the ControlPlaneMachineSet. -type ControlPlaneMachineSetStrategy struct { - // type defines the type of update strategy that should be - // used when updating Machines owned by the ControlPlaneMachineSet. - // Valid values are "RollingUpdate" and "OnDelete". - // The current default value is "RollingUpdate". - // +kubebuilder:default:="RollingUpdate" - // +default="RollingUpdate" - // +kubebuilder:validation:Enum:="RollingUpdate";"OnDelete" - // +optional - Type ControlPlaneMachineSetStrategyType `json:"type,omitempty"` - - // This is left as a struct to allow future rolling update - // strategy configuration to be added later. -} - -// ControlPlaneMachineSetStrategyType is an enumeration of different update strategies -// for the Control Plane Machines. -type ControlPlaneMachineSetStrategyType string - -const ( - // RollingUpdate is the default update strategy type for a - // ControlPlaneMachineSet. This will cause the ControlPlaneMachineSet to - // first create a new Machine and wait for this to be Ready - // before removing the Machine chosen for replacement. - RollingUpdate ControlPlaneMachineSetStrategyType = "RollingUpdate" - - // Recreate causes the ControlPlaneMachineSet controller to first - // remove a ControlPlaneMachine before creating its - // replacement. This allows for scenarios with limited capacity - // such as baremetal environments where additional capacity to - // perform rolling updates is not available. - Recreate ControlPlaneMachineSetStrategyType = "Recreate" - - // OnDelete causes the ControlPlaneMachineSet to only replace a - // Machine once it has been marked for deletion. This strategy - // makes the rollout of updated specifications into a manual - // process. This allows users to test new configuration on - // a single Machine without forcing the rollout of all of their - // Control Plane Machines. - OnDelete ControlPlaneMachineSetStrategyType = "OnDelete" -) - -// FailureDomain represents the different configurations required to spread Machines -// across failure domains on different platforms. -// +union -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'AWS' ? has(self.aws) : !has(self.aws)",message="aws configuration is required when platform is AWS, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'Azure' ? has(self.azure) : !has(self.azure)",message="azure configuration is required when platform is Azure, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'GCP' ? has(self.gcp) : !has(self.gcp)",message="gcp configuration is required when platform is GCP, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'OpenStack' ? has(self.openstack) : !has(self.openstack)",message="openstack configuration is required when platform is OpenStack, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'VSphere' ? has(self.vsphere) : !has(self.vsphere)",message="vsphere configuration is required when platform is VSphere, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.platform) && self.platform == 'Nutanix' ? has(self.nutanix) : !has(self.nutanix)",message="nutanix configuration is required when platform is Nutanix, and forbidden otherwise" -type FailureDomains struct { - // platform identifies the platform for which the FailureDomain represents. - // Currently supported values are AWS, Azure, GCP, OpenStack, VSphere and Nutanix. - // +unionDiscriminator - // +required - Platform configv1.PlatformType `json:"platform"` - - // aws configures failure domain information for the AWS platform. - // +listType=atomic - // +optional - AWS *[]AWSFailureDomain `json:"aws,omitempty"` - - // azure configures failure domain information for the Azure platform. - // +listType=atomic - // +optional - Azure *[]AzureFailureDomain `json:"azure,omitempty"` - - // gcp configures failure domain information for the GCP platform. - // +listType=atomic - // +optional - GCP *[]GCPFailureDomain `json:"gcp,omitempty"` - - // vsphere configures failure domain information for the VSphere platform. - // +listType=map - // +listMapKey=name - // +optional - VSphere []VSphereFailureDomain `json:"vsphere,omitempty"` - - // openstack configures failure domain information for the OpenStack platform. - // - // + --- - // + Unlike other platforms, OpenStack failure domains can be empty. - // + Some OpenStack deployments may not have availability zones or root volumes. - // + Therefore we'll check the length of the list to determine if it's empty instead - // + of nil if it would be a pointer. - // +listType=atomic - // +optional - OpenStack []OpenStackFailureDomain `json:"openstack,omitempty"` - - // nutanix configures failure domain information for the Nutanix platform. - // +listType=map - // +listMapKey=name - // +optional - Nutanix []NutanixFailureDomainReference `json:"nutanix,omitempty"` -} - -// AWSFailureDomain configures failure domain information for the AWS platform. -// +kubebuilder:validation:MinProperties:=1 -type AWSFailureDomain struct { - // subnet is a reference to the subnet to use for this instance. - // +optional - Subnet *AWSResourceReference `json:"subnet,omitempty"` - - // placement configures the placement information for this instance. - // +optional - Placement AWSFailureDomainPlacement `json:"placement,omitempty"` -} - -// AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain. -type AWSFailureDomainPlacement struct { - // availabilityZone is the availability zone of the instance. - // +required - AvailabilityZone string `json:"availabilityZone"` -} - -// AzureFailureDomain configures failure domain information for the Azure platform. -type AzureFailureDomain struct { - // Availability Zone for the virtual machine. - // If nil, the virtual machine should be deployed to no zone. - // +required - Zone string `json:"zone"` - - // subnet is the name of the network subnet in which the VM will be created. - // When omitted, the subnet value from the machine providerSpec template will be used. - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9](?:[a-zA-Z0-9._-]*[a-zA-Z0-9_])?$` - // +optional - Subnet string `json:"subnet,omitempty"` -} - -// GCPFailureDomain configures failure domain information for the GCP platform -type GCPFailureDomain struct { - // zone is the zone in which the GCP machine provider will create the VM. - // +required - Zone string `json:"zone"` -} - -// VSphereFailureDomain configures failure domain information for the vSphere platform -type VSphereFailureDomain struct { - // name of the failure domain in which the vSphere machine provider will create the VM. - // Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. - // When balancing machines across failure domains, the control plane machine set will inject configuration from the - // Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain. - // +required - Name string `json:"name"` -} - -// OpenStackFailureDomain configures failure domain information for the OpenStack platform. -// +kubebuilder:validation:MinProperties:=1 -// +kubebuilder:validation:XValidation:rule="!has(self.availabilityZone) || !has(self.rootVolume) || has(self.rootVolume.availabilityZone)",message="rootVolume.availabilityZone is required when availabilityZone is set" -type OpenStackFailureDomain struct { - // availabilityZone is the nova availability zone in which the OpenStack machine provider will create the VM. - // If not specified, the VM will be created in the default availability zone specified in the nova configuration. - // Availability zone names must NOT contain : since it is used by admin users to specify hosts where instances - // are launched in server creation. Also, it must not contain spaces otherwise it will lead to node that belongs - // to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information. - // The maximum length of availability zone name is 63 as per labels limits. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:Pattern=`^[^: ]*$` - // +kubebuilder:validation:MaxLength=63 - // +optional - AvailabilityZone string `json:"availabilityZone,omitempty"` - - // rootVolume contains settings that will be used by the OpenStack machine provider to create the root volume attached to the VM. - // If not specified, no root volume will be created. - // - // + --- - // + RootVolume must be a pointer to allow us to require at least one valid property is set within the failure domain. - // + If it were a reference then omitempty doesn't work and the minProperties validations are no longer valid. - // +optional - RootVolume *RootVolume `json:"rootVolume,omitempty"` -} - -// NutanixFailureDomainReference refers to the failure domain of the Nutanix platform. -type NutanixFailureDomainReference struct { - // name of the failure domain in which the nutanix machine provider will create the VM. - // Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=64 - // +kubebuilder:validation:Pattern=`[a-z0-9]([-a-z0-9]*[a-z0-9])?` - Name string `json:"name"` -} - -// RootVolume represents the volume metadata to boot from. -// The original RootVolume struct is defined in the v1alpha1 but it's not best practice to use it directly here so we define a new one -// that should stay in sync with the original one. -type RootVolume struct { - // availabilityZone specifies the Cinder availability zone where the root volume will be created. - // If not specifified, the root volume will be created in the availability zone specified by the volume type in the cinder configuration. - // If the volume type (configured in the OpenStack cluster) does not specify an availability zone, the root volume will be created in the default availability - // zone specified in the cinder configuration. See https://docs.openstack.org/cinder/latest/admin/availability-zone-type.html for more details. - // If the OpenStack cluster is deployed with the cross_az_attach configuration option set to false, the root volume will have to be in the same - // availability zone as the VM (defined by OpenStackFailureDomain.AvailabilityZone). - // Availability zone names must NOT contain spaces otherwise it will lead to volume that belongs to this availability zone register failure, - // see kubernetes/cloud-provider-openstack#1379 for further information. - // The maximum length of availability zone name is 63 as per labels limits. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Pattern=`^[^ ]*$` - // +optional - AvailabilityZone string `json:"availabilityZone,omitempty"` - - // volumeType specifies the type of the root volume that will be provisioned. - // The maximum length of a volume type name is 255 characters, as per the OpenStack limit. - // + --- - // + Historically, the installer has always required a volume type to be specified when deploying - // + the control plane with a root volume. This is because the default volume type in Cinder is not guaranteed - // + to be available, therefore we prefer the user to be explicit about the volume type to use. - // + We apply the same logic in CPMS: if the failure domain specifies a root volume, we require the user to specify a volume type. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - VolumeType string `json:"volumeType"` -} - -// ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD. -type ControlPlaneMachineSetStatus struct { - // conditions represents the observations of the ControlPlaneMachineSet's current state. - // Known .status.conditions.type are: Available, Degraded and Progressing. - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // observedGeneration is the most recent generation observed for this - // ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, - // which is updated on mutation by the API Server. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // replicas is the number of Control Plane Machines created by the - // ControlPlaneMachineSet controller. - // Note that during update operations this value may differ from the - // desired replica count. - // +optional - Replicas int32 `json:"replicas,omitempty"` - - // readyReplicas is the number of Control Plane Machines created by the - // ControlPlaneMachineSet controller which are ready. - // Note that this value may be higher than the desired number of replicas - // while rolling updates are in-progress. - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty"` - - // updatedReplicas is the number of non-terminated Control Plane Machines - // created by the ControlPlaneMachineSet controller that have the desired - // provider spec and are ready. - // This value is set to 0 when a change is detected to the desired spec. - // When the update strategy is RollingUpdate, this will also coincide - // with starting the process of updating the Machines. - // When the update strategy is OnDelete, this value will remain at 0 until - // a user deletes an existing replica and its replacement has become ready. - // +optional - UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` - - // unavailableReplicas is the number of Control Plane Machines that are - // still required before the ControlPlaneMachineSet reaches the desired - // available capacity. When this value is non-zero, the number of - // ReadyReplicas is less than the desired Replicas. - // +optional - UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ControlPlaneMachineSetList contains a list of ControlPlaneMachineSet -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ControlPlaneMachineSetList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []ControlPlaneMachineSet `json:"items"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go b/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go deleted file mode 100644 index 446082efb..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_nutanixprovider.go +++ /dev/null @@ -1,345 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NutanixMachineProviderConfig is the Schema for the nutanixmachineproviderconfigs API -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -type NutanixMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // cluster is to identify the cluster (the Prism Element under management - // of the Prism Central), in which the Machine's VM will be created. - // The cluster identifier (uuid or name) can be obtained from the Prism Central console - // or using the prism_central API. - // +required - Cluster NutanixResourceIdentifier `json:"cluster"` - - // image is to identify the rhcos image uploaded to the Prism Central (PC) - // The image identifier (uuid or name) can be obtained from the Prism Central console - // or using the prism_central API. - // +required - Image NutanixResourceIdentifier `json:"image"` - - // subnets holds a list of identifiers (one or more) of the cluster's network subnets - // for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be - // obtained from the Prism Central console or using the prism_central API. - // +required - // +kubebuilder:validation:MinItems=1 - Subnets []NutanixResourceIdentifier `json:"subnets"` - - // vcpusPerSocket is the number of vCPUs per socket of the VM - // +required - // +kubebuilder:validation:Minimum=1 - VCPUsPerSocket int32 `json:"vcpusPerSocket"` - - // vcpuSockets is the number of vCPU sockets of the VM - // +required - // +kubebuilder:validation:Minimum=1 - VCPUSockets int32 `json:"vcpuSockets"` - - // memorySize is the memory size (in Quantity format) of the VM - // The minimum memorySize is 2Gi bytes - // +required - MemorySize resource.Quantity `json:"memorySize"` - - // systemDiskSize is size (in Quantity format) of the system disk of the VM - // The minimum systemDiskSize is 20Gi bytes - // +required - SystemDiskSize resource.Quantity `json:"systemDiskSize"` - - // bootType indicates the boot type (Legacy, UEFI or SecureBoot) the Machine's VM uses to boot. - // If this field is empty or omitted, the VM will use the default boot type "Legacy" to boot. - // "SecureBoot" depends on "UEFI" boot, i.e., enabling "SecureBoot" means that "UEFI" boot is also enabled. - // +kubebuilder:validation:Enum="";Legacy;UEFI;SecureBoot - // +optional - BootType NutanixBootType `json:"bootType"` - - // project optionally identifies a Prism project for the Machine's VM to associate with. - // +optional - Project NutanixResourceIdentifier `json:"project"` - - // categories optionally adds one or more prism categories (each with key and value) for - // the Machine's VM to associate with. All the category key and value pairs specified must - // already exist in the prism central. - // +listType=map - // +listMapKey=key - // +optional - Categories []NutanixCategory `json:"categories"` - - // gpus is a list of GPU devices to attach to the machine's VM. - // The GPU devices should already exist in Prism Central and associated with - // one of the Prism Element's hosts and available for the VM to attach (in "UNUSED" status). - // +listType=set - // +optional - GPUs []NutanixGPU `json:"gpus"` - - // dataDisks holds information of the data disks to attach to the Machine's VM - // +listType=set - // +optional - DataDisks []NutanixVMDisk `json:"dataDisks"` - - // userDataSecret is a local reference to a secret that contains the - // UserData to apply to the VM - UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` - - // credentialsSecret is a local reference to a secret that contains the - // credentials data to access Nutanix PC client - // +required - CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret"` - - // failureDomain refers to the name of the FailureDomain with which this Machine is associated. - // If this is configured, the Nutanix machine controller will use the prism_central endpoint - // and credentials defined in the referenced FailureDomain to communicate to the prism_central. - // It will also verify that the 'cluster' and subnets' configuration in the NutanixMachineProviderConfig - // is consistent with that in the referenced failureDomain. - // +optional - FailureDomain *NutanixFailureDomainReference `json:"failureDomain"` -} - -// NutanixCategory identifies a pair of prism category key and value -type NutanixCategory struct { - // key is the prism category key name - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=64 - // +required - Key string `json:"key"` - - // value is the prism category value associated with the key - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=64 - // +required - Value string `json:"value"` -} - -// NutanixBootType is an enumeration of different boot types for Nutanix VM. -type NutanixBootType string - -const ( - // NutanixLegacyBoot is the legacy BIOS boot type - NutanixLegacyBoot NutanixBootType = "Legacy" - - // NutanixUEFIBoot is the UEFI boot type - NutanixUEFIBoot NutanixBootType = "UEFI" - - // NutanixSecureBoot is the Secure boot type - NutanixSecureBoot NutanixBootType = "SecureBoot" -) - -// NutanixIdentifierType is an enumeration of different resource identifier types. -type NutanixIdentifierType string - -const ( - // NutanixIdentifierUUID is a resource identifier identifying the object by UUID. - NutanixIdentifierUUID NutanixIdentifierType = "uuid" - - // NutanixIdentifierName is a resource identifier identifying the object by Name. - NutanixIdentifierName NutanixIdentifierType = "name" -) - -// NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.) -// +union -type NutanixResourceIdentifier struct { - // type is the identifier type to use for this resource. - // +unionDiscriminator - // +required - // +kubebuilder:validation:Enum:=uuid;name - Type NutanixIdentifierType `json:"type"` - - // uuid is the UUID of the resource in the PC. - // +optional - UUID *string `json:"uuid,omitempty"` - - // name is the resource name in the PC - // +optional - Name *string `json:"name,omitempty"` -} - -// NutanixGPUIdentifierType is an enumeration of different resource identifier types for GPU entities. -// +kubebuilder:validation:Enum:=Name;DeviceID -type NutanixGPUIdentifierType string - -const ( - // NutanixGPUIdentifierName identifies a GPU by Name. - NutanixGPUIdentifierName NutanixGPUIdentifierType = "Name" - - // NutanixGPUIdentifierDeviceID identifies a GPU by device ID. - NutanixGPUIdentifierDeviceID NutanixGPUIdentifierType = "DeviceID" -) - -// NutanixGPU holds the identity of a Nutanix GPU resource in the Prism Central -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'DeviceID' ? has(self.deviceID) : !has(self.deviceID)",message="deviceID configuration is required when type is DeviceID, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Name' ? has(self.name) : !has(self.name)",message="name configuration is required when type is Name, and forbidden otherwise" -// +union -type NutanixGPU struct { - // type is the identifier type of the GPU device. - // Valid values are Name and DeviceID. - // +unionDiscriminator - // +required - Type NutanixGPUIdentifierType `json:"type"` - - // deviceID is the GPU device ID with the integer value. - // +optional - // +unionMember - DeviceID *int32 `json:"deviceID,omitempty"` - - // name is the GPU device name - // +optional - // +unionMember - Name *string `json:"name,omitempty"` -} - -// NutanixDiskMode is an enumeration of different disk modes. -// +kubebuilder:validation:Enum=Standard;Flash -type NutanixDiskMode string - -const ( - // NutanixDiskModeStandard represents the disk standard mode (not flash). - NutanixDiskModeStandard NutanixDiskMode = "Standard" - - // NutanixDiskModeFlash represents the disk flash mode. - NutanixDiskModeFlash NutanixDiskMode = "Flash" -) - -// NutanixStorageResourceIdentifier holds the identity of a Nutanix storage resource (storage_container, etc.) -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'uuid' ? has(self.uuid) : !has(self.uuid)",message="uuid configuration is required when type is uuid, and forbidden otherwise" -// +union -type NutanixStorageResourceIdentifier struct { - // type is the identifier type to use for this resource. - // The valid value is "uuid". - // +unionDiscriminator - // +required - // +kubebuilder:validation:Enum:=uuid - Type NutanixIdentifierType `json:"type"` - - // uuid is the UUID of the storage resource in the PC. - // +optional - // +unionMember - UUID *string `json:"uuid,omitempty"` -} - -// NutanixVMStorageConfig specifies the storage configuration parameters for VM disks. -type NutanixVMStorageConfig struct { - // diskMode specifies the disk mode. - // The valid values are Standard and Flash, and the default is Standard. - // +kubebuilder:default=Standard - DiskMode NutanixDiskMode `json:"diskMode"` - - // storageContainer refers to the storage_container used by the VM disk. - // +optional - StorageContainer *NutanixStorageResourceIdentifier `json:"storageContainer,omitempty"` -} - -// NutanixDiskDeviceType is the VM disk device type. -// +kubebuilder:validation:Enum=Disk;CDRom -type NutanixDiskDeviceType string - -const ( - // NutanixDiskDeviceTypeDisk represents the VM disk device type "Disk". - NutanixDiskDeviceTypeDisk NutanixDiskDeviceType = "Disk" - - // NutanixDiskDeviceTypeCDROM represents the VM disk device type "CDRom". - NutanixDiskDeviceTypeCDROM NutanixDiskDeviceType = "CDRom" -) - -// NutanixDiskAdapterType is an enumeration of different disk device adapter types. -// +kubebuilder:validation:Enum:=SCSI;IDE;PCI;SATA;SPAPR -type NutanixDiskAdapterType string - -const ( - // NutanixDiskAdapterTypeSCSI represents the disk adapter type "SCSI". - NutanixDiskAdapterTypeSCSI NutanixDiskAdapterType = "SCSI" - - // NutanixDiskAdapterTypeIDE represents the disk adapter type "IDE". - NutanixDiskAdapterTypeIDE NutanixDiskAdapterType = "IDE" - - // NutanixDiskAdapterTypePCI represents the disk adapter type "PCI". - NutanixDiskAdapterTypePCI NutanixDiskAdapterType = "PCI" - - // NutanixDiskAdapterTypeSATA represents the disk adapter type "SATA". - NutanixDiskAdapterTypeSATA NutanixDiskAdapterType = "SATA" - - // NutanixDiskAdapterTypeSPAPR represents the disk adapter type "SPAPR". - NutanixDiskAdapterTypeSPAPR NutanixDiskAdapterType = "SPAPR" -) - -// NutanixVMDiskDeviceProperties specifies the disk device properties. -type NutanixVMDiskDeviceProperties struct { - // deviceType specifies the disk device type. - // The valid values are "Disk" and "CDRom", and the default is "Disk". - // +kubebuilder:default=Disk - // +required - DeviceType NutanixDiskDeviceType `json:"deviceType"` - - // adapterType is the adapter type of the disk address. - // If the deviceType is "Disk", the valid adapterType can be "SCSI", "IDE", "PCI", "SATA" or "SPAPR". - // If the deviceType is "CDRom", the valid adapterType can be "IDE" or "SATA". - // +required - AdapterType NutanixDiskAdapterType `json:"adapterType"` - - // deviceIndex is the index of the disk address. The valid values are non-negative integers, with the default value 0. - // For a Machine VM, the deviceIndex for the disks with the same deviceType.adapterType combination should - // start from 0 and increase consecutively afterwards. Note that for each Machine VM, the Disk.SCSI.0 - // and CDRom.IDE.0 are reserved to be used by the VM's system. So for dataDisks of Disk.SCSI and CDRom.IDE, - // the deviceIndex should start from 1. - // +kubebuilder:default=0 - // +kubebuilder:validation:Minimum=0 - // +required - DeviceIndex int32 `json:"deviceIndex,omitempty"` -} - -// NutanixDataDisk specifies the VM data disk configuration parameters. -type NutanixVMDisk struct { - // diskSize is size (in Quantity format) of the disk attached to the VM. - // See https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Format for the Quantity format and example documentation. - // The minimum diskSize is 1GB. - // +required - DiskSize resource.Quantity `json:"diskSize"` - - // deviceProperties are the properties of the disk device. - // +optional - DeviceProperties *NutanixVMDiskDeviceProperties `json:"deviceProperties,omitempty"` - - // storageConfig are the storage configuration parameters of the VM disks. - // +optional - StorageConfig *NutanixVMStorageConfig `json:"storageConfig,omitempty"` - - // dataSource refers to a data source image for the VM disk. - // +optional - DataSource *NutanixResourceIdentifier `json:"dataSource,omitempty"` -} - -// NutanixMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains nutanix-specific status information. -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type NutanixMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // vmUUID is the Machine associated VM's UUID - // The field is missing before the VM is created. - // Once the VM is created, the field is filled with the VM's UUID and it will not change. - // The vmUUID is used to find the VM when updating the Machine status, - // and to delete the VM when the Machine is deleted. - // +optional - VmUUID *string `json:"vmUUID,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go b/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go deleted file mode 100644 index d3a4c6ec8..000000000 --- a/vendor/github.com/openshift/api/machine/v1/types_powervsprovider.go +++ /dev/null @@ -1,225 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// PowerVSResourceType enum attribute to identify the type of resource reference -type PowerVSResourceType string - -// PowerVSProcessorType enum attribute to identify the PowerVS instance processor type -type PowerVSProcessorType string - -// IBMVPCLoadBalancerType is the type of LoadBalancer to use when registering -// an instance with load balancers specified in LoadBalancerNames -type IBMVPCLoadBalancerType string - -// ApplicationLoadBalancerType is possible values for IBMVPCLoadBalancerType. -const ( - ApplicationLoadBalancerType IBMVPCLoadBalancerType = "Application" // Application Load Balancer for VPC (ALB) -) - -const ( - // PowerVSResourceTypeID enum property to identify an ID type resource reference - PowerVSResourceTypeID PowerVSResourceType = "ID" - // PowerVSResourceTypeName enum property to identify a Name type resource reference - PowerVSResourceTypeName PowerVSResourceType = "Name" - // PowerVSResourceTypeRegEx enum property to identify a tags type resource reference - PowerVSResourceTypeRegEx PowerVSResourceType = "RegEx" - // PowerVSProcessorTypeDedicated enum property to identify a Dedicated Power VS processor type - PowerVSProcessorTypeDedicated PowerVSProcessorType = "Dedicated" - // PowerVSProcessorTypeShared enum property to identify a Shared Power VS processor type - PowerVSProcessorTypeShared PowerVSProcessorType = "Shared" - // PowerVSProcessorTypeCapped enum property to identify a Capped Power VS processor type - PowerVSProcessorTypeCapped PowerVSProcessorType = "Capped" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PowerVSMachineProviderConfig is the type that will be embedded in a Machine.Spec.ProviderSpec field -// for a PowerVS virtual machine. It is used by the PowerVS machine actuator to create a single Machine. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -type PowerVSMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance. - // +optional - UserDataSecret *PowerVSSecretReference `json:"userDataSecret,omitempty"` - - // credentialsSecret is a reference to the secret with IBM Cloud credentials. - // +optional - CredentialsSecret *PowerVSSecretReference `json:"credentialsSecret,omitempty"` - - // serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created. - // Power VS service is a container for all Power VS instances at a specific geographic region. - // serviceInstance can be created via IBM Cloud catalog or CLI. - // supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. - // More detail about Power VS service instance. - // https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server - // +kubebuilder:validation:=Required - ServiceInstance PowerVSResource `json:"serviceInstance"` - - // image is to identify the rhcos image uploaded to IBM COS bucket which is used to create the instance. - // supported image identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. - // +kubebuilder:validation:=Required - Image PowerVSResource `json:"image"` - - // network is the reference to the Network to use for this instance. - // supported network identifier in PowerVSResource are Name, ID and RegEx and that can be obtained from IBM Cloud UI or IBM Cloud cli. - // +kubebuilder:validation:=Required - Network PowerVSResource `json:"network"` - - // keyPairName is the name of the KeyPair to use for SSH. - // The key pair will be exposed to the instance via the instance metadata service. - // On boot, the OS will copy the public keypair into the authorized keys for the core user. - // +kubebuilder:validation:=Required - KeyPairName string `json:"keyPairName"` - - // systemType is the System type used to host the instance. - // systemType determines the number of cores and memory that is available. - // Few of the supported SystemTypes are s922,e880,e980. - // e880 systemType available only in Dallas Datacenters. - // e980 systemType available in Datacenters except Dallas and Washington. - // When omitted, this means that the user has no opinion and the platform is left to choose a - // reasonable default, which is subject to change over time. The current default is s922 which is generally available. - // + This is not an enum because we expect other values to be added later which should be supported implicitly. - // +optional - SystemType string `json:"systemType,omitempty"` - - // processorType is the VM instance processor type. - // It must be set to one of the following values: Dedicated, Capped or Shared. - // Dedicated: resources are allocated for a specific client, The hypervisor makes a 1:1 binding of a partition’s processor to a physical processor core. - // Shared: Shared among other clients. - // Capped: Shared, but resources do not expand beyond those that are requested, the amount of CPU time is Capped to the value specified for the entitlement. - // if the processorType is selected as Dedicated, then processors value cannot be fractional. - // When omitted, this means that the user has no opinion and the platform is left to choose a - // reasonable default, which is subject to change over time. The current default is Shared. - // +kubebuilder:validation:Enum:="Dedicated";"Shared";"Capped";"" - // +optional - ProcessorType PowerVSProcessorType `json:"processorType,omitempty"` - - // processors is the number of virtual processors in a virtual machine. - // when the processorType is selected as Dedicated the processors value cannot be fractional. - // maximum value for the Processors depends on the selected SystemType. - // when SystemType is set to e880 or e980 maximum Processors value is 143. - // when SystemType is set to s922 maximum Processors value is 15. - // minimum value for Processors depends on the selected ProcessorType. - // when ProcessorType is set as Shared or Capped, The minimum processors is 0.5. - // when ProcessorType is set as Dedicated, The minimum processors is 1. - // When omitted, this means that the user has no opinion and the platform is left to choose a - // reasonable default, which is subject to change over time. The default is set based on the selected ProcessorType. - // when ProcessorType selected as Dedicated, the default is set to 1. - // when ProcessorType selected as Shared or Capped, the default is set to 0.5. - // +optional - Processors intstr.IntOrString `json:"processors,omitempty"` - - // memoryGiB is the size of a virtual machine's memory, in GiB. - // maximum value for the MemoryGiB depends on the selected SystemType. - // when SystemType is set to e880 maximum MemoryGiB value is 7463 GiB. - // when SystemType is set to e980 maximum MemoryGiB value is 15307 GiB. - // when SystemType is set to s922 maximum MemoryGiB value is 942 GiB. - // The minimum memory is 32 GiB. - // When omitted, this means the user has no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is 32. - // +optional - MemoryGiB int32 `json:"memoryGiB,omitempty"` - - // loadBalancers is the set of load balancers to which the new control plane instance - // should be added once it is created. - // +optional - LoadBalancers []LoadBalancerReference `json:"loadBalancers,omitempty"` -} - -// PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx -// Only one of ID, Name or RegEx may be specified. Specifying more than one will result in -// a validation error. -// +union -type PowerVSResource struct { - // type identifies the resource type for this entry. - // Valid values are ID, Name and RegEx - // +kubebuilder:validation:Enum:=ID;Name;RegEx - // +optional - Type PowerVSResourceType `json:"type,omitempty"` - // id of resource - // +optional - ID *string `json:"id,omitempty"` - // name of resource - // +optional - Name *string `json:"name,omitempty"` - // regex to find resource - // Regex contains the pattern to match to find a resource - // +optional - RegEx *string `json:"regex,omitempty"` -} - -// PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains PowerVS-specific status information. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type PowerVSMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // instanceId is the instance ID of the machine created in PowerVS - // instanceId uniquely identifies a Power VS server instance(VM) under a Power VS service. - // This will help in updating or deleting a VM in Power VS Cloud - // +optional - InstanceID *string `json:"instanceId,omitempty"` - - // serviceInstanceID is the reference to the Power VS ServiceInstance on which the machine instance will be created. - // serviceInstanceID uniquely identifies the Power VS service - // By setting serviceInstanceID it will become easy and efficient to fetch a server instance(VM) within Power VS Cloud. - // +optional - ServiceInstanceID *string `json:"serviceInstanceID,omitempty"` - - // instanceState is the state of the PowerVS instance for this machine - // Possible instance states are Active, Build, ShutOff, Reboot - // This is used to display additional information to user regarding instance current state - // +optional - InstanceState *string `json:"instanceState,omitempty"` -} - -// PowerVSSecretReference contains enough information to locate the -// referenced secret inside the same namespace. -// +structType=atomic -type PowerVSSecretReference struct { - // name of the secret. - // +optional - Name string `json:"name,omitempty"` -} - -// LoadBalancerReference is a reference to a load balancer on IBM Cloud virtual private cloud(VPC). -type LoadBalancerReference struct { - // name of the LoadBalancer in IBM Cloud VPC. - // The name should be between 1 and 63 characters long and may consist of lowercase alphanumeric characters and hyphens only. - // The value must not end with a hyphen. - // It is a reference to existing LoadBalancer created by openshift installer component. - // +required - // +kubebuilder:validation:Pattern=`^([a-z]|[a-z][-a-z0-9]*[a-z0-9]|[0-9][-a-z0-9]*([a-z]|[-a-z][-a-z0-9]*[a-z0-9]))$` - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - Name string `json:"name"` - // type of the LoadBalancer service supported by IBM Cloud VPC. - // Currently, only Application LoadBalancer is supported. - // More details about Application LoadBalancer - // https://cloud.ibm.com/docs/vpc?topic=vpc-load-balancers-about&interface=ui - // Supported values are Application. - // +required - // +kubebuilder:validation:Enum:="Application" - Type IBMVPCLoadBalancerType `json:"type"` -} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go deleted file mode 100644 index 61294ef58..000000000 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1123 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AWSFailureDomain) DeepCopyInto(out *AWSFailureDomain) { - *out = *in - if in.Subnet != nil { - in, out := &in.Subnet, &out.Subnet - *out = new(AWSResourceReference) - (*in).DeepCopyInto(*out) - } - out.Placement = in.Placement - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSFailureDomain. -func (in *AWSFailureDomain) DeepCopy() *AWSFailureDomain { - if in == nil { - return nil - } - out := new(AWSFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSFailureDomainPlacement) DeepCopyInto(out *AWSFailureDomainPlacement) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSFailureDomainPlacement. -func (in *AWSFailureDomainPlacement) DeepCopy() *AWSFailureDomainPlacement { - if in == nil { - return nil - } - out := new(AWSFailureDomainPlacement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSResourceFilter) DeepCopyInto(out *AWSResourceFilter) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceFilter. -func (in *AWSResourceFilter) DeepCopy() *AWSResourceFilter { - if in == nil { - return nil - } - out := new(AWSResourceFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSResourceReference) DeepCopyInto(out *AWSResourceReference) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.ARN != nil { - in, out := &in.ARN, &out.ARN - *out = new(string) - **out = **in - } - if in.Filters != nil { - in, out := &in.Filters, &out.Filters - *out = new([]AWSResourceFilter) - if **in != nil { - in, out := *in, *out - *out = make([]AWSResourceFilter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceReference. -func (in *AWSResourceReference) DeepCopy() *AWSResourceReference { - if in == nil { - return nil - } - out := new(AWSResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlibabaCloudMachineProviderConfig) DeepCopyInto(out *AlibabaCloudMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]DataDiskProperties, len(*in)) - copy(*out, *in) - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]AlibabaResourceReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.Bandwidth = in.Bandwidth - out.SystemDisk = in.SystemDisk - in.VSwitch.DeepCopyInto(&out.VSwitch) - in.ResourceGroup.DeepCopyInto(&out.ResourceGroup) - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]Tag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderConfig. -func (in *AlibabaCloudMachineProviderConfig) DeepCopy() *AlibabaCloudMachineProviderConfig { - if in == nil { - return nil - } - out := new(AlibabaCloudMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlibabaCloudMachineProviderConfig) 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 *AlibabaCloudMachineProviderConfigList) DeepCopyInto(out *AlibabaCloudMachineProviderConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AlibabaCloudMachineProviderConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderConfigList. -func (in *AlibabaCloudMachineProviderConfigList) DeepCopy() *AlibabaCloudMachineProviderConfigList { - if in == nil { - return nil - } - out := new(AlibabaCloudMachineProviderConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlibabaCloudMachineProviderConfigList) 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 *AlibabaCloudMachineProviderStatus) DeepCopyInto(out *AlibabaCloudMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID - *out = new(string) - **out = **in - } - if in.InstanceState != nil { - in, out := &in.InstanceState, &out.InstanceState - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaCloudMachineProviderStatus. -func (in *AlibabaCloudMachineProviderStatus) DeepCopy() *AlibabaCloudMachineProviderStatus { - if in == nil { - return nil - } - out := new(AlibabaCloudMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlibabaCloudMachineProviderStatus) 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 *AlibabaResourceReference) DeepCopyInto(out *AlibabaResourceReference) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = new([]Tag) - if **in != nil { - in, out := *in, *out - *out = make([]Tag, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlibabaResourceReference. -func (in *AlibabaResourceReference) DeepCopy() *AlibabaResourceReference { - if in == nil { - return nil - } - out := new(AlibabaResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureFailureDomain) DeepCopyInto(out *AzureFailureDomain) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureFailureDomain. -func (in *AzureFailureDomain) DeepCopy() *AzureFailureDomain { - if in == nil { - return nil - } - out := new(AzureFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BandwidthProperties) DeepCopyInto(out *BandwidthProperties) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BandwidthProperties. -func (in *BandwidthProperties) DeepCopy() *BandwidthProperties { - if in == nil { - return nil - } - out := new(BandwidthProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControlPlaneMachineSet) DeepCopyInto(out *ControlPlaneMachineSet) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSet. -func (in *ControlPlaneMachineSet) DeepCopy() *ControlPlaneMachineSet { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ControlPlaneMachineSet) 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 *ControlPlaneMachineSetList) DeepCopyInto(out *ControlPlaneMachineSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ControlPlaneMachineSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetList. -func (in *ControlPlaneMachineSetList) DeepCopy() *ControlPlaneMachineSetList { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ControlPlaneMachineSetList) 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 *ControlPlaneMachineSetSpec) DeepCopyInto(out *ControlPlaneMachineSetSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - out.Strategy = in.Strategy - in.Selector.DeepCopyInto(&out.Selector) - in.Template.DeepCopyInto(&out.Template) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetSpec. -func (in *ControlPlaneMachineSetSpec) DeepCopy() *ControlPlaneMachineSetSpec { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControlPlaneMachineSetStatus) DeepCopyInto(out *ControlPlaneMachineSetStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetStatus. -func (in *ControlPlaneMachineSetStatus) DeepCopy() *ControlPlaneMachineSetStatus { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControlPlaneMachineSetStrategy) DeepCopyInto(out *ControlPlaneMachineSetStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetStrategy. -func (in *ControlPlaneMachineSetStrategy) DeepCopy() *ControlPlaneMachineSetStrategy { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControlPlaneMachineSetTemplate) DeepCopyInto(out *ControlPlaneMachineSetTemplate) { - *out = *in - if in.OpenShiftMachineV1Beta1Machine != nil { - in, out := &in.OpenShiftMachineV1Beta1Machine, &out.OpenShiftMachineV1Beta1Machine - *out = new(OpenShiftMachineV1Beta1MachineTemplate) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetTemplate. -func (in *ControlPlaneMachineSetTemplate) DeepCopy() *ControlPlaneMachineSetTemplate { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ControlPlaneMachineSetTemplateObjectMeta) DeepCopyInto(out *ControlPlaneMachineSetTemplateObjectMeta) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneMachineSetTemplateObjectMeta. -func (in *ControlPlaneMachineSetTemplateObjectMeta) DeepCopy() *ControlPlaneMachineSetTemplateObjectMeta { - if in == nil { - return nil - } - out := new(ControlPlaneMachineSetTemplateObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataDiskProperties) DeepCopyInto(out *DataDiskProperties) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDiskProperties. -func (in *DataDiskProperties) DeepCopy() *DataDiskProperties { - if in == nil { - return nil - } - out := new(DataDiskProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FailureDomains) DeepCopyInto(out *FailureDomains) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new([]AWSFailureDomain) - if **in != nil { - in, out := *in, *out - *out = make([]AWSFailureDomain, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - if in.Azure != nil { - in, out := &in.Azure, &out.Azure - *out = new([]AzureFailureDomain) - if **in != nil { - in, out := *in, *out - *out = make([]AzureFailureDomain, len(*in)) - copy(*out, *in) - } - } - if in.GCP != nil { - in, out := &in.GCP, &out.GCP - *out = new([]GCPFailureDomain) - if **in != nil { - in, out := *in, *out - *out = make([]GCPFailureDomain, len(*in)) - copy(*out, *in) - } - } - if in.VSphere != nil { - in, out := &in.VSphere, &out.VSphere - *out = make([]VSphereFailureDomain, len(*in)) - copy(*out, *in) - } - if in.OpenStack != nil { - in, out := &in.OpenStack, &out.OpenStack - *out = make([]OpenStackFailureDomain, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Nutanix != nil { - in, out := &in.Nutanix, &out.Nutanix - *out = make([]NutanixFailureDomainReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FailureDomains. -func (in *FailureDomains) DeepCopy() *FailureDomains { - if in == nil { - return nil - } - out := new(FailureDomains) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPFailureDomain) DeepCopyInto(out *GCPFailureDomain) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPFailureDomain. -func (in *GCPFailureDomain) DeepCopy() *GCPFailureDomain { - if in == nil { - return nil - } - out := new(GCPFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerReference) DeepCopyInto(out *LoadBalancerReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerReference. -func (in *LoadBalancerReference) DeepCopy() *LoadBalancerReference { - if in == nil { - return nil - } - out := new(LoadBalancerReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixCategory) DeepCopyInto(out *NutanixCategory) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixCategory. -func (in *NutanixCategory) DeepCopy() *NutanixCategory { - if in == nil { - return nil - } - out := new(NutanixCategory) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixFailureDomainReference) DeepCopyInto(out *NutanixFailureDomainReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixFailureDomainReference. -func (in *NutanixFailureDomainReference) DeepCopy() *NutanixFailureDomainReference { - if in == nil { - return nil - } - out := new(NutanixFailureDomainReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixGPU) DeepCopyInto(out *NutanixGPU) { - *out = *in - if in.DeviceID != nil { - in, out := &in.DeviceID, &out.DeviceID - *out = new(int32) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixGPU. -func (in *NutanixGPU) DeepCopy() *NutanixGPU { - if in == nil { - return nil - } - out := new(NutanixGPU) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixMachineProviderConfig) DeepCopyInto(out *NutanixMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Cluster.DeepCopyInto(&out.Cluster) - in.Image.DeepCopyInto(&out.Image) - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make([]NutanixResourceIdentifier, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.MemorySize = in.MemorySize.DeepCopy() - out.SystemDiskSize = in.SystemDiskSize.DeepCopy() - in.Project.DeepCopyInto(&out.Project) - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]NutanixCategory, len(*in)) - copy(*out, *in) - } - if in.GPUs != nil { - in, out := &in.GPUs, &out.GPUs - *out = make([]NutanixGPU, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]NutanixVMDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.FailureDomain != nil { - in, out := &in.FailureDomain, &out.FailureDomain - *out = new(NutanixFailureDomainReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixMachineProviderConfig. -func (in *NutanixMachineProviderConfig) DeepCopy() *NutanixMachineProviderConfig { - if in == nil { - return nil - } - out := new(NutanixMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NutanixMachineProviderConfig) 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 *NutanixMachineProviderStatus) DeepCopyInto(out *NutanixMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.VmUUID != nil { - in, out := &in.VmUUID, &out.VmUUID - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixMachineProviderStatus. -func (in *NutanixMachineProviderStatus) DeepCopy() *NutanixMachineProviderStatus { - if in == nil { - return nil - } - out := new(NutanixMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NutanixMachineProviderStatus) 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 *NutanixResourceIdentifier) DeepCopyInto(out *NutanixResourceIdentifier) { - *out = *in - if in.UUID != nil { - in, out := &in.UUID, &out.UUID - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixResourceIdentifier. -func (in *NutanixResourceIdentifier) DeepCopy() *NutanixResourceIdentifier { - if in == nil { - return nil - } - out := new(NutanixResourceIdentifier) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixStorageResourceIdentifier) DeepCopyInto(out *NutanixStorageResourceIdentifier) { - *out = *in - if in.UUID != nil { - in, out := &in.UUID, &out.UUID - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixStorageResourceIdentifier. -func (in *NutanixStorageResourceIdentifier) DeepCopy() *NutanixStorageResourceIdentifier { - if in == nil { - return nil - } - out := new(NutanixStorageResourceIdentifier) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixVMDisk) DeepCopyInto(out *NutanixVMDisk) { - *out = *in - out.DiskSize = in.DiskSize.DeepCopy() - if in.DeviceProperties != nil { - in, out := &in.DeviceProperties, &out.DeviceProperties - *out = new(NutanixVMDiskDeviceProperties) - **out = **in - } - if in.StorageConfig != nil { - in, out := &in.StorageConfig, &out.StorageConfig - *out = new(NutanixVMStorageConfig) - (*in).DeepCopyInto(*out) - } - if in.DataSource != nil { - in, out := &in.DataSource, &out.DataSource - *out = new(NutanixResourceIdentifier) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixVMDisk. -func (in *NutanixVMDisk) DeepCopy() *NutanixVMDisk { - if in == nil { - return nil - } - out := new(NutanixVMDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixVMDiskDeviceProperties) DeepCopyInto(out *NutanixVMDiskDeviceProperties) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixVMDiskDeviceProperties. -func (in *NutanixVMDiskDeviceProperties) DeepCopy() *NutanixVMDiskDeviceProperties { - if in == nil { - return nil - } - out := new(NutanixVMDiskDeviceProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NutanixVMStorageConfig) DeepCopyInto(out *NutanixVMStorageConfig) { - *out = *in - if in.StorageContainer != nil { - in, out := &in.StorageContainer, &out.StorageContainer - *out = new(NutanixStorageResourceIdentifier) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NutanixVMStorageConfig. -func (in *NutanixVMStorageConfig) DeepCopy() *NutanixVMStorageConfig { - if in == nil { - return nil - } - out := new(NutanixVMStorageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftMachineV1Beta1MachineTemplate) DeepCopyInto(out *OpenShiftMachineV1Beta1MachineTemplate) { - *out = *in - if in.FailureDomains != nil { - in, out := &in.FailureDomains, &out.FailureDomains - *out = new(FailureDomains) - (*in).DeepCopyInto(*out) - } - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftMachineV1Beta1MachineTemplate. -func (in *OpenShiftMachineV1Beta1MachineTemplate) DeepCopy() *OpenShiftMachineV1Beta1MachineTemplate { - if in == nil { - return nil - } - out := new(OpenShiftMachineV1Beta1MachineTemplate) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenStackFailureDomain) DeepCopyInto(out *OpenStackFailureDomain) { - *out = *in - if in.RootVolume != nil { - in, out := &in.RootVolume, &out.RootVolume - *out = new(RootVolume) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackFailureDomain. -func (in *OpenStackFailureDomain) DeepCopy() *OpenStackFailureDomain { - if in == nil { - return nil - } - out := new(OpenStackFailureDomain) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PowerVSMachineProviderConfig) DeepCopyInto(out *PowerVSMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(PowerVSSecretReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(PowerVSSecretReference) - **out = **in - } - in.ServiceInstance.DeepCopyInto(&out.ServiceInstance) - in.Image.DeepCopyInto(&out.Image) - in.Network.DeepCopyInto(&out.Network) - out.Processors = in.Processors - if in.LoadBalancers != nil { - in, out := &in.LoadBalancers, &out.LoadBalancers - *out = make([]LoadBalancerReference, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderConfig. -func (in *PowerVSMachineProviderConfig) DeepCopy() *PowerVSMachineProviderConfig { - if in == nil { - return nil - } - out := new(PowerVSMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PowerVSMachineProviderConfig) 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 *PowerVSMachineProviderStatus) DeepCopyInto(out *PowerVSMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID - *out = new(string) - **out = **in - } - if in.ServiceInstanceID != nil { - in, out := &in.ServiceInstanceID, &out.ServiceInstanceID - *out = new(string) - **out = **in - } - if in.InstanceState != nil { - in, out := &in.InstanceState, &out.InstanceState - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSMachineProviderStatus. -func (in *PowerVSMachineProviderStatus) DeepCopy() *PowerVSMachineProviderStatus { - if in == nil { - return nil - } - out := new(PowerVSMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PowerVSMachineProviderStatus) 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 *PowerVSResource) DeepCopyInto(out *PowerVSResource) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = new(string) - **out = **in - } - if in.RegEx != nil { - in, out := &in.RegEx, &out.RegEx - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSResource. -func (in *PowerVSResource) DeepCopy() *PowerVSResource { - if in == nil { - return nil - } - out := new(PowerVSResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PowerVSSecretReference) DeepCopyInto(out *PowerVSSecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PowerVSSecretReference. -func (in *PowerVSSecretReference) DeepCopy() *PowerVSSecretReference { - if in == nil { - return nil - } - out := new(PowerVSSecretReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RootVolume) DeepCopyInto(out *RootVolume) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootVolume. -func (in *RootVolume) DeepCopy() *RootVolume { - if in == nil { - return nil - } - out := new(RootVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SystemDiskProperties) DeepCopyInto(out *SystemDiskProperties) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SystemDiskProperties. -func (in *SystemDiskProperties) DeepCopy() *SystemDiskProperties { - if in == nil { - return nil - } - out := new(SystemDiskProperties) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Tag) DeepCopyInto(out *Tag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Tag. -func (in *Tag) DeepCopy() *Tag { - if in == nil { - return nil - } - out := new(Tag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereFailureDomain) DeepCopyInto(out *VSphereFailureDomain) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereFailureDomain. -func (in *VSphereFailureDomain) DeepCopy() *VSphereFailureDomain { - if in == nil { - return nil - } - out := new(VSphereFailureDomain) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machine/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index b001170fa..000000000 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,52 +0,0 @@ -controlplanemachinesets.machine.openshift.io: - Annotations: - exclude.release.openshift.io/internal-openshift-hosted: "true" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1112 - CRDName: controlplanemachinesets.machine.openshift.io - Capability: MachineAPI - Category: "" - FeatureGates: - - MachineAPIMigration - FilenameOperatorName: control-plane-machine-set - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: machine.openshift.io - HasStatus: true - KindName: ControlPlaneMachineSet - Labels: {} - PluralName: controlplanemachinesets - PrinterColumns: - - description: Desired Replicas - jsonPath: .spec.replicas - name: Desired - type: integer - - description: Current Replicas - jsonPath: .status.replicas - name: Current - type: integer - - description: Ready Replicas - jsonPath: .status.readyReplicas - name: Ready - type: integer - - description: Updated Replicas - jsonPath: .status.updatedReplicas - name: Updated - type: integer - - description: Observed number of unavailable replicas - jsonPath: .status.unavailableReplicas - name: Unavailable - type: integer - - description: ControlPlaneMachineSet state - jsonPath: .spec.state - name: State - type: string - - description: ControlPlaneMachineSet age - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.model_name.go deleted file mode 100644 index 11bf44a90..000000000 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.model_name.go +++ /dev/null @@ -1,211 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSFailureDomain) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AWSFailureDomain" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSFailureDomainPlacement) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AWSFailureDomainPlacement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSResourceFilter) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AWSResourceFilter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSResourceReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AWSResourceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlibabaCloudMachineProviderConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AlibabaCloudMachineProviderConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlibabaCloudMachineProviderConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AlibabaCloudMachineProviderConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlibabaCloudMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AlibabaCloudMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlibabaResourceReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AlibabaResourceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureFailureDomain) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.AzureFailureDomain" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BandwidthProperties) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.BandwidthProperties" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSet) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSet" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetTemplate) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetTemplate" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ControlPlaneMachineSetTemplateObjectMeta) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.ControlPlaneMachineSetTemplateObjectMeta" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DataDiskProperties) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.DataDiskProperties" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FailureDomains) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.FailureDomains" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPFailureDomain) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.GCPFailureDomain" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LoadBalancerReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.LoadBalancerReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixCategory) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixCategory" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixFailureDomainReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixFailureDomainReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixGPU) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixGPU" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixMachineProviderConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixMachineProviderConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixResourceIdentifier) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixResourceIdentifier" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixStorageResourceIdentifier) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixStorageResourceIdentifier" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixVMDisk) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixVMDisk" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixVMDiskDeviceProperties) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixVMDiskDeviceProperties" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NutanixVMStorageConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.NutanixVMStorageConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftMachineV1Beta1MachineTemplate) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.OpenShiftMachineV1Beta1MachineTemplate" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenStackFailureDomain) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.OpenStackFailureDomain" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PowerVSMachineProviderConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.PowerVSMachineProviderConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PowerVSMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.PowerVSMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PowerVSResource) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.PowerVSResource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PowerVSSecretReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.PowerVSSecretReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RootVolume) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.RootVolume" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SystemDiskProperties) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.SystemDiskProperties" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Tag) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.Tag" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VSphereFailureDomain) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1.VSphereFailureDomain" -} diff --git a/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 2e35df7e2..000000000 --- a/vendor/github.com/openshift/api/machine/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,490 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AlibabaCloudMachineProviderConfig = map[string]string{ - "": "AlibabaCloudMachineProviderConfig is the Schema for the alibabacloudmachineproviderconfig API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "instanceType": "The instance type of the instance.", - "vpcId": "The ID of the vpc", - "regionId": "The ID of the region in which to create the instance. You can call the DescribeRegions operation to query the most recent region list.", - "zoneId": "The ID of the zone in which to create the instance. You can call the DescribeZones operation to query the most recent region list.", - "imageId": "The ID of the image used to create the instance.", - "dataDisk": "DataDisks holds information regarding the extra disks attached to the instance", - "securityGroups": "securityGroups is a list of security group references to assign to the instance. A reference holds either the security group ID, the resource name, or the required tags to search. When more than one security group is returned for a tag search, all the groups are associated with the instance up to the maximum number of security groups to which an instance can belong. For more information, see the \"Security group limits\" section in Limits. https://www.alibabacloud.com/help/en/doc-detail/25412.htm", - "bandwidth": "bandwidth describes the internet bandwidth strategy for the instance", - "systemDisk": "systemDisk holds the properties regarding the system disk for the instance", - "vSwitch": "vSwitch is a reference to the vswitch to use for this instance. A reference holds either the vSwitch ID, the resource name, or the required tags to search. When more than one vSwitch is returned for a tag search, only the first vSwitch returned will be used. This parameter is required when you create an instance of the VPC type. You can call the DescribeVSwitches operation to query the created vSwitches.", - "ramRoleName": "ramRoleName is the name of the instance Resource Access Management (RAM) role. This allows the instance to perform API calls as this specified RAM role.", - "resourceGroup": "resourceGroup references the resource group to which to assign the instance. A reference holds either the resource group ID, the resource name, or the required tags to search. When more than one resource group are returned for a search, an error will be produced and the Machine will not be created. Resource Groups do not support searching by tags.", - "tenancy": "tenancy specifies whether to create the instance on a dedicated host. Valid values:\n\ndefault: creates the instance on a non-dedicated host. host: creates the instance on a dedicated host. If you do not specify the DedicatedHostID parameter, Alibaba Cloud automatically selects a dedicated host for the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `default`.", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "credentialsSecret is a reference to the secret with alibabacloud credentials. Otherwise, defaults to permissions provided by attached RAM role where the actuator is running.", - "tag": "Tags are the set of metadata to add to an instance.", -} - -func (AlibabaCloudMachineProviderConfig) SwaggerDoc() map[string]string { - return map_AlibabaCloudMachineProviderConfig -} - -var map_AlibabaCloudMachineProviderConfigList = map[string]string{ - "": "AlibabaCloudMachineProviderConfigList contains a list of AlibabaCloudMachineProviderConfig Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (AlibabaCloudMachineProviderConfigList) SwaggerDoc() map[string]string { - return map_AlibabaCloudMachineProviderConfigList -} - -var map_AlibabaCloudMachineProviderStatus = map[string]string{ - "": "AlibabaCloudMachineProviderStatus is the Schema for the alibabacloudmachineproviderconfig API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "instanceId": "instanceId is the instance ID of the machine created in alibabacloud", - "instanceState": "instanceState is the state of the alibabacloud instance for this machine", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", -} - -func (AlibabaCloudMachineProviderStatus) SwaggerDoc() map[string]string { - return map_AlibabaCloudMachineProviderStatus -} - -var map_AlibabaResourceReference = map[string]string{ - "": "ResourceTagReference is a reference to a specific AlibabaCloud resource by ID, or tags. Only one of ID or Tags may be specified. Specifying more than one will result in a validation error.", - "type": "type identifies the resource reference type for this entry.", - "id": "id of resource", - "name": "name of the resource", - "tags": "tags is a set of metadata based upon ECS object tags used to identify a resource. For details about usage when multiple resources are found, please see the owning parent field documentation.", -} - -func (AlibabaResourceReference) SwaggerDoc() map[string]string { - return map_AlibabaResourceReference -} - -var map_BandwidthProperties = map[string]string{ - "": "Bandwidth describes the bandwidth strategy for the network of the instance", - "internetMaxBandwidthIn": "internetMaxBandwidthIn is the maximum inbound public bandwidth. Unit: Mbit/s. Valid values: When the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter are 1 to 10. Currently the default is `10` when outbound bandwidth is less than or equal to 10 Mbit/s. When the purchased outbound public bandwidth is greater than 10, the valid values are 1 to the InternetMaxBandwidthOut value. Currently the default is the value used for `InternetMaxBandwidthOut` when outbound public bandwidth is greater than 10.", - "internetMaxBandwidthOut": "internetMaxBandwidthOut is the maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100. When a value greater than 0 is used then a public IP address is assigned to the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `0`", -} - -func (BandwidthProperties) SwaggerDoc() map[string]string { - return map_BandwidthProperties -} - -var map_DataDiskProperties = map[string]string{ - "": "DataDisk contains the information regarding the datadisk attached to an instance", - "Name": "Name is the name of data disk N. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-).\n\nEmpty value means the platform chooses a default, which is subject to change over time. Currently the default is `\"\"`.", - "SnapshotID": "SnapshotID is the ID of the snapshot used to create data disk N. Valid values of N: 1 to 16.\n\nWhen the DataDisk.N.SnapshotID parameter is specified, the DataDisk.N.Size parameter is ignored. The data disk is created based on the size of the specified snapshot. Use snapshots created after July 15, 2013. Otherwise, an error is returned and your request is rejected.", - "Size": "Size of the data disk N. Valid values of N: 1 to 16. Unit: GiB. Valid values:\n\nValid values when DataDisk.N.Category is set to cloud_efficiency: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud_ssd: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud_essd: 20 to 32768 Valid values when DataDisk.N.Category is set to cloud: 5 to 2000 The value of this parameter must be greater than or equal to the size of the snapshot specified by the SnapshotID parameter.", - "DiskEncryption": "DiskEncryption specifies whether to encrypt data disk N.\n\nEmpty value means the platform chooses a default, which is subject to change over time. Currently the default is `disabled`.", - "PerformanceLevel": "PerformanceLevel is the performance level of the ESSD used as as data disk N. The N value must be the same as that in DataDisk.N.Category when DataDisk.N.Category is set to cloud_essd. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `PL1`. Valid values:\n\nPL0: A single ESSD can deliver up to 10,000 random read/write IOPS. PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. For more information about ESSD performance levels, see ESSDs.", - "Category": "Category describes the type of data disk N. Valid values: cloud_efficiency: ultra disk cloud_ssd: standard SSD cloud_essd: ESSD cloud: basic disk Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. Currently for other instances, the default is `cloud_efficiency`.", - "KMSKeyID": "KMSKeyID is the ID of the Key Management Service (KMS) key to be used by data disk N. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `\"\"` which is interpreted as do not use KMSKey encryption.", - "DiskPreservation": "DiskPreservation specifies whether to release data disk N along with the instance. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently the default is `DeleteWithInstance`", -} - -func (DataDiskProperties) SwaggerDoc() map[string]string { - return map_DataDiskProperties -} - -var map_SystemDiskProperties = map[string]string{ - "": "SystemDiskProperties contains the information regarding the system disk including performance, size, name, and category", - "category": "category is the category of the system disk. Valid values: cloud_essd: ESSD. When the parameter is set to this value, you can use the SystemDisk.PerformanceLevel parameter to specify the performance level of the disk. cloud_efficiency: ultra disk. cloud_ssd: standard SSD. cloud: basic disk. Empty value means no opinion and the platform chooses the a default, which is subject to change over time. Currently for non-I/O optimized instances of retired instance types, the default is `cloud`. Currently for other instances, the default is `cloud_efficiency`.", - "performanceLevel": "performanceLevel is the performance level of the ESSD used as the system disk. Valid values:\n\nPL0: A single ESSD can deliver up to 10,000 random read/write IOPS. PL1: A single ESSD can deliver up to 50,000 random read/write IOPS. PL2: A single ESSD can deliver up to 100,000 random read/write IOPS. PL3: A single ESSD can deliver up to 1,000,000 random read/write IOPS. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `PL1`. For more information about ESSD performance levels, see ESSDs.", - "name": "name is the name of the system disk. If the name is specified the name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), and hyphens (-). Empty value means the platform chooses a default, which is subject to change over time. Currently the default is `\"\"`.", - "size": "size is the size of the system disk. Unit: GiB. Valid values: 20 to 500. The value must be at least 20 and greater than or equal to the size of the image. Empty value means the platform chooses a default, which is subject to change over time. Currently the default is `40` or the size of the image depending on whichever is greater.", -} - -func (SystemDiskProperties) SwaggerDoc() map[string]string { - return map_SystemDiskProperties -} - -var map_Tag = map[string]string{ - "": "Tag The tags of ECS Instance", - "Key": "Key is the name of the key pair", - "Value": "Value is the value or data of the key pair", -} - -func (Tag) SwaggerDoc() map[string]string { - return map_Tag -} - -var map_AWSResourceFilter = map[string]string{ - "": "AWSResourceFilter is a filter used to identify an AWS resource", - "name": "name of the filter. Filter names are case-sensitive.", - "values": "values includes one or more filter values. Filter values are case-sensitive.", -} - -func (AWSResourceFilter) SwaggerDoc() map[string]string { - return map_AWSResourceFilter -} - -var map_AWSResourceReference = map[string]string{ - "": "AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. Only one of ID, ARN or Filters may be specified. Specifying more than one will result in a validation error.", - "type": "type determines how the reference will fetch the AWS resource.", - "id": "id of resource.", - "arn": "arn of resource.", - "filters": "filters is a set of filters used to identify a resource.", -} - -func (AWSResourceReference) SwaggerDoc() map[string]string { - return map_AWSResourceReference -} - -var map_AWSFailureDomain = map[string]string{ - "": "AWSFailureDomain configures failure domain information for the AWS platform.", - "subnet": "subnet is a reference to the subnet to use for this instance.", - "placement": "placement configures the placement information for this instance.", -} - -func (AWSFailureDomain) SwaggerDoc() map[string]string { - return map_AWSFailureDomain -} - -var map_AWSFailureDomainPlacement = map[string]string{ - "": "AWSFailureDomainPlacement configures the placement information for the AWSFailureDomain.", - "availabilityZone": "availabilityZone is the availability zone of the instance.", -} - -func (AWSFailureDomainPlacement) SwaggerDoc() map[string]string { - return map_AWSFailureDomainPlacement -} - -var map_AzureFailureDomain = map[string]string{ - "": "AzureFailureDomain configures failure domain information for the Azure platform.", - "zone": "Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone.", - "subnet": "subnet is the name of the network subnet in which the VM will be created. When omitted, the subnet value from the machine providerSpec template will be used.", -} - -func (AzureFailureDomain) SwaggerDoc() map[string]string { - return map_AzureFailureDomain -} - -var map_ControlPlaneMachineSet = map[string]string{ - "": "ControlPlaneMachineSet ensures that a specified number of control plane machine replicas are running at any given time. Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ControlPlaneMachineSet) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSet -} - -var map_ControlPlaneMachineSetList = map[string]string{ - "": "ControlPlaneMachineSetList contains a list of ControlPlaneMachineSet Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ControlPlaneMachineSetList) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetList -} - -var map_ControlPlaneMachineSetSpec = map[string]string{ - "": "ControlPlaneMachineSet represents the configuration of the ControlPlaneMachineSet.", - "machineNamePrefix": "machineNamePrefix is the prefix used when creating machine names. Each machine name will consist of this prefix, followed by a randomly generated string of 5 characters, and the index of the machine. It must be a lowercase RFC 1123 subdomain, consisting of lowercase alphanumeric characters, hyphens ('-'), and periods ('.'). Each block, separated by periods, must start and end with an alphanumeric character. Hyphens are not allowed at the start or end of a block, and consecutive periods are not permitted. The prefix must be between 1 and 245 characters in length. For example, if machineNamePrefix is set to 'control-plane', and three machines are created, their names might be: control-plane-abcde-0, control-plane-fghij-1, control-plane-klmno-2", - "state": "state defines whether the ControlPlaneMachineSet is Active or Inactive. When Inactive, the ControlPlaneMachineSet will not take any action on the state of the Machines within the cluster. When Active, the ControlPlaneMachineSet will reconcile the Machines and will update the Machines as necessary. Once Active, a ControlPlaneMachineSet cannot be made Inactive. To prevent further action please remove the ControlPlaneMachineSet.", - "replicas": "replicas defines how many Control Plane Machines should be created by this ControlPlaneMachineSet. This field is immutable and cannot be changed after cluster installation. The ControlPlaneMachineSet only operates with 3 or 5 node control planes, 3 and 5 are the only valid values for this field.", - "strategy": "strategy defines how the ControlPlaneMachineSet will update Machines when it detects a change to the ProviderSpec.", - "selector": "Label selector for Machines. Existing Machines selected by this selector will be the ones affected by this ControlPlaneMachineSet. It must match the template's labels. This field is considered immutable after creation of the resource.", - "template": "template describes the Control Plane Machines that will be created by this ControlPlaneMachineSet.", -} - -func (ControlPlaneMachineSetSpec) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetSpec -} - -var map_ControlPlaneMachineSetStatus = map[string]string{ - "": "ControlPlaneMachineSetStatus represents the status of the ControlPlaneMachineSet CRD.", - "conditions": "conditions represents the observations of the ControlPlaneMachineSet's current state. Known .status.conditions.type are: Available, Degraded and Progressing.", - "observedGeneration": "observedGeneration is the most recent generation observed for this ControlPlaneMachineSet. It corresponds to the ControlPlaneMachineSets's generation, which is updated on mutation by the API Server.", - "replicas": "replicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller. Note that during update operations this value may differ from the desired replica count.", - "readyReplicas": "readyReplicas is the number of Control Plane Machines created by the ControlPlaneMachineSet controller which are ready. Note that this value may be higher than the desired number of replicas while rolling updates are in-progress.", - "updatedReplicas": "updatedReplicas is the number of non-terminated Control Plane Machines created by the ControlPlaneMachineSet controller that have the desired provider spec and are ready. This value is set to 0 when a change is detected to the desired spec. When the update strategy is RollingUpdate, this will also coincide with starting the process of updating the Machines. When the update strategy is OnDelete, this value will remain at 0 until a user deletes an existing replica and its replacement has become ready.", - "unavailableReplicas": "unavailableReplicas is the number of Control Plane Machines that are still required before the ControlPlaneMachineSet reaches the desired available capacity. When this value is non-zero, the number of ReadyReplicas is less than the desired Replicas.", -} - -func (ControlPlaneMachineSetStatus) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetStatus -} - -var map_ControlPlaneMachineSetStrategy = map[string]string{ - "": "ControlPlaneMachineSetStrategy defines the strategy for applying updates to the Control Plane Machines managed by the ControlPlaneMachineSet.", - "type": "type defines the type of update strategy that should be used when updating Machines owned by the ControlPlaneMachineSet. Valid values are \"RollingUpdate\" and \"OnDelete\". The current default value is \"RollingUpdate\".", -} - -func (ControlPlaneMachineSetStrategy) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetStrategy -} - -var map_ControlPlaneMachineSetTemplate = map[string]string{ - "": "ControlPlaneMachineSetTemplate is a template used by the ControlPlaneMachineSet to create the Machines that it will manage in the future. ", - "machineType": "machineType determines the type of Machines that should be managed by the ControlPlaneMachineSet. Currently, the only valid value is machines_v1beta1_machine_openshift_io.", - "machines_v1beta1_machine_openshift_io": "OpenShiftMachineV1Beta1Machine defines the template for creating Machines from the v1beta1.machine.openshift.io API group.", -} - -func (ControlPlaneMachineSetTemplate) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetTemplate -} - -var map_ControlPlaneMachineSetTemplateObjectMeta = map[string]string{ - "": "ControlPlaneMachineSetTemplateObjectMeta is a subset of the metav1.ObjectMeta struct. It allows users to specify labels and annotations that will be copied onto Machines created from this template.", - "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels. This field must contain both the 'machine.openshift.io/cluster-api-machine-role' and 'machine.openshift.io/cluster-api-machine-type' labels, both with a value of 'master'. It must also contain a label with the key 'machine.openshift.io/cluster-api-cluster'.", - "annotations": "annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", -} - -func (ControlPlaneMachineSetTemplateObjectMeta) SwaggerDoc() map[string]string { - return map_ControlPlaneMachineSetTemplateObjectMeta -} - -var map_FailureDomains = map[string]string{ - "": "FailureDomain represents the different configurations required to spread Machines across failure domains on different platforms.", - "platform": "platform identifies the platform for which the FailureDomain represents. Currently supported values are AWS, Azure, GCP, OpenStack, VSphere and Nutanix.", - "aws": "aws configures failure domain information for the AWS platform.", - "azure": "azure configures failure domain information for the Azure platform.", - "gcp": "gcp configures failure domain information for the GCP platform.", - "vsphere": "vsphere configures failure domain information for the VSphere platform.", - "openstack": "openstack configures failure domain information for the OpenStack platform.", - "nutanix": "nutanix configures failure domain information for the Nutanix platform.", -} - -func (FailureDomains) SwaggerDoc() map[string]string { - return map_FailureDomains -} - -var map_GCPFailureDomain = map[string]string{ - "": "GCPFailureDomain configures failure domain information for the GCP platform", - "zone": "zone is the zone in which the GCP machine provider will create the VM.", -} - -func (GCPFailureDomain) SwaggerDoc() map[string]string { - return map_GCPFailureDomain -} - -var map_NutanixFailureDomainReference = map[string]string{ - "": "NutanixFailureDomainReference refers to the failure domain of the Nutanix platform.", - "name": "name of the failure domain in which the nutanix machine provider will create the VM. Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource.", -} - -func (NutanixFailureDomainReference) SwaggerDoc() map[string]string { - return map_NutanixFailureDomainReference -} - -var map_OpenShiftMachineV1Beta1MachineTemplate = map[string]string{ - "": "OpenShiftMachineV1Beta1MachineTemplate is a template for the ControlPlaneMachineSet to create Machines from the v1beta1.machine.openshift.io API group.", - "failureDomains": "failureDomains is the list of failure domains (sometimes called availability zones) in which the ControlPlaneMachineSet should balance the Control Plane Machines. This will be merged into the ProviderSpec given in the template. This field is optional on platforms that do not require placement information.", - "metadata": "ObjectMeta is the standard object metadata More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata Labels are required to match the ControlPlaneMachineSet selector.", - "spec": "spec contains the desired configuration of the Control Plane Machines. The ProviderSpec within contains platform specific details for creating the Control Plane Machines. The ProviderSe should be complete apart from the platform specific failure domain field. This will be overridden when the Machines are created based on the FailureDomains field.", -} - -func (OpenShiftMachineV1Beta1MachineTemplate) SwaggerDoc() map[string]string { - return map_OpenShiftMachineV1Beta1MachineTemplate -} - -var map_OpenStackFailureDomain = map[string]string{ - "": "OpenStackFailureDomain configures failure domain information for the OpenStack platform.", - "availabilityZone": "availabilityZone is the nova availability zone in which the OpenStack machine provider will create the VM. If not specified, the VM will be created in the default availability zone specified in the nova configuration. Availability zone names must NOT contain : since it is used by admin users to specify hosts where instances are launched in server creation. Also, it must not contain spaces otherwise it will lead to node that belongs to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information. The maximum length of availability zone name is 63 as per labels limits.", - "rootVolume": "rootVolume contains settings that will be used by the OpenStack machine provider to create the root volume attached to the VM. If not specified, no root volume will be created.", -} - -func (OpenStackFailureDomain) SwaggerDoc() map[string]string { - return map_OpenStackFailureDomain -} - -var map_RootVolume = map[string]string{ - "": "RootVolume represents the volume metadata to boot from. The original RootVolume struct is defined in the v1alpha1 but it's not best practice to use it directly here so we define a new one that should stay in sync with the original one.", - "availabilityZone": "availabilityZone specifies the Cinder availability zone where the root volume will be created. If not specifified, the root volume will be created in the availability zone specified by the volume type in the cinder configuration. If the volume type (configured in the OpenStack cluster) does not specify an availability zone, the root volume will be created in the default availability zone specified in the cinder configuration. See https://docs.openstack.org/cinder/latest/admin/availability-zone-type.html for more details. If the OpenStack cluster is deployed with the cross_az_attach configuration option set to false, the root volume will have to be in the same availability zone as the VM (defined by OpenStackFailureDomain.AvailabilityZone). Availability zone names must NOT contain spaces otherwise it will lead to volume that belongs to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information. The maximum length of availability zone name is 63 as per labels limits.", - "volumeType": "volumeType specifies the type of the root volume that will be provisioned. The maximum length of a volume type name is 255 characters, as per the OpenStack limit. ", -} - -func (RootVolume) SwaggerDoc() map[string]string { - return map_RootVolume -} - -var map_VSphereFailureDomain = map[string]string{ - "": "VSphereFailureDomain configures failure domain information for the vSphere platform", - "name": "name of the failure domain in which the vSphere machine provider will create the VM. Failure domains are defined in a cluster's config.openshift.io/Infrastructure resource. When balancing machines across failure domains, the control plane machine set will inject configuration from the Infrastructure resource into the machine providerSpec to allocate the machine to a failure domain.", -} - -func (VSphereFailureDomain) SwaggerDoc() map[string]string { - return map_VSphereFailureDomain -} - -var map_NutanixCategory = map[string]string{ - "": "NutanixCategory identifies a pair of prism category key and value", - "key": "key is the prism category key name", - "value": "value is the prism category value associated with the key", -} - -func (NutanixCategory) SwaggerDoc() map[string]string { - return map_NutanixCategory -} - -var map_NutanixGPU = map[string]string{ - "": "NutanixGPU holds the identity of a Nutanix GPU resource in the Prism Central", - "type": "type is the identifier type of the GPU device. Valid values are Name and DeviceID.", - "deviceID": "deviceID is the GPU device ID with the integer value.", - "name": "name is the GPU device name", -} - -func (NutanixGPU) SwaggerDoc() map[string]string { - return map_NutanixGPU -} - -var map_NutanixMachineProviderConfig = map[string]string{ - "": "NutanixMachineProviderConfig is the Schema for the nutanixmachineproviderconfigs API Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "cluster": "cluster is to identify the cluster (the Prism Element under management of the Prism Central), in which the Machine's VM will be created. The cluster identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", - "image": "image is to identify the rhcos image uploaded to the Prism Central (PC) The image identifier (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", - "subnets": "subnets holds a list of identifiers (one or more) of the cluster's network subnets for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be obtained from the Prism Central console or using the prism_central API.", - "vcpusPerSocket": "vcpusPerSocket is the number of vCPUs per socket of the VM", - "vcpuSockets": "vcpuSockets is the number of vCPU sockets of the VM", - "memorySize": "memorySize is the memory size (in Quantity format) of the VM The minimum memorySize is 2Gi bytes", - "systemDiskSize": "systemDiskSize is size (in Quantity format) of the system disk of the VM The minimum systemDiskSize is 20Gi bytes", - "bootType": "bootType indicates the boot type (Legacy, UEFI or SecureBoot) the Machine's VM uses to boot. If this field is empty or omitted, the VM will use the default boot type \"Legacy\" to boot. \"SecureBoot\" depends on \"UEFI\" boot, i.e., enabling \"SecureBoot\" means that \"UEFI\" boot is also enabled.", - "project": "project optionally identifies a Prism project for the Machine's VM to associate with.", - "categories": "categories optionally adds one or more prism categories (each with key and value) for the Machine's VM to associate with. All the category key and value pairs specified must already exist in the prism central.", - "gpus": "gpus is a list of GPU devices to attach to the machine's VM. The GPU devices should already exist in Prism Central and associated with one of the Prism Element's hosts and available for the VM to attach (in \"UNUSED\" status).", - "dataDisks": "dataDisks holds information of the data disks to attach to the Machine's VM", - "userDataSecret": "userDataSecret is a local reference to a secret that contains the UserData to apply to the VM", - "credentialsSecret": "credentialsSecret is a local reference to a secret that contains the credentials data to access Nutanix PC client", - "failureDomain": "failureDomain refers to the name of the FailureDomain with which this Machine is associated. If this is configured, the Nutanix machine controller will use the prism_central endpoint and credentials defined in the referenced FailureDomain to communicate to the prism_central. It will also verify that the 'cluster' and subnets' configuration in the NutanixMachineProviderConfig is consistent with that in the referenced failureDomain.", -} - -func (NutanixMachineProviderConfig) SwaggerDoc() map[string]string { - return map_NutanixMachineProviderConfig -} - -var map_NutanixMachineProviderStatus = map[string]string{ - "": "NutanixMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains nutanix-specific status information. Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", - "vmUUID": "vmUUID is the Machine associated VM's UUID The field is missing before the VM is created. Once the VM is created, the field is filled with the VM's UUID and it will not change. The vmUUID is used to find the VM when updating the Machine status, and to delete the VM when the Machine is deleted.", -} - -func (NutanixMachineProviderStatus) SwaggerDoc() map[string]string { - return map_NutanixMachineProviderStatus -} - -var map_NutanixResourceIdentifier = map[string]string{ - "": "NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.)", - "type": "type is the identifier type to use for this resource.", - "uuid": "uuid is the UUID of the resource in the PC.", - "name": "name is the resource name in the PC", -} - -func (NutanixResourceIdentifier) SwaggerDoc() map[string]string { - return map_NutanixResourceIdentifier -} - -var map_NutanixStorageResourceIdentifier = map[string]string{ - "": "NutanixStorageResourceIdentifier holds the identity of a Nutanix storage resource (storage_container, etc.)", - "type": "type is the identifier type to use for this resource. The valid value is \"uuid\".", - "uuid": "uuid is the UUID of the storage resource in the PC.", -} - -func (NutanixStorageResourceIdentifier) SwaggerDoc() map[string]string { - return map_NutanixStorageResourceIdentifier -} - -var map_NutanixVMDisk = map[string]string{ - "": "NutanixDataDisk specifies the VM data disk configuration parameters.", - "diskSize": "diskSize is size (in Quantity format) of the disk attached to the VM. See https://pkg.go.dev/k8s.io/apimachinery/pkg/api/resource#Format for the Quantity format and example documentation. The minimum diskSize is 1GB.", - "deviceProperties": "deviceProperties are the properties of the disk device.", - "storageConfig": "storageConfig are the storage configuration parameters of the VM disks.", - "dataSource": "dataSource refers to a data source image for the VM disk.", -} - -func (NutanixVMDisk) SwaggerDoc() map[string]string { - return map_NutanixVMDisk -} - -var map_NutanixVMDiskDeviceProperties = map[string]string{ - "": "NutanixVMDiskDeviceProperties specifies the disk device properties.", - "deviceType": "deviceType specifies the disk device type. The valid values are \"Disk\" and \"CDRom\", and the default is \"Disk\".", - "adapterType": "adapterType is the adapter type of the disk address. If the deviceType is \"Disk\", the valid adapterType can be \"SCSI\", \"IDE\", \"PCI\", \"SATA\" or \"SPAPR\". If the deviceType is \"CDRom\", the valid adapterType can be \"IDE\" or \"SATA\".", - "deviceIndex": "deviceIndex is the index of the disk address. The valid values are non-negative integers, with the default value 0. For a Machine VM, the deviceIndex for the disks with the same deviceType.adapterType combination should start from 0 and increase consecutively afterwards. Note that for each Machine VM, the Disk.SCSI.0 and CDRom.IDE.0 are reserved to be used by the VM's system. So for dataDisks of Disk.SCSI and CDRom.IDE, the deviceIndex should start from 1.", -} - -func (NutanixVMDiskDeviceProperties) SwaggerDoc() map[string]string { - return map_NutanixVMDiskDeviceProperties -} - -var map_NutanixVMStorageConfig = map[string]string{ - "": "NutanixVMStorageConfig specifies the storage configuration parameters for VM disks.", - "diskMode": "diskMode specifies the disk mode. The valid values are Standard and Flash, and the default is Standard.", - "storageContainer": "storageContainer refers to the storage_container used by the VM disk.", -} - -func (NutanixVMStorageConfig) SwaggerDoc() map[string]string { - return map_NutanixVMStorageConfig -} - -var map_LoadBalancerReference = map[string]string{ - "": "LoadBalancerReference is a reference to a load balancer on IBM Cloud virtual private cloud(VPC).", - "name": "name of the LoadBalancer in IBM Cloud VPC. The name should be between 1 and 63 characters long and may consist of lowercase alphanumeric characters and hyphens only. The value must not end with a hyphen. It is a reference to existing LoadBalancer created by openshift installer component.", - "type": "type of the LoadBalancer service supported by IBM Cloud VPC. Currently, only Application LoadBalancer is supported. More details about Application LoadBalancer https://cloud.ibm.com/docs/vpc?topic=vpc-load-balancers-about&interface=ui Supported values are Application.", -} - -func (LoadBalancerReference) SwaggerDoc() map[string]string { - return map_LoadBalancerReference -} - -var map_PowerVSMachineProviderConfig = map[string]string{ - "": "PowerVSMachineProviderConfig is the type that will be embedded in a Machine.Spec.ProviderSpec field for a PowerVS virtual machine. It is used by the PowerVS machine actuator to create a single Machine.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance.", - "credentialsSecret": "credentialsSecret is a reference to the secret with IBM Cloud credentials.", - "serviceInstance": "serviceInstance is the reference to the Power VS service on which the server instance(VM) will be created. Power VS service is a container for all Power VS instances at a specific geographic region. serviceInstance can be created via IBM Cloud catalog or CLI. supported serviceInstance identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli. More detail about Power VS service instance. https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-creating-power-virtual-server", - "image": "image is to identify the rhcos image uploaded to IBM COS bucket which is used to create the instance. supported image identifier in PowerVSResource are Name and ID and that can be obtained from IBM Cloud UI or IBM Cloud cli.", - "network": "network is the reference to the Network to use for this instance. supported network identifier in PowerVSResource are Name, ID and RegEx and that can be obtained from IBM Cloud UI or IBM Cloud cli.", - "keyPairName": "keyPairName is the name of the KeyPair to use for SSH. The key pair will be exposed to the instance via the instance metadata service. On boot, the OS will copy the public keypair into the authorized keys for the core user.", - "systemType": "systemType is the System type used to host the instance. systemType determines the number of cores and memory that is available. Few of the supported SystemTypes are s922,e880,e980. e880 systemType available only in Dallas Datacenters. e980 systemType available in Datacenters except Dallas and Washington. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is s922 which is generally available.", - "processorType": "processorType is the VM instance processor type. It must be set to one of the following values: Dedicated, Capped or Shared. Dedicated: resources are allocated for a specific client, The hypervisor makes a 1:1 binding of a partition’s processor to a physical processor core. Shared: Shared among other clients. Capped: Shared, but resources do not expand beyond those that are requested, the amount of CPU time is Capped to the value specified for the entitlement. if the processorType is selected as Dedicated, then processors value cannot be fractional. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is Shared.", - "processors": "processors is the number of virtual processors in a virtual machine. when the processorType is selected as Dedicated the processors value cannot be fractional. maximum value for the Processors depends on the selected SystemType. when SystemType is set to e880 or e980 maximum Processors value is 143. when SystemType is set to s922 maximum Processors value is 15. minimum value for Processors depends on the selected ProcessorType. when ProcessorType is set as Shared or Capped, The minimum processors is 0.5. when ProcessorType is set as Dedicated, The minimum processors is 1. When omitted, this means that the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default is set based on the selected ProcessorType. when ProcessorType selected as Dedicated, the default is set to 1. when ProcessorType selected as Shared or Capped, the default is set to 0.5.", - "memoryGiB": "memoryGiB is the size of a virtual machine's memory, in GiB. maximum value for the MemoryGiB depends on the selected SystemType. when SystemType is set to e880 maximum MemoryGiB value is 7463 GiB. when SystemType is set to e980 maximum MemoryGiB value is 15307 GiB. when SystemType is set to s922 maximum MemoryGiB value is 942 GiB. The minimum memory is 32 GiB. When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 32.", - "loadBalancers": "loadBalancers is the set of load balancers to which the new control plane instance should be added once it is created.", -} - -func (PowerVSMachineProviderConfig) SwaggerDoc() map[string]string { - return map_PowerVSMachineProviderConfig -} - -var map_PowerVSMachineProviderStatus = map[string]string{ - "": "PowerVSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains PowerVS-specific status information.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", - "instanceId": "instanceId is the instance ID of the machine created in PowerVS instanceId uniquely identifies a Power VS server instance(VM) under a Power VS service. This will help in updating or deleting a VM in Power VS Cloud", - "serviceInstanceID": "serviceInstanceID is the reference to the Power VS ServiceInstance on which the machine instance will be created. serviceInstanceID uniquely identifies the Power VS service By setting serviceInstanceID it will become easy and efficient to fetch a server instance(VM) within Power VS Cloud.", - "instanceState": "instanceState is the state of the PowerVS instance for this machine Possible instance states are Active, Build, ShutOff, Reboot This is used to display additional information to user regarding instance current state", -} - -func (PowerVSMachineProviderStatus) SwaggerDoc() map[string]string { - return map_PowerVSMachineProviderStatus -} - -var map_PowerVSResource = map[string]string{ - "": "PowerVSResource is a reference to a specific PowerVS resource by ID, Name or RegEx Only one of ID, Name or RegEx may be specified. Specifying more than one will result in a validation error.", - "type": "type identifies the resource type for this entry. Valid values are ID, Name and RegEx", - "id": "id of resource", - "name": "name of resource", - "regex": "regex to find resource Regex contains the pattern to match to find a resource", -} - -func (PowerVSResource) SwaggerDoc() map[string]string { - return map_PowerVSResource -} - -var map_PowerVSSecretReference = map[string]string{ - "": "PowerVSSecretReference contains enough information to locate the referenced secret inside the same namespace.", - "name": "name of the secret.", -} - -func (PowerVSSecretReference) SwaggerDoc() map[string]string { - return map_PowerVSSecretReference -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/doc.go b/vendor/github.com/openshift/api/machine/v1alpha1/doc.go deleted file mode 100644 index 201889b65..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.machine.v1alpha1 - -// +kubebuilder:validation:Optional -// +groupName=machine.openshift.io -package v1alpha1 diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/register.go b/vendor/github.com/openshift/api/machine/v1alpha1/register.go deleted file mode 100644 index ef96c4720..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/register.go +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright 2022 Red Hat, Inc. - - 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 v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "machine.openshift.io" - -var ( - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go b/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go deleted file mode 100644 index 7b7f80810..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/types_openstack.go +++ /dev/null @@ -1,445 +0,0 @@ -/* -Copyright 2018 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 v1alpha1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OpenstackProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field -// for an OpenStack Instance. It is used by the Openstack machine actuator to create a single machine instance. -// +k8s:openapi-gen=true -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type OpenstackProviderSpec struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // The name of the secret containing the openstack credentials - CloudsSecret *corev1.SecretReference `json:"cloudsSecret"` - - // The name of the cloud to use from the clouds secret - CloudName string `json:"cloudName"` - - // The flavor reference for the flavor for your server instance. - Flavor string `json:"flavor"` - - // The name of the image to use for your server instance. - // If the RootVolume is specified, this will be ignored and use rootVolume directly. - Image string `json:"image"` - - // The ssh key to inject in the instance - KeyName string `json:"keyName,omitempty"` - - // The machine ssh username - // Deprecated: sshUserName is silently ignored. - SshUserName string `json:"sshUserName,omitempty"` - - // A networks object. Required parameter when there are multiple networks defined for the tenant. - // When you do not specify the networks parameter, the server attaches to the only network created for the current tenant. - Networks []NetworkParam `json:"networks,omitempty"` - - // Create and assign additional ports to instances - Ports []PortOpts `json:"ports,omitempty"` - - // floatingIP specifies a floating IP to be associated with the machine. - // Note that it is not safe to use this parameter in a MachineSet, as - // only one Machine may be assigned the same floating IP. - // - // Deprecated: floatingIP will be removed in a future release as it cannot be implemented correctly. - FloatingIP string `json:"floatingIP,omitempty"` - - // The availability zone from which to launch the server. - AvailabilityZone string `json:"availabilityZone,omitempty"` - - // The names of the security groups to assign to the instance - SecurityGroups []SecurityGroupParam `json:"securityGroups,omitempty"` - - // The name of the secret containing the user data (startup script in most cases) - UserDataSecret *corev1.SecretReference `json:"userDataSecret,omitempty"` - - // Whether the server instance is created on a trunk port or not. - Trunk bool `json:"trunk,omitempty"` - - // Machine tags - // Requires Nova api 2.52 minimum! - Tags []string `json:"tags,omitempty"` - - // Metadata mapping. Allows you to create a map of key value pairs to add to the server instance. - ServerMetadata map[string]string `json:"serverMetadata,omitempty"` - - // Config Drive support - ConfigDrive *bool `json:"configDrive,omitempty"` - - // The volume metadata to boot from - RootVolume *RootVolume `json:"rootVolume,omitempty"` - - // additionalBlockDevices is a list of specifications for additional block devices to attach to the server instance - // +optional - // +listType=map - // +listMapKey=name - AdditionalBlockDevices []AdditionalBlockDevice `json:"additionalBlockDevices,omitempty"` - - // The server group to assign the machine to. - ServerGroupID string `json:"serverGroupID,omitempty"` - - // The server group to assign the machine to. A server group with that - // name will be created if it does not exist. If both ServerGroupID and - // ServerGroupName are non-empty, they must refer to the same OpenStack - // resource. - ServerGroupName string `json:"serverGroupName,omitempty"` - - // The subnet that a set of machines will get ingress/egress traffic from - // Deprecated: primarySubnet is silently ignored. Use subnets instead. - PrimarySubnet string `json:"primarySubnet,omitempty"` -} - -type SecurityGroupParam struct { - // Security Group UUID - UUID string `json:"uuid,omitempty"` - // Security Group name - Name string `json:"name,omitempty"` - // Filters used to query security groups in openstack - Filter SecurityGroupFilter `json:"filter,omitempty"` -} - -type SecurityGroupFilter struct { - // id specifies the ID of a security group to use. If set, id will not - // be validated before use. An invalid id will result in failure to - // create a server with an appropriate error message. - ID string `json:"id,omitempty"` - // name filters security groups by name. - Name string `json:"name,omitempty"` - // description filters security groups by description. - Description string `json:"description,omitempty"` - // tenantId filters security groups by tenant ID. - // Deprecated: use projectId instead. tenantId will be ignored if projectId is set. - TenantID string `json:"tenantId,omitempty"` - // projectId filters security groups by project ID. - ProjectID string `json:"projectId,omitempty"` - // tags filters by security groups containing all specified tags. - // Multiple tags are comma separated. - Tags string `json:"tags,omitempty"` - // tagsAny filters by security groups containing any specified tags. - // Multiple tags are comma separated. - TagsAny string `json:"tagsAny,omitempty"` - // notTags filters by security groups which don't match all specified tags. NOT (t1 AND t2...) - // Multiple tags are comma separated. - NotTags string `json:"notTags,omitempty"` - // notTagsAny filters by security groups which don't match any specified tags. NOT (t1 OR t2...) - // Multiple tags are comma separated. - NotTagsAny string `json:"notTagsAny,omitempty"` - - // Deprecated: limit is silently ignored. It has no replacement. - DeprecatedLimit int `json:"limit,omitempty"` - // Deprecated: marker is silently ignored. It has no replacement. - DeprecatedMarker string `json:"marker,omitempty"` - // Deprecated: sortKey is silently ignored. It has no replacement. - DeprecatedSortKey string `json:"sortKey,omitempty"` - // Deprecated: sortDir is silently ignored. It has no replacement. - DeprecatedSortDir string `json:"sortDir,omitempty"` -} - -type NetworkParam struct { - // The UUID of the network. Required if you omit the port attribute. - UUID string `json:"uuid,omitempty"` - // A fixed IPv4 address for the NIC. - // Deprecated: fixedIP is silently ignored. Use subnets instead. - FixedIp string `json:"fixedIp,omitempty"` - // Filters for optional network query - Filter Filter `json:"filter,omitempty"` - // Subnet within a network to use - Subnets []SubnetParam `json:"subnets,omitempty"` - // noAllowedAddressPairs disables creation of allowed address pairs for the network ports - NoAllowedAddressPairs bool `json:"noAllowedAddressPairs,omitempty"` - // portTags allows users to specify a list of tags to add to ports created in a given network - PortTags []string `json:"portTags,omitempty"` - // The virtual network interface card (vNIC) type that is bound to the - // neutron port. - VNICType string `json:"vnicType,omitempty"` - // A dictionary that enables the application running on the specified - // host to pass and receive virtual network interface (VIF) port-specific - // information to the plug-in. - Profile map[string]string `json:"profile,omitempty"` - // portSecurity optionally enables or disables security on ports managed by OpenStack - PortSecurity *bool `json:"portSecurity,omitempty"` -} - -type Filter struct { - // Deprecated: use NetworkParam.uuid instead. Ignored if NetworkParam.uuid is set. - ID string `json:"id,omitempty"` - // name filters networks by name. - Name string `json:"name,omitempty"` - // description filters networks by description. - Description string `json:"description,omitempty"` - // tenantId filters networks by tenant ID. - // Deprecated: use projectId instead. tenantId will be ignored if projectId is set. - TenantID string `json:"tenantId,omitempty"` - // projectId filters networks by project ID. - ProjectID string `json:"projectId,omitempty"` - // tags filters by networks containing all specified tags. - // Multiple tags are comma separated. - Tags string `json:"tags,omitempty"` - // tagsAny filters by networks containing any specified tags. - // Multiple tags are comma separated. - TagsAny string `json:"tagsAny,omitempty"` - // notTags filters by networks which don't match all specified tags. NOT (t1 AND t2...) - // Multiple tags are comma separated. - NotTags string `json:"notTags,omitempty"` - // notTagsAny filters by networks which don't match any specified tags. NOT (t1 OR t2...) - // Multiple tags are comma separated. - NotTagsAny string `json:"notTagsAny,omitempty"` - - // Deprecated: status is silently ignored. It has no replacement. - DeprecatedStatus string `json:"status,omitempty"` - // Deprecated: adminStateUp is silently ignored. It has no replacement. - DeprecatedAdminStateUp *bool `json:"adminStateUp,omitempty"` - // Deprecated: shared is silently ignored. It has no replacement. - DeprecatedShared *bool `json:"shared,omitempty"` - // Deprecated: marker is silently ignored. It has no replacement. - DeprecatedMarker string `json:"marker,omitempty"` - // Deprecated: limit is silently ignored. It has no replacement. - DeprecatedLimit int `json:"limit,omitempty"` - // Deprecated: sortKey is silently ignored. It has no replacement. - DeprecatedSortKey string `json:"sortKey,omitempty"` - // Deprecated: sortDir is silently ignored. It has no replacement. - DeprecatedSortDir string `json:"sortDir,omitempty"` -} - -type SubnetParam struct { - // The UUID of the network. Required if you omit the port attribute. - UUID string `json:"uuid,omitempty"` - - // Filters for optional network query - Filter SubnetFilter `json:"filter,omitempty"` - - // portTags are tags that are added to ports created on this subnet - PortTags []string `json:"portTags,omitempty"` - - // portSecurity optionally enables or disables security on ports managed by OpenStack - // Deprecated: portSecurity is silently ignored. Set portSecurity on the parent network instead. - PortSecurity *bool `json:"portSecurity,omitempty"` -} - -type SubnetFilter struct { - // id is the uuid of a specific subnet to use. If specified, id will not - // be validated. Instead server creation will fail with an appropriate - // error. - ID string `json:"id,omitempty"` - // name filters subnets by name. - Name string `json:"name,omitempty"` - // description filters subnets by description. - Description string `json:"description,omitempty"` - // Deprecated: networkId is silently ignored. Set uuid on the containing network definition instead. - NetworkID string `json:"networkId,omitempty"` - // tenantId filters subnets by tenant ID. - // Deprecated: use projectId instead. tenantId will be ignored if projectId is set. - TenantID string `json:"tenantId,omitempty"` - // projectId filters subnets by project ID. - ProjectID string `json:"projectId,omitempty"` - // ipVersion filters subnets by IP version. - IPVersion int `json:"ipVersion,omitempty"` - // gateway_ip filters subnets by gateway IP. - GatewayIP string `json:"gateway_ip,omitempty"` - // cidr filters subnets by CIDR. - CIDR string `json:"cidr,omitempty"` - // ipv6AddressMode filters subnets by IPv6 address mode. - IPv6AddressMode string `json:"ipv6AddressMode,omitempty"` - // ipv6RaMode filters subnets by IPv6 router adversiement mode. - IPv6RAMode string `json:"ipv6RaMode,omitempty"` - // subnetpoolId filters subnets by subnet pool ID. - // Deprecated: subnetpoolId is silently ignored. - SubnetPoolID string `json:"subnetpoolId,omitempty"` - // tags filters by subnets containing all specified tags. - // Multiple tags are comma separated. - Tags string `json:"tags,omitempty"` - // tagsAny filters by subnets containing any specified tags. - // Multiple tags are comma separated. - TagsAny string `json:"tagsAny,omitempty"` - // notTags filters by subnets which don't match all specified tags. NOT (t1 AND t2...) - // Multiple tags are comma separated. - NotTags string `json:"notTags,omitempty"` - // notTagsAny filters by subnets which don't match any specified tags. NOT (t1 OR t2...) - // Multiple tags are comma separated. - NotTagsAny string `json:"notTagsAny,omitempty"` - - // Deprecated: enableDhcp is silently ignored. It has no replacement. - DeprecatedEnableDHCP *bool `json:"enableDhcp,omitempty"` - // Deprecated: limit is silently ignored. It has no replacement. - DeprecatedLimit int `json:"limit,omitempty"` - // Deprecated: marker is silently ignored. It has no replacement. - DeprecatedMarker string `json:"marker,omitempty"` - // Deprecated: sortKey is silently ignored. It has no replacement. - DeprecatedSortKey string `json:"sortKey,omitempty"` - // Deprecated: sortDir is silently ignored. It has no replacement. - DeprecatedSortDir string `json:"sortDir,omitempty"` -} - -type PortOpts struct { - // networkID is the ID of the network the port will be created in. It is required. - // +required - NetworkID string `json:"networkID"` - // If nameSuffix is specified the created port will be named -. - // If not specified the port will be named -. - NameSuffix string `json:"nameSuffix,omitempty"` - // description specifies the description of the created port. - Description string `json:"description,omitempty"` - // adminStateUp sets the administrative state of the created port to up (true), or down (false). - AdminStateUp *bool `json:"adminStateUp,omitempty"` - // macAddress specifies the MAC address of the created port. - MACAddress string `json:"macAddress,omitempty"` - // fixedIPs specifies a set of fixed IPs to assign to the port. They must all be valid for the port's network. - FixedIPs []FixedIPs `json:"fixedIPs,omitempty"` - // tenantID specifies the tenant ID of the created port. Note that this - // requires OpenShift to have administrative permissions, which is - // typically not the case. Use of this field is not recommended. - // Deprecated: tenantID is silently ignored. - TenantID string `json:"tenantID,omitempty"` - // projectID specifies the project ID of the created port. Note that this - // requires OpenShift to have administrative permissions, which is - // typically not the case. Use of this field is not recommended. - // Deprecated: projectID is silently ignored. - ProjectID string `json:"projectID,omitempty"` - // securityGroups specifies a set of security group UUIDs to use instead - // of the machine's default security groups. The default security groups - // will be used if this is left empty or not specified. - SecurityGroups *[]string `json:"securityGroups,omitempty"` - // allowedAddressPairs specifies a set of allowed address pairs to add to the port. - AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"` - // tags species a set of tags to add to the port. - Tags []string `json:"tags,omitempty"` - // The virtual network interface card (vNIC) type that is bound to the - // neutron port. - VNICType string `json:"vnicType,omitempty"` - // A dictionary that enables the application running on the specified - // host to pass and receive virtual network interface (VIF) port-specific - // information to the plug-in. - Profile map[string]string `json:"profile,omitempty"` - // enable or disable security on a given port - // incompatible with securityGroups and allowedAddressPairs - PortSecurity *bool `json:"portSecurity,omitempty"` - // Enables and disables trunk at port level. If not provided, openStackMachine.Spec.Trunk is inherited. - Trunk *bool `json:"trunk,omitempty"` - - // The ID of the host where the port is allocated. Do not use this - // field: it cannot be used correctly. - // Deprecated: hostID is silently ignored. It will be removed with no replacement. - DeprecatedHostID string `json:"hostID,omitempty"` -} - -type AddressPair struct { - IPAddress string `json:"ipAddress,omitempty"` - MACAddress string `json:"macAddress,omitempty"` -} - -type FixedIPs struct { - // subnetID specifies the ID of the subnet where the fixed IP will be allocated. - SubnetID string `json:"subnetID"` - // ipAddress is a specific IP address to use in the given subnet. Port - // creation will fail if the address is not available. If not specified, - // an available IP from the given subnet will be selected automatically. - IPAddress string `json:"ipAddress,omitempty"` -} - -type RootVolume struct { - // sourceUUID specifies the UUID of a glance image used to populate the root volume. - // Deprecated: set image in the platform spec instead. This will be - // ignored if image is set in the platform spec. - SourceUUID string `json:"sourceUUID,omitempty"` - // volumeType specifies a volume type to use when creating the root - // volume. If not specified the default volume type will be used. - VolumeType string `json:"volumeType,omitempty"` - // diskSize specifies the size, in GiB, of the created root volume. - Size int `json:"diskSize,omitempty"` - // availabilityZone specifies the Cinder availability where the root volume will be created. - Zone string `json:"availabilityZone,omitempty"` - - // Deprecated: sourceType will be silently ignored. There is no replacement. - DeprecatedSourceType string `json:"sourceType,omitempty"` - // Deprecated: deviceType will be silently ignored. There is no replacement. - DeprecatedDeviceType string `json:"deviceType,omitempty"` -} - -// blockDeviceStorage is the storage type of a block device to create and -// contains additional storage options. -// +union -type BlockDeviceStorage struct { - // type is the type of block device to create. - // This can be either "Volume" or "Local". - // +required - // +unionDiscriminator - Type BlockDeviceType `json:"type"` - - // volume contains additional storage options for a volume block device. - // +optional - // +unionMember,optional - Volume *BlockDeviceVolume `json:"volume,omitempty"` -} - -// blockDeviceVolume contains additional storage options for a volume block device. -type BlockDeviceVolume struct { - // type is the Cinder volume type of the volume. - // If omitted, the default Cinder volume type that is configured in the OpenStack cloud - // will be used. - // +optional - Type string `json:"type,omitempty"` - - // availabilityZone is the volume availability zone to create the volume in. - // If omitted, the availability zone of the server will be used. - // The availability zone must NOT contain spaces otherwise it will lead to volume that belongs - // to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for - // further information. - // +optional - AvailabilityZone string `json:"availabilityZone,omitempty"` -} - -// additionalBlockDevice is a block device to attach to the server. -type AdditionalBlockDevice struct { - // name of the block device in the context of a machine. - // If the block device is a volume, the Cinder volume will be named - // as a combination of the machine name and this name. - // Also, this name will be used for tagging the block device. - // Information about the block device tag can be obtained from the OpenStack - // metadata API or the config drive. - // +required - Name string `json:"name"` - - // sizeGiB is the size of the block device in gibibytes (GiB). - // +required - SizeGiB int `json:"sizeGiB"` - - // storage specifies the storage type of the block device and - // additional storage options. - // +required - Storage BlockDeviceStorage `json:"storage"` -} - -// BlockDeviceType defines the type of block device to create. -type BlockDeviceType string - -const ( - // LocalBlockDevice is an ephemeral block device attached to the server. - LocalBlockDevice BlockDeviceType = "Local" - - // VolumeBlockDevice is a volume block device attached to the server. - VolumeBlockDevice BlockDeviceType = "Volume" -) diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 179a34778..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,407 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" - 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 *AdditionalBlockDevice) DeepCopyInto(out *AdditionalBlockDevice) { - *out = *in - in.Storage.DeepCopyInto(&out.Storage) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalBlockDevice. -func (in *AdditionalBlockDevice) DeepCopy() *AdditionalBlockDevice { - if in == nil { - return nil - } - out := new(AdditionalBlockDevice) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressPair) DeepCopyInto(out *AddressPair) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressPair. -func (in *AddressPair) DeepCopy() *AddressPair { - if in == nil { - return nil - } - out := new(AddressPair) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BlockDeviceStorage) DeepCopyInto(out *BlockDeviceStorage) { - *out = *in - if in.Volume != nil { - in, out := &in.Volume, &out.Volume - *out = new(BlockDeviceVolume) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceStorage. -func (in *BlockDeviceStorage) DeepCopy() *BlockDeviceStorage { - if in == nil { - return nil - } - out := new(BlockDeviceStorage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BlockDeviceVolume) DeepCopyInto(out *BlockDeviceVolume) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceVolume. -func (in *BlockDeviceVolume) DeepCopy() *BlockDeviceVolume { - if in == nil { - return nil - } - out := new(BlockDeviceVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Filter) DeepCopyInto(out *Filter) { - *out = *in - if in.DeprecatedAdminStateUp != nil { - in, out := &in.DeprecatedAdminStateUp, &out.DeprecatedAdminStateUp - *out = new(bool) - **out = **in - } - if in.DeprecatedShared != nil { - in, out := &in.DeprecatedShared, &out.DeprecatedShared - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter. -func (in *Filter) DeepCopy() *Filter { - if in == nil { - return nil - } - out := new(Filter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FixedIPs) DeepCopyInto(out *FixedIPs) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FixedIPs. -func (in *FixedIPs) DeepCopy() *FixedIPs { - if in == nil { - return nil - } - out := new(FixedIPs) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkParam) DeepCopyInto(out *NetworkParam) { - *out = *in - in.Filter.DeepCopyInto(&out.Filter) - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = make([]SubnetParam, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.PortTags != nil { - in, out := &in.PortTags, &out.PortTags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Profile != nil { - in, out := &in.Profile, &out.Profile - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.PortSecurity != nil { - in, out := &in.PortSecurity, &out.PortSecurity - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkParam. -func (in *NetworkParam) DeepCopy() *NetworkParam { - if in == nil { - return nil - } - out := new(NetworkParam) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenstackProviderSpec) DeepCopyInto(out *OpenstackProviderSpec) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.CloudsSecret != nil { - in, out := &in.CloudsSecret, &out.CloudsSecret - *out = new(v1.SecretReference) - **out = **in - } - if in.Networks != nil { - in, out := &in.Networks, &out.Networks - *out = make([]NetworkParam, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Ports != nil { - in, out := &in.Ports, &out.Ports - *out = make([]PortOpts, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]SecurityGroupParam, len(*in)) - copy(*out, *in) - } - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(v1.SecretReference) - **out = **in - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ServerMetadata != nil { - in, out := &in.ServerMetadata, &out.ServerMetadata - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ConfigDrive != nil { - in, out := &in.ConfigDrive, &out.ConfigDrive - *out = new(bool) - **out = **in - } - if in.RootVolume != nil { - in, out := &in.RootVolume, &out.RootVolume - *out = new(RootVolume) - **out = **in - } - if in.AdditionalBlockDevices != nil { - in, out := &in.AdditionalBlockDevices, &out.AdditionalBlockDevices - *out = make([]AdditionalBlockDevice, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenstackProviderSpec. -func (in *OpenstackProviderSpec) DeepCopy() *OpenstackProviderSpec { - if in == nil { - return nil - } - out := new(OpenstackProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenstackProviderSpec) 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 *PortOpts) DeepCopyInto(out *PortOpts) { - *out = *in - if in.AdminStateUp != nil { - in, out := &in.AdminStateUp, &out.AdminStateUp - *out = new(bool) - **out = **in - } - if in.FixedIPs != nil { - in, out := &in.FixedIPs, &out.FixedIPs - *out = make([]FixedIPs, len(*in)) - copy(*out, *in) - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = new([]string) - if **in != nil { - in, out := *in, *out - *out = make([]string, len(*in)) - copy(*out, *in) - } - } - if in.AllowedAddressPairs != nil { - in, out := &in.AllowedAddressPairs, &out.AllowedAddressPairs - *out = make([]AddressPair, len(*in)) - copy(*out, *in) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Profile != nil { - in, out := &in.Profile, &out.Profile - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.PortSecurity != nil { - in, out := &in.PortSecurity, &out.PortSecurity - *out = new(bool) - **out = **in - } - if in.Trunk != nil { - in, out := &in.Trunk, &out.Trunk - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortOpts. -func (in *PortOpts) DeepCopy() *PortOpts { - if in == nil { - return nil - } - out := new(PortOpts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RootVolume) DeepCopyInto(out *RootVolume) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RootVolume. -func (in *RootVolume) DeepCopy() *RootVolume { - if in == nil { - return nil - } - out := new(RootVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupFilter) DeepCopyInto(out *SecurityGroupFilter) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupFilter. -func (in *SecurityGroupFilter) DeepCopy() *SecurityGroupFilter { - if in == nil { - return nil - } - out := new(SecurityGroupFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityGroupParam) DeepCopyInto(out *SecurityGroupParam) { - *out = *in - out.Filter = in.Filter - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityGroupParam. -func (in *SecurityGroupParam) DeepCopy() *SecurityGroupParam { - if in == nil { - return nil - } - out := new(SecurityGroupParam) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubnetFilter) DeepCopyInto(out *SubnetFilter) { - *out = *in - if in.DeprecatedEnableDHCP != nil { - in, out := &in.DeprecatedEnableDHCP, &out.DeprecatedEnableDHCP - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetFilter. -func (in *SubnetFilter) DeepCopy() *SubnetFilter { - if in == nil { - return nil - } - out := new(SubnetFilter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SubnetParam) DeepCopyInto(out *SubnetParam) { - *out = *in - in.Filter.DeepCopyInto(&out.Filter) - if in.PortTags != nil { - in, out := &in.PortTags, &out.PortTags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PortSecurity != nil { - in, out := &in.PortSecurity, &out.PortSecurity - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubnetParam. -func (in *SubnetParam) DeepCopy() *SubnetParam { - if in == nil { - return nil - } - out := new(SubnetParam) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 8310e981e..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdditionalBlockDevice) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.AdditionalBlockDevice" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AddressPair) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.AddressPair" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BlockDeviceStorage) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.BlockDeviceStorage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BlockDeviceVolume) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.BlockDeviceVolume" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Filter) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.Filter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FixedIPs) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.FixedIPs" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkParam) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.NetworkParam" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenstackProviderSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.OpenstackProviderSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PortOpts) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.PortOpts" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RootVolume) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.RootVolume" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityGroupFilter) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.SecurityGroupFilter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityGroupParam) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.SecurityGroupParam" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubnetFilter) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.SubnetFilter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SubnetParam) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1alpha1.SubnetParam" -} diff --git a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 1062bc6de..000000000 --- a/vendor/github.com/openshift/api/machine/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,228 +0,0 @@ -package v1alpha1 - -// 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_AdditionalBlockDevice = map[string]string{ - "": "additionalBlockDevice is a block device to attach to the server.", - "name": "name of the block device in the context of a machine. If the block device is a volume, the Cinder volume will be named as a combination of the machine name and this name. Also, this name will be used for tagging the block device. Information about the block device tag can be obtained from the OpenStack metadata API or the config drive.", - "sizeGiB": "sizeGiB is the size of the block device in gibibytes (GiB).", - "storage": "storage specifies the storage type of the block device and additional storage options.", -} - -func (AdditionalBlockDevice) SwaggerDoc() map[string]string { - return map_AdditionalBlockDevice -} - -var map_BlockDeviceStorage = map[string]string{ - "": "blockDeviceStorage is the storage type of a block device to create and contains additional storage options.", - "type": "type is the type of block device to create. This can be either \"Volume\" or \"Local\".", - "volume": "volume contains additional storage options for a volume block device.", -} - -func (BlockDeviceStorage) SwaggerDoc() map[string]string { - return map_BlockDeviceStorage -} - -var map_BlockDeviceVolume = map[string]string{ - "": "blockDeviceVolume contains additional storage options for a volume block device.", - "type": "type is the Cinder volume type of the volume. If omitted, the default Cinder volume type that is configured in the OpenStack cloud will be used.", - "availabilityZone": "availabilityZone is the volume availability zone to create the volume in. If omitted, the availability zone of the server will be used. The availability zone must NOT contain spaces otherwise it will lead to volume that belongs to this availability zone register failure, see kubernetes/cloud-provider-openstack#1379 for further information.", -} - -func (BlockDeviceVolume) SwaggerDoc() map[string]string { - return map_BlockDeviceVolume -} - -var map_Filter = map[string]string{ - "id": "Deprecated: use NetworkParam.uuid instead. Ignored if NetworkParam.uuid is set.", - "name": "name filters networks by name.", - "description": "description filters networks by description.", - "tenantId": "tenantId filters networks by tenant ID. Deprecated: use projectId instead. tenantId will be ignored if projectId is set.", - "projectId": "projectId filters networks by project ID.", - "tags": "tags filters by networks containing all specified tags. Multiple tags are comma separated.", - "tagsAny": "tagsAny filters by networks containing any specified tags. Multiple tags are comma separated.", - "notTags": "notTags filters by networks which don't match all specified tags. NOT (t1 AND t2...) Multiple tags are comma separated.", - "notTagsAny": "notTagsAny filters by networks which don't match any specified tags. NOT (t1 OR t2...) Multiple tags are comma separated.", - "status": "Deprecated: status is silently ignored. It has no replacement.", - "adminStateUp": "Deprecated: adminStateUp is silently ignored. It has no replacement.", - "shared": "Deprecated: shared is silently ignored. It has no replacement.", - "marker": "Deprecated: marker is silently ignored. It has no replacement.", - "limit": "Deprecated: limit is silently ignored. It has no replacement.", - "sortKey": "Deprecated: sortKey is silently ignored. It has no replacement.", - "sortDir": "Deprecated: sortDir is silently ignored. It has no replacement.", -} - -func (Filter) SwaggerDoc() map[string]string { - return map_Filter -} - -var map_FixedIPs = map[string]string{ - "subnetID": "subnetID specifies the ID of the subnet where the fixed IP will be allocated.", - "ipAddress": "ipAddress is a specific IP address to use in the given subnet. Port creation will fail if the address is not available. If not specified, an available IP from the given subnet will be selected automatically.", -} - -func (FixedIPs) SwaggerDoc() map[string]string { - return map_FixedIPs -} - -var map_NetworkParam = map[string]string{ - "uuid": "The UUID of the network. Required if you omit the port attribute.", - "fixedIp": "A fixed IPv4 address for the NIC. Deprecated: fixedIP is silently ignored. Use subnets instead.", - "filter": "Filters for optional network query", - "subnets": "Subnet within a network to use", - "noAllowedAddressPairs": "noAllowedAddressPairs disables creation of allowed address pairs for the network ports", - "portTags": "portTags allows users to specify a list of tags to add to ports created in a given network", - "vnicType": "The virtual network interface card (vNIC) type that is bound to the neutron port.", - "profile": "A dictionary that enables the application running on the specified host to pass and receive virtual network interface (VIF) port-specific information to the plug-in.", - "portSecurity": "portSecurity optionally enables or disables security on ports managed by OpenStack", -} - -func (NetworkParam) SwaggerDoc() map[string]string { - return map_NetworkParam -} - -var map_OpenstackProviderSpec = map[string]string{ - "": "OpenstackProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an OpenStack Instance. It is used by the Openstack machine actuator to create a single machine instance. Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "cloudsSecret": "The name of the secret containing the openstack credentials", - "cloudName": "The name of the cloud to use from the clouds secret", - "flavor": "The flavor reference for the flavor for your server instance.", - "image": "The name of the image to use for your server instance. If the RootVolume is specified, this will be ignored and use rootVolume directly.", - "keyName": "The ssh key to inject in the instance", - "sshUserName": "The machine ssh username Deprecated: sshUserName is silently ignored.", - "networks": "A networks object. Required parameter when there are multiple networks defined for the tenant. When you do not specify the networks parameter, the server attaches to the only network created for the current tenant.", - "ports": "Create and assign additional ports to instances", - "floatingIP": "floatingIP specifies a floating IP to be associated with the machine. Note that it is not safe to use this parameter in a MachineSet, as only one Machine may be assigned the same floating IP.\n\nDeprecated: floatingIP will be removed in a future release as it cannot be implemented correctly.", - "availabilityZone": "The availability zone from which to launch the server.", - "securityGroups": "The names of the security groups to assign to the instance", - "userDataSecret": "The name of the secret containing the user data (startup script in most cases)", - "trunk": "Whether the server instance is created on a trunk port or not.", - "tags": "Machine tags Requires Nova api 2.52 minimum!", - "serverMetadata": "Metadata mapping. Allows you to create a map of key value pairs to add to the server instance.", - "configDrive": "Config Drive support", - "rootVolume": "The volume metadata to boot from", - "additionalBlockDevices": "additionalBlockDevices is a list of specifications for additional block devices to attach to the server instance", - "serverGroupID": "The server group to assign the machine to.", - "serverGroupName": "The server group to assign the machine to. A server group with that name will be created if it does not exist. If both ServerGroupID and ServerGroupName are non-empty, they must refer to the same OpenStack resource.", - "primarySubnet": "The subnet that a set of machines will get ingress/egress traffic from Deprecated: primarySubnet is silently ignored. Use subnets instead.", -} - -func (OpenstackProviderSpec) SwaggerDoc() map[string]string { - return map_OpenstackProviderSpec -} - -var map_PortOpts = map[string]string{ - "networkID": "networkID is the ID of the network the port will be created in. It is required.", - "nameSuffix": "If nameSuffix is specified the created port will be named -. If not specified the port will be named -.", - "description": "description specifies the description of the created port.", - "adminStateUp": "adminStateUp sets the administrative state of the created port to up (true), or down (false).", - "macAddress": "macAddress specifies the MAC address of the created port.", - "fixedIPs": "fixedIPs specifies a set of fixed IPs to assign to the port. They must all be valid for the port's network.", - "tenantID": "tenantID specifies the tenant ID of the created port. Note that this requires OpenShift to have administrative permissions, which is typically not the case. Use of this field is not recommended. Deprecated: tenantID is silently ignored.", - "projectID": "projectID specifies the project ID of the created port. Note that this requires OpenShift to have administrative permissions, which is typically not the case. Use of this field is not recommended. Deprecated: projectID is silently ignored.", - "securityGroups": "securityGroups specifies a set of security group UUIDs to use instead of the machine's default security groups. The default security groups will be used if this is left empty or not specified.", - "allowedAddressPairs": "allowedAddressPairs specifies a set of allowed address pairs to add to the port.", - "tags": "tags species a set of tags to add to the port.", - "vnicType": "The virtual network interface card (vNIC) type that is bound to the neutron port.", - "profile": "A dictionary that enables the application running on the specified host to pass and receive virtual network interface (VIF) port-specific information to the plug-in.", - "portSecurity": "enable or disable security on a given port incompatible with securityGroups and allowedAddressPairs", - "trunk": "Enables and disables trunk at port level. If not provided, openStackMachine.Spec.Trunk is inherited.", - "hostID": "The ID of the host where the port is allocated. Do not use this field: it cannot be used correctly. Deprecated: hostID is silently ignored. It will be removed with no replacement.", -} - -func (PortOpts) SwaggerDoc() map[string]string { - return map_PortOpts -} - -var map_RootVolume = map[string]string{ - "sourceUUID": "sourceUUID specifies the UUID of a glance image used to populate the root volume. Deprecated: set image in the platform spec instead. This will be ignored if image is set in the platform spec.", - "volumeType": "volumeType specifies a volume type to use when creating the root volume. If not specified the default volume type will be used.", - "diskSize": "diskSize specifies the size, in GiB, of the created root volume.", - "availabilityZone": "availabilityZone specifies the Cinder availability where the root volume will be created.", - "sourceType": "Deprecated: sourceType will be silently ignored. There is no replacement.", - "deviceType": "Deprecated: deviceType will be silently ignored. There is no replacement.", -} - -func (RootVolume) SwaggerDoc() map[string]string { - return map_RootVolume -} - -var map_SecurityGroupFilter = map[string]string{ - "id": "id specifies the ID of a security group to use. If set, id will not be validated before use. An invalid id will result in failure to create a server with an appropriate error message.", - "name": "name filters security groups by name.", - "description": "description filters security groups by description.", - "tenantId": "tenantId filters security groups by tenant ID. Deprecated: use projectId instead. tenantId will be ignored if projectId is set.", - "projectId": "projectId filters security groups by project ID.", - "tags": "tags filters by security groups containing all specified tags. Multiple tags are comma separated.", - "tagsAny": "tagsAny filters by security groups containing any specified tags. Multiple tags are comma separated.", - "notTags": "notTags filters by security groups which don't match all specified tags. NOT (t1 AND t2...) Multiple tags are comma separated.", - "notTagsAny": "notTagsAny filters by security groups which don't match any specified tags. NOT (t1 OR t2...) Multiple tags are comma separated.", - "limit": "Deprecated: limit is silently ignored. It has no replacement.", - "marker": "Deprecated: marker is silently ignored. It has no replacement.", - "sortKey": "Deprecated: sortKey is silently ignored. It has no replacement.", - "sortDir": "Deprecated: sortDir is silently ignored. It has no replacement.", -} - -func (SecurityGroupFilter) SwaggerDoc() map[string]string { - return map_SecurityGroupFilter -} - -var map_SecurityGroupParam = map[string]string{ - "uuid": "Security Group UUID", - "name": "Security Group name", - "filter": "Filters used to query security groups in openstack", -} - -func (SecurityGroupParam) SwaggerDoc() map[string]string { - return map_SecurityGroupParam -} - -var map_SubnetFilter = map[string]string{ - "id": "id is the uuid of a specific subnet to use. If specified, id will not be validated. Instead server creation will fail with an appropriate error.", - "name": "name filters subnets by name.", - "description": "description filters subnets by description.", - "networkId": "Deprecated: networkId is silently ignored. Set uuid on the containing network definition instead.", - "tenantId": "tenantId filters subnets by tenant ID. Deprecated: use projectId instead. tenantId will be ignored if projectId is set.", - "projectId": "projectId filters subnets by project ID.", - "ipVersion": "ipVersion filters subnets by IP version.", - "gateway_ip": "gateway_ip filters subnets by gateway IP.", - "cidr": "cidr filters subnets by CIDR.", - "ipv6AddressMode": "ipv6AddressMode filters subnets by IPv6 address mode.", - "ipv6RaMode": "ipv6RaMode filters subnets by IPv6 router adversiement mode.", - "subnetpoolId": "subnetpoolId filters subnets by subnet pool ID. Deprecated: subnetpoolId is silently ignored.", - "tags": "tags filters by subnets containing all specified tags. Multiple tags are comma separated.", - "tagsAny": "tagsAny filters by subnets containing any specified tags. Multiple tags are comma separated.", - "notTags": "notTags filters by subnets which don't match all specified tags. NOT (t1 AND t2...) Multiple tags are comma separated.", - "notTagsAny": "notTagsAny filters by subnets which don't match any specified tags. NOT (t1 OR t2...) Multiple tags are comma separated.", - "enableDhcp": "Deprecated: enableDhcp is silently ignored. It has no replacement.", - "limit": "Deprecated: limit is silently ignored. It has no replacement.", - "marker": "Deprecated: marker is silently ignored. It has no replacement.", - "sortKey": "Deprecated: sortKey is silently ignored. It has no replacement.", - "sortDir": "Deprecated: sortDir is silently ignored. It has no replacement.", -} - -func (SubnetFilter) SwaggerDoc() map[string]string { - return map_SubnetFilter -} - -var map_SubnetParam = map[string]string{ - "uuid": "The UUID of the network. Required if you omit the port attribute.", - "filter": "Filters for optional network query", - "portTags": "portTags are tags that are added to ports created on this subnet", - "portSecurity": "portSecurity optionally enables or disables security on ports managed by OpenStack Deprecated: portSecurity is silently ignored. Set portSecurity on the parent network instead.", -} - -func (SubnetParam) SwaggerDoc() map[string]string { - return map_SubnetParam -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/machine/v1beta1/Makefile b/vendor/github.com/openshift/api/machine/v1beta1/Makefile deleted file mode 100644 index fee9e68fc..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="machine.openshift.io/v1beta1" diff --git a/vendor/github.com/openshift/api/machine/v1beta1/doc.go b/vendor/github.com/openshift/api/machine/v1beta1/doc.go deleted file mode 100644 index 5c992f692..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.machine.v1beta1 - -// +kubebuilder:validation:Optional -// +groupName=machine.openshift.io -package v1beta1 diff --git a/vendor/github.com/openshift/api/machine/v1beta1/register.go b/vendor/github.com/openshift/api/machine/v1beta1/register.go deleted file mode 100644 index a3678c007..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/register.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "machine.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &Machine{}, - &MachineList{}, - &MachineSet{}, - &MachineSetList{}, - &MachineHealthCheck{}, - &MachineHealthCheckList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go deleted file mode 100644 index e3508d667..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_awsprovider.go +++ /dev/null @@ -1,557 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AWSMachineProviderConfig is the Schema for the awsmachineproviderconfigs API -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AWSMachineProviderConfig struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // ami is the reference to the AMI from which to create the machine instance. - AMI AWSResourceReference `json:"ami"` - // instanceType is the type of instance to create. Example: m4.xlarge - InstanceType string `json:"instanceType"` - // cpuOptions defines CPU-related settings for the instance, including the confidential computing policy. - // When omitted, this means no opinion and the AWS platform is left to choose a reasonable default. - // More info: - // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CpuOptionsRequest.html, - // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html - // +optional - CPUOptions *CPUOptions `json:"cpuOptions,omitempty,omitzero"` - // tags is the set of tags to add to apply to an instance, in addition to the ones - // added by default by the actuator. These tags are additive. The actuator will ensure - // these tags are present, but will not remove any other tags that may exist on the - // instance. - // +optional - Tags []TagSpecification `json:"tags,omitempty"` - // iamInstanceProfile is a reference to an IAM role to assign to the instance - // +optional - IAMInstanceProfile *AWSResourceReference `json:"iamInstanceProfile,omitempty"` - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance - // +optional - UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` - // credentialsSecret is a reference to the secret with AWS credentials. Otherwise, defaults to permissions - // provided by attached IAM role where the actuator is running. - // +optional - CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // keyName is the name of the KeyPair to use for SSH - // +optional - KeyName *string `json:"keyName,omitempty"` - // deviceIndex is the index of the device on the instance for the network interface attachment. - // Defaults to 0. - DeviceIndex int64 `json:"deviceIndex"` - // publicIp specifies whether the instance should get a public IP. If not present, - // it should use the default of its subnet. - // +optional - PublicIP *bool `json:"publicIp,omitempty"` - // networkInterfaceType specifies the type of network interface to be used for the primary - // network interface. - // Valid values are "ENA", "EFA", and omitted, which means no opinion and the platform - // chooses a good default which may change over time. - // The current default value is "ENA". - // Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more - // about the AWS Elastic Fabric Adapter interface option. - // +kubebuilder:validation:Enum:="ENA";"EFA" - // +optional - NetworkInterfaceType AWSNetworkInterfaceType `json:"networkInterfaceType,omitempty"` - // securityGroups is an array of references to security groups that should be applied to the - // instance. - // +optional - SecurityGroups []AWSResourceReference `json:"securityGroups,omitempty"` - // subnet is a reference to the subnet to use for this instance - Subnet AWSResourceReference `json:"subnet"` - // placement specifies where to create the instance in AWS - Placement Placement `json:"placement"` - // loadBalancers is the set of load balancers to which the new instance - // should be added once it is created. - // +optional - LoadBalancers []LoadBalancerReference `json:"loadBalancers,omitempty"` - // blockDevices is the set of block device mapping associated to this instance, - // block device without a name will be used as a root device and only one device without a name is allowed - // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html - // +optional - BlockDevices []BlockDeviceMappingSpec `json:"blockDevices,omitempty"` - // spotMarketOptions allows users to configure instances to be run using AWS Spot instances. - // +optional - SpotMarketOptions *SpotMarketOptions `json:"spotMarketOptions,omitempty"` - // metadataServiceOptions allows users to configure instance metadata service interaction options. - // If nothing specified, default AWS IMDS settings will be applied. - // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html - // +optional - MetadataServiceOptions MetadataServiceOptions `json:"metadataServiceOptions,omitempty"` - // placementGroupName specifies the name of the placement group in which to launch the instance. - // The placement group must already be created and may use any placement strategy. - // When omitted, no placement group is used when creating the EC2 instance. - // +optional - PlacementGroupName string `json:"placementGroupName,omitempty"` - // placementGroupPartition is the partition number within the placement group in which to launch the instance. - // This must be an integer value between 1 and 7. It is only valid if the placement group, referred in - // `PlacementGroupName` was created with strategy set to partition. - // +kubebuilder:validation:Minimum:=1 - // +kubebuilder:validation:Maximum:=7 - // +optional - PlacementGroupPartition *int32 `json:"placementGroupPartition,omitempty"` - // capacityReservationId specifies the target Capacity Reservation into which the instance should be launched. - // The field size should be greater than 0 and the field input must start with cr-*** - // +optional - CapacityReservationID string `json:"capacityReservationId"` - // marketType specifies the type of market for the EC2 instance. - // Valid values are OnDemand, Spot, CapacityBlock and omitted. - // - // Defaults to OnDemand. - // When SpotMarketOptions is provided, the marketType defaults to "Spot". - // - // When set to OnDemand the instance runs as a standard OnDemand instance. - // When set to Spot the instance runs as a Spot instance. - // When set to CapacityBlock the instance utilizes pre-purchased compute capacity (capacity blocks) with AWS Capacity Reservations. - // If this value is selected, capacityReservationID must be specified to identify the target reservation. - // +optional - MarketType MarketType `json:"marketType,omitempty"` - - // Tombstone: This field was moved into the Placement struct to belong w/ the Tenancy field due to involvement with the setting. - // hostPlacement configures placement on AWS Dedicated Hosts. This allows admins to assign instances to specific host - // for a variety of needs including for regulatory compliance, to leverage existing per-socket or per-core software licenses (BYOL), - // and to gain visibility and control over instance placement on a physical server. - // When omitted, the instance is not constrained to a dedicated host. - // +openshift:enable:FeatureGate=AWSDedicatedHosts - // +optional - //HostPlacement *HostPlacement `json:"hostPlacement,omitempty"` -} - -// AWSConfidentialComputePolicy represents the confidential compute configuration for the instance. -// +kubebuilder:validation:Enum=Disabled;AMDEncryptedVirtualizationNestedPaging -type AWSConfidentialComputePolicy string - -const ( - // AWSConfidentialComputePolicyDisabled disables confidential computing for the instance. - AWSConfidentialComputePolicyDisabled AWSConfidentialComputePolicy = "Disabled" - // AWSConfidentialComputePolicySEVSNP enables AMD SEV-SNP as the confidential computing technology for the instance. - AWSConfidentialComputePolicySEVSNP AWSConfidentialComputePolicy = "AMDEncryptedVirtualizationNestedPaging" -) - -// CPUOptions defines CPU-related settings for the instance, including the confidential computing policy. -// If provided, it must not be empty — at least one field must be set. -// +kubebuilder:validation:MinProperties=1 -type CPUOptions struct { - // confidentialCompute specifies whether confidential computing should be enabled for the instance, - // and, if so, which confidential computing technology to use. - // Valid values are: Disabled, AMDEncryptedVirtualizationNestedPaging and omitted. - // When set to Disabled, confidential computing will be disabled for the instance. - // When set to AMDEncryptedVirtualizationNestedPaging, AMD SEV-SNP will be used as the confidential computing technology for the instance. - // In this case, ensure the following conditions are met: - // 1) The selected instance type supports AMD SEV-SNP. - // 2) The selected AWS region supports AMD SEV-SNP. - // 3) The selected AMI supports AMD SEV-SNP. - // More details can be checked at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html - // When omitted, this means no opinion and the AWS platform is left to choose a reasonable default, - // which is subject to change without notice. The current default is Disabled. - // +optional - ConfidentialCompute *AWSConfidentialComputePolicy `json:"confidentialCompute,omitempty"` -} - -// BlockDeviceMappingSpec describes a block device mapping -type BlockDeviceMappingSpec struct { - // The device name exposed to the machine (for example, /dev/sdh or xvdh). - // +optional - DeviceName *string `json:"deviceName,omitempty"` - // Parameters used to automatically set up EBS volumes when the machine is - // launched. - // +optional - EBS *EBSBlockDeviceSpec `json:"ebs,omitempty"` - // Suppresses the specified device included in the block device mapping of the - // AMI. - // +optional - NoDevice *string `json:"noDevice,omitempty"` - // The virtual device name (ephemeralN). Machine store volumes are numbered - // starting from 0. An machine type with 2 available machine store volumes - // can specify mappings for ephemeral0 and ephemeral1.The number of available - // machine store volumes depends on the machine type. After you connect to - // the machine, you must mount the volume. - // - // Constraints: For M3 machines, you must specify machine store volumes in - // the block device mapping for the machine. When you launch an M3 machine, - // we ignore any machine store volumes specified in the block device mapping - // for the AMI. - // +optional - VirtualName *string `json:"virtualName,omitempty"` -} - -// EBSBlockDeviceSpec describes a block device for an EBS volume. -// https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsBlockDevice -type EBSBlockDeviceSpec struct { - // Indicates whether the EBS volume is deleted on machine termination. - // - // Deprecated: setting this field has no effect. - // +optional - DeprecatedDeleteOnTermination *bool `json:"deleteOnTermination,omitempty"` - // Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes - // may only be attached to machines that support Amazon EBS encryption. - // +optional - Encrypted *bool `json:"encrypted,omitempty"` - // Indicates the KMS key that should be used to encrypt the Amazon EBS volume. - // +optional - KMSKey AWSResourceReference `json:"kmsKey,omitempty"` - // The number of I/O operations per second (IOPS) that the volume supports. - // For io1, this represents the number of IOPS that are provisioned for the - // volume. For gp2, this represents the baseline performance of the volume and - // the rate at which the volume accumulates I/O credits for bursting. For more - // information about General Purpose SSD baseline performance, I/O credits, - // and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) - // in the Amazon Elastic Compute Cloud User Guide. - // - // Minimal and maximal IOPS for io1 and gp2 are constrained. Please, check - // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html - // for precise boundaries for individual volumes. - // - // Condition: This parameter is required for requests to create io1 volumes; - // it is not used in requests to create gp2, st1, sc1, or standard volumes. - // +optional - Iops *int64 `json:"iops,omitempty"` - // throughputMib to provision in MiB/s supported for the volume type. Not applicable to all types. - // - // This parameter is valid only for gp3 volumes. - // Valid Range: Minimum value of 125. Maximum value of 2000. - // - // When omitted, this means no opinion, and the platform is left to - // choose a reasonable default, which is subject to change over time. - // The current default is 125. - // - // +kubebuilder:validation:Minimum:=125 - // +kubebuilder:validation:Maximum:=2000 - // +optional - ThroughputMib *int32 `json:"throughputMib,omitempty"` - // The size of the volume, in GiB. - // - // Constraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned - // IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for - // Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify - // a snapshot, the volume size must be equal to or larger than the snapshot - // size. - // - // Default: If you're creating the volume from a snapshot and don't specify - // a volume size, the default is the snapshot size. - // +optional - VolumeSize *int64 `json:"volumeSize,omitempty"` - // volumeType can be of type gp2, gp3, io1, st1, sc1, or standard. - // Default: standard - // +optional - VolumeType *string `json:"volumeType,omitempty"` -} - -// SpotMarketOptions defines the options available to a user when configuring -// Machines to run on Spot instances. -// Most users should provide an empty struct. -type SpotMarketOptions struct { - // The maximum price the user is willing to pay for their instances - // Default: On-Demand price - // +optional - MaxPrice *string `json:"maxPrice,omitempty"` -} - -type MetadataServiceAuthentication string - -const ( - // MetadataServiceAuthenticationRequired enforces sending of a signed token header with any instance metadata retrieval (GET) requests. - // Enforces IMDSv2 usage. - MetadataServiceAuthenticationRequired = "Required" - // MetadataServiceAuthenticationOptional allows IMDSv1 usage along with IMDSv2 - MetadataServiceAuthenticationOptional = "Optional" -) - -// MetadataServiceOptions defines the options available to a user when configuring -// Instance Metadata Service (IMDS) Options. -type MetadataServiceOptions struct { - // authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. - // When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. - // When omitted, this means the user has no opinion and the value is left to the platform to choose a good - // default, which is subject to change over time. The current default is optional. - // At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API - // https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html - // +kubebuilder:validation:Enum=Required;Optional - // +optional - Authentication MetadataServiceAuthentication `json:"authentication,omitempty"` -} - -// AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. -// Only one of ID, ARN or Filters may be specified. Specifying more than one will result in -// a validation error. -type AWSResourceReference struct { - // id of resource - // +optional - ID *string `json:"id,omitempty"` - // arn of resource - // +optional - ARN *string `json:"arn,omitempty"` - // filters is a set of filters used to identify a resource - // +optional - Filters []Filter `json:"filters,omitempty"` -} - -// Placement indicates where to create the instance in AWS -// +kubebuilder:validation:XValidation:rule="has(self.tenancy) && self.tenancy == 'host' ? true : !has(self.host)",message="host may only be specified when tenancy is host" -type Placement struct { - // region is the region to use to create the instance - // +optional - Region string `json:"region,omitempty"` - // availabilityZone is the availability zone of the instance - // +optional - AvailabilityZone string `json:"availabilityZone,omitempty"` - // tenancy indicates if instance should run on shared or single-tenant hardware. There are - // supported 3 options: default, dedicated and host. - // When set to default Runs on shared multi-tenant hardware. - // When dedicated Runs on single-tenant hardware (any dedicated instance hardware). - // When host and the host object is not provided: Runs on Dedicated Host; best-effort restart on same host. - // When `host` and `host` object is provided with affinity `dedicatedHost` defined: Runs on specified Dedicated Host. - // +optional - Tenancy InstanceTenancy `json:"tenancy,omitempty"` - // host configures placement on AWS Dedicated Hosts. This allows admins to assign instances to specific host - // for a variety of needs including for regulatory compliance, to leverage existing per-socket or per-core software licenses (BYOL), - // and to gain visibility and control over instance placement on a physical server. - // When omitted, the instance is not constrained to a dedicated host. - // +openshift:enable:FeatureGate=AWSDedicatedHosts - // +optional - Host *HostPlacement `json:"host,omitempty"` -} - -// Filter is a filter used to identify an AWS resource -type Filter struct { - // name of the filter. Filter names are case-sensitive. - Name string `json:"name"` - // values includes one or more filter values. Filter values are case-sensitive. - // +optional - Values []string `json:"values,omitempty"` -} - -// TagSpecification is the name/value pair for a tag -type TagSpecification struct { - // name of the tag. - // This field is required and must be a non-empty string. - // Must be between 1 and 128 characters in length. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=128 - // +required - Name string `json:"name"` - // value of the tag. - // When omitted, this creates a tag with an empty string as the value. - // +optional - Value string `json:"value"` -} - -// AWSMachineProviderConfigList contains a list of AWSMachineProviderConfig -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type AWSMachineProviderConfigList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty"` - Items []AWSMachineProviderConfig `json:"items"` -} - -// LoadBalancerReference is a reference to a load balancer on AWS. -type LoadBalancerReference struct { - Name string `json:"name"` - Type AWSLoadBalancerType `json:"type"` -} - -// AWSLoadBalancerType is the type of LoadBalancer to use when registering -// an instance with load balancers specified in LoadBalancerNames -type AWSLoadBalancerType string - -// InstanceTenancy indicates if instance should run on shared or single-tenant hardware. -type InstanceTenancy string - -const ( - // DefaultTenancy instance runs on shared hardware - DefaultTenancy InstanceTenancy = "default" - // DedicatedTenancy instance runs on single-tenant hardware - DedicatedTenancy InstanceTenancy = "dedicated" - // HostTenancy instance runs on a Dedicated Host, which is an isolated server with configurations that you can control. - HostTenancy InstanceTenancy = "host" -) - -// Possible values for AWSLoadBalancerType. Add to this list as other types -// of load balancer are supported by the actuator. -const ( - ClassicLoadBalancerType AWSLoadBalancerType = "classic" // AWS classic ELB - NetworkLoadBalancerType AWSLoadBalancerType = "network" // AWS Network Load Balancer (NLB) -) - -// AWSNetworkInterfaceType defines the network interface type of the the -// AWS EC2 network interface. -type AWSNetworkInterfaceType string - -const ( - // AWSENANetworkInterfaceType is the default network interface type, - // the EC2 Elastic Network Adapter commonly used with EC2 instances. - // This should be used for standard network operations. - AWSENANetworkInterfaceType AWSNetworkInterfaceType = "ENA" - // AWSEFANetworkInterfaceType is the Elastic Fabric Adapter network interface type. - AWSEFANetworkInterfaceType AWSNetworkInterfaceType = "EFA" -) - -// AWSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains AWS-specific status information. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type AWSMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - // instanceId is the instance ID of the machine created in AWS - // +optional - InstanceID *string `json:"instanceId,omitempty"` - // instanceState is the state of the AWS instance for this machine - // +optional - InstanceState *string `json:"instanceState,omitempty"` - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` - // dedicatedHost tracks the dynamically allocated dedicated host. - // This field is populated when allocationStrategy is Dynamic (with or without DynamicHostAllocation). - // When omitted, this indicates that the dedicated host has not yet been allocated, or allocation is in progress. - // +optional - DedicatedHost *DedicatedHostStatus `json:"dedicatedHost,omitempty"` -} - -// DedicatedHostStatus defines the observed state of a dynamically allocated dedicated host -// associated with an AWSMachine. This struct is used to track the ID of the dedicated host. -type DedicatedHostStatus struct { - // id tracks the dynamically allocated dedicated host ID. - // This field is populated when allocationStrategy is Dynamic (with or without DynamicHostAllocation). - // The value must start with "h-" followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f). - // The use of 8 lowercase hexadecimal characters is for older legacy hosts that may not have been migrated to newer format. - // Must be either 10 or 19 characters in length. - // +kubebuilder:validation:XValidation:rule="self.matches('^h-([0-9a-f]{8}|[0-9a-f]{17})$')",message="id must start with 'h-' followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f)" - // +kubebuilder:validation:MinLength=10 - // +kubebuilder:validation:MaxLength=19 - // +required - ID string `json:"id,omitempty"` -} - -// MarketType describes the market type of an EC2 Instance -// +kubebuilder:validation:Enum:=OnDemand;Spot;CapacityBlock -type MarketType string - -const ( - - // MarketTypeOnDemand is a MarketType enum value - // When set to OnDemand the instance runs as a standard OnDemand instance. - MarketTypeOnDemand MarketType = "OnDemand" - - // MarketTypeSpot is a MarketType enum value - // When set to Spot the instance runs as a Spot instance. - MarketTypeSpot MarketType = "Spot" - - // MarketTypeCapacityBlock is a MarketType enum value - // When set to CapacityBlock the instance utilizes pre-purchased compute capacity (capacity blocks) with AWS Capacity Reservations. - MarketTypeCapacityBlock MarketType = "CapacityBlock" -) - -// HostPlacement is the type that will be used to configure the placement of AWS instances. -// +kubebuilder:validation:XValidation:rule="has(self.affinity) && self.affinity == 'DedicatedHost' ? has(self.dedicatedHost) : true",message="dedicatedHost is required when affinity is DedicatedHost, and optional otherwise" -// +union -type HostPlacement struct { - // affinity specifies the affinity setting for the instance. - // Allowed values are AnyAvailable and DedicatedHost. - // When Affinity is set to DedicatedHost, an instance started onto a specific host always restarts on the same host if stopped. In this scenario, the `dedicatedHost` field must be set. - // When Affinity is set to AnyAvailable, and you stop and restart the instance, it can be restarted on any available host. - // When Affinity is set to AnyAvailable and the `dedicatedHost` field is defined, it runs on specified Dedicated Host, but may move if stopped. - // +required - // +unionDiscriminator - Affinity *HostAffinity `json:"affinity,omitempty"` - - // dedicatedHost specifies the exact host that an instance should be restarted on if stopped. - // dedicatedHost is required when 'affinity' is set to DedicatedHost, and optional otherwise. - // +optional - // +unionMember - DedicatedHost *DedicatedHost `json:"dedicatedHost,omitempty"` -} - -// HostAffinity selects how an instance should be placed on AWS Dedicated Hosts. -// +kubebuilder:validation:Enum:=DedicatedHost;AnyAvailable -type HostAffinity string - -const ( - // HostAffinityAnyAvailable lets the platform select any available dedicated host. - - HostAffinityAnyAvailable HostAffinity = "AnyAvailable" - - // HostAffinityDedicatedHost requires specifying a particular host via dedicatedHost.host.hostID. - HostAffinityDedicatedHost HostAffinity = "DedicatedHost" -) - -// AllocationStrategy selects how a dedicated host is provided to the system for assigning to the instance. -// +kubebuilder:validation:Enum:=UserProvided;Dynamic -// +enum -type AllocationStrategy string - -const ( - // AllocationStrategyUserProvided specifies that the system should assign instances to a user-provided dedicated host. - AllocationStrategyUserProvided AllocationStrategy = "UserProvided" - - // AllocationStrategyDynamic specifies that the system should dynamically allocate a dedicated host for instances. - AllocationStrategyDynamic AllocationStrategy = "Dynamic" -) - -// DedicatedHost represents the configuration for the usage of dedicated host. -// +kubebuilder:validation:XValidation:rule="self.allocationStrategy == 'UserProvided' ? has(self.id) : !has(self.id)",message="id is required when allocationStrategy is UserProvided, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.dynamicHostAllocation) ? self.allocationStrategy == 'Dynamic' : true",message="dynamicHostAllocation is only allowed when allocationStrategy is Dynamic" -// +union -type DedicatedHost struct { - // allocationStrategy specifies if the dedicated host will be provided by the admin through the id field or if the host will be dynamically allocated. - // Valid values are UserProvided and Dynamic. - // When omitted, the value defaults to "UserProvided", which requires the id field to be set. - // When allocationStrategy is set to UserProvided, an ID of the dedicated host to assign must be provided. - // When allocationStrategy is set to Dynamic, a dedicated host will be allocated and used to assign instances. - // When allocationStrategy is set to Dynamic, and dynamicHostAllocation is configured, a dedicated host will be allocated and the tags in dynamicHostAllocation will be assigned to that host. - // +optional - // +unionDiscriminator - // +default="UserProvided" - AllocationStrategy *AllocationStrategy `json:"allocationStrategy,omitempty"` - - // id identifies the AWS Dedicated Host on which the instance must run. - // The value must start with "h-" followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f). - // The use of 8 lowercase hexadecimal characters is for older legacy hosts that may not have been migrated to newer format. - // Must be either 10 or 19 characters in length. - // This field is required when allocationStrategy is UserProvided, and forbidden otherwise. - // When omitted with allocationStrategy set to Dynamic, the platform will dynamically allocate a dedicated host. - // +kubebuilder:validation:XValidation:rule="self.matches('^h-([0-9a-f]{8}|[0-9a-f]{17})$')",message="id must start with 'h-' followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f)" - // +kubebuilder:validation:MinLength=10 - // +kubebuilder:validation:MaxLength=19 - // +optional - // +unionMember=UserProvided - ID string `json:"id,omitempty"` - - // dynamicHostAllocation specifies tags to apply to a dynamically allocated dedicated host. - // This field is only allowed when allocationStrategy is Dynamic, and is mutually exclusive with id. - // When specified, a dedicated host will be allocated with the provided tags applied. - // When omitted (and allocationStrategy is Dynamic), a dedicated host will be allocated without any additional tags. - // +optional - // +unionMember=Dynamic - DynamicHostAllocation *DynamicHostAllocationSpec `json:"dynamicHostAllocation,omitempty"` -} - -// DynamicHostAllocationSpec defines the configuration for dynamic dedicated host allocation. -// This specification always allocates exactly one dedicated host per machine. -// At least one property must be specified when this struct is used. -// Currently only Tags are available for configuring, but in the future more configs may become available. -// +kubebuilder:validation:MinProperties=1 -type DynamicHostAllocationSpec struct { - // tags specifies a set of key-value pairs to apply to the allocated dedicated host. - // When omitted, no additional user-defined tags will be applied to the allocated host. - // A maximum of 50 tags can be specified. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=50 - // +listType=map - // +listMapKey=name - // +optional - Tags *[]TagSpecification `json:"tags,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go deleted file mode 100644 index 2cb43d431..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_azureprovider.go +++ /dev/null @@ -1,577 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/resource" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// SecurityEncryptionTypes represents the Encryption Type when the Azure Virtual Machine is a -// Confidential VM. -type SecurityEncryptionTypes string - -const ( - // SecurityEncryptionTypesVMGuestStateOnly disables OS disk confidential encryption. - SecurityEncryptionTypesVMGuestStateOnly SecurityEncryptionTypes = "VMGuestStateOnly" - // SecurityEncryptionTypesDiskWithVMGuestState enables OS disk confidential encryption with a - // platform-managed key (PMK) or a customer-managed key (CMK). - SecurityEncryptionTypesDiskWithVMGuestState SecurityEncryptionTypes = "DiskWithVMGuestState" -) - -// SecurityTypes represents the SecurityType of the virtual machine. -type SecurityTypes string - -const ( - // SecurityTypesConfidentialVM defines the SecurityType of the virtual machine as a Confidential VM. - SecurityTypesConfidentialVM SecurityTypes = "ConfidentialVM" - // SecurityTypesTrustedLaunch defines the SecurityType of the virtual machine as a Trusted Launch VM. - SecurityTypesTrustedLaunch SecurityTypes = "TrustedLaunch" -) - -// AzureMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field -// for an Azure virtual machine. It is used by the Azure machine actuator to create a single Machine. -// Required parameters such as location that are not specified by this configuration, will be defaulted -// by the actuator. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AzureMachineProviderSpec struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance - // +optional - UserDataSecret *corev1.SecretReference `json:"userDataSecret,omitempty"` - // credentialsSecret is a reference to the secret with Azure credentials. - // +optional - CredentialsSecret *corev1.SecretReference `json:"credentialsSecret,omitempty"` - // location is the region to use to create the instance - // +optional - Location string `json:"location,omitempty"` - // vmSize is the size of the VM to create. - // +optional - VMSize string `json:"vmSize,omitempty"` - // image is the OS image to use to create the instance. - Image Image `json:"image"` - // osDisk represents the parameters for creating the OS disk. - OSDisk OSDisk `json:"osDisk"` - // DataDisk specifies the parameters that are used to add one or more data disks to the machine. - // +optional - DataDisks []DataDisk `json:"dataDisks,omitempty"` - // sshPublicKey is the public key to use to SSH to the virtual machine. - // +optional - SSHPublicKey string `json:"sshPublicKey,omitempty"` - // publicIP if true a public IP will be used - PublicIP bool `json:"publicIP"` - // tags is a list of tags to apply to the machine. - // +optional - Tags map[string]string `json:"tags,omitempty"` - // Network Security Group that needs to be attached to the machine's interface. - // No security group will be attached if empty. - // +optional - SecurityGroup string `json:"securityGroup,omitempty"` - // Application Security Groups that need to be attached to the machine's interface. - // No application security groups will be attached if zero-length. - // +optional - ApplicationSecurityGroups []string `json:"applicationSecurityGroups,omitempty"` - // subnet to use for this instance - Subnet string `json:"subnet"` - // publicLoadBalancer to use for this instance - // +optional - PublicLoadBalancer string `json:"publicLoadBalancer,omitempty"` - // InternalLoadBalancerName to use for this instance - // +optional - InternalLoadBalancer string `json:"internalLoadBalancer,omitempty"` - // natRule to set inbound NAT rule of the load balancer - // +optional - NatRule *int64 `json:"natRule,omitempty"` - // managedIdentity to set managed identity name - // +optional - ManagedIdentity string `json:"managedIdentity,omitempty"` - // vnet to set virtual network name - // +optional - Vnet string `json:"vnet,omitempty"` - // Availability Zone for the virtual machine. - // If nil, the virtual machine should be deployed to no zone - // +optional - Zone string `json:"zone,omitempty"` - // networkResourceGroup is the resource group for the virtual machine's network - // +optional - NetworkResourceGroup string `json:"networkResourceGroup,omitempty"` - // resourceGroup is the resource group for the virtual machine - // +optional - ResourceGroup string `json:"resourceGroup,omitempty"` - // spotVMOptions allows the ability to specify the Machine should use a Spot VM - // +optional - SpotVMOptions *SpotVMOptions `json:"spotVMOptions,omitempty"` - // securityProfile specifies the Security profile settings for a virtual machine. - // +optional - SecurityProfile *SecurityProfile `json:"securityProfile,omitempty"` - // ultraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. - // This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. - // This Azure feature is subject to a specific scope and certain limitations. - // More informations on this can be found in the official Azure documentation for Ultra Disks: - // (https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal#ga-scope-and-limitations). - // - // When omitted, if at least one Data Disk of type UltraSSD is specified, the platform will automatically enable the capability. - // If a Perisistent Volume backed by an UltraSSD is bound to a Pod on the Machine, when this field is ommitted, the platform will *not* automatically enable the capability (unless already enabled by the presence of an UltraSSD as Data Disk). - // This may manifest in the Pod being stuck in `ContainerCreating` phase. - // This defaulting behaviour may be subject to change in future. - // - // When set to "Enabled", if the capability is available for the Machine based on the scope and limitations described above, the capability will be set on the Machine. - // This will thus allow UltraSSD both as Data Disks and Persistent Volumes. - // If set to "Enabled" when the capability can't be available due to scope and limitations, the Machine will go into "Failed" state. - // - // When set to "Disabled", UltraSSDs will not be allowed either as Data Disks nor as Persistent Volumes. - // In this case if any UltraSSDs are specified as Data Disks on a Machine, the Machine will go into a "Failed" state. - // If instead any UltraSSDs are backing the volumes (via Persistent Volumes) of any Pods scheduled on a Node which is backed by the Machine, the Pod may get stuck in `ContainerCreating` phase. - // - // +kubebuilder:validation:Enum:="Enabled";"Disabled" - // +optional - UltraSSDCapability AzureUltraSSDCapabilityState `json:"ultraSSDCapability,omitempty"` - // acceleratedNetworking enables or disables Azure accelerated networking feature. - // Set to false by default. If true, then this will depend on whether the requested - // VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error. - // +optional - AcceleratedNetworking bool `json:"acceleratedNetworking,omitempty"` - // availabilitySet specifies the availability set to use for this instance. - // Availability set should be precreated, before using this field. - // +optional - AvailabilitySet string `json:"availabilitySet,omitempty"` - // diagnostics configures the diagnostics settings for the virtual machine. - // This allows you to configure boot diagnostics such as capturing serial output from - // the virtual machine on boot. - // This is useful for debugging software based launch issues. - // +optional - Diagnostics AzureDiagnostics `json:"diagnostics,omitempty"` - // capacityReservationGroupID specifies the capacity reservation group resource id that should be - // used for allocating the virtual machine. - // The field size should be greater than 0 and the field input must start with '/'. - // The input for capacityReservationGroupID must be similar to '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'. - // The keys which are used should be among 'subscriptions', 'providers' and 'resourcegroups' followed by valid ID or names respectively. - // +optional - CapacityReservationGroupID string `json:"capacityReservationGroupID,omitempty"` -} - -// SpotVMOptions defines the options relevant to running the Machine on Spot VMs -type SpotVMOptions struct { - // maxPrice defines the maximum price the user is willing to pay for Spot VM instances - // +optional - MaxPrice *resource.Quantity `json:"maxPrice,omitempty"` -} - -// AzureDiagnostics is used to configure the diagnostic settings of the virtual machine. -type AzureDiagnostics struct { - // AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. - // This allows you to configure capturing serial output from the virtual machine on boot. - // This is useful for debugging software based launch issues. - // + This is a pointer so that we can validate required fields only when the structure is - // + configured by the user. - // +optional - Boot *AzureBootDiagnostics `json:"boot,omitempty"` -} - -// AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. -// This allows you to configure capturing serial output from the virtual machine on boot. -// This is useful for debugging software based launch issues. -// +union -type AzureBootDiagnostics struct { - // storageAccountType determines if the storage account for storing the diagnostics data - // should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged). - // +required - // +unionDiscriminator - StorageAccountType AzureBootDiagnosticsStorageAccountType `json:"storageAccountType"` - - // customerManaged provides reference to the customer manager storage account. - // +optional - CustomerManaged *AzureCustomerManagedBootDiagnostics `json:"customerManaged,omitempty"` -} - -// AzureCustomerManagedBootDiagnostics provides reference to a customer managed -// storage account. -type AzureCustomerManagedBootDiagnostics struct { - // storageAccountURI is the URI of the customer managed storage account. - // The URI typically will be `https://.blob.core.windows.net/` - // but may differ if you are using Azure DNS zone endpoints. - // You can find the correct endpoint by looking for the Blob Primary Endpoint in the - // endpoints tab in the Azure console. - // +required - // +kubebuilder:validation:Pattern=`^https://` - // +kubebuilder:validation:MaxLength=1024 - StorageAccountURI string `json:"storageAccountURI"` -} - -// AzureBootDiagnosticsStorageAccountType defines the list of valid storage account types -// for the boot diagnostics. -// +kubebuilder:validation:Enum:="AzureManaged";"CustomerManaged" -type AzureBootDiagnosticsStorageAccountType string - -const ( - // AzureManagedAzureDiagnosticsStorage is used to determine that the diagnostics storage account - // should be provisioned by Azure. - AzureManagedAzureDiagnosticsStorage AzureBootDiagnosticsStorageAccountType = "AzureManaged" - - // CustomerManagedAzureDiagnosticsStorage is used to determine that the diagnostics storage account - // should be provisioned by the Customer. - CustomerManagedAzureDiagnosticsStorage AzureBootDiagnosticsStorageAccountType = "CustomerManaged" -) - -// AzureMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains Azure-specific status information. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type AzureMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // vmId is the ID of the virtual machine created in Azure. - // +optional - VMID *string `json:"vmId,omitempty"` - // vmState is the provisioning state of the Azure virtual machine. - // +optional - VMState *AzureVMState `json:"vmState,omitempty"` - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status. - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// VMState describes the state of an Azure virtual machine. -type AzureVMState string - -const ( - // ProvisioningState related values - // VMStateCreating ... - VMStateCreating = AzureVMState("Creating") - // VMStateDeleting ... - VMStateDeleting = AzureVMState("Deleting") - // VMStateFailed ... - VMStateFailed = AzureVMState("Failed") - // VMStateMigrating ... - VMStateMigrating = AzureVMState("Migrating") - // VMStateSucceeded ... - VMStateSucceeded = AzureVMState("Succeeded") - // VMStateUpdating ... - VMStateUpdating = AzureVMState("Updating") - - // PowerState related values - // VMStateStarting ... - VMStateStarting = AzureVMState("Starting") - // VMStateRunning ... - VMStateRunning = AzureVMState("Running") - // VMStateStopping ... - VMStateStopping = AzureVMState("Stopping") - // VMStateStopped ... - VMStateStopped = AzureVMState("Stopped") - // VMStateDeallocating ... - VMStateDeallocating = AzureVMState("Deallocating") - // VMStateDeallocated ... - VMStateDeallocated = AzureVMState("Deallocated") - // VMStateUnknown ... - VMStateUnknown = AzureVMState("Unknown") -) - -// Image is a mirror of azure sdk compute.ImageReference -type Image struct { - // publisher is the name of the organization that created the image - Publisher string `json:"publisher"` - // offer specifies the name of a group of related images created by the publisher. - // For example, UbuntuServer, WindowsServer - Offer string `json:"offer"` - // sku specifies an instance of an offer, such as a major release of a distribution. - // For example, 18.04-LTS, 2019-Datacenter - SKU string `json:"sku"` - // version specifies the version of an image sku. The allowed formats - // are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. - // Specify 'latest' to use the latest version of an image available at deploy time. - // Even if you use 'latest', the VM image will not automatically update after deploy - // time even if a new version becomes available. - Version string `json:"version"` - // resourceID specifies an image to use by ID - ResourceID string `json:"resourceID"` - // type identifies the source of the image and related information, such as purchase plans. - // Valid values are "ID", "MarketplaceWithPlan", "MarketplaceNoPlan", and omitted, which - // means no opinion and the platform chooses a good default which may change over time. - // Currently that default is "MarketplaceNoPlan" if publisher data is supplied, or "ID" if not. - // For more information about purchase plans, see: - // https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information - // +optional - Type AzureImageType `json:"type,omitempty"` -} - -// AzureImageType provides an enumeration for the valid image types. -type AzureImageType string - -const ( - // AzureImageTypeID specifies that the image should be referenced by its resource ID. - AzureImageTypeID AzureImageType = "ID" - // AzureImageTypeMarketplaceNoPlan are images available from the marketplace that do not require a purchase plan. - AzureImageTypeMarketplaceNoPlan AzureImageType = "MarketplaceNoPlan" - // AzureImageTypeMarketplaceWithPlan require a purchase plan. Upstream these images are referred to as "ThirdParty." - AzureImageTypeMarketplaceWithPlan AzureImageType = "MarketplaceWithPlan" -) - -type OSDisk struct { - // osType is the operating system type of the OS disk. Possible values include "Linux" and "Windows". - OSType string `json:"osType"` - // managedDisk specifies the Managed Disk parameters for the OS disk. - ManagedDisk OSDiskManagedDiskParameters `json:"managedDisk"` - // diskSizeGB is the size in GB to assign to the data disk. - DiskSizeGB int32 `json:"diskSizeGB"` - // diskSettings describe ephemeral disk settings for the os disk. - // +optional - DiskSettings DiskSettings `json:"diskSettings,omitempty"` - // cachingType specifies the caching requirements. - // Possible values include: 'None', 'ReadOnly', 'ReadWrite'. - // Empty value means no opinion and the platform chooses a default, which is subject to change over - // time. Currently the default is `None`. - // +optional - // +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite - CachingType string `json:"cachingType,omitempty"` -} - -// DataDisk specifies the parameters that are used to add one or more data disks to the machine. -// A Data Disk is a managed disk that's attached to a virtual machine to store application data. -// It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. -// It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`. -// -// As the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. -// This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. -// At this stage the previously defined `lun` is to be used as the "device" key for referencing the raw disk device to be initialized. -// Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. -// For further guidance and examples, please refer to the official OpenShift docs. -type DataDisk struct { - // nameSuffix is the suffix to be appended to the machine name to generate the disk name. - // Each disk name will be in format _. - // NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. - // The overall disk name must not exceed 80 chars in length. - // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9](?:[\w\.-]*[a-zA-Z0-9])?$` - // +kubebuilder:validation:MaxLength:=78 - // +required - NameSuffix string `json:"nameSuffix"` - // diskSizeGB is the size in GB to assign to the data disk. - // +kubebuilder:validation:Minimum=4 - // +required - DiskSizeGB int32 `json:"diskSizeGB"` - // managedDisk specifies the Managed Disk parameters for the data disk. - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is a ManagedDisk with with storageAccountType: "Premium_LRS" and diskEncryptionSet.id: "Default". - // +optional - ManagedDisk DataDiskManagedDiskParameters `json:"managedDisk,omitempty"` - // lun Specifies the logical unit number of the data disk. - // This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. - // This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). - // The value must be between 0 and 63. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=63 - // +required - Lun int32 `json:"lun"` - // cachingType specifies the caching requirements. - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is CachingTypeNone. - // +optional - // +kubebuilder:validation:Enum=None;ReadOnly;ReadWrite - CachingType CachingTypeOption `json:"cachingType,omitempty"` - // deletionPolicy specifies the data disk deletion policy upon Machine deletion. - // Possible values are "Delete","Detach". - // When "Delete" is used the data disk is deleted when the Machine is deleted. - // When "Detach" is used the data disk is detached from the Machine and retained when the Machine is deleted. - // +kubebuilder:validation:Enum=Delete;Detach - // +required - DeletionPolicy DiskDeletionPolicyType `json:"deletionPolicy"` -} - -// DiskDeletionPolicyType defines the possible values for DeletionPolicy. -type DiskDeletionPolicyType string - -// These are the valid DiskDeletionPolicyType values. -const ( - // DiskDeletionPolicyTypeDelete means the DiskDeletionPolicyType is "Delete". - DiskDeletionPolicyTypeDelete DiskDeletionPolicyType = "Delete" - // DiskDeletionPolicyTypeDetach means the DiskDeletionPolicyType is "Detach". - DiskDeletionPolicyTypeDetach DiskDeletionPolicyType = "Detach" -) - -// CachingTypeOption defines the different values for a CachingType. -type CachingTypeOption string - -// These are the valid CachingTypeOption values. -const ( - // CachingTypeReadOnly means the CachingType is "ReadOnly". - CachingTypeReadOnly CachingTypeOption = "ReadOnly" - // CachingTypeReadWrite means the CachingType is "ReadWrite". - CachingTypeReadWrite CachingTypeOption = "ReadWrite" - // CachingTypeNone means the CachingType is "None". - CachingTypeNone CachingTypeOption = "None" -) - -// DiskSettings describe ephemeral disk settings for the os disk. -type DiskSettings struct { - // ephemeralStorageLocation enables ephemeral OS when set to 'Local'. - // Possible values include: 'Local'. - // See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details. - // Empty value means no opinion and the platform chooses a default, which is subject to change over - // time. Currently the default is that disks are saved to remote Azure storage. - // +optional - // +kubebuilder:validation:Enum=Local - EphemeralStorageLocation string `json:"ephemeralStorageLocation,omitempty"` -} - -// OSDiskManagedDiskParameters is the parameters of a OSDisk managed disk. -type OSDiskManagedDiskParameters struct { - // storageAccountType is the storage account type to use. - // Possible values include "Standard_LRS", "Premium_LRS". - StorageAccountType string `json:"storageAccountType"` - // diskEncryptionSet is the disk encryption set properties - // +optional - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` - // securityProfile specifies the security profile for the managed disk. - // +optional - SecurityProfile VMDiskSecurityProfile `json:"securityProfile,omitempty"` -} - -// VMDiskSecurityProfile specifies the security profile settings for the managed disk. -// It can be set only for Confidential VMs. -type VMDiskSecurityProfile struct { - // diskEncryptionSet specifies the customer managed disk encryption set resource id for the - // managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and - // VMGuest blob. - // +optional - DiskEncryptionSet DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` - // securityEncryptionType specifies the encryption type of the managed disk. - // It is set to DiskWithVMGuestState to encrypt the managed disk along with the VMGuestState - // blob, and to VMGuestStateOnly to encrypt the VMGuestState blob only. - // When set to VMGuestStateOnly, the vTPM should be enabled. - // When set to DiskWithVMGuestState, both SecureBoot and vTPM should be enabled. - // If the above conditions are not fulfilled, the VM will not be created and the respective error - // will be returned. - // It can be set only for Confidential VMs. Confidential VMs are defined by their - // SecurityProfile.SecurityType being set to ConfidentialVM, the SecurityEncryptionType of their - // OS disk being set to one of the allowed values and by enabling the respective - // SecurityProfile.UEFISettings of the VM (i.e. vTPM and SecureBoot), depending on the selected - // SecurityEncryptionType. - // For further details on Azure Confidential VMs, please refer to the respective documentation: - // https://learn.microsoft.com/azure/confidential-computing/confidential-vm-overview - // +kubebuilder:validation:Enum=VMGuestStateOnly;DiskWithVMGuestState - // +optional - SecurityEncryptionType SecurityEncryptionTypes `json:"securityEncryptionType,omitempty"` -} - -// DataDiskManagedDiskParameters is the parameters of a DataDisk managed disk. -type DataDiskManagedDiskParameters struct { - // storageAccountType is the storage account type to use. - // Possible values include "Standard_LRS", "Premium_LRS" and "UltraSSD_LRS". - // +kubebuilder:validation:Enum=Standard_LRS;Premium_LRS;UltraSSD_LRS - StorageAccountType StorageAccountType `json:"storageAccountType"` - // diskEncryptionSet is the disk encryption set properties. - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is a DiskEncryptionSet with id: "Default". - // +optional - DiskEncryptionSet *DiskEncryptionSetParameters `json:"diskEncryptionSet,omitempty"` -} - -// StorageAccountType defines the different storage types to use for a ManagedDisk. -type StorageAccountType string - -// These are the valid StorageAccountType types. -const ( - // "StorageAccountStandardLRS" means the Standard_LRS storage type. - StorageAccountStandardLRS StorageAccountType = "Standard_LRS" - // "StorageAccountPremiumLRS" means the Premium_LRS storage type. - StorageAccountPremiumLRS StorageAccountType = "Premium_LRS" - // "StorageAccountUltraSSDLRS" means the UltraSSD_LRS storage type. - StorageAccountUltraSSDLRS StorageAccountType = "UltraSSD_LRS" -) - -// DiskEncryptionSetParameters is the disk encryption set properties -type DiskEncryptionSetParameters struct { - // id is the disk encryption set ID - // Empty value means no opinion and the platform chooses a default, which is subject to change over time. - // Currently the default is: "Default". - // +optional - ID string `json:"id,omitempty"` -} - -// SecurityProfile specifies the Security profile settings for a -// virtual machine or virtual machine scale set. -type SecurityProfile struct { - // encryptionAtHost indicates whether Host Encryption should be enabled or disabled for a virtual - // machine or virtual machine scale set. - // This should be disabled when SecurityEncryptionType is set to DiskWithVMGuestState. - // Default is disabled. - // +optional - EncryptionAtHost *bool `json:"encryptionAtHost,omitempty"` - // settings specify the security type and the UEFI settings of the virtual machine. This field can - // be set for Confidential VMs and Trusted Launch for VMs. - // +optional - Settings SecuritySettings `json:"settings,omitempty"` -} - -// SecuritySettings define the security type and the UEFI settings of the virtual machine. -// +union -type SecuritySettings struct { - // securityType specifies the SecurityType of the virtual machine. It has to be set to any specified value to - // enable UEFISettings. The default behavior is: UEFISettings will not be enabled unless this property is set. - // +kubebuilder:validation:Enum=ConfidentialVM;TrustedLaunch - // +required - // +unionDiscriminator - SecurityType SecurityTypes `json:"securityType"` - // confidentialVM specifies the security configuration of the virtual machine. - // For more information regarding Confidential VMs, please refer to: - // https://learn.microsoft.com/azure/confidential-computing/confidential-vm-overview - // +optional - ConfidentialVM *ConfidentialVM `json:"confidentialVM,omitempty"` - // trustedLaunch specifies the security configuration of the virtual machine. - // For more information regarding TrustedLaunch for VMs, please refer to: - // https://learn.microsoft.com/azure/virtual-machines/trusted-launch - // +optional - TrustedLaunch *TrustedLaunch `json:"trustedLaunch,omitempty"` -} - -// ConfidentialVM defines the UEFI settings for the virtual machine. -type ConfidentialVM struct { - // uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine. - // +required - UEFISettings UEFISettings `json:"uefiSettings"` -} - -// TrustedLaunch defines the UEFI settings for the virtual machine. -type TrustedLaunch struct { - // uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine. - // +required - UEFISettings UEFISettings `json:"uefiSettings"` -} - -// UEFISettings specifies the security settings like secure boot and vTPM used while creating the -// virtual machine. -type UEFISettings struct { - // secureBoot specifies whether secure boot should be enabled on the virtual machine. - // Secure Boot verifies the digital signature of all boot components and halts the boot process if - // signature verification fails. - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is disabled. - // +kubebuilder:validation:Enum=Enabled;Disabled - // +optional - SecureBoot SecureBootPolicy `json:"secureBoot,omitempty"` - // virtualizedTrustedPlatformModule specifies whether vTPM should be enabled on the virtual machine. - // When enabled the virtualized trusted platform module measurements are used to create a known good boot integrity policy baseline. - // The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. - // This is required to be enabled if SecurityEncryptionType is defined. - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is disabled. - // +kubebuilder:validation:Enum=Enabled;Disabled - // +optional - VirtualizedTrustedPlatformModule VirtualizedTrustedPlatformModulePolicy `json:"virtualizedTrustedPlatformModule,omitempty"` -} - -// AzureUltraSSDCapabilityState defines the different states of an UltraSSDCapability -type AzureUltraSSDCapabilityState string - -// These are the valid AzureUltraSSDCapabilityState states. -const ( - // "AzureUltraSSDCapabilityEnabled" means the Azure UltraSSDCapability is Enabled - AzureUltraSSDCapabilityEnabled AzureUltraSSDCapabilityState = "Enabled" - // "AzureUltraSSDCapabilityDisabled" means the Azure UltraSSDCapability is Disabled - AzureUltraSSDCapabilityDisabled AzureUltraSSDCapabilityState = "Disabled" -) diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go deleted file mode 100644 index 9713a4e4a..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_gcpprovider.go +++ /dev/null @@ -1,362 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// GCPHostMaintenanceType is a type representing acceptable values for OnHostMaintenance field in GCPMachineProviderSpec -type GCPHostMaintenanceType string - -const ( - // MigrateHostMaintenanceType [default] - causes Compute Engine to live migrate an instance when there is a maintenance event. - MigrateHostMaintenanceType GCPHostMaintenanceType = "Migrate" - // TerminateHostMaintenanceType - stops an instance instead of migrating it. - TerminateHostMaintenanceType GCPHostMaintenanceType = "Terminate" -) - -// GCPHostMaintenanceType is a type representing acceptable values for RestartPolicy field in GCPMachineProviderSpec -type GCPRestartPolicyType string - -const ( - // Restart an instance if an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event. - RestartPolicyAlways GCPRestartPolicyType = "Always" - // Do not restart an instance if an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event. - RestartPolicyNever GCPRestartPolicyType = "Never" -) - -// GCPProvisioningModelType is a type representing acceptable values for ProvisioningModel field in GCPMachineProviderSpec -type GCPProvisioningModelType string - -const ( - // GCPSpotInstance enables the GCP instances as spot instances which provide significant cost savings but may be preempted by Google Cloud Platform when resources are needed elsewhere. - GCPSpotInstance GCPProvisioningModelType = "Spot" -) - -// SecureBootPolicy represents the secure boot configuration for the GCP machine. -type SecureBootPolicy string - -const ( - // SecureBootPolicyEnabled enables the secure boot configuration for the GCP machine. - SecureBootPolicyEnabled SecureBootPolicy = "Enabled" - // SecureBootPolicyDisabled disables the secure boot configuration for the GCP machine. - SecureBootPolicyDisabled SecureBootPolicy = "Disabled" -) - -// VirtualizedTrustedPlatformModulePolicy represents the virtualized trusted platform module configuration for the GCP machine. -type VirtualizedTrustedPlatformModulePolicy string - -const ( - // VirtualizedTrustedPlatformModulePolicyEnabled enables the virtualized trusted platform module configuration for the GCP machine. - VirtualizedTrustedPlatformModulePolicyEnabled VirtualizedTrustedPlatformModulePolicy = "Enabled" - // VirtualizedTrustedPlatformModulePolicyDisabled disables the virtualized trusted platform module configuration for the GCP machine. - VirtualizedTrustedPlatformModulePolicyDisabled VirtualizedTrustedPlatformModulePolicy = "Disabled" -) - -// IntegrityMonitoringPolicy represents the integrity monitoring configuration for the GCP machine. -type IntegrityMonitoringPolicy string - -const ( - // IntegrityMonitoringPolicyEnabled enables integrity monitoring for the GCP machine. - IntegrityMonitoringPolicyEnabled IntegrityMonitoringPolicy = "Enabled" - // IntegrityMonitoringPolicyDisabled disables integrity monitoring for the GCP machine. - IntegrityMonitoringPolicyDisabled IntegrityMonitoringPolicy = "Disabled" -) - -// ConfidentialComputePolicy represents the confidential compute configuration for the GCP machine. -type ConfidentialComputePolicy string - -const ( - // ConfidentialComputePolicyEnabled enables confidential compute for the GCP machine. - ConfidentialComputePolicyEnabled ConfidentialComputePolicy = "Enabled" - // ConfidentialComputePolicyDisabled disables confidential compute for the GCP machine. - ConfidentialComputePolicyDisabled ConfidentialComputePolicy = "Disabled" - // ConfidentialComputePolicySEV sets AMD SEV as the VM instance's confidential computing technology of choice. - ConfidentialComputePolicySEV ConfidentialComputePolicy = "AMDEncryptedVirtualization" - // ConfidentialComputePolicySEVSNP sets AMD SEV-SNP as the VM instance's confidential computing technology of choice. - ConfidentialComputePolicySEVSNP ConfidentialComputePolicy = "AMDEncryptedVirtualizationNestedPaging" - // ConfidentialComputePolicyTDX sets Intel TDX as the VM instance's confidential computing technology of choice. - ConfidentialComputePolicyTDX ConfidentialComputePolicy = "IntelTrustedDomainExtensions" -) - -// GCPMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field -// for an GCP virtual machine. It is used by the GCP machine actuator to create a single Machine. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type GCPMachineProviderSpec struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance - // +optional - UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` - // credentialsSecret is a reference to the secret with GCP credentials. - // +optional - CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // canIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. - // This is required if you plan to use this instance to forward routes. - CanIPForward bool `json:"canIPForward"` - // deletionProtection whether the resource should be protected against deletion. - DeletionProtection bool `json:"deletionProtection"` - // disks is a list of disks to be attached to the VM. - // +optional - Disks []*GCPDisk `json:"disks,omitempty"` - // labels list of labels to apply to the VM. - // +optional - Labels map[string]string `json:"labels,omitempty"` - // Metadata key/value pairs to apply to the VM. - // +optional - Metadata []*GCPMetadata `json:"gcpMetadata,omitempty"` - // networkInterfaces is a list of network interfaces to be attached to the VM. - // +optional - NetworkInterfaces []*GCPNetworkInterface `json:"networkInterfaces,omitempty"` - // serviceAccounts is a list of GCP service accounts to be used by the VM. - ServiceAccounts []GCPServiceAccount `json:"serviceAccounts"` - // tags list of network tags to apply to the VM. - Tags []string `json:"tags,omitempty"` - // targetPools are used for network TCP/UDP load balancing. A target pool references member instances, - // an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool - // +optional - TargetPools []string `json:"targetPools,omitempty"` - // machineType is the machine type to use for the VM. - MachineType string `json:"machineType"` - // region is the region in which the GCP machine provider will create the VM. - Region string `json:"region"` - // zone is the zone in which the GCP machine provider will create the VM. - Zone string `json:"zone"` - // projectID is the project in which the GCP machine provider will create the VM. - // +optional - ProjectID string `json:"projectID,omitempty"` - // gpus is a list of GPUs to be attached to the VM. - // +optional - GPUs []GCPGPUConfig `json:"gpus,omitempty"` - // preemptible indicates if created instance is preemptible. - // +optional - Preemptible bool `json:"preemptible,omitempty"` - // provisioningModel is an optional field that determines the provisioning model for the GCP machine instance. - // Valid values are "Spot" and omitted. - // When set to Spot, the instance runs as a Google Cloud Spot instance which provides significant cost savings but may be preempted by Google Cloud Platform when resources are needed elsewhere. - // When omitted, the machine will be provisioned as a standard on-demand instance. - // This field cannot be used together with the preemptible field. - // +optional - // +kubebuilder:validation:Enum=Spot - ProvisioningModel *GCPProvisioningModelType `json:"provisioningModel,omitempty"` - // onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. - // This is required to be set to "Terminate" if you want to provision machine with attached GPUs. - // Otherwise, allowed values are "Migrate" and "Terminate". - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is "Migrate". - // +kubebuilder:validation:Enum=Migrate;Terminate; - // +optional - OnHostMaintenance GCPHostMaintenanceType `json:"onHostMaintenance,omitempty"` - // restartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default "Always"). - // Cannot be "Always" with preemptible instances. - // Otherwise, allowed values are "Always" and "Never". - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is "Always". - // RestartPolicy represents AutomaticRestart in GCP compute api - // +kubebuilder:validation:Enum=Always;Never; - // +optional - RestartPolicy GCPRestartPolicyType `json:"restartPolicy,omitempty"` - - // shieldedInstanceConfig is the Shielded VM configuration for the VM - // +optional - ShieldedInstanceConfig GCPShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"` - - // confidentialCompute is an optional field defining whether the instance should have confidential compute enabled or not, and the confidential computing technology of choice. - // Allowed values are omitted, Disabled, Enabled, AMDEncryptedVirtualization, AMDEncryptedVirtualizationNestedPaging, and IntelTrustedDomainExtensions - // When set to Disabled, the machine will not be configured to be a confidential computing instance. - // When set to Enabled, the machine will be configured as a confidential computing instance with no preference on the confidential compute policy used. In this mode, the platform chooses a default that is subject to change over time. Currently, the default is to use AMD Secure Encrypted Virtualization. - // When set to AMDEncryptedVirtualization, the machine will be configured as a confidential computing instance with AMD Secure Encrypted Virtualization (AMD SEV) as the confidential computing technology. - // When set to AMDEncryptedVirtualizationNestedPaging, the machine will be configured as a confidential computing instance with AMD Secure Encrypted Virtualization Secure Nested Paging (AMD SEV-SNP) as the confidential computing technology. - // When set to IntelTrustedDomainExtensions, the machine will be configured as a confidential computing instance with Intel Trusted Domain Extensions (Intel TDX) as the confidential computing technology. - // If any value other than Disabled is set the selected machine type must support that specific confidential computing technology. The machine series supporting confidential computing technologies can be checked at https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#all-confidential-vm-instances - // Currently, AMDEncryptedVirtualization is supported in c2d, n2d, and c3d machines. - // AMDEncryptedVirtualizationNestedPaging is supported in n2d machines. - // IntelTrustedDomainExtensions is supported in c3 machines. - // If any value other than Disabled is set, the selected region must support that specific confidential computing technology. The list of regions supporting confidential computing technologies can be checked at https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#supported-zones - // If any value other than Disabled is set onHostMaintenance is required to be set to "Terminate". - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled. - // +kubebuilder:validation:Enum="";Enabled;Disabled;AMDEncryptedVirtualization;AMDEncryptedVirtualizationNestedPaging;IntelTrustedDomainExtensions - // +optional - ConfidentialCompute ConfidentialComputePolicy `json:"confidentialCompute,omitempty"` - - // resourceManagerTags is an optional list of tags to apply to the GCP resources created for - // the cluster. See https://cloud.google.com/resource-manager/docs/tags/tags-overview for - // information on tagging GCP resources. GCP supports a maximum of 50 tags per resource. - // +kubebuilder:validation:MaxItems=50 - // +listType=map - // +listMapKey=key - // +optional - ResourceManagerTags []ResourceManagerTag `json:"resourceManagerTags,omitempty"` -} - -// ResourceManagerTag is a tag to apply to GCP resources created for the cluster. -type ResourceManagerTag struct { - // parentID is the ID of the hierarchical resource where the tags are defined - // e.g. at the Organization or the Project level. To find the Organization or Project ID ref - // https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id - // https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects - // An OrganizationID can have a maximum of 32 characters and must consist of decimal numbers, and - // cannot have leading zeroes. A ProjectID must be 6 to 30 characters in length, can only contain - // lowercase letters, numbers, and hyphens, and must start with a letter, and cannot end with a hyphen. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=32 - // +kubebuilder:validation:Pattern=`(^[1-9][0-9]{0,31}$)|(^[a-z][a-z0-9-]{4,28}[a-z0-9]$)` - ParentID string `json:"parentID"` - - // key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty. - // Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase - // alphanumeric characters, and the following special characters `._-`. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.-]{0,61}[a-zA-Z0-9])?$` - Key string `json:"key"` - - // value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty. - // Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase - // alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=63 - // +kubebuilder:validation:Pattern=`^[a-zA-Z0-9]([0-9A-Za-z_.@%=+:,*#&()\[\]{}\-\s]{0,61}[a-zA-Z0-9])?$` - Value string `json:"value"` -} - -// GCPDisk describes disks for GCP. -type GCPDisk struct { - // autoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false). - AutoDelete bool `json:"autoDelete"` - // boot indicates if this is a boot disk (default false). - Boot bool `json:"boot"` - // sizeGb is the size of the disk (in GB). - SizeGB int64 `json:"sizeGb"` - // type is the type of the disk (eg: pd-standard). - Type string `json:"type"` - // image is the source image to create this disk. - Image string `json:"image"` - // labels list of labels to apply to the disk. - Labels map[string]string `json:"labels"` - // encryptionKey is the customer-supplied encryption key of the disk. - // +optional - EncryptionKey *GCPEncryptionKeyReference `json:"encryptionKey,omitempty"` -} - -// GCPMetadata describes metadata for GCP. -type GCPMetadata struct { - // key is the metadata key. - Key string `json:"key"` - // value is the metadata value. - Value *string `json:"value"` -} - -// GCPNetworkInterface describes network interfaces for GCP -type GCPNetworkInterface struct { - // publicIP indicates if true a public IP will be used - PublicIP bool `json:"publicIP,omitempty"` - // network is the network name. - Network string `json:"network,omitempty"` - // projectID is the project in which the GCP machine provider will create the VM. - ProjectID string `json:"projectID,omitempty"` - // subnetwork is the subnetwork name. - Subnetwork string `json:"subnetwork,omitempty"` -} - -// GCPServiceAccount describes service accounts for GCP. -type GCPServiceAccount struct { - // email is the service account email. - Email string `json:"email"` - // scopes list of scopes to be assigned to the service account. - Scopes []string `json:"scopes"` -} - -// GCPEncryptionKeyReference describes the encryptionKey to use for a disk's encryption. -type GCPEncryptionKeyReference struct { - // KMSKeyName is the reference KMS key, in the format - // +optional - KMSKey *GCPKMSKeyReference `json:"kmsKey,omitempty"` - // kmsKeyServiceAccount is the service account being used for the - // encryption request for the given KMS key. If absent, the Compute - // Engine default service account is used. - // See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account - // for details on the default service account. - // +optional - KMSKeyServiceAccount string `json:"kmsKeyServiceAccount,omitempty"` -} - -// GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key -type GCPKMSKeyReference struct { - // name is the name of the customer managed encryption key to be used for the disk encryption. - Name string `json:"name"` - // keyRing is the name of the KMS Key Ring which the KMS Key belongs to. - KeyRing string `json:"keyRing"` - // projectID is the ID of the Project in which the KMS Key Ring exists. - // Defaults to the VM ProjectID if not set. - // +optional - ProjectID string `json:"projectID,omitempty"` - // location is the GCP location in which the Key Ring exists. - Location string `json:"location"` -} - -// GCPGPUConfig describes type and count of GPUs attached to the instance on GCP. -type GCPGPUConfig struct { - // count is the number of GPUs to be attached to an instance. - Count int32 `json:"count"` - // type is the type of GPU to be attached to an instance. - // Supported GPU types are: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-v100, nvidia-tesla-p4, nvidia-tesla-t4 - // +kubebuilder:validation:Pattern=`^nvidia-tesla-(k80|p100|v100|p4|t4)$` - Type string `json:"type"` -} - -// GCPMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains GCP-specific status information. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type GCPMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // instanceId is the ID of the instance in GCP - // +optional - InstanceID *string `json:"instanceId,omitempty"` - // instanceState is the provisioning state of the GCP Instance. - // +optional - InstanceState *string `json:"instanceState,omitempty"` - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -// GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. -// Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring. -type GCPShieldedInstanceConfig struct { - // secureBoot Defines whether the instance should have secure boot enabled. - // Secure Boot verify the digital signature of all boot components, and halting the boot process if signature verification fails. - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled. - // +kubebuilder:validation:Enum=Enabled;Disabled - //+optional - SecureBoot SecureBootPolicy `json:"secureBoot,omitempty"` - - // virtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. - // The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. - // This is required to be set to "Enabled" if IntegrityMonitoring is enabled. - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled. - // +kubebuilder:validation:Enum=Enabled;Disabled - // +optional - VirtualizedTrustedPlatformModule VirtualizedTrustedPlatformModulePolicy `json:"virtualizedTrustedPlatformModule,omitempty"` - - // integrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. - // Compares the most recent boot measurements to the integrity policy baseline and return - // a pair of pass/fail results depending on whether they match or not. - // If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled. - // +kubebuilder:validation:Enum=Enabled;Disabled - // +optional - IntegrityMonitoring IntegrityMonitoringPolicy `json:"integrityMonitoring,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go deleted file mode 100644 index 6bfe85081..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machine.go +++ /dev/null @@ -1,468 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -const ( - // MachineFinalizer is set on PrepareForCreate callback. - MachineFinalizer = "machine.machine.openshift.io" - - // MachineClusterLabelName is the label set on machines linked to a cluster. - MachineClusterLabelName = "cluster.k8s.io/cluster-name" - - // MachineClusterIDLabel is the label that a machine must have to identify the - // cluster to which it belongs. - MachineClusterIDLabel = "machine.openshift.io/cluster-api-cluster" - - // IPClaimProtectionFinalizer is placed on an IPAddressClaim by the machine reconciler - // when an IPAddressClaim associated with a machine is created. This finalizer is removed - // from the IPAddressClaim when the associated machine is deleted. - IPClaimProtectionFinalizer = "machine.openshift.io/ip-claim-protection" -) - -type MachineStatusError string - -const ( - // Represents that the combination of configuration in the MachineSpec - // is not supported by this cluster. This is not a transient error, but - // indicates a state that must be fixed before progress can be made. - // - // Example: the ProviderSpec specifies an instance type that doesn't exist, - InvalidConfigurationMachineError MachineStatusError = "InvalidConfiguration" - - // This indicates that the MachineSpec has been updated in a way that - // is not supported for reconciliation on this cluster. The spec may be - // completely valid from a configuration standpoint, but the controller - // does not support changing the real world state to match the new - // spec. - // - // Example: the responsible controller is not capable of changing the - // container runtime from docker to rkt. - UnsupportedChangeMachineError MachineStatusError = "UnsupportedChange" - - // This generally refers to exceeding one's quota in a cloud provider, - // or running out of physical machines in an on-premise environment. - InsufficientResourcesMachineError MachineStatusError = "InsufficientResources" - - // There was an error while trying to create a Node to match this - // Machine. This may indicate a transient problem that will be fixed - // automatically with time, such as a service outage, or a terminal - // error during creation that doesn't match a more specific - // MachineStatusError value. - // - // Example: timeout trying to connect to GCE. - CreateMachineError MachineStatusError = "CreateError" - - // There was an error while trying to update a Node that this - // Machine represents. This may indicate a transient problem that will be - // fixed automatically with time, such as a service outage, - // - // Example: error updating load balancers - UpdateMachineError MachineStatusError = "UpdateError" - - // An error was encountered while trying to delete the Node that this - // Machine represents. This could be a transient or terminal error, but - // will only be observable if the provider's Machine controller has - // added a finalizer to the object to more gracefully handle deletions. - // - // Example: cannot resolve EC2 IP address. - DeleteMachineError MachineStatusError = "DeleteError" - - // TemplateClonedFromGroupKindAnnotation is the infrastructure machine - // annotation that stores the group-kind of the infrastructure template resource - // that was cloned for the machine. This annotation is set only during cloning a - // template. Older/adopted machines will not have this annotation. - TemplateClonedFromGroupKindAnnotation = "machine.openshift.io/cloned-from-groupkind" - - // TemplateClonedFromNameAnnotation is the infrastructure machine annotation that - // stores the name of the infrastructure template resource - // that was cloned for the machine. This annotation is set only during cloning a - // template. Older/adopted machines will not have this annotation. - TemplateClonedFromNameAnnotation = "machine.openshift.io/cloned-from-name" - - // This error indicates that the machine did not join the cluster - // as a new node within the expected timeframe after instance - // creation at the provider succeeded - // - // Example use case: A controller that deletes Machines which do - // not result in a Node joining the cluster within a given timeout - // and that are managed by a MachineSet - JoinClusterTimeoutMachineError = "JoinClusterTimeoutError" - - // IPAddressInvalidReason is set to indicate that the claimed IP address is not valid. - IPAddressInvalidReason MachineStatusError = "IPAddressInvalid" -) - -type ClusterStatusError string - -const ( - // InvalidConfigurationClusterError indicates that the cluster - // configuration is invalid. - InvalidConfigurationClusterError ClusterStatusError = "InvalidConfiguration" - - // UnsupportedChangeClusterError indicates that the cluster - // spec has been updated in an unsupported way. That cannot be - // reconciled. - UnsupportedChangeClusterError ClusterStatusError = "UnsupportedChange" - - // CreateClusterError indicates that an error was encountered - // when trying to create the cluster. - CreateClusterError ClusterStatusError = "CreateError" - - // UpdateClusterError indicates that an error was encountered - // when trying to update the cluster. - UpdateClusterError ClusterStatusError = "UpdateError" - - // DeleteClusterError indicates that an error was encountered - // when trying to delete the cluster. - DeleteClusterError ClusterStatusError = "DeleteError" -) - -type MachineSetStatusError string - -const ( - // Represents that the combination of configuration in the MachineTemplateSpec - // is not supported by this cluster. This is not a transient error, but - // indicates a state that must be fixed before progress can be made. - // - // Example: the ProviderSpec specifies an instance type that doesn't exist. - InvalidConfigurationMachineSetError MachineSetStatusError = "InvalidConfiguration" -) - -type MachineDeploymentStrategyType string - -const ( - // Replace the old MachineSet by new one using rolling update - // i.e. gradually scale down the old MachineSet and scale up the new one. - RollingUpdateMachineDeploymentStrategyType MachineDeploymentStrategyType = "RollingUpdate" -) - -const ( - // PhaseFailed indicates a state that will need to be fixed before progress can be made. - // Failed machines have encountered a terminal error and must be deleted. - // https://github.com/openshift/enhancements/blob/master/enhancements/machine-instance-lifecycle.md - // e.g. Instance does NOT exist but Machine has providerID/addresses. - // e.g. Cloud service returns a 4xx response. - PhaseFailed string = "Failed" - - // PhaseProvisioning indicates the instance does NOT exist. - // The machine has NOT been given a providerID or addresses. - // Provisioning implies that the Machine API is in the process of creating the instance. - PhaseProvisioning string = "Provisioning" - - // PhaseProvisioned indicates the instance exists. - // The machine has been given a providerID and addresses. - // The machine API successfully provisioned an instance which has not yet joined the cluster, - // as such, the machine has NOT yet been given a nodeRef. - PhaseProvisioned string = "Provisioned" - - // PhaseRunning indicates the instance exists and the node has joined the cluster. - // The machine has been given a providerID, addresses, and a nodeRef. - PhaseRunning string = "Running" - - // PhaseDeleting indicates the machine has a deletion timestamp and that the - // Machine API is now in the process of removing the machine from the cluster. - PhaseDeleting string = "Deleting" -) - -type MachineAuthority string - -const ( - // MachineAuthorityMachineAPI indicates that the Machine API resource should be the authoritative API. - MachineAuthorityMachineAPI MachineAuthority = "MachineAPI" - - // MachineAuthorityClusterAPI indicates that the Cluster API resource should be the authoritative API. - MachineAuthorityClusterAPI MachineAuthority = "ClusterAPI" - - // MachineAuthorityMigrating indicates that the authoritative API is currently migrating between states. - // Only applicable for status usages of the MachineAuthority. - MachineAuthorityMigrating MachineAuthority = "Migrating" -) - -// SynchronizedAPI holds the last stable value of authoritativeAPI. -// +kubebuilder:validation:Enum=MachineAPI;ClusterAPI -type SynchronizedAPI string - -const ( - // MachineAPISynchronized indicates that the Machine API is the last synchronized API. - MachineAPISynchronized SynchronizedAPI = "MachineAPI" - - // ClusterAPISynchronized indicates that the Cluster API is the last synchronized API. - ClusterAPISynchronized SynchronizedAPI = "ClusterAPI" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Machine is the Schema for the machines API -// +k8s:openapi-gen=true -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=machines,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/948 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=machine-api,operatorOrdering=01 -// +openshift:capability=MachineAPI -// +kubebuilder:metadata:annotations="exclude.release.openshift.io/internal-openshift-hosted=true" -// +kubebuilder:metadata:annotations="include.release.openshift.io/self-managed-high-availability=true" -// +kubebuilder:printcolumn:name="Phase",type="string",JSONPath=".status.phase",description="Phase of machine" -// +kubebuilder:printcolumn:name="Type",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/instance-type']",description="Type of instance" -// +kubebuilder:printcolumn:name="Region",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/region']",description="Region associated with machine" -// +kubebuilder:printcolumn:name="Zone",type="string",JSONPath=".metadata.labels['machine\\.openshift\\.io/zone']",description="Zone associated with machine" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Machine age" -// +kubebuilder:printcolumn:name="Node",type="string",JSONPath=".status.nodeRef.name",description="Node associated with machine",priority=1 -// +kubebuilder:printcolumn:name="ProviderID",type="string",JSONPath=".spec.providerID",description="Provider ID of machine created in cloud provider",priority=1 -// +kubebuilder:printcolumn:name="State",type="string",JSONPath=".metadata.annotations['machine\\.openshift\\.io/instance-state']",description="State of instance",priority=1 -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type Machine struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec MachineSpec `json:"spec,omitempty"` - Status MachineStatus `json:"status,omitempty"` -} - -// MachineSpec defines the desired state of Machine -type MachineSpec struct { - // ObjectMeta will autopopulate the Node created. Use this to - // indicate what labels, annotations, name prefix, etc., should be used - // when creating the Node. - // +optional - ObjectMeta `json:"metadata,omitempty"` - - // lifecycleHooks allow users to pause operations on the machine at - // certain predefined points within the machine lifecycle. - // +optional - LifecycleHooks LifecycleHooks `json:"lifecycleHooks,omitempty"` - - // The list of the taints to be applied to the corresponding Node in additive - // manner. This list will not overwrite any other taints added to the Node on - // an ongoing basis by other entities. These taints should be actively reconciled - // e.g. if you ask the machine controller to apply a taint and then manually remove - // the taint the machine controller will put it back) but not have the machine controller - // remove any taints - // +optional - // +listType=atomic - Taints []corev1.Taint `json:"taints,omitempty"` - - // providerSpec details Provider-specific configuration to use during node creation. - // +optional - ProviderSpec ProviderSpec `json:"providerSpec"` - - // providerID is the identification ID of the machine provided by the provider. - // This field must match the provider ID as seen on the node object corresponding to this machine. - // This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler - // with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out - // machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a - // generic out-of-tree provider for autoscaler, this field is required by autoscaler to be - // able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver - // and then a comparison is done to find out unregistered machines and are marked for delete. - // This field will be set by the actuators and consumed by higher level entities like autoscaler that will - // be interfacing with cluster-api as generic provider. - // +optional - ProviderID *string `json:"providerID,omitempty"` - - // authoritativeAPI is the API that is authoritative for this resource. - // Valid values are MachineAPI and ClusterAPI. - // When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. - // When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. - // Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. - // Currently the authoritative API determines which controller will manage the resource, this will change in a future release. - // To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`. - // +kubebuilder:validation:Enum=MachineAPI;ClusterAPI - // +kubebuilder:validation:Default=MachineAPI - // +default="MachineAPI" - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"` -} - -// LifecycleHooks allow users to pause operations on the machine at -// certain prefedined points within the machine lifecycle. -type LifecycleHooks struct { - // preDrain hooks prevent the machine from being drained. - // This also blocks further lifecycle events, such as termination. - // +listType=map - // +listMapKey=name - // +optional - PreDrain []LifecycleHook `json:"preDrain,omitempty"` - - // preTerminate hooks prevent the machine from being terminated. - // PreTerminate hooks be actioned after the Machine has been drained. - // +listType=map - // +listMapKey=name - // +optional - PreTerminate []LifecycleHook `json:"preTerminate,omitempty"` -} - -// LifecycleHook represents a single instance of a lifecycle hook -type LifecycleHook struct { - // name defines a unique name for the lifcycle hook. - // The name should be unique and descriptive, ideally 1-3 words, in CamelCase or - // it may be namespaced, eg. foo.example.com/CamelCase. - // Names must be unique and should only be managed by a single entity. - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:MaxLength=256 - // +required - Name string `json:"name"` - - // owner defines the owner of the lifecycle hook. - // This should be descriptive enough so that users can identify - // who/what is responsible for blocking the lifecycle. - // This could be the name of a controller (e.g. clusteroperator/etcd) - // or an administrator managing the hook. - // +kubebuilder:validation:MinLength=3 - // +kubebuilder:validation:MaxLength=512 - // +required - Owner string `json:"owner"` -} - -// MachineStatus defines the observed state of Machine -// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == 'Migrating' && self.authoritativeAPI != 'Migrating')",message="synchronizedGeneration must not decrease unless authoritativeAPI is transitioning from Migrating to another value" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="has(self.authoritativeAPI) || !has(oldSelf.authoritativeAPI)",message="authoritativeAPI may not be removed once set" -type MachineStatus struct { - // nodeRef will point to the corresponding Node if it exists. - // +optional - NodeRef *corev1.ObjectReference `json:"nodeRef,omitempty"` - - // lastUpdated identifies when this status was last observed. - // +optional - LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - - // errorReason will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a succinct value suitable - // for machine interpretation. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - ErrorReason *MachineStatusError `json:"errorReason,omitempty"` - - // errorMessage will be set in the event that there is a terminal problem - // reconciling the Machine and will contain a more verbose string suitable - // for logging and human consumption. - // - // This field should not be set for transitive errors that a controller - // faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the Machine's spec or the configuration of - // the controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the controller, or the - // responsible controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the Machine object and/or logged in the - // controller's output. - // +optional - ErrorMessage *string `json:"errorMessage,omitempty"` - - // providerStatus details a Provider-specific status. - // It is recommended that providers maintain their - // own versioned API types that should be - // serialized/deserialized from this field. - // +optional - // +kubebuilder:validation:XPreserveUnknownFields - ProviderStatus *runtime.RawExtension `json:"providerStatus,omitempty"` - - // addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available. - // +optional - // +listType=atomic - Addresses []corev1.NodeAddress `json:"addresses,omitempty"` - - // lastOperation describes the last-operation performed by the machine-controller. - // This API should be useful as a history in terms of the latest operation performed on the - // specific machine. It should also convey the state of the latest-operation for example if - // it is still on-going, failed or completed successfully. - // +optional - LastOperation *LastOperation `json:"lastOperation,omitempty"` - - // phase represents the current phase of machine actuation. - // One of: Failed, Provisioning, Provisioned, Running, Deleting - // +optional - Phase *string `json:"phase,omitempty"` - - // conditions defines the current state of the Machine - // +listType=map - // +listMapKey=type - // +optional - Conditions []Condition `json:"conditions,omitempty"` - - // authoritativeAPI is the API that is authoritative for this resource. - // Valid values are MachineAPI, ClusterAPI and Migrating. - // This value is updated by the migration controller to reflect the authoritative API. - // Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. - // When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other. - // +kubebuilder:validation:Enum=MachineAPI;ClusterAPI;Migrating - // +kubebuilder:validation:XValidation:rule="self == 'Migrating' || self == oldSelf || oldSelf == 'Migrating'",message="The authoritativeAPI field must not transition directly from MachineAPI to ClusterAPI or vice versa. It must transition through Migrating." - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"` - - // synchronizedAPI holds the last stable value of authoritativeAPI. - // It is used to detect migration cancellation requests and to restore the resource to its previous state. - // Valid values are "MachineAPI" and "ClusterAPI". - // When omitted, the resource has not yet been reconciled by the migration controller. - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"` - - // synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. - // This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match. - // +kubebuilder:validation:Minimum=0 - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - SynchronizedGeneration int64 `json:"synchronizedGeneration,omitempty"` -} - -// LastOperation represents the detail of the last performed operation on the MachineObject. -type LastOperation struct { - // description is the human-readable description of the last operation. - Description *string `json:"description,omitempty"` - - // lastUpdated is the timestamp at which LastOperation API was last-updated. - LastUpdated *metav1.Time `json:"lastUpdated,omitempty"` - - // state is the current status of the last performed operation. - // E.g. Processing, Failed, Successful etc - State *string `json:"state,omitempty"` - - // type is the type of operation which was last performed. - // E.g. Create, Delete, Update etc - Type *string `json:"type,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineList contains a list of Machine -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type MachineList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []Machine `json:"items"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go deleted file mode 100644 index f80d716a0..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machinehealthcheck.go +++ /dev/null @@ -1,152 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// RemediationStrategyType contains remediation strategy type -type RemediationStrategyType string - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineHealthCheck is the Schema for the machinehealthchecks API -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=machinehealthchecks,scope=Namespaced,shortName=mhc;mhcs -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1032 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=machine-api,operatorOrdering=01 -// +openshift:capability=MachineAPI -// +kubebuilder:metadata:annotations="exclude.release.openshift.io/internal-openshift-hosted=true" -// +kubebuilder:metadata:annotations="include.release.openshift.io/self-managed-high-availability=true" -// +k8s:openapi-gen=true -// +kubebuilder:printcolumn:name="MaxUnhealthy",type="string",JSONPath=".spec.maxUnhealthy",description="Maximum number of unhealthy machines allowed" -// +kubebuilder:printcolumn:name="ExpectedMachines",type="integer",JSONPath=".status.expectedMachines",description="Number of machines currently monitored" -// +kubebuilder:printcolumn:name="CurrentHealthy",type="integer",JSONPath=".status.currentHealthy",description="Current observed healthy machines" -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type MachineHealthCheck struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // Specification of machine health check policy - // +optional - Spec MachineHealthCheckSpec `json:"spec,omitempty"` - - // Most recently observed status of MachineHealthCheck resource - // +optional - Status MachineHealthCheckStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineHealthCheckList contains a list of MachineHealthCheck -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type MachineHealthCheckList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []MachineHealthCheck `json:"items"` -} - -// MachineHealthCheckSpec defines the desired state of MachineHealthCheck -type MachineHealthCheckSpec struct { - // Label selector to match machines whose health will be exercised. - // Note: An empty selector will match all machines. - Selector metav1.LabelSelector `json:"selector"` - - // unhealthyConditions contains a list of the conditions that determine - // whether a node is considered unhealthy. The conditions are combined in a - // logical OR, i.e. if any of the conditions is met, the node is unhealthy. - // - // +kubebuilder:validation:MinItems=1 - UnhealthyConditions []UnhealthyCondition `json:"unhealthyConditions"` - - // Any farther remediation is only allowed if at most "MaxUnhealthy" machines selected by - // "selector" are not healthy. - // Expects either a postive integer value or a percentage value. - // Percentage values must be positive whole numbers and are capped at 100%. - // Both 0 and 0% are valid and will block all remediation. - // Defaults to 100% if not set. - // +kubebuilder:default:="100%" - // +kubebuilder:validation:XIntOrString - // +kubebuilder:validation:Pattern="^((100|[0-9]{1,2})%|[0-9]+)$" - // +optional - MaxUnhealthy *intstr.IntOrString `json:"maxUnhealthy,omitempty"` - - // Machines older than this duration without a node will be considered to have - // failed and will be remediated. - // To prevent Machines without Nodes from being removed, disable startup checks - // by setting this value explicitly to "0". - // Expects an unsigned duration string of decimal numbers each with optional - // fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // +kubebuilder:default:="10m" - // +kubebuilder:validation:Pattern="^0|([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" - // +kubebuilder:validation:Type:=string - // +optional - NodeStartupTimeout *metav1.Duration `json:"nodeStartupTimeout,omitempty"` - - // remediationTemplate is a reference to a remediation template - // provided by an infrastructure provider. - // - // This field is completely optional, when filled, the MachineHealthCheck controller - // creates a new object from the template referenced and hands off remediation of the machine to - // a controller that lives outside of Machine API Operator. - // +optional - RemediationTemplate *corev1.ObjectReference `json:"remediationTemplate,omitempty"` -} - -// UnhealthyCondition represents a Node condition type and value with a timeout -// specified as a duration. When the named condition has been in the given -// status for at least the timeout value, a node is considered unhealthy. -type UnhealthyCondition struct { - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:MinLength=1 - Type corev1.NodeConditionType `json:"type"` - - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:MinLength=1 - Status corev1.ConditionStatus `json:"status"` - - // Expects an unsigned duration string of decimal numbers each with optional - // fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". - // +kubebuilder:validation:Pattern="^([0-9]+(\\.[0-9]+)?(ns|us|µs|ms|s|m|h))+$" - // +kubebuilder:validation:Type:=string - Timeout metav1.Duration `json:"timeout"` -} - -// MachineHealthCheckStatus defines the observed state of MachineHealthCheck -type MachineHealthCheckStatus struct { - // total number of machines counted by this machine health check - // +kubebuilder:validation:Minimum=0 - // +optional - ExpectedMachines *int `json:"expectedMachines"` - - // total number of machines counted by this machine health check - // +kubebuilder:validation:Minimum=0 - // +optional - CurrentHealthy *int `json:"currentHealthy"` - - // remediationsAllowed is the number of further remediations allowed by this machine health check before - // maxUnhealthy short circuiting will be applied - // +kubebuilder:validation:Minimum=0 - // +optional - RemediationsAllowed int32 `json:"remediationsAllowed"` - - // conditions defines the current state of the MachineHealthCheck - // +optional - // +listType=map - // +listMapKey=type - Conditions []Condition `json:"conditions,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go b/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go deleted file mode 100644 index cbbe0b337..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_machineset.go +++ /dev/null @@ -1,209 +0,0 @@ -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineSet ensures that a specified number of machines replicas are running at any given time. -// +k8s:openapi-gen=true -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=machinesets,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1032 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=machine-api,operatorOrdering=01 -// +openshift:capability=MachineAPI -// +kubebuilder:metadata:annotations="exclude.release.openshift.io/internal-openshift-hosted=true" -// +kubebuilder:metadata:annotations="include.release.openshift.io/self-managed-high-availability=true" -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.replicas,selectorpath=.status.labelSelector -// +kubebuilder:printcolumn:name="Desired",type="integer",JSONPath=".spec.replicas",description="Desired Replicas" -// +kubebuilder:printcolumn:name="Current",type="integer",JSONPath=".status.replicas",description="Current Replicas" -// +kubebuilder:printcolumn:name="Ready",type="integer",JSONPath=".status.readyReplicas",description="Ready Replicas" -// +kubebuilder:printcolumn:name="Available",type="string",JSONPath=".status.availableReplicas",description="Observed number of available replicas" -// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="Machineset age" -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type MachineSet struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec MachineSetSpec `json:"spec,omitempty"` - Status MachineSetStatus `json:"status,omitempty"` -} - -// MachineSetSpec defines the desired state of MachineSet -type MachineSetSpec struct { - // replicas is the number of desired replicas. - // This is a pointer to distinguish between explicit zero and unspecified. - // Defaults to 1. - // +kubebuilder:default=1 - Replicas *int32 `json:"replicas,omitempty"` - // minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. - // Defaults to 0 (machine will be considered available as soon as it is ready) - // +optional - MinReadySeconds int32 `json:"minReadySeconds,omitempty"` - // deletePolicy defines the policy used to identify nodes to delete when downscaling. - // Defaults to "Random". Valid values are "Random, "Newest", "Oldest" - // +kubebuilder:validation:Enum=Random;Newest;Oldest - DeletePolicy string `json:"deletePolicy,omitempty"` - // selector is a label query over machines that should match the replica count. - // Label keys and values that must match in order to be controlled by this MachineSet. - // It must match the machine template's labels. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors - Selector metav1.LabelSelector `json:"selector"` - // template is the object that describes the machine that will be created if - // insufficient replicas are detected. - // +optional - Template MachineTemplateSpec `json:"template,omitempty"` - - // authoritativeAPI is the API that is authoritative for this resource. - // Valid values are MachineAPI and ClusterAPI. - // When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. - // When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. - // Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. - // Currently the authoritative API determines which controller will manage the resource, this will change in a future release. - // To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`. - // +kubebuilder:validation:Enum=MachineAPI;ClusterAPI - // +kubebuilder:validation:Default=MachineAPI - // +default="MachineAPI" - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"` -} - -// MachineSetDeletePolicy defines how priority is assigned to nodes to delete when -// downscaling a MachineSet. Defaults to "Random". -type MachineSetDeletePolicy string - -const ( - // RandomMachineSetDeletePolicy prioritizes both Machines that have the annotation - // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy - // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). - // Finally, it picks Machines at random to delete. - RandomMachineSetDeletePolicy MachineSetDeletePolicy = "Random" - // NewestMachineSetDeletePolicy prioritizes both Machines that have the annotation - // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy - // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). - // It then prioritizes the newest Machines for deletion based on the Machine's CreationTimestamp. - NewestMachineSetDeletePolicy MachineSetDeletePolicy = "Newest" - // OldestMachineSetDeletePolicy prioritizes both Machines that have the annotation - // "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy - // (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value). - // It then prioritizes the oldest Machines for deletion based on the Machine's CreationTimestamp. - OldestMachineSetDeletePolicy MachineSetDeletePolicy = "Oldest" -) - -// MachineTemplateSpec describes the data needed to create a Machine from a template -type MachineTemplateSpec struct { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - ObjectMeta `json:"metadata,omitempty"` - // Specification of the desired behavior of the machine. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - // +optional - Spec MachineSpec `json:"spec,omitempty"` -} - -// MachineSetStatus defines the observed state of MachineSet -// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="!has(oldSelf.synchronizedGeneration) || (has(self.synchronizedGeneration) && self.synchronizedGeneration >= oldSelf.synchronizedGeneration) || (oldSelf.authoritativeAPI == 'Migrating' && self.authoritativeAPI != 'Migrating')",message="synchronizedGeneration must not decrease unless authoritativeAPI is transitioning from Migrating to another value" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=MachineAPIMigration,rule="has(self.authoritativeAPI) || !has(oldSelf.authoritativeAPI)",message="authoritativeAPI may not be removed once set" -type MachineSetStatus struct { - // replicas is the most recently observed number of replicas. - // +optional - Replicas int32 `json:"replicas"` - // The number of replicas that have labels matching the labels of the machine template of the MachineSet. - // +optional - FullyLabeledReplicas int32 `json:"fullyLabeledReplicas,omitempty"` - // The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is "Ready". - // +optional - ReadyReplicas int32 `json:"readyReplicas,omitempty"` - // The number of available replicas (ready for at least minReadySeconds) for this MachineSet. - // +optional - AvailableReplicas int32 `json:"availableReplicas,omitempty"` - // observedGeneration reflects the generation of the most recently observed MachineSet. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - // labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. - // It is exposed via the scale subresource as status.selector. - // When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. - // When present, it must not be empty and must not exceed 4096 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=4096 - // +optional - LabelSelector string `json:"labelSelector,omitempty"` - // In the event that there is a terminal problem reconciling the - // replicas, both ErrorReason and ErrorMessage will be set. ErrorReason - // will be populated with a succinct value suitable for machine - // interpretation, while ErrorMessage will contain a more verbose - // string suitable for logging and human consumption. - // - // These fields should not be set for transitive errors that a - // controller faces that are expected to be fixed automatically over - // time (like service outages), but instead indicate that something is - // fundamentally wrong with the MachineTemplate's spec or the configuration of - // the machine controller, and that manual intervention is required. Examples - // of terminal errors would be invalid combinations of settings in the - // spec, values that are unsupported by the machine controller, or the - // responsible machine controller itself being critically misconfigured. - // - // Any transient errors that occur during the reconciliation of Machines - // can be added as events to the MachineSet object and/or logged in the - // controller's output. - // +optional - ErrorReason *MachineSetStatusError `json:"errorReason,omitempty"` - // +optional - ErrorMessage *string `json:"errorMessage,omitempty"` - - // conditions defines the current state of the MachineSet - // +listType=map - // +listMapKey=type - // +optional - Conditions []Condition `json:"conditions,omitempty"` - - // authoritativeAPI is the API that is authoritative for this resource. - // Valid values are MachineAPI, ClusterAPI and Migrating. - // This value is updated by the migration controller to reflect the authoritative API. - // Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. - // When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other. - // +kubebuilder:validation:Enum=MachineAPI;ClusterAPI;Migrating - // +kubebuilder:validation:XValidation:rule="self == 'Migrating' || self == oldSelf || oldSelf == 'Migrating'",message="The authoritativeAPI field must not transition directly from MachineAPI to ClusterAPI or vice versa. It must transition through Migrating." - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - AuthoritativeAPI MachineAuthority `json:"authoritativeAPI,omitempty"` - - // synchronizedAPI holds the last stable value of authoritativeAPI. - // It is used to detect migration cancellation requests and to restore the resource to its previous state. - // Valid values are "MachineAPI" and "ClusterAPI". - // When omitted, the resource has not yet been reconciled by the migration controller. - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - SynchronizedAPI SynchronizedAPI `json:"synchronizedAPI,omitempty"` - - // synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. - // This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match. - // +kubebuilder:validation:Minimum=0 - // +openshift:enable:FeatureGate=MachineAPIMigration - // +optional - SynchronizedGeneration int64 `json:"synchronizedGeneration,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineSetList contains a list of MachineSet -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type MachineSetList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []MachineSet `json:"items"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go deleted file mode 100644 index b67cb3243..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_provider.go +++ /dev/null @@ -1,228 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// ProviderSpec defines the configuration to use during node creation. -type ProviderSpec struct { - - // No more than one of the following may be specified. - - // value is an inlined, serialized representation of the resource - // configuration. It is recommended that providers maintain their own - // versioned API types that should be serialized/deserialized from this - // field, akin to component config. - // +optional - // +kubebuilder:validation:XPreserveUnknownFields - Value *runtime.RawExtension `json:"value,omitempty"` -} - -// ObjectMeta is metadata that all persisted resources must have, which includes all objects -// users must create. This is a copy of customizable fields from metav1.ObjectMeta. -// -// ObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, -// which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases -// and read-only fields which end up in the generated CRD validation, having it as a subset simplifies -// the API and some issues that can impact user experience. -// -// During the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) -// for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, -// specifically `spec.metadata.creationTimestamp in body must be of type string: "null"`. -// The investigation showed that `controller-tools@v2` behaves differently than its previous version -// when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package. -// -// In more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` -// had validation properties, including for `creationTimestamp` (metav1.Time). -// The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` -// which breaks validation because the field isn't marked as nullable. -// -// In future versions, controller-tools@v2 might allow overriding the type and validation for embedded -// types. When that happens, this hack should be revisited. -type ObjectMeta struct { - // name must be unique within a namespace. Is required when creating resources, although - // some resources may allow a client to request the generation of an appropriate name - // automatically. Name is primarily intended for creation idempotence and configuration - // definition. - // Cannot be updated. - // More info: http://kubernetes.io/docs/user-guide/identifiers#names - // +optional - Name string `json:"name,omitempty"` - - // generateName is an optional prefix, used by the server, to generate a unique - // name ONLY IF the Name field has not been provided. - // If this field is used, the name returned to the client will be different - // than the name passed. This value will also be combined with a unique suffix. - // The provided value has the same validation rules as the Name field, - // and may be truncated by the length of the suffix required to make the value - // unique on the server. - // - // If this field is specified and the generated name exists, the server will - // NOT return a 409 - instead, it will either return 201 Created or 500 with Reason - // ServerTimeout indicating a unique name could not be found in the time allotted, and the client - // should retry (optionally after the time indicated in the Retry-After header). - // - // Applied only if Name is not specified. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency - // +optional - GenerateName string `json:"generateName,omitempty"` - - // namespace defines the space within each name must be unique. An empty namespace is - // equivalent to the "default" namespace, but "default" is the canonical representation. - // Not all objects are required to be scoped to a namespace - the value of this field for - // those objects will be empty. - // - // Must be a DNS_LABEL. - // Cannot be updated. - // More info: http://kubernetes.io/docs/user-guide/namespaces - // +optional - Namespace string `json:"namespace,omitempty"` - - // Map of string keys and values that can be used to organize and categorize - // (scope and select) objects. May match selectors of replication controllers - // and services. - // More info: http://kubernetes.io/docs/user-guide/labels - // +optional - Labels map[string]string `json:"labels,omitempty"` - - // annotations is an unstructured key value map stored with a resource that may be - // set by external tools to store and retrieve arbitrary metadata. They are not - // queryable and should be preserved when modifying objects. - // More info: http://kubernetes.io/docs/user-guide/annotations - // +optional - Annotations map[string]string `json:"annotations,omitempty"` - - // List of objects depended by this object. If ALL objects in the list have - // been deleted, this object will be garbage collected. If this object is managed by a controller, - // then an entry in this list will point to this controller, with the controller field set to true. - // There cannot be more than one managing controller. - // +optional - // +patchMergeKey=uid - // +patchStrategy=merge - // +listType=map - // +listMapKey=uid - OwnerReferences []metav1.OwnerReference `json:"ownerReferences,omitempty" patchStrategy:"merge" patchMergeKey:"uid"` -} - -// ConditionSeverity expresses the severity of a Condition Type failing. -type ConditionSeverity string - -const ( - // ConditionSeverityError specifies that a condition with `Status=False` is an error. - ConditionSeverityError ConditionSeverity = "Error" - - // ConditionSeverityWarning specifies that a condition with `Status=False` is a warning. - ConditionSeverityWarning ConditionSeverity = "Warning" - - // ConditionSeverityInfo specifies that a condition with `Status=False` is informative. - ConditionSeverityInfo ConditionSeverity = "Info" - - // ConditionSeverityNone should apply only to conditions with `Status=True`. - ConditionSeverityNone ConditionSeverity = "" -) - -// ConditionType is a valid value for Condition.Type. -type ConditionType string - -// Valid conditions for a machine. -const ( - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - // NOTE: MachineCreation is here for historical reasons, MachineCreated should be used instead - MachineCreation ConditionType = "MachineCreation" - // MachineCreated indicates whether the machine has been created or not. If not, - // it should include a reason and message for the failure. - MachineCreated ConditionType = "MachineCreated" - // InstanceExistsCondition is set on the Machine to show whether a virtual mahcine has been created by the cloud provider. - InstanceExistsCondition ConditionType = "InstanceExists" - // RemediationAllowedCondition is set on MachineHealthChecks to show the status of whether the MachineHealthCheck is - // allowed to remediate any Machines or whether it is blocked from remediating any further. - RemediationAllowedCondition ConditionType = "RemediationAllowed" - // ExternalRemediationTemplateAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. - // ExternalRemediationTemplateAvailable is set to false if external remediation template is not found. - ExternalRemediationTemplateAvailable ConditionType = "ExternalRemediationTemplateAvailable" - // ExternalRemediationRequestAvailable is set on machinehealthchecks when MachineHealthCheck controller uses external remediation. - // ExternalRemediationRequestAvailable is set to false if creating external remediation request fails. - ExternalRemediationRequestAvailable ConditionType = "ExternalRemediationRequestAvailable" - // MachineDrained is set on a machine to indicate that the machine has been drained. When an error occurs during - // the drain process, the condition will be added with a false status and details of the error. - MachineDrained ConditionType = "Drained" - // MachineDrainable is set on a machine to indicate whether or not the machine can be drained, or, whether some - // deletion hook is blocking the drain operation. - MachineDrainable ConditionType = "Drainable" - // MachineTerminable is set on a machine to indicate whether or not the machine can be terminated, or, whether some - // deletion hook is blocking the termination operation. - MachineTerminable ConditionType = "Terminable" - // IPAddressClaimedCondition is set to indicate that a machine has a claimed an IP address. - IPAddressClaimedCondition ConditionType = "IPAddressClaimed" -) - -const ( - // MachineCreationSucceeded indicates machine creation success. - MachineCreationSucceededConditionReason string = "MachineCreationSucceeded" - // MachineCreationFailed indicates machine creation failure. - MachineCreationFailedConditionReason string = "MachineCreationFailed" - // ErrorCheckingProviderReason is the reason used when the exist operation fails. - // This would normally be because we cannot contact the provider. - ErrorCheckingProviderReason = "ErrorCheckingProvider" - // InstanceMissingReason is the reason used when the machine was provisioned, but the instance has gone missing. - InstanceMissingReason = "InstanceMissing" - // InstanceNotCreatedReason is the reason used when the machine has not yet been provisioned. - InstanceNotCreatedReason = "InstanceNotCreated" - // TooManyUnhealthy is the reason used when too many Machines are unhealthy and the MachineHealthCheck is blocked - // from making any further remediations. - TooManyUnhealthyReason = "TooManyUnhealthy" - // ExternalRemediationTemplateNotFound is the reason used when a machine health check fails to find external remediation template. - ExternalRemediationTemplateNotFound = "ExternalRemediationTemplateNotFound" - // ExternalRemediationRequestCreationFailed is the reason used when a machine health check fails to create external remediation request. - ExternalRemediationRequestCreationFailed = "ExternalRemediationRequestCreationFailed" - // MachineHookPresent indicates that a machine lifecycle hook is blocking part of the lifecycle of the machine. - // This should be used with the `Drainable` and `Terminable` machine condition types. - MachineHookPresent = "HookPresent" - // MachineDrainError indicates an error occurred when draining the machine. - // This should be used with the `Drained` condition type. - MachineDrainError = "DrainError" - // WaitingForIPAddressReason is set to indicate that a machine is - // currently waiting for an IP address to be provisioned. - WaitingForIPAddressReason string = "WaitingForIPAddress" - // IPAddressClaimedReason is set to indicate the machine was able to claim an IP address during provisioning. - IPAddressClaimedReason string = "IPAddressesClaimed" -) - -// Condition defines an observation of a Machine API resource operational state. -type Condition struct { - // type of condition in CamelCase or in foo.example.com/CamelCase. - // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions - // can be useful (see .node.status.conditions), the ability to deconflict is important. - // +required - Type ConditionType `json:"type"` - - // status of the condition, one of True, False, Unknown. - // +required - Status corev1.ConditionStatus `json:"status"` - - // severity provides an explicit classification of Reason code, so the users or machines can immediately - // understand the current situation and act accordingly. - // The Severity field MUST be set only when Status=False. - // +optional - Severity ConditionSeverity `json:"severity,omitempty"` - - // Last time the condition transitioned from one status to another. - // This should be when the underlying condition changed. If that is not known, then using the time when - // the API field changed is acceptable. - // +required - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - - // The reason for the condition's last transition in CamelCase. - // The specific API may choose whether or not this field is considered a guaranteed API. - // This field may not be empty. - // +optional - Reason string `json:"reason,omitempty"` - - // A human readable message indicating details about the transition. - // This field may be empty. - // +optional - Message string `json:"message,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go b/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go deleted file mode 100644 index fe6626f72..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/types_vsphereprovider.go +++ /dev/null @@ -1,277 +0,0 @@ -package v1beta1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// VSphereMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field -// for an VSphere virtual machine. It is used by the vSphere machine actuator to create a single Machine. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type VSphereMachineProviderSpec struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // userDataSecret contains a local reference to a secret that contains the - // UserData to apply to the instance - // +optional - UserDataSecret *corev1.LocalObjectReference `json:"userDataSecret,omitempty"` - // credentialsSecret is a reference to the secret with vSphere credentials. - // +optional - CredentialsSecret *corev1.LocalObjectReference `json:"credentialsSecret,omitempty"` - // template is the name, inventory path, or instance UUID of the template - // used to clone new machines. - Template string `json:"template"` - // workspace describes the workspace to use for the machine. - // +optional - Workspace *Workspace `json:"workspace,omitempty"` - // network is the network configuration for this machine's VM. - Network NetworkSpec `json:"network"` - // numCPUs is the number of virtual processors in a virtual machine. - // Defaults to the analogue property value in the template from which this - // machine is cloned. - // +optional - NumCPUs int32 `json:"numCPUs,omitempty"` - // NumCPUs is the number of cores among which to distribute CPUs in this - // virtual machine. - // Defaults to the analogue property value in the template from which this - // machine is cloned. - // +optional - NumCoresPerSocket int32 `json:"numCoresPerSocket,omitempty"` - // memoryMiB is the size of a virtual machine's memory, in MiB. - // Defaults to the analogue property value in the template from which this - // machine is cloned. - // +optional - MemoryMiB int64 `json:"memoryMiB,omitempty"` - // diskGiB is the size of a virtual machine's disk, in GiB. - // Defaults to the analogue property value in the template from which this - // machine is cloned. - // This parameter will be ignored if 'LinkedClone' CloneMode is set. - // +optional - DiskGiB int32 `json:"diskGiB,omitempty"` - // tagIDs is an optional set of tags to add to an instance. Specified tagIDs - // must use URN-notation instead of display names. A maximum of 10 tag IDs may be specified. - // +kubebuilder:validation:Pattern="^(urn):(vmomi):(InventoryServiceTag):([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}):([^:]+)$" - // +kubebuilder:example="urn:vmomi:InventoryServiceTag:5736bf56-49f5-4667-b38c-b97e09dc9578:GLOBAL" - // +optional - TagIDs []string `json:"tagIDs,omitempty"` - // snapshot is the name of the snapshot from which the VM was cloned - // +optional - Snapshot string `json:"snapshot"` - // cloneMode specifies the type of clone operation. - // The LinkedClone mode is only support for templates that have at least - // one snapshot. If the template has no snapshots, then CloneMode defaults - // to FullClone. - // When LinkedClone mode is enabled the DiskGiB field is ignored as it is - // not possible to expand disks of linked clones. - // Defaults to FullClone. - // When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone. - // +optional - CloneMode CloneMode `json:"cloneMode,omitempty"` - // dataDisks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is - // currently 29. The max number of disks for any controller is 30, but VM template will always have OS disk so that will leave - // 29 disks on any controller type. - // +openshift:enable:FeatureGate=VSphereMultiDisk - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=29 - DataDisks []VSphereDisk `json:"dataDisks,omitempty"` -} - -// CloneMode is the type of clone operation used to clone a VM from a template. -type CloneMode string - -const ( - // FullClone indicates a VM will have no relationship to the source of the - // clone operation once the operation is complete. This is the safest clone - // mode, but it is not the fastest. - FullClone CloneMode = "fullClone" - // LinkedClone means resulting VMs will be dependent upon the snapshot of - // the source VM/template from which the VM was cloned. This is the fastest - // clone mode, but it also prevents expanding a VMs disk beyond the size of - // the source VM/template. - LinkedClone CloneMode = "linkedClone" -) - -// NetworkSpec defines the virtual machine's network configuration. -type NetworkSpec struct { - // devices defines the virtual machine's network interfaces. - Devices []NetworkDeviceSpec `json:"devices"` -} - -// AddressesFromPool is an IPAddressPool that will be used to create -// IPAddressClaims for fulfillment by an external controller. -type AddressesFromPool struct { - // group of the IP address pool type known to an external IPAM controller. - // This should be a fully qualified domain name, for example, externalipam.controller.io. - // +kubebuilder:example=externalipam.controller.io - // +kubebuilder:validation:Pattern="^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" - // +required - Group string `json:"group"` - // resource of the IP address pool type known to an external IPAM controller. - // It is normally the plural form of the resource kind in lowercase, for example, - // ippools. - // +kubebuilder:example=ippools - // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +required - Resource string `json:"resource"` - // name of an IP address pool, for example, pool-config-1. - // +kubebuilder:example=pool-config-1 - // +kubebuilder:validation:Pattern="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +required - Name string `json:"name"` -} - -// NetworkDeviceSpec defines the network configuration for a virtual machine's -// network device. -type NetworkDeviceSpec struct { - // networkName is the name of the vSphere network or port group to which the network - // device will be connected, for example, port-group-1. When not provided, the vCenter - // API will attempt to select a default network. - // The available networks (port groups) can be listed using `govc ls 'network/*'` - // +kubebuilder:example=port-group-1 - // +kubebuilder:validation:MaxLength=80 - // +optional - NetworkName string `json:"networkName,omitempty"` - - // gateway is an IPv4 or IPv6 address which represents the subnet gateway, - // for example, 192.168.1.1. - // +kubebuilder:validation:Format=ipv4 - // +kubebuilder:validation:Format=ipv6 - // +kubebuilder:example="192.168.1.1" - // +kubebuilder:example="2001:DB8:0000:0000:244:17FF:FEB6:D37D" - // +optional - Gateway string `json:"gateway,omitempty"` - - // ipAddrs is a list of one or more IPv4 and/or IPv6 addresses and CIDR to assign to - // this device, for example, 192.168.1.100/24. IP addresses provided via ipAddrs are - // intended to allow explicit assignment of a machine's IP address. IP pool configurations - // provided via addressesFromPool, however, defer IP address assignment to an external controller. - // If both addressesFromPool and ipAddrs are empty or not defined, DHCP will be used to assign - // an IP address. If both ipAddrs and addressesFromPools are defined, the IP addresses associated with - // ipAddrs will be applied first followed by IP addresses from addressesFromPools. - // +kubebuilder:validation:Format=ipv4 - // +kubebuilder:validation:Format=ipv6 - // +kubebuilder:example="192.168.1.100/24" - // +kubebuilder:example="2001:DB8:0000:0000:244:17FF:FEB6:D37D/64" - // +optional - IPAddrs []string `json:"ipAddrs,omitempty"` - - // nameservers is a list of IPv4 and/or IPv6 addresses used as DNS nameservers, for example, - // 8.8.8.8. a nameserver is not provided by a fulfilled IPAddressClaim. If DHCP is not the - // source of IP addresses for this network device, nameservers should include a valid nameserver. - // +kubebuilder:validation:Format=ipv4 - // +kubebuilder:validation:Format=ipv6 - // +kubebuilder:example="8.8.8.8" - // +optional - Nameservers []string `json:"nameservers,omitempty"` - - // addressesFromPools is a list of references to IP pool types and instances which are handled - // by an external controller. addressesFromPool configurations provided via addressesFromPools - // defer IP address assignment to an external controller. IP addresses provided via ipAddrs, - // however, are intended to allow explicit assignment of a machine's IP address. If both - // addressesFromPool and ipAddrs are empty or not defined, DHCP will assign an IP address. - // If both ipAddrs and addressesFromPools are defined, the IP addresses associated with - // ipAddrs will be applied first followed by IP addresses from addressesFromPools. - // +kubebuilder:validation:Format=ipv4 - // +optional - AddressesFromPools []AddressesFromPool `json:"addressesFromPools,omitempty"` -} - -// VSphereDisk describes additional disks for vSphere. -type VSphereDisk struct { - // name is used to identify the disk definition. name is required needs to be unique so that it can be used to - // clearly identify purpose of the disk. - // It must be at most 80 characters in length and must consist only of alphanumeric characters, hyphens and underscores, - // and must start and end with an alphanumeric character. - // +kubebuilder:example=images_1 - // +kubebuilder:validation:MaxLength=80 - // +kubebuilder:validation:Pattern="^[a-zA-Z0-9]([-_a-zA-Z0-9]*[a-zA-Z0-9])?$" - // +required - Name string `json:"name"` - // sizeGiB is the size of the disk in GiB. - // The maximum supported size 16384 GiB. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=16384 - // +required - SizeGiB int32 `json:"sizeGiB"` - // provisioningMode is an optional field that specifies the provisioning type to be used by this vSphere data disk. - // Allowed values are "Thin", "Thick", "EagerlyZeroed", and omitted. - // When set to Thin, the disk will be made using thin provisioning allocating the bare minimum space. - // When set to Thick, the full disk size will be allocated when disk is created. - // When set to EagerlyZeroed, the disk will be created using eager zero provisioning. An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats. - // When omitted, no setting will be applied to the data disk and the provisioning mode for the disk will be determined by the default storage policy configured for the datastore in vSphere. - // +optional - ProvisioningMode ProvisioningMode `json:"provisioningMode,omitempty"` -} - -// provisioningMode represents the various provisioning types available to a VMs disk. -// +kubebuilder:validation:Enum=Thin;Thick;EagerlyZeroed -type ProvisioningMode string - -const ( - // ProvisioningModeThin creates the disk using thin provisioning. This means a sparse (allocate on demand) - // format with additional space optimizations. - ProvisioningModeThin ProvisioningMode = "Thin" - - // ProvisioningModeThick creates the disk with all space allocated. - ProvisioningModeThick ProvisioningMode = "Thick" - - // ProvisioningModeEagerlyZeroed creates the disk using eager zero provisioning. An eager zeroed thick disk - // has all space allocated and wiped clean of any previous contents on the physical media at - // creation time. Such disks may take longer time during creation compared to other disk formats. - ProvisioningModeEagerlyZeroed ProvisioningMode = "EagerlyZeroed" -) - -// WorkspaceConfig defines a workspace configuration for the vSphere cloud -// provider. -type Workspace struct { - // server is the IP address or FQDN of the vSphere endpoint. - // +optional - Server string `gcfg:"server,omitempty" json:"server,omitempty"` - // datacenter is the datacenter in which VMs are created/located. - // +optional - Datacenter string `gcfg:"datacenter,omitempty" json:"datacenter,omitempty"` - // folder is the folder in which VMs are created/located. - // +optional - Folder string `gcfg:"folder,omitempty" json:"folder,omitempty"` - // datastore is the datastore in which VMs are created/located. - // +optional - Datastore string `gcfg:"default-datastore,omitempty" json:"datastore,omitempty"` - // resourcePool is the resource pool in which VMs are created/located. - // +optional - ResourcePool string `gcfg:"resourcepool-path,omitempty" json:"resourcePool,omitempty"` - // vmGroup is the cluster vm group in which virtual machines will be added for vm host group based zonal. - // +openshift:validation:featureGate=VSphereHostVMGroupZonal - // +optional - VMGroup string `gcfg:"vmGroup,omitempty" json:"vmGroup,omitempty"` -} - -// VSphereMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. -// It contains VSphere-specific status information. -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type VSphereMachineProviderStatus struct { - metav1.TypeMeta `json:",inline"` - - // instanceId is the ID of the instance in VSphere - // +optional - InstanceID *string `json:"instanceId,omitempty"` - // instanceState is the provisioning state of the VSphere Instance. - // +optional - InstanceState *string `json:"instanceState,omitempty"` - // conditions is a set of conditions associated with the Machine to indicate - // errors or other status - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - // taskRef is a managed object reference to a Task related to the machine. - // This value is set automatically at runtime and should not be set or - // modified by users. - // +optional - TaskRef string `json:"taskRef,omitempty"` -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 63b9bb5ff..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,2032 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - intstr "k8s.io/apimachinery/pkg/util/intstr" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSMachineProviderConfig) DeepCopyInto(out *AWSMachineProviderConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.AMI.DeepCopyInto(&out.AMI) - if in.CPUOptions != nil { - in, out := &in.CPUOptions, &out.CPUOptions - *out = new(CPUOptions) - (*in).DeepCopyInto(*out) - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]TagSpecification, len(*in)) - copy(*out, *in) - } - if in.IAMInstanceProfile != nil { - in, out := &in.IAMInstanceProfile, &out.IAMInstanceProfile - *out = new(AWSResourceReference) - (*in).DeepCopyInto(*out) - } - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.KeyName != nil { - in, out := &in.KeyName, &out.KeyName - *out = new(string) - **out = **in - } - if in.PublicIP != nil { - in, out := &in.PublicIP, &out.PublicIP - *out = new(bool) - **out = **in - } - if in.SecurityGroups != nil { - in, out := &in.SecurityGroups, &out.SecurityGroups - *out = make([]AWSResourceReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Subnet.DeepCopyInto(&out.Subnet) - in.Placement.DeepCopyInto(&out.Placement) - if in.LoadBalancers != nil { - in, out := &in.LoadBalancers, &out.LoadBalancers - *out = make([]LoadBalancerReference, len(*in)) - copy(*out, *in) - } - if in.BlockDevices != nil { - in, out := &in.BlockDevices, &out.BlockDevices - *out = make([]BlockDeviceMappingSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SpotMarketOptions != nil { - in, out := &in.SpotMarketOptions, &out.SpotMarketOptions - *out = new(SpotMarketOptions) - (*in).DeepCopyInto(*out) - } - out.MetadataServiceOptions = in.MetadataServiceOptions - if in.PlacementGroupPartition != nil { - in, out := &in.PlacementGroupPartition, &out.PlacementGroupPartition - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSMachineProviderConfig. -func (in *AWSMachineProviderConfig) DeepCopy() *AWSMachineProviderConfig { - if in == nil { - return nil - } - out := new(AWSMachineProviderConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AWSMachineProviderConfig) 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 *AWSMachineProviderConfigList) DeepCopyInto(out *AWSMachineProviderConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AWSMachineProviderConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSMachineProviderConfigList. -func (in *AWSMachineProviderConfigList) DeepCopy() *AWSMachineProviderConfigList { - if in == nil { - return nil - } - out := new(AWSMachineProviderConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSMachineProviderStatus) DeepCopyInto(out *AWSMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID - *out = new(string) - **out = **in - } - if in.InstanceState != nil { - in, out := &in.InstanceState, &out.InstanceState - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DedicatedHost != nil { - in, out := &in.DedicatedHost, &out.DedicatedHost - *out = new(DedicatedHostStatus) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSMachineProviderStatus. -func (in *AWSMachineProviderStatus) DeepCopy() *AWSMachineProviderStatus { - if in == nil { - return nil - } - out := new(AWSMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSResourceReference) DeepCopyInto(out *AWSResourceReference) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = new(string) - **out = **in - } - if in.ARN != nil { - in, out := &in.ARN, &out.ARN - *out = new(string) - **out = **in - } - if in.Filters != nil { - in, out := &in.Filters, &out.Filters - *out = make([]Filter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSResourceReference. -func (in *AWSResourceReference) DeepCopy() *AWSResourceReference { - if in == nil { - return nil - } - out := new(AWSResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddressesFromPool) DeepCopyInto(out *AddressesFromPool) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddressesFromPool. -func (in *AddressesFromPool) DeepCopy() *AddressesFromPool { - if in == nil { - return nil - } - out := new(AddressesFromPool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureBootDiagnostics) DeepCopyInto(out *AzureBootDiagnostics) { - *out = *in - if in.CustomerManaged != nil { - in, out := &in.CustomerManaged, &out.CustomerManaged - *out = new(AzureCustomerManagedBootDiagnostics) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureBootDiagnostics. -func (in *AzureBootDiagnostics) DeepCopy() *AzureBootDiagnostics { - if in == nil { - return nil - } - out := new(AzureBootDiagnostics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureCustomerManagedBootDiagnostics) DeepCopyInto(out *AzureCustomerManagedBootDiagnostics) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureCustomerManagedBootDiagnostics. -func (in *AzureCustomerManagedBootDiagnostics) DeepCopy() *AzureCustomerManagedBootDiagnostics { - if in == nil { - return nil - } - out := new(AzureCustomerManagedBootDiagnostics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureDiagnostics) DeepCopyInto(out *AzureDiagnostics) { - *out = *in - if in.Boot != nil { - in, out := &in.Boot, &out.Boot - *out = new(AzureBootDiagnostics) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureDiagnostics. -func (in *AzureDiagnostics) DeepCopy() *AzureDiagnostics { - if in == nil { - return nil - } - out := new(AzureDiagnostics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureMachineProviderSpec) DeepCopyInto(out *AzureMachineProviderSpec) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(v1.SecretReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(v1.SecretReference) - **out = **in - } - out.Image = in.Image - in.OSDisk.DeepCopyInto(&out.OSDisk) - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]DataDisk, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.ApplicationSecurityGroups != nil { - in, out := &in.ApplicationSecurityGroups, &out.ApplicationSecurityGroups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NatRule != nil { - in, out := &in.NatRule, &out.NatRule - *out = new(int64) - **out = **in - } - if in.SpotVMOptions != nil { - in, out := &in.SpotVMOptions, &out.SpotVMOptions - *out = new(SpotVMOptions) - (*in).DeepCopyInto(*out) - } - if in.SecurityProfile != nil { - in, out := &in.SecurityProfile, &out.SecurityProfile - *out = new(SecurityProfile) - (*in).DeepCopyInto(*out) - } - in.Diagnostics.DeepCopyInto(&out.Diagnostics) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineProviderSpec. -func (in *AzureMachineProviderSpec) DeepCopy() *AzureMachineProviderSpec { - if in == nil { - return nil - } - out := new(AzureMachineProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AzureMachineProviderSpec) 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 *AzureMachineProviderStatus) DeepCopyInto(out *AzureMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.VMID != nil { - in, out := &in.VMID, &out.VMID - *out = new(string) - **out = **in - } - if in.VMState != nil { - in, out := &in.VMState, &out.VMState - *out = new(AzureVMState) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureMachineProviderStatus. -func (in *AzureMachineProviderStatus) DeepCopy() *AzureMachineProviderStatus { - if in == nil { - return nil - } - out := new(AzureMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BlockDeviceMappingSpec) DeepCopyInto(out *BlockDeviceMappingSpec) { - *out = *in - if in.DeviceName != nil { - in, out := &in.DeviceName, &out.DeviceName - *out = new(string) - **out = **in - } - if in.EBS != nil { - in, out := &in.EBS, &out.EBS - *out = new(EBSBlockDeviceSpec) - (*in).DeepCopyInto(*out) - } - if in.NoDevice != nil { - in, out := &in.NoDevice, &out.NoDevice - *out = new(string) - **out = **in - } - if in.VirtualName != nil { - in, out := &in.VirtualName, &out.VirtualName - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BlockDeviceMappingSpec. -func (in *BlockDeviceMappingSpec) DeepCopy() *BlockDeviceMappingSpec { - if in == nil { - return nil - } - out := new(BlockDeviceMappingSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CPUOptions) DeepCopyInto(out *CPUOptions) { - *out = *in - if in.ConfidentialCompute != nil { - in, out := &in.ConfidentialCompute, &out.ConfidentialCompute - *out = new(AWSConfidentialComputePolicy) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CPUOptions. -func (in *CPUOptions) DeepCopy() *CPUOptions { - if in == nil { - return nil - } - out := new(CPUOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Condition) DeepCopyInto(out *Condition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition. -func (in *Condition) DeepCopy() *Condition { - if in == nil { - return nil - } - out := new(Condition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfidentialVM) DeepCopyInto(out *ConfidentialVM) { - *out = *in - out.UEFISettings = in.UEFISettings - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfidentialVM. -func (in *ConfidentialVM) DeepCopy() *ConfidentialVM { - if in == nil { - return nil - } - out := new(ConfidentialVM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataDisk) DeepCopyInto(out *DataDisk) { - *out = *in - in.ManagedDisk.DeepCopyInto(&out.ManagedDisk) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDisk. -func (in *DataDisk) DeepCopy() *DataDisk { - if in == nil { - return nil - } - out := new(DataDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DataDiskManagedDiskParameters) DeepCopyInto(out *DataDiskManagedDiskParameters) { - *out = *in - if in.DiskEncryptionSet != nil { - in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet - *out = new(DiskEncryptionSetParameters) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DataDiskManagedDiskParameters. -func (in *DataDiskManagedDiskParameters) DeepCopy() *DataDiskManagedDiskParameters { - if in == nil { - return nil - } - out := new(DataDiskManagedDiskParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DedicatedHost) DeepCopyInto(out *DedicatedHost) { - *out = *in - if in.AllocationStrategy != nil { - in, out := &in.AllocationStrategy, &out.AllocationStrategy - *out = new(AllocationStrategy) - **out = **in - } - if in.DynamicHostAllocation != nil { - in, out := &in.DynamicHostAllocation, &out.DynamicHostAllocation - *out = new(DynamicHostAllocationSpec) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedHost. -func (in *DedicatedHost) DeepCopy() *DedicatedHost { - if in == nil { - return nil - } - out := new(DedicatedHost) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DedicatedHostStatus) DeepCopyInto(out *DedicatedHostStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DedicatedHostStatus. -func (in *DedicatedHostStatus) DeepCopy() *DedicatedHostStatus { - if in == nil { - return nil - } - out := new(DedicatedHostStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiskEncryptionSetParameters) DeepCopyInto(out *DiskEncryptionSetParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskEncryptionSetParameters. -func (in *DiskEncryptionSetParameters) DeepCopy() *DiskEncryptionSetParameters { - if in == nil { - return nil - } - out := new(DiskEncryptionSetParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DiskSettings) DeepCopyInto(out *DiskSettings) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiskSettings. -func (in *DiskSettings) DeepCopy() *DiskSettings { - if in == nil { - return nil - } - out := new(DiskSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DynamicHostAllocationSpec) DeepCopyInto(out *DynamicHostAllocationSpec) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = new([]TagSpecification) - if **in != nil { - in, out := *in, *out - *out = make([]TagSpecification, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DynamicHostAllocationSpec. -func (in *DynamicHostAllocationSpec) DeepCopy() *DynamicHostAllocationSpec { - if in == nil { - return nil - } - out := new(DynamicHostAllocationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EBSBlockDeviceSpec) DeepCopyInto(out *EBSBlockDeviceSpec) { - *out = *in - if in.DeprecatedDeleteOnTermination != nil { - in, out := &in.DeprecatedDeleteOnTermination, &out.DeprecatedDeleteOnTermination - *out = new(bool) - **out = **in - } - if in.Encrypted != nil { - in, out := &in.Encrypted, &out.Encrypted - *out = new(bool) - **out = **in - } - in.KMSKey.DeepCopyInto(&out.KMSKey) - if in.Iops != nil { - in, out := &in.Iops, &out.Iops - *out = new(int64) - **out = **in - } - if in.ThroughputMib != nil { - in, out := &in.ThroughputMib, &out.ThroughputMib - *out = new(int32) - **out = **in - } - if in.VolumeSize != nil { - in, out := &in.VolumeSize, &out.VolumeSize - *out = new(int64) - **out = **in - } - if in.VolumeType != nil { - in, out := &in.VolumeType, &out.VolumeType - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EBSBlockDeviceSpec. -func (in *EBSBlockDeviceSpec) DeepCopy() *EBSBlockDeviceSpec { - if in == nil { - return nil - } - out := new(EBSBlockDeviceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Filter) DeepCopyInto(out *Filter) { - *out = *in - if in.Values != nil { - in, out := &in.Values, &out.Values - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Filter. -func (in *Filter) DeepCopy() *Filter { - if in == nil { - return nil - } - out := new(Filter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPDisk) DeepCopyInto(out *GCPDisk) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.EncryptionKey != nil { - in, out := &in.EncryptionKey, &out.EncryptionKey - *out = new(GCPEncryptionKeyReference) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPDisk. -func (in *GCPDisk) DeepCopy() *GCPDisk { - if in == nil { - return nil - } - out := new(GCPDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPEncryptionKeyReference) DeepCopyInto(out *GCPEncryptionKeyReference) { - *out = *in - if in.KMSKey != nil { - in, out := &in.KMSKey, &out.KMSKey - *out = new(GCPKMSKeyReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPEncryptionKeyReference. -func (in *GCPEncryptionKeyReference) DeepCopy() *GCPEncryptionKeyReference { - if in == nil { - return nil - } - out := new(GCPEncryptionKeyReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPGPUConfig) DeepCopyInto(out *GCPGPUConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPGPUConfig. -func (in *GCPGPUConfig) DeepCopy() *GCPGPUConfig { - if in == nil { - return nil - } - out := new(GCPGPUConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPKMSKeyReference) DeepCopyInto(out *GCPKMSKeyReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPKMSKeyReference. -func (in *GCPKMSKeyReference) DeepCopy() *GCPKMSKeyReference { - if in == nil { - return nil - } - out := new(GCPKMSKeyReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPMachineProviderSpec) DeepCopyInto(out *GCPMachineProviderSpec) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.Disks != nil { - in, out := &in.Disks, &out.Disks - *out = make([]*GCPDisk, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(GCPDisk) - (*in).DeepCopyInto(*out) - } - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Metadata != nil { - in, out := &in.Metadata, &out.Metadata - *out = make([]*GCPMetadata, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(GCPMetadata) - (*in).DeepCopyInto(*out) - } - } - } - if in.NetworkInterfaces != nil { - in, out := &in.NetworkInterfaces, &out.NetworkInterfaces - *out = make([]*GCPNetworkInterface, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(GCPNetworkInterface) - **out = **in - } - } - } - if in.ServiceAccounts != nil { - in, out := &in.ServiceAccounts, &out.ServiceAccounts - *out = make([]GCPServiceAccount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.TargetPools != nil { - in, out := &in.TargetPools, &out.TargetPools - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GPUs != nil { - in, out := &in.GPUs, &out.GPUs - *out = make([]GCPGPUConfig, len(*in)) - copy(*out, *in) - } - if in.ProvisioningModel != nil { - in, out := &in.ProvisioningModel, &out.ProvisioningModel - *out = new(GCPProvisioningModelType) - **out = **in - } - out.ShieldedInstanceConfig = in.ShieldedInstanceConfig - if in.ResourceManagerTags != nil { - in, out := &in.ResourceManagerTags, &out.ResourceManagerTags - *out = make([]ResourceManagerTag, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPMachineProviderSpec. -func (in *GCPMachineProviderSpec) DeepCopy() *GCPMachineProviderSpec { - if in == nil { - return nil - } - out := new(GCPMachineProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GCPMachineProviderSpec) 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 *GCPMachineProviderStatus) DeepCopyInto(out *GCPMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID - *out = new(string) - **out = **in - } - if in.InstanceState != nil { - in, out := &in.InstanceState, &out.InstanceState - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPMachineProviderStatus. -func (in *GCPMachineProviderStatus) DeepCopy() *GCPMachineProviderStatus { - if in == nil { - return nil - } - out := new(GCPMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPMetadata) DeepCopyInto(out *GCPMetadata) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPMetadata. -func (in *GCPMetadata) DeepCopy() *GCPMetadata { - if in == nil { - return nil - } - out := new(GCPMetadata) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPNetworkInterface) DeepCopyInto(out *GCPNetworkInterface) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPNetworkInterface. -func (in *GCPNetworkInterface) DeepCopy() *GCPNetworkInterface { - if in == nil { - return nil - } - out := new(GCPNetworkInterface) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPServiceAccount) DeepCopyInto(out *GCPServiceAccount) { - *out = *in - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPServiceAccount. -func (in *GCPServiceAccount) DeepCopy() *GCPServiceAccount { - if in == nil { - return nil - } - out := new(GCPServiceAccount) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPShieldedInstanceConfig) DeepCopyInto(out *GCPShieldedInstanceConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPShieldedInstanceConfig. -func (in *GCPShieldedInstanceConfig) DeepCopy() *GCPShieldedInstanceConfig { - if in == nil { - return nil - } - out := new(GCPShieldedInstanceConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostPlacement) DeepCopyInto(out *HostPlacement) { - *out = *in - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(HostAffinity) - **out = **in - } - if in.DedicatedHost != nil { - in, out := &in.DedicatedHost, &out.DedicatedHost - *out = new(DedicatedHost) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPlacement. -func (in *HostPlacement) DeepCopy() *HostPlacement { - if in == nil { - return nil - } - out := new(HostPlacement) - 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 - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. -func (in *Image) DeepCopy() *Image { - if in == nil { - return nil - } - out := new(Image) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LastOperation) DeepCopyInto(out *LastOperation) { - *out = *in - if in.Description != nil { - in, out := &in.Description, &out.Description - *out = new(string) - **out = **in - } - if in.LastUpdated != nil { - in, out := &in.LastUpdated, &out.LastUpdated - *out = (*in).DeepCopy() - } - if in.State != nil { - in, out := &in.State, &out.State - *out = new(string) - **out = **in - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LastOperation. -func (in *LastOperation) DeepCopy() *LastOperation { - if in == nil { - return nil - } - out := new(LastOperation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LifecycleHook) DeepCopyInto(out *LifecycleHook) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleHook. -func (in *LifecycleHook) DeepCopy() *LifecycleHook { - if in == nil { - return nil - } - out := new(LifecycleHook) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LifecycleHooks) DeepCopyInto(out *LifecycleHooks) { - *out = *in - if in.PreDrain != nil { - in, out := &in.PreDrain, &out.PreDrain - *out = make([]LifecycleHook, len(*in)) - copy(*out, *in) - } - if in.PreTerminate != nil { - in, out := &in.PreTerminate, &out.PreTerminate - *out = make([]LifecycleHook, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LifecycleHooks. -func (in *LifecycleHooks) DeepCopy() *LifecycleHooks { - if in == nil { - return nil - } - out := new(LifecycleHooks) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerReference) DeepCopyInto(out *LoadBalancerReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerReference. -func (in *LoadBalancerReference) DeepCopy() *LoadBalancerReference { - if in == nil { - return nil - } - out := new(LoadBalancerReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Machine) DeepCopyInto(out *Machine) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Machine. -func (in *Machine) DeepCopy() *Machine { - if in == nil { - return nil - } - out := new(Machine) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Machine) 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 *MachineHealthCheck) DeepCopyInto(out *MachineHealthCheck) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheck. -func (in *MachineHealthCheck) DeepCopy() *MachineHealthCheck { - if in == nil { - return nil - } - out := new(MachineHealthCheck) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineHealthCheck) 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 *MachineHealthCheckList) DeepCopyInto(out *MachineHealthCheckList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MachineHealthCheck, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckList. -func (in *MachineHealthCheckList) DeepCopy() *MachineHealthCheckList { - if in == nil { - return nil - } - out := new(MachineHealthCheckList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineHealthCheckList) 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 *MachineHealthCheckSpec) DeepCopyInto(out *MachineHealthCheckSpec) { - *out = *in - in.Selector.DeepCopyInto(&out.Selector) - if in.UnhealthyConditions != nil { - in, out := &in.UnhealthyConditions, &out.UnhealthyConditions - *out = make([]UnhealthyCondition, len(*in)) - copy(*out, *in) - } - if in.MaxUnhealthy != nil { - in, out := &in.MaxUnhealthy, &out.MaxUnhealthy - *out = new(intstr.IntOrString) - **out = **in - } - if in.NodeStartupTimeout != nil { - in, out := &in.NodeStartupTimeout, &out.NodeStartupTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.RemediationTemplate != nil { - in, out := &in.RemediationTemplate, &out.RemediationTemplate - *out = new(v1.ObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckSpec. -func (in *MachineHealthCheckSpec) DeepCopy() *MachineHealthCheckSpec { - if in == nil { - return nil - } - out := new(MachineHealthCheckSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineHealthCheckStatus) DeepCopyInto(out *MachineHealthCheckStatus) { - *out = *in - if in.ExpectedMachines != nil { - in, out := &in.ExpectedMachines, &out.ExpectedMachines - *out = new(int) - **out = **in - } - if in.CurrentHealthy != nil { - in, out := &in.CurrentHealthy, &out.CurrentHealthy - *out = new(int) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineHealthCheckStatus. -func (in *MachineHealthCheckStatus) DeepCopy() *MachineHealthCheckStatus { - if in == nil { - return nil - } - out := new(MachineHealthCheckStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineList) DeepCopyInto(out *MachineList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Machine, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineList. -func (in *MachineList) DeepCopy() *MachineList { - if in == nil { - return nil - } - out := new(MachineList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineList) 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 *MachineSet) DeepCopyInto(out *MachineSet) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSet. -func (in *MachineSet) DeepCopy() *MachineSet { - if in == nil { - return nil - } - out := new(MachineSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineSet) 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 *MachineSetList) DeepCopyInto(out *MachineSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MachineSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetList. -func (in *MachineSetList) DeepCopy() *MachineSetList { - if in == nil { - return nil - } - out := new(MachineSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineSetList) 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 *MachineSetSpec) DeepCopyInto(out *MachineSetSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - in.Selector.DeepCopyInto(&out.Selector) - in.Template.DeepCopyInto(&out.Template) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetSpec. -func (in *MachineSetSpec) DeepCopy() *MachineSetSpec { - if in == nil { - return nil - } - out := new(MachineSetSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineSetStatus) DeepCopyInto(out *MachineSetStatus) { - *out = *in - if in.ErrorReason != nil { - in, out := &in.ErrorReason, &out.ErrorReason - *out = new(MachineSetStatusError) - **out = **in - } - if in.ErrorMessage != nil { - in, out := &in.ErrorMessage, &out.ErrorMessage - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSetStatus. -func (in *MachineSetStatus) DeepCopy() *MachineSetStatus { - if in == nil { - return nil - } - out := new(MachineSetStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineSpec) DeepCopyInto(out *MachineSpec) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.LifecycleHooks.DeepCopyInto(&out.LifecycleHooks) - if in.Taints != nil { - in, out := &in.Taints, &out.Taints - *out = make([]v1.Taint, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.ProviderSpec.DeepCopyInto(&out.ProviderSpec) - if in.ProviderID != nil { - in, out := &in.ProviderID, &out.ProviderID - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineSpec. -func (in *MachineSpec) DeepCopy() *MachineSpec { - if in == nil { - return nil - } - out := new(MachineSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineStatus) DeepCopyInto(out *MachineStatus) { - *out = *in - if in.NodeRef != nil { - in, out := &in.NodeRef, &out.NodeRef - *out = new(v1.ObjectReference) - **out = **in - } - if in.LastUpdated != nil { - in, out := &in.LastUpdated, &out.LastUpdated - *out = (*in).DeepCopy() - } - if in.ErrorReason != nil { - in, out := &in.ErrorReason, &out.ErrorReason - *out = new(MachineStatusError) - **out = **in - } - if in.ErrorMessage != nil { - in, out := &in.ErrorMessage, &out.ErrorMessage - *out = new(string) - **out = **in - } - if in.ProviderStatus != nil { - in, out := &in.ProviderStatus, &out.ProviderStatus - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]v1.NodeAddress, len(*in)) - copy(*out, *in) - } - if in.LastOperation != nil { - in, out := &in.LastOperation, &out.LastOperation - *out = new(LastOperation) - (*in).DeepCopyInto(*out) - } - if in.Phase != nil { - in, out := &in.Phase, &out.Phase - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineStatus. -func (in *MachineStatus) DeepCopy() *MachineStatus { - if in == nil { - return nil - } - out := new(MachineStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineTemplateSpec) DeepCopyInto(out *MachineTemplateSpec) { - *out = *in - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineTemplateSpec. -func (in *MachineTemplateSpec) DeepCopy() *MachineTemplateSpec { - if in == nil { - return nil - } - out := new(MachineTemplateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetadataServiceOptions) DeepCopyInto(out *MetadataServiceOptions) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataServiceOptions. -func (in *MetadataServiceOptions) DeepCopy() *MetadataServiceOptions { - if in == nil { - return nil - } - out := new(MetadataServiceOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkDeviceSpec) DeepCopyInto(out *NetworkDeviceSpec) { - *out = *in - if in.IPAddrs != nil { - in, out := &in.IPAddrs, &out.IPAddrs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AddressesFromPools != nil { - in, out := &in.AddressesFromPools, &out.AddressesFromPools - *out = make([]AddressesFromPool, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkDeviceSpec. -func (in *NetworkDeviceSpec) DeepCopy() *NetworkDeviceSpec { - if in == nil { - return nil - } - out := new(NetworkDeviceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - if in.Devices != nil { - in, out := &in.Devices, &out.Devices - *out = make([]NetworkDeviceSpec, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OSDisk) DeepCopyInto(out *OSDisk) { - *out = *in - in.ManagedDisk.DeepCopyInto(&out.ManagedDisk) - out.DiskSettings = in.DiskSettings - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDisk. -func (in *OSDisk) DeepCopy() *OSDisk { - if in == nil { - return nil - } - out := new(OSDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OSDiskManagedDiskParameters) DeepCopyInto(out *OSDiskManagedDiskParameters) { - *out = *in - if in.DiskEncryptionSet != nil { - in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet - *out = new(DiskEncryptionSetParameters) - **out = **in - } - out.SecurityProfile = in.SecurityProfile - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OSDiskManagedDiskParameters. -func (in *OSDiskManagedDiskParameters) DeepCopy() *OSDiskManagedDiskParameters { - if in == nil { - return nil - } - out := new(OSDiskManagedDiskParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ObjectMeta) DeepCopyInto(out *ObjectMeta) { - *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.OwnerReferences != nil { - in, out := &in.OwnerReferences, &out.OwnerReferences - *out = make([]metav1.OwnerReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectMeta. -func (in *ObjectMeta) DeepCopy() *ObjectMeta { - if in == nil { - return nil - } - out := new(ObjectMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Placement) DeepCopyInto(out *Placement) { - *out = *in - if in.Host != nil { - in, out := &in.Host, &out.Host - *out = new(HostPlacement) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Placement. -func (in *Placement) DeepCopy() *Placement { - if in == nil { - return nil - } - out := new(Placement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProviderSpec) DeepCopyInto(out *ProviderSpec) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(runtime.RawExtension) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderSpec. -func (in *ProviderSpec) DeepCopy() *ProviderSpec { - if in == nil { - return nil - } - out := new(ProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceManagerTag) DeepCopyInto(out *ResourceManagerTag) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceManagerTag. -func (in *ResourceManagerTag) DeepCopy() *ResourceManagerTag { - if in == nil { - return nil - } - out := new(ResourceManagerTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityProfile) DeepCopyInto(out *SecurityProfile) { - *out = *in - if in.EncryptionAtHost != nil { - in, out := &in.EncryptionAtHost, &out.EncryptionAtHost - *out = new(bool) - **out = **in - } - in.Settings.DeepCopyInto(&out.Settings) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityProfile. -func (in *SecurityProfile) DeepCopy() *SecurityProfile { - if in == nil { - return nil - } - out := new(SecurityProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecuritySettings) DeepCopyInto(out *SecuritySettings) { - *out = *in - if in.ConfidentialVM != nil { - in, out := &in.ConfidentialVM, &out.ConfidentialVM - *out = new(ConfidentialVM) - **out = **in - } - if in.TrustedLaunch != nil { - in, out := &in.TrustedLaunch, &out.TrustedLaunch - *out = new(TrustedLaunch) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecuritySettings. -func (in *SecuritySettings) DeepCopy() *SecuritySettings { - if in == nil { - return nil - } - out := new(SecuritySettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SpotMarketOptions) DeepCopyInto(out *SpotMarketOptions) { - *out = *in - if in.MaxPrice != nil { - in, out := &in.MaxPrice, &out.MaxPrice - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpotMarketOptions. -func (in *SpotMarketOptions) DeepCopy() *SpotMarketOptions { - if in == nil { - return nil - } - out := new(SpotMarketOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SpotVMOptions) DeepCopyInto(out *SpotVMOptions) { - *out = *in - if in.MaxPrice != nil { - in, out := &in.MaxPrice, &out.MaxPrice - x := (*in).DeepCopy() - *out = &x - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SpotVMOptions. -func (in *SpotVMOptions) DeepCopy() *SpotVMOptions { - if in == nil { - return nil - } - out := new(SpotVMOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TagSpecification) DeepCopyInto(out *TagSpecification) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TagSpecification. -func (in *TagSpecification) DeepCopy() *TagSpecification { - if in == nil { - return nil - } - out := new(TagSpecification) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TrustedLaunch) DeepCopyInto(out *TrustedLaunch) { - *out = *in - out.UEFISettings = in.UEFISettings - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrustedLaunch. -func (in *TrustedLaunch) DeepCopy() *TrustedLaunch { - if in == nil { - return nil - } - out := new(TrustedLaunch) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UEFISettings) DeepCopyInto(out *UEFISettings) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UEFISettings. -func (in *UEFISettings) DeepCopy() *UEFISettings { - if in == nil { - return nil - } - out := new(UEFISettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UnhealthyCondition) DeepCopyInto(out *UnhealthyCondition) { - *out = *in - out.Timeout = in.Timeout - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UnhealthyCondition. -func (in *UnhealthyCondition) DeepCopy() *UnhealthyCondition { - if in == nil { - return nil - } - out := new(UnhealthyCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VMDiskSecurityProfile) DeepCopyInto(out *VMDiskSecurityProfile) { - *out = *in - out.DiskEncryptionSet = in.DiskEncryptionSet - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMDiskSecurityProfile. -func (in *VMDiskSecurityProfile) DeepCopy() *VMDiskSecurityProfile { - if in == nil { - return nil - } - out := new(VMDiskSecurityProfile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereDisk) DeepCopyInto(out *VSphereDisk) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereDisk. -func (in *VSphereDisk) DeepCopy() *VSphereDisk { - if in == nil { - return nil - } - out := new(VSphereDisk) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereMachineProviderSpec) DeepCopyInto(out *VSphereMachineProviderSpec) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.UserDataSecret != nil { - in, out := &in.UserDataSecret, &out.UserDataSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.CredentialsSecret != nil { - in, out := &in.CredentialsSecret, &out.CredentialsSecret - *out = new(v1.LocalObjectReference) - **out = **in - } - if in.Workspace != nil { - in, out := &in.Workspace, &out.Workspace - *out = new(Workspace) - **out = **in - } - in.Network.DeepCopyInto(&out.Network) - if in.TagIDs != nil { - in, out := &in.TagIDs, &out.TagIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DataDisks != nil { - in, out := &in.DataDisks, &out.DataDisks - *out = make([]VSphereDisk, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineProviderSpec. -func (in *VSphereMachineProviderSpec) DeepCopy() *VSphereMachineProviderSpec { - if in == nil { - return nil - } - out := new(VSphereMachineProviderSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VSphereMachineProviderSpec) 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 *VSphereMachineProviderStatus) DeepCopyInto(out *VSphereMachineProviderStatus) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.InstanceID != nil { - in, out := &in.InstanceID, &out.InstanceID - *out = new(string) - **out = **in - } - if in.InstanceState != nil { - in, out := &in.InstanceState, &out.InstanceState - *out = new(string) - **out = **in - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereMachineProviderStatus. -func (in *VSphereMachineProviderStatus) DeepCopy() *VSphereMachineProviderStatus { - if in == nil { - return nil - } - out := new(VSphereMachineProviderStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Workspace) DeepCopyInto(out *Workspace) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workspace. -func (in *Workspace) DeepCopy() *Workspace { - if in == nil { - return nil - } - out := new(Workspace) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index ae6e6a8a5..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,140 +0,0 @@ -machines.machine.openshift.io: - Annotations: - exclude.release.openshift.io/internal-openshift-hosted: "true" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/948 - CRDName: machines.machine.openshift.io - Capability: MachineAPI - Category: "" - FeatureGates: - - MachineAPIMigration - FilenameOperatorName: machine-api - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: machine.openshift.io - HasStatus: true - KindName: Machine - Labels: {} - PluralName: machines - PrinterColumns: - - description: Phase of machine - jsonPath: .status.phase - name: Phase - type: string - - description: Type of instance - jsonPath: .metadata.labels['machine\.openshift\.io/instance-type'] - name: Type - type: string - - description: Region associated with machine - jsonPath: .metadata.labels['machine\.openshift\.io/region'] - name: Region - type: string - - description: Zone associated with machine - jsonPath: .metadata.labels['machine\.openshift\.io/zone'] - name: Zone - type: string - - description: Machine age - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Node associated with machine - jsonPath: .status.nodeRef.name - name: Node - priority: 1 - type: string - - description: Provider ID of machine created in cloud provider - jsonPath: .spec.providerID - name: ProviderID - priority: 1 - type: string - - description: State of instance - jsonPath: .metadata.annotations['machine\.openshift\.io/instance-state'] - name: State - priority: 1 - type: string - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1beta1 - -machinehealthchecks.machine.openshift.io: - Annotations: - exclude.release.openshift.io/internal-openshift-hosted: "true" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1032 - CRDName: machinehealthchecks.machine.openshift.io - Capability: MachineAPI - Category: "" - FeatureGates: [] - FilenameOperatorName: machine-api - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: machine.openshift.io - HasStatus: true - KindName: MachineHealthCheck - Labels: {} - PluralName: machinehealthchecks - PrinterColumns: - - description: Maximum number of unhealthy machines allowed - jsonPath: .spec.maxUnhealthy - name: MaxUnhealthy - type: string - - description: Number of machines currently monitored - jsonPath: .status.expectedMachines - name: ExpectedMachines - type: integer - - description: Current observed healthy machines - jsonPath: .status.currentHealthy - name: CurrentHealthy - type: integer - Scope: Namespaced - ShortNames: - - mhc - - mhcs - TopLevelFeatureGates: [] - Version: v1beta1 - -machinesets.machine.openshift.io: - Annotations: - exclude.release.openshift.io/internal-openshift-hosted: "true" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1032 - CRDName: machinesets.machine.openshift.io - Capability: MachineAPI - Category: "" - FeatureGates: - - MachineAPIMigration - FilenameOperatorName: machine-api - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: machine.openshift.io - HasStatus: true - KindName: MachineSet - Labels: {} - PluralName: machinesets - PrinterColumns: - - description: Desired Replicas - jsonPath: .spec.replicas - name: Desired - type: integer - - description: Current Replicas - jsonPath: .status.replicas - name: Current - type: integer - - description: Ready Replicas - jsonPath: .status.readyReplicas - name: Ready - type: integer - - description: Observed number of available replicas - jsonPath: .status.availableReplicas - name: Available - type: string - - description: Machineset age - jsonPath: .metadata.creationTimestamp - name: Age - type: date - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1beta1 - diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.model_name.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.model_name.go deleted file mode 100644 index fe84d447f..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.model_name.go +++ /dev/null @@ -1,376 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1beta1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSMachineProviderConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AWSMachineProviderConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSMachineProviderConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AWSMachineProviderConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AWSMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSResourceReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AWSResourceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AddressesFromPool) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AddressesFromPool" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureBootDiagnostics) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AzureBootDiagnostics" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureCustomerManagedBootDiagnostics) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AzureCustomerManagedBootDiagnostics" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureDiagnostics) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AzureDiagnostics" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureMachineProviderSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AzureMachineProviderSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.AzureMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BlockDeviceMappingSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.BlockDeviceMappingSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CPUOptions) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.CPUOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Condition) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Condition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfidentialVM) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.ConfidentialVM" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DataDisk) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DataDisk" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DataDiskManagedDiskParameters) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DataDiskManagedDiskParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DedicatedHost) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DedicatedHost" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DedicatedHostStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DedicatedHostStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DiskEncryptionSetParameters) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DiskEncryptionSetParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DiskSettings) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DiskSettings" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DynamicHostAllocationSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.DynamicHostAllocationSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EBSBlockDeviceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.EBSBlockDeviceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Filter) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Filter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPDisk) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPDisk" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPEncryptionKeyReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPEncryptionKeyReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPGPUConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPGPUConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPKMSKeyReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPKMSKeyReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPMachineProviderSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPMachineProviderSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPMetadata) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPMetadata" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPNetworkInterface) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPNetworkInterface" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPServiceAccount) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPServiceAccount" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPShieldedInstanceConfig) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.GCPShieldedInstanceConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HostPlacement) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.HostPlacement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Image) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Image" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LastOperation) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.LastOperation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LifecycleHook) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.LifecycleHook" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LifecycleHooks) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.LifecycleHooks" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LoadBalancerReference) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.LoadBalancerReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Machine) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Machine" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineHealthCheck) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineHealthCheck" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineHealthCheckList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineHealthCheckList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineHealthCheckSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineHealthCheckSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineHealthCheckStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineHealthCheckStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineSet) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineSet" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineSetList) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineSetList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineSetSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineSetSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineSetStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineSetStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineTemplateSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MachineTemplateSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MetadataServiceOptions) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.MetadataServiceOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkDeviceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.NetworkDeviceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.NetworkSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OSDisk) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.OSDisk" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OSDiskManagedDiskParameters) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.OSDiskManagedDiskParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ObjectMeta) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.ObjectMeta" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Placement) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Placement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProviderSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.ProviderSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceManagerTag) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.ResourceManagerTag" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityProfile) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.SecurityProfile" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecuritySettings) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.SecuritySettings" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SpotMarketOptions) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.SpotMarketOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SpotVMOptions) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.SpotVMOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TagSpecification) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.TagSpecification" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TrustedLaunch) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.TrustedLaunch" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UEFISettings) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.UEFISettings" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UnhealthyCondition) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.UnhealthyCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VMDiskSecurityProfile) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.VMDiskSecurityProfile" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VSphereDisk) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.VSphereDisk" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VSphereMachineProviderSpec) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.VSphereMachineProviderSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VSphereMachineProviderStatus) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.VSphereMachineProviderStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Workspace) OpenAPIModelName() string { - return "com.github.openshift.api.machine.v1beta1.Workspace" -} diff --git a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index e686cad25..000000000 --- a/vendor/github.com/openshift/api/machine/v1beta1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,901 +0,0 @@ -package v1beta1 - -// 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_AWSMachineProviderConfig = map[string]string{ - "": "AWSMachineProviderConfig is the Schema for the awsmachineproviderconfigs API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "ami": "ami is the reference to the AMI from which to create the machine instance.", - "instanceType": "instanceType is the type of instance to create. Example: m4.xlarge", - "cpuOptions": "cpuOptions defines CPU-related settings for the instance, including the confidential computing policy. When omitted, this means no opinion and the AWS platform is left to choose a reasonable default. More info: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CpuOptionsRequest.html, https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cpu-options-supported-instances-values.html", - "tags": "tags is the set of tags to add to apply to an instance, in addition to the ones added by default by the actuator. These tags are additive. The actuator will ensure these tags are present, but will not remove any other tags that may exist on the instance.", - "iamInstanceProfile": "iamInstanceProfile is a reference to an IAM role to assign to the instance", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "credentialsSecret is a reference to the secret with AWS credentials. Otherwise, defaults to permissions provided by attached IAM role where the actuator is running.", - "keyName": "keyName is the name of the KeyPair to use for SSH", - "deviceIndex": "deviceIndex is the index of the device on the instance for the network interface attachment. Defaults to 0.", - "publicIp": "publicIp specifies whether the instance should get a public IP. If not present, it should use the default of its subnet.", - "networkInterfaceType": "networkInterfaceType specifies the type of network interface to be used for the primary network interface. Valid values are \"ENA\", \"EFA\", and omitted, which means no opinion and the platform chooses a good default which may change over time. The current default value is \"ENA\". Please visit https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html to learn more about the AWS Elastic Fabric Adapter interface option.", - "securityGroups": "securityGroups is an array of references to security groups that should be applied to the instance.", - "subnet": "subnet is a reference to the subnet to use for this instance", - "placement": "placement specifies where to create the instance in AWS", - "loadBalancers": "loadBalancers is the set of load balancers to which the new instance should be added once it is created.", - "blockDevices": "blockDevices is the set of block device mapping associated to this instance, block device without a name will be used as a root device and only one device without a name is allowed https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html", - "spotMarketOptions": "spotMarketOptions allows users to configure instances to be run using AWS Spot instances.", - "metadataServiceOptions": "metadataServiceOptions allows users to configure instance metadata service interaction options. If nothing specified, default AWS IMDS settings will be applied. https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", - "placementGroupName": "placementGroupName specifies the name of the placement group in which to launch the instance. The placement group must already be created and may use any placement strategy. When omitted, no placement group is used when creating the EC2 instance.", - "placementGroupPartition": "placementGroupPartition is the partition number within the placement group in which to launch the instance. This must be an integer value between 1 and 7. It is only valid if the placement group, referred in `PlacementGroupName` was created with strategy set to partition.", - "capacityReservationId": "capacityReservationId specifies the target Capacity Reservation into which the instance should be launched. The field size should be greater than 0 and the field input must start with cr-***", - "marketType": "marketType specifies the type of market for the EC2 instance. Valid values are OnDemand, Spot, CapacityBlock and omitted.\n\nDefaults to OnDemand. When SpotMarketOptions is provided, the marketType defaults to \"Spot\".\n\nWhen set to OnDemand the instance runs as a standard OnDemand instance. When set to Spot the instance runs as a Spot instance. When set to CapacityBlock the instance utilizes pre-purchased compute capacity (capacity blocks) with AWS Capacity Reservations. If this value is selected, capacityReservationID must be specified to identify the target reservation.", -} - -func (AWSMachineProviderConfig) SwaggerDoc() map[string]string { - return map_AWSMachineProviderConfig -} - -var map_AWSMachineProviderConfigList = map[string]string{ - "": "AWSMachineProviderConfigList contains a list of AWSMachineProviderConfig Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", -} - -func (AWSMachineProviderConfigList) SwaggerDoc() map[string]string { - return map_AWSMachineProviderConfigList -} - -var map_AWSMachineProviderStatus = map[string]string{ - "": "AWSMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains AWS-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "instanceId is the instance ID of the machine created in AWS", - "instanceState": "instanceState is the state of the AWS instance for this machine", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", - "dedicatedHost": "dedicatedHost tracks the dynamically allocated dedicated host. This field is populated when allocationStrategy is Dynamic (with or without DynamicHostAllocation). When omitted, this indicates that the dedicated host has not yet been allocated, or allocation is in progress.", -} - -func (AWSMachineProviderStatus) SwaggerDoc() map[string]string { - return map_AWSMachineProviderStatus -} - -var map_AWSResourceReference = map[string]string{ - "": "AWSResourceReference is a reference to a specific AWS resource by ID, ARN, or filters. Only one of ID, ARN or Filters may be specified. Specifying more than one will result in a validation error.", - "id": "id of resource", - "arn": "arn of resource", - "filters": "filters is a set of filters used to identify a resource", -} - -func (AWSResourceReference) SwaggerDoc() map[string]string { - return map_AWSResourceReference -} - -var map_BlockDeviceMappingSpec = map[string]string{ - "": "BlockDeviceMappingSpec describes a block device mapping", - "deviceName": "The device name exposed to the machine (for example, /dev/sdh or xvdh).", - "ebs": "Parameters used to automatically set up EBS volumes when the machine is launched.", - "noDevice": "Suppresses the specified device included in the block device mapping of the AMI.", - "virtualName": "The virtual device name (ephemeralN). Machine store volumes are numbered starting from 0. An machine type with 2 available machine store volumes can specify mappings for ephemeral0 and ephemeral1.The number of available machine store volumes depends on the machine type. After you connect to the machine, you must mount the volume.\n\nConstraints: For M3 machines, you must specify machine store volumes in the block device mapping for the machine. When you launch an M3 machine, we ignore any machine store volumes specified in the block device mapping for the AMI.", -} - -func (BlockDeviceMappingSpec) SwaggerDoc() map[string]string { - return map_BlockDeviceMappingSpec -} - -var map_CPUOptions = map[string]string{ - "": "CPUOptions defines CPU-related settings for the instance, including the confidential computing policy. If provided, it must not be empty — at least one field must be set.", - "confidentialCompute": "confidentialCompute specifies whether confidential computing should be enabled for the instance, and, if so, which confidential computing technology to use. Valid values are: Disabled, AMDEncryptedVirtualizationNestedPaging and omitted. When set to Disabled, confidential computing will be disabled for the instance. When set to AMDEncryptedVirtualizationNestedPaging, AMD SEV-SNP will be used as the confidential computing technology for the instance. In this case, ensure the following conditions are met: 1) The selected instance type supports AMD SEV-SNP. 2) The selected AWS region supports AMD SEV-SNP. 3) The selected AMI supports AMD SEV-SNP. More details can be checked at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html When omitted, this means no opinion and the AWS platform is left to choose a reasonable default, which is subject to change without notice. The current default is Disabled.", -} - -func (CPUOptions) SwaggerDoc() map[string]string { - return map_CPUOptions -} - -var map_DedicatedHost = map[string]string{ - "": "DedicatedHost represents the configuration for the usage of dedicated host.", - "allocationStrategy": "allocationStrategy specifies if the dedicated host will be provided by the admin through the id field or if the host will be dynamically allocated. Valid values are UserProvided and Dynamic. When omitted, the value defaults to \"UserProvided\", which requires the id field to be set. When allocationStrategy is set to UserProvided, an ID of the dedicated host to assign must be provided. When allocationStrategy is set to Dynamic, a dedicated host will be allocated and used to assign instances. When allocationStrategy is set to Dynamic, and dynamicHostAllocation is configured, a dedicated host will be allocated and the tags in dynamicHostAllocation will be assigned to that host.", - "id": "id identifies the AWS Dedicated Host on which the instance must run. The value must start with \"h-\" followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f). The use of 8 lowercase hexadecimal characters is for older legacy hosts that may not have been migrated to newer format. Must be either 10 or 19 characters in length. This field is required when allocationStrategy is UserProvided, and forbidden otherwise. When omitted with allocationStrategy set to Dynamic, the platform will dynamically allocate a dedicated host.", - "dynamicHostAllocation": "dynamicHostAllocation specifies tags to apply to a dynamically allocated dedicated host. This field is only allowed when allocationStrategy is Dynamic, and is mutually exclusive with id. When specified, a dedicated host will be allocated with the provided tags applied. When omitted (and allocationStrategy is Dynamic), a dedicated host will be allocated without any additional tags.", -} - -func (DedicatedHost) SwaggerDoc() map[string]string { - return map_DedicatedHost -} - -var map_DedicatedHostStatus = map[string]string{ - "": "DedicatedHostStatus defines the observed state of a dynamically allocated dedicated host associated with an AWSMachine. This struct is used to track the ID of the dedicated host.", - "id": "id tracks the dynamically allocated dedicated host ID. This field is populated when allocationStrategy is Dynamic (with or without DynamicHostAllocation). The value must start with \"h-\" followed by either 8 or 17 lowercase hexadecimal characters (0-9 and a-f). The use of 8 lowercase hexadecimal characters is for older legacy hosts that may not have been migrated to newer format. Must be either 10 or 19 characters in length.", -} - -func (DedicatedHostStatus) SwaggerDoc() map[string]string { - return map_DedicatedHostStatus -} - -var map_DynamicHostAllocationSpec = map[string]string{ - "": "DynamicHostAllocationSpec defines the configuration for dynamic dedicated host allocation. This specification always allocates exactly one dedicated host per machine. At least one property must be specified when this struct is used. Currently only Tags are available for configuring, but in the future more configs may become available.", - "tags": "tags specifies a set of key-value pairs to apply to the allocated dedicated host. When omitted, no additional user-defined tags will be applied to the allocated host. A maximum of 50 tags can be specified.", -} - -func (DynamicHostAllocationSpec) SwaggerDoc() map[string]string { - return map_DynamicHostAllocationSpec -} - -var map_EBSBlockDeviceSpec = map[string]string{ - "": "EBSBlockDeviceSpec describes a block device for an EBS volume. https://docs.aws.amazon.com/goto/WebAPI/ec2-2016-11-15/EbsBlockDevice", - "deleteOnTermination": "Indicates whether the EBS volume is deleted on machine termination.\n\nDeprecated: setting this field has no effect.", - "encrypted": "Indicates whether the EBS volume is encrypted. Encrypted Amazon EBS volumes may only be attached to machines that support Amazon EBS encryption.", - "kmsKey": "Indicates the KMS key that should be used to encrypt the Amazon EBS volume.", - "iops": "The number of I/O operations per second (IOPS) that the volume supports. For io1, this represents the number of IOPS that are provisioned for the volume. For gp2, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information about General Purpose SSD baseline performance, I/O credits, and bursting, see Amazon EBS Volume Types (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the Amazon Elastic Compute Cloud User Guide.\n\nMinimal and maximal IOPS for io1 and gp2 are constrained. Please, check https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html for precise boundaries for individual volumes.\n\nCondition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.", - "throughputMib": "throughputMib to provision in MiB/s supported for the volume type. Not applicable to all types.\n\nThis parameter is valid only for gp3 volumes. Valid Range: Minimum value of 125. Maximum value of 2000.\n\nWhen omitted, this means no opinion, and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 125.", - "volumeSize": "The size of the volume, in GiB.\n\nConstraints: 1-16384 for General Purpose SSD (gp2), 4-16384 for Provisioned IOPS SSD (io1), 500-16384 for Throughput Optimized HDD (st1), 500-16384 for Cold HDD (sc1), and 1-1024 for Magnetic (standard) volumes. If you specify a snapshot, the volume size must be equal to or larger than the snapshot size.\n\nDefault: If you're creating the volume from a snapshot and don't specify a volume size, the default is the snapshot size.", - "volumeType": "volumeType can be of type gp2, gp3, io1, st1, sc1, or standard. Default: standard", -} - -func (EBSBlockDeviceSpec) SwaggerDoc() map[string]string { - return map_EBSBlockDeviceSpec -} - -var map_Filter = map[string]string{ - "": "Filter is a filter used to identify an AWS resource", - "name": "name of the filter. Filter names are case-sensitive.", - "values": "values includes one or more filter values. Filter values are case-sensitive.", -} - -func (Filter) SwaggerDoc() map[string]string { - return map_Filter -} - -var map_HostPlacement = map[string]string{ - "": "HostPlacement is the type that will be used to configure the placement of AWS instances.", - "affinity": "affinity specifies the affinity setting for the instance. Allowed values are AnyAvailable and DedicatedHost. When Affinity is set to DedicatedHost, an instance started onto a specific host always restarts on the same host if stopped. In this scenario, the `dedicatedHost` field must be set. When Affinity is set to AnyAvailable, and you stop and restart the instance, it can be restarted on any available host. When Affinity is set to AnyAvailable and the `dedicatedHost` field is defined, it runs on specified Dedicated Host, but may move if stopped.", - "dedicatedHost": "dedicatedHost specifies the exact host that an instance should be restarted on if stopped. dedicatedHost is required when 'affinity' is set to DedicatedHost, and optional otherwise.", -} - -func (HostPlacement) SwaggerDoc() map[string]string { - return map_HostPlacement -} - -var map_LoadBalancerReference = map[string]string{ - "": "LoadBalancerReference is a reference to a load balancer on AWS.", -} - -func (LoadBalancerReference) SwaggerDoc() map[string]string { - return map_LoadBalancerReference -} - -var map_MetadataServiceOptions = map[string]string{ - "": "MetadataServiceOptions defines the options available to a user when configuring Instance Metadata Service (IMDS) Options.", - "authentication": "authentication determines whether or not the host requires the use of authentication when interacting with the metadata service. When using authentication, this enforces v2 interaction method (IMDSv2) with the metadata service. When omitted, this means the user has no opinion and the value is left to the platform to choose a good default, which is subject to change over time. The current default is optional. At this point this field represents `HttpTokens` parameter from `InstanceMetadataOptionsRequest` structure in AWS EC2 API https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_InstanceMetadataOptionsRequest.html", -} - -func (MetadataServiceOptions) SwaggerDoc() map[string]string { - return map_MetadataServiceOptions -} - -var map_Placement = map[string]string{ - "": "Placement indicates where to create the instance in AWS", - "region": "region is the region to use to create the instance", - "availabilityZone": "availabilityZone is the availability zone of the instance", - "tenancy": "tenancy indicates if instance should run on shared or single-tenant hardware. There are supported 3 options: default, dedicated and host. When set to default Runs on shared multi-tenant hardware. When dedicated Runs on single-tenant hardware (any dedicated instance hardware). When host and the host object is not provided: Runs on Dedicated Host; best-effort restart on same host. When `host` and `host` object is provided with affinity `dedicatedHost` defined: Runs on specified Dedicated Host.", - "host": "host configures placement on AWS Dedicated Hosts. This allows admins to assign instances to specific host for a variety of needs including for regulatory compliance, to leverage existing per-socket or per-core software licenses (BYOL), and to gain visibility and control over instance placement on a physical server. When omitted, the instance is not constrained to a dedicated host.", -} - -func (Placement) SwaggerDoc() map[string]string { - return map_Placement -} - -var map_SpotMarketOptions = map[string]string{ - "": "SpotMarketOptions defines the options available to a user when configuring Machines to run on Spot instances. Most users should provide an empty struct.", - "maxPrice": "The maximum price the user is willing to pay for their instances Default: On-Demand price", -} - -func (SpotMarketOptions) SwaggerDoc() map[string]string { - return map_SpotMarketOptions -} - -var map_TagSpecification = map[string]string{ - "": "TagSpecification is the name/value pair for a tag", - "name": "name of the tag. This field is required and must be a non-empty string. Must be between 1 and 128 characters in length.", - "value": "value of the tag. When omitted, this creates a tag with an empty string as the value.", -} - -func (TagSpecification) SwaggerDoc() map[string]string { - return map_TagSpecification -} - -var map_AzureBootDiagnostics = map[string]string{ - "": "AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. This allows you to configure capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", - "storageAccountType": "storageAccountType determines if the storage account for storing the diagnostics data should be provisioned by Azure (AzureManaged) or by the customer (CustomerManaged).", - "customerManaged": "customerManaged provides reference to the customer manager storage account.", -} - -func (AzureBootDiagnostics) SwaggerDoc() map[string]string { - return map_AzureBootDiagnostics -} - -var map_AzureCustomerManagedBootDiagnostics = map[string]string{ - "": "AzureCustomerManagedBootDiagnostics provides reference to a customer managed storage account.", - "storageAccountURI": "storageAccountURI is the URI of the customer managed storage account. The URI typically will be `https://.blob.core.windows.net/` but may differ if you are using Azure DNS zone endpoints. You can find the correct endpoint by looking for the Blob Primary Endpoint in the endpoints tab in the Azure console.", -} - -func (AzureCustomerManagedBootDiagnostics) SwaggerDoc() map[string]string { - return map_AzureCustomerManagedBootDiagnostics -} - -var map_AzureDiagnostics = map[string]string{ - "": "AzureDiagnostics is used to configure the diagnostic settings of the virtual machine.", - "boot": "AzureBootDiagnostics configures the boot diagnostics settings for the virtual machine. This allows you to configure capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", -} - -func (AzureDiagnostics) SwaggerDoc() map[string]string { - return map_AzureDiagnostics -} - -var map_AzureMachineProviderSpec = map[string]string{ - "": "AzureMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an Azure virtual machine. It is used by the Azure machine actuator to create a single Machine. Required parameters such as location that are not specified by this configuration, will be defaulted by the actuator. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "credentialsSecret is a reference to the secret with Azure credentials.", - "location": "location is the region to use to create the instance", - "vmSize": "vmSize is the size of the VM to create.", - "image": "image is the OS image to use to create the instance.", - "osDisk": "osDisk represents the parameters for creating the OS disk.", - "dataDisks": "DataDisk specifies the parameters that are used to add one or more data disks to the machine.", - "sshPublicKey": "sshPublicKey is the public key to use to SSH to the virtual machine.", - "publicIP": "publicIP if true a public IP will be used", - "tags": "tags is a list of tags to apply to the machine.", - "securityGroup": "Network Security Group that needs to be attached to the machine's interface. No security group will be attached if empty.", - "applicationSecurityGroups": "Application Security Groups that need to be attached to the machine's interface. No application security groups will be attached if zero-length.", - "subnet": "subnet to use for this instance", - "publicLoadBalancer": "publicLoadBalancer to use for this instance", - "internalLoadBalancer": "InternalLoadBalancerName to use for this instance", - "natRule": "natRule to set inbound NAT rule of the load balancer", - "managedIdentity": "managedIdentity to set managed identity name", - "vnet": "vnet to set virtual network name", - "zone": "Availability Zone for the virtual machine. If nil, the virtual machine should be deployed to no zone", - "networkResourceGroup": "networkResourceGroup is the resource group for the virtual machine's network", - "resourceGroup": "resourceGroup is the resource group for the virtual machine", - "spotVMOptions": "spotVMOptions allows the ability to specify the Machine should use a Spot VM", - "securityProfile": "securityProfile specifies the Security profile settings for a virtual machine.", - "ultraSSDCapability": "ultraSSDCapability enables or disables Azure UltraSSD capability for a virtual machine. This can be used to allow/disallow binding of Azure UltraSSD to the Machine both as Data Disks or via Persistent Volumes. This Azure feature is subject to a specific scope and certain limitations. More informations on this can be found in the official Azure documentation for Ultra Disks: (https://docs.microsoft.com/en-us/azure/virtual-machines/disks-enable-ultra-ssd?tabs=azure-portal#ga-scope-and-limitations).\n\nWhen omitted, if at least one Data Disk of type UltraSSD is specified, the platform will automatically enable the capability. If a Perisistent Volume backed by an UltraSSD is bound to a Pod on the Machine, when this field is ommitted, the platform will *not* automatically enable the capability (unless already enabled by the presence of an UltraSSD as Data Disk). This may manifest in the Pod being stuck in `ContainerCreating` phase. This defaulting behaviour may be subject to change in future.\n\nWhen set to \"Enabled\", if the capability is available for the Machine based on the scope and limitations described above, the capability will be set on the Machine. This will thus allow UltraSSD both as Data Disks and Persistent Volumes. If set to \"Enabled\" when the capability can't be available due to scope and limitations, the Machine will go into \"Failed\" state.\n\nWhen set to \"Disabled\", UltraSSDs will not be allowed either as Data Disks nor as Persistent Volumes. In this case if any UltraSSDs are specified as Data Disks on a Machine, the Machine will go into a \"Failed\" state. If instead any UltraSSDs are backing the volumes (via Persistent Volumes) of any Pods scheduled on a Node which is backed by the Machine, the Pod may get stuck in `ContainerCreating` phase.", - "acceleratedNetworking": "acceleratedNetworking enables or disables Azure accelerated networking feature. Set to false by default. If true, then this will depend on whether the requested VMSize is supported. If set to true with an unsupported VMSize, Azure will return an error.", - "availabilitySet": "availabilitySet specifies the availability set to use for this instance. Availability set should be precreated, before using this field.", - "diagnostics": "diagnostics configures the diagnostics settings for the virtual machine. This allows you to configure boot diagnostics such as capturing serial output from the virtual machine on boot. This is useful for debugging software based launch issues.", - "capacityReservationGroupID": "capacityReservationGroupID specifies the capacity reservation group resource id that should be used for allocating the virtual machine. The field size should be greater than 0 and the field input must start with '/'. The input for capacityReservationGroupID must be similar to '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/capacityReservationGroups/{capacityReservationGroupName}'. The keys which are used should be among 'subscriptions', 'providers' and 'resourcegroups' followed by valid ID or names respectively.", -} - -func (AzureMachineProviderSpec) SwaggerDoc() map[string]string { - return map_AzureMachineProviderSpec -} - -var map_AzureMachineProviderStatus = map[string]string{ - "": "AzureMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains Azure-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "vmId": "vmId is the ID of the virtual machine created in Azure.", - "vmState": "vmState is the provisioning state of the Azure virtual machine.", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status.", -} - -func (AzureMachineProviderStatus) SwaggerDoc() map[string]string { - return map_AzureMachineProviderStatus -} - -var map_ConfidentialVM = map[string]string{ - "": "ConfidentialVM defines the UEFI settings for the virtual machine.", - "uefiSettings": "uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine.", -} - -func (ConfidentialVM) SwaggerDoc() map[string]string { - return map_ConfidentialVM -} - -var map_DataDisk = map[string]string{ - "": "DataDisk specifies the parameters that are used to add one or more data disks to the machine. A Data Disk is a managed disk that's attached to a virtual machine to store application data. It differs from an OS Disk as it doesn't come with a pre-installed OS, and it cannot contain the boot volume. It is registered as SCSI drive and labeled with the chosen `lun`. e.g. for `lun: 0` the raw disk device will be available at `/dev/disk/azure/scsi1/lun0`.\n\nAs the Data Disk disk device is attached raw to the virtual machine, it will need to be partitioned, formatted with a filesystem and mounted, in order for it to be usable. This can be done by creating a custom userdata Secret with custom Ignition configuration to achieve the desired initialization. At this stage the previously defined `lun` is to be used as the \"device\" key for referencing the raw disk device to be initialized. Once the custom userdata Secret has been created, it can be referenced in the Machine's `.providerSpec.userDataSecret`. For further guidance and examples, please refer to the official OpenShift docs.", - "nameSuffix": "nameSuffix is the suffix to be appended to the machine name to generate the disk name. Each disk name will be in format _. NameSuffix name must start and finish with an alphanumeric character and can only contain letters, numbers, underscores, periods or hyphens. The overall disk name must not exceed 80 chars in length.", - "diskSizeGB": "diskSizeGB is the size in GB to assign to the data disk.", - "managedDisk": "managedDisk specifies the Managed Disk parameters for the data disk. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a ManagedDisk with with storageAccountType: \"Premium_LRS\" and diskEncryptionSet.id: \"Default\".", - "lun": "lun Specifies the logical unit number of the data disk. This value is used to identify data disks within the VM and therefore must be unique for each data disk attached to a VM. This value is also needed for referencing the data disks devices within userdata to perform disk initialization through Ignition (e.g. partition/format/mount). The value must be between 0 and 63.", - "cachingType": "cachingType specifies the caching requirements. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is CachingTypeNone.", - "deletionPolicy": "deletionPolicy specifies the data disk deletion policy upon Machine deletion. Possible values are \"Delete\",\"Detach\". When \"Delete\" is used the data disk is deleted when the Machine is deleted. When \"Detach\" is used the data disk is detached from the Machine and retained when the Machine is deleted.", -} - -func (DataDisk) SwaggerDoc() map[string]string { - return map_DataDisk -} - -var map_DataDiskManagedDiskParameters = map[string]string{ - "": "DataDiskManagedDiskParameters is the parameters of a DataDisk managed disk.", - "storageAccountType": "storageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\" and \"UltraSSD_LRS\".", - "diskEncryptionSet": "diskEncryptionSet is the disk encryption set properties. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is a DiskEncryptionSet with id: \"Default\".", -} - -func (DataDiskManagedDiskParameters) SwaggerDoc() map[string]string { - return map_DataDiskManagedDiskParameters -} - -var map_DiskEncryptionSetParameters = map[string]string{ - "": "DiskEncryptionSetParameters is the disk encryption set properties", - "id": "id is the disk encryption set ID Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is: \"Default\".", -} - -func (DiskEncryptionSetParameters) SwaggerDoc() map[string]string { - return map_DiskEncryptionSetParameters -} - -var map_DiskSettings = map[string]string{ - "": "DiskSettings describe ephemeral disk settings for the os disk.", - "ephemeralStorageLocation": "ephemeralStorageLocation enables ephemeral OS when set to 'Local'. Possible values include: 'Local'. See https://docs.microsoft.com/en-us/azure/virtual-machines/ephemeral-os-disks for full details. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is that disks are saved to remote Azure storage.", -} - -func (DiskSettings) SwaggerDoc() map[string]string { - return map_DiskSettings -} - -var map_Image = map[string]string{ - "": "Image is a mirror of azure sdk compute.ImageReference", - "publisher": "publisher is the name of the organization that created the image", - "offer": "offer specifies the name of a group of related images created by the publisher. For example, UbuntuServer, WindowsServer", - "sku": "sku specifies an instance of an offer, such as a major release of a distribution. For example, 18.04-LTS, 2019-Datacenter", - "version": "version specifies the version of an image sku. The allowed formats are Major.Minor.Build or 'latest'. Major, Minor, and Build are decimal numbers. Specify 'latest' to use the latest version of an image available at deploy time. Even if you use 'latest', the VM image will not automatically update after deploy time even if a new version becomes available.", - "resourceID": "resourceID specifies an image to use by ID", - "type": "type identifies the source of the image and related information, such as purchase plans. Valid values are \"ID\", \"MarketplaceWithPlan\", \"MarketplaceNoPlan\", and omitted, which means no opinion and the platform chooses a good default which may change over time. Currently that default is \"MarketplaceNoPlan\" if publisher data is supplied, or \"ID\" if not. For more information about purchase plans, see: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/cli-ps-findimage#check-the-purchase-plan-information", -} - -func (Image) SwaggerDoc() map[string]string { - return map_Image -} - -var map_OSDisk = map[string]string{ - "osType": "osType is the operating system type of the OS disk. Possible values include \"Linux\" and \"Windows\".", - "managedDisk": "managedDisk specifies the Managed Disk parameters for the OS disk.", - "diskSizeGB": "diskSizeGB is the size in GB to assign to the data disk.", - "diskSettings": "diskSettings describe ephemeral disk settings for the os disk.", - "cachingType": "cachingType specifies the caching requirements. Possible values include: 'None', 'ReadOnly', 'ReadWrite'. Empty value means no opinion and the platform chooses a default, which is subject to change over time. Currently the default is `None`.", -} - -func (OSDisk) SwaggerDoc() map[string]string { - return map_OSDisk -} - -var map_OSDiskManagedDiskParameters = map[string]string{ - "": "OSDiskManagedDiskParameters is the parameters of a OSDisk managed disk.", - "storageAccountType": "storageAccountType is the storage account type to use. Possible values include \"Standard_LRS\", \"Premium_LRS\".", - "diskEncryptionSet": "diskEncryptionSet is the disk encryption set properties", - "securityProfile": "securityProfile specifies the security profile for the managed disk.", -} - -func (OSDiskManagedDiskParameters) SwaggerDoc() map[string]string { - return map_OSDiskManagedDiskParameters -} - -var map_SecurityProfile = map[string]string{ - "": "SecurityProfile specifies the Security profile settings for a virtual machine or virtual machine scale set.", - "encryptionAtHost": "encryptionAtHost indicates whether Host Encryption should be enabled or disabled for a virtual machine or virtual machine scale set. This should be disabled when SecurityEncryptionType is set to DiskWithVMGuestState. Default is disabled.", - "settings": "settings specify the security type and the UEFI settings of the virtual machine. This field can be set for Confidential VMs and Trusted Launch for VMs.", -} - -func (SecurityProfile) SwaggerDoc() map[string]string { - return map_SecurityProfile -} - -var map_SecuritySettings = map[string]string{ - "": "SecuritySettings define the security type and the UEFI settings of the virtual machine.", - "securityType": "securityType specifies the SecurityType of the virtual machine. It has to be set to any specified value to enable UEFISettings. The default behavior is: UEFISettings will not be enabled unless this property is set.", - "confidentialVM": "confidentialVM specifies the security configuration of the virtual machine. For more information regarding Confidential VMs, please refer to: https://learn.microsoft.com/azure/confidential-computing/confidential-vm-overview", - "trustedLaunch": "trustedLaunch specifies the security configuration of the virtual machine. For more information regarding TrustedLaunch for VMs, please refer to: https://learn.microsoft.com/azure/virtual-machines/trusted-launch", -} - -func (SecuritySettings) SwaggerDoc() map[string]string { - return map_SecuritySettings -} - -var map_SpotVMOptions = map[string]string{ - "": "SpotVMOptions defines the options relevant to running the Machine on Spot VMs", - "maxPrice": "maxPrice defines the maximum price the user is willing to pay for Spot VM instances", -} - -func (SpotVMOptions) SwaggerDoc() map[string]string { - return map_SpotVMOptions -} - -var map_TrustedLaunch = map[string]string{ - "": "TrustedLaunch defines the UEFI settings for the virtual machine.", - "uefiSettings": "uefiSettings specifies the security settings like secure boot and vTPM used while creating the virtual machine.", -} - -func (TrustedLaunch) SwaggerDoc() map[string]string { - return map_TrustedLaunch -} - -var map_UEFISettings = map[string]string{ - "": "UEFISettings specifies the security settings like secure boot and vTPM used while creating the virtual machine.", - "secureBoot": "secureBoot specifies whether secure boot should be enabled on the virtual machine. Secure Boot verifies the digital signature of all boot components and halts the boot process if signature verification fails. If omitted, the platform chooses a default, which is subject to change over time, currently that default is disabled.", - "virtualizedTrustedPlatformModule": "virtualizedTrustedPlatformModule specifies whether vTPM should be enabled on the virtual machine. When enabled the virtualized trusted platform module measurements are used to create a known good boot integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. This is required to be enabled if SecurityEncryptionType is defined. If omitted, the platform chooses a default, which is subject to change over time, currently that default is disabled.", -} - -func (UEFISettings) SwaggerDoc() map[string]string { - return map_UEFISettings -} - -var map_VMDiskSecurityProfile = map[string]string{ - "": "VMDiskSecurityProfile specifies the security profile settings for the managed disk. It can be set only for Confidential VMs.", - "diskEncryptionSet": "diskEncryptionSet specifies the customer managed disk encryption set resource id for the managed disk that is used for Customer Managed Key encrypted ConfidentialVM OS Disk and VMGuest blob.", - "securityEncryptionType": "securityEncryptionType specifies the encryption type of the managed disk. It is set to DiskWithVMGuestState to encrypt the managed disk along with the VMGuestState blob, and to VMGuestStateOnly to encrypt the VMGuestState blob only. When set to VMGuestStateOnly, the vTPM should be enabled. When set to DiskWithVMGuestState, both SecureBoot and vTPM should be enabled. If the above conditions are not fulfilled, the VM will not be created and the respective error will be returned. It can be set only for Confidential VMs. Confidential VMs are defined by their SecurityProfile.SecurityType being set to ConfidentialVM, the SecurityEncryptionType of their OS disk being set to one of the allowed values and by enabling the respective SecurityProfile.UEFISettings of the VM (i.e. vTPM and SecureBoot), depending on the selected SecurityEncryptionType. For further details on Azure Confidential VMs, please refer to the respective documentation: https://learn.microsoft.com/azure/confidential-computing/confidential-vm-overview", -} - -func (VMDiskSecurityProfile) SwaggerDoc() map[string]string { - return map_VMDiskSecurityProfile -} - -var map_GCPDisk = map[string]string{ - "": "GCPDisk describes disks for GCP.", - "autoDelete": "autoDelete indicates if the disk will be auto-deleted when the instance is deleted (default false).", - "boot": "boot indicates if this is a boot disk (default false).", - "sizeGb": "sizeGb is the size of the disk (in GB).", - "type": "type is the type of the disk (eg: pd-standard).", - "image": "image is the source image to create this disk.", - "labels": "labels list of labels to apply to the disk.", - "encryptionKey": "encryptionKey is the customer-supplied encryption key of the disk.", -} - -func (GCPDisk) SwaggerDoc() map[string]string { - return map_GCPDisk -} - -var map_GCPEncryptionKeyReference = map[string]string{ - "": "GCPEncryptionKeyReference describes the encryptionKey to use for a disk's encryption.", - "kmsKey": "KMSKeyName is the reference KMS key, in the format", - "kmsKeyServiceAccount": "kmsKeyServiceAccount is the service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used. See https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_service_account for details on the default service account.", -} - -func (GCPEncryptionKeyReference) SwaggerDoc() map[string]string { - return map_GCPEncryptionKeyReference -} - -var map_GCPGPUConfig = map[string]string{ - "": "GCPGPUConfig describes type and count of GPUs attached to the instance on GCP.", - "count": "count is the number of GPUs to be attached to an instance.", - "type": "type is the type of GPU to be attached to an instance. Supported GPU types are: nvidia-tesla-k80, nvidia-tesla-p100, nvidia-tesla-v100, nvidia-tesla-p4, nvidia-tesla-t4", -} - -func (GCPGPUConfig) SwaggerDoc() map[string]string { - return map_GCPGPUConfig -} - -var map_GCPKMSKeyReference = map[string]string{ - "": "GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key", - "name": "name is the name of the customer managed encryption key to be used for the disk encryption.", - "keyRing": "keyRing is the name of the KMS Key Ring which the KMS Key belongs to.", - "projectID": "projectID is the ID of the Project in which the KMS Key Ring exists. Defaults to the VM ProjectID if not set.", - "location": "location is the GCP location in which the Key Ring exists.", -} - -func (GCPKMSKeyReference) SwaggerDoc() map[string]string { - return map_GCPKMSKeyReference -} - -var map_GCPMachineProviderSpec = map[string]string{ - "": "GCPMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an GCP virtual machine. It is used by the GCP machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "credentialsSecret is a reference to the secret with GCP credentials.", - "canIPForward": "canIPForward Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes.", - "deletionProtection": "deletionProtection whether the resource should be protected against deletion.", - "disks": "disks is a list of disks to be attached to the VM.", - "labels": "labels list of labels to apply to the VM.", - "gcpMetadata": "Metadata key/value pairs to apply to the VM.", - "networkInterfaces": "networkInterfaces is a list of network interfaces to be attached to the VM.", - "serviceAccounts": "serviceAccounts is a list of GCP service accounts to be used by the VM.", - "tags": "tags list of network tags to apply to the VM.", - "targetPools": "targetPools are used for network TCP/UDP load balancing. A target pool references member instances, an associated legacy HttpHealthCheck resource, and, optionally, a backup target pool", - "machineType": "machineType is the machine type to use for the VM.", - "region": "region is the region in which the GCP machine provider will create the VM.", - "zone": "zone is the zone in which the GCP machine provider will create the VM.", - "projectID": "projectID is the project in which the GCP machine provider will create the VM.", - "gpus": "gpus is a list of GPUs to be attached to the VM.", - "preemptible": "preemptible indicates if created instance is preemptible.", - "provisioningModel": "provisioningModel is an optional field that determines the provisioning model for the GCP machine instance. Valid values are \"Spot\" and omitted. When set to Spot, the instance runs as a Google Cloud Spot instance which provides significant cost savings but may be preempted by Google Cloud Platform when resources are needed elsewhere. When omitted, the machine will be provisioned as a standard on-demand instance. This field cannot be used together with the preemptible field.", - "onHostMaintenance": "onHostMaintenance determines the behavior when a maintenance event occurs that might cause the instance to reboot. This is required to be set to \"Terminate\" if you want to provision machine with attached GPUs. Otherwise, allowed values are \"Migrate\" and \"Terminate\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Migrate\".", - "restartPolicy": "restartPolicy determines the behavior when an instance crashes or the underlying infrastructure provider stops the instance as part of a maintenance event (default \"Always\"). Cannot be \"Always\" with preemptible instances. Otherwise, allowed values are \"Always\" and \"Never\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is \"Always\". RestartPolicy represents AutomaticRestart in GCP compute api", - "shieldedInstanceConfig": "shieldedInstanceConfig is the Shielded VM configuration for the VM", - "confidentialCompute": "confidentialCompute is an optional field defining whether the instance should have confidential compute enabled or not, and the confidential computing technology of choice. Allowed values are omitted, Disabled, Enabled, AMDEncryptedVirtualization, AMDEncryptedVirtualizationNestedPaging, and IntelTrustedDomainExtensions When set to Disabled, the machine will not be configured to be a confidential computing instance. When set to Enabled, the machine will be configured as a confidential computing instance with no preference on the confidential compute policy used. In this mode, the platform chooses a default that is subject to change over time. Currently, the default is to use AMD Secure Encrypted Virtualization. When set to AMDEncryptedVirtualization, the machine will be configured as a confidential computing instance with AMD Secure Encrypted Virtualization (AMD SEV) as the confidential computing technology. When set to AMDEncryptedVirtualizationNestedPaging, the machine will be configured as a confidential computing instance with AMD Secure Encrypted Virtualization Secure Nested Paging (AMD SEV-SNP) as the confidential computing technology. When set to IntelTrustedDomainExtensions, the machine will be configured as a confidential computing instance with Intel Trusted Domain Extensions (Intel TDX) as the confidential computing technology. If any value other than Disabled is set the selected machine type must support that specific confidential computing technology. The machine series supporting confidential computing technologies can be checked at https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#all-confidential-vm-instances Currently, AMDEncryptedVirtualization is supported in c2d, n2d, and c3d machines. AMDEncryptedVirtualizationNestedPaging is supported in n2d machines. IntelTrustedDomainExtensions is supported in c3 machines. If any value other than Disabled is set, the selected region must support that specific confidential computing technology. The list of regions supporting confidential computing technologies can be checked at https://cloud.google.com/confidential-computing/confidential-vm/docs/supported-configurations#supported-zones If any value other than Disabled is set onHostMaintenance is required to be set to \"Terminate\". If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled.", - "resourceManagerTags": "resourceManagerTags is an optional list of tags to apply to the GCP resources created for the cluster. See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on tagging GCP resources. GCP supports a maximum of 50 tags per resource.", -} - -func (GCPMachineProviderSpec) SwaggerDoc() map[string]string { - return map_GCPMachineProviderSpec -} - -var map_GCPMachineProviderStatus = map[string]string{ - "": "GCPMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains GCP-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "instanceId is the ID of the instance in GCP", - "instanceState": "instanceState is the provisioning state of the GCP Instance.", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", -} - -func (GCPMachineProviderStatus) SwaggerDoc() map[string]string { - return map_GCPMachineProviderStatus -} - -var map_GCPMetadata = map[string]string{ - "": "GCPMetadata describes metadata for GCP.", - "key": "key is the metadata key.", - "value": "value is the metadata value.", -} - -func (GCPMetadata) SwaggerDoc() map[string]string { - return map_GCPMetadata -} - -var map_GCPNetworkInterface = map[string]string{ - "": "GCPNetworkInterface describes network interfaces for GCP", - "publicIP": "publicIP indicates if true a public IP will be used", - "network": "network is the network name.", - "projectID": "projectID is the project in which the GCP machine provider will create the VM.", - "subnetwork": "subnetwork is the subnetwork name.", -} - -func (GCPNetworkInterface) SwaggerDoc() map[string]string { - return map_GCPNetworkInterface -} - -var map_GCPServiceAccount = map[string]string{ - "": "GCPServiceAccount describes service accounts for GCP.", - "email": "email is the service account email.", - "scopes": "scopes list of scopes to be assigned to the service account.", -} - -func (GCPServiceAccount) SwaggerDoc() map[string]string { - return map_GCPServiceAccount -} - -var map_GCPShieldedInstanceConfig = map[string]string{ - "": "GCPShieldedInstanceConfig describes the shielded VM configuration of the instance on GCP. Shielded VM configuration allow users to enable and disable Secure Boot, vTPM, and Integrity Monitoring.", - "secureBoot": "secureBoot Defines whether the instance should have secure boot enabled. Secure Boot verify the digital signature of all boot components, and halting the boot process if signature verification fails. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Disabled.", - "virtualizedTrustedPlatformModule": "virtualizedTrustedPlatformModule enable virtualized trusted platform module measurements to create a known good boot integrity policy baseline. The integrity policy baseline is used for comparison with measurements from subsequent VM boots to determine if anything has changed. This is required to be set to \"Enabled\" if IntegrityMonitoring is enabled. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", - "integrityMonitoring": "integrityMonitoring determines whether the instance should have integrity monitoring that verify the runtime boot integrity. Compares the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. If omitted, the platform chooses a default, which is subject to change over time, currently that default is Enabled.", -} - -func (GCPShieldedInstanceConfig) SwaggerDoc() map[string]string { - return map_GCPShieldedInstanceConfig -} - -var map_ResourceManagerTag = map[string]string{ - "": "ResourceManagerTag is a tag to apply to GCP resources created for the cluster.", - "parentID": "parentID is the ID of the hierarchical resource where the tags are defined e.g. at the Organization or the Project level. To find the Organization or Project ID ref https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects An OrganizationID can have a maximum of 32 characters and must consist of decimal numbers, and cannot have leading zeroes. A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters, numbers, and hyphens, and must start with a letter, and cannot end with a hyphen.", - "key": "key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty. Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase alphanumeric characters, and the following special characters `._-`.", - "value": "value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty. Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces.", -} - -func (ResourceManagerTag) SwaggerDoc() map[string]string { - return map_ResourceManagerTag -} - -var map_LastOperation = map[string]string{ - "": "LastOperation represents the detail of the last performed operation on the MachineObject.", - "description": "description is the human-readable description of the last operation.", - "lastUpdated": "lastUpdated is the timestamp at which LastOperation API was last-updated.", - "state": "state is the current status of the last performed operation. E.g. Processing, Failed, Successful etc", - "type": "type is the type of operation which was last performed. E.g. Create, Delete, Update etc", -} - -func (LastOperation) SwaggerDoc() map[string]string { - return map_LastOperation -} - -var map_LifecycleHook = map[string]string{ - "": "LifecycleHook represents a single instance of a lifecycle hook", - "name": "name defines a unique name for the lifcycle hook. The name should be unique and descriptive, ideally 1-3 words, in CamelCase or it may be namespaced, eg. foo.example.com/CamelCase. Names must be unique and should only be managed by a single entity.", - "owner": "owner defines the owner of the lifecycle hook. This should be descriptive enough so that users can identify who/what is responsible for blocking the lifecycle. This could be the name of a controller (e.g. clusteroperator/etcd) or an administrator managing the hook.", -} - -func (LifecycleHook) SwaggerDoc() map[string]string { - return map_LifecycleHook -} - -var map_LifecycleHooks = map[string]string{ - "": "LifecycleHooks allow users to pause operations on the machine at certain prefedined points within the machine lifecycle.", - "preDrain": "preDrain hooks prevent the machine from being drained. This also blocks further lifecycle events, such as termination.", - "preTerminate": "preTerminate hooks prevent the machine from being terminated. PreTerminate hooks be actioned after the Machine has been drained.", -} - -func (LifecycleHooks) SwaggerDoc() map[string]string { - return map_LifecycleHooks -} - -var map_Machine = map[string]string{ - "": "Machine is the Schema for the machines API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Machine) SwaggerDoc() map[string]string { - return map_Machine -} - -var map_MachineList = map[string]string{ - "": "MachineList contains a list of Machine Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (MachineList) SwaggerDoc() map[string]string { - return map_MachineList -} - -var map_MachineSpec = map[string]string{ - "": "MachineSpec defines the desired state of Machine", - "metadata": "ObjectMeta will autopopulate the Node created. Use this to indicate what labels, annotations, name prefix, etc., should be used when creating the Node.", - "lifecycleHooks": "lifecycleHooks allow users to pause operations on the machine at certain predefined points within the machine lifecycle.", - "taints": "The list of the taints to be applied to the corresponding Node in additive manner. This list will not overwrite any other taints added to the Node on an ongoing basis by other entities. These taints should be actively reconciled e.g. if you ask the machine controller to apply a taint and then manually remove the taint the machine controller will put it back) but not have the machine controller remove any taints", - "providerSpec": "providerSpec details Provider-specific configuration to use during node creation.", - "providerID": "providerID is the identification ID of the machine provided by the provider. This field must match the provider ID as seen on the node object corresponding to this machine. This field is required by higher level consumers of cluster-api. Example use case is cluster autoscaler with cluster-api as provider. Clean-up logic in the autoscaler compares machines to nodes to find out machines at provider which could not get registered as Kubernetes nodes. With cluster-api as a generic out-of-tree provider for autoscaler, this field is required by autoscaler to be able to have a provider view of the list of machines. Another list of nodes is queried from the k8s apiserver and then a comparison is done to find out unregistered machines and are marked for delete. This field will be set by the actuators and consumed by higher level entities like autoscaler that will be interfacing with cluster-api as generic provider.", - "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI and ClusterAPI. When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. Currently the authoritative API determines which controller will manage the resource, this will change in a future release. To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`.", -} - -func (MachineSpec) SwaggerDoc() map[string]string { - return map_MachineSpec -} - -var map_MachineStatus = map[string]string{ - "": "MachineStatus defines the observed state of Machine", - "nodeRef": "nodeRef will point to the corresponding Node if it exists.", - "lastUpdated": "lastUpdated identifies when this status was last observed.", - "errorReason": "errorReason will be set in the event that there is a terminal problem reconciling the Machine and will contain a succinct value suitable for machine interpretation.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", - "errorMessage": "errorMessage will be set in the event that there is a terminal problem reconciling the Machine and will contain a more verbose string suitable for logging and human consumption.\n\nThis field should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the Machine's spec or the configuration of the controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the controller, or the responsible controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the Machine object and/or logged in the controller's output.", - "providerStatus": "providerStatus details a Provider-specific status. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field.", - "addresses": "addresses is a list of addresses assigned to the machine. Queried from cloud provider, if available.", - "lastOperation": "lastOperation describes the last-operation performed by the machine-controller. This API should be useful as a history in terms of the latest operation performed on the specific machine. It should also convey the state of the latest-operation for example if it is still on-going, failed or completed successfully.", - "phase": "phase represents the current phase of machine actuation. One of: Failed, Provisioning, Provisioned, Running, Deleting", - "conditions": "conditions defines the current state of the Machine", - "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI, ClusterAPI and Migrating. This value is updated by the migration controller to reflect the authoritative API. Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other.", - "synchronizedAPI": "synchronizedAPI holds the last stable value of authoritativeAPI. It is used to detect migration cancellation requests and to restore the resource to its previous state. Valid values are \"MachineAPI\" and \"ClusterAPI\". When omitted, the resource has not yet been reconciled by the migration controller.", - "synchronizedGeneration": "synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.", -} - -func (MachineStatus) SwaggerDoc() map[string]string { - return map_MachineStatus -} - -var map_MachineHealthCheck = map[string]string{ - "": "MachineHealthCheck is the Schema for the machinehealthchecks API Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Specification of machine health check policy", - "status": "Most recently observed status of MachineHealthCheck resource", -} - -func (MachineHealthCheck) SwaggerDoc() map[string]string { - return map_MachineHealthCheck -} - -var map_MachineHealthCheckList = map[string]string{ - "": "MachineHealthCheckList contains a list of MachineHealthCheck Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (MachineHealthCheckList) SwaggerDoc() map[string]string { - return map_MachineHealthCheckList -} - -var map_MachineHealthCheckSpec = map[string]string{ - "": "MachineHealthCheckSpec defines the desired state of MachineHealthCheck", - "selector": "Label selector to match machines whose health will be exercised. Note: An empty selector will match all machines.", - "unhealthyConditions": "unhealthyConditions contains a list of the conditions that determine whether a node is considered unhealthy. The conditions are combined in a logical OR, i.e. if any of the conditions is met, the node is unhealthy.", - "maxUnhealthy": "Any farther remediation is only allowed if at most \"MaxUnhealthy\" machines selected by \"selector\" are not healthy. Expects either a postive integer value or a percentage value. Percentage values must be positive whole numbers and are capped at 100%. Both 0 and 0% are valid and will block all remediation. Defaults to 100% if not set.", - "nodeStartupTimeout": "Machines older than this duration without a node will be considered to have failed and will be remediated. To prevent Machines without Nodes from being removed, disable startup checks by setting this value explicitly to \"0\". Expects an unsigned duration string of decimal numbers each with optional fraction and a unit suffix, eg \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".", - "remediationTemplate": "remediationTemplate is a reference to a remediation template provided by an infrastructure provider.\n\nThis field is completely optional, when filled, the MachineHealthCheck controller creates a new object from the template referenced and hands off remediation of the machine to a controller that lives outside of Machine API Operator.", -} - -func (MachineHealthCheckSpec) SwaggerDoc() map[string]string { - return map_MachineHealthCheckSpec -} - -var map_MachineHealthCheckStatus = map[string]string{ - "": "MachineHealthCheckStatus defines the observed state of MachineHealthCheck", - "expectedMachines": "total number of machines counted by this machine health check", - "currentHealthy": "total number of machines counted by this machine health check", - "remediationsAllowed": "remediationsAllowed is the number of further remediations allowed by this machine health check before maxUnhealthy short circuiting will be applied", - "conditions": "conditions defines the current state of the MachineHealthCheck", -} - -func (MachineHealthCheckStatus) SwaggerDoc() map[string]string { - return map_MachineHealthCheckStatus -} - -var map_UnhealthyCondition = map[string]string{ - "": "UnhealthyCondition represents a Node condition type and value with a timeout specified as a duration. When the named condition has been in the given status for at least the timeout value, a node is considered unhealthy.", - "timeout": "Expects an unsigned duration string of decimal numbers each with optional fraction and a unit suffix, eg \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\"), \"ms\", \"s\", \"m\", \"h\".", -} - -func (UnhealthyCondition) SwaggerDoc() map[string]string { - return map_UnhealthyCondition -} - -var map_MachineSet = map[string]string{ - "": "MachineSet ensures that a specified number of machines replicas are running at any given time. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (MachineSet) SwaggerDoc() map[string]string { - return map_MachineSet -} - -var map_MachineSetList = map[string]string{ - "": "MachineSetList contains a list of MachineSet Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (MachineSetList) SwaggerDoc() map[string]string { - return map_MachineSetList -} - -var map_MachineSetSpec = map[string]string{ - "": "MachineSetSpec defines the desired state of MachineSet", - "replicas": "replicas is the number of desired replicas. This is a pointer to distinguish between explicit zero and unspecified. Defaults to 1.", - "minReadySeconds": "minReadySeconds is the minimum number of seconds for which a newly created machine should be ready. Defaults to 0 (machine will be considered available as soon as it is ready)", - "deletePolicy": "deletePolicy defines the policy used to identify nodes to delete when downscaling. Defaults to \"Random\". Valid values are \"Random, \"Newest\", \"Oldest\"", - "selector": "selector is a label query over machines that should match the replica count. Label keys and values that must match in order to be controlled by this MachineSet. It must match the machine template's labels. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors", - "template": "template is the object that describes the machine that will be created if insufficient replicas are detected.", - "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI and ClusterAPI. When set to MachineAPI, writes to the spec of the machine.openshift.io copy of this resource will be reflected into the cluster.x-k8s.io copy. When set to ClusterAPI, writes to the spec of the cluster.x-k8s.io copy of this resource will be reflected into the machine.openshift.io copy. Updates to the status will be reflected in both copies of the resource, based on the controller implementing the functionality of the API. Currently the authoritative API determines which controller will manage the resource, this will change in a future release. To ensure the change has been accepted, please verify that the `status.authoritativeAPI` field has been updated to the desired value and that the `Synchronized` condition is present and set to `True`.", -} - -func (MachineSetSpec) SwaggerDoc() map[string]string { - return map_MachineSetSpec -} - -var map_MachineSetStatus = map[string]string{ - "": "MachineSetStatus defines the observed state of MachineSet", - "replicas": "replicas is the most recently observed number of replicas.", - "fullyLabeledReplicas": "The number of replicas that have labels matching the labels of the machine template of the MachineSet.", - "readyReplicas": "The number of ready replicas for this MachineSet. A machine is considered ready when the node has been created and is \"Ready\".", - "availableReplicas": "The number of available replicas (ready for at least minReadySeconds) for this MachineSet.", - "observedGeneration": "observedGeneration reflects the generation of the most recently observed MachineSet.", - "labelSelector": "labelSelector is a label selector, in string format, for Machines corresponding to the MachineSet. It is exposed via the scale subresource as status.selector. When omitted, the MachineSet controller has not yet reconciled spec.selector into status.labelSelector. When present, it must not be empty and must not exceed 4096 characters.", - "errorReason": "In the event that there is a terminal problem reconciling the replicas, both ErrorReason and ErrorMessage will be set. ErrorReason will be populated with a succinct value suitable for machine interpretation, while ErrorMessage will contain a more verbose string suitable for logging and human consumption.\n\nThese fields should not be set for transitive errors that a controller faces that are expected to be fixed automatically over time (like service outages), but instead indicate that something is fundamentally wrong with the MachineTemplate's spec or the configuration of the machine controller, and that manual intervention is required. Examples of terminal errors would be invalid combinations of settings in the spec, values that are unsupported by the machine controller, or the responsible machine controller itself being critically misconfigured.\n\nAny transient errors that occur during the reconciliation of Machines can be added as events to the MachineSet object and/or logged in the controller's output.", - "conditions": "conditions defines the current state of the MachineSet", - "authoritativeAPI": "authoritativeAPI is the API that is authoritative for this resource. Valid values are MachineAPI, ClusterAPI and Migrating. This value is updated by the migration controller to reflect the authoritative API. Machine API and Cluster API controllers use this value to determine whether or not to reconcile the resource. When set to Migrating, the migration controller is currently performing the handover of authority from one API to the other.", - "synchronizedAPI": "synchronizedAPI holds the last stable value of authoritativeAPI. It is used to detect migration cancellation requests and to restore the resource to its previous state. Valid values are \"MachineAPI\" and \"ClusterAPI\". When omitted, the resource has not yet been reconciled by the migration controller.", - "synchronizedGeneration": "synchronizedGeneration is the generation of the authoritative resource that the non-authoritative resource is synchronised with. This field is set when the authoritative resource is updated and the sync controller has updated the non-authoritative resource to match.", -} - -func (MachineSetStatus) SwaggerDoc() map[string]string { - return map_MachineSetStatus -} - -var map_MachineTemplateSpec = map[string]string{ - "": "MachineTemplateSpec describes the data needed to create a Machine from a template", - "metadata": "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Specification of the desired behavior of the machine. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status", -} - -func (MachineTemplateSpec) SwaggerDoc() map[string]string { - return map_MachineTemplateSpec -} - -var map_Condition = map[string]string{ - "": "Condition defines an observation of a Machine API resource operational state.", - "type": "type of condition in CamelCase or in foo.example.com/CamelCase. Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be useful (see .node.status.conditions), the ability to deconflict is important.", - "status": "status of the condition, one of True, False, Unknown.", - "severity": "severity provides an explicit classification of Reason code, so the users or machines can immediately understand the current situation and act accordingly. The Severity field MUST be set only when Status=False.", - "lastTransitionTime": "Last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", - "reason": "The reason for the condition's last transition in CamelCase. The specific API may choose whether or not this field is considered a guaranteed API. This field may not be empty.", - "message": "A human readable message indicating details about the transition. This field may be empty.", -} - -func (Condition) SwaggerDoc() map[string]string { - return map_Condition -} - -var map_ObjectMeta = map[string]string{ - "": "ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create. This is a copy of customizable fields from metav1.ObjectMeta.\n\nObjectMeta is embedded in `Machine.Spec`, `MachineDeployment.Template` and `MachineSet.Template`, which are not top-level Kubernetes objects. Given that metav1.ObjectMeta has lots of special cases and read-only fields which end up in the generated CRD validation, having it as a subset simplifies the API and some issues that can impact user experience.\n\nDuring the [upgrade to controller-tools@v2](https://github.com/kubernetes-sigs/cluster-api/pull/1054) for v1alpha2, we noticed a failure would occur running Cluster API test suite against the new CRDs, specifically `spec.metadata.creationTimestamp in body must be of type string: \"null\"`. The investigation showed that `controller-tools@v2` behaves differently than its previous version when handling types from [metav1](k8s.io/apimachinery/pkg/apis/meta/v1) package.\n\nIn more details, we found that embedded (non-top level) types that embedded `metav1.ObjectMeta` had validation properties, including for `creationTimestamp` (metav1.Time). The `metav1.Time` type specifies a custom json marshaller that, when IsZero() is true, returns `null` which breaks validation because the field isn't marked as nullable.\n\nIn future versions, controller-tools@v2 might allow overriding the type and validation for embedded types. When that happens, this hack should be revisited.", - "name": "name must be unique within a namespace. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names", - "generateName": "generateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server.\n\nIf this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header).\n\nApplied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#idempotency", - "namespace": "namespace defines the space within each name must be unique. An empty namespace is equivalent to the \"default\" namespace, but \"default\" is the canonical representation. Not all objects are required to be scoped to a namespace - the value of this field for those objects will be empty.\n\nMust be a DNS_LABEL. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/namespaces", - "labels": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels", - "annotations": "annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", - "ownerReferences": "List of objects depended by this object. If ALL objects in the list have been deleted, this object will be garbage collected. If this object is managed by a controller, then an entry in this list will point to this controller, with the controller field set to true. There cannot be more than one managing controller.", -} - -func (ObjectMeta) SwaggerDoc() map[string]string { - return map_ObjectMeta -} - -var map_ProviderSpec = map[string]string{ - "": "ProviderSpec defines the configuration to use during node creation.", - "value": "value is an inlined, serialized representation of the resource configuration. It is recommended that providers maintain their own versioned API types that should be serialized/deserialized from this field, akin to component config.", -} - -func (ProviderSpec) SwaggerDoc() map[string]string { - return map_ProviderSpec -} - -var map_AddressesFromPool = map[string]string{ - "": "AddressesFromPool is an IPAddressPool that will be used to create IPAddressClaims for fulfillment by an external controller.", - "group": "group of the IP address pool type known to an external IPAM controller. This should be a fully qualified domain name, for example, externalipam.controller.io.", - "resource": "resource of the IP address pool type known to an external IPAM controller. It is normally the plural form of the resource kind in lowercase, for example, ippools.", - "name": "name of an IP address pool, for example, pool-config-1.", -} - -func (AddressesFromPool) SwaggerDoc() map[string]string { - return map_AddressesFromPool -} - -var map_NetworkDeviceSpec = map[string]string{ - "": "NetworkDeviceSpec defines the network configuration for a virtual machine's network device.", - "networkName": "networkName is the name of the vSphere network or port group to which the network device will be connected, for example, port-group-1. When not provided, the vCenter API will attempt to select a default network. The available networks (port groups) can be listed using `govc ls 'network/*'`", - "gateway": "gateway is an IPv4 or IPv6 address which represents the subnet gateway, for example, 192.168.1.1.", - "ipAddrs": "ipAddrs is a list of one or more IPv4 and/or IPv6 addresses and CIDR to assign to this device, for example, 192.168.1.100/24. IP addresses provided via ipAddrs are intended to allow explicit assignment of a machine's IP address. IP pool configurations provided via addressesFromPool, however, defer IP address assignment to an external controller. If both addressesFromPool and ipAddrs are empty or not defined, DHCP will be used to assign an IP address. If both ipAddrs and addressesFromPools are defined, the IP addresses associated with ipAddrs will be applied first followed by IP addresses from addressesFromPools.", - "nameservers": "nameservers is a list of IPv4 and/or IPv6 addresses used as DNS nameservers, for example, 8.8.8.8. a nameserver is not provided by a fulfilled IPAddressClaim. If DHCP is not the source of IP addresses for this network device, nameservers should include a valid nameserver.", - "addressesFromPools": "addressesFromPools is a list of references to IP pool types and instances which are handled by an external controller. addressesFromPool configurations provided via addressesFromPools defer IP address assignment to an external controller. IP addresses provided via ipAddrs, however, are intended to allow explicit assignment of a machine's IP address. If both addressesFromPool and ipAddrs are empty or not defined, DHCP will assign an IP address. If both ipAddrs and addressesFromPools are defined, the IP addresses associated with ipAddrs will be applied first followed by IP addresses from addressesFromPools.", -} - -func (NetworkDeviceSpec) SwaggerDoc() map[string]string { - return map_NetworkDeviceSpec -} - -var map_NetworkSpec = map[string]string{ - "": "NetworkSpec defines the virtual machine's network configuration.", - "devices": "devices defines the virtual machine's network interfaces.", -} - -func (NetworkSpec) SwaggerDoc() map[string]string { - return map_NetworkSpec -} - -var map_VSphereDisk = map[string]string{ - "": "VSphereDisk describes additional disks for vSphere.", - "name": "name is used to identify the disk definition. name is required needs to be unique so that it can be used to clearly identify purpose of the disk. It must be at most 80 characters in length and must consist only of alphanumeric characters, hyphens and underscores, and must start and end with an alphanumeric character.", - "sizeGiB": "sizeGiB is the size of the disk in GiB. The maximum supported size 16384 GiB.", - "provisioningMode": "provisioningMode is an optional field that specifies the provisioning type to be used by this vSphere data disk. Allowed values are \"Thin\", \"Thick\", \"EagerlyZeroed\", and omitted. When set to Thin, the disk will be made using thin provisioning allocating the bare minimum space. When set to Thick, the full disk size will be allocated when disk is created. When set to EagerlyZeroed, the disk will be created using eager zero provisioning. An eager zeroed thick disk has all space allocated and wiped clean of any previous contents on the physical media at creation time. Such disks may take longer time during creation compared to other disk formats. When omitted, no setting will be applied to the data disk and the provisioning mode for the disk will be determined by the default storage policy configured for the datastore in vSphere.", -} - -func (VSphereDisk) SwaggerDoc() map[string]string { - return map_VSphereDisk -} - -var map_VSphereMachineProviderSpec = map[string]string{ - "": "VSphereMachineProviderSpec is the type that will be embedded in a Machine.Spec.ProviderSpec field for an VSphere virtual machine. It is used by the vSphere machine actuator to create a single Machine. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "userDataSecret": "userDataSecret contains a local reference to a secret that contains the UserData to apply to the instance", - "credentialsSecret": "credentialsSecret is a reference to the secret with vSphere credentials.", - "template": "template is the name, inventory path, or instance UUID of the template used to clone new machines.", - "workspace": "workspace describes the workspace to use for the machine.", - "network": "network is the network configuration for this machine's VM.", - "numCPUs": "numCPUs is the number of virtual processors in a virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", - "numCoresPerSocket": "NumCPUs is the number of cores among which to distribute CPUs in this virtual machine. Defaults to the analogue property value in the template from which this machine is cloned.", - "memoryMiB": "memoryMiB is the size of a virtual machine's memory, in MiB. Defaults to the analogue property value in the template from which this machine is cloned.", - "diskGiB": "diskGiB is the size of a virtual machine's disk, in GiB. Defaults to the analogue property value in the template from which this machine is cloned. This parameter will be ignored if 'LinkedClone' CloneMode is set.", - "tagIDs": "tagIDs is an optional set of tags to add to an instance. Specified tagIDs must use URN-notation instead of display names. A maximum of 10 tag IDs may be specified.", - "snapshot": "snapshot is the name of the snapshot from which the VM was cloned", - "cloneMode": "cloneMode specifies the type of clone operation. The LinkedClone mode is only support for templates that have at least one snapshot. If the template has no snapshots, then CloneMode defaults to FullClone. When LinkedClone mode is enabled the DiskGiB field is ignored as it is not possible to expand disks of linked clones. Defaults to FullClone. When using LinkedClone, if no snapshots exist for the source template, falls back to FullClone.", - "dataDisks": "dataDisks is a list of non OS disks to be created and attached to the VM. The max number of disk allowed to be attached is currently 29. The max number of disks for any controller is 30, but VM template will always have OS disk so that will leave 29 disks on any controller type.", -} - -func (VSphereMachineProviderSpec) SwaggerDoc() map[string]string { - return map_VSphereMachineProviderSpec -} - -var map_VSphereMachineProviderStatus = map[string]string{ - "": "VSphereMachineProviderStatus is the type that will be embedded in a Machine.Status.ProviderStatus field. It contains VSphere-specific status information. Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "instanceId": "instanceId is the ID of the instance in VSphere", - "instanceState": "instanceState is the provisioning state of the VSphere Instance.", - "conditions": "conditions is a set of conditions associated with the Machine to indicate errors or other status", - "taskRef": "taskRef is a managed object reference to a Task related to the machine. This value is set automatically at runtime and should not be set or modified by users.", -} - -func (VSphereMachineProviderStatus) SwaggerDoc() map[string]string { - return map_VSphereMachineProviderStatus -} - -var map_Workspace = map[string]string{ - "": "WorkspaceConfig defines a workspace configuration for the vSphere cloud provider.", - "server": "server is the IP address or FQDN of the vSphere endpoint.", - "datacenter": "datacenter is the datacenter in which VMs are created/located.", - "folder": "folder is the folder in which VMs are created/located.", - "datastore": "datastore is the datastore in which VMs are created/located.", - "resourcePool": "resourcePool is the resource pool in which VMs are created/located.", - "vmGroup": "vmGroup is the cluster vm group in which virtual machines will be added for vm host group based zonal.", -} - -func (Workspace) SwaggerDoc() map[string]string { - return map_Workspace -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/monitoring/.codegen.yaml b/vendor/github.com/openshift/api/monitoring/.codegen.yaml deleted file mode 100644 index b865f353b..000000000 --- a/vendor/github.com/openshift/api/monitoring/.codegen.yaml +++ /dev/null @@ -1,8 +0,0 @@ -schemapatch: - requiredFeatureSets: - - "" - - "Default" - - "TechPreviewNoUpgrade" -swaggerdocs: - disabled: false - commentPolicy: Enforce diff --git a/vendor/github.com/openshift/api/monitoring/install.go b/vendor/github.com/openshift/api/monitoring/install.go deleted file mode 100644 index cc34a01dc..000000000 --- a/vendor/github.com/openshift/api/monitoring/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package monitoring - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - monitoringv1 "github.com/openshift/api/monitoring/v1" -) - -const ( - GroupName = "monitoring.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(monitoringv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/monitoring/v1/Makefile b/vendor/github.com/openshift/api/monitoring/v1/Makefile deleted file mode 100644 index 0a7a62e1c..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="monitoring.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/monitoring/v1/doc.go b/vendor/github.com/openshift/api/monitoring/v1/doc.go deleted file mode 100644 index 54296a5b3..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.monitoring.v1 - -// +groupName=monitoring.openshift.io -package v1 diff --git a/vendor/github.com/openshift/api/monitoring/v1/register.go b/vendor/github.com/openshift/api/monitoring/v1/register.go deleted file mode 100644 index 342c4cca2..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/register.go +++ /dev/null @@ -1,41 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "monitoring.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &AlertingRule{}, - &AlertingRuleList{}, - &AlertRelabelConfig{}, - &AlertRelabelConfigList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/monitoring/v1/types.go b/vendor/github.com/openshift/api/monitoring/v1/types.go deleted file mode 100644 index faa250ed3..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/types.go +++ /dev/null @@ -1,374 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// AlertingRule represents a set of user-defined Prometheus rule groups containing -// alerting rules. This resource is the supported method for cluster admins to -// create alerts based on metrics recorded by the platform monitoring stack in -// OpenShift, i.e. the Prometheus instance deployed to the openshift-monitoring -// namespace. You might use this to create custom alerting rules not shipped with -// OpenShift based on metrics from components such as the node_exporter, which -// provides machine-level metrics such as CPU usage, or kube-state-metrics, which -// provides metrics on Kubernetes usage. -// -// The API is mostly compatible with the upstream PrometheusRule type from the -// prometheus-operator. The primary difference being that recording rules are not -// allowed here -- only alerting rules. For each AlertingRule resource created, a -// corresponding PrometheusRule will be created in the openshift-monitoring -// namespace. OpenShift requires admins to use the AlertingRule resource rather -// than the upstream type in order to allow better OpenShift specific defaulting -// and validation, while not modifying the upstream APIs directly. -// -// You can find upstream API documentation for PrometheusRule resources here: -// -// https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +genclient -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=alertingrules,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1406 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=monitoring,operatorOrdering=01 -// +kubebuilder:metadata:annotations="description=OpenShift Monitoring alerting rules" -type AlertingRule struct { - metav1.TypeMeta `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec describes the desired state of this AlertingRule object. - // +required - Spec AlertingRuleSpec `json:"spec"` - - // status describes the current state of this AlertOverrides object. - // - // +optional - Status AlertingRuleStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AlertingRuleList is a list of AlertingRule objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -type AlertingRuleList struct { - metav1.TypeMeta `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items is a list of AlertingRule objects. - // +optional - Items []AlertingRule `json:"items,omitempty"` -} - -// AlertingRuleSpec is the desired state of an AlertingRule resource. -// -// +k8s:openapi-gen=true -type AlertingRuleSpec struct { - // groups is a list of grouped alerting rules. Rule groups are the unit at - // which Prometheus parallelizes rule processing. All rules in a single group - // share a configured evaluation interval. All rules in the group will be - // processed together on this interval, sequentially, and all rules will be - // processed. - // - // It's common to group related alerting rules into a single AlertingRule - // resources, and within that resource, closely related alerts, or simply - // alerts with the same interval, into individual groups. You are also free - // to create AlertingRule resources with only a single rule group, but be - // aware that this can have a performance impact on Prometheus if the group is - // extremely large or has very complex query expressions to evaluate. - // Spreading very complex rules across multiple groups to allow them to be - // processed in parallel is also a common use-case. - // - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MinItems:=1 - // +required - Groups []RuleGroup `json:"groups"` -} - -// Duration is a valid prometheus time duration. -// Supported units: y, w, d, h, m, s, ms -// Examples: `30s`, `1m`, `1h20m15s`, `15d` -// +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$" -// +kubebuilder:validation:MaxLength=2048 -type Duration string - -// RuleGroup is a list of sequentially evaluated alerting rules. -// -// +k8s:openapi-gen=true -type RuleGroup struct { - // name is the name of the group. - // - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - Name string `json:"name"` - - // interval is how often rules in the group are evaluated. If not specified, - // it defaults to the global.evaluation_interval configured in Prometheus, - // which itself defaults to 30 seconds. You can check if this value has been - // modified from the default on your cluster by inspecting the platform - // Prometheus configuration: - // The relevant field in that resource is: spec.evaluationInterval - // - // +optional - Interval Duration `json:"interval,omitempty"` - - // rules is a list of sequentially evaluated alerting rules. Prometheus may - // process rule groups in parallel, but rules within a single group are always - // processed sequentially, and all rules are processed. - // - // +kubebuilder:validation:MinItems:=1 - // +required - Rules []Rule `json:"rules"` -} - -// Rule describes an alerting rule. -// See Prometheus documentation: -// - https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules -// -// +k8s:openapi-gen=true -type Rule struct { - // alert is the name of the alert. Must be a valid label value, i.e. may - // contain any Unicode character. - // - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - Alert string `json:"alert"` - - // expr is the PromQL expression to evaluate. Every evaluation cycle this is - // evaluated at the current time, and all resultant time series become pending - // or firing alerts. This is most often a string representing a PromQL - // expression, e.g.: mapi_current_pending_csr > mapi_max_pending_csr - // In rare cases this could be a simple integer, e.g. a simple "1" if the - // intent is to create an alert that is always firing. This is sometimes used - // to create an always-firing "Watchdog" alert in order to ensure the alerting - // pipeline is functional. - // - // +required - Expr intstr.IntOrString `json:"expr"` - - // for is the time period after which alerts are considered firing after first - // returning results. Alerts which have not yet fired for long enough are - // considered pending. - // - // +optional - For Duration `json:"for,omitempty"` - - // labels to add or overwrite for each alert. The results of the PromQL - // expression for the alert will result in an existing set of labels for the - // alert, after evaluating the expression, for any label specified here with - // the same name as a label in that set, the label here wins and overwrites - // the previous value. These should typically be short identifying values - // that may be useful to query against. A common example is the alert - // severity, where one sets `severity: warning` under the `labels` key: - // - // +optional - Labels map[string]string `json:"labels,omitempty"` - - // annotations to add to each alert. These are values that can be used to - // store longer additional information that you won't query on, such as alert - // descriptions or runbook links. - // - // +optional - Annotations map[string]string `json:"annotations,omitempty"` -} - -// AlertingRuleStatus is the status of an AlertingRule resource. -type AlertingRuleStatus struct { - // observedGeneration is the last generation change you've dealt with. - // - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // prometheusRule is the generated PrometheusRule for this AlertingRule. Each - // AlertingRule instance results in a generated PrometheusRule object in the - // same namespace, which is always the openshift-monitoring namespace. - // - // +optional - PrometheusRule PrometheusRuleRef `json:"prometheusRule,omitempty"` -} - -// PrometheusRuleRef is a reference to an existing PrometheusRule object. Each -// AlertingRule instance results in a generated PrometheusRule object in the same -// namespace, which is always the openshift-monitoring namespace. This is used to -// point to the generated PrometheusRule object in the AlertingRule status. -type PrometheusRuleRef struct { - // This is a struct so that we can support future expansion of fields within - // the reference should we ever need to. - - // name of the referenced PrometheusRule. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - Name string `json:"name"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:subresource:status - -// AlertRelabelConfig defines a set of relabel configs for alerts. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=alertrelabelconfigs,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1406 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=monitoring,operatorOrdering=02 -// +kubebuilder:metadata:annotations="description=OpenShift Monitoring alert relabel configurations" -type AlertRelabelConfig struct { - metav1.TypeMeta `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec describes the desired state of this AlertRelabelConfig object. - // +required - Spec AlertRelabelConfigSpec `json:"spec"` - - // status describes the current state of this AlertRelabelConfig object. - // - // +optional - Status AlertRelabelConfigStatus `json:"status,omitempty"` -} - -// AlertRelabelConfigsSpec is the desired state of an AlertRelabelConfig resource. -// -// +k8s:openapi-gen=true -type AlertRelabelConfigSpec struct { - // configs is a list of sequentially evaluated alert relabel configs. - // - // +kubebuilder:validation:MinItems:=1 - // +required - Configs []RelabelConfig `json:"configs"` -} - -// AlertRelabelConfigStatus is the status of an AlertRelabelConfig resource. -type AlertRelabelConfigStatus struct { - // conditions contains details on the state of the AlertRelabelConfig, may be - // empty. - // - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` -} - -const ( - // AlertRelabelConfigReady is the condition type indicating readiness. - AlertRelabelConfigReady string = "Ready" -) - -// AlertRelabelConfigList is a list of AlertRelabelConfigs. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +k8s:openapi-gen=true -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -type AlertRelabelConfigList struct { - metav1.TypeMeta `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items is a list of AlertRelabelConfigs. - // +optional - Items []AlertRelabelConfig `json:"items,omitempty"` -} - -// LabelName is a valid Prometheus label name which may only contain ASCII -// letters, numbers, and underscores. -// -// +kubebuilder:validation:Pattern:="^[a-zA-Z_][a-zA-Z0-9_]*$" -// +kubebuilder:validation:MaxLength=2048 -type LabelName string - -// RelabelConfig allows dynamic rewriting of label sets for alerts. -// See Prometheus documentation: -// - https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs -// - https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config -// -// +kubebuilder:validation:XValidation:rule="self.action != 'HashMod' || self.modulus != 0",message="relabel action hashmod requires non-zero modulus" -// +kubebuilder:validation:XValidation:rule="(self.action != 'Replace' && self.action != 'HashMod') || has(self.targetLabel)",message="targetLabel is required when action is Replace or HashMod" -// +kubebuilder:validation:XValidation:rule="(self.action != 'LabelDrop' && self.action != 'LabelKeep') || !has(self.sourceLabels)",message="LabelKeep and LabelDrop actions require only 'regex', and no other fields (found sourceLabels)" -// +kubebuilder:validation:XValidation:rule="(self.action != 'LabelDrop' && self.action != 'LabelKeep') || !has(self.targetLabel)",message="LabelKeep and LabelDrop actions require only 'regex', and no other fields (found targetLabel)" -// +kubebuilder:validation:XValidation:rule="(self.action != 'LabelDrop' && self.action != 'LabelKeep') || !has(self.modulus)",message="LabelKeep and LabelDrop actions require only 'regex', and no other fields (found modulus)" -// +kubebuilder:validation:XValidation:rule="(self.action != 'LabelDrop' && self.action != 'LabelKeep') || !has(self.separator)",message="LabelKeep and LabelDrop actions require only 'regex', and no other fields (found separator)" -// +kubebuilder:validation:XValidation:rule="(self.action != 'LabelDrop' && self.action != 'LabelKeep') || !has(self.replacement)",message="LabelKeep and LabelDrop actions require only 'regex', and no other fields (found replacement)" -// +kubebuilder:validation:XValidation:rule="!has(self.modulus) || (has(self.modulus) && size(self.sourceLabels) > 0)",message="modulus requires sourceLabels to be present" -// +kubebuilder:validation:XValidation:rule="(self.action == 'LabelDrop' || self.action == 'LabelKeep') || has(self.sourceLabels)",message="sourceLabels is required for actions Replace, Keep, Drop, HashMod and LabelMap" -// +kubebuilder:validation:XValidation:rule="(self.action != 'Replace' && self.action != 'LabelMap') || has(self.replacement)",message="replacement is required for actions Replace and LabelMap" -// +k8s:openapi-gen=true -type RelabelConfig struct { - // sourceLabels select values from existing labels. Their content is - // concatenated using the configured separator and matched against the - // configured regular expression for the 'Replace', 'Keep', and 'Drop' actions. - // Not allowed for actions 'LabelKeep' and 'LabelDrop'. - // - // +optional - SourceLabels []LabelName `json:"sourceLabels,omitempty"` - - // separator placed between concatenated source label values. When omitted, - // Prometheus will use its default value of ';'. - // - // +optional - // +kubebuilder:validation:MaxLength=2048 - Separator string `json:"separator,omitempty"` - - // targetLabel to which the resulting value is written in a 'Replace' action. - // It is required for 'Replace' and 'HashMod' actions and forbidden for - // actions 'LabelKeep' and 'LabelDrop'. Regex capture groups - // are available. - // - // +optional - // +kubebuilder:validation:MaxLength=2048 - TargetLabel string `json:"targetLabel,omitempty"` - - // regex against which the extracted value is matched. Default is: '(.*)' - // regex is required for all actions except 'HashMod' - // - // +optional - // +kubebuilder:default=(.*) - // +kubebuilder:validation:MaxLength=2048 - Regex string `json:"regex,omitempty"` - - // modulus to take of the hash of the source label values. This can be - // combined with the 'HashMod' action to set 'target_label' to the 'modulus' - // of a hash of the concatenated 'source_labels'. This is only valid if - // sourceLabels is not empty and action is not 'LabelKeep' or 'LabelDrop'. - // - // +optional - Modulus uint64 `json:"modulus,omitempty"` - - // replacement value against which a regex replace is performed if the regular - // expression matches. This is required if the action is 'Replace' or - // 'LabelMap' and forbidden for actions 'LabelKeep' and 'LabelDrop'. - // Regex capture groups are available. Default is: '$1' - // - // +optional - // +kubebuilder:validation:MaxLength=2048 - Replacement string `json:"replacement,omitempty"` - - // action to perform based on regex matching. Must be one of: 'Replace', 'Keep', - // 'Drop', 'HashMod', 'LabelMap', 'LabelDrop', or 'LabelKeep'. Default is: 'Replace' - // - // +kubebuilder:validation:Enum=Replace;Keep;Drop;HashMod;LabelMap;LabelDrop;LabelKeep - // +kubebuilder:default=Replace - // +optional - Action string `json:"action,omitempty"` -} diff --git a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/monitoring/v1/zz_generated.deepcopy.go deleted file mode 100644 index bc572dc5b..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,310 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AlertRelabelConfig) DeepCopyInto(out *AlertRelabelConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertRelabelConfig. -func (in *AlertRelabelConfig) DeepCopy() *AlertRelabelConfig { - if in == nil { - return nil - } - out := new(AlertRelabelConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlertRelabelConfig) 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 *AlertRelabelConfigList) DeepCopyInto(out *AlertRelabelConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AlertRelabelConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertRelabelConfigList. -func (in *AlertRelabelConfigList) DeepCopy() *AlertRelabelConfigList { - if in == nil { - return nil - } - out := new(AlertRelabelConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlertRelabelConfigList) 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 *AlertRelabelConfigSpec) DeepCopyInto(out *AlertRelabelConfigSpec) { - *out = *in - if in.Configs != nil { - in, out := &in.Configs, &out.Configs - *out = make([]RelabelConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertRelabelConfigSpec. -func (in *AlertRelabelConfigSpec) DeepCopy() *AlertRelabelConfigSpec { - if in == nil { - return nil - } - out := new(AlertRelabelConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertRelabelConfigStatus) DeepCopyInto(out *AlertRelabelConfigStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertRelabelConfigStatus. -func (in *AlertRelabelConfigStatus) DeepCopy() *AlertRelabelConfigStatus { - if in == nil { - return nil - } - out := new(AlertRelabelConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertingRule) DeepCopyInto(out *AlertingRule) { - *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 AlertingRule. -func (in *AlertingRule) DeepCopy() *AlertingRule { - if in == nil { - return nil - } - out := new(AlertingRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlertingRule) 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 *AlertingRuleList) DeepCopyInto(out *AlertingRuleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AlertingRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingRuleList. -func (in *AlertingRuleList) DeepCopy() *AlertingRuleList { - if in == nil { - return nil - } - out := new(AlertingRuleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlertingRuleList) 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 *AlertingRuleSpec) DeepCopyInto(out *AlertingRuleSpec) { - *out = *in - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]RuleGroup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingRuleSpec. -func (in *AlertingRuleSpec) DeepCopy() *AlertingRuleSpec { - if in == nil { - return nil - } - out := new(AlertingRuleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertingRuleStatus) DeepCopyInto(out *AlertingRuleStatus) { - *out = *in - out.PrometheusRule = in.PrometheusRule - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingRuleStatus. -func (in *AlertingRuleStatus) DeepCopy() *AlertingRuleStatus { - if in == nil { - return nil - } - out := new(AlertingRuleStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusRuleRef) DeepCopyInto(out *PrometheusRuleRef) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleRef. -func (in *PrometheusRuleRef) DeepCopy() *PrometheusRuleRef { - if in == nil { - return nil - } - out := new(PrometheusRuleRef) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig) { - *out = *in - if in.SourceLabels != nil { - in, out := &in.SourceLabels, &out.SourceLabels - *out = make([]LabelName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelConfig. -func (in *RelabelConfig) DeepCopy() *RelabelConfig { - if in == nil { - return nil - } - out := new(RelabelConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Rule) DeepCopyInto(out *Rule) { - *out = *in - out.Expr = in.Expr - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule. -func (in *Rule) DeepCopy() *Rule { - if in == nil { - return nil - } - out := new(Rule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RuleGroup) DeepCopyInto(out *RuleGroup) { - *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]Rule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup. -func (in *RuleGroup) DeepCopy() *RuleGroup { - if in == nil { - return nil - } - out := new(RuleGroup) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/monitoring/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 0efeba419..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,44 +0,0 @@ -alertrelabelconfigs.monitoring.openshift.io: - Annotations: - description: OpenShift Monitoring alert relabel configurations - ApprovedPRNumber: https://github.com/openshift/api/pull/1406 - CRDName: alertrelabelconfigs.monitoring.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: monitoring - FilenameOperatorOrdering: "02" - FilenameRunLevel: "0000_50" - GroupName: monitoring.openshift.io - HasStatus: true - KindName: AlertRelabelConfig - Labels: {} - PluralName: alertrelabelconfigs - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -alertingrules.monitoring.openshift.io: - Annotations: - description: OpenShift Monitoring alerting rules - ApprovedPRNumber: https://github.com/openshift/api/pull/1406 - CRDName: alertingrules.monitoring.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: monitoring - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_50" - GroupName: monitoring.openshift.io - HasStatus: true - KindName: AlertingRule - Labels: {} - PluralName: alertingrules - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/monitoring/v1/zz_generated.model_name.go deleted file mode 100644 index eb2793cef..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.model_name.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertRelabelConfig) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertRelabelConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertRelabelConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertRelabelConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertRelabelConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertRelabelConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertRelabelConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertRelabelConfigStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertingRule) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertingRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertingRuleList) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertingRuleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertingRuleSpec) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertingRuleSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AlertingRuleStatus) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.AlertingRuleStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrometheusRuleRef) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.PrometheusRuleRef" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RelabelConfig) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.RelabelConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Rule) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.Rule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RuleGroup) OpenAPIModelName() string { - return "com.github.openshift.api.monitoring.v1.RuleGroup" -} diff --git a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/monitoring/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index adb383772..000000000 --- a/vendor/github.com/openshift/api/monitoring/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,141 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AlertRelabelConfig = map[string]string{ - "": "AlertRelabelConfig defines a set of relabel configs for alerts.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec describes the desired state of this AlertRelabelConfig object.", - "status": "status describes the current state of this AlertRelabelConfig object.", -} - -func (AlertRelabelConfig) SwaggerDoc() map[string]string { - return map_AlertRelabelConfig -} - -var map_AlertRelabelConfigList = map[string]string{ - "": "AlertRelabelConfigList is a list of AlertRelabelConfigs.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of AlertRelabelConfigs.", -} - -func (AlertRelabelConfigList) SwaggerDoc() map[string]string { - return map_AlertRelabelConfigList -} - -var map_AlertRelabelConfigSpec = map[string]string{ - "": "AlertRelabelConfigsSpec is the desired state of an AlertRelabelConfig resource.", - "configs": "configs is a list of sequentially evaluated alert relabel configs.", -} - -func (AlertRelabelConfigSpec) SwaggerDoc() map[string]string { - return map_AlertRelabelConfigSpec -} - -var map_AlertRelabelConfigStatus = map[string]string{ - "": "AlertRelabelConfigStatus is the status of an AlertRelabelConfig resource.", - "conditions": "conditions contains details on the state of the AlertRelabelConfig, may be empty.", -} - -func (AlertRelabelConfigStatus) SwaggerDoc() map[string]string { - return map_AlertRelabelConfigStatus -} - -var map_AlertingRule = map[string]string{ - "": "AlertingRule represents a set of user-defined Prometheus rule groups containing alerting rules. This resource is the supported method for cluster admins to create alerts based on metrics recorded by the platform monitoring stack in OpenShift, i.e. the Prometheus instance deployed to the openshift-monitoring namespace. You might use this to create custom alerting rules not shipped with OpenShift based on metrics from components such as the node_exporter, which provides machine-level metrics such as CPU usage, or kube-state-metrics, which provides metrics on Kubernetes usage.\n\nThe API is mostly compatible with the upstream PrometheusRule type from the prometheus-operator. The primary difference being that recording rules are not allowed here -- only alerting rules. For each AlertingRule resource created, a corresponding PrometheusRule will be created in the openshift-monitoring namespace. OpenShift requires admins to use the AlertingRule resource rather than the upstream type in order to allow better OpenShift specific defaulting and validation, while not modifying the upstream APIs directly.\n\nYou can find upstream API documentation for PrometheusRule resources here:\n\nhttps://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api.md\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec describes the desired state of this AlertingRule object.", - "status": "status describes the current state of this AlertOverrides object.", -} - -func (AlertingRule) SwaggerDoc() map[string]string { - return map_AlertingRule -} - -var map_AlertingRuleList = map[string]string{ - "": "AlertingRuleList is a list of AlertingRule objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of AlertingRule objects.", -} - -func (AlertingRuleList) SwaggerDoc() map[string]string { - return map_AlertingRuleList -} - -var map_AlertingRuleSpec = map[string]string{ - "": "AlertingRuleSpec is the desired state of an AlertingRule resource.", - "groups": "groups is a list of grouped alerting rules. Rule groups are the unit at which Prometheus parallelizes rule processing. All rules in a single group share a configured evaluation interval. All rules in the group will be processed together on this interval, sequentially, and all rules will be processed.\n\nIt's common to group related alerting rules into a single AlertingRule resources, and within that resource, closely related alerts, or simply alerts with the same interval, into individual groups. You are also free to create AlertingRule resources with only a single rule group, but be aware that this can have a performance impact on Prometheus if the group is extremely large or has very complex query expressions to evaluate. Spreading very complex rules across multiple groups to allow them to be processed in parallel is also a common use-case.", -} - -func (AlertingRuleSpec) SwaggerDoc() map[string]string { - return map_AlertingRuleSpec -} - -var map_AlertingRuleStatus = map[string]string{ - "": "AlertingRuleStatus is the status of an AlertingRule resource.", - "observedGeneration": "observedGeneration is the last generation change you've dealt with.", - "prometheusRule": "prometheusRule is the generated PrometheusRule for this AlertingRule. Each AlertingRule instance results in a generated PrometheusRule object in the same namespace, which is always the openshift-monitoring namespace.", -} - -func (AlertingRuleStatus) SwaggerDoc() map[string]string { - return map_AlertingRuleStatus -} - -var map_PrometheusRuleRef = map[string]string{ - "": "PrometheusRuleRef is a reference to an existing PrometheusRule object. Each AlertingRule instance results in a generated PrometheusRule object in the same namespace, which is always the openshift-monitoring namespace. This is used to point to the generated PrometheusRule object in the AlertingRule status.", - "name": "name of the referenced PrometheusRule.", -} - -func (PrometheusRuleRef) SwaggerDoc() map[string]string { - return map_PrometheusRuleRef -} - -var map_RelabelConfig = map[string]string{ - "": "RelabelConfig allows dynamic rewriting of label sets for alerts. See Prometheus documentation: - https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs - https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config", - "sourceLabels": "sourceLabels select values from existing labels. Their content is concatenated using the configured separator and matched against the configured regular expression for the 'Replace', 'Keep', and 'Drop' actions. Not allowed for actions 'LabelKeep' and 'LabelDrop'.", - "separator": "separator placed between concatenated source label values. When omitted, Prometheus will use its default value of ';'.", - "targetLabel": "targetLabel to which the resulting value is written in a 'Replace' action. It is required for 'Replace' and 'HashMod' actions and forbidden for actions 'LabelKeep' and 'LabelDrop'. Regex capture groups are available.", - "regex": "regex against which the extracted value is matched. Default is: '(.*)' regex is required for all actions except 'HashMod'", - "modulus": "modulus to take of the hash of the source label values. This can be combined with the 'HashMod' action to set 'target_label' to the 'modulus' of a hash of the concatenated 'source_labels'. This is only valid if sourceLabels is not empty and action is not 'LabelKeep' or 'LabelDrop'.", - "replacement": "replacement value against which a regex replace is performed if the regular expression matches. This is required if the action is 'Replace' or 'LabelMap' and forbidden for actions 'LabelKeep' and 'LabelDrop'. Regex capture groups are available. Default is: '$1'", - "action": "action to perform based on regex matching. Must be one of: 'Replace', 'Keep', 'Drop', 'HashMod', 'LabelMap', 'LabelDrop', or 'LabelKeep'. Default is: 'Replace'", -} - -func (RelabelConfig) SwaggerDoc() map[string]string { - return map_RelabelConfig -} - -var map_Rule = map[string]string{ - "": "Rule describes an alerting rule. See Prometheus documentation: - https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules", - "alert": "alert is the name of the alert. Must be a valid label value, i.e. may contain any Unicode character.", - "expr": "expr is the PromQL expression to evaluate. Every evaluation cycle this is evaluated at the current time, and all resultant time series become pending or firing alerts. This is most often a string representing a PromQL expression, e.g.: mapi_current_pending_csr > mapi_max_pending_csr In rare cases this could be a simple integer, e.g. a simple \"1\" if the intent is to create an alert that is always firing. This is sometimes used to create an always-firing \"Watchdog\" alert in order to ensure the alerting pipeline is functional.", - "for": "for is the time period after which alerts are considered firing after first returning results. Alerts which have not yet fired for long enough are considered pending.", - "labels": "labels to add or overwrite for each alert. The results of the PromQL expression for the alert will result in an existing set of labels for the alert, after evaluating the expression, for any label specified here with the same name as a label in that set, the label here wins and overwrites the previous value. These should typically be short identifying values that may be useful to query against. A common example is the alert severity, where one sets `severity: warning` under the `labels` key:", - "annotations": "annotations to add to each alert. These are values that can be used to store longer additional information that you won't query on, such as alert descriptions or runbook links.", -} - -func (Rule) SwaggerDoc() map[string]string { - return map_Rule -} - -var map_RuleGroup = map[string]string{ - "": "RuleGroup is a list of sequentially evaluated alerting rules.", - "name": "name is the name of the group.", - "interval": "interval is how often rules in the group are evaluated. If not specified, it defaults to the global.evaluation_interval configured in Prometheus, which itself defaults to 30 seconds. You can check if this value has been modified from the default on your cluster by inspecting the platform Prometheus configuration: The relevant field in that resource is: spec.evaluationInterval", - "rules": "rules is a list of sequentially evaluated alerting rules. Prometheus may process rule groups in parallel, but rules within a single group are always processed sequentially, and all rules are processed.", -} - -func (RuleGroup) SwaggerDoc() map[string]string { - return map_RuleGroup -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/network/.codegen.yaml b/vendor/github.com/openshift/api/network/.codegen.yaml deleted file mode 100644 index e9a0f1897..000000000 --- a/vendor/github.com/openshift/api/network/.codegen.yaml +++ /dev/null @@ -1,4 +0,0 @@ -protobuf: - disabled: false - disabledVersions: - - v1alpha1 diff --git a/vendor/github.com/openshift/api/network/OWNERS b/vendor/github.com/openshift/api/network/OWNERS deleted file mode 100644 index 279009f7a..000000000 --- a/vendor/github.com/openshift/api/network/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: - - danwinship - - dcbw - - knobunc diff --git a/vendor/github.com/openshift/api/network/install.go b/vendor/github.com/openshift/api/network/install.go deleted file mode 100644 index fbaa079b3..000000000 --- a/vendor/github.com/openshift/api/network/install.go +++ /dev/null @@ -1,27 +0,0 @@ -package network - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - networkv1 "github.com/openshift/api/network/v1" - networkv1alpha1 "github.com/openshift/api/network/v1alpha1" -) - -const ( - GroupName = "network.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(networkv1.Install, networkv1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/network/v1/Makefile b/vendor/github.com/openshift/api/network/v1/Makefile deleted file mode 100644 index 027afff7c..000000000 --- a/vendor/github.com/openshift/api/network/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="network.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/network/v1/constants.go b/vendor/github.com/openshift/api/network/v1/constants.go deleted file mode 100644 index 54c06f331..000000000 --- a/vendor/github.com/openshift/api/network/v1/constants.go +++ /dev/null @@ -1,17 +0,0 @@ -package v1 - -const ( - // Pod annotations - AssignMacvlanAnnotation = "pod.network.openshift.io/assign-macvlan" - - // HostSubnet annotations. (Note: should be "hostsubnet.network.openshift.io/", but the incorrect name is now part of the API.) - AssignHostSubnetAnnotation = "pod.network.openshift.io/assign-subnet" - FixedVNIDHostAnnotation = "pod.network.openshift.io/fixed-vnid-host" - NodeUIDAnnotation = "pod.network.openshift.io/node-uid" - - // NetNamespace annotations - MulticastEnabledAnnotation = "netnamespace.network.openshift.io/multicast-enabled" - - // ChangePodNetworkAnnotation is an annotation on NetNamespace to request change of pod network - ChangePodNetworkAnnotation string = "pod.network.openshift.io/multitenant.change-network" -) diff --git a/vendor/github.com/openshift/api/network/v1/doc.go b/vendor/github.com/openshift/api/network/v1/doc.go deleted file mode 100644 index a3a0e7463..000000000 --- a/vendor/github.com/openshift/api/network/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/network/apis/network -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.network.v1 - -// +groupName=network.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/network/v1/generated.pb.go b/vendor/github.com/openshift/api/network/v1/generated.pb.go deleted file mode 100644 index 9261110b3..000000000 --- a/vendor/github.com/openshift/api/network/v1/generated.pb.go +++ /dev/null @@ -1,2774 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/network/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *ClusterNetwork) Reset() { *m = ClusterNetwork{} } - -func (m *ClusterNetworkEntry) Reset() { *m = ClusterNetworkEntry{} } - -func (m *ClusterNetworkList) Reset() { *m = ClusterNetworkList{} } - -func (m *EgressNetworkPolicy) Reset() { *m = EgressNetworkPolicy{} } - -func (m *EgressNetworkPolicyList) Reset() { *m = EgressNetworkPolicyList{} } - -func (m *EgressNetworkPolicyPeer) Reset() { *m = EgressNetworkPolicyPeer{} } - -func (m *EgressNetworkPolicyRule) Reset() { *m = EgressNetworkPolicyRule{} } - -func (m *EgressNetworkPolicySpec) Reset() { *m = EgressNetworkPolicySpec{} } - -func (m *HostSubnet) Reset() { *m = HostSubnet{} } - -func (m *HostSubnetList) Reset() { *m = HostSubnetList{} } - -func (m *NetNamespace) Reset() { *m = NetNamespace{} } - -func (m *NetNamespaceList) Reset() { *m = NetNamespaceList{} } - -func (m *ClusterNetwork) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterNetwork) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterNetwork) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.MTU != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MTU)) - i-- - dAtA[i] = 0x40 - } - if m.VXLANPort != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.VXLANPort)) - i-- - dAtA[i] = 0x38 - } - if len(m.ClusterNetworks) > 0 { - for iNdEx := len(m.ClusterNetworks) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ClusterNetworks[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.PluginName) - copy(dAtA[i:], m.PluginName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.PluginName))) - i-- - dAtA[i] = 0x2a - i -= len(m.ServiceNetwork) - copy(dAtA[i:], m.ServiceNetwork) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceNetwork))) - i-- - dAtA[i] = 0x22 - i = encodeVarintGenerated(dAtA, i, uint64(m.HostSubnetLength)) - i-- - dAtA[i] = 0x18 - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Network))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterNetworkEntry) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterNetworkEntry) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterNetworkEntry) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.HostSubnetLength)) - i-- - dAtA[i] = 0x10 - i -= len(m.CIDR) - copy(dAtA[i:], m.CIDR) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDR))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterNetworkList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterNetworkList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterNetworkList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressNetworkPolicy) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressNetworkPolicy) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressNetworkPolicy) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressNetworkPolicyList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressNetworkPolicyList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressNetworkPolicyList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressNetworkPolicyPeer) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressNetworkPolicyPeer) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressNetworkPolicyPeer) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DNSName) - copy(dAtA[i:], m.DNSName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DNSName))) - i-- - dAtA[i] = 0x12 - i -= len(m.CIDRSelector) - copy(dAtA[i:], m.CIDRSelector) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CIDRSelector))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressNetworkPolicyRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressNetworkPolicyRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressNetworkPolicyRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressNetworkPolicySpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressNetworkPolicySpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressNetworkPolicySpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Egress) > 0 { - for iNdEx := len(m.Egress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Egress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *HostSubnet) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostSubnet) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostSubnet) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EgressCIDRs) > 0 { - for iNdEx := len(m.EgressCIDRs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EgressCIDRs[iNdEx]) - copy(dAtA[i:], m.EgressCIDRs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EgressCIDRs[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.EgressIPs) > 0 { - for iNdEx := len(m.EgressIPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EgressIPs[iNdEx]) - copy(dAtA[i:], m.EgressIPs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EgressIPs[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - i -= len(m.Subnet) - copy(dAtA[i:], m.Subnet) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subnet))) - i-- - dAtA[i] = 0x22 - i -= len(m.HostIP) - copy(dAtA[i:], m.HostIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.HostIP))) - i-- - dAtA[i] = 0x1a - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *HostSubnetList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *HostSubnetList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *HostSubnetList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NetNamespace) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetNamespace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetNamespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.EgressIPs) > 0 { - for iNdEx := len(m.EgressIPs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.EgressIPs[iNdEx]) - copy(dAtA[i:], m.EgressIPs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.EgressIPs[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.NetID)) - i-- - dAtA[i] = 0x18 - i -= len(m.NetName) - copy(dAtA[i:], m.NetName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.NetName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *NetNamespaceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *NetNamespaceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *NetNamespaceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ClusterNetwork) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Network) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.HostSubnetLength)) - l = len(m.ServiceNetwork) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.PluginName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ClusterNetworks) > 0 { - for _, e := range m.ClusterNetworks { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.VXLANPort != nil { - n += 1 + sovGenerated(uint64(*m.VXLANPort)) - } - if m.MTU != nil { - n += 1 + sovGenerated(uint64(*m.MTU)) - } - return n -} - -func (m *ClusterNetworkEntry) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CIDR) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.HostSubnetLength)) - return n -} - -func (m *ClusterNetworkList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EgressNetworkPolicy) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressNetworkPolicyList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EgressNetworkPolicyPeer) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.CIDRSelector) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DNSName) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressNetworkPolicyRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressNetworkPolicySpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Egress) > 0 { - for _, e := range m.Egress { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *HostSubnet) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Host) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.HostIP) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Subnet) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.EgressIPs) > 0 { - for _, s := range m.EgressIPs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.EgressCIDRs) > 0 { - for _, s := range m.EgressCIDRs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *HostSubnetList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *NetNamespace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.NetName) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.NetID)) - if len(m.EgressIPs) > 0 { - for _, s := range m.EgressIPs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *NetNamespaceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ClusterNetwork) String() string { - if this == nil { - return "nil" - } - repeatedStringForClusterNetworks := "[]ClusterNetworkEntry{" - for _, f := range this.ClusterNetworks { - repeatedStringForClusterNetworks += strings.Replace(strings.Replace(f.String(), "ClusterNetworkEntry", "ClusterNetworkEntry", 1), `&`, ``, 1) + "," - } - repeatedStringForClusterNetworks += "}" - s := strings.Join([]string{`&ClusterNetwork{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Network:` + fmt.Sprintf("%v", this.Network) + `,`, - `HostSubnetLength:` + fmt.Sprintf("%v", this.HostSubnetLength) + `,`, - `ServiceNetwork:` + fmt.Sprintf("%v", this.ServiceNetwork) + `,`, - `PluginName:` + fmt.Sprintf("%v", this.PluginName) + `,`, - `ClusterNetworks:` + repeatedStringForClusterNetworks + `,`, - `VXLANPort:` + valueToStringGenerated(this.VXLANPort) + `,`, - `MTU:` + valueToStringGenerated(this.MTU) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterNetworkEntry) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterNetworkEntry{`, - `CIDR:` + fmt.Sprintf("%v", this.CIDR) + `,`, - `HostSubnetLength:` + fmt.Sprintf("%v", this.HostSubnetLength) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterNetworkList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ClusterNetwork{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterNetwork", "ClusterNetwork", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ClusterNetworkList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *EgressNetworkPolicy) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressNetworkPolicy{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "EgressNetworkPolicySpec", "EgressNetworkPolicySpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *EgressNetworkPolicyList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]EgressNetworkPolicy{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "EgressNetworkPolicy", "EgressNetworkPolicy", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&EgressNetworkPolicyList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *EgressNetworkPolicyPeer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressNetworkPolicyPeer{`, - `CIDRSelector:` + fmt.Sprintf("%v", this.CIDRSelector) + `,`, - `DNSName:` + fmt.Sprintf("%v", this.DNSName) + `,`, - `}`, - }, "") - return s -} -func (this *EgressNetworkPolicyRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressNetworkPolicyRule{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `To:` + strings.Replace(strings.Replace(this.To.String(), "EgressNetworkPolicyPeer", "EgressNetworkPolicyPeer", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *EgressNetworkPolicySpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForEgress := "[]EgressNetworkPolicyRule{" - for _, f := range this.Egress { - repeatedStringForEgress += strings.Replace(strings.Replace(f.String(), "EgressNetworkPolicyRule", "EgressNetworkPolicyRule", 1), `&`, ``, 1) + "," - } - repeatedStringForEgress += "}" - s := strings.Join([]string{`&EgressNetworkPolicySpec{`, - `Egress:` + repeatedStringForEgress + `,`, - `}`, - }, "") - return s -} -func (this *HostSubnet) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&HostSubnet{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `HostIP:` + fmt.Sprintf("%v", this.HostIP) + `,`, - `Subnet:` + fmt.Sprintf("%v", this.Subnet) + `,`, - `EgressIPs:` + fmt.Sprintf("%v", this.EgressIPs) + `,`, - `EgressCIDRs:` + fmt.Sprintf("%v", this.EgressCIDRs) + `,`, - `}`, - }, "") - return s -} -func (this *HostSubnetList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]HostSubnet{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "HostSubnet", "HostSubnet", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&HostSubnetList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *NetNamespace) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NetNamespace{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `NetName:` + fmt.Sprintf("%v", this.NetName) + `,`, - `NetID:` + fmt.Sprintf("%v", this.NetID) + `,`, - `EgressIPs:` + fmt.Sprintf("%v", this.EgressIPs) + `,`, - `}`, - }, "") - return s -} -func (this *NetNamespaceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]NetNamespace{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "NetNamespace", "NetNamespace", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&NetNamespaceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ClusterNetwork) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterNetwork: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterNetwork: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSubnetLength", wireType) - } - m.HostSubnetLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HostSubnetLength |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceNetwork", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceNetwork = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PluginName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PluginName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterNetworks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClusterNetworks = append(m.ClusterNetworks, ClusterNetworkEntry{}) - if err := m.ClusterNetworks[len(m.ClusterNetworks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VXLANPort", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.VXLANPort = &v - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MTU", wireType) - } - var v uint32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MTU = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterNetworkEntry) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterNetworkEntry: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterNetworkEntry: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CIDR", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CIDR = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field HostSubnetLength", wireType) - } - m.HostSubnetLength = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.HostSubnetLength |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterNetworkList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterNetworkList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterNetworkList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ClusterNetwork{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressNetworkPolicy) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressNetworkPolicy: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressNetworkPolicy: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressNetworkPolicyList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressNetworkPolicyList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressNetworkPolicyList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, EgressNetworkPolicy{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressNetworkPolicyPeer) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressNetworkPolicyPeer: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressNetworkPolicyPeer: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CIDRSelector", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CIDRSelector = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DNSName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DNSName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressNetworkPolicyRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressNetworkPolicyRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressNetworkPolicyRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = EgressNetworkPolicyRuleType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressNetworkPolicySpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressNetworkPolicySpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressNetworkPolicySpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Egress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Egress = append(m.Egress, EgressNetworkPolicyRule{}) - if err := m.Egress[len(m.Egress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostSubnet) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostSubnet: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostSubnet: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HostIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HostIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subnet", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subnet = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EgressIPs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EgressIPs = append(m.EgressIPs, HostSubnetEgressIP(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EgressCIDRs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EgressCIDRs = append(m.EgressCIDRs, HostSubnetEgressCIDR(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *HostSubnetList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: HostSubnetList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: HostSubnetList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, HostSubnet{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetNamespace) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetNamespace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetNamespace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NetName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NetID", wireType) - } - m.NetID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.NetID |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field EgressIPs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.EgressIPs = append(m.EgressIPs, NetNamespaceEgressIP(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *NetNamespaceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: NetNamespaceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: NetNamespaceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, NetNamespace{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/network/v1/generated.proto b/vendor/github.com/openshift/api/network/v1/generated.proto deleted file mode 100644 index 4fc68a974..000000000 --- a/vendor/github.com/openshift/api/network/v1/generated.proto +++ /dev/null @@ -1,255 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.network.v1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/network/v1"; - -// ClusterNetwork was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusternetworks,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=001 -// +kubebuilder:printcolumn:name="Cluster Network",type=string,JSONPath=.network,description="The primary cluster network CIDR" -// +kubebuilder:printcolumn:name="Service Network",type=string,JSONPath=.serviceNetwork,description="The service network CIDR" -// +kubebuilder:printcolumn:name="Plugin Name",type=string,JSONPath=.pluginName,description="The OpenShift SDN network plug-in in use" -// +openshift:compatibility-gen:level=1 -message ClusterNetwork { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // network is a CIDR string specifying the global overlay network's L3 space - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - optional string network = 2; - - // hostsubnetlength is the number of bits of network to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods - // +kubebuilder:validation:Minimum=2 - // +kubebuilder:validation:Maximum=30 - optional uint32 hostsubnetlength = 3; - - // serviceNetwork is the CIDR range that Service IP addresses are allocated from - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - optional string serviceNetwork = 4; - - // pluginName is the name of the network plugin being used - optional string pluginName = 5; - - // clusterNetworks is a list of ClusterNetwork objects that defines the global overlay network's L3 space by specifying a set of CIDR and netmasks that the SDN can allocate addresses from. - repeated ClusterNetworkEntry clusterNetworks = 6; - - // vxlanPort sets the VXLAN destination port used by the cluster. - // It is set by the master configuration file on startup and cannot be edited manually. - // Valid values for VXLANPort are integers 1-65535 inclusive and if unset defaults to 4789. - // Changing VXLANPort allows users to resolve issues between openshift SDN and other software trying to use the same VXLAN destination port. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +optional - optional uint32 vxlanPort = 7; - - // mtu is the MTU for the overlay network. This should be 50 less than the MTU of the network connecting the nodes. It is normally autodetected by the cluster network operator. - // +kubebuilder:validation:Minimum=576 - // +kubebuilder:validation:Maximum=65536 - // +optional - optional uint32 mtu = 8; -} - -// ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips. -message ClusterNetworkEntry { - // CIDR defines the total range of a cluster networks address space. - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - optional string cidr = 1; - - // hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods. - // +kubebuilder:validation:Minimum=2 - // +kubebuilder:validation:Maximum=30 - optional uint32 hostSubnetLength = 2; -} - -// ClusterNetworkList is a collection of ClusterNetworks -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterNetworkList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of cluster networks - repeated ClusterNetwork items = 2; -} - -// EgressNetworkPolicy was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=egressnetworkpolicies,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=004 -// +openshift:compatibility-gen:level=1 -message EgressNetworkPolicy { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is the specification of the current egress network policy - optional EgressNetworkPolicySpec spec = 2; -} - -// EgressNetworkPolicyList is a collection of EgressNetworkPolicy -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message EgressNetworkPolicyList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of policies - repeated EgressNetworkPolicy items = 2; -} - -// EgressNetworkPolicyPeer specifies a target to apply egress network policy to -message EgressNetworkPolicyPeer { - // cidrSelector is the CIDR range to allow/deny traffic to. If this is set, dnsName must be unset - // Ideally we would have liked to use the cidr openapi format for this property. - // But openshift-sdn only supports v4 while specifying the cidr format allows both v4 and v6 cidrs - // We are therefore using a regex pattern to validate instead. - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - optional string cidrSelector = 1; - - // dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector must be unset - // +kubebuilder:validation:Pattern=`^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$` - optional string dnsName = 2; -} - -// EgressNetworkPolicyRule contains a single egress network policy rule -message EgressNetworkPolicyRule { - // type marks this as an "Allow" or "Deny" rule - optional string type = 1; - - // to is the target that traffic is allowed/denied to - optional EgressNetworkPolicyPeer to = 2; -} - -// EgressNetworkPolicySpec provides a list of policies on outgoing network traffic -message EgressNetworkPolicySpec { - // egress contains the list of egress policy rules - repeated EgressNetworkPolicyRule egress = 1; -} - -// HostSubnet was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=hostsubnets,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=002 -// +kubebuilder:printcolumn:name="Host",type=string,JSONPath=.host,description="The name of the node" -// +kubebuilder:printcolumn:name="Host IP",type=string,JSONPath=.hostIP,description="The IP address to be used as a VTEP by other nodes in the overlay network" -// +kubebuilder:printcolumn:name="Subnet",type=string,JSONPath=.subnet,description="The CIDR range of the overlay network assigned to the node for its pods" -// +kubebuilder:printcolumn:name="Egress CIDRs",type=string,JSONPath=.egressCIDRs,description="The network egress CIDRs" -// +kubebuilder:printcolumn:name="Egress IPs",type=string,JSONPath=.egressIPs,description="The network egress IP addresses" -// +openshift:compatibility-gen:level=1 -message HostSubnet { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // host is the name of the node. (This is the same as the object's name, but both fields must be set.) - // +kubebuilder:validation:Pattern=`^[a-z0-9.-]+$` - optional string host = 2; - - // hostIP is the IP address to be used as a VTEP by other nodes in the overlay network - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$` - optional string hostIP = 3; - - // subnet is the CIDR range of the overlay network assigned to the node for its pods - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - optional string subnet = 4; - - // egressIPs is the list of automatic egress IP addresses currently hosted by this node. - // If EgressCIDRs is empty, this can be set by hand; if EgressCIDRs is set then the - // master will overwrite the value here with its own allocation of egress IPs. - // +optional - repeated string egressIPs = 5; - - // egressCIDRs is the list of CIDR ranges available for automatically assigning - // egress IPs to this node from. If this field is set then EgressIPs should be - // treated as read-only. - // +optional - repeated string egressCIDRs = 6; -} - -// HostSubnetList is a collection of HostSubnets -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message HostSubnetList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of host subnets - repeated HostSubnet items = 2; -} - -// NetNamespace was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=netnamespaces,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=003 -// +kubebuilder:printcolumn:name="NetID",type=integer,JSONPath=.netid,description="The network identifier of the network namespace" -// +kubebuilder:printcolumn:name="Egress IPs",type=string,JSONPath=.egressIPs,description="The network egress IP addresses" -// +openshift:compatibility-gen:level=1 -message NetNamespace { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // netname is the name of the network namespace. (This is the same as the object's name, but both fields must be set.) - // +kubebuilder:validation:Pattern=`^[a-z0-9.-]+$` - optional string netname = 2; - - // netid is the network identifier of the network namespace assigned to each overlay network packet. This can be manipulated with the "oc adm pod-network" commands. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=16777215 - optional uint32 netid = 3; - - // egressIPs is a list of reserved IPs that will be used as the source for external traffic coming from pods in this namespace. - // (If empty, external traffic will be masqueraded to Node IPs.) - // +optional - repeated string egressIPs = 4; -} - -// NetNamespaceList is a collection of NetNamespaces -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message NetNamespaceList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of net namespaces - repeated NetNamespace items = 2; -} - diff --git a/vendor/github.com/openshift/api/network/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/network/v1/generated.protomessage.pb.go deleted file mode 100644 index b19b7e3fe..000000000 --- a/vendor/github.com/openshift/api/network/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*ClusterNetwork) ProtoMessage() {} - -func (*ClusterNetworkEntry) ProtoMessage() {} - -func (*ClusterNetworkList) ProtoMessage() {} - -func (*EgressNetworkPolicy) ProtoMessage() {} - -func (*EgressNetworkPolicyList) ProtoMessage() {} - -func (*EgressNetworkPolicyPeer) ProtoMessage() {} - -func (*EgressNetworkPolicyRule) ProtoMessage() {} - -func (*EgressNetworkPolicySpec) ProtoMessage() {} - -func (*HostSubnet) ProtoMessage() {} - -func (*HostSubnetList) ProtoMessage() {} - -func (*NetNamespace) ProtoMessage() {} - -func (*NetNamespaceList) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/network/v1/legacy.go b/vendor/github.com/openshift/api/network/v1/legacy.go deleted file mode 100644 index 4395ebf8e..000000000 --- a/vendor/github.com/openshift/api/network/v1/legacy.go +++ /dev/null @@ -1,27 +0,0 @@ -package v1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &ClusterNetwork{}, - &ClusterNetworkList{}, - &HostSubnet{}, - &HostSubnetList{}, - &NetNamespace{}, - &NetNamespaceList{}, - &EgressNetworkPolicy{}, - &EgressNetworkPolicyList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/network/v1/register.go b/vendor/github.com/openshift/api/network/v1/register.go deleted file mode 100644 index 80defa764..000000000 --- a/vendor/github.com/openshift/api/network/v1/register.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "network.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ClusterNetwork{}, - &ClusterNetworkList{}, - &HostSubnet{}, - &HostSubnetList{}, - &NetNamespace{}, - &NetNamespaceList{}, - &EgressNetworkPolicy{}, - &EgressNetworkPolicyList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/network/v1/types.go b/vendor/github.com/openshift/api/network/v1/types.go deleted file mode 100644 index 779080213..000000000 --- a/vendor/github.com/openshift/api/network/v1/types.go +++ /dev/null @@ -1,312 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -const ( - ClusterNetworkDefault = "default" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterNetwork was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusternetworks,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=001 -// +kubebuilder:printcolumn:name="Cluster Network",type=string,JSONPath=.network,description="The primary cluster network CIDR" -// +kubebuilder:printcolumn:name="Service Network",type=string,JSONPath=.serviceNetwork,description="The service network CIDR" -// +kubebuilder:printcolumn:name="Plugin Name",type=string,JSONPath=.pluginName,description="The OpenShift SDN network plug-in in use" -// +openshift:compatibility-gen:level=1 -type ClusterNetwork struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // network is a CIDR string specifying the global overlay network's L3 space - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - Network string `json:"network,omitempty" protobuf:"bytes,2,opt,name=network"` - - // hostsubnetlength is the number of bits of network to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods - // +kubebuilder:validation:Minimum=2 - // +kubebuilder:validation:Maximum=30 - HostSubnetLength uint32 `json:"hostsubnetlength,omitempty" protobuf:"varint,3,opt,name=hostsubnetlength"` - - // serviceNetwork is the CIDR range that Service IP addresses are allocated from - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - ServiceNetwork string `json:"serviceNetwork" protobuf:"bytes,4,opt,name=serviceNetwork"` - - // pluginName is the name of the network plugin being used - PluginName string `json:"pluginName,omitempty" protobuf:"bytes,5,opt,name=pluginName"` - - // clusterNetworks is a list of ClusterNetwork objects that defines the global overlay network's L3 space by specifying a set of CIDR and netmasks that the SDN can allocate addresses from. - ClusterNetworks []ClusterNetworkEntry `json:"clusterNetworks" protobuf:"bytes,6,rep,name=clusterNetworks"` - - // vxlanPort sets the VXLAN destination port used by the cluster. - // It is set by the master configuration file on startup and cannot be edited manually. - // Valid values for VXLANPort are integers 1-65535 inclusive and if unset defaults to 4789. - // Changing VXLANPort allows users to resolve issues between openshift SDN and other software trying to use the same VXLAN destination port. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +optional - VXLANPort *uint32 `json:"vxlanPort,omitempty" protobuf:"varint,7,opt,name=vxlanPort"` - - // mtu is the MTU for the overlay network. This should be 50 less than the MTU of the network connecting the nodes. It is normally autodetected by the cluster network operator. - // +kubebuilder:validation:Minimum=576 - // +kubebuilder:validation:Maximum=65536 - // +optional - MTU *uint32 `json:"mtu,omitempty" protobuf:"varint,8,opt,name=mtu"` -} - -// ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips. -type ClusterNetworkEntry struct { - // CIDR defines the total range of a cluster networks address space. - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - CIDR string `json:"CIDR" protobuf:"bytes,1,opt,name=cidr"` - - // hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods. - // +kubebuilder:validation:Minimum=2 - // +kubebuilder:validation:Maximum=30 - HostSubnetLength uint32 `json:"hostSubnetLength" protobuf:"varint,2,opt,name=hostSubnetLength"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterNetworkList is a collection of ClusterNetworks -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterNetworkList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of cluster networks - Items []ClusterNetwork `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// HostSubnetEgressIP represents one egress IP address currently hosted on the node represented by -// HostSubnet -// +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$` -type HostSubnetEgressIP string - -// HostSubnetEgressCIDR represents one egress CIDR from which to assign IP addresses for this node -// represented by the HostSubnet -// +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` -type HostSubnetEgressCIDR string - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// HostSubnet was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=hostsubnets,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=002 -// +kubebuilder:printcolumn:name="Host",type=string,JSONPath=.host,description="The name of the node" -// +kubebuilder:printcolumn:name="Host IP",type=string,JSONPath=.hostIP,description="The IP address to be used as a VTEP by other nodes in the overlay network" -// +kubebuilder:printcolumn:name="Subnet",type=string,JSONPath=.subnet,description="The CIDR range of the overlay network assigned to the node for its pods" -// +kubebuilder:printcolumn:name="Egress CIDRs",type=string,JSONPath=.egressCIDRs,description="The network egress CIDRs" -// +kubebuilder:printcolumn:name="Egress IPs",type=string,JSONPath=.egressIPs,description="The network egress IP addresses" -// +openshift:compatibility-gen:level=1 -type HostSubnet struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // host is the name of the node. (This is the same as the object's name, but both fields must be set.) - // +kubebuilder:validation:Pattern=`^[a-z0-9.-]+$` - Host string `json:"host" protobuf:"bytes,2,opt,name=host"` - - // hostIP is the IP address to be used as a VTEP by other nodes in the overlay network - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$` - HostIP string `json:"hostIP" protobuf:"bytes,3,opt,name=hostIP"` - - // subnet is the CIDR range of the overlay network assigned to the node for its pods - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - Subnet string `json:"subnet" protobuf:"bytes,4,opt,name=subnet"` - - // egressIPs is the list of automatic egress IP addresses currently hosted by this node. - // If EgressCIDRs is empty, this can be set by hand; if EgressCIDRs is set then the - // master will overwrite the value here with its own allocation of egress IPs. - // +optional - EgressIPs []HostSubnetEgressIP `json:"egressIPs,omitempty" protobuf:"bytes,5,rep,name=egressIPs"` - - // egressCIDRs is the list of CIDR ranges available for automatically assigning - // egress IPs to this node from. If this field is set then EgressIPs should be - // treated as read-only. - // +optional - EgressCIDRs []HostSubnetEgressCIDR `json:"egressCIDRs,omitempty" protobuf:"bytes,6,rep,name=egressCIDRs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// HostSubnetList is a collection of HostSubnets -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type HostSubnetList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of host subnets - Items []HostSubnet `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// NetNamespaceEgressIP is a single egress IP out of a list of reserved IPs used as source of external traffic coming -// from pods in this namespace -// +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])$` -type NetNamespaceEgressIP string - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NetNamespace was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=netnamespaces,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=003 -// +kubebuilder:printcolumn:name="NetID",type=integer,JSONPath=.netid,description="The network identifier of the network namespace" -// +kubebuilder:printcolumn:name="Egress IPs",type=string,JSONPath=.egressIPs,description="The network egress IP addresses" -// +openshift:compatibility-gen:level=1 -type NetNamespace struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // netname is the name of the network namespace. (This is the same as the object's name, but both fields must be set.) - // +kubebuilder:validation:Pattern=`^[a-z0-9.-]+$` - NetName string `json:"netname" protobuf:"bytes,2,opt,name=netname"` - - // netid is the network identifier of the network namespace assigned to each overlay network packet. This can be manipulated with the "oc adm pod-network" commands. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=16777215 - NetID uint32 `json:"netid" protobuf:"varint,3,opt,name=netid"` - - // egressIPs is a list of reserved IPs that will be used as the source for external traffic coming from pods in this namespace. - // (If empty, external traffic will be masqueraded to Node IPs.) - // +optional - EgressIPs []NetNamespaceEgressIP `json:"egressIPs,omitempty" protobuf:"bytes,4,rep,name=egressIPs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NetNamespaceList is a collection of NetNamespaces -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type NetNamespaceList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of net namespaces - Items []NetNamespace `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// EgressNetworkPolicyRuleType indicates whether an EgressNetworkPolicyRule allows or denies traffic -// +kubebuilder:validation:Pattern=`^Allow|Deny$` -type EgressNetworkPolicyRuleType string - -const ( - EgressNetworkPolicyRuleAllow EgressNetworkPolicyRuleType = "Allow" - EgressNetworkPolicyRuleDeny EgressNetworkPolicyRuleType = "Deny" -) - -// EgressNetworkPolicyPeer specifies a target to apply egress network policy to -type EgressNetworkPolicyPeer struct { - // cidrSelector is the CIDR range to allow/deny traffic to. If this is set, dnsName must be unset - // Ideally we would have liked to use the cidr openapi format for this property. - // But openshift-sdn only supports v4 while specifying the cidr format allows both v4 and v6 cidrs - // We are therefore using a regex pattern to validate instead. - // +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$` - CIDRSelector string `json:"cidrSelector,omitempty" protobuf:"bytes,1,rep,name=cidrSelector"` - // dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector must be unset - // +kubebuilder:validation:Pattern=`^([A-Za-z0-9-]+\.)*[A-Za-z0-9-]+\.?$` - DNSName string `json:"dnsName,omitempty" protobuf:"bytes,2,rep,name=dnsName"` -} - -// EgressNetworkPolicyRule contains a single egress network policy rule -type EgressNetworkPolicyRule struct { - // type marks this as an "Allow" or "Deny" rule - Type EgressNetworkPolicyRuleType `json:"type" protobuf:"bytes,1,rep,name=type"` - // to is the target that traffic is allowed/denied to - To EgressNetworkPolicyPeer `json:"to" protobuf:"bytes,2,rep,name=to"` -} - -// EgressNetworkPolicySpec provides a list of policies on outgoing network traffic -type EgressNetworkPolicySpec struct { - // egress contains the list of egress policy rules - Egress []EgressNetworkPolicyRule `json:"egress" protobuf:"bytes,1,rep,name=egress"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EgressNetworkPolicy was used by OpenShift SDN. -// DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in -// any way by OpenShift. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=egressnetworkpolicies,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/527 -// +openshift:file-pattern=operatorOrdering=004 -// +openshift:compatibility-gen:level=1 -type EgressNetworkPolicy struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec is the specification of the current egress network policy - Spec EgressNetworkPolicySpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EgressNetworkPolicyList is a collection of EgressNetworkPolicy -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type EgressNetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of policies - Items []EgressNetworkPolicy `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/network/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/network/v1/zz_generated.deepcopy.go deleted file mode 100644 index c24667442..000000000 --- a/vendor/github.com/openshift/api/network/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,347 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *ClusterNetwork) DeepCopyInto(out *ClusterNetwork) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.ClusterNetworks != nil { - in, out := &in.ClusterNetworks, &out.ClusterNetworks - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.VXLANPort != nil { - in, out := &in.VXLANPort, &out.VXLANPort - *out = new(uint32) - **out = **in - } - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetwork. -func (in *ClusterNetwork) DeepCopy() *ClusterNetwork { - if in == nil { - return nil - } - out := new(ClusterNetwork) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterNetwork) 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 *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. -func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { - if in == nil { - return nil - } - out := new(ClusterNetworkEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterNetworkList) DeepCopyInto(out *ClusterNetworkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterNetwork, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkList. -func (in *ClusterNetworkList) DeepCopy() *ClusterNetworkList { - if in == nil { - return nil - } - out := new(ClusterNetworkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterNetworkList) 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 *EgressNetworkPolicy) DeepCopyInto(out *EgressNetworkPolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicy. -func (in *EgressNetworkPolicy) DeepCopy() *EgressNetworkPolicy { - if in == nil { - return nil - } - out := new(EgressNetworkPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EgressNetworkPolicy) 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 *EgressNetworkPolicyList) DeepCopyInto(out *EgressNetworkPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EgressNetworkPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicyList. -func (in *EgressNetworkPolicyList) DeepCopy() *EgressNetworkPolicyList { - if in == nil { - return nil - } - out := new(EgressNetworkPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EgressNetworkPolicyList) 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 *EgressNetworkPolicyPeer) DeepCopyInto(out *EgressNetworkPolicyPeer) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicyPeer. -func (in *EgressNetworkPolicyPeer) DeepCopy() *EgressNetworkPolicyPeer { - if in == nil { - return nil - } - out := new(EgressNetworkPolicyPeer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressNetworkPolicyRule) DeepCopyInto(out *EgressNetworkPolicyRule) { - *out = *in - out.To = in.To - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicyRule. -func (in *EgressNetworkPolicyRule) DeepCopy() *EgressNetworkPolicyRule { - if in == nil { - return nil - } - out := new(EgressNetworkPolicyRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressNetworkPolicySpec) DeepCopyInto(out *EgressNetworkPolicySpec) { - *out = *in - if in.Egress != nil { - in, out := &in.Egress, &out.Egress - *out = make([]EgressNetworkPolicyRule, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressNetworkPolicySpec. -func (in *EgressNetworkPolicySpec) DeepCopy() *EgressNetworkPolicySpec { - if in == nil { - return nil - } - out := new(EgressNetworkPolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostSubnet) DeepCopyInto(out *HostSubnet) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.EgressIPs != nil { - in, out := &in.EgressIPs, &out.EgressIPs - *out = make([]HostSubnetEgressIP, len(*in)) - copy(*out, *in) - } - if in.EgressCIDRs != nil { - in, out := &in.EgressCIDRs, &out.EgressCIDRs - *out = make([]HostSubnetEgressCIDR, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSubnet. -func (in *HostSubnet) DeepCopy() *HostSubnet { - if in == nil { - return nil - } - out := new(HostSubnet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HostSubnet) 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 *HostSubnetList) DeepCopyInto(out *HostSubnetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]HostSubnet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostSubnetList. -func (in *HostSubnetList) DeepCopy() *HostSubnetList { - if in == nil { - return nil - } - out := new(HostSubnetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HostSubnetList) 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 *NetNamespace) DeepCopyInto(out *NetNamespace) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.EgressIPs != nil { - in, out := &in.EgressIPs, &out.EgressIPs - *out = make([]NetNamespaceEgressIP, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetNamespace. -func (in *NetNamespace) DeepCopy() *NetNamespace { - if in == nil { - return nil - } - out := new(NetNamespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NetNamespace) 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 *NetNamespaceList) DeepCopyInto(out *NetNamespaceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]NetNamespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetNamespaceList. -func (in *NetNamespaceList) DeepCopy() *NetNamespaceList { - if in == nil { - return nil - } - out := new(NetNamespaceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NetNamespaceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/openshift/api/network/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/network/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 2f32210d2..000000000 --- a/vendor/github.com/openshift/api/network/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,126 +0,0 @@ -clusternetworks.network.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/527 - CRDName: clusternetworks.network.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "001" - FilenameRunLevel: "" - GroupName: network.openshift.io - HasStatus: false - KindName: ClusterNetwork - Labels: {} - PluralName: clusternetworks - PrinterColumns: - - description: The primary cluster network CIDR - jsonPath: .network - name: Cluster Network - type: string - - description: The service network CIDR - jsonPath: .serviceNetwork - name: Service Network - type: string - - description: The OpenShift SDN network plug-in in use - jsonPath: .pluginName - name: Plugin Name - type: string - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -egressnetworkpolicies.network.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/527 - CRDName: egressnetworkpolicies.network.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "004" - FilenameRunLevel: "" - GroupName: network.openshift.io - HasStatus: false - KindName: EgressNetworkPolicy - Labels: {} - PluralName: egressnetworkpolicies - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -hostsubnets.network.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/527 - CRDName: hostsubnets.network.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "002" - FilenameRunLevel: "" - GroupName: network.openshift.io - HasStatus: false - KindName: HostSubnet - Labels: {} - PluralName: hostsubnets - PrinterColumns: - - description: The name of the node - jsonPath: .host - name: Host - type: string - - description: The IP address to be used as a VTEP by other nodes in the overlay - network - jsonPath: .hostIP - name: Host IP - type: string - - description: The CIDR range of the overlay network assigned to the node for its - pods - jsonPath: .subnet - name: Subnet - type: string - - description: The network egress CIDRs - jsonPath: .egressCIDRs - name: Egress CIDRs - type: string - - description: The network egress IP addresses - jsonPath: .egressIPs - name: Egress IPs - type: string - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -netnamespaces.network.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/527 - CRDName: netnamespaces.network.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "003" - FilenameRunLevel: "" - GroupName: network.openshift.io - HasStatus: false - KindName: NetNamespace - Labels: {} - PluralName: netnamespaces - PrinterColumns: - - description: The network identifier of the network namespace - jsonPath: .netid - name: NetID - type: integer - - description: The network egress IP addresses - jsonPath: .egressIPs - name: Egress IPs - type: string - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/network/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/network/v1/zz_generated.model_name.go deleted file mode 100644 index 20c508905..000000000 --- a/vendor/github.com/openshift/api/network/v1/zz_generated.model_name.go +++ /dev/null @@ -1,66 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetwork) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.ClusterNetwork" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetworkEntry) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.ClusterNetworkEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetworkList) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.ClusterNetworkList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressNetworkPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.EgressNetworkPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressNetworkPolicyList) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.EgressNetworkPolicyList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressNetworkPolicyPeer) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.EgressNetworkPolicyPeer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressNetworkPolicyRule) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.EgressNetworkPolicyRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressNetworkPolicySpec) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.EgressNetworkPolicySpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HostSubnet) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.HostSubnet" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HostSubnetList) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.HostSubnetList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetNamespace) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.NetNamespace" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetNamespaceList) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1.NetNamespaceList" -} diff --git a/vendor/github.com/openshift/api/network/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/network/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index a0e124096..000000000 --- a/vendor/github.com/openshift/api/network/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,145 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_ClusterNetwork = map[string]string{ - "": "ClusterNetwork was used by OpenShift SDN. DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in any way by OpenShift.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "network": "network is a CIDR string specifying the global overlay network's L3 space", - "hostsubnetlength": "hostsubnetlength is the number of bits of network to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods", - "serviceNetwork": "serviceNetwork is the CIDR range that Service IP addresses are allocated from", - "pluginName": "pluginName is the name of the network plugin being used", - "clusterNetworks": "clusterNetworks is a list of ClusterNetwork objects that defines the global overlay network's L3 space by specifying a set of CIDR and netmasks that the SDN can allocate addresses from.", - "vxlanPort": "vxlanPort sets the VXLAN destination port used by the cluster. It is set by the master configuration file on startup and cannot be edited manually. Valid values for VXLANPort are integers 1-65535 inclusive and if unset defaults to 4789. Changing VXLANPort allows users to resolve issues between openshift SDN and other software trying to use the same VXLAN destination port.", - "mtu": "mtu is the MTU for the overlay network. This should be 50 less than the MTU of the network connecting the nodes. It is normally autodetected by the cluster network operator.", -} - -func (ClusterNetwork) SwaggerDoc() map[string]string { - return map_ClusterNetwork -} - -var map_ClusterNetworkEntry = map[string]string{ - "": "ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips.", - "CIDR": "CIDR defines the total range of a cluster networks address space.", - "hostSubnetLength": "hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pods.", -} - -func (ClusterNetworkEntry) SwaggerDoc() map[string]string { - return map_ClusterNetworkEntry -} - -var map_ClusterNetworkList = map[string]string{ - "": "ClusterNetworkList is a collection of ClusterNetworks\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of cluster networks", -} - -func (ClusterNetworkList) SwaggerDoc() map[string]string { - return map_ClusterNetworkList -} - -var map_EgressNetworkPolicy = map[string]string{ - "": "EgressNetworkPolicy was used by OpenShift SDN. DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in any way by OpenShift.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the current egress network policy", -} - -func (EgressNetworkPolicy) SwaggerDoc() map[string]string { - return map_EgressNetworkPolicy -} - -var map_EgressNetworkPolicyList = map[string]string{ - "": "EgressNetworkPolicyList is a collection of EgressNetworkPolicy\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of policies", -} - -func (EgressNetworkPolicyList) SwaggerDoc() map[string]string { - return map_EgressNetworkPolicyList -} - -var map_EgressNetworkPolicyPeer = map[string]string{ - "": "EgressNetworkPolicyPeer specifies a target to apply egress network policy to", - "cidrSelector": "cidrSelector is the CIDR range to allow/deny traffic to. If this is set, dnsName must be unset Ideally we would have liked to use the cidr openapi format for this property. But openshift-sdn only supports v4 while specifying the cidr format allows both v4 and v6 cidrs We are therefore using a regex pattern to validate instead.", - "dnsName": "dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector must be unset", -} - -func (EgressNetworkPolicyPeer) SwaggerDoc() map[string]string { - return map_EgressNetworkPolicyPeer -} - -var map_EgressNetworkPolicyRule = map[string]string{ - "": "EgressNetworkPolicyRule contains a single egress network policy rule", - "type": "type marks this as an \"Allow\" or \"Deny\" rule", - "to": "to is the target that traffic is allowed/denied to", -} - -func (EgressNetworkPolicyRule) SwaggerDoc() map[string]string { - return map_EgressNetworkPolicyRule -} - -var map_EgressNetworkPolicySpec = map[string]string{ - "": "EgressNetworkPolicySpec provides a list of policies on outgoing network traffic", - "egress": "egress contains the list of egress policy rules", -} - -func (EgressNetworkPolicySpec) SwaggerDoc() map[string]string { - return map_EgressNetworkPolicySpec -} - -var map_HostSubnet = map[string]string{ - "": "HostSubnet was used by OpenShift SDN. DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in any way by OpenShift.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "host": "host is the name of the node. (This is the same as the object's name, but both fields must be set.)", - "hostIP": "hostIP is the IP address to be used as a VTEP by other nodes in the overlay network", - "subnet": "subnet is the CIDR range of the overlay network assigned to the node for its pods", - "egressIPs": "egressIPs is the list of automatic egress IP addresses currently hosted by this node. If EgressCIDRs is empty, this can be set by hand; if EgressCIDRs is set then the master will overwrite the value here with its own allocation of egress IPs.", - "egressCIDRs": "egressCIDRs is the list of CIDR ranges available for automatically assigning egress IPs to this node from. If this field is set then EgressIPs should be treated as read-only.", -} - -func (HostSubnet) SwaggerDoc() map[string]string { - return map_HostSubnet -} - -var map_HostSubnetList = map[string]string{ - "": "HostSubnetList is a collection of HostSubnets\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of host subnets", -} - -func (HostSubnetList) SwaggerDoc() map[string]string { - return map_HostSubnetList -} - -var map_NetNamespace = map[string]string{ - "": "NetNamespace was used by OpenShift SDN. DEPRECATED: OpenShift SDN is no longer supported and this object is no longer used in any way by OpenShift.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "netname": "netname is the name of the network namespace. (This is the same as the object's name, but both fields must be set.)", - "netid": "netid is the network identifier of the network namespace assigned to each overlay network packet. This can be manipulated with the \"oc adm pod-network\" commands.", - "egressIPs": "egressIPs is a list of reserved IPs that will be used as the source for external traffic coming from pods in this namespace. (If empty, external traffic will be masqueraded to Node IPs.)", -} - -func (NetNamespace) SwaggerDoc() map[string]string { - return map_NetNamespace -} - -var map_NetNamespaceList = map[string]string{ - "": "NetNamespaceList is a collection of NetNamespaces\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of net namespaces", -} - -func (NetNamespaceList) SwaggerDoc() map[string]string { - return map_NetNamespaceList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/network/v1alpha1/Makefile b/vendor/github.com/openshift/api/network/v1alpha1/Makefile deleted file mode 100644 index 376fee2dc..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="network.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/network/v1alpha1/doc.go b/vendor/github.com/openshift/api/network/v1alpha1/doc.go deleted file mode 100644 index c02bccc31..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.network.v1alpha1 - -// +groupName=network.openshift.io -package v1alpha1 diff --git a/vendor/github.com/openshift/api/network/v1alpha1/register.go b/vendor/github.com/openshift/api/network/v1alpha1/register.go deleted file mode 100644 index 6d80c234b..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1alpha1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "network.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &DNSNameResolver{}, - &DNSNameResolverList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/network/v1alpha1/types_dnsnameresolver.go b/vendor/github.com/openshift/api/network/v1alpha1/types_dnsnameresolver.go deleted file mode 100644 index cd0d1b31a..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/types_dnsnameresolver.go +++ /dev/null @@ -1,142 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=dnsnameresolvers,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1524 -// +openshift:file-pattern=cvoRunLevel=0000_70,operatorName=dns,operatorOrdering=00 -// +openshift:compatibility-gen:level=4 -// +openshift:enable:FeatureGate=DNSNameResolver - -// DNSNameResolver stores the DNS name resolution information of a DNS name. It can be enabled by the TechPreviewNoUpgrade feature set. -// It can also be enabled by the feature gate DNSNameResolver when using CustomNoUpgrade feature set. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type DNSNameResolver struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired behavior of the DNSNameResolver. - // +required - Spec DNSNameResolverSpec `json:"spec"` - // status is the most recently observed status of the DNSNameResolver. - // +optional - Status DNSNameResolverStatus `json:"status,omitempty"` -} - -// DNSName is used for validation of a DNS name. -// +kubebuilder:validation:Pattern=`^(\*\.)?([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?\.){2,}$` -// +kubebuilder:validation:MaxLength=254 -type DNSName string - -// DNSNameResolverSpec is a desired state description of DNSNameResolver. -type DNSNameResolverSpec struct { - // name is the DNS name for which the DNS name resolution information will be stored. - // For a regular DNS name, only the DNS name resolution information of the regular DNS - // name will be stored. For a wildcard DNS name, the DNS name resolution information - // of all the DNS names that match the wildcard DNS name will be stored. - // For a wildcard DNS name, the '*' will match only one label. Additionally, only a single - // '*' can be used at the beginning of the wildcard DNS name. For example, '*.example.com.' - // will match 'sub1.example.com.' but won't match 'sub2.sub1.example.com.' - // +required - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="spec.name is immutable" - Name DNSName `json:"name"` -} - -// DNSNameResolverStatus defines the observed status of DNSNameResolver. -type DNSNameResolverStatus struct { - // resolvedNames contains a list of matching DNS names and their corresponding IP addresses - // along with their TTL and last DNS lookup times. - // +listType=map - // +listMapKey=dnsName - // +patchMergeKey=dnsName - // +patchStrategy=merge - // +optional - ResolvedNames []DNSNameResolverResolvedName `json:"resolvedNames,omitempty" patchStrategy:"merge" patchMergeKey:"dnsName"` -} - -// DNSNameResolverResolvedName describes the details of a resolved DNS name. -type DNSNameResolverResolvedName struct { - // conditions provide information about the state of the DNS name. - // Known .status.conditions.type is: "Degraded". - // "Degraded" is true when the last resolution failed for the DNS name, - // and false otherwise. - // +optional - // +listType=map - // +listMapKey=type - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // dnsName is the resolved DNS name matching the name field of DNSNameResolverSpec. This field can - // store both regular and wildcard DNS names which match the spec.name field. When the spec.name - // field contains a regular DNS name, this field will store the same regular DNS name after it is - // successfully resolved. When the spec.name field contains a wildcard DNS name, each resolvedName.dnsName - // will store the regular DNS names which match the wildcard DNS name and have been successfully resolved. - // If the wildcard DNS name can also be successfully resolved, then this field will store the wildcard - // DNS name as well. - // +required - DNSName DNSName `json:"dnsName"` - - // resolvedAddresses gives the list of associated IP addresses and their corresponding TTLs and last - // lookup times for the dnsName. - // +required - // +listType=map - // +listMapKey=ip - ResolvedAddresses []DNSNameResolverResolvedAddress `json:"resolvedAddresses"` - - // resolutionFailures keeps the count of how many consecutive times the DNS resolution failed - // for the dnsName. If the DNS resolution succeeds then the field will be set to zero. Upon - // every failure, the value of the field will be incremented by one. The details about the DNS - // name will be removed, if the value of resolutionFailures reaches 5 and the TTL of all the - // associated IP addresses have expired. - ResolutionFailures int32 `json:"resolutionFailures,omitempty"` -} - -// DNSNameResolverResolvedAddress describes the details of an IP address for a resolved DNS name. -type DNSNameResolverResolvedAddress struct { - // ip is an IP address associated with the dnsName. The validity of the IP address expires after - // lastLookupTime + ttlSeconds. To refresh the information, a DNS lookup will be performed upon - // the expiration of the IP address's validity. If the information is not refreshed then it will - // be removed with a grace period after the expiration of the IP address's validity. - // +required - IP string `json:"ip"` - - // ttlSeconds is the time-to-live value of the IP address. The validity of the IP address expires after - // lastLookupTime + ttlSeconds. On a successful DNS lookup the value of this field will be updated with - // the current time-to-live value. If the information is not refreshed then it will be removed with a - // grace period after the expiration of the IP address's validity. - // +required - TTLSeconds int32 `json:"ttlSeconds"` - - // lastLookupTime is the timestamp when the last DNS lookup was completed successfully. The validity of - // the IP address expires after lastLookupTime + ttlSeconds. The value of this field will be updated to - // the current time on a successful DNS lookup. If the information is not refreshed then it will be - // removed with a grace period after the expiration of the IP address's validity. - // +required - LastLookupTime *metav1.Time `json:"lastLookupTime"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +openshift:compatibility-gen:level=4 - -// DNSNameResolverList contains a list of DNSNameResolvers. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type DNSNameResolverList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items gives the list of DNSNameResolvers. - Items []DNSNameResolver `json:"items"` -} diff --git a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index e04794e15..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,161 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *DNSNameResolver) DeepCopyInto(out *DNSNameResolver) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolver. -func (in *DNSNameResolver) DeepCopy() *DNSNameResolver { - if in == nil { - return nil - } - out := new(DNSNameResolver) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNSNameResolver) 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 *DNSNameResolverList) DeepCopyInto(out *DNSNameResolverList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DNSNameResolver, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolverList. -func (in *DNSNameResolverList) DeepCopy() *DNSNameResolverList { - if in == nil { - return nil - } - out := new(DNSNameResolverList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNSNameResolverList) 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 *DNSNameResolverResolvedAddress) DeepCopyInto(out *DNSNameResolverResolvedAddress) { - *out = *in - if in.LastLookupTime != nil { - in, out := &in.LastLookupTime, &out.LastLookupTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolverResolvedAddress. -func (in *DNSNameResolverResolvedAddress) DeepCopy() *DNSNameResolverResolvedAddress { - if in == nil { - return nil - } - out := new(DNSNameResolverResolvedAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSNameResolverResolvedName) DeepCopyInto(out *DNSNameResolverResolvedName) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.ResolvedAddresses != nil { - in, out := &in.ResolvedAddresses, &out.ResolvedAddresses - *out = make([]DNSNameResolverResolvedAddress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolverResolvedName. -func (in *DNSNameResolverResolvedName) DeepCopy() *DNSNameResolverResolvedName { - if in == nil { - return nil - } - out := new(DNSNameResolverResolvedName) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSNameResolverSpec) DeepCopyInto(out *DNSNameResolverSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolverSpec. -func (in *DNSNameResolverSpec) DeepCopy() *DNSNameResolverSpec { - if in == nil { - return nil - } - out := new(DNSNameResolverSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSNameResolverStatus) DeepCopyInto(out *DNSNameResolverStatus) { - *out = *in - if in.ResolvedNames != nil { - in, out := &in.ResolvedNames, &out.ResolvedNames - *out = make([]DNSNameResolverResolvedName, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNameResolverStatus. -func (in *DNSNameResolverStatus) DeepCopy() *DNSNameResolverStatus { - if in == nil { - return nil - } - out := new(DNSNameResolverStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 0070eb584..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -dnsnameresolvers.network.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1524 - CRDName: dnsnameresolvers.network.openshift.io - Capability: "" - Category: "" - FeatureGates: - - DNSNameResolver - FilenameOperatorName: dns - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_70" - GroupName: network.openshift.io - HasStatus: true - KindName: DNSNameResolver - Labels: {} - PluralName: dnsnameresolvers - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: - - DNSNameResolver - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 6a6748328..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,36 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolver) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolver" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolverList) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolverList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolverResolvedAddress) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolverResolvedAddress" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolverResolvedName) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolverResolvedName" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolverSpec) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolverSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNameResolverStatus) OpenAPIModelName() string { - return "com.github.openshift.api.network.v1alpha1.DNSNameResolverStatus" -} diff --git a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index e5018a973..000000000 --- a/vendor/github.com/openshift/api/network/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,76 +0,0 @@ -package v1alpha1 - -// 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_DNSNameResolver = map[string]string{ - "": "DNSNameResolver stores the DNS name resolution information of a DNS name. It can be enabled by the TechPreviewNoUpgrade feature set. It can also be enabled by the feature gate DNSNameResolver when using CustomNoUpgrade feature set.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the DNSNameResolver.", - "status": "status is the most recently observed status of the DNSNameResolver.", -} - -func (DNSNameResolver) SwaggerDoc() map[string]string { - return map_DNSNameResolver -} - -var map_DNSNameResolverList = map[string]string{ - "": "DNSNameResolverList contains a list of DNSNameResolvers.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items gives the list of DNSNameResolvers.", -} - -func (DNSNameResolverList) SwaggerDoc() map[string]string { - return map_DNSNameResolverList -} - -var map_DNSNameResolverResolvedAddress = map[string]string{ - "": "DNSNameResolverResolvedAddress describes the details of an IP address for a resolved DNS name.", - "ip": "ip is an IP address associated with the dnsName. The validity of the IP address expires after lastLookupTime + ttlSeconds. To refresh the information, a DNS lookup will be performed upon the expiration of the IP address's validity. If the information is not refreshed then it will be removed with a grace period after the expiration of the IP address's validity.", - "ttlSeconds": "ttlSeconds is the time-to-live value of the IP address. The validity of the IP address expires after lastLookupTime + ttlSeconds. On a successful DNS lookup the value of this field will be updated with the current time-to-live value. If the information is not refreshed then it will be removed with a grace period after the expiration of the IP address's validity.", - "lastLookupTime": "lastLookupTime is the timestamp when the last DNS lookup was completed successfully. The validity of the IP address expires after lastLookupTime + ttlSeconds. The value of this field will be updated to the current time on a successful DNS lookup. If the information is not refreshed then it will be removed with a grace period after the expiration of the IP address's validity.", -} - -func (DNSNameResolverResolvedAddress) SwaggerDoc() map[string]string { - return map_DNSNameResolverResolvedAddress -} - -var map_DNSNameResolverResolvedName = map[string]string{ - "": "DNSNameResolverResolvedName describes the details of a resolved DNS name.", - "conditions": "conditions provide information about the state of the DNS name. Known .status.conditions.type is: \"Degraded\". \"Degraded\" is true when the last resolution failed for the DNS name, and false otherwise.", - "dnsName": "dnsName is the resolved DNS name matching the name field of DNSNameResolverSpec. This field can store both regular and wildcard DNS names which match the spec.name field. When the spec.name field contains a regular DNS name, this field will store the same regular DNS name after it is successfully resolved. When the spec.name field contains a wildcard DNS name, each resolvedName.dnsName will store the regular DNS names which match the wildcard DNS name and have been successfully resolved. If the wildcard DNS name can also be successfully resolved, then this field will store the wildcard DNS name as well.", - "resolvedAddresses": "resolvedAddresses gives the list of associated IP addresses and their corresponding TTLs and last lookup times for the dnsName.", - "resolutionFailures": "resolutionFailures keeps the count of how many consecutive times the DNS resolution failed for the dnsName. If the DNS resolution succeeds then the field will be set to zero. Upon every failure, the value of the field will be incremented by one. The details about the DNS name will be removed, if the value of resolutionFailures reaches 5 and the TTL of all the associated IP addresses have expired.", -} - -func (DNSNameResolverResolvedName) SwaggerDoc() map[string]string { - return map_DNSNameResolverResolvedName -} - -var map_DNSNameResolverSpec = map[string]string{ - "": "DNSNameResolverSpec is a desired state description of DNSNameResolver.", - "name": "name is the DNS name for which the DNS name resolution information will be stored. For a regular DNS name, only the DNS name resolution information of the regular DNS name will be stored. For a wildcard DNS name, the DNS name resolution information of all the DNS names that match the wildcard DNS name will be stored. For a wildcard DNS name, the '*' will match only one label. Additionally, only a single '*' can be used at the beginning of the wildcard DNS name. For example, '*.example.com.' will match 'sub1.example.com.' but won't match 'sub2.sub1.example.com.'", -} - -func (DNSNameResolverSpec) SwaggerDoc() map[string]string { - return map_DNSNameResolverSpec -} - -var map_DNSNameResolverStatus = map[string]string{ - "": "DNSNameResolverStatus defines the observed status of DNSNameResolver.", - "resolvedNames": "resolvedNames contains a list of matching DNS names and their corresponding IP addresses along with their TTL and last DNS lookup times.", -} - -func (DNSNameResolverStatus) SwaggerDoc() map[string]string { - return map_DNSNameResolverStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/networkoperator/.codegen.yaml b/vendor/github.com/openshift/api/networkoperator/.codegen.yaml deleted file mode 100644 index f10357951..000000000 --- a/vendor/github.com/openshift/api/networkoperator/.codegen.yaml +++ /dev/null @@ -1,4 +0,0 @@ -swaggerdocs: - commentPolicy: Warn -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/networkoperator/OWNERS b/vendor/github.com/openshift/api/networkoperator/OWNERS deleted file mode 100644 index 6148b9f77..000000000 --- a/vendor/github.com/openshift/api/networkoperator/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: - - danwinship - - dcbw - - knobunc - - squeed diff --git a/vendor/github.com/openshift/api/networkoperator/install.go b/vendor/github.com/openshift/api/networkoperator/install.go deleted file mode 100644 index b06383bf4..000000000 --- a/vendor/github.com/openshift/api/networkoperator/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package networkoperator - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - networkoperatorv1 "github.com/openshift/api/networkoperator/v1" -) - -const ( - GroupName = "network.operator.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(networkoperatorv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/Makefile b/vendor/github.com/openshift/api/networkoperator/v1/Makefile deleted file mode 100644 index 96c9e1639..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="network.operator.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/networkoperator/v1/doc.go b/vendor/github.com/openshift/api/networkoperator/v1/doc.go deleted file mode 100644 index e49a8969c..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Package v1 contains API Schema definitions for the network v1 API group -// +k8s:deepcopy-gen=package,register -// +k8s:openapi-model-package=com.github.openshift.api.networkoperator.v1 -// +groupName=network.operator.openshift.io -// +kubebuilder:validation:Optional -package v1 diff --git a/vendor/github.com/openshift/api/networkoperator/v1/generated.pb.go b/vendor/github.com/openshift/api/networkoperator/v1/generated.pb.go deleted file mode 100644 index 624e41489..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/generated.pb.go +++ /dev/null @@ -1,2197 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/networkoperator/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *EgressRouter) Reset() { *m = EgressRouter{} } - -func (m *EgressRouterAddress) Reset() { *m = EgressRouterAddress{} } - -func (m *EgressRouterInterface) Reset() { *m = EgressRouterInterface{} } - -func (m *EgressRouterList) Reset() { *m = EgressRouterList{} } - -func (m *EgressRouterSpec) Reset() { *m = EgressRouterSpec{} } - -func (m *EgressRouterStatus) Reset() { *m = EgressRouterStatus{} } - -func (m *EgressRouterStatusCondition) Reset() { *m = EgressRouterStatusCondition{} } - -func (m *L4RedirectRule) Reset() { *m = L4RedirectRule{} } - -func (m *MacvlanConfig) Reset() { *m = MacvlanConfig{} } - -func (m *RedirectConfig) Reset() { *m = RedirectConfig{} } - -func (m *EgressRouter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressRouterAddress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterAddress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterAddress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Gateway) - copy(dAtA[i:], m.Gateway) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Gateway))) - i-- - dAtA[i] = 0x12 - i -= len(m.IP) - copy(dAtA[i:], m.IP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.IP))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressRouterInterface) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterInterface) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterInterface) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Macvlan.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressRouterList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressRouterSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Addresses) > 0 { - for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Addresses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.NetworkInterface.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if m.Redirect != nil { - { - size, err := m.Redirect.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *EgressRouterStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *EgressRouterStatusCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *EgressRouterStatusCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *EgressRouterStatusCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *L4RedirectRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *L4RedirectRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *L4RedirectRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.TargetPort)) - i-- - dAtA[i] = 0x20 - i -= len(m.Protocol) - copy(dAtA[i:], m.Protocol) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Protocol))) - i-- - dAtA[i] = 0x1a - i = encodeVarintGenerated(dAtA, i, uint64(m.Port)) - i-- - dAtA[i] = 0x10 - i -= len(m.DestinationIP) - copy(dAtA[i:], m.DestinationIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationIP))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *MacvlanConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *MacvlanConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MacvlanConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Master) - copy(dAtA[i:], m.Master) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Master))) - i-- - dAtA[i] = 0x12 - i -= len(m.Mode) - copy(dAtA[i:], m.Mode) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Mode))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RedirectConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedirectConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedirectConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.FallbackIP) - copy(dAtA[i:], m.FallbackIP) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FallbackIP))) - i-- - dAtA[i] = 0x12 - if len(m.RedirectRules) > 0 { - for iNdEx := len(m.RedirectRules) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RedirectRules[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *EgressRouter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressRouterAddress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.IP) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Gateway) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressRouterInterface) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Macvlan.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *EgressRouterList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EgressRouterSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Mode) - n += 1 + l + sovGenerated(uint64(l)) - if m.Redirect != nil { - l = m.Redirect.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = m.NetworkInterface.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Addresses) > 0 { - for _, e := range m.Addresses { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EgressRouterStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *EgressRouterStatusCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *L4RedirectRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DestinationIP) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Port)) - l = len(m.Protocol) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.TargetPort)) - return n -} - -func (m *MacvlanConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Mode) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Master) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RedirectConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.RedirectRules) > 0 { - for _, e := range m.RedirectRules { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.FallbackIP) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *EgressRouter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressRouter{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "EgressRouterSpec", "EgressRouterSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "EgressRouterStatus", "EgressRouterStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterAddress) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressRouterAddress{`, - `IP:` + fmt.Sprintf("%v", this.IP) + `,`, - `Gateway:` + fmt.Sprintf("%v", this.Gateway) + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterInterface) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressRouterInterface{`, - `Macvlan:` + strings.Replace(strings.Replace(this.Macvlan.String(), "MacvlanConfig", "MacvlanConfig", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]EgressRouter{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "EgressRouter", "EgressRouter", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&EgressRouterList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForAddresses := "[]EgressRouterAddress{" - for _, f := range this.Addresses { - repeatedStringForAddresses += strings.Replace(strings.Replace(f.String(), "EgressRouterAddress", "EgressRouterAddress", 1), `&`, ``, 1) + "," - } - repeatedStringForAddresses += "}" - s := strings.Join([]string{`&EgressRouterSpec{`, - `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, - `Redirect:` + strings.Replace(this.Redirect.String(), "RedirectConfig", "RedirectConfig", 1) + `,`, - `NetworkInterface:` + strings.Replace(strings.Replace(this.NetworkInterface.String(), "EgressRouterInterface", "EgressRouterInterface", 1), `&`, ``, 1) + `,`, - `Addresses:` + repeatedStringForAddresses + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]EgressRouterStatusCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "EgressRouterStatusCondition", "EgressRouterStatusCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&EgressRouterStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *EgressRouterStatusCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EgressRouterStatusCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *L4RedirectRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&L4RedirectRule{`, - `DestinationIP:` + fmt.Sprintf("%v", this.DestinationIP) + `,`, - `Port:` + fmt.Sprintf("%v", this.Port) + `,`, - `Protocol:` + fmt.Sprintf("%v", this.Protocol) + `,`, - `TargetPort:` + fmt.Sprintf("%v", this.TargetPort) + `,`, - `}`, - }, "") - return s -} -func (this *MacvlanConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&MacvlanConfig{`, - `Mode:` + fmt.Sprintf("%v", this.Mode) + `,`, - `Master:` + fmt.Sprintf("%v", this.Master) + `,`, - `}`, - }, "") - return s -} -func (this *RedirectConfig) String() string { - if this == nil { - return "nil" - } - repeatedStringForRedirectRules := "[]L4RedirectRule{" - for _, f := range this.RedirectRules { - repeatedStringForRedirectRules += strings.Replace(strings.Replace(f.String(), "L4RedirectRule", "L4RedirectRule", 1), `&`, ``, 1) + "," - } - repeatedStringForRedirectRules += "}" - s := strings.Join([]string{`&RedirectConfig{`, - `RedirectRules:` + repeatedStringForRedirectRules + `,`, - `FallbackIP:` + fmt.Sprintf("%v", this.FallbackIP) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *EgressRouter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterAddress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterAddress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterAddress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Gateway", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Gateway = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterInterface) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterInterface: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterInterface: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Macvlan", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Macvlan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, EgressRouter{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mode = EgressRouterMode(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Redirect", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Redirect == nil { - m.Redirect = &RedirectConfig{} - } - if err := m.Redirect.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NetworkInterface", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.NetworkInterface.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Addresses = append(m.Addresses, EgressRouterAddress{}) - if err := m.Addresses[len(m.Addresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, EgressRouterStatusCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *EgressRouterStatusCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: EgressRouterStatusCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: EgressRouterStatusCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = EgressRouterStatusConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *L4RedirectRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: L4RedirectRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: L4RedirectRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - m.Port = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Port |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Protocol = ProtocolType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType) - } - m.TargetPort = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TargetPort |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MacvlanConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MacvlanConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MacvlanConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Mode = MacvlanMode(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Master", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Master = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedirectConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedirectConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedirectConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectRules", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedirectRules = append(m.RedirectRules, L4RedirectRule{}) - if err := m.RedirectRules[len(m.RedirectRules)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FallbackIP", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FallbackIP = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/networkoperator/v1/generated.proto b/vendor/github.com/openshift/api/networkoperator/v1/generated.proto deleted file mode 100644 index c83a2fb17..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/generated.proto +++ /dev/null @@ -1,191 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.networkoperator.v1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/networkoperator/v1"; - -// EgressRouter is a feature allowing the user to define an egress router -// that acts as a bridge between pods and external systems. The egress router runs -// a service that redirects egress traffic originating from a pod or a group of -// pods to a remote external system or multiple destinations as per configuration. -// -// It is consumed by the cluster-network-operator. -// More specifically, given an EgressRouter CR with , the CNO will create and manage: -// - A service called -// - An egress pod called -// - A NAD called -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// EgressRouter is a single egressrouter pod configuration object. -// +k8s:openapi-gen=true -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=egressrouters,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/851 -// +openshift:file-pattern=operatorOrdering=001 -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +kubebuilder:metadata:annotations=include.release.openshift.io/ibm-cloud-managed=true -// +kubebuilder:printcolumn:name="Condition",type=string,JSONPath=".status.conditions[*].type" -// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=".status.conditions[*].status" -message EgressRouter { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Specification of the desired egress router. - // +required - optional EgressRouterSpec spec = 2; - - // Observed status of EgressRouter. - optional EgressRouterStatus status = 3; -} - -// EgressRouterAddress contains a pair of IP CIDR and gateway to be configured on the router's interface -message EgressRouterAddress { - // ip is the address to configure on the router's interface. Can be IPv4 or IPv6. - // +required - optional string ip = 1; - - // IP address of the next-hop gateway, if it cannot be automatically determined. Can be IPv4 or IPv6. - optional string gateway = 2; -} - -// EgressRouterInterface contains the configuration of interface to create/use. -message EgressRouterInterface { - // Arguments specific to the interfaceType macvlan - // +kubebuilder:default:={mode: Bridge} - optional MacvlanConfig macvlan = 1; -} - -// EgressRouterList is the list of egress router pods requested. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message EgressRouterList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated EgressRouter items = 2; -} - -// EgressRouterSpec contains the configuration for an egress router. -// Mode, networkInterface and addresses fields must be specified along with exactly one "Config" that matches the mode. -// Each config consists of parameters specific to that mode. -// +k8s:openapi-gen=true -message EgressRouterSpec { - // mode depicts the mode that is used for the egress router. The default mode is "Redirect" and is the only supported mode currently. - // +required - // +kubebuilder:validation:Enum="Redirect" - // +kubebuilder:default:="Redirect" - optional string mode = 1; - - // redirect represents the configuration parameters specific to redirect mode. - optional RedirectConfig redirect = 2; - - // Specification of interface to create/use. The default is macvlan. - // Currently only macvlan is supported. - // +required - // +kubebuilder:default:={macvlan: {mode: Bridge}} - optional EgressRouterInterface networkInterface = 3; - - // List of IP addresses to configure on the pod's secondary interface. - // +required - repeated EgressRouterAddress addresses = 4; -} - -// EgressRouterStatus contains the observed status of EgressRouter. Read-only. -message EgressRouterStatus { - // Observed status of the egress router - // +required - // +listType=map - // +listMapKey=type - repeated EgressRouterStatusCondition conditions = 1; -} - -// EgressRouterStatusCondition represents the state of the egress router's -// managed and monitored components. -// +k8s:deepcopy-gen=true -message EgressRouterStatusCondition { - // type specifies the aspect reported by this condition; one of Available, Progressing, Degraded - // +kubebuilder:validation:Enum="Available";"Progressing";"Degraded" - // +required - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Enum="True";"False";"Unknown" - // +required - optional string status = 2; - - // lastTransitionTime is the time of the last update to the current status property. - // +required - // +nullable - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is the CamelCase reason for the condition's current status. - optional string reason = 4; - - // message provides additional information about the current condition. - // This is only to be consumed by humans. It may contain Line Feed - // characters (U+000A), which should be rendered as new lines. - optional string message = 5; -} - -// L4RedirectRule defines a DNAT redirection from a given port to a destination IP and port. -message L4RedirectRule { - // IP specifies the remote destination's IP address. Can be IPv4 or IPv6. - // +required - optional string destinationIP = 1; - - // port is the port number to which clients should send traffic to be redirected. - // +required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - optional int32 port = 2; - - // protocol can be TCP, SCTP or UDP. - // +required - // +kubebuilder:validation:Enum="TCP";"UDP";"SCTP" - optional string protocol = 3; - - // targetPort allows specifying the port number on the remote destination to which the traffic gets redirected to. - // If unspecified, the value from "Port" is used. - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - optional int32 targetPort = 4; -} - -// MacvlanConfig consists of arguments specific to the macvlan EgressRouterInterfaceType -message MacvlanConfig { - // mode depicts the mode that is used for the macvlan interface; one of Bridge|Private|VEPA|Passthru. The default mode is "Bridge". - // +required - // +kubebuilder:validation:Enum="Bridge";"Private";"VEPA";"Passthru" - // +kubebuilder:default:="Bridge" - optional string mode = 1; - - // Name of the master interface. Need not be specified if it can be inferred from the IP address. - optional string master = 2; -} - -// RedirectConfig represents the configuration parameters specific to redirect mode. -message RedirectConfig { - // List of L4RedirectRules that define the DNAT redirection from the pod to the destination in redirect mode. - repeated L4RedirectRule redirectRules = 1; - - // fallbackIP specifies the remote destination's IP address. Can be IPv4 or IPv6. - // If no redirect rules are specified, all traffic from the router are redirected to this IP. - // If redirect rules are specified, then any connections on any other port (undefined in the rules) on the router will be redirected to this IP. - // If redirect rules are specified and no fallback IP is provided, connections on other ports will simply be rejected. - optional string fallbackIP = 2; -} - diff --git a/vendor/github.com/openshift/api/networkoperator/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/networkoperator/v1/generated.protomessage.pb.go deleted file mode 100644 index bd7ae6ceb..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*EgressRouter) ProtoMessage() {} - -func (*EgressRouterAddress) ProtoMessage() {} - -func (*EgressRouterInterface) ProtoMessage() {} - -func (*EgressRouterList) ProtoMessage() {} - -func (*EgressRouterSpec) ProtoMessage() {} - -func (*EgressRouterStatus) ProtoMessage() {} - -func (*EgressRouterStatusCondition) ProtoMessage() {} - -func (*L4RedirectRule) ProtoMessage() {} - -func (*MacvlanConfig) ProtoMessage() {} - -func (*RedirectConfig) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/register.go b/vendor/github.com/openshift/api/networkoperator/v1/register.go deleted file mode 100644 index 2fcb8dc0f..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/register.go +++ /dev/null @@ -1,25 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "network.operator.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &EgressRouter{}, - &EgressRouterList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/types_egressrouter.go b/vendor/github.com/openshift/api/networkoperator/v1/types_egressrouter.go deleted file mode 100644 index d5327ffaf..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/types_egressrouter.go +++ /dev/null @@ -1,267 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// EgressRouter is a feature allowing the user to define an egress router -// that acts as a bridge between pods and external systems. The egress router runs -// a service that redirects egress traffic originating from a pod or a group of -// pods to a remote external system or multiple destinations as per configuration. -// -// It is consumed by the cluster-network-operator. -// More specifically, given an EgressRouter CR with , the CNO will create and manage: -// - A service called -// - An egress pod called -// - A NAD called -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// EgressRouter is a single egressrouter pod configuration object. -// +k8s:openapi-gen=true -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=egressrouters,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/851 -// +openshift:file-pattern=operatorOrdering=001 -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +kubebuilder:metadata:annotations=include.release.openshift.io/ibm-cloud-managed=true -// +kubebuilder:printcolumn:name="Condition",type=string,JSONPath=".status.conditions[*].type" -// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=".status.conditions[*].status" -type EgressRouter struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Specification of the desired egress router. - // +required - Spec EgressRouterSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - - // Observed status of EgressRouter. - Status EgressRouterStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// EgressRouterSpec contains the configuration for an egress router. -// Mode, networkInterface and addresses fields must be specified along with exactly one "Config" that matches the mode. -// Each config consists of parameters specific to that mode. -// +k8s:openapi-gen=true -type EgressRouterSpec struct { - // mode depicts the mode that is used for the egress router. The default mode is "Redirect" and is the only supported mode currently. - // +required - // +kubebuilder:validation:Enum="Redirect" - // +kubebuilder:default:="Redirect" - Mode EgressRouterMode `json:"mode" protobuf:"bytes,1,opt,name=mode,casttype=EgressRouterMode"` - - // redirect represents the configuration parameters specific to redirect mode. - Redirect *RedirectConfig `json:"redirect,omitempty" protobuf:"bytes,2,opt,name=redirect"` - - // Specification of interface to create/use. The default is macvlan. - // Currently only macvlan is supported. - // +required - // +kubebuilder:default:={macvlan: {mode: Bridge}} - NetworkInterface EgressRouterInterface `json:"networkInterface" protobuf:"bytes,3,opt,name=networkInterface"` - - // List of IP addresses to configure on the pod's secondary interface. - // +required - Addresses []EgressRouterAddress `json:"addresses" protobuf:"bytes,4,rep,name=addresses"` -} - -// EgressRouterMode defines the different types of modes that are supported for the egress router interface. -// The default mode is "Redirect" and is the only supported mode currently. -type EgressRouterMode string - -const ( - // EgressRouterModeRedirect creates an egress router that sets up iptables rules to redirect traffic - // from its own IP address to one or more remote destination IP addresses. - EgressRouterModeRedirect EgressRouterMode = "Redirect" -) - -// RedirectConfig represents the configuration parameters specific to redirect mode. -type RedirectConfig struct { - // List of L4RedirectRules that define the DNAT redirection from the pod to the destination in redirect mode. - RedirectRules []L4RedirectRule `json:"redirectRules,omitempty" protobuf:"bytes,1,rep,name=redirectRules"` - - // fallbackIP specifies the remote destination's IP address. Can be IPv4 or IPv6. - // If no redirect rules are specified, all traffic from the router are redirected to this IP. - // If redirect rules are specified, then any connections on any other port (undefined in the rules) on the router will be redirected to this IP. - // If redirect rules are specified and no fallback IP is provided, connections on other ports will simply be rejected. - FallbackIP string `json:"fallbackIP,omitempty" protobuf:"bytes,2,opt,name=fallbackIP"` -} - -// L4RedirectRule defines a DNAT redirection from a given port to a destination IP and port. -type L4RedirectRule struct { - // IP specifies the remote destination's IP address. Can be IPv4 or IPv6. - // +required - DestinationIP string `json:"destinationIP" protobuf:"bytes,1,opt,name=destinationIP"` - - // port is the port number to which clients should send traffic to be redirected. - // +required - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - Port int32 `json:"port" protobuf:"varint,2,opt,name=port"` - - // protocol can be TCP, SCTP or UDP. - // +required - // +kubebuilder:validation:Enum="TCP";"UDP";"SCTP" - Protocol ProtocolType `json:"protocol" protobuf:"bytes,3,opt,name=protocol,casttype=ProtocolType"` - - // targetPort allows specifying the port number on the remote destination to which the traffic gets redirected to. - // If unspecified, the value from "Port" is used. - // +kubebuilder:validation:Maximum:=65535 - // +kubebuilder:validation:Minimum:=1 - TargetPort int32 `json:"targetPort,omitempty" protobuf:"varint,4,opt,name=targetPort"` -} - -// ProtocolType defines the protocol types that are supported -type ProtocolType string - -const ( - // ProtocolTypeTCP refers to the TCP protocol - ProtocolTypeTCP ProtocolType = "TCP" - - // ProtocolTypeUDP refers to the UDP protocol - ProtocolTypeUDP ProtocolType = "UDP" - - // ProtocolTypeSCTP refers to the SCTP protocol - ProtocolTypeSCTP ProtocolType = "SCTP" -) - -// EgressRouterInterface contains the configuration of interface to create/use. -type EgressRouterInterface struct { - // Arguments specific to the interfaceType macvlan - // +kubebuilder:default:={mode: Bridge} - Macvlan MacvlanConfig `json:"macvlan" protobuf:"bytes,1,opt,name=macvlan"` -} - -// MacvlanMode defines the different types of modes that are supported for the macvlan interface. -// source: https://man7.org/linux/man-pages/man8/ip-link.8.html -type MacvlanMode string - -const ( - // MacvlanModeBridge connects all endpoints directly to each other, communication is not redirected through the physical interface's peer. - MacvlanModeBridge MacvlanMode = "Bridge" - - // MacvlanModePrivate does not allow communication between macvlan instances on the same physical interface, - // even if the external switch supports hairpin mode. - MacvlanModePrivate MacvlanMode = "Private" - - // MacvlanModeVEPA is the Virtual Ethernet Port Aggregator mode. Data from one macvlan instance to the other on the - // same physical interface is transmitted over the physical interface. Either the attached switch needs - // to support hairpin mode, or there must be a TCP/IP router forwarding the packets in order to allow - // communication. This is the default mode. - MacvlanModeVEPA MacvlanMode = "VEPA" - - // MacvlanModePassthru mode gives more power to a single endpoint, usually in macvtap mode. - // It is not allowed for more than one endpoint on the same physical interface. All traffic will be forwarded - // to this endpoint, allowing virtio guests to change MAC address or set promiscuous mode in order to bridge the - // interface or create vlan interfaces on top of it. - MacvlanModePassthru MacvlanMode = "Passthru" -) - -// MacvlanConfig consists of arguments specific to the macvlan EgressRouterInterfaceType -type MacvlanConfig struct { - // mode depicts the mode that is used for the macvlan interface; one of Bridge|Private|VEPA|Passthru. The default mode is "Bridge". - // +required - // +kubebuilder:validation:Enum="Bridge";"Private";"VEPA";"Passthru" - // +kubebuilder:default:="Bridge" - Mode MacvlanMode `json:"mode" protobuf:"bytes,1,opt,name=mode,casttype=MacvlanMode"` - - // Name of the master interface. Need not be specified if it can be inferred from the IP address. - Master string `json:"master,omitempty" protobuf:"bytes,2,opt,name=master"` -} - -// EgressRouterAddress contains a pair of IP CIDR and gateway to be configured on the router's interface -type EgressRouterAddress struct { - // ip is the address to configure on the router's interface. Can be IPv4 or IPv6. - // +required - IP string `json:"ip" protobuf:"bytes,1,opt,name=ip"` - // IP address of the next-hop gateway, if it cannot be automatically determined. Can be IPv4 or IPv6. - Gateway string `json:"gateway,omitempty" protobuf:"bytes,2,opt,name=gateway"` -} - -// EgressRouterStatusConditionType is an aspect of the router's state. -type EgressRouterStatusConditionType string - -const ( - // EgressRouterAvailable indicates that the EgressRouter (the associated pod, service, NAD), is functional and available in the cluster. - EgressRouterAvailable EgressRouterStatusConditionType = "Available" - - // EgressRouterProgressing indicates that the router is actively rolling out new code, - // propagating config changes, or otherwise moving from one steady state to - // another. - EgressRouterProgressing EgressRouterStatusConditionType = "Progressing" - - // EgressRouterDegraded indicates that the router's current state does not match its - // desired state over a period of time resulting in a lower quality of service. - EgressRouterDegraded EgressRouterStatusConditionType = "Degraded" -) - -// ConditionStatus defines the status of each of EgressRouterStatusConditionType. -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// EgressRouterStatusCondition represents the state of the egress router's -// managed and monitored components. -// +k8s:deepcopy-gen=true -type EgressRouterStatusCondition struct { - // type specifies the aspect reported by this condition; one of Available, Progressing, Degraded - // +kubebuilder:validation:Enum="Available";"Progressing";"Degraded" - // +required - Type EgressRouterStatusConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=EgressRouterStatusConditionType"` - - // status of the condition, one of True, False, Unknown. - // +kubebuilder:validation:Enum="True";"False";"Unknown" - // +required - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - - // lastTransitionTime is the time of the last update to the current status property. - // +required - // +nullable - LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,3,opt,name=lastTransitionTime"` - - // reason is the CamelCase reason for the condition's current status. - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - - // message provides additional information about the current condition. - // This is only to be consumed by humans. It may contain Line Feed - // characters (U+000A), which should be rendered as new lines. - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// EgressRouterStatus contains the observed status of EgressRouter. Read-only. -type EgressRouterStatus struct { - // Observed status of the egress router - // +required - // +listType=map - // +listMapKey=type - Conditions []EgressRouterStatusCondition `json:"conditions" protobuf:"bytes,1,rep,name=conditions"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EgressRouterList is the list of egress router pods requested. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type EgressRouterList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - Items []EgressRouter `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.deepcopy.go deleted file mode 100644 index 27b39ffdc..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,224 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *EgressRouter) DeepCopyInto(out *EgressRouter) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouter. -func (in *EgressRouter) DeepCopy() *EgressRouter { - if in == nil { - return nil - } - out := new(EgressRouter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EgressRouter) 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 *EgressRouterAddress) DeepCopyInto(out *EgressRouterAddress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterAddress. -func (in *EgressRouterAddress) DeepCopy() *EgressRouterAddress { - if in == nil { - return nil - } - out := new(EgressRouterAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRouterInterface) DeepCopyInto(out *EgressRouterInterface) { - *out = *in - out.Macvlan = in.Macvlan - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterInterface. -func (in *EgressRouterInterface) DeepCopy() *EgressRouterInterface { - if in == nil { - return nil - } - out := new(EgressRouterInterface) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRouterList) DeepCopyInto(out *EgressRouterList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EgressRouter, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterList. -func (in *EgressRouterList) DeepCopy() *EgressRouterList { - if in == nil { - return nil - } - out := new(EgressRouterList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EgressRouterList) 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 *EgressRouterSpec) DeepCopyInto(out *EgressRouterSpec) { - *out = *in - if in.Redirect != nil { - in, out := &in.Redirect, &out.Redirect - *out = new(RedirectConfig) - (*in).DeepCopyInto(*out) - } - out.NetworkInterface = in.NetworkInterface - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]EgressRouterAddress, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterSpec. -func (in *EgressRouterSpec) DeepCopy() *EgressRouterSpec { - if in == nil { - return nil - } - out := new(EgressRouterSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRouterStatus) DeepCopyInto(out *EgressRouterStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]EgressRouterStatusCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterStatus. -func (in *EgressRouterStatus) DeepCopy() *EgressRouterStatus { - if in == nil { - return nil - } - out := new(EgressRouterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressRouterStatusCondition) DeepCopyInto(out *EgressRouterStatusCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressRouterStatusCondition. -func (in *EgressRouterStatusCondition) DeepCopy() *EgressRouterStatusCondition { - if in == nil { - return nil - } - out := new(EgressRouterStatusCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *L4RedirectRule) DeepCopyInto(out *L4RedirectRule) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new L4RedirectRule. -func (in *L4RedirectRule) DeepCopy() *L4RedirectRule { - if in == nil { - return nil - } - out := new(L4RedirectRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MacvlanConfig) DeepCopyInto(out *MacvlanConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MacvlanConfig. -func (in *MacvlanConfig) DeepCopy() *MacvlanConfig { - if in == nil { - return nil - } - out := new(MacvlanConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedirectConfig) DeepCopyInto(out *RedirectConfig) { - *out = *in - if in.RedirectRules != nil { - in, out := &in.RedirectRules, &out.RedirectRules - *out = make([]L4RedirectRule, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectConfig. -func (in *RedirectConfig) DeepCopy() *RedirectConfig { - if in == nil { - return nil - } - out := new(RedirectConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 8af113091..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,29 +0,0 @@ -egressrouters.network.operator.openshift.io: - Annotations: - include.release.openshift.io/ibm-cloud-managed: "true" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/851 - CRDName: egressrouters.network.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "001" - FilenameRunLevel: "" - GroupName: network.operator.openshift.io - HasStatus: true - KindName: EgressRouter - Labels: {} - PluralName: egressrouters - PrinterColumns: - - jsonPath: .status.conditions[*].type - name: Condition - type: string - - jsonPath: .status.conditions[*].status - name: Status - type: string - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.model_name.go deleted file mode 100644 index c667f3b2a..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.model_name.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouter) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterAddress) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterAddress" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterInterface) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterInterface" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterList) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterSpec) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterStatus) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressRouterStatusCondition) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.EgressRouterStatusCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in L4RedirectRule) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.L4RedirectRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MacvlanConfig) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.MacvlanConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RedirectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.networkoperator.v1.RedirectConfig" -} diff --git a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 000cb1903..000000000 --- a/vendor/github.com/openshift/api/networkoperator/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,119 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_EgressRouter = map[string]string{ - "": "EgressRouter is a feature allowing the user to define an egress router that acts as a bridge between pods and external systems. The egress router runs a service that redirects egress traffic originating from a pod or a group of pods to a remote external system or multiple destinations as per configuration.\n\nIt is consumed by the cluster-network-operator. More specifically, given an EgressRouter CR with , the CNO will create and manage: - A service called - An egress pod called - A NAD called \n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).\n\nEgressRouter is a single egressrouter pod configuration object.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "Specification of the desired egress router.", - "status": "Observed status of EgressRouter.", -} - -func (EgressRouter) SwaggerDoc() map[string]string { - return map_EgressRouter -} - -var map_EgressRouterAddress = map[string]string{ - "": "EgressRouterAddress contains a pair of IP CIDR and gateway to be configured on the router's interface", - "ip": "ip is the address to configure on the router's interface. Can be IPv4 or IPv6.", - "gateway": "IP address of the next-hop gateway, if it cannot be automatically determined. Can be IPv4 or IPv6.", -} - -func (EgressRouterAddress) SwaggerDoc() map[string]string { - return map_EgressRouterAddress -} - -var map_EgressRouterInterface = map[string]string{ - "": "EgressRouterInterface contains the configuration of interface to create/use.", - "macvlan": "Arguments specific to the interfaceType macvlan", -} - -func (EgressRouterInterface) SwaggerDoc() map[string]string { - return map_EgressRouterInterface -} - -var map_EgressRouterList = map[string]string{ - "": "EgressRouterList is the list of egress router pods requested.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (EgressRouterList) SwaggerDoc() map[string]string { - return map_EgressRouterList -} - -var map_EgressRouterSpec = map[string]string{ - "": "EgressRouterSpec contains the configuration for an egress router. Mode, networkInterface and addresses fields must be specified along with exactly one \"Config\" that matches the mode. Each config consists of parameters specific to that mode.", - "mode": "mode depicts the mode that is used for the egress router. The default mode is \"Redirect\" and is the only supported mode currently.", - "redirect": "redirect represents the configuration parameters specific to redirect mode.", - "networkInterface": "Specification of interface to create/use. The default is macvlan. Currently only macvlan is supported.", - "addresses": "List of IP addresses to configure on the pod's secondary interface.", -} - -func (EgressRouterSpec) SwaggerDoc() map[string]string { - return map_EgressRouterSpec -} - -var map_EgressRouterStatus = map[string]string{ - "": "EgressRouterStatus contains the observed status of EgressRouter. Read-only.", - "conditions": "Observed status of the egress router", -} - -func (EgressRouterStatus) SwaggerDoc() map[string]string { - return map_EgressRouterStatus -} - -var map_EgressRouterStatusCondition = map[string]string{ - "": "EgressRouterStatusCondition represents the state of the egress router's managed and monitored components.", - "type": "type specifies the aspect reported by this condition; one of Available, Progressing, Degraded", - "status": "status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "lastTransitionTime is the time of the last update to the current status property.", - "reason": "reason is the CamelCase reason for the condition's current status.", - "message": "message provides additional information about the current condition. This is only to be consumed by humans. It may contain Line Feed characters (U+000A), which should be rendered as new lines.", -} - -func (EgressRouterStatusCondition) SwaggerDoc() map[string]string { - return map_EgressRouterStatusCondition -} - -var map_L4RedirectRule = map[string]string{ - "": "L4RedirectRule defines a DNAT redirection from a given port to a destination IP and port.", - "destinationIP": "IP specifies the remote destination's IP address. Can be IPv4 or IPv6.", - "port": "port is the port number to which clients should send traffic to be redirected.", - "protocol": "protocol can be TCP, SCTP or UDP.", - "targetPort": "targetPort allows specifying the port number on the remote destination to which the traffic gets redirected to. If unspecified, the value from \"Port\" is used.", -} - -func (L4RedirectRule) SwaggerDoc() map[string]string { - return map_L4RedirectRule -} - -var map_MacvlanConfig = map[string]string{ - "": "MacvlanConfig consists of arguments specific to the macvlan EgressRouterInterfaceType", - "mode": "mode depicts the mode that is used for the macvlan interface; one of Bridge|Private|VEPA|Passthru. The default mode is \"Bridge\".", - "master": "Name of the master interface. Need not be specified if it can be inferred from the IP address.", -} - -func (MacvlanConfig) SwaggerDoc() map[string]string { - return map_MacvlanConfig -} - -var map_RedirectConfig = map[string]string{ - "": "RedirectConfig represents the configuration parameters specific to redirect mode.", - "redirectRules": "List of L4RedirectRules that define the DNAT redirection from the pod to the destination in redirect mode.", - "fallbackIP": "fallbackIP specifies the remote destination's IP address. Can be IPv4 or IPv6. If no redirect rules are specified, all traffic from the router are redirected to this IP. If redirect rules are specified, then any connections on any other port (undefined in the rules) on the router will be redirected to this IP. If redirect rules are specified and no fallback IP is provided, connections on other ports will simply be rejected.", -} - -func (RedirectConfig) SwaggerDoc() map[string]string { - return map_RedirectConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/oauth/.codegen.yaml b/vendor/github.com/openshift/api/oauth/.codegen.yaml deleted file mode 100644 index f10357951..000000000 --- a/vendor/github.com/openshift/api/oauth/.codegen.yaml +++ /dev/null @@ -1,4 +0,0 @@ -swaggerdocs: - commentPolicy: Warn -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/oauth/install.go b/vendor/github.com/openshift/api/oauth/install.go deleted file mode 100644 index 6bf63539d..000000000 --- a/vendor/github.com/openshift/api/oauth/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package oauth - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - oauthv1 "github.com/openshift/api/oauth/v1" -) - -const ( - GroupName = "oauth.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(oauthv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/oauth/v1/doc.go b/vendor/github.com/openshift/api/oauth/v1/doc.go deleted file mode 100644 index d39b24113..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/oauth/apis/oauth -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.oauth.v1 - -// +groupName=oauth.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/oauth/v1/generated.pb.go b/vendor/github.com/openshift/api/oauth/v1/generated.pb.go deleted file mode 100644 index 312c4f34e..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/generated.pb.go +++ /dev/null @@ -1,4141 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/oauth/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *ClusterRoleScopeRestriction) Reset() { *m = ClusterRoleScopeRestriction{} } - -func (m *OAuthAccessToken) Reset() { *m = OAuthAccessToken{} } - -func (m *OAuthAccessTokenList) Reset() { *m = OAuthAccessTokenList{} } - -func (m *OAuthAuthorizeToken) Reset() { *m = OAuthAuthorizeToken{} } - -func (m *OAuthAuthorizeTokenList) Reset() { *m = OAuthAuthorizeTokenList{} } - -func (m *OAuthClient) Reset() { *m = OAuthClient{} } - -func (m *OAuthClientAuthorization) Reset() { *m = OAuthClientAuthorization{} } - -func (m *OAuthClientAuthorizationList) Reset() { *m = OAuthClientAuthorizationList{} } - -func (m *OAuthClientList) Reset() { *m = OAuthClientList{} } - -func (m *OAuthRedirectReference) Reset() { *m = OAuthRedirectReference{} } - -func (m *RedirectReference) Reset() { *m = RedirectReference{} } - -func (m *ScopeRestriction) Reset() { *m = ScopeRestriction{} } - -func (m *UserOAuthAccessToken) Reset() { *m = UserOAuthAccessToken{} } - -func (m *UserOAuthAccessTokenList) Reset() { *m = UserOAuthAccessTokenList{} } - -func (m *ClusterRoleScopeRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterRoleScopeRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterRoleScopeRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.AllowEscalation { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Namespaces[iNdEx]) - copy(dAtA[i:], m.Namespaces[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespaces[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(m.RoleNames) > 0 { - for iNdEx := len(m.RoleNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RoleNames[iNdEx]) - copy(dAtA[i:], m.RoleNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RoleNames[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *OAuthAccessToken) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthAccessToken) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthAccessToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.InactivityTimeoutSeconds)) - i-- - dAtA[i] = 0x50 - i -= len(m.RefreshToken) - copy(dAtA[i:], m.RefreshToken) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RefreshToken))) - i-- - dAtA[i] = 0x4a - i -= len(m.AuthorizeToken) - copy(dAtA[i:], m.AuthorizeToken) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuthorizeToken))) - i-- - dAtA[i] = 0x42 - i -= len(m.UserUID) - copy(dAtA[i:], m.UserUID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserUID))) - i-- - dAtA[i] = 0x3a - i -= len(m.UserName) - copy(dAtA[i:], m.UserName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserName))) - i-- - dAtA[i] = 0x32 - i -= len(m.RedirectURI) - copy(dAtA[i:], m.RedirectURI) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RedirectURI))) - i-- - dAtA[i] = 0x2a - if len(m.Scopes) > 0 { - for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Scopes[iNdEx]) - copy(dAtA[i:], m.Scopes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scopes[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.ExpiresIn)) - i-- - dAtA[i] = 0x18 - i -= len(m.ClientName) - copy(dAtA[i:], m.ClientName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthAccessTokenList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthAccessTokenList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthAccessTokenList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthAuthorizeToken) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthAuthorizeToken) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthAuthorizeToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.CodeChallengeMethod) - copy(dAtA[i:], m.CodeChallengeMethod) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CodeChallengeMethod))) - i-- - dAtA[i] = 0x52 - i -= len(m.CodeChallenge) - copy(dAtA[i:], m.CodeChallenge) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CodeChallenge))) - i-- - dAtA[i] = 0x4a - i -= len(m.UserUID) - copy(dAtA[i:], m.UserUID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserUID))) - i-- - dAtA[i] = 0x42 - i -= len(m.UserName) - copy(dAtA[i:], m.UserName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserName))) - i-- - dAtA[i] = 0x3a - i -= len(m.State) - copy(dAtA[i:], m.State) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.State))) - i-- - dAtA[i] = 0x32 - i -= len(m.RedirectURI) - copy(dAtA[i:], m.RedirectURI) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RedirectURI))) - i-- - dAtA[i] = 0x2a - if len(m.Scopes) > 0 { - for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Scopes[iNdEx]) - copy(dAtA[i:], m.Scopes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scopes[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.ExpiresIn)) - i-- - dAtA[i] = 0x18 - i -= len(m.ClientName) - copy(dAtA[i:], m.ClientName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthAuthorizeTokenList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthAuthorizeTokenList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthAuthorizeTokenList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthClient) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthClient) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthClient) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.AccessTokenInactivityTimeoutSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.AccessTokenInactivityTimeoutSeconds)) - i-- - dAtA[i] = 0x48 - } - if m.AccessTokenMaxAgeSeconds != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.AccessTokenMaxAgeSeconds)) - i-- - dAtA[i] = 0x40 - } - if len(m.ScopeRestrictions) > 0 { - for iNdEx := len(m.ScopeRestrictions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ScopeRestrictions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - i -= len(m.GrantMethod) - copy(dAtA[i:], m.GrantMethod) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.GrantMethod))) - i-- - dAtA[i] = 0x32 - if len(m.RedirectURIs) > 0 { - for iNdEx := len(m.RedirectURIs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RedirectURIs[iNdEx]) - copy(dAtA[i:], m.RedirectURIs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RedirectURIs[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - i-- - if m.RespondWithChallenges { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - if len(m.AdditionalSecrets) > 0 { - for iNdEx := len(m.AdditionalSecrets) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AdditionalSecrets[iNdEx]) - copy(dAtA[i:], m.AdditionalSecrets[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AdditionalSecrets[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.Secret) - copy(dAtA[i:], m.Secret) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Secret))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthClientAuthorization) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthClientAuthorization) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthClientAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Scopes) > 0 { - for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Scopes[iNdEx]) - copy(dAtA[i:], m.Scopes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scopes[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - i -= len(m.UserUID) - copy(dAtA[i:], m.UserUID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserUID))) - i-- - dAtA[i] = 0x22 - i -= len(m.UserName) - copy(dAtA[i:], m.UserName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserName))) - i-- - dAtA[i] = 0x1a - i -= len(m.ClientName) - copy(dAtA[i:], m.ClientName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthClientAuthorizationList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthClientAuthorizationList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthClientAuthorizationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthClientList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthClientList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthClientList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *OAuthRedirectReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *OAuthRedirectReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *OAuthRedirectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Reference.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RedirectReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RedirectReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RedirectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x1a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x12 - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ScopeRestriction) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ScopeRestriction) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ScopeRestriction) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ClusterRole != nil { - { - size, err := m.ClusterRole.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.ExactValues) > 0 { - for iNdEx := len(m.ExactValues) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ExactValues[iNdEx]) - copy(dAtA[i:], m.ExactValues[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ExactValues[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *UserOAuthAccessToken) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserOAuthAccessToken) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserOAuthAccessToken) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.InactivityTimeoutSeconds)) - i-- - dAtA[i] = 0x50 - i -= len(m.RefreshToken) - copy(dAtA[i:], m.RefreshToken) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RefreshToken))) - i-- - dAtA[i] = 0x4a - i -= len(m.AuthorizeToken) - copy(dAtA[i:], m.AuthorizeToken) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AuthorizeToken))) - i-- - dAtA[i] = 0x42 - i -= len(m.UserUID) - copy(dAtA[i:], m.UserUID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserUID))) - i-- - dAtA[i] = 0x3a - i -= len(m.UserName) - copy(dAtA[i:], m.UserName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserName))) - i-- - dAtA[i] = 0x32 - i -= len(m.RedirectURI) - copy(dAtA[i:], m.RedirectURI) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RedirectURI))) - i-- - dAtA[i] = 0x2a - if len(m.Scopes) > 0 { - for iNdEx := len(m.Scopes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Scopes[iNdEx]) - copy(dAtA[i:], m.Scopes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scopes[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i = encodeVarintGenerated(dAtA, i, uint64(m.ExpiresIn)) - i-- - dAtA[i] = 0x18 - i -= len(m.ClientName) - copy(dAtA[i:], m.ClientName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ClientName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *UserOAuthAccessTokenList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserOAuthAccessTokenList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserOAuthAccessTokenList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ClusterRoleScopeRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.RoleNames) > 0 { - for _, s := range m.RoleNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Namespaces) > 0 { - for _, s := range m.Namespaces { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - return n -} - -func (m *OAuthAccessToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ClientName) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ExpiresIn)) - if len(m.Scopes) > 0 { - for _, s := range m.Scopes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.RedirectURI) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserUID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.AuthorizeToken) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.RefreshToken) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.InactivityTimeoutSeconds)) - return n -} - -func (m *OAuthAccessTokenList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *OAuthAuthorizeToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ClientName) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ExpiresIn)) - if len(m.Scopes) > 0 { - for _, s := range m.Scopes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.RedirectURI) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.State) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserUID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CodeChallenge) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CodeChallengeMethod) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *OAuthAuthorizeTokenList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *OAuthClient) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Secret) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.AdditionalSecrets) > 0 { - for _, s := range m.AdditionalSecrets { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - if len(m.RedirectURIs) > 0 { - for _, s := range m.RedirectURIs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.GrantMethod) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ScopeRestrictions) > 0 { - for _, e := range m.ScopeRestrictions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.AccessTokenMaxAgeSeconds != nil { - n += 1 + sovGenerated(uint64(*m.AccessTokenMaxAgeSeconds)) - } - if m.AccessTokenInactivityTimeoutSeconds != nil { - n += 1 + sovGenerated(uint64(*m.AccessTokenInactivityTimeoutSeconds)) - } - return n -} - -func (m *OAuthClientAuthorization) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ClientName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserUID) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Scopes) > 0 { - for _, s := range m.Scopes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *OAuthClientAuthorizationList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *OAuthClientList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *OAuthRedirectReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Reference.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RedirectReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ScopeRestriction) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.ExactValues) > 0 { - for _, s := range m.ExactValues { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.ClusterRole != nil { - l = m.ClusterRole.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *UserOAuthAccessToken) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ClientName) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ExpiresIn)) - if len(m.Scopes) > 0 { - for _, s := range m.Scopes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.RedirectURI) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UserUID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.AuthorizeToken) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.RefreshToken) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.InactivityTimeoutSeconds)) - return n -} - -func (m *UserOAuthAccessTokenList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ClusterRoleScopeRestriction) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterRoleScopeRestriction{`, - `RoleNames:` + fmt.Sprintf("%v", this.RoleNames) + `,`, - `Namespaces:` + fmt.Sprintf("%v", this.Namespaces) + `,`, - `AllowEscalation:` + fmt.Sprintf("%v", this.AllowEscalation) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthAccessToken) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthAccessToken{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ClientName:` + fmt.Sprintf("%v", this.ClientName) + `,`, - `ExpiresIn:` + fmt.Sprintf("%v", this.ExpiresIn) + `,`, - `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, - `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, - `UserUID:` + fmt.Sprintf("%v", this.UserUID) + `,`, - `AuthorizeToken:` + fmt.Sprintf("%v", this.AuthorizeToken) + `,`, - `RefreshToken:` + fmt.Sprintf("%v", this.RefreshToken) + `,`, - `InactivityTimeoutSeconds:` + fmt.Sprintf("%v", this.InactivityTimeoutSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthAccessTokenList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]OAuthAccessToken{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "OAuthAccessToken", "OAuthAccessToken", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&OAuthAccessTokenList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *OAuthAuthorizeToken) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthAuthorizeToken{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ClientName:` + fmt.Sprintf("%v", this.ClientName) + `,`, - `ExpiresIn:` + fmt.Sprintf("%v", this.ExpiresIn) + `,`, - `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, - `State:` + fmt.Sprintf("%v", this.State) + `,`, - `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, - `UserUID:` + fmt.Sprintf("%v", this.UserUID) + `,`, - `CodeChallenge:` + fmt.Sprintf("%v", this.CodeChallenge) + `,`, - `CodeChallengeMethod:` + fmt.Sprintf("%v", this.CodeChallengeMethod) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthAuthorizeTokenList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]OAuthAuthorizeToken{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "OAuthAuthorizeToken", "OAuthAuthorizeToken", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&OAuthAuthorizeTokenList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *OAuthClient) String() string { - if this == nil { - return "nil" - } - repeatedStringForScopeRestrictions := "[]ScopeRestriction{" - for _, f := range this.ScopeRestrictions { - repeatedStringForScopeRestrictions += strings.Replace(strings.Replace(f.String(), "ScopeRestriction", "ScopeRestriction", 1), `&`, ``, 1) + "," - } - repeatedStringForScopeRestrictions += "}" - s := strings.Join([]string{`&OAuthClient{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Secret:` + fmt.Sprintf("%v", this.Secret) + `,`, - `AdditionalSecrets:` + fmt.Sprintf("%v", this.AdditionalSecrets) + `,`, - `RespondWithChallenges:` + fmt.Sprintf("%v", this.RespondWithChallenges) + `,`, - `RedirectURIs:` + fmt.Sprintf("%v", this.RedirectURIs) + `,`, - `GrantMethod:` + fmt.Sprintf("%v", this.GrantMethod) + `,`, - `ScopeRestrictions:` + repeatedStringForScopeRestrictions + `,`, - `AccessTokenMaxAgeSeconds:` + valueToStringGenerated(this.AccessTokenMaxAgeSeconds) + `,`, - `AccessTokenInactivityTimeoutSeconds:` + valueToStringGenerated(this.AccessTokenInactivityTimeoutSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthClientAuthorization) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthClientAuthorization{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ClientName:` + fmt.Sprintf("%v", this.ClientName) + `,`, - `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, - `UserUID:` + fmt.Sprintf("%v", this.UserUID) + `,`, - `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`, - `}`, - }, "") - return s -} -func (this *OAuthClientAuthorizationList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]OAuthClientAuthorization{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "OAuthClientAuthorization", "OAuthClientAuthorization", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&OAuthClientAuthorizationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *OAuthClientList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]OAuthClient{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "OAuthClient", "OAuthClient", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&OAuthClientList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *OAuthRedirectReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&OAuthRedirectReference{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Reference:` + strings.Replace(strings.Replace(this.Reference.String(), "RedirectReference", "RedirectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RedirectReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RedirectReference{`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *ScopeRestriction) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ScopeRestriction{`, - `ExactValues:` + fmt.Sprintf("%v", this.ExactValues) + `,`, - `ClusterRole:` + strings.Replace(this.ClusterRole.String(), "ClusterRoleScopeRestriction", "ClusterRoleScopeRestriction", 1) + `,`, - `}`, - }, "") - return s -} -func (this *UserOAuthAccessToken) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UserOAuthAccessToken{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ClientName:` + fmt.Sprintf("%v", this.ClientName) + `,`, - `ExpiresIn:` + fmt.Sprintf("%v", this.ExpiresIn) + `,`, - `Scopes:` + fmt.Sprintf("%v", this.Scopes) + `,`, - `RedirectURI:` + fmt.Sprintf("%v", this.RedirectURI) + `,`, - `UserName:` + fmt.Sprintf("%v", this.UserName) + `,`, - `UserUID:` + fmt.Sprintf("%v", this.UserUID) + `,`, - `AuthorizeToken:` + fmt.Sprintf("%v", this.AuthorizeToken) + `,`, - `RefreshToken:` + fmt.Sprintf("%v", this.RefreshToken) + `,`, - `InactivityTimeoutSeconds:` + fmt.Sprintf("%v", this.InactivityTimeoutSeconds) + `,`, - `}`, - }, "") - return s -} -func (this *UserOAuthAccessTokenList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]UserOAuthAccessToken{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "UserOAuthAccessToken", "UserOAuthAccessToken", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&UserOAuthAccessTokenList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ClusterRoleScopeRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterRoleScopeRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterRoleScopeRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RoleNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RoleNames = append(m.RoleNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespaces = append(m.Namespaces, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowEscalation", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowEscalation = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthAccessToken) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthAccessToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthAccessToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresIn", wireType) - } - m.ExpiresIn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresIn |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scopes = append(m.Scopes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectURI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedirectURI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserUID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserUID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizeToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizeToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RefreshToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RefreshToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InactivityTimeoutSeconds", wireType) - } - m.InactivityTimeoutSeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InactivityTimeoutSeconds |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthAccessTokenList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthAccessTokenList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthAccessTokenList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, OAuthAccessToken{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthAuthorizeToken) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthAuthorizeToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthAuthorizeToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresIn", wireType) - } - m.ExpiresIn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresIn |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scopes = append(m.Scopes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectURI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedirectURI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.State = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserUID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserUID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeChallenge", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeChallenge = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeChallengeMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CodeChallengeMethod = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthAuthorizeTokenList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthAuthorizeTokenList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthAuthorizeTokenList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, OAuthAuthorizeToken{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthClient) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthClient: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthClient: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Secret = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalSecrets", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalSecrets = append(m.AdditionalSecrets, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field RespondWithChallenges", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.RespondWithChallenges = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectURIs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedirectURIs = append(m.RedirectURIs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrantMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrantMethod = GrantHandlerType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScopeRestrictions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ScopeRestrictions = append(m.ScopeRestrictions, ScopeRestriction{}) - if err := m.ScopeRestrictions[len(m.ScopeRestrictions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessTokenMaxAgeSeconds", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AccessTokenMaxAgeSeconds = &v - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccessTokenInactivityTimeoutSeconds", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AccessTokenInactivityTimeoutSeconds = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthClientAuthorization) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthClientAuthorization: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthClientAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserUID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserUID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scopes = append(m.Scopes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthClientAuthorizationList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthClientAuthorizationList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthClientAuthorizationList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, OAuthClientAuthorization{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthClientList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthClientList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthClientList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, OAuthClient{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OAuthRedirectReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OAuthRedirectReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OAuthRedirectReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RedirectReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RedirectReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RedirectReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ScopeRestriction) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ScopeRestriction: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ScopeRestriction: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExactValues", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ExactValues = append(m.ExactValues, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClusterRole", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClusterRole == nil { - m.ClusterRole = &ClusterRoleScopeRestriction{} - } - if err := m.ClusterRole.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserOAuthAccessToken) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserOAuthAccessToken: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserOAuthAccessToken: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ClientName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExpiresIn", wireType) - } - m.ExpiresIn = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ExpiresIn |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scopes = append(m.Scopes, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RedirectURI", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RedirectURI = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserUID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserUID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuthorizeToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AuthorizeToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RefreshToken", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RefreshToken = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InactivityTimeoutSeconds", wireType) - } - m.InactivityTimeoutSeconds = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.InactivityTimeoutSeconds |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserOAuthAccessTokenList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserOAuthAccessTokenList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserOAuthAccessTokenList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, UserOAuthAccessToken{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/oauth/v1/generated.proto b/vendor/github.com/openshift/api/oauth/v1/generated.proto deleted file mode 100644 index 4a5474e0c..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/generated.proto +++ /dev/null @@ -1,321 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.oauth.v1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/oauth/v1"; - -// ClusterRoleScopeRestriction describes restrictions on cluster role scopes -message ClusterRoleScopeRestriction { - // roleNames is the list of cluster roles that can referenced. * means anything - repeated string roleNames = 1; - - // namespaces is the list of namespaces that can be referenced. * means any of them (including *) - repeated string namespaces = 2; - - // allowEscalation indicates whether you can request roles and their escalating resources - optional bool allowEscalation = 3; -} - -// OAuthAccessToken describes an OAuth access token. -// The name of a token must be prefixed with a `sha256~` string, must not contain "/" or "%" characters and must be at -// least 32 characters long. -// -// The name of the token is constructed from the actual token by sha256-hashing it and using URL-safe unpadded -// base64-encoding (as described in RFC4648) on the hashed result. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthAccessToken { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // clientName references the client that created this token. - optional string clientName = 2; - - // expiresIn is the seconds from CreationTime before this token expires. - optional int64 expiresIn = 3; - - // scopes is an array of the requested scopes. - repeated string scopes = 4; - - // redirectURI is the redirection associated with the token. - optional string redirectURI = 5; - - // userName is the user name associated with this token - optional string userName = 6; - - // userUID is the unique UID associated with this token - optional string userUID = 7; - - // authorizeToken contains the token that authorized this token - optional string authorizeToken = 8; - - // refreshToken is the value by which this token can be renewed. Can be blank. - optional string refreshToken = 9; - - // inactivityTimeoutSeconds is the value in seconds, from the - // CreationTimestamp, after which this token can no longer be used. - // The value is automatically incremented when the token is used. - optional int32 inactivityTimeoutSeconds = 10; -} - -// OAuthAccessTokenList is a collection of OAuth access tokens -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthAccessTokenList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of OAuth access tokens - repeated OAuthAccessToken items = 2; -} - -// OAuthAuthorizeToken describes an OAuth authorization token -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthAuthorizeToken { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // clientName references the client that created this token. - optional string clientName = 2; - - // expiresIn is the seconds from CreationTime before this token expires. - optional int64 expiresIn = 3; - - // scopes is an array of the requested scopes. - repeated string scopes = 4; - - // redirectURI is the redirection associated with the token. - optional string redirectURI = 5; - - // state data from request - optional string state = 6; - - // userName is the user name associated with this token - optional string userName = 7; - - // userUID is the unique UID associated with this token. UserUID and UserName must both match - // for this token to be valid. - optional string userUID = 8; - - // codeChallenge is the optional code_challenge associated with this authorization code, as described in rfc7636 - optional string codeChallenge = 9; - - // codeChallengeMethod is the optional code_challenge_method associated with this authorization code, as described in rfc7636 - optional string codeChallengeMethod = 10; -} - -// OAuthAuthorizeTokenList is a collection of OAuth authorization tokens -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthAuthorizeTokenList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of OAuth authorization tokens - repeated OAuthAuthorizeToken items = 2; -} - -// OAuthClient describes an OAuth client -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthClient { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // secret is the unique secret associated with a client - optional string secret = 2; - - // additionalSecrets holds other secrets that may be used to identify the client. This is useful for rotation - // and for service account token validation - repeated string additionalSecrets = 3; - - // respondWithChallenges indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects - optional bool respondWithChallenges = 4; - - // redirectURIs is the valid redirection URIs associated with a client - // +patchStrategy=merge - repeated string redirectURIs = 5; - - // grantMethod is a required field which determines how to handle grants for this client. - // 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 - optional string grantMethod = 6; - - // scopeRestrictions describes which scopes this client can request. Each requested scope - // is checked against each restriction. If any restriction matches, then the scope is allowed. - // If no restriction matches, then the scope is denied. - repeated ScopeRestriction scopeRestrictions = 7; - - // accessTokenMaxAgeSeconds overrides the default access token max age for tokens granted to this client. - // 0 means no expiration. - optional int32 accessTokenMaxAgeSeconds = 8; - - // accessTokenInactivityTimeoutSeconds overrides the default token - // inactivity timeout for tokens granted to this 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. - // This value needs to be set only if the default set in configuration is - // not appropriate for this client. Valid values are: - // - 0: Tokens for this client never time out - // - X: Tokens time out if there is no activity for X seconds - // The current minimum allowed value for X is 300 (5 minutes) - // - // WARNING: existing tokens' timeout will not be affected (lowered) by changing this value - optional int32 accessTokenInactivityTimeoutSeconds = 9; -} - -// OAuthClientAuthorization describes an authorization created by an OAuth client -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthClientAuthorization { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // clientName references the client that created this authorization - optional string clientName = 2; - - // userName is the user name that authorized this client - optional string userName = 3; - - // userUID is the unique UID associated with this authorization. UserUID and UserName - // must both match for this authorization to be valid. - optional string userUID = 4; - - // scopes is an array of the granted scopes. - repeated string scopes = 5; -} - -// OAuthClientAuthorizationList is a collection of OAuth client authorizations -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthClientAuthorizationList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of OAuth client authorizations - repeated OAuthClientAuthorization items = 2; -} - -// OAuthClientList is a collection of OAuth clients -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthClientList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of OAuth clients - repeated OAuthClient items = 2; -} - -// OAuthRedirectReference is a reference to an OAuth redirect object. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message OAuthRedirectReference { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // The reference to an redirect object in the current namespace. - optional RedirectReference reference = 2; -} - -// RedirectReference specifies the target in the current namespace that resolves into redirect URIs. Only the 'Route' kind is currently allowed. -message RedirectReference { - // The group of the target that is being referred to. - optional string group = 1; - - // The kind of the target that is being referred to. Currently, only 'Route' is allowed. - optional string kind = 2; - - // The name of the target that is being referred to. e.g. name of the Route. - optional string name = 3; -} - -// ScopeRestriction describe one restriction on scopes. Exactly one option must be non-nil. -message ScopeRestriction { - // ExactValues means the scope has to match a particular set of strings exactly - repeated string literals = 1; - - // clusterRole describes a set of restrictions for cluster role scoping. - optional ClusterRoleScopeRestriction clusterRole = 2; -} - -// UserOAuthAccessToken is a virtual resource to mirror OAuthAccessTokens to -// the user the access token was issued for -// +openshift:compatibility-gen:level=1 -message UserOAuthAccessToken { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // clientName references the client that created this token. - optional string clientName = 2; - - // expiresIn is the seconds from CreationTime before this token expires. - optional int64 expiresIn = 3; - - // scopes is an array of the requested scopes. - repeated string scopes = 4; - - // redirectURI is the redirection associated with the token. - optional string redirectURI = 5; - - // userName is the user name associated with this token - optional string userName = 6; - - // userUID is the unique UID associated with this token - optional string userUID = 7; - - // authorizeToken contains the token that authorized this token - optional string authorizeToken = 8; - - // refreshToken is the value by which this token can be renewed. Can be blank. - optional string refreshToken = 9; - - // inactivityTimeoutSeconds is the value in seconds, from the - // CreationTimestamp, after which this token can no longer be used. - // The value is automatically incremented when the token is used. - optional int32 inactivityTimeoutSeconds = 10; -} - -// UserOAuthAccessTokenList is a collection of access tokens issued on behalf of -// the requesting user -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message UserOAuthAccessTokenList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated UserOAuthAccessToken items = 2; -} - diff --git a/vendor/github.com/openshift/api/oauth/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/oauth/v1/generated.protomessage.pb.go deleted file mode 100644 index 45e1009d2..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*ClusterRoleScopeRestriction) ProtoMessage() {} - -func (*OAuthAccessToken) ProtoMessage() {} - -func (*OAuthAccessTokenList) ProtoMessage() {} - -func (*OAuthAuthorizeToken) ProtoMessage() {} - -func (*OAuthAuthorizeTokenList) ProtoMessage() {} - -func (*OAuthClient) ProtoMessage() {} - -func (*OAuthClientAuthorization) ProtoMessage() {} - -func (*OAuthClientAuthorizationList) ProtoMessage() {} - -func (*OAuthClientList) ProtoMessage() {} - -func (*OAuthRedirectReference) ProtoMessage() {} - -func (*RedirectReference) ProtoMessage() {} - -func (*ScopeRestriction) ProtoMessage() {} - -func (*UserOAuthAccessToken) ProtoMessage() {} - -func (*UserOAuthAccessTokenList) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/oauth/v1/legacy.go b/vendor/github.com/openshift/api/oauth/v1/legacy.go deleted file mode 100644 index 65b57d243..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/legacy.go +++ /dev/null @@ -1,30 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme, extensionsv1beta1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &OAuthAccessToken{}, - &OAuthAccessTokenList{}, - &OAuthAuthorizeToken{}, - &OAuthAuthorizeTokenList{}, - &OAuthClient{}, - &OAuthClientList{}, - &OAuthClientAuthorization{}, - &OAuthClientAuthorizationList{}, - &OAuthRedirectReference{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/oauth/v1/register.go b/vendor/github.com/openshift/api/oauth/v1/register.go deleted file mode 100644 index 9992dffea..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/register.go +++ /dev/null @@ -1,47 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "oauth.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &OAuthAccessToken{}, - &OAuthAccessTokenList{}, - &OAuthAuthorizeToken{}, - &OAuthAuthorizeTokenList{}, - &OAuthClient{}, - &OAuthClientList{}, - &OAuthClientAuthorization{}, - &OAuthClientAuthorizationList{}, - &OAuthRedirectReference{}, - &UserOAuthAccessToken{}, - &UserOAuthAccessTokenList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/oauth/v1/types.go b/vendor/github.com/openshift/api/oauth/v1/types.go deleted file mode 100644 index 5a70b4774..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/types.go +++ /dev/null @@ -1,341 +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 - -// OAuthAccessToken describes an OAuth access token. -// The name of a token must be prefixed with a `sha256~` string, must not contain "/" or "%" characters and must be at -// least 32 characters long. -// -// The name of the token is constructed from the actual token by sha256-hashing it and using URL-safe unpadded -// base64-encoding (as described in RFC4648) on the hashed result. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthAccessToken struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // clientName references the client that created this token. - ClientName string `json:"clientName,omitempty" protobuf:"bytes,2,opt,name=clientName"` - - // expiresIn is the seconds from CreationTime before this token expires. - ExpiresIn int64 `json:"expiresIn,omitempty" protobuf:"varint,3,opt,name=expiresIn"` - - // scopes is an array of the requested scopes. - Scopes []string `json:"scopes,omitempty" protobuf:"bytes,4,rep,name=scopes"` - - // redirectURI is the redirection associated with the token. - RedirectURI string `json:"redirectURI,omitempty" protobuf:"bytes,5,opt,name=redirectURI"` - - // userName is the user name associated with this token - UserName string `json:"userName,omitempty" protobuf:"bytes,6,opt,name=userName"` - - // userUID is the unique UID associated with this token - UserUID string `json:"userUID,omitempty" protobuf:"bytes,7,opt,name=userUID"` - - // authorizeToken contains the token that authorized this token - AuthorizeToken string `json:"authorizeToken,omitempty" protobuf:"bytes,8,opt,name=authorizeToken"` - - // refreshToken is the value by which this token can be renewed. Can be blank. - RefreshToken string `json:"refreshToken,omitempty" protobuf:"bytes,9,opt,name=refreshToken"` - - // inactivityTimeoutSeconds is the value in seconds, from the - // CreationTimestamp, after which this token can no longer be used. - // The value is automatically incremented when the token is used. - InactivityTimeoutSeconds int32 `json:"inactivityTimeoutSeconds,omitempty" protobuf:"varint,10,opt,name=inactivityTimeoutSeconds"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthAuthorizeToken describes an OAuth authorization token -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthAuthorizeToken struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // clientName references the client that created this token. - ClientName string `json:"clientName,omitempty" protobuf:"bytes,2,opt,name=clientName"` - - // expiresIn is the seconds from CreationTime before this token expires. - ExpiresIn int64 `json:"expiresIn,omitempty" protobuf:"varint,3,opt,name=expiresIn"` - - // scopes is an array of the requested scopes. - Scopes []string `json:"scopes,omitempty" protobuf:"bytes,4,rep,name=scopes"` - - // redirectURI is the redirection associated with the token. - RedirectURI string `json:"redirectURI,omitempty" protobuf:"bytes,5,opt,name=redirectURI"` - - // state data from request - State string `json:"state,omitempty" protobuf:"bytes,6,opt,name=state"` - - // userName is the user name associated with this token - UserName string `json:"userName,omitempty" protobuf:"bytes,7,opt,name=userName"` - - // userUID is the unique UID associated with this token. UserUID and UserName must both match - // for this token to be valid. - UserUID string `json:"userUID,omitempty" protobuf:"bytes,8,opt,name=userUID"` - - // codeChallenge is the optional code_challenge associated with this authorization code, as described in rfc7636 - CodeChallenge string `json:"codeChallenge,omitempty" protobuf:"bytes,9,opt,name=codeChallenge"` - - // codeChallengeMethod is the optional code_challenge_method associated with this authorization code, as described in rfc7636 - CodeChallengeMethod string `json:"codeChallengeMethod,omitempty" protobuf:"bytes,10,opt,name=codeChallengeMethod"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthClient describes an OAuth client -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthClient struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // secret is the unique secret associated with a client - Secret string `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` - - // additionalSecrets holds other secrets that may be used to identify the client. This is useful for rotation - // and for service account token validation - AdditionalSecrets []string `json:"additionalSecrets,omitempty" protobuf:"bytes,3,rep,name=additionalSecrets"` - - // respondWithChallenges indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects - RespondWithChallenges bool `json:"respondWithChallenges,omitempty" protobuf:"varint,4,opt,name=respondWithChallenges"` - - // redirectURIs is the valid redirection URIs associated with a client - // +patchStrategy=merge - RedirectURIs []string `json:"redirectURIs,omitempty" patchStrategy:"merge" protobuf:"bytes,5,rep,name=redirectURIs"` - - // grantMethod is a required field which determines how to handle grants for this client. - // 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 - GrantMethod GrantHandlerType `json:"grantMethod,omitempty" protobuf:"bytes,6,opt,name=grantMethod,casttype=GrantHandlerType"` - - // scopeRestrictions describes which scopes this client can request. Each requested scope - // is checked against each restriction. If any restriction matches, then the scope is allowed. - // If no restriction matches, then the scope is denied. - ScopeRestrictions []ScopeRestriction `json:"scopeRestrictions,omitempty" protobuf:"bytes,7,rep,name=scopeRestrictions"` - - // accessTokenMaxAgeSeconds overrides the default access token max age for tokens granted to this client. - // 0 means no expiration. - AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty" protobuf:"varint,8,opt,name=accessTokenMaxAgeSeconds"` - - // accessTokenInactivityTimeoutSeconds overrides the default token - // inactivity timeout for tokens granted to this 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. - // This value needs to be set only if the default set in configuration is - // not appropriate for this client. Valid values are: - // - 0: Tokens for this client never time out - // - X: Tokens time out if there is no activity for X seconds - // The current minimum allowed value for X is 300 (5 minutes) - // - // WARNING: existing tokens' timeout will not be affected (lowered) by changing this value - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty" protobuf:"varint,9,opt,name=accessTokenInactivityTimeoutSeconds"` -} - -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" -) - -// ScopeRestriction describe one restriction on scopes. Exactly one option must be non-nil. -type ScopeRestriction struct { - // ExactValues means the scope has to match a particular set of strings exactly - ExactValues []string `json:"literals,omitempty" protobuf:"bytes,1,rep,name=literals"` - - // clusterRole describes a set of restrictions for cluster role scoping. - ClusterRole *ClusterRoleScopeRestriction `json:"clusterRole,omitempty" protobuf:"bytes,2,opt,name=clusterRole"` -} - -// ClusterRoleScopeRestriction describes restrictions on cluster role scopes -type ClusterRoleScopeRestriction struct { - // roleNames is the list of cluster roles that can referenced. * means anything - RoleNames []string `json:"roleNames" protobuf:"bytes,1,rep,name=roleNames"` - // namespaces is the list of namespaces that can be referenced. * means any of them (including *) - Namespaces []string `json:"namespaces" protobuf:"bytes,2,rep,name=namespaces"` - // allowEscalation indicates whether you can request roles and their escalating resources - AllowEscalation bool `json:"allowEscalation" protobuf:"varint,3,opt,name=allowEscalation"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthClientAuthorization describes an authorization created by an OAuth client -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthClientAuthorization struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // clientName references the client that created this authorization - ClientName string `json:"clientName,omitempty" protobuf:"bytes,2,opt,name=clientName"` - - // userName is the user name that authorized this client - UserName string `json:"userName,omitempty" protobuf:"bytes,3,opt,name=userName"` - - // userUID is the unique UID associated with this authorization. UserUID and UserName - // must both match for this authorization to be valid. - UserUID string `json:"userUID,omitempty" protobuf:"bytes,4,opt,name=userUID"` - - // scopes is an array of the granted scopes. - Scopes []string `json:"scopes,omitempty" protobuf:"bytes,5,rep,name=scopes"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthAccessTokenList is a collection of OAuth access tokens -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthAccessTokenList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of OAuth access tokens - Items []OAuthAccessToken `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthAuthorizeTokenList is a collection of OAuth authorization tokens -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthAuthorizeTokenList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of OAuth authorization tokens - Items []OAuthAuthorizeToken `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthClientList is a collection of OAuth clients -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthClientList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of OAuth clients - Items []OAuthClient `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthClientAuthorizationList is a collection of OAuth client authorizations -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthClientAuthorizationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of OAuth client authorizations - Items []OAuthClientAuthorization `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OAuthRedirectReference is a reference to an OAuth redirect object. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OAuthRedirectReference struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // The reference to an redirect object in the current namespace. - Reference RedirectReference `json:"reference,omitempty" protobuf:"bytes,2,opt,name=reference"` -} - -// RedirectReference specifies the target in the current namespace that resolves into redirect URIs. Only the 'Route' kind is currently allowed. -type RedirectReference struct { - // The group of the target that is being referred to. - Group string `json:"group" protobuf:"bytes,1,opt,name=group"` - - // The kind of the target that is being referred to. Currently, only 'Route' is allowed. - Kind string `json:"kind" protobuf:"bytes,2,opt,name=kind"` - - // The name of the target that is being referred to. e.g. name of the Route. - Name string `json:"name" protobuf:"bytes,3,opt,name=name"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UserOAuthAccessToken is a virtual resource to mirror OAuthAccessTokens to -// the user the access token was issued for -// +openshift:compatibility-gen:level=1 -type UserOAuthAccessToken OAuthAccessToken - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UserOAuthAccessTokenList is a collection of access tokens issued on behalf of -// the requesting user -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type UserOAuthAccessTokenList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - Items []UserOAuthAccessToken `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/oauth/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/oauth/v1/zz_generated.deepcopy.go deleted file mode 100644 index 73191b616..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,447 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *ClusterRoleScopeRestriction) DeepCopyInto(out *ClusterRoleScopeRestriction) { - *out = *in - if in.RoleNames != nil { - in, out := &in.RoleNames, &out.RoleNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleScopeRestriction. -func (in *ClusterRoleScopeRestriction) DeepCopy() *ClusterRoleScopeRestriction { - if in == nil { - return nil - } - out := new(ClusterRoleScopeRestriction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthAccessToken) DeepCopyInto(out *OAuthAccessToken) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAccessToken. -func (in *OAuthAccessToken) DeepCopy() *OAuthAccessToken { - if in == nil { - return nil - } - out := new(OAuthAccessToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthAccessToken) 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 *OAuthAccessTokenList) DeepCopyInto(out *OAuthAccessTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OAuthAccessToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAccessTokenList. -func (in *OAuthAccessTokenList) DeepCopy() *OAuthAccessTokenList { - if in == nil { - return nil - } - out := new(OAuthAccessTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthAccessTokenList) 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 *OAuthAuthorizeToken) DeepCopyInto(out *OAuthAuthorizeToken) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAuthorizeToken. -func (in *OAuthAuthorizeToken) DeepCopy() *OAuthAuthorizeToken { - if in == nil { - return nil - } - out := new(OAuthAuthorizeToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthAuthorizeToken) 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 *OAuthAuthorizeTokenList) DeepCopyInto(out *OAuthAuthorizeTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OAuthAuthorizeToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAuthorizeTokenList. -func (in *OAuthAuthorizeTokenList) DeepCopy() *OAuthAuthorizeTokenList { - if in == nil { - return nil - } - out := new(OAuthAuthorizeTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthAuthorizeTokenList) 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 *OAuthClient) DeepCopyInto(out *OAuthClient) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.AdditionalSecrets != nil { - in, out := &in.AdditionalSecrets, &out.AdditionalSecrets - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.RedirectURIs != nil { - in, out := &in.RedirectURIs, &out.RedirectURIs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ScopeRestrictions != nil { - in, out := &in.ScopeRestrictions, &out.ScopeRestrictions - *out = make([]ScopeRestriction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AccessTokenMaxAgeSeconds != nil { - in, out := &in.AccessTokenMaxAgeSeconds, &out.AccessTokenMaxAgeSeconds - *out = new(int32) - **out = **in - } - if in.AccessTokenInactivityTimeoutSeconds != nil { - in, out := &in.AccessTokenInactivityTimeoutSeconds, &out.AccessTokenInactivityTimeoutSeconds - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthClient. -func (in *OAuthClient) DeepCopy() *OAuthClient { - if in == nil { - return nil - } - out := new(OAuthClient) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthClient) 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 *OAuthClientAuthorization) DeepCopyInto(out *OAuthClientAuthorization) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthClientAuthorization. -func (in *OAuthClientAuthorization) DeepCopy() *OAuthClientAuthorization { - if in == nil { - return nil - } - out := new(OAuthClientAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthClientAuthorization) 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 *OAuthClientAuthorizationList) DeepCopyInto(out *OAuthClientAuthorizationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OAuthClientAuthorization, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthClientAuthorizationList. -func (in *OAuthClientAuthorizationList) DeepCopy() *OAuthClientAuthorizationList { - if in == nil { - return nil - } - out := new(OAuthClientAuthorizationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthClientAuthorizationList) 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 *OAuthClientList) DeepCopyInto(out *OAuthClientList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OAuthClient, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthClientList. -func (in *OAuthClientList) DeepCopy() *OAuthClientList { - if in == nil { - return nil - } - out := new(OAuthClientList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthClientList) 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 *OAuthRedirectReference) DeepCopyInto(out *OAuthRedirectReference) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Reference = in.Reference - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthRedirectReference. -func (in *OAuthRedirectReference) DeepCopy() *OAuthRedirectReference { - if in == nil { - return nil - } - out := new(OAuthRedirectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OAuthRedirectReference) 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 *RedirectReference) DeepCopyInto(out *RedirectReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedirectReference. -func (in *RedirectReference) DeepCopy() *RedirectReference { - if in == nil { - return nil - } - out := new(RedirectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ScopeRestriction) DeepCopyInto(out *ScopeRestriction) { - *out = *in - if in.ExactValues != nil { - in, out := &in.ExactValues, &out.ExactValues - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ClusterRole != nil { - in, out := &in.ClusterRole, &out.ClusterRole - *out = new(ClusterRoleScopeRestriction) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScopeRestriction. -func (in *ScopeRestriction) DeepCopy() *ScopeRestriction { - if in == nil { - return nil - } - out := new(ScopeRestriction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UserOAuthAccessToken) DeepCopyInto(out *UserOAuthAccessToken) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Scopes != nil { - in, out := &in.Scopes, &out.Scopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOAuthAccessToken. -func (in *UserOAuthAccessToken) DeepCopy() *UserOAuthAccessToken { - if in == nil { - return nil - } - out := new(UserOAuthAccessToken) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserOAuthAccessToken) 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 *UserOAuthAccessTokenList) DeepCopyInto(out *UserOAuthAccessTokenList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]UserOAuthAccessToken, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserOAuthAccessTokenList. -func (in *UserOAuthAccessTokenList) DeepCopy() *UserOAuthAccessTokenList { - if in == nil { - return nil - } - out := new(UserOAuthAccessTokenList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserOAuthAccessTokenList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/openshift/api/oauth/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/oauth/v1/zz_generated.model_name.go deleted file mode 100644 index 9a471d2c4..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/zz_generated.model_name.go +++ /dev/null @@ -1,76 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterRoleScopeRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.ClusterRoleScopeRestriction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthAccessToken) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthAccessToken" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthAccessTokenList) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthAccessTokenList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthAuthorizeToken) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthAuthorizeToken" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthAuthorizeTokenList) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthAuthorizeTokenList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthClient) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthClient" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthClientAuthorization) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthClientAuthorization" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthClientAuthorizationList) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthClientAuthorizationList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthClientList) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthClientList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthRedirectReference) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.OAuthRedirectReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RedirectReference) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.RedirectReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ScopeRestriction) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.ScopeRestriction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserOAuthAccessToken) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.UserOAuthAccessToken" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserOAuthAccessTokenList) OpenAPIModelName() string { - return "com.github.openshift.api.oauth.v1.UserOAuthAccessTokenList" -} diff --git a/vendor/github.com/openshift/api/oauth/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/oauth/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 171b5221f..000000000 --- a/vendor/github.com/openshift/api/oauth/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,171 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_ClusterRoleScopeRestriction = map[string]string{ - "": "ClusterRoleScopeRestriction describes restrictions on cluster role scopes", - "roleNames": "roleNames is the list of cluster roles that can referenced. * means anything", - "namespaces": "namespaces is the list of namespaces that can be referenced. * means any of them (including *)", - "allowEscalation": "allowEscalation indicates whether you can request roles and their escalating resources", -} - -func (ClusterRoleScopeRestriction) SwaggerDoc() map[string]string { - return map_ClusterRoleScopeRestriction -} - -var map_OAuthAccessToken = map[string]string{ - "": "OAuthAccessToken describes an OAuth access token. The name of a token must be prefixed with a `sha256~` string, must not contain \"/\" or \"%\" characters and must be at least 32 characters long.\n\nThe name of the token is constructed from the actual token by sha256-hashing it and using URL-safe unpadded base64-encoding (as described in RFC4648) on the hashed result.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "clientName": "clientName references the client that created this token.", - "expiresIn": "expiresIn is the seconds from CreationTime before this token expires.", - "scopes": "scopes is an array of the requested scopes.", - "redirectURI": "redirectURI is the redirection associated with the token.", - "userName": "userName is the user name associated with this token", - "userUID": "userUID is the unique UID associated with this token", - "authorizeToken": "authorizeToken contains the token that authorized this token", - "refreshToken": "refreshToken is the value by which this token can be renewed. Can be blank.", - "inactivityTimeoutSeconds": "inactivityTimeoutSeconds is the value in seconds, from the CreationTimestamp, after which this token can no longer be used. The value is automatically incremented when the token is used.", -} - -func (OAuthAccessToken) SwaggerDoc() map[string]string { - return map_OAuthAccessToken -} - -var map_OAuthAccessTokenList = map[string]string{ - "": "OAuthAccessTokenList is a collection of OAuth access tokens\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of OAuth access tokens", -} - -func (OAuthAccessTokenList) SwaggerDoc() map[string]string { - return map_OAuthAccessTokenList -} - -var map_OAuthAuthorizeToken = map[string]string{ - "": "OAuthAuthorizeToken describes an OAuth authorization token\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "clientName": "clientName references the client that created this token.", - "expiresIn": "expiresIn is the seconds from CreationTime before this token expires.", - "scopes": "scopes is an array of the requested scopes.", - "redirectURI": "redirectURI is the redirection associated with the token.", - "state": "state data from request", - "userName": "userName is the user name associated with this token", - "userUID": "userUID is the unique UID associated with this token. UserUID and UserName must both match for this token to be valid.", - "codeChallenge": "codeChallenge is the optional code_challenge associated with this authorization code, as described in rfc7636", - "codeChallengeMethod": "codeChallengeMethod is the optional code_challenge_method associated with this authorization code, as described in rfc7636", -} - -func (OAuthAuthorizeToken) SwaggerDoc() map[string]string { - return map_OAuthAuthorizeToken -} - -var map_OAuthAuthorizeTokenList = map[string]string{ - "": "OAuthAuthorizeTokenList is a collection of OAuth authorization tokens\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of OAuth authorization tokens", -} - -func (OAuthAuthorizeTokenList) SwaggerDoc() map[string]string { - return map_OAuthAuthorizeTokenList -} - -var map_OAuthClient = map[string]string{ - "": "OAuthClient describes an OAuth client\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "secret": "secret is the unique secret associated with a client", - "additionalSecrets": "additionalSecrets holds other secrets that may be used to identify the client. This is useful for rotation and for service account token validation", - "respondWithChallenges": "respondWithChallenges indicates whether the client wants authentication needed responses made in the form of challenges instead of redirects", - "redirectURIs": "redirectURIs is the valid redirection URIs associated with a client", - "grantMethod": "grantMethod is a required field which determines how to handle grants for this client. Valid grant handling methods are:\n - auto: always approves grant requests, useful for trusted clients\n - prompt: prompts the end user for approval of grant requests, useful for third-party clients", - "scopeRestrictions": "scopeRestrictions describes which scopes this client can request. Each requested scope is checked against each restriction. If any restriction matches, then the scope is allowed. If no restriction matches, then the scope is denied.", - "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds overrides the default access token max age for tokens granted to this client. 0 means no expiration.", - "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds overrides the default token inactivity timeout for tokens granted to this 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. This value needs to be set only if the default set in configuration is not appropriate for this client. Valid values are: - 0: Tokens for this client never time out - X: Tokens time out if there is no activity for X seconds The current minimum allowed value for X is 300 (5 minutes)\n\nWARNING: existing tokens' timeout will not be affected (lowered) by changing this value", -} - -func (OAuthClient) SwaggerDoc() map[string]string { - return map_OAuthClient -} - -var map_OAuthClientAuthorization = map[string]string{ - "": "OAuthClientAuthorization describes an authorization created by an OAuth client\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "clientName": "clientName references the client that created this authorization", - "userName": "userName is the user name that authorized this client", - "userUID": "userUID is the unique UID associated with this authorization. UserUID and UserName must both match for this authorization to be valid.", - "scopes": "scopes is an array of the granted scopes.", -} - -func (OAuthClientAuthorization) SwaggerDoc() map[string]string { - return map_OAuthClientAuthorization -} - -var map_OAuthClientAuthorizationList = map[string]string{ - "": "OAuthClientAuthorizationList is a collection of OAuth client authorizations\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of OAuth client authorizations", -} - -func (OAuthClientAuthorizationList) SwaggerDoc() map[string]string { - return map_OAuthClientAuthorizationList -} - -var map_OAuthClientList = map[string]string{ - "": "OAuthClientList is a collection of OAuth clients\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of OAuth clients", -} - -func (OAuthClientList) SwaggerDoc() map[string]string { - return map_OAuthClientList -} - -var map_OAuthRedirectReference = map[string]string{ - "": "OAuthRedirectReference is a reference to an OAuth redirect object.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "reference": "The reference to an redirect object in the current namespace.", -} - -func (OAuthRedirectReference) SwaggerDoc() map[string]string { - return map_OAuthRedirectReference -} - -var map_RedirectReference = map[string]string{ - "": "RedirectReference specifies the target in the current namespace that resolves into redirect URIs. Only the 'Route' kind is currently allowed.", - "group": "The group of the target that is being referred to.", - "kind": "The kind of the target that is being referred to. Currently, only 'Route' is allowed.", - "name": "The name of the target that is being referred to. e.g. name of the Route.", -} - -func (RedirectReference) SwaggerDoc() map[string]string { - return map_RedirectReference -} - -var map_ScopeRestriction = map[string]string{ - "": "ScopeRestriction describe one restriction on scopes. Exactly one option must be non-nil.", - "literals": "ExactValues means the scope has to match a particular set of strings exactly", - "clusterRole": "clusterRole describes a set of restrictions for cluster role scoping.", -} - -func (ScopeRestriction) SwaggerDoc() map[string]string { - return map_ScopeRestriction -} - -var map_UserOAuthAccessTokenList = map[string]string{ - "": "UserOAuthAccessTokenList is a collection of access tokens issued on behalf of the requesting user\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (UserOAuthAccessTokenList) SwaggerDoc() map[string]string { - return map_UserOAuthAccessTokenList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/.codegen.yaml b/vendor/github.com/openshift/api/openshiftcontrolplane/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/install.go b/vendor/github.com/openshift/api/openshiftcontrolplane/install.go deleted file mode 100644 index 5c745fd7f..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package openshiftcontrolplane - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - openshiftcontrolplanev1 "github.com/openshift/api/openshiftcontrolplane/v1" -) - -const ( - GroupName = "openshiftcontrolplane.config.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(openshiftcontrolplanev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/doc.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/doc.go deleted file mode 100644 index 706f46006..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.openshiftcontrolplane.v1 - -// +groupName=openshiftcontrolplane.config.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/register.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/register.go deleted file mode 100644 index 3d0bb20f2..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - osinv1 "github.com/openshift/api/osin/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "openshiftcontrolplane.config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, osinv1.Install, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &OpenShiftAPIServerConfig{}, - &OpenShiftControllerManagerConfig{}, - &BuildDefaultsConfig{}, - &BuildOverridesConfig{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go deleted file mode 100644 index 0d71e3f8b..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/types.go +++ /dev/null @@ -1,489 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - buildv1 "github.com/openshift/api/build/v1" - configv1 "github.com/openshift/api/config/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type OpenShiftAPIServerConfig struct { - metav1.TypeMeta `json:",inline"` - - // provides the standard apiserver configuration - configv1.GenericAPIServerConfig `json:",inline"` - - // aggregatorConfig contains information about how to verify the aggregator front proxy - AggregatorConfig FrontProxyConfig `json:"aggregatorConfig"` - - // imagePolicyConfig feeds the image policy admission plugin - ImagePolicyConfig ImagePolicyConfig `json:"imagePolicyConfig"` - - // projectConfig feeds an admission plugin - ProjectConfig ProjectConfig `json:"projectConfig"` - - // routingConfig holds information about routing and route generation - RoutingConfig RoutingConfig `json:"routingConfig"` - - // serviceAccountOAuthGrantMethod is used for determining client authorization for service account oauth client. - // It must be either: deny, prompt, or "" - ServiceAccountOAuthGrantMethod GrantHandlerType `json:"serviceAccountOAuthGrantMethod"` - - // jenkinsPipelineConfig holds information about the default Jenkins template - // used for JenkinsPipeline build strategy. - // TODO this needs to become a normal plugin config - JenkinsPipelineConfig JenkinsPipelineConfig `json:"jenkinsPipelineConfig"` - - // cloudProviderFile points to the cloud config file - // TODO this needs to become a normal plugin config - CloudProviderFile string `json:"cloudProviderFile"` - - // TODO this needs to be removed. - APIServerArguments map[string][]string `json:"apiServerArguments"` - - // apiServers holds information about enabled/disabled API servers - APIServers APIServers `json:"apiServers"` -} - -type APIServers struct { - // perGroupOptions is a list of enabled/disabled API servers in addition to the defaults - PerGroupOptions []PerGroupOptions `json:"perGroupOptions"` -} - -type PerGroupOptions struct { - // name is an API server name (see OpenShiftAPIserverName - // typed constants for a complete list of available API servers). - Name OpenShiftAPIserverName `json:"name"` - - // enabledVersions is a list of versions that must be enabled in addition to the defaults. - // Must not collide with the list of disabled versions - EnabledVersions []string `json:"enabledVersions"` - - // disabledVersions is a list of versions that must be disabled in addition to the defaults. - // Must not collide with the list of enabled versions - DisabledVersions []string `json:"disabledVersions"` -} - -type OpenShiftAPIserverName string - -const ( - OpenShiftAppsAPIserver OpenShiftAPIserverName = "apps.openshift.io" - OpenShiftAuthorizationAPIserver OpenShiftAPIserverName = "authorization.openshift.io" - OpenShiftBuildAPIserver OpenShiftAPIserverName = "build.openshift.io" - OpenShiftImageAPIserver OpenShiftAPIserverName = "image.openshift.io" - OpenShiftProjectAPIserver OpenShiftAPIserverName = "project.openshift.io" - OpenShiftQuotaAPIserver OpenShiftAPIserverName = "quota.openshift.io" - OpenShiftRouteAPIserver OpenShiftAPIserverName = "route.openshift.io" - OpenShiftSecurityAPIserver OpenShiftAPIserverName = "security.openshift.io" - OpenShiftTemplateAPIserver OpenShiftAPIserverName = "template.openshift.io" -) - -type FrontProxyConfig struct { - // clientCA is a path to the CA bundle to use to verify the common name of the front proxy's client cert - ClientCA string `json:"clientCA"` - // allowedNames is an optional list of common names to require a match from. - AllowedNames []string `json:"allowedNames"` - - // usernameHeaders is the set of headers to check for the username - UsernameHeaders []string `json:"usernameHeaders"` - // groupHeaders is the set of headers to check for groups - GroupHeaders []string `json:"groupHeaders"` - // extraHeaderPrefixes is the set of header prefixes to check for user extra - ExtraHeaderPrefixes []string `json:"extraHeaderPrefixes"` -} - -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" -) - -// RoutingConfig holds the necessary configuration options for routing to subdomains -type RoutingConfig struct { - // subdomain is the suffix appended to $service.$namespace. to form the default route hostname - // DEPRECATED: This field is being replaced by routers setting their own defaults. This is the - // "default" route. - Subdomain string `json:"subdomain"` -} - -// ImportModeType describes how to import an image manifest. -// +enum -// +kubebuilder:validation:Enum:="";Legacy;PreserveOriginal -type ImportModeType string - -const ( - // ImportModeLegacy indicates that the legacy behaviour should be used. - // For manifest lists, the legacy behaviour will discard the manifest list and import a single - // sub-manifest. In this case, the platform is chosen in the following order of priority: - // 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. - // This mode is the default. - ImportModeLegacy ImportModeType = "Legacy" - // ImportModePreserveOriginal indicates that the original manifest will be preserved. - // For manifest lists, the manifest list and all its sub-manifests will be imported. - ImportModePreserveOriginal ImportModeType = "PreserveOriginal" -) - -type ImagePolicyConfig struct { - // maxImagesBulkImportedPerRepository controls the number of images that are imported when a user - // does a bulk import of a container repository. This number is set low to prevent users from - // importing large numbers of images accidentally. Set -1 for no limit. - MaxImagesBulkImportedPerRepository int `json:"maxImagesBulkImportedPerRepository"` - // 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. - AllowedRegistriesForImport AllowedRegistries `json:"allowedRegistriesForImport"` - - // internalRegistryHostname sets the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. - InternalRegistryHostname string `json:"internalRegistryHostname"` - // 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. - ExternalRegistryHostnames []string `json:"externalRegistryHostnames"` - - // additionalTrustedCA is a path to a pem bundle file containing additional CAs that - // should be trusted during imagestream import. - AdditionalTrustedCA string `json:"additionalTrustedCA"` - - // imageStreamImportMode provides the import mode value for imagestreams. - // It can be `Legacy` or `PreserveOriginal`. `Legacy` indicates that the legacy behaviour - // should be used. For manifest lists, the legacy behaviour will discard the manifest list - // and import a single sub-manifest. In this case, the platform is chosen in the following - // order of priority: 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first - // manifest in the list. `PreserveOriginal` indicates that the original manifest will be preserved. - // For manifest lists, the manifest list and all its sub-manifests will be imported.If this value - // is specified, this setting is applied to all newly created imagestreams which do not have the - // value set. - // +openshift:enable:FeatureGate=ImageStreamImportMode - // +optional - ImageStreamImportMode ImportModeType `json:"imageStreamImportMode"` -} - -// AllowedRegistries represents a list of registries allowed for the image import. -type AllowedRegistries []RegistryLocation - -// RegistryLocation contains a location of the registry specified by the registry domain -// name. The domain name might include wildcards, like '*' or '??'. -type RegistryLocation struct { - // 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. - DomainName string `json:"domainName"` - // insecure indicates whether the registry is secure (https) or insecure (http) - // By default (if not specified) the registry is assumed as secure. - Insecure bool `json:"insecure,omitempty"` -} - -type ProjectConfig struct { - // defaultNodeSelector holds default project node label selector - DefaultNodeSelector string `json:"defaultNodeSelector"` - - // 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. - // It is in the format namespace/template and it is optional. - // If it is not specified, a default template is used. - ProjectRequestTemplate string `json:"projectRequestTemplate"` -} - -// JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy -type JenkinsPipelineConfig struct { - // autoProvisionEnabled determines whether a Jenkins server will be spawned from the provided - // template when the first build config in the project with type JenkinsPipeline - // is created. When not specified this option defaults to true. - AutoProvisionEnabled *bool `json:"autoProvisionEnabled"` - // templateNamespace contains the namespace name where the Jenkins template is stored - TemplateNamespace string `json:"templateNamespace"` - // templateName is the name of the default Jenkins template - TemplateName string `json:"templateName"` - // serviceName is the name of the Jenkins service OpenShift uses to detect - // whether a Jenkins pipeline handler has already been installed in a project. - // This value *must* match a service name in the provided template. - ServiceName string `json:"serviceName"` - // parameters specifies a set of optional parameters to the Jenkins template. - Parameters map[string]string `json:"parameters"` -} - -// OpenShiftControllerName defines a string type used to represent the various -// OpenShift controllers within openshift-controller-manager. These constants serve as identifiers -// for the controllers and are used on both openshift/openshift-controller-manager -// and openshift/cluster-openshift-controller-manager-operator repositories. -type OpenShiftControllerName string - -const ( - OpenShiftServiceAccountController OpenShiftControllerName = "openshift.io/serviceaccount" - OpenShiftDefaultRoleBindingsController OpenShiftControllerName = "openshift.io/default-rolebindings" - OpenShiftServiceAccountPullSecretsController OpenShiftControllerName = "openshift.io/serviceaccount-pull-secrets" - OpenShiftOriginNamespaceController OpenShiftControllerName = "openshift.io/origin-namespace" - OpenShiftBuildController OpenShiftControllerName = "openshift.io/build" - OpenShiftBuildConfigChangeController OpenShiftControllerName = "openshift.io/build-config-change" - OpenShiftBuilderServiceAccountController OpenShiftControllerName = "openshift.io/builder-serviceaccount" - OpenShiftBuilderRoleBindingsController OpenShiftControllerName = "openshift.io/builder-rolebindings" - OpenShiftDeployerController OpenShiftControllerName = "openshift.io/deployer" - OpenShiftDeployerServiceAccountController OpenShiftControllerName = "openshift.io/deployer-serviceaccount" - OpenShiftDeployerRoleBindingsController OpenShiftControllerName = "openshift.io/deployer-rolebindings" - OpenShiftDeploymentConfigController OpenShiftControllerName = "openshift.io/deploymentconfig" - OpenShiftImagePullerRoleBindingsController OpenShiftControllerName = "openshift.io/image-puller-rolebindings" - OpenShiftImageTriggerController OpenShiftControllerName = "openshift.io/image-trigger" - OpenShiftImageImportController OpenShiftControllerName = "openshift.io/image-import" - OpenShiftImageSignatureImportController OpenShiftControllerName = "openshift.io/image-signature-import" - OpenShiftTemplateInstanceController OpenShiftControllerName = "openshift.io/templateinstance" - OpenShiftTemplateInstanceFinalizerController OpenShiftControllerName = "openshift.io/templateinstancefinalizer" - OpenShiftUnidlingController OpenShiftControllerName = "openshift.io/unidling" - OpenShiftIngressIPController OpenShiftControllerName = "openshift.io/ingress-ip" - OpenShiftIngressToRouteController OpenShiftControllerName = "openshift.io/ingress-to-route" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type OpenShiftControllerManagerConfig struct { - metav1.TypeMeta `json:",inline"` - - // KubeClientConfig is no longer being used. - // The field is being ignored by OCM. - // - // KubeClientConfig configv1.KubeClientConfig `json:"kubeClientConfig"` - - // servingInfo describes how to start serving - ServingInfo *configv1.HTTPServingInfo `json:"servingInfo"` - - // leaderElection defines the configuration for electing a controller instance to make changes to - // the cluster. If unspecified, the ControllerTTL value is checked to determine whether the - // legacy direct etcd election code will be used. - LeaderElection configv1.LeaderElection `json:"leaderElection"` - - // controllers is a list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller "+ - // named 'foo', '-foo' disables the controller named 'foo'. - // Defaults to "*". - Controllers []string `json:"controllers"` - - ResourceQuota ResourceQuotaControllerConfig `json:"resourceQuota"` - ServiceServingCert ServiceServingCert `json:"serviceServingCert"` - Deployer DeployerControllerConfig `json:"deployer"` - Build BuildControllerConfig `json:"build"` - ServiceAccount ServiceAccountControllerConfig `json:"serviceAccount"` - DockerPullSecret DockerPullSecretControllerConfig `json:"dockerPullSecret"` - Network NetworkControllerConfig `json:"network"` - Ingress IngressControllerConfig `json:"ingress"` - ImageImport ImageImportControllerConfig `json:"imageImport"` - SecurityAllocator SecurityAllocator `json:"securityAllocator"` - - // featureGates are the set of extra OpenShift feature gates for openshift-controller-manager. - // These feature gates can be used to enable features that are tech preview or otherwise not available on - // OpenShift by default. - FeatureGates []string `json:"featureGates"` -} - -type DeployerControllerConfig struct { - ImageTemplateFormat ImageConfig `json:"imageTemplateFormat"` -} - -type BuildControllerConfig struct { - ImageTemplateFormat ImageConfig `json:"imageTemplateFormat"` - - BuildDefaults *BuildDefaultsConfig `json:"buildDefaults"` - BuildOverrides *BuildOverridesConfig `json:"buildOverrides"` - - // additionalTrustedCA is a path to a pem bundle file containing additional CAs that - // should be trusted for image pushes and pulls during builds. - AdditionalTrustedCA string `json:"additionalTrustedCA"` -} - -type ResourceQuotaControllerConfig struct { - ConcurrentSyncs int32 `json:"concurrentSyncs"` - SyncPeriod metav1.Duration `json:"syncPeriod"` - MinResyncPeriod metav1.Duration `json:"minResyncPeriod"` -} - -type IngressControllerConfig struct { - // ingressIPNetworkCIDR controls the range to assign ingress ips from for services of type LoadBalancer on bare - // metal. If empty, ingress ips will not be assigned. It may contain a single CIDR that will be allocated from. - // For security reasons, you should ensure that this range does not overlap with the CIDRs reserved for external ips, - // nodes, pods, or services. - IngressIPNetworkCIDR string `json:"ingressIPNetworkCIDR"` -} - -// MasterNetworkConfig to be passed to the compiled in network plugin -type NetworkControllerConfig struct { - NetworkPluginName string `json:"networkPluginName"` - // clusterNetworks contains a list of cluster networks that defines the global overlay networks L3 space. - ClusterNetworks []ClusterNetworkEntry `json:"clusterNetworks"` - ServiceNetworkCIDR string `json:"serviceNetworkCIDR"` - VXLANPort uint32 `json:"vxlanPort"` -} - -type ServiceAccountControllerConfig struct { - // managedNames is a list of service account names that will be auto-created in every namespace. - // If no names are specified, the ServiceAccountsController will not be started. - ManagedNames []string `json:"managedNames"` -} - -type DockerPullSecretControllerConfig struct { - // registryURLs is a list of urls that the docker pull secrets should be valid for. - RegistryURLs []string `json:"registryURLs"` - - // internalRegistryHostname is the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. Docker pull secrets - // will be generated for this registry. - InternalRegistryHostname string `json:"internalRegistryHostname"` -} - -type ImageImportControllerConfig struct { - // maxScheduledImageImportsPerMinute is the maximum number of image streams that will be imported in the background per minute. - // The default value is 60. Set to -1 for unlimited. - MaxScheduledImageImportsPerMinute int `json:"maxScheduledImageImportsPerMinute"` - // disableScheduledImport allows scheduled background import of images to be disabled. - DisableScheduledImport bool `json:"disableScheduledImport"` - // scheduledImageImportMinimumIntervalSeconds is the minimum number of seconds that can elapse between when image streams - // scheduled for background import are checked against the upstream repository. The default value is 15 minutes. - ScheduledImageImportMinimumIntervalSeconds int `json:"scheduledImageImportMinimumIntervalSeconds"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildDefaultsConfig controls the default information for Builds -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BuildDefaultsConfig struct { - metav1.TypeMeta `json:",inline"` - - // gitHTTPProxy is the location of the HTTPProxy for Git source - GitHTTPProxy string `json:"gitHTTPProxy,omitempty"` - - // gitHTTPSProxy is the location of the HTTPSProxy for Git source - GitHTTPSProxy string `json:"gitHTTPSProxy,omitempty"` - - // gitNoProxy is the list of domains for which the proxy should not be used - GitNoProxy string `json:"gitNoProxy,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 - Env []corev1.EnvVar `json:"env,omitempty"` - - // sourceStrategyDefaults are default values that apply to builds using the - // source strategy. - SourceStrategyDefaults *SourceStrategyDefaultsConfig `json:"sourceStrategyDefaults,omitempty"` - - // imageLabels is a list of 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. - ImageLabels []buildv1.ImageLabel `json:"imageLabels,omitempty"` - - // nodeSelector is a selector which must be true for the build pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // annotations are annotations that will be added to the build pod - Annotations map[string]string `json:"annotations,omitempty"` - - // resources defines resource requirements to execute the build. - Resources corev1.ResourceRequirements `json:"resources,omitempty"` -} - -// SourceStrategyDefaultsConfig contains values that apply to builds using the -// source strategy. -type SourceStrategyDefaultsConfig struct { - // incremental indicates if s2i build strategies should perform an incremental - // build or not - Incremental *bool `json:"incremental,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BuildOverridesConfig controls override settings for builds -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BuildOverridesConfig struct { - metav1.TypeMeta `json:",inline"` - - // forcePull overrides, if set, the equivalent value in the builds, - // i.e. false disables force pull for all builds, - // true enables force pull for all builds, - // independently of what each build specifies itself - // +optional - ForcePull *bool `json:"forcePull,omitempty"` - - // imageLabels is a list of 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. - ImageLabels []buildv1.ImageLabel `json:"imageLabels,omitempty"` - - // nodeSelector is a selector which must be true for the build pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // annotations are annotations that will be added to the build pod - Annotations map[string]string `json:"annotations,omitempty"` - - // tolerations is a list of Tolerations that will override any existing - // tolerations set on a build pod. - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// ImageConfig holds the necessary configuration options for building image names for system components -type ImageConfig struct { - // format is the format of the name to be built for the system component - Format string `json:"format"` - // latest determines if the latest tag will be pulled from the registry - Latest bool `json:"latest"` -} - -// ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for -// pods fulfilling a service to serve with. -type ServiceServingCert struct { - // signer holds the signing information used to automatically sign serving certificates. - // If this value is nil, then certs are not signed automatically. - Signer *configv1.CertInfo `json:"signer"` -} - -// ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips. -type ClusterNetworkEntry struct { - // cidr defines the total range of a cluster networks address space. - CIDR string `json:"cidr"` - // hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pod. - HostSubnetLength uint32 `json:"hostSubnetLength"` -} - -// SecurityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled. -type SecurityAllocator struct { - // uidAllocatorRange defines the total set of Unix user IDs (UIDs) that will be allocated to projects automatically, and the size of the - // block each namespace gets. For example, 1000-1999/10 will allocate ten UIDs per namespace, and will be able to allocate up to 100 blocks - // before running out of space. The default is to allocate from 1 billion to 2 billion in 10k blocks (which is the expected size of the - // ranges container images will use once user namespaces are started). - UIDAllocatorRange string `json:"uidAllocatorRange"` - // mcsAllocatorRange defines the range of MCS categories that will be assigned to namespaces. The format is - // "/[,]". The default is "s0/2" and will allocate from c0 -> c1023, which means a total of 535k labels - // are available (1024 choose 2 ~ 535k). If this value is changed after startup, new projects may receive labels that are already allocated - // to other projects. Prefix may be any valid SELinux set of terms (including user, role, and type), although leaving them as the default - // will allow the server to set them automatically. - // - // Examples: - // * s0:/2 - Allocate labels from s0:c0,c0 to s0:c511,c511 - // * s0:/2,512 - Allocate labels from s0:c0,c0,c0 to s0:c511,c511,511 - // - MCSAllocatorRange string `json:"mcsAllocatorRange"` - // mcsLabelsPerProject defines the number of labels that should be reserved per project. The default is 5 to match the default UID and MCS - // ranges (100k namespaces, 535k/5 labels). - MCSLabelsPerProject int `json:"mcsLabelsPerProject"` -} diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go deleted file mode 100644 index 4d7774caa..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,678 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - buildv1 "github.com/openshift/api/build/v1" - configv1 "github.com/openshift/api/config/v1" - corev1 "k8s.io/api/core/v1" - 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 *APIServers) DeepCopyInto(out *APIServers) { - *out = *in - if in.PerGroupOptions != nil { - in, out := &in.PerGroupOptions, &out.PerGroupOptions - *out = make([]PerGroupOptions, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServers. -func (in *APIServers) DeepCopy() *APIServers { - if in == nil { - return nil - } - out := new(APIServers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in AllowedRegistries) DeepCopyInto(out *AllowedRegistries) { - { - in := &in - *out = make(AllowedRegistries, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedRegistries. -func (in AllowedRegistries) DeepCopy() AllowedRegistries { - if in == nil { - return nil - } - out := new(AllowedRegistries) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildControllerConfig) DeepCopyInto(out *BuildControllerConfig) { - *out = *in - out.ImageTemplateFormat = in.ImageTemplateFormat - if in.BuildDefaults != nil { - in, out := &in.BuildDefaults, &out.BuildDefaults - *out = new(BuildDefaultsConfig) - (*in).DeepCopyInto(*out) - } - if in.BuildOverrides != nil { - in, out := &in.BuildOverrides, &out.BuildOverrides - *out = new(BuildOverridesConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildControllerConfig. -func (in *BuildControllerConfig) DeepCopy() *BuildControllerConfig { - if in == nil { - return nil - } - out := new(BuildControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BuildDefaultsConfig) DeepCopyInto(out *BuildDefaultsConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.SourceStrategyDefaults != nil { - in, out := &in.SourceStrategyDefaults, &out.SourceStrategyDefaults - *out = new(SourceStrategyDefaultsConfig) - (*in).DeepCopyInto(*out) - } - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]buildv1.ImageLabel, len(*in)) - copy(*out, *in) - } - 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.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - in.Resources.DeepCopyInto(&out.Resources) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildDefaultsConfig. -func (in *BuildDefaultsConfig) DeepCopy() *BuildDefaultsConfig { - if in == nil { - return nil - } - out := new(BuildDefaultsConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildDefaultsConfig) 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 *BuildOverridesConfig) DeepCopyInto(out *BuildOverridesConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ForcePull != nil { - in, out := &in.ForcePull, &out.ForcePull - *out = new(bool) - **out = **in - } - if in.ImageLabels != nil { - in, out := &in.ImageLabels, &out.ImageLabels - *out = make([]buildv1.ImageLabel, len(*in)) - copy(*out, *in) - } - 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.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *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([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BuildOverridesConfig. -func (in *BuildOverridesConfig) DeepCopy() *BuildOverridesConfig { - if in == nil { - return nil - } - out := new(BuildOverridesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BuildOverridesConfig) 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 *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. -func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { - if in == nil { - return nil - } - out := new(ClusterNetworkEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeployerControllerConfig) DeepCopyInto(out *DeployerControllerConfig) { - *out = *in - out.ImageTemplateFormat = in.ImageTemplateFormat - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeployerControllerConfig. -func (in *DeployerControllerConfig) DeepCopy() *DeployerControllerConfig { - if in == nil { - return nil - } - out := new(DeployerControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DockerPullSecretControllerConfig) DeepCopyInto(out *DockerPullSecretControllerConfig) { - *out = *in - if in.RegistryURLs != nil { - in, out := &in.RegistryURLs, &out.RegistryURLs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerPullSecretControllerConfig. -func (in *DockerPullSecretControllerConfig) DeepCopy() *DockerPullSecretControllerConfig { - if in == nil { - return nil - } - out := new(DockerPullSecretControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FrontProxyConfig) DeepCopyInto(out *FrontProxyConfig) { - *out = *in - if in.AllowedNames != nil { - in, out := &in.AllowedNames, &out.AllowedNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.UsernameHeaders != nil { - in, out := &in.UsernameHeaders, &out.UsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GroupHeaders != nil { - in, out := &in.GroupHeaders, &out.GroupHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraHeaderPrefixes != nil { - in, out := &in.ExtraHeaderPrefixes, &out.ExtraHeaderPrefixes - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FrontProxyConfig. -func (in *FrontProxyConfig) DeepCopy() *FrontProxyConfig { - if in == nil { - return nil - } - out := new(FrontProxyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageConfig) DeepCopyInto(out *ImageConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageConfig. -func (in *ImageConfig) DeepCopy() *ImageConfig { - if in == nil { - return nil - } - out := new(ImageConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImageImportControllerConfig) DeepCopyInto(out *ImageImportControllerConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageImportControllerConfig. -func (in *ImageImportControllerConfig) DeepCopy() *ImageImportControllerConfig { - if in == nil { - return nil - } - out := new(ImageImportControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ImagePolicyConfig) DeepCopyInto(out *ImagePolicyConfig) { - *out = *in - if in.AllowedRegistriesForImport != nil { - in, out := &in.AllowedRegistriesForImport, &out.AllowedRegistriesForImport - *out = make(AllowedRegistries, len(*in)) - copy(*out, *in) - } - if in.ExternalRegistryHostnames != nil { - in, out := &in.ExternalRegistryHostnames, &out.ExternalRegistryHostnames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePolicyConfig. -func (in *ImagePolicyConfig) DeepCopy() *ImagePolicyConfig { - if in == nil { - return nil - } - out := new(ImagePolicyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerConfig) DeepCopyInto(out *IngressControllerConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerConfig. -func (in *IngressControllerConfig) DeepCopy() *IngressControllerConfig { - if in == nil { - return nil - } - out := new(IngressControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JenkinsPipelineConfig) DeepCopyInto(out *JenkinsPipelineConfig) { - *out = *in - if in.AutoProvisionEnabled != nil { - in, out := &in.AutoProvisionEnabled, &out.AutoProvisionEnabled - *out = new(bool) - **out = **in - } - if in.Parameters != nil { - in, out := &in.Parameters, &out.Parameters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsPipelineConfig. -func (in *JenkinsPipelineConfig) DeepCopy() *JenkinsPipelineConfig { - if in == nil { - return nil - } - out := new(JenkinsPipelineConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkControllerConfig) DeepCopyInto(out *NetworkControllerConfig) { - *out = *in - if in.ClusterNetworks != nil { - in, out := &in.ClusterNetworks, &out.ClusterNetworks - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkControllerConfig. -func (in *NetworkControllerConfig) DeepCopy() *NetworkControllerConfig { - if in == nil { - return nil - } - out := new(NetworkControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftAPIServerConfig) DeepCopyInto(out *OpenShiftAPIServerConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.GenericAPIServerConfig.DeepCopyInto(&out.GenericAPIServerConfig) - in.AggregatorConfig.DeepCopyInto(&out.AggregatorConfig) - in.ImagePolicyConfig.DeepCopyInto(&out.ImagePolicyConfig) - out.ProjectConfig = in.ProjectConfig - out.RoutingConfig = in.RoutingConfig - in.JenkinsPipelineConfig.DeepCopyInto(&out.JenkinsPipelineConfig) - if in.APIServerArguments != nil { - in, out := &in.APIServerArguments, &out.APIServerArguments - *out = make(map[string][]string, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make([]string, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - in.APIServers.DeepCopyInto(&out.APIServers) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftAPIServerConfig. -func (in *OpenShiftAPIServerConfig) DeepCopy() *OpenShiftAPIServerConfig { - if in == nil { - return nil - } - out := new(OpenShiftAPIServerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftAPIServerConfig) 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 *OpenShiftControllerManagerConfig) DeepCopyInto(out *OpenShiftControllerManagerConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ServingInfo != nil { - in, out := &in.ServingInfo, &out.ServingInfo - *out = new(configv1.HTTPServingInfo) - (*in).DeepCopyInto(*out) - } - out.LeaderElection = in.LeaderElection - if in.Controllers != nil { - in, out := &in.Controllers, &out.Controllers - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.ResourceQuota = in.ResourceQuota - in.ServiceServingCert.DeepCopyInto(&out.ServiceServingCert) - out.Deployer = in.Deployer - in.Build.DeepCopyInto(&out.Build) - in.ServiceAccount.DeepCopyInto(&out.ServiceAccount) - in.DockerPullSecret.DeepCopyInto(&out.DockerPullSecret) - in.Network.DeepCopyInto(&out.Network) - out.Ingress = in.Ingress - out.ImageImport = in.ImageImport - out.SecurityAllocator = in.SecurityAllocator - if in.FeatureGates != nil { - in, out := &in.FeatureGates, &out.FeatureGates - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftControllerManagerConfig. -func (in *OpenShiftControllerManagerConfig) DeepCopy() *OpenShiftControllerManagerConfig { - if in == nil { - return nil - } - out := new(OpenShiftControllerManagerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftControllerManagerConfig) 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 *PerGroupOptions) DeepCopyInto(out *PerGroupOptions) { - *out = *in - if in.EnabledVersions != nil { - in, out := &in.EnabledVersions, &out.EnabledVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.DisabledVersions != nil { - in, out := &in.DisabledVersions, &out.DisabledVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerGroupOptions. -func (in *PerGroupOptions) DeepCopy() *PerGroupOptions { - if in == nil { - return nil - } - out := new(PerGroupOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectConfig) DeepCopyInto(out *ProjectConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectConfig. -func (in *ProjectConfig) DeepCopy() *ProjectConfig { - if in == nil { - return nil - } - out := new(ProjectConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RegistryLocation) DeepCopyInto(out *RegistryLocation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryLocation. -func (in *RegistryLocation) DeepCopy() *RegistryLocation { - if in == nil { - return nil - } - out := new(RegistryLocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaControllerConfig) DeepCopyInto(out *ResourceQuotaControllerConfig) { - *out = *in - out.SyncPeriod = in.SyncPeriod - out.MinResyncPeriod = in.MinResyncPeriod - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaControllerConfig. -func (in *ResourceQuotaControllerConfig) DeepCopy() *ResourceQuotaControllerConfig { - if in == nil { - return nil - } - out := new(ResourceQuotaControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoutingConfig) DeepCopyInto(out *RoutingConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutingConfig. -func (in *RoutingConfig) DeepCopy() *RoutingConfig { - if in == nil { - return nil - } - out := new(RoutingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityAllocator) DeepCopyInto(out *SecurityAllocator) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityAllocator. -func (in *SecurityAllocator) DeepCopy() *SecurityAllocator { - if in == nil { - return nil - } - out := new(SecurityAllocator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountControllerConfig) DeepCopyInto(out *ServiceAccountControllerConfig) { - *out = *in - if in.ManagedNames != nil { - in, out := &in.ManagedNames, &out.ManagedNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountControllerConfig. -func (in *ServiceAccountControllerConfig) DeepCopy() *ServiceAccountControllerConfig { - if in == nil { - return nil - } - out := new(ServiceAccountControllerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceServingCert) DeepCopyInto(out *ServiceServingCert) { - *out = *in - if in.Signer != nil { - in, out := &in.Signer, &out.Signer - *out = new(configv1.CertInfo) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceServingCert. -func (in *ServiceServingCert) DeepCopy() *ServiceServingCert { - if in == nil { - return nil - } - out := new(ServiceServingCert) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SourceStrategyDefaultsConfig) DeepCopyInto(out *SourceStrategyDefaultsConfig) { - *out = *in - if in.Incremental != nil { - in, out := &in.Incremental, &out.Incremental - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SourceStrategyDefaultsConfig. -func (in *SourceStrategyDefaultsConfig) DeepCopy() *SourceStrategyDefaultsConfig { - if in == nil { - return nil - } - out := new(SourceStrategyDefaultsConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.model_name.go deleted file mode 100644 index b843518b1..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.model_name.go +++ /dev/null @@ -1,131 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServers) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.APIServers" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.BuildControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildDefaultsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.BuildDefaultsConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BuildOverridesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.BuildOverridesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetworkEntry) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ClusterNetworkEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeployerControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.DeployerControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DockerPullSecretControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.DockerPullSecretControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FrontProxyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.FrontProxyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ImageConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageImportControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ImageImportControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImagePolicyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ImagePolicyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.IngressControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JenkinsPipelineConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.JenkinsPipelineConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.NetworkControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftAPIServerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.OpenShiftAPIServerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftControllerManagerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.OpenShiftControllerManagerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerGroupOptions) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.PerGroupOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ProjectConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RegistryLocation) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.RegistryLocation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceQuotaControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ResourceQuotaControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoutingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.RoutingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityAllocator) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.SecurityAllocator" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountControllerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ServiceAccountControllerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceServingCert) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.ServiceServingCert" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SourceStrategyDefaultsConfig) OpenAPIModelName() string { - return "com.github.openshift.api.openshiftcontrolplane.v1.SourceStrategyDefaultsConfig" -} diff --git a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 0c73046ee..000000000 --- a/vendor/github.com/openshift/api/openshiftcontrolplane/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,258 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_APIServers = map[string]string{ - "perGroupOptions": "perGroupOptions is a list of enabled/disabled API servers in addition to the defaults", -} - -func (APIServers) SwaggerDoc() map[string]string { - return map_APIServers -} - -var map_BuildControllerConfig = map[string]string{ - "additionalTrustedCA": "additionalTrustedCA is a path to a pem bundle file containing additional CAs that should be trusted for image pushes and pulls during builds.", -} - -func (BuildControllerConfig) SwaggerDoc() map[string]string { - return map_BuildControllerConfig -} - -var map_BuildDefaultsConfig = map[string]string{ - "": "BuildDefaultsConfig controls the default information for Builds\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "gitHTTPProxy": "gitHTTPProxy is the location of the HTTPProxy for Git source", - "gitHTTPSProxy": "gitHTTPSProxy is the location of the HTTPSProxy for Git source", - "gitNoProxy": "gitNoProxy is the list of domains for which the proxy should not be used", - "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", - "sourceStrategyDefaults": "sourceStrategyDefaults are default values that apply to builds using the source strategy.", - "imageLabels": "imageLabels is a list of 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.", - "nodeSelector": "nodeSelector is a selector which must be true for the build pod to fit on a node", - "annotations": "annotations are annotations that will be added to the build pod", - "resources": "resources defines resource requirements to execute the build.", -} - -func (BuildDefaultsConfig) SwaggerDoc() map[string]string { - return map_BuildDefaultsConfig -} - -var map_BuildOverridesConfig = map[string]string{ - "": "BuildOverridesConfig controls override settings for builds\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "forcePull": "forcePull overrides, if set, the equivalent value in the builds, i.e. false disables force pull for all builds, true enables force pull for all builds, independently of what each build specifies itself", - "imageLabels": "imageLabels is a list of 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", - "annotations": "annotations are annotations that will be added to the build pod", - "tolerations": "tolerations is a list of Tolerations that will override any existing tolerations set on a build pod.", -} - -func (BuildOverridesConfig) SwaggerDoc() map[string]string { - return map_BuildOverridesConfig -} - -var map_ClusterNetworkEntry = map[string]string{ - "": "ClusterNetworkEntry defines an individual cluster network. The CIDRs cannot overlap with other cluster network CIDRs, CIDRs reserved for external ips, CIDRs reserved for service networks, and CIDRs reserved for ingress ips.", - "cidr": "cidr defines the total range of a cluster networks address space.", - "hostSubnetLength": "hostSubnetLength is the number of bits of the accompanying CIDR address to allocate to each node. eg, 8 would mean that each node would have a /24 slice of the overlay network for its pod.", -} - -func (ClusterNetworkEntry) SwaggerDoc() map[string]string { - return map_ClusterNetworkEntry -} - -var map_DockerPullSecretControllerConfig = map[string]string{ - "registryURLs": "registryURLs is a list of urls that the docker pull secrets should be valid for.", - "internalRegistryHostname": "internalRegistryHostname is the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format. Docker pull secrets will be generated for this registry.", -} - -func (DockerPullSecretControllerConfig) SwaggerDoc() map[string]string { - return map_DockerPullSecretControllerConfig -} - -var map_FrontProxyConfig = map[string]string{ - "clientCA": "clientCA is a path to the CA bundle to use to verify the common name of the front proxy's client cert", - "allowedNames": "allowedNames is an optional list of common names to require a match from.", - "usernameHeaders": "usernameHeaders is the set of headers to check for the username", - "groupHeaders": "groupHeaders is the set of headers to check for groups", - "extraHeaderPrefixes": "extraHeaderPrefixes is the set of header prefixes to check for user extra", -} - -func (FrontProxyConfig) SwaggerDoc() map[string]string { - return map_FrontProxyConfig -} - -var map_ImageConfig = map[string]string{ - "": "ImageConfig holds the necessary configuration options for building image names for system components", - "format": "format is the format of the name to be built for the system component", - "latest": "latest determines if the latest tag will be pulled from the registry", -} - -func (ImageConfig) SwaggerDoc() map[string]string { - return map_ImageConfig -} - -var map_ImageImportControllerConfig = map[string]string{ - "maxScheduledImageImportsPerMinute": "maxScheduledImageImportsPerMinute is the maximum number of image streams that will be imported in the background per minute. The default value is 60. Set to -1 for unlimited.", - "disableScheduledImport": "disableScheduledImport allows scheduled background import of images to be disabled.", - "scheduledImageImportMinimumIntervalSeconds": "scheduledImageImportMinimumIntervalSeconds is the minimum number of seconds that can elapse between when image streams scheduled for background import are checked against the upstream repository. The default value is 15 minutes.", -} - -func (ImageImportControllerConfig) SwaggerDoc() map[string]string { - return map_ImageImportControllerConfig -} - -var map_ImagePolicyConfig = map[string]string{ - "maxImagesBulkImportedPerRepository": "maxImagesBulkImportedPerRepository controls the number of images that are imported when a user does a bulk import of a container repository. This number is set low to prevent users from importing large numbers of images accidentally. Set -1 for no limit.", - "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.", - "internalRegistryHostname": "internalRegistryHostname sets the hostname for the default internal image registry. The value must be in \"hostname[:port]\" format.", - "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 path to a pem bundle file containing additional CAs that should be trusted during imagestream import.", - "imageStreamImportMode": "imageStreamImportMode provides the import mode value for imagestreams. It can be `Legacy` or `PreserveOriginal`. `Legacy` indicates that the legacy behaviour should be used. For manifest lists, the legacy behaviour will discard the manifest list and import a single sub-manifest. In this case, the platform is chosen in the following order of priority: 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. `PreserveOriginal` indicates that the original manifest will be preserved. For manifest lists, the manifest list and all its sub-manifests will be imported.If this value is specified, this setting is applied to all newly created imagestreams which do not have the value set.", -} - -func (ImagePolicyConfig) SwaggerDoc() map[string]string { - return map_ImagePolicyConfig -} - -var map_IngressControllerConfig = map[string]string{ - "ingressIPNetworkCIDR": "ingressIPNetworkCIDR controls the range to assign ingress ips from for services of type LoadBalancer on bare metal. If empty, ingress ips will not be assigned. It may contain a single CIDR that will be allocated from. For security reasons, you should ensure that this range does not overlap with the CIDRs reserved for external ips, nodes, pods, or services.", -} - -func (IngressControllerConfig) SwaggerDoc() map[string]string { - return map_IngressControllerConfig -} - -var map_JenkinsPipelineConfig = map[string]string{ - "": "JenkinsPipelineConfig holds configuration for the Jenkins pipeline strategy", - "autoProvisionEnabled": "autoProvisionEnabled determines whether a Jenkins server will be spawned from the provided template when the first build config in the project with type JenkinsPipeline is created. When not specified this option defaults to true.", - "templateNamespace": "templateNamespace contains the namespace name where the Jenkins template is stored", - "templateName": "templateName is the name of the default Jenkins template", - "serviceName": "serviceName is the name of the Jenkins service OpenShift uses to detect whether a Jenkins pipeline handler has already been installed in a project. This value *must* match a service name in the provided template.", - "parameters": "parameters specifies a set of optional parameters to the Jenkins template.", -} - -func (JenkinsPipelineConfig) SwaggerDoc() map[string]string { - return map_JenkinsPipelineConfig -} - -var map_NetworkControllerConfig = map[string]string{ - "": "MasterNetworkConfig to be passed to the compiled in network plugin", - "clusterNetworks": "clusterNetworks contains a list of cluster networks that defines the global overlay networks L3 space.", -} - -func (NetworkControllerConfig) SwaggerDoc() map[string]string { - return map_NetworkControllerConfig -} - -var map_OpenShiftAPIServerConfig = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "aggregatorConfig": "aggregatorConfig contains information about how to verify the aggregator front proxy", - "imagePolicyConfig": "imagePolicyConfig feeds the image policy admission plugin", - "projectConfig": "projectConfig feeds an admission plugin", - "routingConfig": "routingConfig holds information about routing and route generation", - "serviceAccountOAuthGrantMethod": "serviceAccountOAuthGrantMethod is used for determining client authorization for service account oauth client. It must be either: deny, prompt, or \"\"", - "jenkinsPipelineConfig": "jenkinsPipelineConfig holds information about the default Jenkins template used for JenkinsPipeline build strategy.", - "cloudProviderFile": "cloudProviderFile points to the cloud config file", - "apiServers": "apiServers holds information about enabled/disabled API servers", -} - -func (OpenShiftAPIServerConfig) SwaggerDoc() map[string]string { - return map_OpenShiftAPIServerConfig -} - -var map_OpenShiftControllerManagerConfig = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "servingInfo": "servingInfo describes how to start serving", - "leaderElection": "leaderElection defines the configuration for electing a controller instance to make changes to the cluster. If unspecified, the ControllerTTL value is checked to determine whether the legacy direct etcd election code will be used.", - "controllers": "controllers is a list of controllers to enable. '*' enables all on-by-default controllers, 'foo' enables the controller \"+ named 'foo', '-foo' disables the controller named 'foo'. Defaults to \"*\".", - "featureGates": "featureGates are the set of extra OpenShift feature gates for openshift-controller-manager. These feature gates can be used to enable features that are tech preview or otherwise not available on OpenShift by default.", -} - -func (OpenShiftControllerManagerConfig) SwaggerDoc() map[string]string { - return map_OpenShiftControllerManagerConfig -} - -var map_PerGroupOptions = map[string]string{ - "name": "name is an API server name (see OpenShiftAPIserverName typed constants for a complete list of available API servers).", - "enabledVersions": "enabledVersions is a list of versions that must be enabled in addition to the defaults. Must not collide with the list of disabled versions", - "disabledVersions": "disabledVersions is a list of versions that must be disabled in addition to the defaults. Must not collide with the list of enabled versions", -} - -func (PerGroupOptions) SwaggerDoc() map[string]string { - return map_PerGroupOptions -} - -var map_ProjectConfig = map[string]string{ - "defaultNodeSelector": "defaultNodeSelector holds default project node label selector", - "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. It is in the format namespace/template and it is optional. If it is not specified, a default template is used.", -} - -func (ProjectConfig) SwaggerDoc() map[string]string { - return map_ProjectConfig -} - -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_RoutingConfig = map[string]string{ - "": "RoutingConfig holds the necessary configuration options for routing to subdomains", - "subdomain": "subdomain is the suffix appended to $service.$namespace. to form the default route hostname DEPRECATED: This field is being replaced by routers setting their own defaults. This is the \"default\" route.", -} - -func (RoutingConfig) SwaggerDoc() map[string]string { - return map_RoutingConfig -} - -var map_SecurityAllocator = map[string]string{ - "": "SecurityAllocator controls the automatic allocation of UIDs and MCS labels to a project. If nil, allocation is disabled.", - "uidAllocatorRange": "uidAllocatorRange defines the total set of Unix user IDs (UIDs) that will be allocated to projects automatically, and the size of the block each namespace gets. For example, 1000-1999/10 will allocate ten UIDs per namespace, and will be able to allocate up to 100 blocks before running out of space. The default is to allocate from 1 billion to 2 billion in 10k blocks (which is the expected size of the ranges container images will use once user namespaces are started).", - "mcsAllocatorRange": "mcsAllocatorRange defines the range of MCS categories that will be assigned to namespaces. The format is \"/[,]\". The default is \"s0/2\" and will allocate from c0 -> c1023, which means a total of 535k labels are available (1024 choose 2 ~ 535k). If this value is changed after startup, new projects may receive labels that are already allocated to other projects. Prefix may be any valid SELinux set of terms (including user, role, and type), although leaving them as the default will allow the server to set them automatically.\n\nExamples: * s0:/2 - Allocate labels from s0:c0,c0 to s0:c511,c511 * s0:/2,512 - Allocate labels from s0:c0,c0,c0 to s0:c511,c511,511", - "mcsLabelsPerProject": "mcsLabelsPerProject defines the number of labels that should be reserved per project. The default is 5 to match the default UID and MCS ranges (100k namespaces, 535k/5 labels).", -} - -func (SecurityAllocator) SwaggerDoc() map[string]string { - return map_SecurityAllocator -} - -var map_ServiceAccountControllerConfig = map[string]string{ - "managedNames": "managedNames is a list of service account names that will be auto-created in every namespace. If no names are specified, the ServiceAccountsController will not be started.", -} - -func (ServiceAccountControllerConfig) SwaggerDoc() map[string]string { - return map_ServiceAccountControllerConfig -} - -var map_ServiceServingCert = map[string]string{ - "": "ServiceServingCert holds configuration for service serving cert signer which creates cert/key pairs for pods fulfilling a service to serve with.", - "signer": "signer holds the signing information used to automatically sign serving certificates. If this value is nil, then certs are not signed automatically.", -} - -func (ServiceServingCert) SwaggerDoc() map[string]string { - return map_ServiceServingCert -} - -var map_SourceStrategyDefaultsConfig = map[string]string{ - "": "SourceStrategyDefaultsConfig contains values that apply to builds using the source strategy.", - "incremental": "incremental indicates if s2i build strategies should perform an incremental build or not", -} - -func (SourceStrategyDefaultsConfig) SwaggerDoc() map[string]string { - return map_SourceStrategyDefaultsConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/operator/.codegen.yaml b/vendor/github.com/openshift/api/operator/.codegen.yaml deleted file mode 100644 index 1f30181f1..000000000 --- a/vendor/github.com/openshift/api/operator/.codegen.yaml +++ /dev/null @@ -1,6 +0,0 @@ -schemapatch: -swaggerdocs: - commentPolicy: Warn - - - diff --git a/vendor/github.com/openshift/api/operator/install.go b/vendor/github.com/openshift/api/operator/install.go deleted file mode 100644 index 9cbf25a4b..000000000 --- a/vendor/github.com/openshift/api/operator/install.go +++ /dev/null @@ -1,27 +0,0 @@ -package operator - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - operatorv1 "github.com/openshift/api/operator/v1" - operatorv1alpha1 "github.com/openshift/api/operator/v1alpha1" -) - -const ( - GroupName = "operator.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(operatorv1alpha1.Install, operatorv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/operator/v1/Makefile b/vendor/github.com/openshift/api/operator/v1/Makefile deleted file mode 100644 index 77f5d3409..000000000 --- a/vendor/github.com/openshift/api/operator/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="operator.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/operator/v1/doc.go b/vendor/github.com/openshift/api/operator/v1/doc.go deleted file mode 100644 index 1aa50336a..000000000 --- a/vendor/github.com/openshift/api/operator/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.operator.v1 - -// +kubebuilder:validation:Optional -// +groupName=operator.openshift.io -package v1 diff --git a/vendor/github.com/openshift/api/operator/v1/register.go b/vendor/github.com/openshift/api/operator/v1/register.go deleted file mode 100644 index 5920c4fca..000000000 --- a/vendor/github.com/openshift/api/operator/v1/register.go +++ /dev/null @@ -1,82 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "operator.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &Authentication{}, - &AuthenticationList{}, - &DNS{}, - &DNSList{}, - &CloudCredential{}, - &CloudCredentialList{}, - &ClusterCSIDriver{}, - &ClusterCSIDriverList{}, - &Console{}, - &ConsoleList{}, - &CSISnapshotController{}, - &CSISnapshotControllerList{}, - &Etcd{}, - &EtcdList{}, - &KubeAPIServer{}, - &KubeAPIServerList{}, - &KubeControllerManager{}, - &KubeControllerManagerList{}, - &KubeScheduler{}, - &KubeSchedulerList{}, - &KubeStorageVersionMigrator{}, - &KubeStorageVersionMigratorList{}, - &MachineConfiguration{}, - &MachineConfigurationList{}, - &Network{}, - &NetworkList{}, - &OpenShiftAPIServer{}, - &OpenShiftAPIServerList{}, - &OpenShiftControllerManager{}, - &OpenShiftControllerManagerList{}, - &OLM{}, - &OLMList{}, - &ServiceCA{}, - &ServiceCAList{}, - &ServiceCatalogAPIServer{}, - &ServiceCatalogAPIServerList{}, - &ServiceCatalogControllerManager{}, - &ServiceCatalogControllerManagerList{}, - &IngressController{}, - &IngressControllerList{}, - &InsightsOperator{}, - &InsightsOperatorList{}, - &Storage{}, - &StorageList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/operator/v1/types.go b/vendor/github.com/openshift/api/operator/v1/types.go deleted file mode 100644 index 3a2141abb..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types.go +++ /dev/null @@ -1,292 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// MyOperatorResource is an example operator configuration type -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:internal -type MyOperatorResource struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +required - Spec MyOperatorResourceSpec `json:"spec"` - Status MyOperatorResourceStatus `json:"status"` -} - -type MyOperatorResourceSpec struct { - OperatorSpec `json:",inline"` -} - -type MyOperatorResourceStatus struct { - OperatorStatus `json:",inline"` -} - -// +kubebuilder:validation:Pattern=`^(Managed|Unmanaged|Force|Removed)$` -type ManagementState string - -var ( - // Force means that the operator is actively managing its resources but will not block an upgrade - // if unmet prereqs exist. This state puts the operator at risk for unsuccessful upgrades - Force ManagementState = "Force" - // Managed means that the operator is actively managing its resources and trying to keep the component active. - // It will only upgrade the component if it is safe to do so - Managed ManagementState = "Managed" - // Unmanaged means that the operator will not take any action related to the component - // Some operators might not support this management state as it might damage the cluster and lead to manual recovery. - Unmanaged ManagementState = "Unmanaged" - // Removed means that the operator is actively managing its resources and trying to remove all traces of the component - // Some operators (like kube-apiserver-operator) might not support this management state as removing the API server will - // brick the cluster. - Removed ManagementState = "Removed" -) - -// OperatorSpec contains common fields operators need. It is intended to be anonymous included -// inside of the Spec struct for your particular operator. -type OperatorSpec struct { - // managementState indicates whether and how the operator should manage the component - ManagementState ManagementState `json:"managementState"` - - // logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a - // simple way to manage coarse grained logging choices that operators have to interpret for their operands. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - // +optional - // +kubebuilder:default=Normal - LogLevel LogLevel `json:"logLevel,omitempty"` - - // operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a - // simple way to manage coarse grained logging choices that operators have to interpret for themselves. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - // +optional - // +kubebuilder:default=Normal - OperatorLogLevel LogLevel `json:"operatorLogLevel,omitempty"` - - // unsupportedConfigOverrides overrides the final configuration that was computed by the operator. - // Red Hat does not support the use of this field. - // Misuse of this field could lead to unexpected behavior or conflict with other configuration options. - // Seek guidance from the Red Hat support before using this field. - // Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster. - // +optional - // +nullable - // +kubebuilder:pruning:PreserveUnknownFields - UnsupportedConfigOverrides runtime.RawExtension `json:"unsupportedConfigOverrides"` - - // observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because - // it is an input to the level for the operator - // +optional - // +nullable - // +kubebuilder:pruning:PreserveUnknownFields - ObservedConfig runtime.RawExtension `json:"observedConfig"` -} - -// +kubebuilder:validation:Enum="";Normal;Debug;Trace;TraceAll -type LogLevel string - -var ( - // Normal is the default. Normal, working log information, everything is fine, but helpful notices for auditing or common operations. In kube, this is probably glog=2. - Normal LogLevel = "Normal" - - // Debug is used when something went wrong. Even common operations may be logged, and less helpful but more quantity of notices. In kube, this is probably glog=4. - Debug LogLevel = "Debug" - - // Trace is used when something went really badly and even more verbose logs are needed. Logging every function call as part of a common operation, to tracing execution of a query. In kube, this is probably glog=6. - Trace LogLevel = "Trace" - - // TraceAll is used when something is broken at the level of API content/decoding. It will dump complete body content. If you turn this on in a production cluster - // prepare from serious performance issues and massive amounts of logs. In kube, this is probably glog=8. - TraceAll LogLevel = "TraceAll" -) - -type OperatorStatus struct { - // observedGeneration is the last generation change you've dealt with - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // conditions is a list of conditions and their status - // +listType=map - // +listMapKey=type - // +optional - Conditions []OperatorCondition `json:"conditions,omitempty"` - - // version is the level this availability applies to - // +optional - Version string `json:"version,omitempty"` - - // readyReplicas indicates how many replicas are ready and at the desired state - // +optional - ReadyReplicas int32 `json:"readyReplicas"` - - // latestAvailableRevision is the deploymentID of the most recent deployment - // +optional - // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" - LatestAvailableRevision int32 `json:"latestAvailableRevision,omitempty"` - - // generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction. - // +listType=map - // +listMapKey=group - // +listMapKey=resource - // +listMapKey=namespace - // +listMapKey=name - // +optional - Generations []GenerationStatus `json:"generations,omitempty"` -} - -// GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. -type GenerationStatus struct { - // group is the group of the thing you're tracking - // +required - Group string `json:"group"` - - // resource is the resource type of the thing you're tracking - // +required - Resource string `json:"resource"` - - // namespace is where the thing you're tracking is - // +required - Namespace string `json:"namespace"` - - // name is the name of the thing you're tracking - // +required - Name string `json:"name"` - - // TODO: Add validation for lastGeneration. The value for this field should generally increase, except when the associated - // resource has been deleted and re-created. To accurately validate this field, we should introduce a new UID field and only - // enforce an increasing value in lastGeneration when the UID remains unchanged. A change in the UID indicates that the resource - // was re-created, allowing the lastGeneration value to reset or decrease. - - // lastGeneration is the last generation of the workload controller involved - LastGeneration int64 `json:"lastGeneration"` - - // hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps - Hash string `json:"hash"` -} - -var ( - // Available indicates that the operand is present and accessible in the cluster - OperatorStatusTypeAvailable = "Available" - // Progressing indicates that the operator is trying to transition the operand to a different state - OperatorStatusTypeProgressing = "Progressing" - // Degraded indicates that the operator (not the operand) is unable to fulfill the user intent - OperatorStatusTypeDegraded = "Degraded" - // PrereqsSatisfied indicates that the things this operator depends on are present and at levels compatible with the - // current and desired states. - OperatorStatusTypePrereqsSatisfied = "PrereqsSatisfied" - // Upgradeable indicates that the operator configuration itself (not prereqs) can be auto-upgraded by the CVO - OperatorStatusTypeUpgradeable = "Upgradeable" -) - -// OperatorCondition is just the standard condition fields. -type OperatorCondition struct { - // type of condition in CamelCase or in foo.example.com/CamelCase. - // --- - // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be - // useful (see .node.status.conditions), the ability to deconflict is important. - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - // +required - // +kubebuilder:validation:Pattern=`^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$` - // +kubebuilder:validation:MaxLength=316 - Type string `json:"type" protobuf:"bytes,1,opt,name=type"` - - // status of the condition, one of True, False, Unknown. - // +required - // +kubebuilder:validation:Enum=True;False;Unknown - Status ConditionStatus `json:"status"` - - // lastTransitionTime is the last time the condition transitioned from one status to another. - // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - // +required - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Format=date-time - LastTransitionTime metav1.Time `json:"lastTransitionTime"` - - Reason string `json:"reason,omitempty"` - - Message string `json:"message,omitempty"` -} - -type ConditionStatus string - -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// StaticPodOperatorSpec is spec for controllers that manage static pods. -type StaticPodOperatorSpec struct { - OperatorSpec `json:",inline"` - - // forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string. - // This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work - // this time instead of failing again on the same config. - ForceRedeploymentReason string `json:"forceRedeploymentReason"` - - // failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api - // -1 = unlimited, 0 or unset = 5 (default) - FailedRevisionLimit int32 `json:"failedRevisionLimit,omitempty"` - // succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api - // -1 = unlimited, 0 or unset = 5 (default) - SucceededRevisionLimit int32 `json:"succeededRevisionLimit,omitempty"` -} - -// StaticPodOperatorStatus is status for controllers that manage static pods. There are different needs because individual -// node status must be tracked. -type StaticPodOperatorStatus struct { - OperatorStatus `json:",inline"` - - // latestAvailableRevisionReason describe the detailed reason for the most recent deployment - // +optional - LatestAvailableRevisionReason string `json:"latestAvailableRevisionReason,omitempty"` - - // nodeStatuses track the deployment values and errors across individual nodes - // +listType=map - // +listMapKey=nodeName - // +optional - // +kubebuilder:validation:XValidation:rule="size(self.filter(status, status.?targetRevision.orValue(0) != 0)) <= 1",message="no more than 1 node status may have a nonzero targetRevision" - NodeStatuses []NodeStatus `json:"nodeStatuses,omitempty"` -} - -// NodeStatus provides information about the current state of a particular node managed by this operator. -// +kubebuilder:validation:XValidation:rule="has(self.currentRevision) || !has(oldSelf.currentRevision)",message="cannot be unset once set",fieldPath=".currentRevision" -// +kubebuilder:validation:XValidation:rule="oldSelf.hasValue() || !has(self.currentRevision)",message="currentRevision can not be set on creation of a nodeStatus",optionalOldSelf=true,fieldPath=.currentRevision -// +kubebuilder:validation:XValidation:rule="oldSelf.hasValue() || !has(self.targetRevision)",message="targetRevision can not be set on creation of a nodeStatus",optionalOldSelf=true,fieldPath=.targetRevision -type NodeStatus struct { - // nodeName is the name of the node - // +required - NodeName string `json:"nodeName"` - - // currentRevision is the generation of the most recently successful deployment. - // Can not be set on creation of a nodeStatus. Updates must only increase the value. - // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="must only increase" - // +optional - CurrentRevision int32 `json:"currentRevision,omitempty"` - // targetRevision is the generation of the deployment we're trying to apply. - // Can not be set on creation of a nodeStatus. - // +optional - TargetRevision int32 `json:"targetRevision,omitempty"` - - // lastFailedRevision is the generation of the deployment we tried and failed to deploy. - LastFailedRevision int32 `json:"lastFailedRevision,omitempty"` - // lastFailedTime is the time the last failed revision failed the last time. - LastFailedTime *metav1.Time `json:"lastFailedTime,omitempty"` - // lastFailedReason is a machine readable failure reason string. - LastFailedReason string `json:"lastFailedReason,omitempty"` - // lastFailedCount is how often the installer pod of the last failed revision failed. - LastFailedCount int `json:"lastFailedCount,omitempty"` - // lastFallbackCount is how often a fallback to a previous revision happened. - LastFallbackCount int `json:"lastFallbackCount,omitempty"` - // lastFailedRevisionErrors is a list of human readable errors during the failed deployment referenced in lastFailedRevision. - // +listType=atomic - LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_authentication.go b/vendor/github.com/openshift/api/operator/v1/types_authentication.go deleted file mode 100644 index 55fc62a79..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_authentication.go +++ /dev/null @@ -1,161 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=authentications,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=authentication,operatorOrdering=01 -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true - -// Authentication provides information to configure an operator to manage authentication. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Authentication struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +required - Spec AuthenticationSpec `json:"spec"` - // +optional - Status AuthenticationStatus `json:"status,omitempty"` -} - -type AuthenticationSpec struct { - OperatorSpec `json:",inline"` - - // proxy configures proxy settings for outbound connections made - // by the authentication stack. When set, it replaces the - // cluster-wide proxy (proxy.config.openshift.io/cluster) - // entirely for authentication — individual fields are not - // inherited from the cluster-wide configuration. When omitted, - // the cluster-wide proxy is used if configured; otherwise no - // proxy is used. - // +openshift:enable:FeatureGate=AuthenticationComponentProxy - // +optional - Proxy AuthenticationProxyConfig `json:"proxy,omitzero"` -} - -// AuthenticationProxyConfig holds proxy configuration scoped to -// authentication components (the OAuth server and the cluster -// authentication operator). -// +kubebuilder:validation:MinProperties=1 -// +kubebuilder:validation:XValidation:rule="has(self.httpProxy) || has(self.httpsProxy)",message="at least one of httpProxy or httpsProxy must be specified" -type AuthenticationProxyConfig struct { - // httpProxy is the URL of the proxy for HTTP requests. - // Must be a valid URL with http or https scheme, a non-empty - // hostname, and no path, query parameters, or fragment. - // Userinfo (e.g. user:password@host) is allowed for proxy - // authentication. Maximum length is 2048 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:XValidation:rule="isURL(self)",message="httpProxy must be a valid URL" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getScheme() in ['http', 'https']",message="httpProxy must use http or https scheme" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || size(url(self).getHostname()) > 0",message="httpProxy must contain a hostname" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getEscapedPath() == '' || url(self).getEscapedPath() == '/'",message="httpProxy must not contain a path" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getQuery().size() == 0",message="httpProxy must not contain query parameters" - // +kubebuilder:validation:XValidation:rule="!self.matches('.*#.*')",message="httpProxy must not contain a fragment" - // +optional - HTTPProxy string `json:"httpProxy,omitempty"` - - // httpsProxy is the URL of the proxy for HTTPS requests. - // Must be a valid URL with http or https scheme, a non-empty - // hostname, and no path, query parameters, or fragment. - // Userinfo (e.g. user:password@host) is allowed for proxy - // authentication. Maximum length is 2048 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:XValidation:rule="isURL(self)",message="httpsProxy must be a valid URL" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getScheme() in ['http', 'https']",message="httpsProxy must use http or https scheme" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || size(url(self).getHostname()) > 0",message="httpsProxy must contain a hostname" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getEscapedPath() == '' || url(self).getEscapedPath() == '/'",message="httpsProxy must not contain a path" - // +kubebuilder:validation:XValidation:rule="!isURL(self) || url(self).getQuery().size() == 0",message="httpsProxy must not contain query parameters" - // +kubebuilder:validation:XValidation:rule="!self.matches('.*#.*')",message="httpsProxy must not contain a fragment" - // +optional - HTTPSProxy string `json:"httpsProxy,omitempty"` - - // noProxy is a list of hostnames and/or CIDRs and/or IPs for which - // the proxy should not be used. Must contain at least one entry - // when set. Each entry must be between 1 and 253 characters long - // and at most 64 entries are allowed. Duplicate - // entries are not permitted. Entries that are not valid hostnames, - // CIDRs, or IPs are silently ignored. Cluster-internal defaults - // (.cluster.local, .svc, 127.0.0.1, localhost) are always appended - // automatically and do not need to be included. - // +listType=set - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=64 - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=253 - // +optional - NoProxy []string `json:"noProxy,omitempty"` - - // trustedCA is a reference to a ConfigMap in the openshift-config - // namespace containing a CA certificate bundle under the key - // "ca-bundle.crt". This bundle is appended to the system trust store - // used by authentication components for proxy TLS connections. - // When omitted, only the system trust store is used. - // +optional - TrustedCA AuthenticationConfigMapReference `json:"trustedCA,omitzero"` -} - -// AuthenticationConfigMapReference references a ConfigMap in the -// openshift-config namespace. -type AuthenticationConfigMapReference struct { - // name is the metadata.name of the referenced ConfigMap. - // Must be a valid DNS subdomain name (RFC 1123): at most 253 - // characters, only lowercase alphanumeric characters, '-' or - // '.', starting and ending with an alphanumeric character. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="name must be a valid DNS subdomain name: contain no more than 253 characters, contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character" - // +required - Name string `json:"name,omitempty"` -} - -type AuthenticationStatus struct { - // oauthAPIServer holds status specific only to oauth-apiserver - // +optional - OAuthAPIServer OAuthAPIServerStatus `json:"oauthAPIServer,omitempty"` - - OperatorStatus `json:",inline"` -} - -type OAuthAPIServerStatus struct { - // latestAvailableRevision is the latest revision used as suffix of revisioned - // secrets like encryption-config. A new revision causes a new deployment of pods. - // +optional - // +kubebuilder:validation:Minimum=0 - LatestAvailableRevision int32 `json:"latestAvailableRevision,omitempty"` - - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - // +optional - // +openshift:enable:FeatureGate=KMSEncryption - EncryptionStatus KMSEncryptionStatus `json:"encryptionStatus,omitempty,omitzero"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AuthenticationList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AuthenticationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Authentication `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go b/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go deleted file mode 100644 index b6ef52e93..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_cloudcredential.go +++ /dev/null @@ -1,92 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=cloudcredentials,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/692 -// +openshift:capability=CloudCredential -// +openshift:file-pattern=cvoRunLevel=0000_40,operatorName=cloud-credential,operatorOrdering=00 - -// CloudCredential provides a means to configure an operator to manage CredentialsRequests. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type CloudCredential struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +required - Spec CloudCredentialSpec `json:"spec"` - // +optional - Status CloudCredentialStatus `json:"status"` -} - -// CloudCredentialsMode is the specified mode the cloud-credential-operator -// should reconcile CredentialsRequest with -// +kubebuilder:validation:Enum="";Manual;Mint;Passthrough -type CloudCredentialsMode string - -const ( - // CloudCredentialsModeManual tells cloud-credential-operator to not reconcile any CredentialsRequests - // (primarily used for the disconnected VPC use-cases). - CloudCredentialsModeManual CloudCredentialsMode = "Manual" - - // CloudCredentialsModeMint tells cloud-credential-operator to reconcile all CredentialsRequests - // by minting new users/credentials. - CloudCredentialsModeMint CloudCredentialsMode = "Mint" - - // CloudCredentialsModePassthrough tells cloud-credential-operator to reconcile all CredentialsRequests - // by copying the cloud-specific secret data. - CloudCredentialsModePassthrough CloudCredentialsMode = "Passthrough" - - // CloudCredentialsModeDefault puts CCO into the default mode of operation (per-cloud/platform defaults): - // AWS/Azure/GCP: dynamically determine cluster's cloud credential capabilities to affect - // processing of CredentialsRequests - // All other clouds/platforms (OpenStack, oVirt, vSphere, etc): run in "passthrough" mode - CloudCredentialsModeDefault CloudCredentialsMode = "" -) - -// CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator. -type CloudCredentialSpec struct { - OperatorSpec `json:",inline"` - // credentialsMode allows informing CCO that it should not attempt to dynamically - // determine the root cloud credentials capabilities, and it should just run in - // the specified mode. - // It also allows putting the operator into "manual" mode if desired. - // Leaving the field in default mode runs CCO so that the cluster's cloud credentials - // will be dynamically probed for capabilities (on supported clouds/platforms). - // Supported modes: - // AWS/Azure/GCP: "" (Default), "Mint", "Passthrough", "Manual" - // Others: Do not set value as other platforms only support running in "Passthrough" - // +optional - CredentialsMode CloudCredentialsMode `json:"credentialsMode,omitempty"` -} - -// CloudCredentialStatus defines the observed status of the cloud-credential-operator. -type CloudCredentialStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type CloudCredentialList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []CloudCredential `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_config.go b/vendor/github.com/openshift/api/operator/v1/types_config.go deleted file mode 100644 index f0d190e6d..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_config.go +++ /dev/null @@ -1,60 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=configs,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/612 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 - -// Config specifies the behavior of the config operator which is responsible for creating the initial configuration of other components -// on the cluster. The operator also handles installation, migration or synchronization of cloud configurations for AWS and Azure cloud based clusters -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Config struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Config Operator. - // +required - Spec ConfigSpec `json:"spec"` - - // status defines the observed status of the Config Operator. - // +optional - Status ConfigStatus `json:"status"` -} - -type ConfigSpec struct { - OperatorSpec `json:",inline"` -} - -type ConfigStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ConfigList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []Config `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_console.go b/vendor/github.com/openshift/api/operator/v1/types_console.go deleted file mode 100644 index 35795b2b7..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_console.go +++ /dev/null @@ -1,602 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - authorizationv1 "k8s.io/api/authorization/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=consoles,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/486 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=console,operatorOrdering=01 - -// Console provides a means to configure an operator to manage the console. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Console struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +required - Spec ConsoleSpec `json:"spec"` - // +optional - Status ConsoleStatus `json:"status,omitempty"` -} - -// ConsoleSpec is the specification of the desired behavior of the Console. -type ConsoleSpec struct { - OperatorSpec `json:",inline"` - // customization is used to optionally provide a small set of - // customization options to the web console. - // +optional - Customization ConsoleCustomization `json:"customization"` - // providers contains configuration for using specific service providers. - Providers ConsoleProviders `json:"providers"` - // route contains hostname and secret reference that contains the serving certificate. - // If a custom route is specified, a new route will be created with the - // provided hostname, under which console will be available. - // In case of custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - // In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary. - // The default console route will be maintained to reserve the default hostname - // for console if the custom route is removed. - // If not specified, default route will be used. - // DEPRECATED - // +optional - Route ConsoleConfigRoute `json:"route"` - // plugins defines a list of enabled console plugin names. - // +optional - Plugins []string `json:"plugins,omitempty"` - // ingress allows to configure the alternative ingress for the console. - // This field is intended for clusters without ingress capability, - // where access to routes is not possible. - // +optional - Ingress Ingress `json:"ingress"` -} - -// ConsoleConfigRoute holds information on external route access to console. -// DEPRECATED -type ConsoleConfigRoute struct { - // hostname is the desired custom domain under which console will be available. - Hostname string `json:"hostname"` - // secret points to secret in the openshift-config namespace that contains custom - // certificate and key and needs to be created manually by the cluster admin. - // Referenced Secret is required to contain following key value pairs: - // - "tls.crt" - to specifies custom certificate - // - "tls.key" - to specifies private key of the custom certificate - // If the custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - // +optional - Secret configv1.SecretNameReference `json:"secret"` -} - -// ConsoleStatus defines the observed status of the Console. -type ConsoleStatus struct { - OperatorStatus `json:",inline"` -} - -// ConsoleProviders defines a list of optional additional providers of -// functionality to the console. -type ConsoleProviders struct { - // statuspage contains ID for statuspage.io page that provides status info about. - // +optional - Statuspage *StatuspageProvider `json:"statuspage,omitempty"` -} - -// StatuspageProvider provides identity for statuspage account. -type StatuspageProvider struct { - // pageID is the unique ID assigned by Statuspage for your page. This must be a public page. - PageID string `json:"pageID"` -} - -// ConsoleCapabilityName defines name of UI capability in the console UI. -type ConsoleCapabilityName string - -const ( - // lightspeedButton is the name for the Lightspeed button HTML element. - LightspeedButton ConsoleCapabilityName = "LightspeedButton" - - // gettingStartedBanner is the name of the 'Getting started resources' banner in the console UI Overview page. - GettingStartedBanner ConsoleCapabilityName = "GettingStartedBanner" - - // guidedTour is the name of the 'Guided Tour' feature in console UI. - GuidedTour ConsoleCapabilityName = "GuidedTour" -) - -// CapabilityState defines the state of the capability in the console UI. -type CapabilityState string - -const ( - // "Enabled" means that the capability will be rendered in the console UI. - CapabilityEnabled CapabilityState = "Enabled" - // "Disabled" means that the capability will not be rendered in the console UI. - CapabilityDisabled CapabilityState = "Disabled" -) - -// CapabilityVisibility defines the criteria to enable/disable a capability. -// +union -type CapabilityVisibility struct { - // state defines if the capability is enabled or disabled in the console UI. - // Enabling the capability in the console UI is represented by the "Enabled" value. - // Disabling the capability in the console UI is represented by the "Disabled" value. - // +unionDiscriminator - // +kubebuilder:validation:Enum:="Enabled";"Disabled" - // +required - State CapabilityState `json:"state"` -} - -// Capabilities contains set of UI capabilities and their state in the console UI. -type Capability struct { - // name is the unique name of a capability. - // Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour. - // +kubebuilder:validation:Enum:="LightspeedButton";"GettingStartedBanner";"GuidedTour" - // +required - Name ConsoleCapabilityName `json:"name"` - // visibility defines the visibility state of the capability. - // +required - Visibility CapabilityVisibility `json:"visibility"` -} - -// ThemeMode is the value of the logo theme mode that determines the theme mode in the console UI. -// +kubebuilder:validation:Enum="Dark";"Light" -// +enum -type ThemeMode string - -// ThemeMode values -const ( - // ThemeModeDark represents the dark mode for a console theme. - ThemeModeDark ThemeMode = "Dark" - - // ThemeModeLight represents the light mode for a console theme. - ThemeModeLight ThemeMode = "Light" -) - -// LogoType is the value of the logo type that determines if the logo is for the masthead or the favicon in the console UI. -// The masthead logo is displayed in the masthead and about modal of the console UI. -// +kubebuilder:validation:Enum="Masthead";"Favicon" -// +enum -type LogoType string - -const ( - // Masthead represents the logo in the masthead. - LogoTypeMasthead LogoType = "Masthead" - - // Favicon represents the favicon logo. - LogoTypeFavicon LogoType = "Favicon" -) - -// SourceType defines the source type of the file reference. -// +kubebuilder:validation:Enum="ConfigMap" -// +enum -type SourceType string - -const ( - // SourceTypeConfigMap represents a ConfigMap source. - SourceTypeConfigMap SourceType = "ConfigMap" -) - -// ConfigMapFileReference references a specific file within a ConfigMap. -type ConfigMapFileReference struct { - // name is the name of the ConfigMap. - // name is a required field. - // Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. - // Must be at most 253 characters in length. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +required - Name string `json:"name"` - - // key is the logo key inside the referenced ConfigMap. - // Must consist only of alphanumeric characters, dashes (-), underscores (_), and periods (.). - // Must be at most 253 characters in length. - // Must end in a valid file extension. - // A valid file extension must consist of a period followed by 2 to 5 alpha characters. - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9._-]+$')",message="The ConfigMap key must consist only of alphanumeric characters, dashes (-), underscores (_), and periods (.)." - // +kubebuilder:validation:XValidation:rule="self.matches('.*\\\\.[a-zA-Z]{2,5}$')",message="The ConfigMap key must end with a valid file extension (2 to 5 letters)." - // +required - Key string `json:"key"` -} - -// FileReferenceSource is used by the console to locate the specified file containing a custom logo. -// +kubebuilder:validation:XValidation:rule="has(self.from) && self.from == 'ConfigMap' ? has(self.configMap) : !has(self.configMap)",message="configMap is required when from is 'ConfigMap', and forbidden otherwise." -type FileReferenceSource struct { - // from is a required field to specify the source type of the file reference. - // Allowed values are ConfigMap. - // When set to ConfigMap, the file will be sourced from a ConfigMap in the openshift-config namespace. The configMap field must be set when from is set to ConfigMap. - // +required - From SourceType `json:"from"` - - // configMap specifies the ConfigMap sourcing details such as the name of the ConfigMap and the key for the file. - // The ConfigMap must exist in the openshift-config namespace. - // Required when from is "ConfigMap", and forbidden otherwise. - // +optional - ConfigMap *ConfigMapFileReference `json:"configMap"` -} - -// Theme defines a theme mode for the console UI. -type Theme struct { - // mode is used to specify what theme mode a logo will apply to in the console UI. - // mode is a required field that allows values of Dark and Light. - // When set to Dark, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Dark mode. - // When set to Light, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Light mode. - // +required - Mode ThemeMode `json:"mode"` - - // source is used by the console to locate the specified file containing a custom logo. - // source is a required field that references a ConfigMap name and key that contains the custom logo file in the openshift-config namespace. - // You can create it with a command like: - // - 'oc create configmap custom-logos-config --namespace=openshift-config --from-file=/path/to/file' - // The ConfigMap key must include the file extension so that the console serves the file with the correct MIME type. - // The recommended file format for the Masthead and Favicon logos is SVG, but other file formats are allowed if supported by the browser. - // The logo image size must be less than 1 MB due to constraints on the ConfigMap size. - // For more information, see the documentation: https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/web_console/customizing-web-console#customizing-web-console - // +required - Source FileReferenceSource `json:"source"` -} - -// Logo defines a configuration based on theme modes for the console UI logo. -type Logo struct { - // type specifies the type of the logo for the console UI. It determines whether the logo is for the masthead or favicon. - // type is a required field that allows values of Masthead and Favicon. - // When set to "Masthead", the logo will be used in the masthead and about modal of the console UI. - // When set to "Favicon", the logo will be used as the favicon of the console UI. - // +required - Type LogoType `json:"type"` - - // themes specifies the themes for the console UI logo. - // themes is a required field that allows a list of themes. Each item in the themes list must have a unique mode and a source field. - // Each mode determines whether the logo is for the dark or light mode of the console UI. - // If a theme is not specified, the default OpenShift logo will be displayed for that theme. - // There must be at least one entry and no more than 2 entries. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=2 - // +listType=map - // +listMapKey=mode - // +required - Themes []Theme `json:"themes"` -} - -// ConsoleCustomization defines a list of optional configuration for the console UI. -// Ensure that Logos and CustomLogoFile cannot be set at the same time. -// +kubebuilder:validation:XValidation:rule="!(has(self.logos) && has(self.customLogoFile))",message="Only one of logos or customLogoFile can be set." -type ConsoleCustomization struct { - // logos is used to replace the OpenShift Masthead and Favicon logos in the console UI with custom logos. - // logos is an optional field that allows a list of logos. - // Only one of logos or customLogoFile can be set at a time. - // If logos is set, customLogoFile must be unset. - // When specified, there must be at least one entry and no more than 2 entries. - // Each type must appear only once in the list. - // +kubebuilder:validation:MaxItems=2 - // +listType=map - // +listMapKey=type - // +optional - Logos []Logo `json:"logos"` - - // capabilities defines an array of capabilities that can be interacted with in the console UI. - // Each capability defines a visual state that can be interacted with the console to render in the UI. - // Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour. - // Each of the available capabilities may appear only once in the list. - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=3 - // +listType=map - // +listMapKey=name - // +optional - Capabilities []Capability `json:"capabilities,omitempty"` - // brand is the default branding of the web console which can be overridden by - // providing the brand field. There is a limited set of specific brand options. - // This field controls elements of the console such as the logo. - // Invalid value will prevent a console rollout. - // +kubebuilder:validation:Enum:=openshift;okd;online;ocp;dedicated;azure;OpenShift;OKD;Online;OCP;Dedicated;Azure;ROSA - Brand Brand `json:"brand,omitempty"` - // documentationBaseURL links to external documentation are shown in various sections - // of the web console. Providing documentationBaseURL will override the default - // documentation URL. - // Invalid value will prevent a console rollout. - // +kubebuilder:validation:Pattern=`^$|^((https):\/\/?)[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))\/$` - DocumentationBaseURL string `json:"documentationBaseURL,omitempty"` - // customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog - // instead of the normal OpenShift product name. - // +optional - CustomProductName string `json:"customProductName,omitempty"` - // customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a - // Only one of customLogoFile or logos can be set at a time. - // ConfigMap in the openshift-config namespace. This can be created with a command like - // 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. - // Image size must be less than 1 MB due to constraints on the ConfigMap size. - // The ConfigMap key should include a file extension so that the console serves the file - // with the correct MIME type. - // The recommended file format for the logo is SVG, but other file formats are allowed if supported by the browser. - // Deprecated: Use logos instead. - // +optional - CustomLogoFile configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"` - // developerCatalog allows to configure the shown developer catalog categories (filters) and types (sub-catalogs). - // +optional - DeveloperCatalog DeveloperConsoleCatalogCustomization `json:"developerCatalog,omitempty"` - // projectAccess allows customizing the available list of ClusterRoles in the Developer perspective - // Project access page which can be used by a project admin to specify roles to other users and - // restrict access within the project. If set, the list will replace the default ClusterRole options. - // +optional - ProjectAccess ProjectAccess `json:"projectAccess,omitempty"` - // quickStarts allows customization of available ConsoleQuickStart resources in console. - // +optional - QuickStarts QuickStarts `json:"quickStarts,omitempty"` - // addPage allows customizing actions on the Add page in developer perspective. - // +optional - AddPage AddPage `json:"addPage,omitempty"` - // perspectives allows enabling/disabling of perspective(s) that user can see in the Perspective switcher dropdown. - // +listType=map - // +listMapKey=id - // +optional - Perspectives []Perspective `json:"perspectives"` -} - -// ProjectAccess contains options for project access roles -type ProjectAccess struct { - // availableClusterRoles is the list of ClusterRole names that are assignable to users - // through the project access tab. - // +optional - AvailableClusterRoles []string `json:"availableClusterRoles,omitempty"` -} - -// CatalogTypesState defines the state of the catalog types based on which the types will be enabled or disabled. -type CatalogTypesState string - -const ( - CatalogTypeEnabled CatalogTypesState = "Enabled" - CatalogTypeDisabled CatalogTypesState = "Disabled" -) - -// DeveloperConsoleCatalogTypes defines the state of the sub-catalog types. -// +kubebuilder:validation:XValidation:rule="self.state == 'Enabled' ? true : !has(self.enabled)",message="enabled is forbidden when state is not Enabled" -// +kubebuilder:validation:XValidation:rule="self.state == 'Disabled' ? true : !has(self.disabled)",message="disabled is forbidden when state is not Disabled" -// +union -type DeveloperConsoleCatalogTypes struct { - // state defines if a list of catalog types should be enabled or disabled. - // +unionDiscriminator - // +kubebuilder:validation:Enum:="Enabled";"Disabled"; - // +kubebuilder:default:="Enabled" - // +default="Enabled" - // +required - State CatalogTypesState `json:"state,omitempty"` - // enabled is a list of developer catalog types (sub-catalogs IDs) that will be shown to users. - // Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available - // in the console on the cluster configuration page, or when editing the YAML in the console. - // Example: "Devfile", "HelmChart", "BuilderImage" - // If the list is non-empty, a new type will not be shown to the user until it is added to list. - // If the list is empty the complete developer catalog will be shown. - // +listType=set - // +unionMember,optional - Enabled *[]string `json:"enabled,omitempty"` - // disabled is a list of developer catalog types (sub-catalogs IDs) that are not shown to users. - // Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available - // in the console on the cluster configuration page, or when editing the YAML in the console. - // Example: "Devfile", "HelmChart", "BuilderImage" - // If the list is empty or all the available sub-catalog types are added, then the complete developer catalog should be hidden. - // +listType=set - // +unionMember,optional - Disabled *[]string `json:"disabled,omitempty"` -} - -// DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog. -type DeveloperConsoleCatalogCustomization struct { - // categories which are shown in the developer catalog. - // +optional - Categories []DeveloperConsoleCatalogCategory `json:"categories,omitempty"` - // types allows enabling or disabling of sub-catalog types that user can see in the Developer catalog. - // When omitted, all the sub-catalog types will be shown. - // +optional - Types DeveloperConsoleCatalogTypes `json:"types,omitempty"` -} - -// DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category. -type DeveloperConsoleCatalogCategoryMeta struct { - // id is an identifier used in the URL to enable deep linking in console. - // ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=32 - // +kubebuilder:validation:Pattern=`^[A-Za-z0-9-_]+$` - // +required - ID string `json:"id"` - // label defines a category display label. It is required and must have 1-64 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=64 - // +required - Label string `json:"label"` - // tags is a list of strings that will match the category. A selected category - // show all items which has at least one overlapping tag between category and item. - // +optional - Tags []string `json:"tags,omitempty"` -} - -// DeveloperConsoleCatalogCategory for the developer console catalog. -type DeveloperConsoleCatalogCategory struct { - // defines top level category ID, label and filter tags. - DeveloperConsoleCatalogCategoryMeta `json:",inline"` - // subcategories defines a list of child categories. - // +optional - Subcategories []DeveloperConsoleCatalogCategoryMeta `json:"subcategories,omitempty"` -} - -// QuickStarts allow cluster admins to customize available ConsoleQuickStart resources. -type QuickStarts struct { - // disabled is a list of ConsoleQuickStart resource names that are not shown to users. - // +optional - Disabled []string `json:"disabled,omitempty"` -} - -// AddPage allows customizing actions on the Add page in developer perspective. -type AddPage struct { - // disabledActions is a list of actions that are not shown to users. - // Each action in the list is represented by its ID. - // +kubebuilder:validation:MinItems=1 - // +optional - DisabledActions []string `json:"disabledActions,omitempty"` -} - -// PerspectiveState defines the visibility state of the perspective. "Enabled" means the perspective is shown. -// "Disabled" means the Perspective is hidden. -// "AccessReview" means access review check is required to show or hide a Perspective. -type PerspectiveState string - -const ( - PerspectiveEnabled PerspectiveState = "Enabled" - PerspectiveDisabled PerspectiveState = "Disabled" - PerspectiveAccessReview PerspectiveState = "AccessReview" -) - -// ResourceAttributesAccessReview defines the visibility of the perspective depending on the access review checks. -// `required` and `missing` can work together esp. in the case where the cluster admin -// wants to show another perspective to users without specific permissions. Out of `required` and `missing` atleast one property should be non-empty. -// +kubebuilder:validation:MinProperties:=1 -type ResourceAttributesAccessReview struct { - // required defines a list of permission checks. The perspective will only be shown when all checks are successful. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the missing access review list. - // +optional - Required []authorizationv1.ResourceAttributes `json:"required"` - // missing defines a list of permission checks. The perspective will only be shown when at least one check fails. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the required access review list. - // +optional - Missing []authorizationv1.ResourceAttributes `json:"missing"` -} - -// PerspectiveVisibility defines the criteria to show/hide a perspective -// +kubebuilder:validation:XValidation:rule="self.state == 'AccessReview' ? has(self.accessReview) : !has(self.accessReview)",message="accessReview configuration is required when state is AccessReview, and forbidden otherwise" -// +union -type PerspectiveVisibility struct { - // state defines the perspective is enabled or disabled or access review check is required. - // +unionDiscriminator - // +kubebuilder:validation:Enum:="Enabled";"Disabled";"AccessReview" - // +required - State PerspectiveState `json:"state"` - // accessReview defines required and missing access review checks. - // +optional - AccessReview *ResourceAttributesAccessReview `json:"accessReview,omitempty"` -} - -// Perspective defines a perspective that cluster admins want to show/hide in the perspective switcher dropdown -// +kubebuilder:validation:XValidation:rule="has(self.id) && self.id != 'dev'? !has(self.pinnedResources) : true",message="pinnedResources is allowed only for dev and forbidden for other perspectives" -type Perspective struct { - // id defines the id of the perspective. - // Example: "dev", "admin". - // The available perspective ids can be found in the code snippet section next to the yaml editor. - // Incorrect or unknown ids will be ignored. - // +required - ID string `json:"id"` - // visibility defines the state of perspective along with access review checks if needed for that perspective. - // +required - Visibility PerspectiveVisibility `json:"visibility"` - // pinnedResources defines the list of default pinned resources that users will see on the perspective navigation if they have not customized these pinned resources themselves. - // The list of available Kubernetes resources could be read via `kubectl api-resources`. - // The console will also provide a configuration UI and a YAML snippet that will list the available resources that can be pinned to the navigation. - // Incorrect or unknown resources will be ignored. - // +kubebuilder:validation:MaxItems=100 - // +optional - PinnedResources *[]PinnedResourceReference `json:"pinnedResources,omitempty"` -} - -// PinnedResourceReference includes the group, version and type of resource -type PinnedResourceReference struct { - // group is the API Group of the Resource. - // Enter empty string for the core group. - // This value should consist of only lowercase alphanumeric characters, hyphens and periods. - // Example: "", "apps", "build.openshift.io", etc. - // +kubebuilder:validation:Pattern:="^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$" - // +required - Group string `json:"group"` - // version is the API Version of the Resource. - // This value should consist of only lowercase alphanumeric characters. - // Example: "v1", "v1beta1", etc. - // +kubebuilder:validation:Pattern:="^[a-z0-9]+$" - // +required - Version string `json:"version"` - // resource is the type that is being referenced. - // It is normally the plural form of the resource kind in lowercase. - // This value should consist of only lowercase alphanumeric characters and hyphens. - // Example: "deployments", "deploymentconfigs", "pods", etc. - // +kubebuilder:validation:Pattern:="^[a-z0-9]([-a-z0-9]*[a-z0-9])?$" - // +required - Resource string `json:"resource"` -} - -// Brand is a specific supported brand within the console. -type Brand string - -const ( - // Legacy branding for OpenShift - BrandOpenShiftLegacy Brand = "openshift" - // Legacy branding for The Origin Community Distribution of Kubernetes - BrandOKDLegacy Brand = "okd" - // Legacy branding for OpenShift Online - BrandOnlineLegacy Brand = "online" - // Legacy branding for OpenShift Container Platform - BrandOCPLegacy Brand = "ocp" - // Legacy branding for OpenShift Dedicated - BrandDedicatedLegacy Brand = "dedicated" - // Legacy branding for Azure Red Hat OpenShift - BrandAzureLegacy Brand = "azure" - // Branding for OpenShift - BrandOpenShift Brand = "OpenShift" - // Branding for The Origin Community Distribution of Kubernetes - BrandOKD Brand = "OKD" - // Branding for OpenShift Online - BrandOnline Brand = "Online" - // Branding for OpenShift Container Platform - BrandOCP Brand = "OCP" - // Branding for OpenShift Dedicated - BrandDedicated Brand = "Dedicated" - // Branding for Azure Red Hat OpenShift - BrandAzure Brand = "Azure" - // Branding for Red Hat OpenShift Service on AWS - BrandROSA Brand = "ROSA" -) - -// Ingress allows cluster admin to configure alternative ingress for the console. -type Ingress struct { - // consoleURL is a URL to be used as the base console address. - // If not specified, the console route hostname will be used. - // This field is required for clusters without ingress capability, - // where access to routes is not possible. - // Make sure that appropriate ingress is set up at this URL. - // The console operator will monitor the URL and may go degraded - // if it's unreachable for an extended period. - // Must use the HTTPS scheme. - // +optional - // +kubebuilder:validation:XValidation:rule="size(self) == 0 || isURL(self)",message="console url must be a valid absolute URL" - // +kubebuilder:validation:XValidation:rule="size(self) == 0 || url(self).getScheme() == 'https'",message="console url scheme must be https" - // +kubebuilder:validation:MaxLength=1024 - ConsoleURL string `json:"consoleURL"` - // clientDownloadsURL is a URL to be used as the address to download client binaries. - // If not specified, the downloads route hostname will be used. - // This field is required for clusters without ingress capability, - // where access to routes is not possible. - // The console operator will monitor the URL and may go degraded - // if it's unreachable for an extended period. - // Must use the HTTPS scheme. - // +optional - // +kubebuilder:validation:XValidation:rule="size(self) == 0 || isURL(self)",message="client downloads url must be a valid absolute URL" - // +kubebuilder:validation:XValidation:rule="size(self) == 0 || url(self).getScheme() == 'https'",message="client downloads url scheme must be https" - // +kubebuilder:validation:MaxLength=1024 - ClientDownloadsURL string `json:"clientDownloadsURL"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConsoleList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []Console `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go b/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go deleted file mode 100644 index fca2c808d..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_cluster_driver.go +++ /dev/null @@ -1,572 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ClusterCSIDriver is used to manage and configure CSI driver installed by default -// in OpenShift. An example configuration may look like: -// apiVersion: operator.openshift.io/v1 -// kind: "ClusterCSIDriver" -// metadata: -// name: "ebs.csi.aws.com" -// spec: -// logLevel: Debug - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clustercsidrivers,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/701 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=csi-driver,operatorOrdering=01 -// +kubebuilder:validation:XValidation:rule="self.spec.?driverConfig.driverType.orValue('') == 'SecretsStore' ? self.metadata.name == 'secrets-store.csi.k8s.io' : true",message="driverType 'SecretsStore' requires metadata.name 'secrets-store.csi.k8s.io'" -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'secrets-store.csi.k8s.io' ? (!has(self.spec.driverConfig) || self.spec.driverConfig.driverType == 'SecretsStore') : true",message="metadata.name 'secrets-store.csi.k8s.io' requires driverType 'SecretsStore'" -// +kubebuilder:validation:XValidation:rule="oldSelf.spec.?driverConfig.?secretsStore.?tokenRequests.?type.orValue('') != 'Managed' || self.spec.?driverConfig.?secretsStore.?tokenRequests.?type.orValue('') == 'Managed'",message="tokenRequests type cannot be changed from Managed" - -// ClusterCSIDriver object allows management and configuration of a CSI driver operator -// installed by default in OpenShift. Name of the object must be name of the CSI driver -// it operates. See CSIDriverName type for list of allowed values. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterCSIDriver struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec ClusterCSIDriverSpec `json:"spec"` - - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ClusterCSIDriverStatus `json:"status"` -} - -// CSIDriverName is the name of the CSI driver -type CSIDriverName string - -// +kubebuilder:validation:Enum="";Managed;Unmanaged;Removed -// StorageClassStateName defines various configuration states for storageclass management -// and reconciliation by CSI operator. -type StorageClassStateName string - -const ( - // ManagedStorageClass means that the operator is actively managing its storage classes. - // Most manual changes made by cluster admin to storageclass will be wiped away by CSI - // operator if StorageClassState is set to Managed. - ManagedStorageClass StorageClassStateName = "Managed" - // UnmanagedStorageClass means that the operator is not actively managing storage classes. - // If StorageClassState is Unmanaged then CSI operator will not be actively reconciling storage class - // it previously created. This can be useful if cluster admin wants to modify storage class installed - // by CSI operator. - UnmanagedStorageClass StorageClassStateName = "Unmanaged" - // RemovedStorageClass instructs the operator to remove the storage class. - // If StorageClassState is Removed - CSI operator will delete storage classes it created - // previously. This can be useful in clusters where cluster admins want to prevent - // creation of dynamically provisioned volumes but still need rest of the features - // provided by CSI operator and driver. - RemovedStorageClass StorageClassStateName = "Removed" -) - -// If you are adding a new driver name here, ensure that 0000_50_cluster_csi_driver_01_config.crd.yaml-merge-patch file is also updated with new driver name. -const ( - AWSEBSCSIDriver CSIDriverName = "ebs.csi.aws.com" - AWSEFSCSIDriver CSIDriverName = "efs.csi.aws.com" - AzureDiskCSIDriver CSIDriverName = "disk.csi.azure.com" - AzureFileCSIDriver CSIDriverName = "file.csi.azure.com" - GCPFilestoreCSIDriver CSIDriverName = "filestore.csi.storage.gke.io" - GCPPDCSIDriver CSIDriverName = "pd.csi.storage.gke.io" - CinderCSIDriver CSIDriverName = "cinder.csi.openstack.org" - VSphereCSIDriver CSIDriverName = "csi.vsphere.vmware.com" - ManilaCSIDriver CSIDriverName = "manila.csi.openstack.org" - KubevirtCSIDriver CSIDriverName = "csi.kubevirt.io" - SharedResourcesCSIDriver CSIDriverName = "csi.sharedresource.openshift.io" - AlibabaDiskCSIDriver CSIDriverName = "diskplugin.csi.alibabacloud.com" - IBMVPCBlockCSIDriver CSIDriverName = "vpc.block.csi.ibm.io" - IBMPowerVSBlockCSIDriver CSIDriverName = "powervs.csi.ibm.com" - SecretsStoreCSIDriver CSIDriverName = "secrets-store.csi.k8s.io" - SambaCSIDriver CSIDriverName = "smb.csi.k8s.io" -) - -// ClusterCSIDriverSpec is the desired behavior of CSI driver operator -type ClusterCSIDriverSpec struct { - OperatorSpec `json:",inline"` - // storageClassState determines if CSI operator should create and manage storage classes. - // If this field value is empty or Managed - CSI operator will continuously reconcile - // storage class and create if necessary. - // If this field value is Unmanaged - CSI operator will not reconcile any previously created - // storage class. - // If this field value is Removed - CSI operator will delete the storage class it created previously. - // When omitted, this means the user has no opinion and the platform chooses a reasonable default, - // which is subject to change over time. - // The current default behaviour is Managed. - // +optional - StorageClassState StorageClassStateName `json:"storageClassState,omitempty"` - - // driverConfig can be used to specify platform specific driver configuration. - // When omitted, this means no opinion and the platform is left to choose reasonable - // defaults. These defaults are subject to change over time. - // +optional - DriverConfig CSIDriverConfigSpec `json:"driverConfig"` -} - -// CSIDriverType indicates type of CSI driver being configured. -// +kubebuilder:validation:Enum="";AWS;Azure;GCP;IBMCloud;vSphere;SecretsStore -type CSIDriverType string - -const ( - AWSDriverType CSIDriverType = "AWS" - AzureDriverType CSIDriverType = "Azure" - GCPDriverType CSIDriverType = "GCP" - IBMCloudDriverType CSIDriverType = "IBMCloud" - VSphereDriverType CSIDriverType = "vSphere" - SecretsStoreDriverType CSIDriverType = "SecretsStore" -) - -// CSIDriverConfigSpec defines configuration spec that can be -// used to optionally configure a specific CSI Driver. -// +kubebuilder:validation:XValidation:rule="has(self.driverType) && self.driverType == 'IBMCloud' ? has(self.ibmcloud) : !has(self.ibmcloud)",message="ibmcloud must be set if driverType is 'IBMCloud', but remain unset otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.driverType) && self.driverType == 'SecretsStore' ? has(self.secretsStore) : !has(self.secretsStore)",message="secretsStore must be set if driverType is 'SecretsStore', but remain unset otherwise" -// +union -type CSIDriverConfigSpec struct { - // driverType indicates type of CSI driver for which the - // driverConfig is being applied to. - // Valid values are: AWS, Azure, GCP, IBMCloud, vSphere, SecretsStore and omitted. - // Consumers should treat unknown values as a NO-OP. - // +required - // +unionDiscriminator - DriverType CSIDriverType `json:"driverType"` - - // aws is used to configure the AWS CSI driver. - // +optional - AWS *AWSCSIDriverConfigSpec `json:"aws,omitempty"` - - // azure is used to configure the Azure CSI driver. - // +optional - Azure *AzureCSIDriverConfigSpec `json:"azure,omitempty"` - - // gcp is used to configure the GCP CSI driver. - // +optional - GCP *GCPCSIDriverConfigSpec `json:"gcp,omitempty"` - - // ibmcloud is used to configure the IBM Cloud CSI driver. - // +optional - IBMCloud *IBMCloudCSIDriverConfigSpec `json:"ibmcloud,omitempty"` - - // vSphere is used to configure the vsphere CSI driver. - // +optional - VSphere *VSphereCSIDriverConfigSpec `json:"vSphere,omitempty"` - - // secretsStore is used to configure the Secrets Store CSI driver. - // +optional - SecretsStore SecretsStoreCSIDriverConfigSpec `json:"secretsStore,omitzero"` -} - -// AWSCSIDriverConfigSpec defines properties that can be configured for the AWS CSI driver. -type AWSCSIDriverConfigSpec struct { - // kmsKeyARN sets the cluster default storage class to encrypt volumes with a user-defined KMS key, - // rather than the default KMS key used by AWS. - // The value may be either the ARN or Alias ARN of a KMS key. - // - // The ARN must follow the format: arn::kms:::(key|alias)/, where: - // is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc), - // is the AWS region, - // is a 12-digit numeric identifier for the AWS account, - // is the KMS key ID or alias name. - // - // +openshift:validation:FeatureGateAwareXValidation:featureGate="",rule=`matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')`,message=`kmsKeyARN must be a valid AWS KMS key ARN in the format: arn::kms:::(key|alias)/` - // +openshift:validation:FeatureGateAwareXValidation:featureGate=AWSEuropeanSovereignCloudInstall,rule=`matches(self, '^arn:(aws|aws-cn|aws-us-gov|aws-iso|aws-iso-b|aws-iso-e|aws-iso-f|aws-eusc):kms:[a-z0-9-]+:[0-9]{12}:(key|alias)/.*$')`,message=`kmsKeyARN must be a valid AWS KMS key ARN in the format: arn::kms:::(key|alias)/` - // +optional - KMSKeyARN string `json:"kmsKeyARN,omitempty"` - - // efsVolumeMetrics sets the configuration for collecting metrics from EFS volumes used by the EFS CSI Driver. - // +optional - EFSVolumeMetrics *AWSEFSVolumeMetrics `json:"efsVolumeMetrics,omitempty"` -} - -// AWSEFSVolumeMetricsState defines the modes for collecting volume metrics in the AWS EFS CSI Driver. -// This can either enable recursive collection of volume metrics or disable metric collection entirely. -// +kubebuilder:validation:Enum:="RecursiveWalk";"Disabled" -type AWSEFSVolumeMetricsState string - -const ( - // AWSEFSVolumeMetricsRecursiveWalk indicates that volume metrics collection in the AWS EFS CSI Driver - // is performed by recursively walking through the files in the volume. - AWSEFSVolumeMetricsRecursiveWalk AWSEFSVolumeMetricsState = "RecursiveWalk" - - // AWSEFSVolumeMetricsDisabled indicates that volume metrics collection in the AWS EFS CSI Driver is disabled. - AWSEFSVolumeMetricsDisabled AWSEFSVolumeMetricsState = "Disabled" -) - -// AWSEFSVolumeMetrics defines the configuration for volume metrics in the EFS CSI Driver. -// +union -type AWSEFSVolumeMetrics struct { - // state defines the state of metric collection in the AWS EFS CSI Driver. - // This field is required and must be set to one of the following values: Disabled or RecursiveWalk. - // Disabled means no metrics collection will be performed. This is the default value. - // RecursiveWalk means the AWS EFS CSI Driver will recursively scan volumes to collect metrics. - // This process may result in high CPU and memory usage, depending on the volume size. - // +unionDiscriminator - // +required - State AWSEFSVolumeMetricsState `json:"state"` - - // recursiveWalk provides additional configuration for collecting volume metrics in the AWS EFS CSI Driver - // when the state is set to RecursiveWalk. - // +unionMember - // +optional - RecursiveWalk *AWSEFSVolumeMetricsRecursiveWalkConfig `json:"recursiveWalk,omitempty"` -} - -// AWSEFSVolumeMetricsRecursiveWalkConfig defines options for volume metrics in the EFS CSI Driver. -type AWSEFSVolumeMetricsRecursiveWalkConfig struct { - // refreshPeriodMinutes specifies the frequency, in minutes, at which volume metrics are refreshed. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is 240. - // The valid range is from 1 to 43200 minutes (30 days). - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=43200 - // +optional - RefreshPeriodMinutes int32 `json:"refreshPeriodMinutes,omitempty"` - - // fsRateLimit defines the rate limit, in goroutines per file system, for processing volume metrics. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is 5. - // The valid range is from 1 to 100 goroutines. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=100 - // +optional - FSRateLimit int32 `json:"fsRateLimit,omitempty"` -} - -// AzureDiskEncryptionSet defines the configuration for a disk encryption set. -type AzureDiskEncryptionSet struct { - // subscriptionID defines the Azure subscription that contains the disk encryption set. - // The value should meet the following conditions: - // 1. It should be a 128-bit number. - // 2. It should be 36 characters (32 hexadecimal characters and 4 hyphens) long. - // 3. It should be displayed in five groups separated by hyphens (-). - // 4. The first group should be 8 characters long. - // 5. The second, third, and fourth groups should be 4 characters long. - // 6. The fifth group should be 12 characters long. - // An Example SubscrionID: f2007bbf-f802-4a47-9336-cf7c6b89b378 - // +required - // +kubebuilder:validation:MaxLength:=36 - // +kubebuilder:validation:Pattern:=`^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$` - SubscriptionID string `json:"subscriptionID"` - - // resourceGroup defines the Azure resource group that contains the disk encryption set. - // The value should consist of only alphanumberic characters, - // underscores (_), parentheses, hyphens and periods. - // The value should not end in a period and be at most 90 characters in - // length. - // +required - // +kubebuilder:validation:MaxLength:=90 - // +kubebuilder:validation:Pattern:=`^[\w\.\-\(\)]*[\w\-\(\)]$` - ResourceGroup string `json:"resourceGroup"` - - // name is the name of the disk encryption set that will be set on the default storage class. - // The value should consist of only alphanumberic characters, - // underscores (_), hyphens, and be at most 80 characters in length. - // +required - // +kubebuilder:validation:MaxLength:=80 - // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` - Name string `json:"name"` -} - -// AzureCSIDriverConfigSpec defines properties that can be configured for the Azure CSI driver. -type AzureCSIDriverConfigSpec struct { - // diskEncryptionSet sets the cluster default storage class to encrypt volumes with a - // customer-managed encryption set, rather than the default platform-managed keys. - // +optional - DiskEncryptionSet *AzureDiskEncryptionSet `json:"diskEncryptionSet,omitempty"` -} - -// GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key -type GCPKMSKeyReference struct { - // name is the name of the customer-managed encryption key to be used for disk encryption. - // The value should correspond to an existing KMS key and should - // consist of only alphanumeric characters, hyphens (-) and underscores (_), - // and be at most 63 characters in length. - // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` - // +kubebuilder:validation:MinLength:=1 - // +kubebuilder:validation:MaxLength:=63 - // +required - Name string `json:"name"` - - // keyRing is the name of the KMS Key Ring which the KMS Key belongs to. - // The value should correspond to an existing KMS key ring and should - // consist of only alphanumeric characters, hyphens (-) and underscores (_), - // and be at most 63 characters in length. - // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` - // +kubebuilder:validation:MinLength:=1 - // +kubebuilder:validation:MaxLength:=63 - // +required - KeyRing string `json:"keyRing"` - - // projectID is the ID of the Project in which the KMS Key Ring exists. - // It must be 6 to 30 lowercase letters, digits, or hyphens. - // It must start with a letter. Trailing hyphens are prohibited. - // +kubebuilder:validation:Pattern:=`^[a-z][a-z0-9-]+[a-z0-9]$` - // +kubebuilder:validation:MinLength:=6 - // +kubebuilder:validation:MaxLength:=30 - // +required - ProjectID string `json:"projectID"` - - // location is the GCP location in which the Key Ring exists. - // The value must match an existing GCP location, or "global". - // Defaults to global, if not set. - // +kubebuilder:validation:Pattern:=`^[a-zA-Z0-9\_-]+$` - // +optional - Location string `json:"location,omitempty"` -} - -// GCPCSIDriverConfigSpec defines properties that can be configured for the GCP CSI driver. -type GCPCSIDriverConfigSpec struct { - // kmsKey sets the cluster default storage class to encrypt volumes with customer-supplied - // encryption keys, rather than the default keys managed by GCP. - // +optional - KMSKey *GCPKMSKeyReference `json:"kmsKey,omitempty"` -} - -// IBMCloudCSIDriverConfigSpec defines the properties that can be configured for the IBM Cloud CSI driver. -type IBMCloudCSIDriverConfigSpec struct { - // encryptionKeyCRN is the IBM Cloud CRN of the customer-managed root key to use - // for disk encryption of volumes for the default storage classes. - // +required - // +kubebuilder:validation:MaxLength:=154 - // +kubebuilder:validation:MinLength:=144 - // +kubebuilder:validation:Pattern:=`^crn:v[0-9]+:bluemix:(public|private):(kms|hs-crypto):[a-z-]+:a/[0-9a-f]+:[0-9a-f-]{36}:key:[0-9a-f-]{36}$` - EncryptionKeyCRN string `json:"encryptionKeyCRN"` -} - -// VSphereCSIDriverConfigSpec defines properties that -// can be configured for vsphere CSI driver. -type VSphereCSIDriverConfigSpec struct { - // topologyCategories indicates tag categories with which - // vcenter resources such as hostcluster or datacenter were tagged with. - // If cluster Infrastructure object has a topology, values specified in - // Infrastructure object will be used and modifications to topologyCategories - // will be rejected. - // +listType=atomic - // +optional - TopologyCategories []string `json:"topologyCategories,omitempty"` - - // globalMaxSnapshotsPerBlockVolume is a global configuration parameter that applies to volumes on all kinds of - // datastores. If omitted, the platform chooses a default, which is subject to change over time, currently that default is 3. - // Snapshots can not be disabled using this parameter. - // Increasing number of snapshots above 3 can have negative impact on performance, for more details see: https://kb.vmware.com/s/article/1025279 - // Volume snapshot documentation: https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/3.0/vmware-vsphere-csp-getting-started/GUID-E0B41C69-7EEB-450F-A73D-5FD2FF39E891.html - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=32 - // +optional - GlobalMaxSnapshotsPerBlockVolume *uint32 `json:"globalMaxSnapshotsPerBlockVolume,omitempty"` - - // granularMaxSnapshotsPerBlockVolumeInVSAN is a granular configuration parameter on vSAN datastore only. It - // overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. - // Snapshots for VSAN can not be disabled using this parameter. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=32 - // +optional - GranularMaxSnapshotsPerBlockVolumeInVSAN *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVSAN,omitempty"` - - // granularMaxSnapshotsPerBlockVolumeInVVOL is a granular configuration parameter on Virtual Volumes datastore only. - // It overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. - // Snapshots for VVOL can not be disabled using this parameter. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=32 - // +optional - GranularMaxSnapshotsPerBlockVolumeInVVOL *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVVOL,omitempty"` - - // maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting a custom value for the - // limit of the number of PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by - // default, however in vSphere version 8 this limit was increased to 255. - // Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the - // cluster is updated to ESXi version 8 or higher and that all nodes are running the same version. - // The limit must be between 1 and 255, which matches the vSphere version 8 maximum. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to - // change over time. - // The current default is 59, which matches the limit for vSphere version 7. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=255 - // +openshift:enable:FeatureGate=VSphereConfigurableMaxAllowedBlockVolumesPerNode - // +optional - MaxAllowedBlockVolumesPerNode int32 `json:"maxAllowedBlockVolumesPerNode,omitempty"` -} - -// SecretsStoreCSIDriverConfigSpec defines properties that can be configured for the Secrets Store CSI driver. -// +kubebuilder:validation:MinProperties=1 -type SecretsStoreCSIDriverConfigSpec struct { - // secretRotation controls automatic secret rotation behavior. - // When omitted, secret rotation is enabled with a default poll interval of 2 minutes. - // +optional - SecretRotation SecretsStoreSecretRotation `json:"secretRotation,omitzero"` - - // tokenRequests controls service account token configuration for - // workload identity federation (WIF) with cloud providers. - // When omitted, the operator preserves any existing tokenRequests - // already configured on the CSIDriver object without modification. - // +optional - TokenRequests SecretsStoreTokenRequests `json:"tokenRequests,omitzero"` -} - -// TokenRequestsType determines how the operator manages the tokenRequests -// field on the storage.k8s.io CSIDriver object. -// +kubebuilder:validation:Enum=Managed;Unmanaged -type TokenRequestsType string - -const ( - // TokenRequestsManaged means the operator uses the audiences list - // as the sole source of truth for the CSIDriver.spec.tokenRequests field. - TokenRequestsManaged TokenRequestsType = "Managed" - - // TokenRequestsUnmanaged means the operator preserves any existing - // tokenRequests already configured on the CSIDriver object and does not - // overwrite them. - TokenRequestsUnmanaged TokenRequestsType = "Unmanaged" -) - -// SecretsStoreTokenRequests configures how service account tokens are -// provided to the Secrets Store CSI driver for workload identity federation. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Managed' ? has(self.managed) : !has(self.managed)",message="managed must be set when type is 'Managed', and must not be set otherwise" -// +union -type SecretsStoreTokenRequests struct { - // type determines how the operator manages tokenRequests on the CSIDriver object. - // When "Unmanaged", existing tokenRequests on the CSIDriver are preserved - // and the managed field is not used. - // When "Managed", the operator sets tokenRequests from the audiences - // specified in the managed field, replacing any previously configured values. - // Once set to "Managed", type cannot be reverted back to "Unmanaged". - // +unionDiscriminator - // +required - Type TokenRequestsType `json:"type,omitempty"` - - // managed holds configuration for operator-managed tokenRequests. - // Only valid when type is "Managed". - // +optional - Managed ManagedTokenRequests `json:"managed,omitzero"` -} - -// ManagedTokenRequests holds the configuration for operator-managed -// service account token requests. -// +kubebuilder:validation:MinProperties=1 -type ManagedTokenRequests struct { - // audiences specifies service account token audiences that kubelet will - // provide to the CSI driver during NodePublishVolume calls. These tokens - // enable workload identity federation (WIF) with cloud providers such as - // AWS, Azure, and GCP. - // When empty, the operator clears all tokenRequests from the CSIDriver object. - // +optional - // +listType=map - // +listMapKey=audience - // +kubebuilder:validation:MinItems=0 - // +kubebuilder:validation:MaxItems=10 - Audiences *[]SecretsStoreTokenRequest `json:"audiences,omitempty"` -} - -// SecretRotationType determines the secret rotation behavior for the -// Secrets Store CSI driver. -// +kubebuilder:validation:Enum=None;Custom -type SecretRotationType string - -const ( - // SecretRotationNone disables automatic secret rotation. Secrets are only - // fetched at initial pod mount time. - SecretRotationNone SecretRotationType = "None" - - // SecretRotationCustom enables automatic secret rotation with the - // configuration specified in the custom field. - SecretRotationCustom SecretRotationType = "Custom" -) - -// SecretsStoreSecretRotation configures the automatic secret rotation behavior -// for the Secrets Store CSI driver. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Custom' ? has(self.custom) : !has(self.custom)",message="custom must be set when type is 'Custom', and must not be set otherwise" -// +union -type SecretsStoreSecretRotation struct { - // type determines the secret rotation behavior. - // When "None", secret rotation is disabled and secrets are only fetched at - // initial pod mount time. - // When "Custom", secret rotation is enabled with the configuration specified - // in the custom field. - // +unionDiscriminator - // +required - Type SecretRotationType `json:"type,omitempty"` - - // custom holds the custom rotation configuration. - // Only valid when type is "Custom". - // +optional - Custom CustomSecretRotation `json:"custom,omitzero"` -} - -// CustomSecretRotation holds configuration for custom secret rotation behavior. -// +kubebuilder:validation:MinProperties=1 -type CustomSecretRotation struct { - // minimumRefreshAge is the minimum time in seconds between secret - // rotation attempts. Each time kubelet calls NodePublishVolume, the driver - // checks whether this interval has elapsed since the last successful provider - // call. If it has, the driver contacts the secret provider to fetch the latest - // secret values and updates the mounted volume. - // Setting this value below the kubelet syncFrequency (default: 1 minute) - // has no additional effect on the actual rotation cadence. - // Must be at least 1 second and no more than 31560000 seconds (~1 year). - // When omitted, this means no opinion and the platform is left to choose a - // reasonable default, which is subject to change over time. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=31560000 - // +optional - MinimumRefreshAge int32 `json:"minimumRefreshAge,omitempty"` - - // --- TOMBSTONE --- - // rotationPollIntervalSeconds was the previous name for minimumRefreshAge. - // The field has been renamed to better reflect its semantics. - // The JSON key is reserved to prevent reuse. - // - // +optional - // RotationPollIntervalSeconds int32 `json:"rotationPollIntervalSeconds,omitempty"` -} - -// SecretsStoreTokenRequest specifies a service account token audience configuration -// for workload identity federation (WIF) with the Secrets Store CSI driver. -type SecretsStoreTokenRequest struct { - // audience is the intended audience of the service account token. - // An empty string means the issued token will use the kube-apiserver's default APIAudiences. - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=253 - // +required - Audience *string `json:"audience,omitempty"` - - // expirationSeconds is the requested duration of validity of the service account token. - // The token issuer may return a token with a different validity duration. - // When omitted, the token expiration is determined by the kube-apiserver. - // Must be at least 600 seconds (10 minutes) and no more than 315360000 seconds (~10 years). - // +kubebuilder:validation:Minimum=600 - // +kubebuilder:validation:Maximum=315360000 - // +optional - ExpirationSeconds int32 `json:"expirationSeconds,omitempty"` -} - -// ClusterCSIDriverStatus is the observed status of CSI driver operator -type ClusterCSIDriverStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterCSIDriverList contains a list of ClusterCSIDriver -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterCSIDriverList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []ClusterCSIDriver `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go b/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go deleted file mode 100644 index d6d283d36..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_csi_snapshot.go +++ /dev/null @@ -1,60 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=csisnapshotcontrollers,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/562 -// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=csi-snapshot-controller,operatorOrdering=01 - -// CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type CSISnapshotController struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec CSISnapshotControllerSpec `json:"spec"` - - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status CSISnapshotControllerStatus `json:"status"` -} - -// CSISnapshotControllerSpec is the specification of the desired behavior of the CSISnapshotController operator. -type CSISnapshotControllerSpec struct { - OperatorSpec `json:",inline"` -} - -// CSISnapshotControllerStatus defines the observed status of the CSISnapshotController operator. -type CSISnapshotControllerStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CSISnapshotControllerList contains a list of CSISnapshotControllers. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type CSISnapshotControllerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []CSISnapshotController `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_dns.go b/vendor/github.com/openshift/api/operator/v1/types_dns.go deleted file mode 100644 index 258804786..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_dns.go +++ /dev/null @@ -1,525 +0,0 @@ -package v1 - -import ( - v1 "github.com/openshift/api/config/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=dnses,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_70,operatorName=dns,operatorOrdering=00 - -// DNS manages the CoreDNS component to provide a name resolution service -// for pods and services in the cluster. -// -// This supports the DNS-based service discovery specification: -// https://github.com/kubernetes/dns/blob/master/docs/specification.md -// -// More details: https://kubernetes.io/docs/tasks/administer-cluster/coredns -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DNS struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired behavior of the DNS. - Spec DNSSpec `json:"spec,omitempty"` - // status is the most recently observed status of the DNS. - Status DNSStatus `json:"status,omitempty"` -} - -// DNSSpec is the specification of the desired behavior of the DNS. -type DNSSpec struct { - // servers is a list of DNS resolvers that provide name query delegation for one or - // more subdomains outside the scope of the cluster domain. If servers consists of - // more than one Server, longest suffix match will be used to determine the Server. - // - // For example, if there are two Servers, one for "foo.com" and another for "a.foo.com", - // and the name query is for "www.a.foo.com", it will be routed to the Server with Zone - // "a.foo.com". - // - // If this field is nil, no servers are created. - // - // +optional - Servers []Server `json:"servers,omitempty"` - - // upstreamResolvers defines a schema for configuring CoreDNS - // to proxy DNS messages to upstream resolvers for the case of the - // default (".") server - // - // If this field is not specified, the upstream used will default to - // /etc/resolv.conf, with policy "sequential" - // - // +optional - UpstreamResolvers UpstreamResolvers `json:"upstreamResolvers"` - - // nodePlacement provides explicit control over the scheduling of DNS - // pods. - // - // Generally, it is useful to run a DNS pod on every node so that DNS - // queries are always handled by a local DNS pod instead of going over - // the network to a DNS pod on another node. However, security policies - // may require restricting the placement of DNS pods to specific nodes. - // For example, if a security policy prohibits pods on arbitrary nodes - // from communicating with the API, a node selector can be specified to - // restrict DNS pods to nodes that are permitted to communicate with the - // API. Conversely, if running DNS pods on nodes with a particular - // taint is desired, a toleration can be specified for that taint. - // - // If unset, defaults are used. See nodePlacement for more details. - // - // +optional - NodePlacement DNSNodePlacement `json:"nodePlacement,omitempty"` - - // managementState indicates whether the DNS operator should manage cluster - // DNS - // +optional - ManagementState ManagementState `json:"managementState,omitempty"` - - // operatorLogLevel controls the logging level of the DNS Operator. - // Valid values are: "Normal", "Debug", "Trace". - // Defaults to "Normal". - // setting operatorLogLevel: Trace will produce extremely verbose logs. - // +optional - // +kubebuilder:default=Normal - OperatorLogLevel DNSLogLevel `json:"operatorLogLevel,omitempty"` - - // logLevel describes the desired logging verbosity for CoreDNS. - // Any one of the following values may be specified: - // * Normal logs errors from upstream resolvers. - // * Debug logs errors, NXDOMAIN responses, and NODATA responses. - // * Trace logs errors and all responses. - // Setting logLevel: Trace will produce extremely verbose logs. - // Valid values are: "Normal", "Debug", "Trace". - // Defaults to "Normal". - // +optional - // +kubebuilder:default=Normal - LogLevel DNSLogLevel `json:"logLevel,omitempty"` - - // cache describes the caching configuration that applies to all server blocks listed in the Corefile. - // This field allows a cluster admin to optionally configure: - // * positiveTTL which is a duration for which positive responses should be cached. - // * negativeTTL which is a duration for which negative responses should be cached. - // If this is not configured, OpenShift will configure positive and negative caching with a default value that is - // subject to change. At the time of writing, the default positiveTTL is 900 seconds and the default negativeTTL is - // 30 seconds or as noted in the respective Corefile for your version of OpenShift. - // +optional - Cache DNSCache `json:"cache,omitempty"` -} - -// DNSCache defines the fields for configuring DNS caching. -type DNSCache struct { - // positiveTTL is optional and specifies the amount of time that a positive response should be cached. - // - // If configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This - // field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, - // e.g. "100s", "1m30s", "12h30m10s". Values that are fractions of a second are rounded down to the nearest second. - // If the configured value is less than 1s, the default value will be used. - // If not configured, the value will be 0s and OpenShift will use a default value of 900 seconds unless noted - // otherwise in the respective Corefile for your version of OpenShift. The default value of 900 seconds is subject - // to change. - // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ - // +kubebuilder:validation:Type:=string - // +optional - PositiveTTL metav1.Duration `json:"positiveTTL,omitempty"` - - // negativeTTL is optional and specifies the amount of time that a negative response should be cached. - // - // If configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This - // field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, - // e.g. "100s", "1m30s", "12h30m10s". Values that are fractions of a second are rounded down to the nearest second. - // If the configured value is less than 1s, the default value will be used. - // If not configured, the value will be 0s and OpenShift will use a default value of 30 seconds unless noted - // otherwise in the respective Corefile for your version of OpenShift. The default value of 30 seconds is subject - // to change. - // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ - // +kubebuilder:validation:Type:=string - // +optional - NegativeTTL metav1.Duration `json:"negativeTTL,omitempty"` -} - -// +kubebuilder:validation:Enum:=Normal;Debug;Trace -type DNSLogLevel string - -var ( - // Normal is the default. Normal, working log information, everything is fine, but helpful notices for auditing or common operations. In kube, this is probably glog=2. - DNSLogLevelNormal DNSLogLevel = "Normal" - - // Debug is used when something went wrong. Even common operations may be logged, and less helpful but more quantity of notices. In kube, this is probably glog=4. - DNSLogLevelDebug DNSLogLevel = "Debug" - - // Trace is used when something went really badly and even more verbose logs are needed. Logging every function call as part of a common operation, to tracing execution of a query. In kube, this is probably glog=6. - DNSLogLevelTrace DNSLogLevel = "Trace" -) - -// Server defines the schema for a server that runs per instance of CoreDNS. -type Server struct { - // name is required and specifies a unique name for the server. Name must comply - // with the Service Name Syntax of rfc6335. - Name string `json:"name"` - // zones is required and specifies the subdomains that Server is authoritative for. - // Zones must conform to the rfc1123 definition of a subdomain. Specifying the - // cluster domain (i.e., "cluster.local") is invalid. - Zones []string `json:"zones"` - // forwardPlugin defines a schema for configuring CoreDNS to proxy DNS messages - // to upstream resolvers. - ForwardPlugin ForwardPlugin `json:"forwardPlugin"` -} - -// DNSTransport indicates what type of connection should be used. -// +kubebuilder:validation:Enum=TLS;Cleartext;"" -type DNSTransport string - -const ( - // TLSTransport indicates that TLS should be used for the connection. - TLSTransport DNSTransport = "TLS" - - // CleartextTransport indicates that no encryption should be used for - // the connection. - CleartextTransport DNSTransport = "Cleartext" -) - -// DNSTransportConfig groups related configuration parameters used for configuring -// forwarding to upstream resolvers that support DNS-over-TLS. -// +union -type DNSTransportConfig struct { - // transport allows cluster administrators to opt-in to using a DNS-over-TLS - // connection between cluster DNS and an upstream resolver(s). Configuring - // TLS as the transport at this level without configuring a CABundle will - // result in the system certificates being used to verify the serving - // certificate of the upstream resolver(s). - // - // Possible values: - // "" (empty) - This means no explicit choice has been made and the platform chooses the default which is subject - // to change over time. The current default is "Cleartext". - // "Cleartext" - Cluster admin specified cleartext option. This results in the same functionality - // as an empty value but may be useful when a cluster admin wants to be more explicit about the transport, - // or wants to switch from "TLS" to "Cleartext" explicitly. - // "TLS" - This indicates that DNS queries should be sent over a TLS connection. If Transport is set to TLS, - // you MUST also set ServerName. If a port is not included with the upstream IP, port 853 will be tried by default - // per RFC 7858 section 3.1; https://datatracker.ietf.org/doc/html/rfc7858#section-3.1. - // - // +optional - // +unionDiscriminator - Transport DNSTransport `json:"transport,omitempty"` - - // tls contains the additional configuration options to use when Transport is set to "TLS". - TLS *DNSOverTLSConfig `json:"tls,omitempty"` -} - -// DNSOverTLSConfig describes optional DNSTransportConfig fields that should be captured. -type DNSOverTLSConfig struct { - // serverName is the upstream server to connect to when forwarding DNS queries. This is required when Transport is - // set to "TLS". ServerName will be validated against the DNS naming conventions in RFC 1123 and should match the - // TLS certificate installed in the upstream resolver(s). - // - // + --- - // + Inspired by the DNS1123 patterns in Kubernetes: https://github.com/kubernetes/kubernetes/blob/7c46f40bdf89a437ecdbc01df45e235b5f6d9745/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L178-L218 - // +required - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - ServerName string `json:"serverName"` - - // caBundle references a ConfigMap that must contain either a single - // CA Certificate or a CA Bundle. This allows cluster administrators to provide their - // own CA or CA bundle for validating the certificate of upstream resolvers. - // - // 1. The configmap must contain a `ca-bundle.crt` key. - // 2. The value must be a PEM encoded CA certificate or CA bundle. - // 3. The administrator must create this configmap in the openshift-config namespace. - // 4. The upstream server certificate must contain a Subject Alternative Name (SAN) that matches ServerName. - // - // +optional - CABundle v1.ConfigMapNameReference `json:"caBundle,omitempty"` -} - -// ForwardingPolicy is the policy to use when forwarding DNS requests. -// +kubebuilder:validation:Enum=Random;RoundRobin;Sequential -type ForwardingPolicy string - -const ( - // RandomForwardingPolicy picks a random upstream server for each query. - RandomForwardingPolicy ForwardingPolicy = "Random" - - // RoundRobinForwardingPolicy picks upstream servers in a round-robin order, moving to the next server for each new query. - RoundRobinForwardingPolicy ForwardingPolicy = "RoundRobin" - - // SequentialForwardingPolicy tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query. - SequentialForwardingPolicy ForwardingPolicy = "Sequential" -) - -// ForwardPlugin defines a schema for configuring the CoreDNS forward plugin. -type ForwardPlugin struct { - // upstreams is a list of resolvers to forward name queries for subdomains of Zones. - // Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream - // returns an error during the exchange, another resolver is tried from Upstreams. The - // Upstreams are selected in the order specified in Policy. Each upstream is represented - // by an IP address or IP:port if the upstream listens on a port other than 53. - // - // A maximum of 15 upstreams is allowed per ForwardPlugin. - // - // +kubebuilder:validation:MaxItems=15 - Upstreams []string `json:"upstreams"` - - // policy is used to determine the order in which upstream servers are selected for querying. - // Any one of the following values may be specified: - // - // * "Random" picks a random upstream server for each query. - // * "RoundRobin" picks upstream servers in a round-robin order, moving to the next server for each new query. - // * "Sequential" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query. - // - // The default value is "Random" - // - // +optional - // +kubebuilder:default:="Random" - Policy ForwardingPolicy `json:"policy,omitempty"` - - // transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use - // when forwarding DNS requests to an upstream resolver. - // - // The default value is "" (empty) which results in a standard cleartext connection being used when forwarding DNS - // requests to an upstream resolver. - // - // +optional - TransportConfig DNSTransportConfig `json:"transportConfig,omitempty"` - - // protocolStrategy specifies the protocol to use for upstream DNS - // requests. - // Valid values for protocolStrategy are "TCP" and omitted. - // When omitted, this means no opinion and the platform is left to choose - // a reasonable default, which is subject to change over time. - // The current default is to use the protocol of the original client request. - // "TCP" specifies that the platform should use TCP for all upstream DNS requests, - // even if the client request uses UDP. - // "TCP" is useful for UDP-specific issues such as those created by - // non-compliant upstream resolvers, but may consume more bandwidth or - // increase DNS response time. Note that protocolStrategy only affects - // the protocol of DNS requests that CoreDNS makes to upstream resolvers. - // It does not affect the protocol of DNS requests between clients and - // CoreDNS. - // - // +optional - ProtocolStrategy ProtocolStrategy `json:"protocolStrategy"` -} - -// UpstreamResolvers defines a schema for configuring the CoreDNS forward plugin in the -// specific case of the default (".") server. -// It defers from ForwardPlugin in the default values it accepts: -// * At least one upstream should be specified. -// * the default policy is Sequential -type UpstreamResolvers struct { - // upstreams is a list of resolvers to forward name queries for the "." domain. - // Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream - // returns an error during the exchange, another resolver is tried from Upstreams. The - // Upstreams are selected in the order specified in Policy. - // - // A maximum of 15 upstreams is allowed per ForwardPlugin. - // If no Upstreams are specified, /etc/resolv.conf is used by default - // - // +optional - // +kubebuilder:validation:MaxItems=15 - // +kubebuilder:default={{"type":"SystemResolvConf"}} - Upstreams []Upstream `json:"upstreams"` - - // policy is used to determine the order in which upstream servers are selected for querying. - // Any one of the following values may be specified: - // - // * "Random" picks a random upstream server for each query. - // * "RoundRobin" picks upstream servers in a round-robin order, moving to the next server for each new query. - // * "Sequential" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query. - // - // The default value is "Sequential" - // - // +optional - // +kubebuilder:default="Sequential" - Policy ForwardingPolicy `json:"policy,omitempty"` - - // transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use - // when forwarding DNS requests to an upstream resolver. - // - // The default value is "" (empty) which results in a standard cleartext connection being used when forwarding DNS - // requests to an upstream resolver. - // - // +optional - TransportConfig DNSTransportConfig `json:"transportConfig,omitempty"` - - // protocolStrategy specifies the protocol to use for upstream DNS - // requests. - // Valid values for protocolStrategy are "TCP" and omitted. - // When omitted, this means no opinion and the platform is left to choose - // a reasonable default, which is subject to change over time. - // The current default is to use the protocol of the original client request. - // "TCP" specifies that the platform should use TCP for all upstream DNS requests, - // even if the client request uses UDP. - // "TCP" is useful for UDP-specific issues such as those created by - // non-compliant upstream resolvers, but may consume more bandwidth or - // increase DNS response time. Note that protocolStrategy only affects - // the protocol of DNS requests that CoreDNS makes to upstream resolvers. - // It does not affect the protocol of DNS requests between clients and - // CoreDNS. - // - // +optional - ProtocolStrategy ProtocolStrategy `json:"protocolStrategy"` -} - -// Upstream can either be of type SystemResolvConf, or of type Network. -// -// - For an Upstream of type SystemResolvConf, no further fields are necessary: -// The upstream will be configured to use /etc/resolv.conf. -// - For an Upstream of type Network, a NetworkResolver field needs to be defined -// with an IP address or IP:port if the upstream listens on a port other than 53. -type Upstream struct { - - // type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. - // Type accepts 2 possible values: SystemResolvConf or Network. - // - // * When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined: - // /etc/resolv.conf will be used - // * When Network is used, the Upstream structure must contain at least an Address - // - // +required - Type UpstreamType `json:"type"` - - // address must be defined when Type is set to Network. It will be ignored otherwise. - // It must be a valid ipv4 or ipv6 address. - // - // +optional - Address string `json:"address,omitempty"` - - // port may be defined when Type is set to Network. It will be ignored otherwise. - // Port must be between 65535 - // - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:default=53 - Port uint32 `json:"port,omitempty"` -} - -// +kubebuilder:validation:Enum=SystemResolvConf;Network;"" -type UpstreamType string - -const ( - SystemResolveConfType UpstreamType = "SystemResolvConf" - NetworkResolverType UpstreamType = "Network" -) - -// ProtocolStrategy is a preference for the protocol to use for DNS queries. -// + --- -// + When consumers observe an unknown value, they should use the default strategy. -// +kubebuilder:validation:Enum:=TCP;"" -type ProtocolStrategy string - -var ( - // ProtocolStrategyDefault specifies no opinion for DNS protocol. - // If empty, the default behavior of CoreDNS is used. Currently, this means that CoreDNS uses the protocol of the - // originating client request as the upstream protocol. - // Note that the default behavior of CoreDNS is subject to change. - ProtocolStrategyDefault ProtocolStrategy = "" - - // ProtocolStrategyTCP instructs CoreDNS to always use TCP, regardless of the originating client's request protocol. - ProtocolStrategyTCP ProtocolStrategy = "TCP" -) - -// DNSNodePlacement describes the node scheduling configuration for DNS pods. -type DNSNodePlacement struct { - // nodeSelector is the node selector applied to DNS pods. - // - // If empty, the default is used, which is currently the following: - // - // kubernetes.io/os: linux - // - // This default is subject to change. - // - // If set, the specified selector is used and replaces the default. - // - // +optional - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - - // tolerations is a list of tolerations applied to DNS pods. - // - // If empty, the DNS operator sets a toleration for the - // "node-role.kubernetes.io/master" taint. This default is subject to - // change. Specifying tolerations without including a toleration for - // the "node-role.kubernetes.io/master" taint may be risky as it could - // lead to an outage if all worker nodes become unavailable. - // - // Note that the daemon controller adds some tolerations as well. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ - // - // +optional - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -const ( - // Available indicates the DNS controller daemonset is available. - DNSAvailable = "Available" -) - -// DNSStatus defines the observed status of the DNS. -type DNSStatus struct { - // clusterIP is the service IP through which this DNS is made available. - // - // In the case of the default DNS, this will be a well known IP that is used - // as the default nameserver for pods that are using the default ClusterFirst DNS policy. - // - // In general, this IP can be specified in a pod's spec.dnsConfig.nameservers list - // or used explicitly when performing name resolution from within the cluster. - // Example: dig foo.com @ - // - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - // - // +required - ClusterIP string `json:"clusterIP"` - - // clusterDomain is the local cluster DNS domain suffix for DNS services. - // This will be a subdomain as defined in RFC 1034, - // section 3.5: https://tools.ietf.org/html/rfc1034#section-3.5 - // Example: "cluster.local" - // - // More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service - // - // +required - ClusterDomain string `json:"clusterDomain"` - - // conditions provide information about the state of the DNS on the cluster. - // - // These are the supported DNS conditions: - // - // * Available - // - True if the following conditions are met: - // * DNS controller daemonset is available. - // - False if any of those conditions are unsatisfied. - // - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []OperatorCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DNSList contains a list of DNS -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type DNSList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []DNS `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_etcd.go b/vendor/github.com/openshift/api/operator/v1/types_etcd.go deleted file mode 100644 index f2f113103..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_etcd.go +++ /dev/null @@ -1,96 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=etcds,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/752 -// +openshift:file-pattern=cvoRunLevel=0000_12,operatorName=etcd,operatorOrdering=01 - -// Etcd provides information to configure an operator to manage etcd. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Etcd struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +required - Spec EtcdSpec `json:"spec"` - // +optional - Status EtcdStatus `json:"status"` -} - -type EtcdSpec struct { - StaticPodOperatorSpec `json:",inline"` - // HardwareSpeed allows user to change the etcd tuning profile which configures - // the latency parameters for heartbeat interval and leader election timeouts - // allowing the cluster to tolerate longer round-trip-times between etcd members. - // Valid values are "", "Standard" and "Slower". - // "" means no opinion and the platform is left to choose a reasonable default - // which is subject to change without notice. - // +optional - HardwareSpeed ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed"` - - // backendQuotaGiB sets the etcd backend storage size limit in gibibytes. - // The value should be an integer not less than 8 and not more than 16. - // When not specified, the default value is 8. - // +kubebuilder:default:=8 - // +kubebuilder:validation:Minimum=8 - // +kubebuilder:validation:Maximum=16 - // +kubebuilder:validation:XValidation:rule="self>=oldSelf",message="etcd backendQuotaGiB may not be decreased" - // +openshift:enable:FeatureGate=EtcdBackendQuota - // +default=8 - // +optional - BackendQuotaGiB int32 `json:"backendQuotaGiB,omitempty"` -} - -type EtcdStatus struct { - StaticPodOperatorStatus `json:",inline"` - // +optional - HardwareSpeed ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed"` -} - -const ( - // StandardHardwareSpeed provides the normal tolerances for hardware speed and latency. - // Currently sets (values subject to change at any time): - // ETCD_HEARTBEAT_INTERVAL: 100ms - // ETCD_LEADER_ELECTION_TIMEOUT: 1000ms - StandardHardwareSpeed ControlPlaneHardwareSpeed = "Standard" - // SlowerHardwareSpeed provides more tolerance for slower hardware and/or higher latency networks. - // Sets (values subject to change): - // ETCD_HEARTBEAT_INTERVAL: 5x Standard - // ETCD_LEADER_ELECTION_TIMEOUT: 2.5x Standard - SlowerHardwareSpeed ControlPlaneHardwareSpeed = "Slower" -) - -// ControlPlaneHardwareSpeed declares valid hardware speed tolerance levels -// +enum -// +kubebuilder:validation:Enum:="";Standard;Slower -type ControlPlaneHardwareSpeed string - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeAPISOperatorConfigList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type EtcdList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []Etcd `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_ingresscontroller.go b/vendor/github.com/openshift/api/operator/v1/types_ingresscontroller.go deleted file mode 100644 index 2d442d4b4..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_ingresscontroller.go +++ /dev/null @@ -1,2386 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - corev1 "k8s.io/api/core/v1" - - configv1 "github.com/openshift/api/config/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:subresource:scale:specpath=.spec.replicas,statuspath=.status.availableReplicas,selectorpath=.status.selector -// +kubebuilder:resource:path=ingresscontrollers,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/616 -// +openshift:capability=Ingress -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=ingress,operatorOrdering=00 - -// IngressController describes a managed ingress controller for the cluster. The -// controller can service OpenShift Route and Kubernetes Ingress resources. -// -// When an IngressController is created, a new ingress controller deployment is -// created to allow external traffic to reach the services that expose Ingress -// or Route resources. Updating this resource may lead to disruption for public -// facing network connections as a new ingress controller revision may be rolled -// out. -// -// https://kubernetes.io/docs/concepts/services-networking/ingress-controllers -// -// Whenever possible, sensible defaults for the platform are used. See each -// field for more details. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:validation:XValidation:rule="!has(self.spec.domain) || size('router-' + self.metadata.name + '.' + self.spec.domain) <= 253",message="The combined 'router-' + metadata.name + '.' + .spec.domain cannot exceed 253 characters" -type IngressController struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired behavior of the IngressController. - Spec IngressControllerSpec `json:"spec,omitempty"` - // status is the most recently observed status of the IngressController. - Status IngressControllerStatus `json:"status,omitempty"` -} - -// IngressControllerSpec is the specification of the desired behavior of the -// IngressController. -type IngressControllerSpec struct { - // domain is a DNS name serviced by the ingress controller and is used to - // configure multiple features: - // - // * For the LoadBalancerService endpoint publishing strategy, domain is - // used to configure DNS records. See endpointPublishingStrategy. - // - // * When using a generated default certificate, the certificate will be valid - // for domain and its subdomains. See defaultCertificate. - // - // * The value is published to individual Route statuses so that end-users - // know where to target external DNS records. - // - // domain must be unique among all IngressControllers, and cannot be - // updated. - // - // If empty, defaults to ingress.config.openshift.io/cluster .spec.domain. - // - // The domain value must be a valid DNS name. It must consist of lowercase - // alphanumeric characters, '-' or '.', and each label must start and end - // with an alphanumeric character and not exceed 63 characters. Maximum - // length of a valid DNS domain is 253 characters. - // - // The implementation may add a prefix such as "router-default." to the domain - // when constructing the router canonical hostname. To ensure the resulting - // hostname does not exceed the DNS maximum length of 253 characters, - // the domain length is additionally validated at the IngressController object - // level. For the maximum length of the domain value itself, the shortest - // possible variant of the prefix and the ingress controller name was considered - // for example "router-a." - // - // +kubebuilder:validation:MaxLength=244 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="domain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" - // +kubebuilder:validation:XValidation:rule="self.split('.').all(label, size(label) <= 63)",message="each DNS label must not exceed 63 characters" - // +optional - Domain string `json:"domain,omitempty"` - - // httpErrorCodePages specifies a configmap with custom error pages. - // The administrator must create this configmap in the openshift-config namespace. - // This configmap should have keys in the format "error-page-.http", - // where is an HTTP error code. - // For example, "error-page-503.http" defines an error page for HTTP 503 responses. - // Currently only error pages for 503 and 404 responses can be customized. - // Each value in the configmap should be the full response, including HTTP headers. - // Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http - // If this field is empty, the ingress controller uses the default error pages. - HttpErrorCodePages configv1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"` - - // replicas is the desired number of ingress controller replicas. If unset, - // the default depends on the value of the defaultPlacement field in the - // cluster config.openshift.io/v1/ingresses status. - // - // The value of replicas is set based on the value of a chosen field in the - // Infrastructure CR. If defaultPlacement is set to ControlPlane, the - // chosen field will be controlPlaneTopology. If it is set to Workers the - // chosen field will be infrastructureTopology. Replicas will then be set to 1 - // or 2 based whether the chosen field's value is SingleReplica or - // HighlyAvailable, respectively. - // - // These defaults are subject to change. - // - // +optional - Replicas *int32 `json:"replicas,omitempty"` - - // endpointPublishingStrategy is used to publish the ingress controller - // endpoints to other networks, enable load balancer integrations, etc. - // - // If unset, the default is based on - // infrastructure.config.openshift.io/cluster .status.platform: - // - // AWS: LoadBalancerService (with External scope) - // Azure: LoadBalancerService (with External scope) - // GCP: LoadBalancerService (with External scope) - // IBMCloud: LoadBalancerService (with External scope) - // AlibabaCloud: LoadBalancerService (with External scope) - // Libvirt: HostNetwork - // - // Any other platform types (including None) default to HostNetwork. - // - // endpointPublishingStrategy cannot be updated. - // - // +optional - EndpointPublishingStrategy *EndpointPublishingStrategy `json:"endpointPublishingStrategy,omitempty"` - - // defaultCertificate is a reference to a secret containing the default - // certificate served by the ingress controller. When Routes don't specify - // their own certificate, defaultCertificate is used. - // - // The secret must contain the following keys and data: - // - // tls.crt: certificate file contents - // tls.key: key file contents - // - // If unset, a wildcard certificate is automatically generated and used. The - // certificate is valid for the ingress controller domain (and subdomains) and - // the generated certificate's CA will be automatically integrated with the - // cluster's trust store. - // - // If a wildcard certificate is used and shared by multiple - // HTTP/2 enabled routes (which implies ALPN) then clients - // (i.e., notably browsers) are at liberty to reuse open - // connections. This means a client can reuse a connection to - // another route and that is likely to fail. This behaviour is - // generally known as connection coalescing. - // - // The in-use certificate (whether generated or user-specified) will be - // automatically integrated with OpenShift's built-in OAuth server. - // - // +optional - DefaultCertificate *corev1.LocalObjectReference `json:"defaultCertificate,omitempty"` - - // namespaceSelector is used to filter the set of namespaces serviced by the - // ingress controller. This is useful for implementing shards. - // - // If unset, the default is no filtering. - // - // +optional - NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` - - // routeSelector is used to filter the set of Routes serviced by the ingress - // controller. This is useful for implementing shards. - // - // If unset, the default is no filtering. - // - // +optional - RouteSelector *metav1.LabelSelector `json:"routeSelector,omitempty"` - - // nodePlacement enables explicit control over the scheduling of the ingress - // controller. - // - // If unset, defaults are used. See NodePlacement for more details. - // - // +optional - NodePlacement *NodePlacement `json:"nodePlacement,omitempty"` - - // tlsSecurityProfile specifies settings for TLS connections for ingresscontrollers. - // - // If unset, the default is based on the apiservers.config.openshift.io/cluster resource. - // - // Note that when using the Old, Intermediate, and Modern profile types, the effective - // profile configuration is subject to change between releases. For example, given - // a specification to use the Intermediate profile deployed on release X.Y.Z, an upgrade - // to release X.Y.Z+1 may cause a new profile configuration to be applied to the ingress - // controller, resulting in a rollout. - // - // +optional - TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` - - // clientTLS specifies settings for requesting and verifying client - // certificates, which can be used to enable mutual TLS for - // edge-terminated and reencrypt routes. - // - // +optional - ClientTLS ClientTLS `json:"clientTLS"` - - // routeAdmission defines a policy for handling new route claims (for example, - // to allow or deny claims across namespaces). - // - // If empty, defaults will be applied. See specific routeAdmission fields - // for details about their defaults. - // - // +optional - RouteAdmission *RouteAdmissionPolicy `json:"routeAdmission,omitempty"` - - // logging defines parameters for what should be logged where. If this - // field is empty, operational logs are enabled but access logs are - // disabled. - // - // +optional - Logging *IngressControllerLogging `json:"logging,omitempty"` - - // httpHeaders defines policy for HTTP headers. - // - // If this field is empty, the default values are used. - // - // +optional - HTTPHeaders *IngressControllerHTTPHeaders `json:"httpHeaders,omitempty"` - - // httpEmptyRequestsPolicy describes how HTTP connections should be - // handled if the connection times out before a request is received. - // Allowed values for this field are "Respond" and "Ignore". If the - // field is set to "Respond", the ingress controller sends an HTTP 400 - // or 408 response, logs the connection (if access logging is enabled), - // and counts the connection in the appropriate metrics. If the field - // is set to "Ignore", the ingress controller closes the connection - // without sending a response, logging the connection, or incrementing - // metrics. The default value is "Respond". - // - // Typically, these connections come from load balancers' health probes - // or Web browsers' speculative connections ("preconnect") and can be - // safely ignored. However, these requests may also be caused by - // network errors, and so setting this field to "Ignore" may impede - // detection and diagnosis of problems. In addition, these requests may - // be caused by port scans, in which case logging empty requests may aid - // in detecting intrusion attempts. - // - // +optional - // +kubebuilder:default:="Respond" - HTTPEmptyRequestsPolicy HTTPEmptyRequestsPolicy `json:"httpEmptyRequestsPolicy,omitempty"` - - // tuningOptions defines parameters for adjusting the performance of - // ingress controller pods. All fields are optional and will use their - // respective defaults if not set. See specific tuningOptions fields for - // more details. - // - // Setting fields within tuningOptions is generally not recommended. The - // default values are suitable for most configurations. - // - // +optional - TuningOptions IngressControllerTuningOptions `json:"tuningOptions,omitempty"` - - // unsupportedConfigOverrides allows specifying unsupported - // configuration options. Its use is unsupported. - // - // +optional - // +nullable - // +kubebuilder:pruning:PreserveUnknownFields - UnsupportedConfigOverrides runtime.RawExtension `json:"unsupportedConfigOverrides"` - - // httpCompression defines a policy for HTTP traffic compression. - // By default, there is no HTTP compression. - // - // +optional - HTTPCompression HTTPCompressionPolicy `json:"httpCompression,omitempty"` - - // idleConnectionTerminationPolicy maps directly to HAProxy's - // idle-close-on-response option and controls whether HAProxy - // keeps idle frontend connections open during a soft stop - // (router reload). - // - // Allowed values for this field are "Immediate" and - // "Deferred". The default value is "Immediate". - // - // When set to "Immediate", idle connections are closed - // immediately during router reloads. This ensures immediate - // propagation of route changes but may impact clients - // sensitive to connection resets. - // - // When set to "Deferred", HAProxy will maintain idle - // connections during a soft reload instead of closing them - // immediately. These connections remain open until any of the - // following occurs: - // - // - A new request is received on the connection, in which - // case HAProxy handles it in the old process and closes - // the connection after sending the response. - // - // - HAProxy's `timeout http-keep-alive` duration expires. - // By default this is 300 seconds, but it can be changed - // using httpKeepAliveTimeout tuning option. - // - // - The client's keep-alive timeout expires, causing the - // client to close the connection. - // - // Setting Deferred can help prevent errors in clients or load - // balancers that do not properly handle connection resets. - // Additionally, this option allows you to retain the pre-2.4 - // HAProxy behaviour: in HAProxy version 2.2 (OpenShift - // versions < 4.14), maintaining idle connections during a - // soft reload was the default behaviour, but starting with - // HAProxy 2.4, the default changed to closing idle - // connections immediately. - // - // Important Consideration: - // - // - Using Deferred will result in temporary inconsistencies - // for the first request on each persistent connection - // after a route update and router reload. This request - // will be processed by the old HAProxy process using its - // old configuration. Subsequent requests will use the - // updated configuration. - // - // Operational Considerations: - // - // - Keeping idle connections open during reloads may lead - // to an accumulation of old HAProxy processes if - // connections remain idle for extended periods, - // especially in environments where frequent reloads - // occur. - // - // - Consider monitoring the number of HAProxy processes in - // the router pods when Deferred is set. - // - // - You may need to enable or adjust the - // `ingress.operator.openshift.io/hard-stop-after` - // duration (configured via an annotation on the - // IngressController resource) in environments with - // frequent reloads to prevent resource exhaustion. - // - // +optional - // +kubebuilder:default:="Immediate" - // +default="Immediate" - IdleConnectionTerminationPolicy IngressControllerConnectionTerminationPolicy `json:"idleConnectionTerminationPolicy,omitempty"` - - // closedClientConnectionPolicy controls how the IngressController - // behaves when the client closes the TCP connection while the TLS - // handshake or HTTP request is in progress. This option maps directly - // to HAProxy’s "abortonclose" option. - // - // Valid values are: "Abort" and "Continue". - // The default value is "Continue". - // - // When set to "Abort", the router will stop processing the TLS handshake - // if it is in progress, and it will not send an HTTP request to the backend server - // if the request has not yet been sent when the client closes the connection. - // - // When set to "Continue", the router will complete the TLS handshake - // if it is in progress, or send an HTTP request to the backend server - // and wait for the backend server's response, regardless of - // whether the client has closed the connection. - // - // Setting "Abort" can help free CPU resources otherwise spent on TLS computation - // for connections the client has already closed, and can reduce request queue - // size, thereby reducing the load on saturated backend servers. - // - // Important Considerations: - // - // - The default policy ("Continue") is HTTP-compliant, and requests - // for aborted client connections will still be served. - // Use the "Continue" policy to allow a client to send a request - // and then immediately close its side of the connection while - // still receiving a response on the half-closed connection. - // - // - When clients use keep-alive connections, the most common case for premature - // closure is when the user wants to cancel the transfer or when a timeout - // occurs. In that case, the "Abort" policy may be used to reduce resource consumption. - // - // - Using RSA keys larger than 2048 bits can significantly slow down - // TLS computations. Consider using the "Abort" policy to reduce CPU usage. - // - // +optional - // +kubebuilder:default:="Continue" - // +default="Continue" - ClosedClientConnectionPolicy IngressControllerClosedClientConnectionPolicy `json:"closedClientConnectionPolicy,omitempty"` - - // haproxyVersion specifies the HAProxy version to use for this - // IngressController. - // - // OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports - // HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift - // release introduces a new default HAProxy version, that HAProxy version - // becomes available as a pinnable value in subsequent OpenShift releases, - // providing a smooth migration path for administrators who want to defer - // HAProxy upgrades. - // - // Valid values for OpenShift 5.0: - // - Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0) - // - "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster - // upgrades to future OpenShift releases - // - "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will - // be dropped in the next OpenShift release) - // - // If a specific HAProxy version is set and would become unsupported in a - // target cluster upgrade, a preflight check will block the cluster upgrade - // until this field is updated to unset or a supported version. - // - // +optional - // +openshift:enable:FeatureGate=IngressControllerMultipleHAProxyVersions - HAProxyVersion HAProxyVersion `json:"haproxyVersion,omitempty"` -} - -// httpCompressionPolicy turns on compression for the specified MIME types. -// -// This field is optional, and its absence implies that compression should not be enabled -// globally in HAProxy. -// -// If httpCompressionPolicy exists, compression should be enabled only for the specified -// MIME types. -type HTTPCompressionPolicy struct { - // mimeTypes is a list of MIME types that should have compression applied. - // This list can be empty, in which case the ingress controller does not apply compression. - // - // Note: Not all MIME types benefit from compression, but HAProxy will still use resources - // to try to compress if instructed to. Generally speaking, text (html, css, js, etc.) - // formats benefit from compression, but formats that are already compressed (image, - // audio, video, etc.) benefit little in exchange for the time and cpu spent on compressing - // again. See https://joehonton.medium.com/the-gzip-penalty-d31bd697f1a2 - // - // +listType=set - MimeTypes []CompressionMIMEType `json:"mimeTypes,omitempty"` -} - -// CompressionMIMEType defines the format of a single MIME type. -// E.g. "text/css; charset=utf-8", "text/html", "text/*", "image/svg+xml", -// "application/octet-stream", "X-custom/customsub", etc. -// -// The format should follow the Content-Type definition in RFC 1341: -// Content-Type := type "/" subtype *[";" parameter] -// - The type in Content-Type can be one of: -// application, audio, image, message, multipart, text, video, or a custom -// type preceded by "X-" and followed by a token as defined below. -// - The token is a string of at least one character, and not containing white -// space, control characters, or any of the characters in the tspecials set. -// - The tspecials set contains the characters ()<>@,;:\"/[]?.= -// - The subtype in Content-Type is also a token. -// - The optional parameter/s following the subtype are defined as: -// token "=" (token / quoted-string) -// - The quoted-string, as defined in RFC 822, is surrounded by double quotes -// and can contain white space plus any character EXCEPT \, ", and CR. -// It can also contain any single ASCII character as long as it is escaped by \. -// -// +kubebuilder:validation:Pattern=`^(?i)(x-[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+|application|audio|image|message|multipart|text|video)/[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+(; *[^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+=([^][ ()\\<>@,;:"/?.=\x00-\x1F\x7F]+|"(\\[\x00-\x7F]|[^\x0D"\\])*"))*$` -type CompressionMIMEType string - -// NodePlacement describes node scheduling configuration for an ingress -// controller. -type NodePlacement struct { - // nodeSelector is the node selector applied to ingress controller - // deployments. - // - // If set, the specified selector is used and replaces the default. - // - // If unset, the default depends on the value of the defaultPlacement - // field in the cluster config.openshift.io/v1/ingresses status. - // - // When defaultPlacement is Workers, the default is: - // - // kubernetes.io/os: linux - // node-role.kubernetes.io/worker: '' - // - // When defaultPlacement is ControlPlane, the default is: - // - // kubernetes.io/os: linux - // node-role.kubernetes.io/master: '' - // - // These defaults are subject to change. - // - // Note that using nodeSelector.matchExpressions is not supported. Only - // nodeSelector.matchLabels may be used. This is a limitation of the - // Kubernetes API: the pod spec does not allow complex expressions for - // node selectors. - // - // +optional - NodeSelector *metav1.LabelSelector `json:"nodeSelector,omitempty"` - - // tolerations is a list of tolerations applied to ingress controller - // deployments. - // - // The default is an empty list. - // - // See https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - // - // +optional - // +listType=atomic - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// EndpointPublishingStrategyType is a way to publish ingress controller endpoints. -// +kubebuilder:validation:Enum=LoadBalancerService;HostNetwork;Private;NodePortService -type EndpointPublishingStrategyType string - -const ( - // LoadBalancerService publishes the ingress controller using a Kubernetes - // LoadBalancer Service. - LoadBalancerServiceStrategyType EndpointPublishingStrategyType = "LoadBalancerService" - - // HostNetwork publishes the ingress controller on node ports where the - // ingress controller is deployed. - HostNetworkStrategyType EndpointPublishingStrategyType = "HostNetwork" - - // Private does not publish the ingress controller. - PrivateStrategyType EndpointPublishingStrategyType = "Private" - - // NodePortService publishes the ingress controller using a Kubernetes NodePort Service. - NodePortServiceStrategyType EndpointPublishingStrategyType = "NodePortService" -) - -// LoadBalancerScope is the scope at which a load balancer is exposed. -// +kubebuilder:validation:Enum=Internal;External -type LoadBalancerScope string - -var ( - // InternalLoadBalancer is a load balancer that is exposed only on the - // cluster's private network. - InternalLoadBalancer LoadBalancerScope = "Internal" - - // ExternalLoadBalancer is a load balancer that is exposed on the - // cluster's public network (which is typically on the Internet). - ExternalLoadBalancer LoadBalancerScope = "External" -) - -// CIDR is an IP address range in CIDR notation (for example, "10.0.0.0/8" -// or "fd00::/8"). -// +kubebuilder:validation:Pattern=`(^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/([0-9]|[12][0-9]|3[0-2])$)|(^s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]d|1dd|[1-9]?d)(.(25[0-5]|2[0-4]d|1dd|[1-9]?d)){3}))|:)))(%.+)?s*(\/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9]))$)` -// + --- -// + The regex for the IPv4 CIDR range was taken from other CIDR fields in the OpenShift API -// + and the one for the IPv6 CIDR range was taken from -// + https://blog.markhatton.co.uk/2011/03/15/regular-expressions-for-ip-addresses-cidr-ranges-and-hostnames/ -// + The resulting regex is an OR of both regexes. -type CIDR string - -// LoadBalancerStrategy holds parameters for a load balancer. -// +kubebuilder:validation:XValidation:rule="!has(self.scope) || self.scope != 'Internal' || !has(self.providerParameters) || !has(self.providerParameters.aws) || !has(self.providerParameters.aws.networkLoadBalancer) || !has(self.providerParameters.aws.networkLoadBalancer.eipAllocations)",message="eipAllocations are forbidden when the scope is Internal." -// +kubebuilder:validation:XValidation:rule=`!has(self.scope) || self.scope != 'Internal' || !has(self.providerParameters) || !has(self.providerParameters.openstack) || !has(self.providerParameters.openstack.floatingIP) || self.providerParameters.openstack.floatingIP == ""`,message="cannot specify a floating ip when scope is internal" -type LoadBalancerStrategy struct { - // scope indicates the scope at which the load balancer is exposed. - // Possible values are "External" and "Internal". - // - // +required - Scope LoadBalancerScope `json:"scope"` - - // allowedSourceRanges specifies an allowlist of IP address ranges to which - // access to the load balancer should be restricted. Each range must be - // specified using CIDR notation (e.g. "10.0.0.0/8" or "fd00::/8"). If no range is - // specified, "0.0.0.0/0" for IPv4 and "::/0" for IPv6 are used by default, - // which allows all source addresses. - // - // To facilitate migration from earlier versions of OpenShift that did - // not have the allowedSourceRanges field, you may set the - // service.beta.kubernetes.io/load-balancer-source-ranges annotation on - // the "router-" service in the - // "openshift-ingress" namespace, and this annotation will take - // effect if allowedSourceRanges is empty on OpenShift 4.12. - // - // +nullable - // +optional - // +listType=atomic - AllowedSourceRanges []CIDR `json:"allowedSourceRanges,omitempty"` - - // providerParameters holds desired load balancer information specific to - // the underlying infrastructure provider. - // - // If empty, defaults will be applied. See specific providerParameters - // fields for details about their defaults. - // - // +optional - ProviderParameters *ProviderLoadBalancerParameters `json:"providerParameters,omitempty"` - - // dnsManagementPolicy indicates if the lifecycle of the wildcard DNS record - // associated with the load balancer service will be managed by - // the ingress operator. It defaults to Managed. - // Valid values are: Managed and Unmanaged. - // - // +kubebuilder:default:="Managed" - // +required - // +default="Managed" - DNSManagementPolicy LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"` -} - -// LoadBalancerDNSManagementPolicy is a policy for configuring how -// ingresscontrollers manage DNS. -// -// +kubebuilder:validation:Enum=Managed;Unmanaged -type LoadBalancerDNSManagementPolicy string - -const ( - // ManagedLoadBalancerDNS specifies that the operator manages - // a wildcard DNS record for the ingresscontroller. - ManagedLoadBalancerDNS LoadBalancerDNSManagementPolicy = "Managed" - // UnmanagedLoadBalancerDNS specifies that the operator does not manage - // any wildcard DNS record for the ingresscontroller. - UnmanagedLoadBalancerDNS LoadBalancerDNSManagementPolicy = "Unmanaged" -) - -// ProviderLoadBalancerParameters holds desired load balancer information -// specific to the underlying infrastructure provider. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'OpenStack' ? true : !has(self.openstack)",message="openstack is not permitted when type is not OpenStack" -// +union -type ProviderLoadBalancerParameters struct { - // type is the underlying infrastructure provider for the load balancer. - // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "IBM", "Nutanix", - // "OpenStack", and "VSphere". - // - // +unionDiscriminator - // +required - Type LoadBalancerProviderType `json:"type"` - - // aws provides configuration settings that are specific to AWS - // load balancers. - // - // If empty, defaults will be applied. See specific aws fields for - // details about their defaults. - // - // +optional - AWS *AWSLoadBalancerParameters `json:"aws,omitempty"` - - // gcp provides configuration settings that are specific to GCP - // load balancers. - // - // If empty, defaults will be applied. See specific gcp fields for - // details about their defaults. - // - // +optional - GCP *GCPLoadBalancerParameters `json:"gcp,omitempty"` - - // ibm provides configuration settings that are specific to IBM Cloud - // load balancers. - // - // If empty, defaults will be applied. See specific ibm fields for - // details about their defaults. - // - // +optional - IBM *IBMLoadBalancerParameters `json:"ibm,omitempty"` - - // openstack provides configuration settings that are specific to OpenStack - // load balancers. - // - // If empty, defaults will be applied. See specific openstack fields for - // details about their defaults. - // - // +optional - OpenStack *OpenStackLoadBalancerParameters `json:"openstack,omitempty"` -} - -// LoadBalancerProviderType is the underlying infrastructure provider for the -// load balancer. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "IBM", "Nutanix", -// "OpenStack", and "VSphere". -// -// +kubebuilder:validation:Enum=AWS;Azure;BareMetal;GCP;Nutanix;OpenStack;VSphere;IBM -type LoadBalancerProviderType string - -const ( - AWSLoadBalancerProvider LoadBalancerProviderType = "AWS" - AzureLoadBalancerProvider LoadBalancerProviderType = "Azure" - GCPLoadBalancerProvider LoadBalancerProviderType = "GCP" - OpenStackLoadBalancerProvider LoadBalancerProviderType = "OpenStack" - VSphereLoadBalancerProvider LoadBalancerProviderType = "VSphere" - IBMLoadBalancerProvider LoadBalancerProviderType = "IBM" - BareMetalLoadBalancerProvider LoadBalancerProviderType = "BareMetal" - AlibabaCloudLoadBalancerProvider LoadBalancerProviderType = "AlibabaCloud" - NutanixLoadBalancerProvider LoadBalancerProviderType = "Nutanix" -) - -// AWSLoadBalancerParameters provides configuration settings that are -// specific to AWS load balancers. -// +union -type AWSLoadBalancerParameters struct { - // type is the type of AWS load balancer to instantiate for an ingresscontroller. - // - // Valid values are: - // - // * "Classic": A Classic Load Balancer that makes routing decisions at either - // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See - // the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - // - // * "NLB": A Network Load Balancer that makes routing decisions at the - // transport layer (TCP/SSL). See the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb - // - // +unionDiscriminator - // +required - Type AWSLoadBalancerType `json:"type"` - - // classicLoadBalancerParameters holds configuration parameters for an AWS - // classic load balancer. Present only if type is Classic. - // - // +optional - ClassicLoadBalancerParameters *AWSClassicLoadBalancerParameters `json:"classicLoadBalancer,omitempty"` - - // networkLoadBalancerParameters holds configuration parameters for an AWS - // network load balancer. Present only if type is NLB. - // - // +optional - NetworkLoadBalancerParameters *AWSNetworkLoadBalancerParameters `json:"networkLoadBalancer,omitempty"` -} - -// AWSLoadBalancerType is the type of AWS load balancer to instantiate. -// +kubebuilder:validation:Enum=Classic;NLB -type AWSLoadBalancerType string - -const ( - AWSClassicLoadBalancer AWSLoadBalancerType = "Classic" - AWSNetworkLoadBalancer AWSLoadBalancerType = "NLB" -) - -// AWSSubnets contains a list of references to AWS subnets by -// ID or name. -// +kubebuilder:validation:XValidation:rule=`has(self.ids) && has(self.names) ? size(self.ids + self.names) <= 10 : true`,message="the total number of subnets cannot exceed 10" -// +kubebuilder:validation:XValidation:rule=`has(self.ids) && self.ids.size() > 0 || has(self.names) && self.names.size() > 0`,message="must specify at least 1 subnet name or id" -type AWSSubnets struct { - // ids specifies a list of AWS subnets by subnet ID. - // Subnet IDs must start with "subnet-", consist only - // of alphanumeric characters, must be exactly 24 - // characters long, must be unique, and the total - // number of subnets specified by ids and names - // must not exceed 10. - // - // +optional - // +listType=atomic - // +kubebuilder:validation:XValidation:rule=`self.all(x, self.exists_one(y, x == y))`,message="subnet ids cannot contain duplicates" - // + Note: Though it may seem redundant, MaxItems is necessary to prevent exceeding of the cost budget for the validation rules. - // +kubebuilder:validation:MaxItems=10 - IDs []AWSSubnetID `json:"ids,omitempty"` - - // names specifies a list of AWS subnets by subnet name. - // Subnet names must not start with "subnet-", must not - // include commas, must be under 256 characters in length, - // must be unique, and the total number of subnets - // specified by ids and names must not exceed 10. - // - // +optional - // +listType=atomic - // +kubebuilder:validation:XValidation:rule=`self.all(x, self.exists_one(y, x == y))`,message="subnet names cannot contain duplicates" - // + Note: Though it may seem redundant, MaxItems is necessary to prevent exceeding of the cost budget for the validation rules. - // +kubebuilder:validation:MaxItems=10 - Names []AWSSubnetName `json:"names,omitempty"` -} - -// AWSSubnetID is a reference to an AWS subnet ID. -// +kubebuilder:validation:MinLength=24 -// +kubebuilder:validation:MaxLength=24 -// +kubebuilder:validation:Pattern=`^subnet-[0-9A-Za-z]+$` -type AWSSubnetID string - -// AWSSubnetName is a reference to an AWS subnet name. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=256 -// +kubebuilder:validation:XValidation:rule=`!self.contains(',')`,message="subnet name cannot contain a comma" -// +kubebuilder:validation:XValidation:rule=`!self.startsWith('subnet-')`,message="subnet name cannot start with 'subnet-'" -type AWSSubnetName string - -// GCPLoadBalancerParameters provides configuration settings that are -// specific to GCP load balancers. -type GCPLoadBalancerParameters struct { - // clientAccess describes how client access is restricted for internal - // load balancers. - // - // Valid values are: - // * "Global": Specifying an internal load balancer with Global client access - // allows clients from any region within the VPC to communicate with the load - // balancer. - // - // https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access - // - // * "Local": Specifying an internal load balancer with Local client access - // means only clients within the same region (and VPC) as the GCP load balancer - // can communicate with the load balancer. Note that this is the default behavior. - // - // https://cloud.google.com/load-balancing/docs/internal#client_access - // - // +optional - ClientAccess GCPClientAccess `json:"clientAccess,omitempty"` -} - -// GCPClientAccess describes how client access is restricted for internal -// load balancers. -// +kubebuilder:validation:Enum=Global;Local -type GCPClientAccess string - -const ( - GCPGlobalAccess GCPClientAccess = "Global" - GCPLocalAccess GCPClientAccess = "Local" -) - -// IBMLoadBalancerParameters provides configuration settings that are -// specific to IBM Cloud load balancers. -type IBMLoadBalancerParameters struct { - // protocol specifies whether the load balancer uses PROXY protocol to forward connections to - // the IngressController. See "service.kubernetes.io/ibm-load-balancer-cloud-provider-enable-features: - // "proxy-protocol"" at https://cloud.ibm.com/docs/containers?topic=containers-vpc-lbaas" - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // Valid values for protocol are TCP, PROXY and omitted. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default is TCP, without the proxy protocol enabled. - // - // +optional - Protocol IngressControllerProtocol `json:"protocol,omitempty"` -} - -// OpenStackLoadBalancerParameters provides configuration settings that are -// specific to OpenStack load balancers. -type OpenStackLoadBalancerParameters struct { - // loadBalancerIP is tombstoned since the field was replaced by floatingIP. - // LoadBalancerIP string `json:"loadBalancerIP,omitempty"` - - // floatingIP specifies the IP address that the load balancer will use. - // When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. - // When specified, the floating IP has to be pre-created. If the - // specified value is not a floating IP or is already claimed, the - // OpenStack cloud provider won't be able to provision the load - // balancer. - // This field may only be used if the IngressController has External scope. - // This value must be a valid IPv4 or IPv6 address. - // + --- - // + Note: this field is meant to be set by the ingress controller - // + to populate the `Service.Spec.LoadBalancerIP` field which has been - // + deprecated in Kubernetes: - // + https://github.com/kubernetes/kubernetes/pull/107235 - // + However, the field is still used by cloud-provider-openstack to reconcile - // + the floating IP that we attach to the external load balancer. - // - // +kubebuilder:validation:XValidation:rule="isIP(self)",message="floatingIP must be a valid IPv4 or IPv6 address" - // +optional - FloatingIP string `json:"floatingIP,omitempty"` -} - -// AWSClassicLoadBalancerParameters holds configuration parameters for an -// AWS Classic load balancer. -type AWSClassicLoadBalancerParameters struct { - // connectionIdleTimeout specifies the maximum time period that a - // connection may be idle before the load balancer closes the - // connection. The value must be parseable as a time duration value; - // see . A nil or zero value - // means no opinion, in which case a default value is used. The default - // value for this field is 60s. This default is subject to change. - // - // +kubebuilder:validation:Format=duration - // +optional - ConnectionIdleTimeout metav1.Duration `json:"connectionIdleTimeout,omitempty"` - - // subnets specifies the subnets to which the load balancer will - // attach. The subnets may be specified by either their - // ID or name. The total number of subnets is limited to 10. - // - // In order for the load balancer to be provisioned with subnets, - // each subnet must exist, each subnet must be from a different - // availability zone, and the load balancer service must be - // recreated to pick up new values. - // - // When omitted from the spec, the subnets will be auto-discovered - // for each availability zone. Auto-discovered subnets are not reported - // in the status of the IngressController object. - // - // +optional - Subnets *AWSSubnets `json:"subnets,omitempty"` -} - -// AWSNetworkLoadBalancerParameters holds configuration parameters for an -// AWS Network load balancer. For Example: Setting AWS EIPs https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html -// +kubebuilder:validation:XValidation:rule=`has(self.subnets) && has(self.subnets.ids) && has(self.subnets.names) && has(self.eipAllocations) ? size(self.subnets.ids + self.subnets.names) == size(self.eipAllocations) : true`,message="number of subnets must be equal to number of eipAllocations" -// +kubebuilder:validation:XValidation:rule=`has(self.subnets) && has(self.subnets.ids) && !has(self.subnets.names) && has(self.eipAllocations) ? size(self.subnets.ids) == size(self.eipAllocations) : true`,message="number of subnets must be equal to number of eipAllocations" -// +kubebuilder:validation:XValidation:rule=`has(self.subnets) && has(self.subnets.names) && !has(self.subnets.ids) && has(self.eipAllocations) ? size(self.subnets.names) == size(self.eipAllocations) : true`,message="number of subnets must be equal to number of eipAllocations" -type AWSNetworkLoadBalancerParameters struct { - // subnets specifies the subnets to which the load balancer will - // attach. The subnets may be specified by either their - // ID or name. The total number of subnets is limited to 10. - // - // In order for the load balancer to be provisioned with subnets, - // each subnet must exist, each subnet must be from a different - // availability zone, and the load balancer service must be - // recreated to pick up new values. - // - // When omitted from the spec, the subnets will be auto-discovered - // for each availability zone. Auto-discovered subnets are not reported - // in the status of the IngressController object. - // - // +optional - Subnets *AWSSubnets `json:"subnets,omitempty"` - - // eipAllocations is a list of IDs for Elastic IP (EIP) addresses that - // are assigned to the Network Load Balancer. - // The following restrictions apply: - // - // eipAllocations can only be used with external scope, not internal. - // An EIP can be allocated to only a single IngressController. - // The number of EIP allocations must match the number of subnets that are used for the load balancer. - // Each EIP allocation must be unique. - // A maximum of 10 EIP allocations are permitted. - // - // See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html for general - // information about configuration, characteristics, and limitations of Elastic IP addresses. - // - // +optional - // +listType=atomic - // +kubebuilder:validation:XValidation:rule=`self.all(x, self.exists_one(y, x == y))`,message="eipAllocations cannot contain duplicates" - // +kubebuilder:validation:MaxItems=10 - EIPAllocations []EIPAllocation `json:"eipAllocations"` - - // protocol specifies whether the Network Load Balancer uses PROXY - // protocol to forward connections to the IngressController. - // - // When set to "TCP", the NLB uses AWS's native client IP preservation. - // This may cause hairpin connection failures for internal load - // balancers when connections are made from pods to router pods on - // the same node. - // - // When set to "PROXY", the NLB disables native client IP preservation - // and uses PROXY protocol v2. The IngressController enables PROXY - // protocol on HAProxy so that it can parse PROXY protocol headers to - // obtain the original client IP. This avoids hairpin connection - // failures. - // - // The following values are valid for this field: - // - // * "TCP". - // * "PROXY". - // - // When omitted, this means the user has no opinion and the value is - // left to the platform to choose a reasonable default, which is subject to - // change over time. The current default is "PROXY". - // - // Note that changing this field may cause brief connection failures - // during the transition as the NLB attribute change and router rollout - // occur independently. - // - // +optional - Protocol NLBProtocol `json:"protocol,omitempty"` -} - -// NLBProtocol specifies whether the AWS Network Load Balancer uses -// PROXY protocol to forward connections to the IngressController. -// +kubebuilder:validation:Enum=TCP;PROXY -// +enum -type NLBProtocol string - -const ( - // NLBProtocolTCP instructs the NLB to forward connections using TCP - // without PROXY protocol. - NLBProtocolTCP NLBProtocol = "TCP" - // NLBProtocolProxy instructs the NLB to forward connections using - // PROXY protocol v2. - NLBProtocolProxy NLBProtocol = "PROXY" -) - -// EIPAllocation is an ID for an Elastic IP (EIP) address that can be allocated to an ELB in the AWS environment. -// Values must begin with `eipalloc-` followed by exactly 17 hexadecimal (`[0-9a-fA-F]`) characters. -// + Explanation of the regex `^eipalloc-[0-9a-fA-F]{17}$` for validating value of the EIPAllocation: -// + ^eipalloc- ensures the string starts with "eipalloc-". -// + [0-9a-fA-F]{17} matches exactly 17 hexadecimal characters (0-9, a-f, A-F). -// + $ ensures the string ends after the 17 hexadecimal characters. -// + Example of Valid and Invalid values: -// + eipalloc-1234567890abcdef1 is valid. -// + eipalloc-1234567890abcde is not valid (too short). -// + eipalloc-1234567890abcdefg is not valid (contains a non-hex character 'g'). -// + Max length is calculated as follows: -// + eipalloc- = 9 chars and 17 hexadecimal chars after `-` -// + So, total is 17 + 9 = 26 chars required for value of an EIPAllocation. -// -// +kubebuilder:validation:MinLength=26 -// +kubebuilder:validation:MaxLength=26 -// +kubebuilder:validation:XValidation:rule=`self.startsWith('eipalloc-')`,message="eipAllocations should start with 'eipalloc-'" -// +kubebuilder:validation:XValidation:rule=`self.split("-", 2)[1].matches('[0-9a-fA-F]{17}$')`,message="eipAllocations must be 'eipalloc-' followed by exactly 17 hexadecimal characters (0-9, a-f, A-F)" -type EIPAllocation string - -// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing -// strategy. -type HostNetworkStrategy struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - // - // +optional - Protocol IngressControllerProtocol `json:"protocol,omitempty"` - - // httpPort is the port on the host which should be used to listen for - // HTTP requests. This field should be set when port 80 is already in use. - // The value should not coincide with the NodePort range of the cluster. - // When the value is 0 or is not specified it defaults to 80. - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:default=80 - // +optional - HTTPPort int32 `json:"httpPort,omitempty"` - - // httpsPort is the port on the host which should be used to listen for - // HTTPS requests. This field should be set when port 443 is already in use. - // The value should not coincide with the NodePort range of the cluster. - // When the value is 0 or is not specified it defaults to 443. - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:default=443 - // +optional - HTTPSPort int32 `json:"httpsPort,omitempty"` - - // statsPort is the port on the host where the stats from the router are - // published. The value should not coincide with the NodePort range of the - // cluster. If an external load balancer is configured to forward connections - // to this IngressController, the load balancer should use this port for - // health checks. The load balancer can send HTTP probes on this port on a - // given node, with the path /healthz/ready to determine if the ingress - // controller is ready to receive traffic on the node. For proper operation - // the load balancer must not forward traffic to a node until the health - // check reports ready. The load balancer should also stop forwarding requests - // within a maximum of 45 seconds after /healthz/ready starts reporting - // not-ready. Probing every 5 to 10 seconds, with a 5-second timeout and with - // a threshold of two successful or failed requests to become healthy or - // unhealthy respectively, are well-tested values. When the value is 0 or - // is not specified it defaults to 1936. - // +kubebuilder:validation:Maximum=65535 - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:default=1936 - // +optional - StatsPort int32 `json:"statsPort,omitempty"` -} - -// PrivateStrategy holds parameters for the Private endpoint publishing -// strategy. -type PrivateStrategy struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - // - // +optional - Protocol IngressControllerProtocol `json:"protocol,omitempty"` -} - -// NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy. -type NodePortStrategy struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - // - // +optional - Protocol IngressControllerProtocol `json:"protocol,omitempty"` -} - -// IngressControllerProtocol specifies whether PROXY protocol is enabled or not. -// +kubebuilder:validation:Enum="";TCP;PROXY -type IngressControllerProtocol string - -const ( - DefaultProtocol IngressControllerProtocol = "" - TCPProtocol IngressControllerProtocol = "TCP" - ProxyProtocol IngressControllerProtocol = "PROXY" -) - -// EndpointPublishingStrategy is a way to publish the endpoints of an -// IngressController, and represents the type and any additional configuration -// for a specific type. -// +union -type EndpointPublishingStrategy struct { - // type is the publishing strategy to use. Valid values are: - // - // * LoadBalancerService - // - // Publishes the ingress controller using a Kubernetes LoadBalancer Service. - // - // In this configuration, the ingress controller deployment uses container - // networking. A LoadBalancer Service is created to publish the deployment. - // - // See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer - // - // If domain is set, a wildcard DNS record will be managed to point at the - // LoadBalancer Service's external name. DNS records are managed only in DNS - // zones defined by dns.config.openshift.io/cluster .spec.publicZone and - // .spec.privateZone. - // - // Wildcard DNS management is currently supported only on the AWS, Azure, - // and GCP platforms. - // - // * HostNetwork - // - // Publishes the ingress controller on node ports where the ingress controller - // is deployed. - // - // In this configuration, the ingress controller deployment uses host - // networking, bound to node ports 80 and 443. The user is responsible for - // configuring an external load balancer to publish the ingress controller via - // the node ports. - // - // * Private - // - // Does not publish the ingress controller. - // - // In this configuration, the ingress controller deployment uses container - // networking, and is not explicitly published. The user must manually publish - // the ingress controller. - // - // * NodePortService - // - // Publishes the ingress controller using a Kubernetes NodePort Service. - // - // In this configuration, the ingress controller deployment uses container - // networking. A NodePort Service is created to publish the deployment. The - // specific node ports are dynamically allocated by OpenShift; however, to - // support static port allocations, user changes to the node port - // field of the managed NodePort Service will preserved. - // - // +unionDiscriminator - // +required - Type EndpointPublishingStrategyType `json:"type"` - - // loadBalancer holds parameters for the load balancer. Present only if - // type is LoadBalancerService. - // +optional - LoadBalancer *LoadBalancerStrategy `json:"loadBalancer,omitempty"` - - // hostNetwork holds parameters for the HostNetwork endpoint publishing - // strategy. Present only if type is HostNetwork. - // +optional - HostNetwork *HostNetworkStrategy `json:"hostNetwork,omitempty"` - - // private holds parameters for the Private endpoint publishing - // strategy. Present only if type is Private. - // +optional - Private *PrivateStrategy `json:"private,omitempty"` - - // nodePort holds parameters for the NodePortService endpoint publishing strategy. - // Present only if type is NodePortService. - // +optional - NodePort *NodePortStrategy `json:"nodePort,omitempty"` -} - -// ClientCertificatePolicy describes the policy for client certificates. -// +kubebuilder:validation:Enum="";Required;Optional -type ClientCertificatePolicy string - -const ( - // ClientCertificatePolicyRequired indicates that a client certificate - // should be required. - ClientCertificatePolicyRequired ClientCertificatePolicy = "Required" - - // ClientCertificatePolicyOptional indicates that a client certificate - // should be requested but not required. - ClientCertificatePolicyOptional ClientCertificatePolicy = "Optional" -) - -// ClientTLS specifies TLS configuration to enable client-to-server -// authentication, which can be used for mutual TLS. -type ClientTLS struct { - // clientCertificatePolicy specifies whether the ingress controller - // requires clients to provide certificates. This field accepts the - // values "Required" or "Optional". - // - // Note that the ingress controller only checks client certificates for - // edge-terminated and reencrypt TLS routes; it cannot check - // certificates for cleartext HTTP or passthrough TLS routes. - // - // +required - ClientCertificatePolicy ClientCertificatePolicy `json:"clientCertificatePolicy"` - - // clientCA specifies a configmap containing the PEM-encoded CA - // certificate bundle that should be used to verify a client's - // certificate. The administrator must create this configmap in the - // openshift-config namespace. - // - // +required - ClientCA configv1.ConfigMapNameReference `json:"clientCA"` - - // allowedSubjectPatterns specifies a list of regular expressions that - // should be matched against the distinguished name on a valid client - // certificate to filter requests. The regular expressions must use - // PCRE syntax. If this list is empty, no filtering is performed. If - // the list is nonempty, then at least one pattern must match a client - // certificate's distinguished name or else the ingress controller - // rejects the certificate and denies the connection. - // - // +listType=atomic - // +optional - AllowedSubjectPatterns []string `json:"allowedSubjectPatterns,omitempty"` -} - -// RouteAdmissionPolicy is an admission policy for allowing new route claims. -type RouteAdmissionPolicy struct { - // namespaceOwnership describes how host name claims across namespaces should - // be handled. - // - // Value must be one of: - // - // - Strict: Do not allow routes in different namespaces to claim the same host. - // - // - InterNamespaceAllowed: Allow routes to claim different paths of the same - // host name across namespaces. - // - // If empty, the default is Strict. - // +optional - NamespaceOwnership NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"` - // wildcardPolicy describes how routes with wildcard policies should - // be handled for the ingress controller. WildcardPolicy controls use - // of routes [1] exposed by the ingress controller based on the route's - // wildcard policy. - // - // [1] https://github.com/openshift/api/blob/master/route/v1/types.go - // - // Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed - // will cause admitted routes with a wildcard policy of Subdomain to stop - // working. These routes must be updated to a wildcard policy of None to be - // readmitted by the ingress controller. - // - // WildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values. - // - // If empty, defaults to "WildcardsDisallowed". - // - WildcardPolicy WildcardPolicy `json:"wildcardPolicy,omitempty"` -} - -// WildcardPolicy is a route admission policy component that describes how -// routes with a wildcard policy should be handled. -// +kubebuilder:validation:Enum=WildcardsAllowed;WildcardsDisallowed -type WildcardPolicy string - -const ( - // WildcardPolicyAllowed indicates routes with any wildcard policy are - // admitted by the ingress controller. - WildcardPolicyAllowed WildcardPolicy = "WildcardsAllowed" - - // WildcardPolicyDisallowed indicates only routes with a wildcard policy - // of None are admitted by the ingress controller. - WildcardPolicyDisallowed WildcardPolicy = "WildcardsDisallowed" -) - -// NamespaceOwnershipCheck is a route admission policy component that describes -// how host name claims across namespaces should be handled. -// +kubebuilder:validation:Enum=InterNamespaceAllowed;Strict -type NamespaceOwnershipCheck string - -const ( - // InterNamespaceAllowedOwnershipCheck allows routes to claim different paths of the same host name across namespaces. - InterNamespaceAllowedOwnershipCheck NamespaceOwnershipCheck = "InterNamespaceAllowed" - - // StrictNamespaceOwnershipCheck does not allow routes to claim the same host name across namespaces. - StrictNamespaceOwnershipCheck NamespaceOwnershipCheck = "Strict" -) - -// LoggingDestinationType is a type of destination to which to send log -// messages. -// -// +kubebuilder:validation:Enum=Container;Syslog -type LoggingDestinationType string - -const ( - // Container sends log messages to a sidecar container. - ContainerLoggingDestinationType LoggingDestinationType = "Container" - - // Syslog sends log messages to a syslog endpoint. - SyslogLoggingDestinationType LoggingDestinationType = "Syslog" - - // ContainerLoggingSidecarContainerName is the name of the container - // with the log output in an ingress controller pod when container - // logging is used. - ContainerLoggingSidecarContainerName = "logs" -) - -// SyslogLoggingDestinationParameters describes parameters for the Syslog -// logging destination type. -type SyslogLoggingDestinationParameters struct { - // address is the IP address of the syslog endpoint that receives log - // messages. - // - // +required - Address string `json:"address"` - - // port is the UDP port number of the syslog endpoint that receives log - // messages. - // - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=65535 - // +required - Port uint32 `json:"port"` - - // facility specifies the syslog facility of log messages. - // - // If this field is empty, the facility is "local1". - // - // +kubebuilder:validation:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;cron;auth2;ftp;ntp;audit;alert;cron2;local0;local1;local2;local3;local4;local5;local6;local7 - // +optional - Facility string `json:"facility,omitempty"` - - // maxLength is the maximum length of the log message. - // - // Valid values are integers in the range 480 to 4096, inclusive. - // - // When omitted, the default value is 1024. - // - // +kubebuilder:validation:Maximum=4096 - // +kubebuilder:validation:Minimum=480 - // +kubebuilder:default=1024 - // +default:=1024 - // +optional - MaxLength uint32 `json:"maxLength,omitempty"` -} - -// ContainerLoggingDestinationParameters describes parameters for the Container -// logging destination type. -type ContainerLoggingDestinationParameters struct { - // maxLength is the maximum length of the log message. - // - // Valid values are integers in the range 480 to 8192, inclusive. - // - // When omitted, the default value is 1024. - // - // +kubebuilder:validation:Maximum=8192 - // +kubebuilder:validation:Minimum=480 - // +kubebuilder:default=1024 - // +default:=1024 - // +optional - MaxLength int32 `json:"maxLength,omitempty"` -} - -// LoggingDestination describes a destination for log messages. -// +union -type LoggingDestination struct { - // type is the type of destination for logs. It must be one of the - // following: - // - // * Container - // - // The ingress operator configures the sidecar container named "logs" on - // the ingress controller pod and configures the ingress controller to - // write logs to the sidecar. The logs are then available as container - // logs. The expectation is that the administrator configures a custom - // logging solution that reads logs from this sidecar. Note that using - // container logs means that logs may be dropped if the rate of logs - // exceeds the container runtime's or the custom logging solution's - // capacity. - // - // * Syslog - // - // Logs are sent to a syslog endpoint. The administrator must specify - // an endpoint that can receive syslog messages. The expectation is - // that the administrator has configured a custom syslog instance. - // - // +unionDiscriminator - // +required - Type LoggingDestinationType `json:"type"` - - // syslog holds parameters for a syslog endpoint. Present only if - // type is Syslog. - // - // +optional - Syslog *SyslogLoggingDestinationParameters `json:"syslog,omitempty"` - - // container holds parameters for the Container logging destination. - // Present only if type is Container. - // - // +optional - Container *ContainerLoggingDestinationParameters `json:"container,omitempty"` -} - -// IngressControllerCaptureHTTPHeader describes an HTTP header that should be -// captured. -type IngressControllerCaptureHTTPHeader struct { - // name specifies a header name. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - // - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" - // +required - Name string `json:"name"` - - // maxLength specifies a maximum length for the header value. If a - // header value exceeds this length, the value will be truncated in the - // log message. Note that the ingress controller may impose a separate - // bound on the total length of HTTP headers in a request. - // - // +kubebuilder:validation:Minimum=1 - // +required - MaxLength int `json:"maxLength"` -} - -// IngressControllerCaptureHTTPHeaders specifies which HTTP headers the -// IngressController captures. -type IngressControllerCaptureHTTPHeaders struct { - // request specifies which HTTP request headers to capture. - // - // If this field is empty, no request headers are captured. - // - // +nullable - // +optional - // +listType=atomic - Request []IngressControllerCaptureHTTPHeader `json:"request,omitempty"` - - // response specifies which HTTP response headers to capture. - // - // If this field is empty, no response headers are captured. - // - // +nullable - // +optional - // +listType=atomic - Response []IngressControllerCaptureHTTPHeader `json:"response,omitempty"` -} - -// CookieMatchType indicates the type of matching used against cookie names to -// select a cookie for capture. -// +kubebuilder:validation:Enum=Exact;Prefix -type CookieMatchType string - -const ( - // CookieMatchTypeExact indicates that an exact string match should be - // performed. - CookieMatchTypeExact CookieMatchType = "Exact" - // CookieMatchTypePrefix indicates that a string prefix match should be - // performed. - CookieMatchTypePrefix CookieMatchType = "Prefix" -) - -// IngressControllerCaptureHTTPCookie describes an HTTP cookie that should be -// captured. -type IngressControllerCaptureHTTPCookie struct { - IngressControllerCaptureHTTPCookieUnion `json:",inline"` - - // maxLength specifies a maximum length of the string that will be - // logged, which includes the cookie name, cookie value, and - // one-character delimiter. If the log entry exceeds this length, the - // value will be truncated in the log message. Note that the ingress - // controller may impose a separate bound on the total length of HTTP - // headers in a request. - // - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=1024 - // +required - MaxLength int `json:"maxLength"` -} - -// IngressControllerCaptureHTTPCookieUnion describes optional fields of an HTTP cookie that should be captured. -// +union -type IngressControllerCaptureHTTPCookieUnion struct { - // matchType specifies the type of match to be performed on the cookie - // name. Allowed values are "Exact" for an exact string match and - // "Prefix" for a string prefix match. If "Exact" is specified, a name - // must be specified in the name field. If "Prefix" is provided, a - // prefix must be specified in the namePrefix field. For example, - // specifying matchType "Prefix" and namePrefix "foo" will capture a - // cookie named "foo" or "foobar" but not one named "bar". The first - // matching cookie is captured. - // - // +unionDiscriminator - // +required - MatchType CookieMatchType `json:"matchType"` - - // name specifies a cookie name. Its value must be a valid HTTP cookie - // name as defined in RFC 6265 section 4.1. - // - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$" - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=1024 - // +optional - Name string `json:"name"` - - // namePrefix specifies a cookie name prefix. Its value must be a valid - // HTTP cookie name as defined in RFC 6265 section 4.1. - // - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]*$" - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=1024 - // +optional - NamePrefix string `json:"namePrefix"` -} - -// LoggingPolicy indicates how an event should be logged. -// +kubebuilder:validation:Enum=Log;Ignore -type LoggingPolicy string - -const ( - // LoggingPolicyLog indicates that an event should be logged. - LoggingPolicyLog LoggingPolicy = "Log" - // LoggingPolicyIgnore indicates that an event should not be logged. - LoggingPolicyIgnore LoggingPolicy = "Ignore" -) - -// AccessLogging describes how client requests should be logged. -type AccessLogging struct { - // destination is where access logs go. - // - // +required - Destination LoggingDestination `json:"destination"` - - // httpLogFormat specifies the format of the log message for an HTTP - // request. - // - // If this field is empty, log messages use the implementation's default - // HTTP log format. For HAProxy's default HTTP log format, see the - // HAProxy documentation: - // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3 - // - // Note that this format only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). It does not affect the log format for TLS passthrough - // connections. - // - // +optional - HttpLogFormat string `json:"httpLogFormat,omitempty"` - - // httpCaptureHeaders defines HTTP headers that should be captured in - // access logs. If this field is empty, no headers are captured. - // - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be captured for TLS passthrough - // connections. - // - // +optional - HTTPCaptureHeaders IngressControllerCaptureHTTPHeaders `json:"httpCaptureHeaders,omitempty"` - - // httpCaptureCookies specifies HTTP cookies that should be captured in - // access logs. If this field is empty, no cookies are captured. - // - // +nullable - // +optional - // +kubebuilder:validation:MaxItems=1 - // +listType=atomic - HTTPCaptureCookies []IngressControllerCaptureHTTPCookie `json:"httpCaptureCookies,omitempty"` - - // logEmptyRequests specifies how connections on which no request is - // received should be logged. Typically, these empty requests come from - // load balancers' health probes or Web browsers' speculative - // connections ("preconnect"), in which case logging these requests may - // be undesirable. However, these requests may also be caused by - // network errors, in which case logging empty requests may be useful - // for diagnosing the errors. In addition, these requests may be caused - // by port scans, in which case logging empty requests may aid in - // detecting intrusion attempts. Allowed values for this field are - // "Log" and "Ignore". The default value is "Log". - // - // +optional - // +kubebuilder:default:="Log" - LogEmptyRequests LoggingPolicy `json:"logEmptyRequests,omitempty"` -} - -// IngressControllerLogging describes what should be logged where. -type IngressControllerLogging struct { - // access describes how the client requests should be logged. - // - // If this field is empty, access logging is disabled. - // - // +optional - Access *AccessLogging `json:"access,omitempty"` -} - -// IngressControllerHTTPHeaderPolicy is a policy for setting HTTP headers. -// -// +kubebuilder:validation:Enum=Append;Replace;IfNone;Never -type IngressControllerHTTPHeaderPolicy string - -const ( - // AppendHTTPHeaderPolicy appends the header, preserving any existing header. - AppendHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Append" - // ReplaceHTTPHeaderPolicy sets the header, removing any existing header. - ReplaceHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Replace" - // IfNoneHTTPHeaderPolicy sets the header if it is not already set. - IfNoneHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "IfNone" - // NeverHTTPHeaderPolicy never sets the header, preserving any existing - // header. - NeverHTTPHeaderPolicy IngressControllerHTTPHeaderPolicy = "Never" -) - -// IngressControllerHTTPUniqueIdHeaderPolicy describes configuration for a -// unique id header. -type IngressControllerHTTPUniqueIdHeaderPolicy struct { - // name specifies the name of the HTTP header (for example, "unique-id") - // that the ingress controller should inject into HTTP requests. The - // field's value must be a valid HTTP header name as defined in RFC 2616 - // section 4.2. If the field is empty, no header is injected. - // - // +optional - // +kubebuilder:validation:Pattern="^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=1024 - Name string `json:"name,omitempty"` - - // format specifies the format for the injected HTTP header's value. - // This field has no effect unless name is specified. For the - // HAProxy-based ingress controller implementation, this format uses the - // same syntax as the HTTP log format. If the field is empty, the - // default value is "%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid"; see the - // corresponding HAProxy documentation: - // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3 - // - // +optional - // +kubebuilder:validation:Pattern="^(%(%|(\\{[-+]?[QXE](,[-+]?[QXE])*\\})?([A-Za-z]+|\\[[.0-9A-Z_a-z]+(\\([^)]+\\))?(,[.0-9A-Z_a-z]+(\\([^)]+\\))?)*\\]))|[^%[:cntrl:]])*$" - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=1024 - Format string `json:"format,omitempty"` -} - -// IngressControllerHTTPHeaderNameCaseAdjustment is the name of an HTTP header -// (for example, "X-Forwarded-For") in the desired capitalization. The value -// must be a valid HTTP header name as defined in RFC 2616 section 4.2. -// -// +kubebuilder:validation:Pattern="^$|^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" -// +kubebuilder:validation:MinLength=0 -// +kubebuilder:validation:MaxLength=1024 -type IngressControllerHTTPHeaderNameCaseAdjustment string - -// IngressControllerHTTPHeaders specifies how the IngressController handles -// certain HTTP headers. -type IngressControllerHTTPHeaders struct { - // forwardedHeaderPolicy specifies when and how the IngressController - // sets the Forwarded, X-Forwarded-For, X-Forwarded-Host, - // X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version - // HTTP headers. The value may be one of the following: - // - // * "Append", which specifies that the IngressController appends the - // headers, preserving existing headers. - // - // * "Replace", which specifies that the IngressController sets the - // headers, replacing any existing Forwarded or X-Forwarded-* headers. - // - // * "IfNone", which specifies that the IngressController sets the - // headers if they are not already set. - // - // * "Never", which specifies that the IngressController never sets the - // headers, preserving any existing headers. - // - // By default, the policy is "Append". - // - // +optional - ForwardedHeaderPolicy IngressControllerHTTPHeaderPolicy `json:"forwardedHeaderPolicy,omitempty"` - - // uniqueId describes configuration for a custom HTTP header that the - // ingress controller should inject into incoming HTTP requests. - // Typically, this header is configured to have a value that is unique - // to the HTTP request. The header can be used by applications or - // included in access logs to facilitate tracing individual HTTP - // requests. - // - // If this field is empty, no such header is injected into requests. - // - // +optional - UniqueId IngressControllerHTTPUniqueIdHeaderPolicy `json:"uniqueId,omitempty"` - - // headerNameCaseAdjustments specifies case adjustments that can be - // applied to HTTP header names. Each adjustment is specified as an - // HTTP header name with the desired capitalization. For example, - // specifying "X-Forwarded-For" indicates that the "x-forwarded-for" - // HTTP header should be adjusted to have the specified capitalization. - // - // These adjustments are only applied to cleartext, edge-terminated, and - // re-encrypt routes, and only when using HTTP/1. - // - // For request headers, these adjustments are applied only for routes - // that have the haproxy.router.openshift.io/h1-adjust-case=true - // annotation. For response headers, these adjustments are applied to - // all HTTP responses. - // - // If this field is empty, no request headers are adjusted. - // - // +nullable - // +optional - // +listType=atomic - HeaderNameCaseAdjustments []IngressControllerHTTPHeaderNameCaseAdjustment `json:"headerNameCaseAdjustments,omitempty"` - - // actions specifies options for modifying headers and their values. - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be modified for TLS passthrough - // connections. - // Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. `Strict-Transport-Security` - // may only be configured using the "haproxy.router.openshift.io/hsts_header" route annotation, and only in - // accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. - // Any actions defined here are applied after any actions related to the following other fields: - // cache-control, spec.clientTLS, - // spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, - // and spec.httpHeaders.headerNameCaseAdjustments. - // In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after - // the actions specified in the IngressController's spec.httpHeaders.actions field. - // In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be - // executed after the actions specified in the Route's spec.httpHeaders.actions field. - // Headers set using this API cannot be captured for use in access logs. - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. Please refer to the documentation - // for that API field for more details. - // +optional - Actions IngressControllerHTTPHeaderActions `json:"actions,omitempty"` -} - -// IngressControllerHTTPHeaderActions defines configuration for actions on HTTP request and response headers. -type IngressControllerHTTPHeaderActions struct { - // response is a list of HTTP response headers to modify. - // Actions defined here will modify the response headers of all requests passing through an ingress controller. - // These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. - // IngressController actions for response headers will be executed after Route actions. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 response header actions may be configured. - // Sample fetchers allowed are "res.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[res.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:res\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are res.hdr, ssl_c_der. Converters allowed are lower, base64." - Response []IngressControllerHTTPHeader `json:"response"` - // request is a list of HTTP request headers to modify. - // Actions defined here will modify the request headers of all requests passing through an ingress controller. - // These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. - // IngressController actions for request headers will be executed before Route actions. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 request header actions may be configured. - // Sample fetchers allowed are "req.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[req.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // + --- - // + Note: Any change to regex mentioned below must be reflected in the CRD validation of route in https://github.com/openshift/library-go/blob/master/pkg/route/validation/validation.go and vice-versa. - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:req\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are req.hdr, ssl_c_der. Converters allowed are lower, base64." - Request []IngressControllerHTTPHeader `json:"request"` -} - -// IngressControllerHTTPHeader specifies configuration for setting or deleting an HTTP header. -type IngressControllerHTTPHeader struct { - // name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - // The name must consist only of alphanumeric and the following special characters, "-!#$%&'*+.^_`". - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. - // It must be no more than 255 characters in length. - // Header name must be unique. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'strict-transport-security'",message="strict-transport-security header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'proxy'",message="proxy header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'host'",message="host header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'cookie'",message="cookie header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'set-cookie'",message="set-cookie header may not be modified via header actions" - Name string `json:"name"` - // action specifies actions to perform on headers, such as setting or deleting headers. - // +required - Action IngressControllerHTTPHeaderActionUnion `json:"action"` -} - -// IngressControllerHTTPHeaderActionUnion specifies an action to take on an HTTP header. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Set' ? has(self.set) : !has(self.set)",message="set is required when type is Set, and forbidden otherwise" -// +union -type IngressControllerHTTPHeaderActionUnion struct { - // type defines the type of the action to be applied on the header. - // Possible values are Set or Delete. - // Set allows you to set HTTP request and response headers. - // Delete allows you to delete HTTP request and response headers. - // +unionDiscriminator - // +kubebuilder:validation:Enum:=Set;Delete - // +required - Type IngressControllerHTTPHeaderActionType `json:"type"` - - // set specifies how the HTTP header should be set. - // This field is required when type is Set and forbidden otherwise. - // +optional - // +unionMember - Set *IngressControllerSetHTTPHeader `json:"set,omitempty"` -} - -// IngressControllerHTTPHeaderActionType defines actions that can be performed on HTTP headers. -type IngressControllerHTTPHeaderActionType string - -const ( - // Set specifies that an HTTP header should be set. - Set IngressControllerHTTPHeaderActionType = "Set" - // Delete specifies that an HTTP header should be deleted. - Delete IngressControllerHTTPHeaderActionType = "Delete" -) - -// IngressControllerSetHTTPHeader defines the value which needs to be set on an HTTP header. -type IngressControllerSetHTTPHeader struct { - // value specifies a header value. - // Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in - // http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and - // otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. - // The value of this field must be no more than 16384 characters in length. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. - // + --- - // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. - // + See . - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=16384 - Value string `json:"value"` -} - -// IngressControllerTuningOptions specifies options for tuning the performance -// of ingress controller pods -type IngressControllerTuningOptions struct { - // headerBufferBytes describes how much memory should be reserved - // (in bytes) for IngressController connection sessions. - // Note that this value must be at least 16384 if HTTP/2 is - // enabled for the IngressController (https://tools.ietf.org/html/rfc7540). - // If this field is empty, the IngressController will use a default value - // of 32768 bytes. - // - // Setting this field is generally not recommended as headerBufferBytes - // values that are too small may break the IngressController and - // headerBufferBytes values that are too large could cause the - // IngressController to use significantly more memory than necessary. - // - // +kubebuilder:validation:Minimum=16384 - // +optional - HeaderBufferBytes int32 `json:"headerBufferBytes,omitempty"` - - // headerBufferMaxRewriteBytes describes how much memory should be reserved - // (in bytes) from headerBufferBytes for HTTP header rewriting - // and appending for IngressController connection sessions. - // Note that incoming HTTP requests will be limited to - // (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning - // headerBufferBytes must be greater than headerBufferMaxRewriteBytes. - // If this field is empty, the IngressController will use a default value - // of 8192 bytes. - // - // Setting this field is generally not recommended as - // headerBufferMaxRewriteBytes values that are too small may break the - // IngressController and headerBufferMaxRewriteBytes values that are too - // large could cause the IngressController to use significantly more memory - // than necessary. - // - // +kubebuilder:validation:Minimum=4096 - // +optional - HeaderBufferMaxRewriteBytes int32 `json:"headerBufferMaxRewriteBytes,omitempty"` - - // threadCount defines the number of threads created per HAProxy process. - // Creating more threads allows each ingress controller pod to handle more - // connections, at the cost of more system resources being used. HAProxy - // currently supports up to 64 threads. If this field is empty, the - // IngressController will use the default value. The current default is 4 - // threads, but this may change in future releases. - // - // Setting this field is generally not recommended. Increasing the number - // of HAProxy threads allows ingress controller pods to utilize more CPU - // time under load, potentially starving other pods if set too high. - // Reducing the number of threads may cause the ingress controller to - // perform poorly. - // - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=64 - // +optional - ThreadCount int32 `json:"threadCount,omitempty"` - - // clientTimeout defines how long a connection will be held open while - // waiting for a client response. - // - // If unset, the default timeout is 30s - // +kubebuilder:validation:Format=duration - // +optional - ClientTimeout *metav1.Duration `json:"clientTimeout,omitempty"` - - // clientFinTimeout defines how long a connection will be held open while - // waiting for the client response to the server/backend closing the - // connection. - // - // If unset, the default timeout is 1s - // +kubebuilder:validation:Format=duration - // +optional - ClientFinTimeout *metav1.Duration `json:"clientFinTimeout,omitempty"` - - // serverTimeout defines how long a connection will be held open while - // waiting for a server/backend response. - // - // If unset, the default timeout is 30s - // +kubebuilder:validation:Format=duration - // +optional - ServerTimeout *metav1.Duration `json:"serverTimeout,omitempty"` - - // serverFinTimeout defines how long a connection will be held open while - // waiting for the server/backend response to the client closing the - // connection. - // - // If unset, the default timeout is 1s - // +kubebuilder:validation:Format=duration - // +optional - ServerFinTimeout *metav1.Duration `json:"serverFinTimeout,omitempty"` - - // tunnelTimeout defines how long a tunnel connection (including - // websockets) will be held open while the tunnel is idle. - // - // If unset, the default timeout is 1h - // +kubebuilder:validation:Format=duration - // +optional - TunnelTimeout *metav1.Duration `json:"tunnelTimeout,omitempty"` - - // connectTimeout defines the maximum time to wait for - // a connection attempt to a server/backend to succeed. - // - // This field expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, e.g. "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // When omitted, this means the user has no opinion and the platform is left - // to choose a reasonable default. This default is subject to change over time. - // The current default is 5s. - // - // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ - // +kubebuilder:validation:Type:=string - // +optional - ConnectTimeout *metav1.Duration `json:"connectTimeout,omitempty"` - - // httpKeepAliveTimeout defines the maximum allowed time to wait for - // a new HTTP request to appear on a connection from the client to the router. - // - // This field expects an unsigned duration string of a decimal number, with optional - // fraction and a unit suffix, e.g. "300ms", "1.5s" or "2m45s". - // Valid time units are "ms", "s", "m". - // The allowed range is from 1 millisecond to 15 minutes. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose a reasonable default. This default is subject to change over time. - // The current default is 300s. - // - // Low values (tens of milliseconds or less) can cause clients to close and reopen connections - // for each request, leading to reduced connection sharing. - // For HTTP/2, special care should be taken with low values. - // A few seconds is a reasonable starting point to avoid holding idle connections open - // while still allowing subsequent requests to reuse the connection. - // - // High values (minutes or more) favor connection reuse but may cause idle - // connections to linger longer. - // - // +kubebuilder:validation:Type:=string - // +kubebuilder:validation:XValidation:rule="self.matches('^([0-9]+(\\\\.[0-9]+)?(ms|s|m))+$')",message="httpKeepAliveTimeout must be a valid duration string composed of an unsigned integer value, optionally followed by a decimal fraction and a unit suffix (ms, s, m)" - // +kubebuilder:validation:XValidation:rule="!self.matches('^([0-9]+(\\\\.[0-9]+)?(ms|s|m))+$') || duration(self) <= duration('15m')",message="httpKeepAliveTimeout must be less than or equal to 15 minutes" - // +kubebuilder:validation:XValidation:rule="!self.matches('^([0-9]+(\\\\.[0-9]+)?(ms|s|m))+$') || duration(self) >= duration('1ms')",message="httpKeepAliveTimeout must be greater than or equal to 1 millisecond" - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=16 - // +optional - HTTPKeepAliveTimeout *metav1.Duration `json:"httpKeepAliveTimeout,omitempty"` - - // tlsInspectDelay defines how long the router can hold data to find a - // matching route. - // - // Setting this too short can cause the router to fall back to the default - // certificate for edge-terminated or reencrypt routes even when a better - // matching certificate could be used. - // - // If unset, the default inspect delay is 5s - // +kubebuilder:validation:Format=duration - // +optional - TLSInspectDelay *metav1.Duration `json:"tlsInspectDelay,omitempty"` - - // healthCheckInterval defines how long the router waits between two consecutive - // health checks on its configured backends. This value is applied globally as - // a default for all routes, but may be overridden per-route by the route annotation - // "router.openshift.io/haproxy.health.check.interval". - // - // Expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // Setting this to less than 5s can cause excess traffic due to too frequent - // TCP health checks and accompanying SYN packet storms. Alternatively, setting - // this too high can result in increased latency, due to backend servers that are no - // longer available, but haven't yet been detected as such. - // - // An empty or zero healthCheckInterval means no opinion and IngressController chooses - // a default, which is subject to change over time. - // Currently the default healthCheckInterval value is 5s. - // - // Currently the minimum allowed value is 1s and the maximum allowed value is - // 2147483647ms (24.85 days). Both are subject to change over time. - // - // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ - // +kubebuilder:validation:Type:=string - // +optional - HealthCheckInterval *metav1.Duration `json:"healthCheckInterval,omitempty"` - - // maxConnections defines the maximum number of simultaneous - // connections that can be established per HAProxy process. - // Increasing this value allows each ingress controller pod to - // handle more connections but at the cost of additional - // system resources being consumed. - // - // Permitted values are: empty, 0, -1, and the range - // 2000-2000000. - // - // If this field is empty or 0, the IngressController will use - // the default value of 50000, but the default is subject to - // change in future releases. - // - // If the value is -1 then HAProxy will dynamically compute a - // maximum value based on the available ulimits in the running - // container. Selecting -1 (i.e., auto) will result in a large - // value being computed (~520000 on OpenShift >=4.10 clusters) - // and therefore each HAProxy process will incur significant - // memory usage compared to the current default of 50000. - // - // Setting a value that is greater than the current operating - // system limit will prevent the HAProxy process from - // starting. - // - // If you choose a discrete value (e.g., 750000) and the - // router pod is migrated to a new node, there's no guarantee - // that that new node has identical ulimits configured. In - // such a scenario the pod would fail to start. If you have - // nodes with different ulimits configured (e.g., different - // tuned profiles) and you choose a discrete value then the - // guidance is to use -1 and let the value be computed - // dynamically at runtime. - // - // You can monitor memory usage for router containers with the - // following metric: - // 'container_memory_working_set_bytes{container="router",namespace="openshift-ingress"}'. - // - // You can monitor memory usage of individual HAProxy - // processes in router containers with the following metric: - // 'container_memory_working_set_bytes{container="router",namespace="openshift-ingress"}/container_processes{container="router",namespace="openshift-ingress"}'. - // - // +kubebuilder:validation:XValidation:rule="self == 0 || self == -1 || (self >= 2000 && self <= 2000000)",message="maxConnections must be 0, -1, or between 2000 and 2000000" - // +optional - MaxConnections int32 `json:"maxConnections,omitempty"` - - // reloadInterval defines the minimum interval at which the router is allowed to reload - // to accept new changes. Increasing this value can prevent the accumulation of - // HAProxy processes, depending on the scenario. Increasing this interval can - // also lessen load imbalance on a backend's servers when using the roundrobin - // balancing algorithm. Alternatively, decreasing this value may decrease latency - // since updates to HAProxy's configuration can take effect more quickly. - // - // The value must be a time duration value; see . - // Currently, the minimum value allowed is 1s, and the maximum allowed value is - // 120s. Minimum and maximum allowed values may change in future versions of OpenShift. - // Note that if a duration outside of these bounds is provided, the value of reloadInterval - // will be capped/floored and not rejected (e.g. a duration of over 120s will be capped to - // 120s; the IngressController will not reject and replace this disallowed value with - // the default). - // - // A zero value for reloadInterval tells the IngressController to choose the default, - // which is currently 5s and subject to change without notice. - // - // This field expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, e.g. "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // Note: Setting a value significantly larger than the default of 5s can cause latency - // in observing updates to routes and their endpoints. HAProxy's configuration will - // be reloaded less frequently, and newly created routes will not be served until the - // subsequent reload. - // - // +kubebuilder:validation:Pattern=^(0|([0-9]+(\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$ - // +kubebuilder:validation:Type:=string - // +optional - ReloadInterval metav1.Duration `json:"reloadInterval,omitempty"` - - // configurationManagement specifies how OpenShift router should update - // the HAProxy configuration. The following values are valid for this - // field: - // - // * "ForkAndReload". - // * "Dynamic". - // - // Omitting this field means that the user has no opinion and the - // platform may choose a reasonable default. This default is subject to - // change over time. The current default is "ForkAndReload". - // - // "ForkAndReload" means that OpenShift router should rewrite the - // HAProxy configuration file and instruct HAProxy to fork and reload. - // This is OpenShift router's traditional approach. - // - // "Dynamic" means that OpenShift router may use HAProxy's control - // socket for some configuration updates and fall back to fork and - // reload for other configuration updates. This is a newer approach, - // which may be less mature than ForkAndReload. This setting can - // improve load-balancing fairness and metrics accuracy and reduce CPU - // and memory usage if HAProxy has frequent configuration updates for - // route and endpoints updates. - // - // Note: The "Dynamic" option is currently experimental and should not - // be enabled on production clusters. - // - // +openshift:enable:FeatureGate=IngressControllerDynamicConfigurationManager - // +optional - ConfigurationManagement IngressControllerConfigurationManagement `json:"configurationManagement,omitempty"` -} - -// IngressControllerConfigurationManagement specifies whether always to use -// fork-and-reload to update the HAProxy configuration or whether to use -// HAProxy's control socket for some configuration updates. -// -// +enum -// +kubebuilder:validation:Enum=Dynamic;ForkAndReload -type IngressControllerConfigurationManagement string - -const ( - IngressControllerConfigurationManagementDynamic IngressControllerConfigurationManagement = "Dynamic" - IngressControllerConfigurationManagementForkAndReload IngressControllerConfigurationManagement = "ForkAndReload" -) - -// HTTPEmptyRequestsPolicy indicates how HTTP connections for which no request -// is received should be handled. -// +kubebuilder:validation:Enum=Respond;Ignore -type HTTPEmptyRequestsPolicy string - -const ( - // HTTPEmptyRequestsPolicyRespond indicates that the ingress controller - // should respond to empty requests. - HTTPEmptyRequestsPolicyRespond HTTPEmptyRequestsPolicy = "Respond" - // HTTPEmptyRequestsPolicyIgnore indicates that the ingress controller - // should ignore empty requests. - HTTPEmptyRequestsPolicyIgnore HTTPEmptyRequestsPolicy = "Ignore" -) - -var ( - // Available indicates the ingress controller deployment is available. - IngressControllerAvailableConditionType = "Available" - // LoadBalancerManaged indicates the management status of any load balancer - // service associated with an ingress controller. - LoadBalancerManagedIngressConditionType = "LoadBalancerManaged" - // LoadBalancerReady indicates the ready state of any load balancer service - // associated with an ingress controller. - LoadBalancerReadyIngressConditionType = "LoadBalancerReady" - // DNSManaged indicates the management status of any DNS records for the - // ingress controller. - DNSManagedIngressConditionType = "DNSManaged" - // DNSReady indicates the ready state of any DNS records for the ingress - // controller. - DNSReadyIngressConditionType = "DNSReady" -) - -// IngressControllerStatus defines the observed status of the IngressController. -type IngressControllerStatus struct { - // availableReplicas is number of observed available replicas according to the - // ingress controller deployment. - // +optional - AvailableReplicas int32 `json:"availableReplicas"` - - // selector is a label selector, in string format, for ingress controller pods - // corresponding to the IngressController. The number of matching pods should - // equal the value of availableReplicas. - // +optional - Selector string `json:"selector"` - - // domain is the actual domain in use. - // +optional - Domain string `json:"domain"` - - // endpointPublishingStrategy is the actual strategy in use. - // +optional - EndpointPublishingStrategy *EndpointPublishingStrategy `json:"endpointPublishingStrategy,omitempty"` - - // conditions is a list of conditions and their status. - // - // Available means the ingress controller deployment is available and - // servicing route and ingress resources (i.e, .status.availableReplicas - // equals .spec.replicas) - // - // There are additional conditions which indicate the status of other - // ingress controller features and capabilities. - // - // * LoadBalancerManaged - // - True if the following conditions are met: - // * The endpoint publishing strategy requires a service load balancer. - // - False if any of those conditions are unsatisfied. - // - // * LoadBalancerReady - // - True if the following conditions are met: - // * A load balancer is managed. - // * The load balancer is ready. - // - False if any of those conditions are unsatisfied. - // - // * DNSManaged - // - True if the following conditions are met: - // * The endpoint publishing strategy and platform support DNS. - // * The ingress controller domain is set. - // * dns.config.openshift.io/cluster configures DNS zones. - // - False if any of those conditions are unsatisfied. - // - // * DNSReady - // - True if the following conditions are met: - // * DNS is managed. - // * DNS records have been successfully created. - // - False if any of those conditions are unsatisfied. - // +listType=map - // +listMapKey=type - // +optional - Conditions []OperatorCondition `json:"conditions,omitempty"` - - // tlsProfile is the TLS connection configuration that is in effect. - // +optional - TLSProfile *configv1.TLSProfileSpec `json:"tlsProfile,omitempty"` - - // observedGeneration is the most recent generation observed. - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // namespaceSelector is the actual namespaceSelector in use. - // +optional - NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"` - - // routeSelector is the actual routeSelector in use. - // +optional - RouteSelector *metav1.LabelSelector `json:"routeSelector,omitempty"` - - // effectiveHAProxyVersion reports the HAProxy version currently in use by - // this IngressController. This reflects the resolved value of the - // spec.haproxyVersion field. When omitted, the effective value has not yet - // been resolved by the operator or the feature is not enabled for this cluster. - // - // Examples for OpenShift 5.0: - // - "3.2": Using HAProxy 3.2 - // - "2.8": Using HAProxy 2.8 - // - // +optional - // +openshift:enable:FeatureGate=IngressControllerMultipleHAProxyVersions - EffectiveHAProxyVersion HAProxyVersion `json:"effectiveHAProxyVersion,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IngressControllerList contains a list of IngressControllers. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type IngressControllerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []IngressController `json:"items"` -} - -// IngressControllerConnectionTerminationPolicy defines the behaviour -// for handling idle connections during a soft reload of the router. -// -// +kubebuilder:validation:Enum=Immediate;Deferred -type IngressControllerConnectionTerminationPolicy string - -const ( - // IngressControllerConnectionTerminationPolicyImmediate specifies - // that idle connections should be closed immediately during a - // router reload. - IngressControllerConnectionTerminationPolicyImmediate IngressControllerConnectionTerminationPolicy = "Immediate" - - // IngressControllerConnectionTerminationPolicyDeferred - // specifies that idle connections should remain open until a - // terminating event, such as a new request, the expiration of - // the proxy keep-alive timeout, or the client closing the - // connection. - IngressControllerConnectionTerminationPolicyDeferred IngressControllerConnectionTerminationPolicy = "Deferred" -) - -// IngressControllerClosedClientConnectionPolicy controls how the IngressController -// behaves when the client closes the TCP connection while the TLS -// handshake or HTTP request is in progress. -// -// +kubebuilder:validation:Enum=Abort;Continue -type IngressControllerClosedClientConnectionPolicy string - -const ( - // IngressControllerClosedClientConnectionPolicyAbort aborts processing early when the client - // closes the connection. - // - // This affects two types of processing: TLS handshake computation on the router - // and request handling. - // - // When the client closes the connection, the router will stop processing - // the TLS handshake, preventing unnecessary CPU work. - // - // If the HTTP request has not yet been sent to the backend, it will be aborted. - // If the request is already being processed by the backend, the router will - // half-close the connection to signal this condition to the backend server, - // which can then decide how to proceed. - IngressControllerClosedClientConnectionPolicyAbort IngressControllerClosedClientConnectionPolicy = "Abort" - - // IngressControllerClosedClientConnectionPolicyContinue continues processing even if the client - // closes the connection. - // - // The router will complete the TLS handshake and wait for the backend - // server's response regardless of the client having closed the connection. - IngressControllerClosedClientConnectionPolicyContinue IngressControllerClosedClientConnectionPolicy = "Continue" -) - -// HAProxyVersion is a string representing a HAProxy minor version in "X.Y" -// format. The allowed values are constrained by enum validation and vary by -// OpenShift release. -// -// +kubebuilder:validation:Enum="2.8";"3.2" -type HAProxyVersion string - -const ( - // HAProxyVersion28 represents HAProxy 2.8, shipped with OpenShift 4.22. - HAProxyVersion28 HAProxyVersion = "2.8" - - // HAProxyVersion32 represents HAProxy 3.2, introduced in OpenShift 5.0. - HAProxyVersion32 HAProxyVersion = "3.2" -) diff --git a/vendor/github.com/openshift/api/operator/v1/types_insights.go b/vendor/github.com/openshift/api/operator/v1/types_insights.go deleted file mode 100644 index ed59bb438..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_insights.go +++ /dev/null @@ -1,156 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=insightsoperators,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1237 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=insights,operatorOrdering=00 -// -// InsightsOperator holds cluster-wide information about the Insights Operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type InsightsOperator struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Insights. - // +required - Spec InsightsOperatorSpec `json:"spec"` - - // status is the most recently observed status of the Insights operator. - // +optional - Status InsightsOperatorStatus `json:"status"` -} - -type InsightsOperatorSpec struct { - OperatorSpec `json:",inline"` -} - -type InsightsOperatorStatus struct { - OperatorStatus `json:",inline"` - // gatherStatus provides basic information about the last Insights data gathering. - // When omitted, this means no data gathering has taken place yet. - // +optional - GatherStatus GatherStatus `json:"gatherStatus,omitempty"` - // insightsReport provides general Insights analysis results. - // When omitted, this means no data gathering has taken place yet. - // +optional - InsightsReport InsightsReport `json:"insightsReport,omitempty"` -} - -// gatherStatus provides information about the last known gather event. -type GatherStatus struct { - // lastGatherTime is the last time when Insights data gathering finished. - // An empty value means that no data has been gathered yet. - // +optional - LastGatherTime metav1.Time `json:"lastGatherTime,omitempty"` - // lastGatherDuration is the total time taken to process - // all gatherers during the last gather event. - // +optional - // +kubebuilder:validation:Pattern="^(0|([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$" - // +kubebuilder:validation:Type=string - LastGatherDuration metav1.Duration `json:"lastGatherDuration,omitempty"` - // gatherers is a list of active gatherers (and their statuses) in the last gathering. - // +listType=atomic - // +optional - Gatherers []GathererStatus `json:"gatherers,omitempty"` -} - -// insightsReport provides Insights health check report based on the most -// recently sent Insights data. -type InsightsReport struct { - // downloadedAt is the time when the last Insights report was downloaded. - // An empty value means that there has not been any Insights report downloaded yet and - // it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). - // +optional - DownloadedAt metav1.Time `json:"downloadedAt,omitempty"` - // healthChecks provides basic information about active Insights health checks - // in a cluster. - // +listType=atomic - // +optional - HealthChecks []HealthCheck `json:"healthChecks,omitempty"` -} - -// healthCheck represents an Insights health check attributes. -type HealthCheck struct { - // description provides basic description of the healtcheck. - // +required - // +kubebuilder:validation:MaxLength=2048 - // +kubebuilder:validation:MinLength=10 - Description string `json:"description"` - // totalRisk of the healthcheck. Indicator of the total risk posed - // by the detected issue; combination of impact and likelihood. The values can be from 1 to 4, - // and the higher the number, the more important the issue. - // +required - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4 - TotalRisk int32 `json:"totalRisk"` - // advisorURI provides the URL link to the Insights Advisor. - // +required - // +kubebuilder:validation:Pattern=`^https:\/\/\S+` - AdvisorURI string `json:"advisorURI"` - // state determines what the current state of the health check is. - // Health check is enabled by default and can be disabled - // by the user in the Insights advisor user interface. - // +required - State HealthCheckState `json:"state"` -} - -// healthCheckState provides information about the status of the -// health check (for example, the health check may be marked as disabled by the user). -// +kubebuilder:validation:Enum:=Enabled;Disabled -type HealthCheckState string - -const ( - // enabled marks the health check as enabled - HealthCheckEnabled HealthCheckState = "Enabled" - // disabled marks the health check as disabled - HealthCheckDisabled HealthCheckState = "Disabled" -) - -// gathererStatus represents information about a particular -// data gatherer. -type GathererStatus struct { - // conditions provide details on the status of each gatherer. - // +listType=atomic - // +required - // +kubebuilder:validation:MinItems=1 - Conditions []metav1.Condition `json:"conditions"` - // name is the name of the gatherer. - // +required - // +kubebuilder:validation:MaxLength=256 - // +kubebuilder:validation:MinLength=5 - Name string `json:"name"` - // lastGatherDuration represents the time spent gathering. - // +required - // +kubebuilder:validation:Type=string - // +kubebuilder:validation:Pattern="^(([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$" - LastGatherDuration metav1.Duration `json:"lastGatherDuration"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// InsightsOperatorList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type InsightsOperatorList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []InsightsOperator `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go b/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go deleted file mode 100644 index a5dcf7d33..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_kmsencryption.go +++ /dev/null @@ -1,80 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +kubebuilder:validation:Enum=Healthy;Unhealthy;Error -type KMSPluginHealthStatus string - -const ( - KMSPluginHealthStatusHealthy KMSPluginHealthStatus = "Healthy" - - KMSPluginHealthStatusUnhealthy KMSPluginHealthStatus = "Unhealthy" - - KMSPluginHealthStatusError KMSPluginHealthStatus = "Error" -) - -// +openshift:compatibility-gen:level=1 -type KMSPluginHealthReport struct { - - // nodeName is the name of the node this instance of the plugin runs on. - // The combination of nodeName and keyId makes this health report unique. - // The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain - // consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with - // an alphanumeric character, and be at most 253 characters in length. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="nodeName must be a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character" - // +required - NodeName string `json:"nodeName,omitempty"` - - // keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. - // This is not a cryptographic key used to encrypt/decrypt any resources. - // The value must be between 1 and 512 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=512 - // +required - KeyId string `json:"keyId,omitempty"` - - // status contains a health indicator for the respective KMS plugin - // The field can have three states: healthy, unhealthy, error. - // With error and unhealthy containing additional information in Detail. - // +required - Status KMSPluginHealthStatus `json:"status,omitempty"` - - // lastCheckedTime is a timestamp of when the probe was last checked. - // +required - LastCheckedTime metav1.Time `json:"lastCheckedTime,omitempty"` - - // kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. - // This is not a cryptographic key, but a unique representation of the KEK. - // The value must be between 1 and 1024 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=1024 - // +required - KEKId string `json:"kekId,omitempty"` - - // detail contains additional error/health information for the respective KMS plugin. - // When omitted, no additional error or health information is provided. - // When set, the value must be between 1 and 1024 characters. - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=1024 - // +optional - Detail string `json:"detail,omitempty"` -} - -// +openshift:compatibility-gen:level=1 -// +kubebuilder:validation:MinProperties=1 -type KMSEncryptionStatus struct { - // healthReports contains all KMS plugin health reports. - // When omitted, no health reports are available. - // Each entry must have a unique combination of nodeName and keyId. - // +optional - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=200 - // +listType=map - // +listMapKey=nodeName - // +listMapKey=keyId - HealthReports []KMSPluginHealthReport `json:"healthReports,omitempty"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go deleted file mode 100644 index 31b0c201b..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_kubeapiserver.go +++ /dev/null @@ -1,102 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=kubeapiservers,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_20,operatorName=kube-apiserver,operatorOrdering=01 - -// KubeAPIServer provides information to configure an operator to manage kube-apiserver. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeAPIServer struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Kubernetes API Server - // +required - Spec KubeAPIServerSpec `json:"spec"` - - // status is the most recently observed status of the Kubernetes API Server - // +optional - Status KubeAPIServerStatus `json:"status"` -} - -type KubeAPIServerSpec struct { - StaticPodOperatorSpec `json:",inline"` - - // eventTTLMinutes specifies the amount of time that the events are stored before being deleted. - // The TTL is allowed between 5 minutes minimum up to a maximum of 180 minutes (3 hours). - // - // Lowering this value will reduce the storage required in etcd. Note that this setting will only apply - // to new events being created and will not update existing events. - // - // When omitted this means no opinion, and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is 3h (180 minutes). - // - // +openshift:enable:FeatureGate=EventTTL - // +kubebuilder:validation:Minimum=5 - // +kubebuilder:validation:Maximum=180 - // +optional - EventTTLMinutes int32 `json:"eventTTLMinutes,omitempty"` -} - -type KubeAPIServerStatus struct { - StaticPodOperatorStatus `json:",inline"` - - // serviceAccountIssuers tracks history of used service account issuers. - // The item without expiration time represents the currently used service account issuer. - // The other items represents service account issuers that were used previously and are still being trusted. - // The default expiration for the items is set by the platform and it defaults to 24h. - // see: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection - // +optional - // +listType=atomic - ServiceAccountIssuers []ServiceAccountIssuerStatus `json:"serviceAccountIssuers,omitempty"` - - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - // +optional - // +openshift:enable:FeatureGate=KMSEncryption - EncryptionStatus KMSEncryptionStatus `json:"encryptionStatus,omitempty,omitzero"` -} - -type ServiceAccountIssuerStatus struct { - // name is the name of the service account issuer - // --- - // + This value comes from the serviceAccountIssuer field on the authentication.config.openshift.io/v1 resource. - // + As the authentication field is not validated, we cannot apply validation here else this may cause the controller - // + to error when trying to update this status field. - Name string `json:"name"` - - // expirationTime is the time after which this service account issuer will be pruned and removed from the trusted list - // of service account issuers. - // +optional - ExpirationTime *metav1.Time `json:"expirationTime,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeAPIServerList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeAPIServerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []KubeAPIServer `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go deleted file mode 100644 index ee104aa50..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_kubecontrollermanager.go +++ /dev/null @@ -1,67 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=kubecontrollermanagers,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_25,operatorName=kube-controller-manager,operatorOrdering=01 - -// KubeControllerManager provides information to configure an operator to manage kube-controller-manager. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeControllerManager struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Kubernetes Controller Manager - // +required - Spec KubeControllerManagerSpec `json:"spec"` - - // status is the most recently observed status of the Kubernetes Controller Manager - // +optional - Status KubeControllerManagerStatus `json:"status"` -} - -type KubeControllerManagerSpec struct { - StaticPodOperatorSpec `json:",inline"` - - // useMoreSecureServiceCA indicates that the service-ca.crt provided in SA token volumes should include only - // enough certificates to validate service serving certificates. - // Once set to true, it cannot be set to false. - // Even if someone finds a way to set it back to false, the service-ca.crt files that previously existed will - // only have the more secure content. - // +kubebuilder:default=false - UseMoreSecureServiceCA bool `json:"useMoreSecureServiceCA"` -} - -type KubeControllerManagerStatus struct { - StaticPodOperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeControllerManagerList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeControllerManagerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []KubeControllerManager `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go b/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go deleted file mode 100644 index f3add4910..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_kubestorageversionmigrator.go +++ /dev/null @@ -1,56 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=kubestorageversionmigrators,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/503 -// +openshift:file-pattern=cvoRunLevel=0000_40,operatorName=kube-storage-version-migrator,operatorOrdering=00 - -// KubeStorageVersionMigrator provides information to configure an operator to manage kube-storage-version-migrator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeStorageVersionMigrator struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +required - Spec KubeStorageVersionMigratorSpec `json:"spec"` - // +optional - Status KubeStorageVersionMigratorStatus `json:"status"` -} - -type KubeStorageVersionMigratorSpec struct { - OperatorSpec `json:",inline"` -} - -type KubeStorageVersionMigratorStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeStorageVersionMigratorList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeStorageVersionMigratorList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []KubeStorageVersionMigrator `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go b/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go deleted file mode 100644 index f0c1e01c7..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_machineconfiguration.go +++ /dev/null @@ -1,757 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=machineconfigurations,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1453 -// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 - -// MachineConfiguration provides information to configure an operator to manage Machine Configuration. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +openshift:validation:FeatureGateAwareXValidation:featureGate=BootImageSkewEnforcement,rule="self.?status.bootImageSkewEnforcementStatus.mode.orValue(\"\") == 'Automatic' ? self.?spec.managedBootImages.hasValue() || self.?status.managedBootImagesStatus.hasValue() : true",message="when skew enforcement is in Automatic mode, a boot image configuration is required" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=BootImageSkewEnforcement,rule="self.?status.bootImageSkewEnforcementStatus.mode.orValue(\"\") == 'Automatic' ? !(self.?spec.managedBootImages.machineManagers.hasValue()) || size(self.spec.managedBootImages.machineManagers) > 0 : true",message="when skew enforcement is in Automatic mode, managedBootImages.machineManagers must not be an empty list" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=BootImageSkewEnforcement,rule="self.?status.bootImageSkewEnforcementStatus.mode.orValue(\"\") == 'Automatic' ? !(self.?spec.managedBootImages.machineManagers.hasValue()) || !self.spec.managedBootImages.machineManagers.exists(m, m.resource == 'machinesets' && m.apiGroup == 'machine.openshift.io') || self.spec.managedBootImages.machineManagers.exists(m, m.resource == 'machinesets' && m.apiGroup == 'machine.openshift.io' && m.selection.mode == 'All') : true",message="when skew enforcement is in Automatic mode, any MachineAPI MachineSet MachineManager must use selection mode 'All'" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=BootImageSkewEnforcement,rule="self.?status.bootImageSkewEnforcementStatus.mode.orValue(\"\") == 'Automatic' ? !(self.?status.managedBootImagesStatus.machineManagers.hasValue()) || self.status.managedBootImagesStatus.machineManagers.exists(m, m.selection.mode == 'All' && m.resource == 'machinesets' && m.apiGroup == 'machine.openshift.io'): true",message="when skew enforcement is in Automatic mode, managedBootImagesStatus must contain a MachineManager opting in all MachineAPI MachineSets" -type MachineConfiguration struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Machine Config Operator - // +required - Spec MachineConfigurationSpec `json:"spec"` - - // status is the most recently observed status of the Machine Config Operator - // +optional - Status MachineConfigurationStatus `json:"status"` -} - -type MachineConfigurationSpec struct { - StaticPodOperatorSpec `json:",inline"` - - // managedBootImages allows configuration for the management of boot images for machine - // resources within the cluster. This configuration allows users to select resources that should - // be updated to the latest boot images during cluster upgrades, ensuring that new machines - // always boot with the current cluster version's boot image. When omitted, this means no opinion - // and the platform is left to choose a reasonable default, which is subject to change over time. - // The default for each machine manager mode is All for GCP and AWS platforms, and None for all - // other platforms. - // +optional - ManagedBootImages ManagedBootImages `json:"managedBootImages"` - - // nodeDisruptionPolicy allows an admin to set granular node disruption actions for - // MachineConfig-based updates, such as drains, service reloads, etc. Specifying this will allow - // for less downtime when doing small configuration updates to the cluster. This configuration - // has no effect on cluster upgrades which will still incur node disruption where required. - // +optional - NodeDisruptionPolicy NodeDisruptionPolicyConfig `json:"nodeDisruptionPolicy"` - - // irreconcilableValidationOverrides is an optional field that can used to make changes to a MachineConfig that - // cannot be applied to existing nodes. - // When specified, the fields configured with validation overrides will no longer reject changes to those - // respective fields due to them not being able to be applied to existing nodes. - // Only newly provisioned nodes will have these configurations applied. - // Existing nodes will report observed configuration differences in their MachineConfigNode status. - // +openshift:enable:FeatureGate=IrreconcilableMachineConfig - // +optional - IrreconcilableValidationOverrides IrreconcilableValidationOverrides `json:"irreconcilableValidationOverrides,omitempty,omitzero"` - - // bootImageSkewEnforcement allows an admin to configure how boot image version skew is - // enforced on the cluster. - // When omitted, this will default to Automatic for clusters that support automatic boot image updates. - // For clusters that do not support automatic boot image updates, cluster upgrades will be disabled until - // a skew enforcement mode has been specified. - // When version skew is being enforced, cluster upgrades will be disabled until the version skew is deemed - // acceptable for the current release payload. - // +openshift:enable:FeatureGate=BootImageSkewEnforcement - // +optional - BootImageSkewEnforcement BootImageSkewEnforcementConfig `json:"bootImageSkewEnforcement,omitempty,omitzero"` -} - -// BootImageSkewEnforcementConfig is used to configure how boot image version skew is enforced on the cluster. -// +kubebuilder:validation:XValidation:rule="has(self.mode) && (self.mode =='Manual') ? has(self.manual) : !has(self.manual)",message="manual is required when mode is Manual, and forbidden otherwise" -// +union -type BootImageSkewEnforcementConfig struct { - // mode determines the underlying behavior of skew enforcement mechanism. - // Valid values are Manual and None. - // Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP - // & RHCOS version associated with the last boot image update in the manual field. - // In Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the - // skew limit described by the release image. - // None means that the MCO will no longer monitor the boot image skew. This may affect - // the cluster's ability to scale. - // This field is required. - // +unionDiscriminator - // +required - Mode BootImageSkewEnforcementConfigMode `json:"mode,omitempty"` - - // manual describes the current boot image of the cluster. - // This should be set to the oldest boot image used amongst all machine resources in the cluster. - // This must include either the RHCOS version of the boot image or the OCP release version which shipped with that - // RHCOS boot image. - // Required when mode is set to "Manual" and forbidden otherwise. - // +optional - Manual ClusterBootImageManual `json:"manual,omitempty,omitzero"` -} - -// ClusterBootImageManual is used to describe the cluster boot image in Manual mode. -// +kubebuilder:validation:XValidation:rule="has(self.mode) && (self.mode =='OCPVersion') ? has(self.ocpVersion) : !has(self.ocpVersion)",message="ocpVersion is required when mode is OCPVersion, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.mode) && (self.mode =='RHCOSVersion') ? has(self.rhcosVersion) : !has(self.rhcosVersion)",message="rhcosVersion is required when mode is RHCOSVersion, and forbidden otherwise" -// +union -type ClusterBootImageManual struct { - // mode is used to configure which boot image field is defined in Manual mode. - // Valid values are OCPVersion and RHCOSVersion. - // OCPVersion means that the cluster admin is expected to set the OCP version associated with the last boot image update - // in the OCPVersion field. - // RHCOSVersion means that the cluster admin is expected to set the RHCOS version associated with the last boot image update - // in the RHCOSVersion field. - // This field is required. - // +unionDiscriminator - // +required - Mode ClusterBootImageManualMode `json:"mode,omitempty"` - - // ocpVersion provides a string which represents the OCP version of the boot image. - // This field must match the OCP semver compatible format of x.y.z. This field must be between - // 5 and 10 characters long. - // Required when mode is set to "OCPVersion" and forbidden otherwise. - // +kubebuilder:validation:XValidation:rule="self.matches('^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$')",message="ocpVersion must match the OCP semver compatible format of x.y.z" - // +kubebuilder:validation:MaxLength:=10 - // +kubebuilder:validation:MinLength:=5 - // +optional - OCPVersion string `json:"ocpVersion,omitempty"` - - // rhcosVersion provides a string which represents the RHCOS version of the boot image - // This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy - // format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between - // 14 and 21 characters long. - // Required when mode is set to "RHCOSVersion" and forbidden otherwise. - // +kubebuilder:validation:XValidation:rule="self.matches('^[0-9]+\\\\.[0-9]+\\\\.([0-9]{8}|[0-9]{12})-[0-9]+$')",message="rhcosVersion must match format [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or must match legacy format [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]" - // +kubebuilder:validation:MaxLength:=21 - // +kubebuilder:validation:MinLength:=14 - // +optional - RHCOSVersion string `json:"rhcosVersion,omitempty"` -} - -// ClusterBootImageManualMode is a string enum used to define the cluster's boot image in manual mode. -// +kubebuilder:validation:Enum:="OCPVersion";"RHCOSVersion" -type ClusterBootImageManualMode string - -const ( - // OCPVersion represents a configuration mode used to define the OCPVersion. - ClusterBootImageSpecModeOCPVersion ClusterBootImageManualMode = "OCPVersion" - - // RHCOSVersion represents a configuration mode used to define the RHCOSVersion. - ClusterBootImageSpecModeRHCOSVersion ClusterBootImageManualMode = "RHCOSVersion" -) - -// BootImageSkewEnforcementStatus is the type for the status object. It represents the cluster defaults when -// the boot image skew enforcement configuration is undefined and reflects the actual configuration when it is defined. -// +kubebuilder:validation:XValidation:rule="has(self.mode) && (self.mode == 'Automatic') ? has(self.automatic) : !has(self.automatic)",message="automatic is required when mode is Automatic, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.mode) && (self.mode == 'Manual') ? has(self.manual) : !has(self.manual)",message="manual is required when mode is Manual, and forbidden otherwise" -// +union -type BootImageSkewEnforcementStatus struct { - // mode determines the underlying behavior of skew enforcement mechanism. - // Valid values are Automatic, Manual and None. - // Automatic means that the MCO will perform boot image updates and store the - // OCP & RHCOS version associated with the last boot image update in the automatic field. - // Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP - // & RHCOS version associated with the last boot image update in the manual field. - // In Automatic and Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the - // skew limit described by the release image. - // None means that the MCO will no longer monitor the boot image skew. This may affect - // the cluster's ability to scale. - // This field is required. - // +unionDiscriminator - // +required - Mode BootImageSkewEnforcementModeStatus `json:"mode,omitempty"` - - // automatic describes the current boot image of the cluster. - // This will be populated by the MCO when performing boot image updates. This value will be compared against - // the cluster's skew limit to determine skew compliance. - // Required when mode is set to "Automatic" and forbidden otherwise. - // +optional - Automatic ClusterBootImageAutomatic `json:"automatic,omitempty,omitzero"` - - // manual describes the current boot image of the cluster. - // This will be populated by the MCO using the values provided in the spec.bootImageSkewEnforcement.manual field. - // This value will be compared against the cluster's skew limit to determine skew compliance. - // Required when mode is set to "Manual" and forbidden otherwise. - // +optional - Manual ClusterBootImageManual `json:"manual,omitempty,omitzero"` -} - -// ClusterBootImageAutomatic is used to describe the cluster boot image in Automatic mode. It stores the RHCOS version of the -// boot image and the OCP release version which shipped with that RHCOS boot image. At least one of these values are required. -// If ocpVersion and rhcosVersion are defined, both values will be used for checking skew compliance. -// If only ocpVersion is defined, only that value will be used for checking skew compliance. -// If only rhcosVersion is defined, only that value will be used for checking skew compliance. -// +kubebuilder:validation:XValidation:rule="has(self.ocpVersion) || has(self.rhcosVersion)",message="at least one of ocpVersion or rhcosVersion is required" -// +kubebuilder:validation:MinProperties=1 -type ClusterBootImageAutomatic struct { - // ocpVersion provides a string which represents the OCP version of the boot image. - // This field must match the OCP semver compatible format of x.y.z. This field must be between - // 5 and 10 characters long. - // +kubebuilder:validation:XValidation:rule="self.matches('^[0-9]+\\\\.[0-9]+\\\\.[0-9]+$')",message="ocpVersion must match the OCP semver compatible format of x.y.z" - // +kubebuilder:validation:MaxLength:=10 - // +kubebuilder:validation:MinLength:=5 - // +optional - OCPVersion string `json:"ocpVersion,omitempty"` - - // rhcosVersion provides a string which represents the RHCOS version of the boot image - // This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy - // format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between - // 14 and 21 characters long. - // +kubebuilder:validation:XValidation:rule="self.matches('^[0-9]+\\\\.[0-9]+\\\\.([0-9]{8}|[0-9]{12})-[0-9]+$')",message="rhcosVersion must match format [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or must match legacy format [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]" - // +kubebuilder:validation:MaxLength:=21 - // +kubebuilder:validation:MinLength:=14 - // +optional - RHCOSVersion string `json:"rhcosVersion,omitempty"` -} - -// BootImageSkewEnforcementConfigMode is a string enum used to configure the cluster's boot image skew enforcement mode. -// +kubebuilder:validation:Enum:="Manual";"None" -type BootImageSkewEnforcementConfigMode string - -const ( - // Manual represents a configuration mode that allows manual skew enforcement. - BootImageSkewEnforcementConfigModeManual BootImageSkewEnforcementConfigMode = "Manual" - - // None represents a configuration mode that disables boot image skew enforcement. - BootImageSkewEnforcementConfigModeNone BootImageSkewEnforcementConfigMode = "None" -) - -// BootImageSkewEnforcementModeStatus is a string enum used to indicate the cluster's boot image skew enforcement mode. -// +kubebuilder:validation:Enum:="Automatic";"Manual";"None" -type BootImageSkewEnforcementModeStatus string - -const ( - // Automatic represents a configuration mode that allows automatic skew enforcement. - BootImageSkewEnforcementModeStatusAutomatic BootImageSkewEnforcementModeStatus = "Automatic" - - // Manual represents a configuration mode that allows manual skew enforcement. - BootImageSkewEnforcementModeStatusManual BootImageSkewEnforcementModeStatus = "Manual" - - // None represents a configuration mode that disables boot image skew enforcement. - BootImageSkewEnforcementModeStatusNone BootImageSkewEnforcementModeStatus = "None" -) - -type MachineConfigurationStatus struct { - // observedGeneration is the last generation change you've dealt with - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // conditions is a list of conditions and their status - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // Previously there was a StaticPodOperatorStatus here for legacy reasons. Many of the fields within - // it are no longer relevant for the MachineConfiguration CRD's functions. The following remainder - // fields were tombstoned after lifting out StaticPodOperatorStatus. To avoid conflicts with - // serialisation, the following field names may never be used again. - - // Tombstone: legacy field from StaticPodOperatorStatus - // Version string `json:"version,omitempty"` - - // Tombstone: legacy field from StaticPodOperatorStatus - // ReadyReplicas int32 `json:"readyReplicas"` - - // Tombstone: legacy field from StaticPodOperatorStatus - // Generations []GenerationStatus `json:"generations,omitempty"` - - // Tombstone: legacy field from StaticPodOperatorStatus - // LatestAvailableRevision int32 `json:"latestAvailableRevision,omitempty"` - - // Tombstone: legacy field from StaticPodOperatorStatus - // LatestAvailableRevisionReason string `json:"latestAvailableRevisionReason,omitempty"` - - // Tombstone: legacy field from StaticPodOperatorStatus - // NodeStatuses []NodeStatus `json:"nodeStatuses,omitempty"` - - // nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, - // and will be used by the Machine Config Daemon during future node updates. - // +optional - NodeDisruptionPolicyStatus NodeDisruptionPolicyStatus `json:"nodeDisruptionPolicyStatus"` - - // managedBootImagesStatus reflects what the latest cluster-validated boot image configuration is - // and will be used by Machine Config Controller while performing boot image updates. - // +optional - ManagedBootImagesStatus ManagedBootImages `json:"managedBootImagesStatus"` - - // bootImageSkewEnforcementStatus reflects what the latest cluster-validated boot image skew enforcement - // configuration is and will be used by Machine Config Controller while performing boot image skew enforcement. - // When omitted, the MCO has no knowledge of how to enforce boot image skew. When the MCO does not know how - // boot image skew should be enforced, cluster upgrades will be blocked until it can either automatically - // determine skew enforcement or there is an explicit skew enforcement configuration provided in the - // spec.bootImageSkewEnforcement field. - // +openshift:enable:FeatureGate=BootImageSkewEnforcement - // +optional - BootImageSkewEnforcementStatus BootImageSkewEnforcementStatus `json:"bootImageSkewEnforcementStatus,omitempty,omitzero"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// MachineConfigurationList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type MachineConfigurationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []MachineConfiguration `json:"items"` -} - -// IrreconcilableValidationOverridesStorage defines available storage irreconcilable overrides. -// +kubebuilder:validation:Enum=Disks;FileSystems;Raid -type IrreconcilableValidationOverridesStorage string - -const ( - // Disks enables changes to the `spec.config.storage.disks` section of MachineConfig CRs. - IrreconcilableValidationOverridesStorageDisks IrreconcilableValidationOverridesStorage = "Disks" - - // FileSystems enables changes to the `spec.config.storage.filesystems` section of MachineConfig CRs. - IrreconcilableValidationOverridesStorageFileSystems IrreconcilableValidationOverridesStorage = "FileSystems" - - // Raid enables changes to the `spec.config.storage.raid` section of MachineConfig CRs. - IrreconcilableValidationOverridesStorageRaid IrreconcilableValidationOverridesStorage = "Raid" -) - -// IrreconcilableValidationOverrides holds the irreconcilable validations overrides to be applied on each rendered -// MachineConfig generation. -// +kubebuilder:validation:MinProperties=1 -type IrreconcilableValidationOverrides struct { - // storage can be used to allow making irreconcilable changes to the selected sections under the - // `spec.config.storage` field of MachineConfig CRs - // It must have at least one item, may not exceed 3 items and must not contain duplicates. - // Allowed element values are "Disks", "FileSystems", "Raid" and omitted. - // When contains "Disks" changes to the `spec.config.storage.disks` section of MachineConfig CRs are allowed. - // When contains "FileSystems" changes to the `spec.config.storage.filesystems` section of MachineConfig CRs are allowed. - // When contains "Raid" changes to the `spec.config.storage.raid` section of MachineConfig CRs are allowed. - // When omitted changes to the `spec.config.storage` section are forbidden. - // +optional - // +listType=set - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=3 - Storage []IrreconcilableValidationOverridesStorage `json:"storage,omitempty,omitzero"` -} - -type ManagedBootImages struct { - // machineManagers can be used to register machine management resources for boot image updates. The Machine Config Operator - // will watch for changes to this list. Only one entry is permitted per type of machine management resource. - // +optional - // +listType=map - // +listMapKey=resource - // +listMapKey=apiGroup - // +kubebuilder:validation:MaxItems=5 - MachineManagers []MachineManager `json:"machineManagers"` -} - -// MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information -// such as the resource type and the API Group of the resource. It also provides granular control via the selection field. -// +openshift:validation:FeatureGateAwareXValidation:requiredFeatureGate=ManagedBootImagesCPMS,rule="self.resource != 'controlplanemachinesets' || self.selection.mode == 'All' || self.selection.mode == 'None'", message="Only All or None selection mode is permitted for ControlPlaneMachineSets" -type MachineManager struct { - // resource is the machine management resource's type. - // Valid values are machinesets and controlplanemachinesets. - // machinesets means that the machine manager will only register resources of the kind MachineSet. - // controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet. - // +required - Resource MachineManagerMachineSetsResourceType `json:"resource"` - - // apiGroup is name of the APIGroup that the machine management resource belongs to. - // The only current valid value is machine.openshift.io. - // machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group. - // +required - APIGroup MachineManagerMachineSetsAPIGroupType `json:"apiGroup"` - - // selection allows granular control of the machine management resources that will be registered for boot image updates. - // +required - Selection MachineManagerSelector `json:"selection"` -} - -// +kubebuilder:validation:XValidation:rule="has(self.mode) && self.mode == 'Partial' ? has(self.partial) : !has(self.partial)",message="Partial is required when type is partial, and forbidden otherwise" -// +union -type MachineManagerSelector struct { - // mode determines how machine managers will be selected for updates. - // Valid values are All, Partial and None. - // All means that every resource matched by the machine manager will be updated. - // Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. - // Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. - // None means that every resource matched by the machine manager will not be updated. - // +unionDiscriminator - // +required - Mode MachineManagerSelectorMode `json:"mode"` - - // partial provides label selector(s) that can be used to match machine management resources. - // Only permitted when mode is set to "Partial". - // +optional - Partial *PartialSelector `json:"partial,omitempty"` -} - -// PartialSelector provides label selector(s) that can be used to match machine management resources. -type PartialSelector struct { - // machineResourceSelector is a label selector that can be used to select machine resources like MachineSets. - // +required - MachineResourceSelector *metav1.LabelSelector `json:"machineResourceSelector,omitempty"` -} - -// MachineManagerSelectorMode is a string enum used in the MachineManagerSelector union discriminator. -// +kubebuilder:validation:Enum:="All";"Partial";"None" -type MachineManagerSelectorMode string - -const ( - // All represents a configuration mode that registers all resources specified by the parent MachineManager for boot image updates. - All MachineManagerSelectorMode = "All" - - // Partial represents a configuration mode that will register resources specified by the parent MachineManager only - // if they match with the label selector. - Partial MachineManagerSelectorMode = "Partial" - - // None represents a configuration mode that excludes all resources specified by the parent MachineManager from boot image updates. - None MachineManagerSelectorMode = "None" -) - -// MachineManagerManagedResourceType is a string enum used in the MachineManager type to describe the resource -// type to be registered. -// +openshift:validation:FeatureGateAwareEnum:featureGate="",enum=machinesets -// +openshift:validation:FeatureGateAwareEnum:featureGate=ManagedBootImagesCPMS,enum=machinesets;controlplanemachinesets -type MachineManagerMachineSetsResourceType string - -const ( - // MachineSets represent the MachineSet resource type, which manage a group of machines and belong to the Openshift machine API group. - MachineSets MachineManagerMachineSetsResourceType = "machinesets" - // ControlPlaneMachineSets represent the ControlPlaneMachineSets resource type, which manage a group of control-plane machines and belong to the Openshift machine API group. - ControlPlaneMachineSets MachineManagerMachineSetsResourceType = "controlplanemachinesets" -) - -// MachineManagerManagedAPIGroupType is a string enum used in in the MachineManager type to describe the APIGroup -// of the resource type being registered. -// +kubebuilder:validation:Enum:="machine.openshift.io" -type MachineManagerMachineSetsAPIGroupType string - -const ( - // MachineAPI represent the traditional MAPI Group that a machineset may belong to. - // This feature only supports MAPI machinesets and controlplanemachinesets at this time. - MachineAPI MachineManagerMachineSetsAPIGroupType = "machine.openshift.io" -) - -type NodeDisruptionPolicyStatus struct { - // clusterPolicies is a merge of cluster default and user provided node disruption policies. - // +optional - ClusterPolicies NodeDisruptionPolicyClusterStatus `json:"clusterPolicies"` -} - -// NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys -type NodeDisruptionPolicyConfig struct { - // files is a list of MachineConfig file definitions and actions to take to changes on those paths - // This list supports a maximum of 50 entries. - // +optional - // +listType=map - // +listMapKey=path - // +kubebuilder:validation:MaxItems=50 - Files []NodeDisruptionPolicySpecFile `json:"files"` - // units is a list MachineConfig unit definitions and actions to take on changes to those services - // This list supports a maximum of 50 entries. - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=50 - Units []NodeDisruptionPolicySpecUnit `json:"units"` - // sshkey maps to the ignition.sshkeys field in the MachineConfig object, definition an action for this - // will apply to all sshkey changes in the cluster - // +optional - SSHKey NodeDisruptionPolicySpecSSHKey `json:"sshkey"` -} - -// NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a -// merge of cluster defaults and user provided policies -type NodeDisruptionPolicyClusterStatus struct { - // files is a list of MachineConfig file definitions and actions to take to changes on those paths - // +optional - // +listType=map - // +listMapKey=path - // +kubebuilder:validation:MaxItems=100 - Files []NodeDisruptionPolicyStatusFile `json:"files,omitempty"` - // units is a list MachineConfig unit definitions and actions to take on changes to those services - // +optional - // +listType=map - // +listMapKey=name - // +kubebuilder:validation:MaxItems=100 - Units []NodeDisruptionPolicyStatusUnit `json:"units,omitempty"` - // sshkey is the overall sshkey MachineConfig definition - // +optional - SSHKey NodeDisruptionPolicyStatusSSHKey `json:"sshkey,omitempty"` -} - -// NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecFile struct { - // path is the location of a file being managed through a MachineConfig. - // The Actions in the policy will apply to changes to the file at this path. - // +required - Path string `json:"path"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicySpecAction `json:"actions"` -} - -// NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusFile struct { - // path is the location of a file being managed through a MachineConfig. - // The Actions in the policy will apply to changes to the file at this path. - // +required - Path string `json:"path"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicyStatusAction `json:"actions"` -} - -// NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecUnit struct { - // name represents the service name of a systemd service managed through a MachineConfig - // Actions specified will be applied for changes to the named service. - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +required - Name NodeDisruptionPolicyServiceName `json:"name"` - - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicySpecAction `json:"actions"` -} - -// NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusUnit struct { - // name represents the service name of a systemd service managed through a MachineConfig - // Actions specified will be applied for changes to the named service. - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +required - Name NodeDisruptionPolicyServiceName `json:"name"` - - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicyStatusAction `json:"actions"` -} - -// NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecSSHKey struct { - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicySpecAction `json:"actions"` -} - -// NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusSSHKey struct { - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - // +required - // +listType=atomic - // +kubebuilder:validation:MaxItems=10 - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='Reboot') ? size(self) == 1 : true", message="Reboot action can only be specified standalone, as it will override any other actions" - // +kubebuilder:validation:XValidation:rule="self.exists(x, x.type=='None') ? size(self) == 1 : true", message="None action can only be specified standalone, as it will override any other actions" - Actions []NodeDisruptionPolicyStatusAction `json:"actions"` -} - -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Reload' ? has(self.reload) : !has(self.reload)",message="reload is required when type is Reload, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Restart' ? has(self.restart) : !has(self.restart)",message="restart is required when type is Restart, and forbidden otherwise" -// +union -type NodeDisruptionPolicySpecAction struct { - // type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed - // Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None. - // reload/restart requires a corresponding service target specified in the reload/restart field. - // Other values require no further configuration - // +unionDiscriminator - // +required - Type NodeDisruptionPolicySpecActionType `json:"type"` - // reload specifies the service to reload, only valid if type is reload - // +optional - Reload *ReloadService `json:"reload,omitempty"` - // restart specifies the service to restart, only valid if type is restart - // +optional - Restart *RestartService `json:"restart,omitempty"` -} - -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Reload' ? has(self.reload) : !has(self.reload)",message="reload is required when type is Reload, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Restart' ? has(self.restart) : !has(self.restart)",message="restart is required when type is Restart, and forbidden otherwise" -// +union -type NodeDisruptionPolicyStatusAction struct { - // type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed - // Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special. - // reload/restart requires a corresponding service target specified in the reload/restart field. - // Other values require no further configuration - // +unionDiscriminator - // +required - Type NodeDisruptionPolicyStatusActionType `json:"type"` - // reload specifies the service to reload, only valid if type is reload - // +optional - Reload *ReloadService `json:"reload,omitempty"` - // restart specifies the service to restart, only valid if type is restart - // +optional - Restart *RestartService `json:"restart,omitempty"` -} - -// ReloadService allows the user to specify the services to be reloaded -type ReloadService struct { - // serviceName is the full name (e.g. crio.service) of the service to be reloaded - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +required - ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"` -} - -// RestartService allows the user to specify the services to be restarted -type RestartService struct { - // serviceName is the full name (e.g. crio.service) of the service to be restarted - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - // +required - ServiceName NodeDisruptionPolicyServiceName `json:"serviceName"` -} - -// NodeDisruptionPolicySpecActionType is a string enum used in a NodeDisruptionPolicySpecAction object. They describe an action to be performed. -// +kubebuilder:validation:Enum:="Reboot";"Drain";"Reload";"Restart";"DaemonReload";"None" -type NodeDisruptionPolicySpecActionType string - -// +kubebuilder:validation:XValidation:rule=`self.matches('\\.(service|socket|device|mount|automount|swap|target|path|timer|snapshot|slice|scope)$')`, message="Invalid ${SERVICETYPE} in service name. Expected format is ${NAME}${SERVICETYPE}, where ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\",\".snapshot\", \".slice\" or \".scope\"." -// +kubebuilder:validation:XValidation:rule=`self.matches('^[a-zA-Z0-9:._\\\\-]+\\..')`, message="Invalid ${NAME} in service name. Expected format is ${NAME}${SERVICETYPE}, where {NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\\\"" -// +kubebuilder:validation:MaxLength=255 -type NodeDisruptionPolicyServiceName string - -const ( - // Reboot represents an action that will cause nodes to be rebooted. This is the default action by the MCO - // if a reboot policy is not found for a change/update being performed by the MCO. - RebootSpecAction NodeDisruptionPolicySpecActionType = "Reboot" - - // Drain represents an action that will cause nodes to be drained of their workloads. - DrainSpecAction NodeDisruptionPolicySpecActionType = "Drain" - - // Reload represents an action that will cause nodes to reload the service described by the Target field. - ReloadSpecAction NodeDisruptionPolicySpecActionType = "Reload" - - // Restart represents an action that will cause nodes to restart the service described by the Target field. - RestartSpecAction NodeDisruptionPolicySpecActionType = "Restart" - - // DaemonReload represents an action that TBD - DaemonReloadSpecAction NodeDisruptionPolicySpecActionType = "DaemonReload" - - // None represents an action that no handling is required by the MCO. - NoneSpecAction NodeDisruptionPolicySpecActionType = "None" -) - -// NodeDisruptionPolicyStatusActionType is a string enum used in a NodeDisruptionPolicyStatusAction object. They describe an action to be performed. -// The key difference of this object from NodeDisruptionPolicySpecActionType is that there is a additional SpecialStatusAction value in this enum. This will only be -// used by the MCO's controller to indicate some internal actions. They are not part of the NodeDisruptionPolicyConfig object and cannot be set by the user. -// +kubebuilder:validation:Enum:="Reboot";"Drain";"Reload";"Restart";"DaemonReload";"None";"Special" -type NodeDisruptionPolicyStatusActionType string - -const ( - // Reboot represents an action that will cause nodes to be rebooted. This is the default action by the MCO - // if a reboot policy is not found for a change/update being performed by the MCO. - RebootStatusAction NodeDisruptionPolicyStatusActionType = "Reboot" - - // Drain represents an action that will cause nodes to be drained of their workloads. - DrainStatusAction NodeDisruptionPolicyStatusActionType = "Drain" - - // Reload represents an action that will cause nodes to reload the service described by the Target field. - ReloadStatusAction NodeDisruptionPolicyStatusActionType = "Reload" - - // Restart represents an action that will cause nodes to restart the service described by the Target field. - RestartStatusAction NodeDisruptionPolicyStatusActionType = "Restart" - - // DaemonReload represents an action that TBD - DaemonReloadStatusAction NodeDisruptionPolicyStatusActionType = "DaemonReload" - - // None represents an action that no handling is required by the MCO. - NoneStatusAction NodeDisruptionPolicyStatusActionType = "None" - - // Special represents an action that is internal to the MCO, and is not allowed in user defined NodeDisruption policies. - SpecialStatusAction NodeDisruptionPolicyStatusActionType = "Special" -) - -// These strings will be used for MachineConfiguration Status conditions. -const ( - // MachineConfigurationBootImageUpdateDegraded means that the MCO ran into an error while reconciling boot images. This - // will cause the clusteroperators.config.openshift.io/machine-config to degrade. This condition will indicate the cause - // of the degrade, the progress of the update and the generation of the boot images configmap that it degraded on. - MachineConfigurationBootImageUpdateDegraded string = "BootImageUpdateDegraded" - - // MachineConfigurationBootImageUpdateProgressing means that the MCO is in the process of reconciling boot images. This - // will cause the clusteroperators.config.openshift.io/machine-config to be in a Progressing state. This condition will - // indicate the progress of the update and the generation of the boot images configmap that triggered this update. - MachineConfigurationBootImageUpdateProgressing string = "BootImageUpdateProgressing" -) diff --git a/vendor/github.com/openshift/api/operator/v1/types_network.go b/vendor/github.com/openshift/api/operator/v1/types_network.go deleted file mode 100644 index cd2e2f9e3..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_network.go +++ /dev/null @@ -1,1013 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=networks,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_70,operatorName=network,operatorOrdering=01 - -// Network describes the cluster's desired network configuration. It is -// consumed by the cluster-network-operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +k8s:openapi-gen=true -// +openshift:compatibility-gen:level=1 -type Network struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - Spec NetworkSpec `json:"spec,omitempty"` - Status NetworkStatus `json:"status,omitempty"` -} - -// NetworkStatus is detailed operator status, which is distilled -// up to the Network clusteroperator object. -type NetworkStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// NetworkList contains a list of Network configurations -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type NetworkList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []Network `json:"items"` -} - -// NetworkSpec is the top-level network configuration object. -// +kubebuilder:validation:XValidation:rule="!has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding) || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == oldSelf.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Restricted' || self.defaultNetwork.ovnKubernetesConfig.gatewayConfig.ipForwarding == 'Global'",message="invalid value for IPForwarding, valid values are 'Restricted' or 'Global'" -// +kubebuilder:validation:XValidation:rule="(has(self.additionalRoutingCapabilities) && ('FRR' in self.additionalRoutingCapabilities.providers)) || !has(self.defaultNetwork) || !has(self.defaultNetwork.ovnKubernetesConfig) || !has(self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements) || self.defaultNetwork.ovnKubernetesConfig.routeAdvertisements != 'Enabled'",message="Route advertisements cannot be Enabled if 'FRR' routing capability provider is not available" -type NetworkSpec struct { - OperatorSpec `json:",inline"` - - // clusterNetwork is the IP address pool to use for pod IPs. - // Some network providers support multiple ClusterNetworks. - // Others only support one. This is equivalent to the cluster-cidr. - // +listType=atomic - ClusterNetwork []ClusterNetworkEntry `json:"clusterNetwork"` - - // serviceNetwork is the ip address pool to use for Service IPs - // Currently, all existing network providers only support a single value - // here, but this is an array to allow for growth. - // +listType=atomic - ServiceNetwork []string `json:"serviceNetwork"` - - // defaultNetwork is the "default" network that all pods will receive - DefaultNetwork DefaultNetworkDefinition `json:"defaultNetwork"` - - // additionalNetworks is a list of extra networks to make available to pods - // when multiple networks are enabled. - // +listType=map - // +listMapKey=name - AdditionalNetworks []AdditionalNetworkDefinition `json:"additionalNetworks,omitempty"` - - // disableMultiNetwork defaults to 'false' and this setting enables the pod multi-networking capability. - // disableMultiNetwork when set to 'true' at cluster install time does not install the components, typically the Multus CNI and the network-attachment-definition CRD, - // that enable the pod multi-networking capability. Setting the parameter to 'true' might be useful when you need install third-party CNI plugins, - // but these plugins are not supported by Red Hat. Changing the parameter value as a postinstallation cluster task has no effect. - DisableMultiNetwork *bool `json:"disableMultiNetwork,omitempty"` - - // useMultiNetworkPolicy enables a controller which allows for - // MultiNetworkPolicy objects to be used on additional networks as - // created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy - // objects, but NetworkPolicy objects only apply to the primary interface. - // With MultiNetworkPolicy, you can control the traffic that a pod can receive - // over the secondary interfaces. If unset, this property defaults to 'false' - // and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is - // 'true' then the value of this field is ignored. - UseMultiNetworkPolicy *bool `json:"useMultiNetworkPolicy,omitempty"` - - // deployKubeProxy specifies whether or not a standalone kube-proxy should - // be deployed by the operator. Some network providers include kube-proxy - // or similar functionality. If unset, the plugin will attempt to select - // the correct value, which is false when ovn-kubernetes is used and true - // otherwise. - // +optional - DeployKubeProxy *bool `json:"deployKubeProxy,omitempty"` - - // disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck - // CRs from a test pod to every node, apiserver and LB should be disabled or not. - // If unset, this property defaults to 'false' and network diagnostics is enabled. - // Setting this to 'true' would reduce the additional load of the pods performing the checks. - // +optional - // +kubebuilder:default:=false - DisableNetworkDiagnostics bool `json:"disableNetworkDiagnostics"` - - // kubeProxyConfig lets us configure desired proxy configuration, if - // deployKubeProxy is true. If not specified, sensible defaults will be chosen by - // OpenShift directly. - KubeProxyConfig *ProxyConfig `json:"kubeProxyConfig,omitempty"` - - // exportNetworkFlows enables and configures the export of network flow metadata from the pod network - // by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. - // If unset, flows will not be exported to any collector. - // +optional - ExportNetworkFlows *ExportNetworkFlows `json:"exportNetworkFlows,omitempty"` - - // migration enables and configures cluster network migration, for network changes - // that cannot be made instantly. - // +optional - Migration *NetworkMigration `json:"migration,omitempty"` - - // additionalRoutingCapabilities describes components and relevant - // configuration providing additional routing capabilities. When set, it - // enables such components and the usage of the routing capabilities they - // provide for the machine network. Upstream operators, like MetalLB - // operator, requiring these capabilities may rely on, or automatically set - // this attribute. Network plugins may leverage advanced routing - // capabilities acquired through the enablement of these components but may - // require specific configuration on their side to do so; refer to their - // respective documentation and configuration options. - // +optional - AdditionalRoutingCapabilities *AdditionalRoutingCapabilities `json:"additionalRoutingCapabilities,omitempty"` -} - -// NetworkMigrationMode is an enumeration of the possible mode of the network migration -// Valid values are "Live", "Offline" and omitted. -// DEPRECATED: network type migration is no longer supported. -// +kubebuilder:validation:Enum:=Live;Offline;"" -type NetworkMigrationMode string - -const ( - // A "Live" migration operation will not cause service interruption by migrating the CNI of each node one by one. The cluster network will work as normal during the network migration. - // DEPRECATED: network type migration is no longer supported. - LiveNetworkMigrationMode NetworkMigrationMode = "Live" - // An "Offline" migration operation will cause service interruption. During an "Offline" migration, two rounds of node reboots are required. The cluster network will be malfunctioning during the network migration. - // DEPRECATED: network type migration is no longer supported. - OfflineNetworkMigrationMode NetworkMigrationMode = "Offline" -) - -// NetworkMigration represents the cluster network migration configuration. -// +kubebuilder:validation:XValidation:rule="!has(self.mtu) || !has(self.networkType) || self.networkType == \"\" || has(self.mode) && self.mode == 'Live'",message="networkType migration in mode other than 'Live' may not be configured at the same time as mtu migration" -type NetworkMigration struct { - // mtu contains the MTU migration configuration. Set this to allow changing - // the MTU values for the default network. If unset, the operation of - // changing the MTU for the default network will be rejected. - // +optional - MTU *MTUMigration `json:"mtu,omitempty"` - - // networkType was previously used when changing the default network type. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - // +optional - NetworkType string `json:"networkType,omitempty"` - - // features was previously used to configure which network plugin features - // would be migrated in a network type migration. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - // +optional - Features *FeaturesMigration `json:"features,omitempty"` - - // mode indicates the mode of network type migration. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - // +optional - Mode NetworkMigrationMode `json:"mode,omitempty"` -} - -type FeaturesMigration struct { - // egressIP specified whether or not the Egress IP configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - // +optional - // +kubebuilder:default:=true - EgressIP bool `json:"egressIP,omitempty"` - // egressFirewall specified whether or not the Egress Firewall configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - // +optional - // +kubebuilder:default:=true - EgressFirewall bool `json:"egressFirewall,omitempty"` - // multicast specified whether or not the multicast configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - // +optional - // +kubebuilder:default:=true - Multicast bool `json:"multicast,omitempty"` -} - -// MTUMigration contains infomation about MTU migration. -type MTUMigration struct { - // network contains information about MTU migration for the default network. - // Migrations are only allowed to MTU values lower than the machine's uplink - // MTU by the minimum appropriate offset. - // +optional - Network *MTUMigrationValues `json:"network,omitempty"` - - // machine contains MTU migration configuration for the machine's uplink. - // Needs to be migrated along with the default network MTU unless the - // current uplink MTU already accommodates the default network MTU. - // +optional - Machine *MTUMigrationValues `json:"machine,omitempty"` -} - -// MTUMigrationValues contains the values for a MTU migration. -type MTUMigrationValues struct { - // to is the MTU to migrate to. - // +kubebuilder:validation:Minimum=0 - To *uint32 `json:"to"` - - // from is the MTU to migrate from. - // +kubebuilder:validation:Minimum=0 - // +optional - From *uint32 `json:"from,omitempty"` -} - -// ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size -// HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If -// the HostPrefix field is not used by the plugin, it can be left unset. -// Not all network providers support multiple ClusterNetworks -type ClusterNetworkEntry struct { - CIDR string `json:"cidr"` - // +kubebuilder:validation:Minimum=0 - // +optional - HostPrefix uint32 `json:"hostPrefix,omitempty"` -} - -// DefaultNetworkDefinition represents a single network plugin's configuration. -// type must be specified, along with exactly one "Config" that matches the type. -type DefaultNetworkDefinition struct { - // type is the type of network - // All NetworkTypes are supported except for NetworkTypeRaw - Type NetworkType `json:"type"` - - // openshiftSDNConfig was previously used to configure the openshift-sdn plugin. - // DEPRECATED: OpenShift SDN is no longer supported. - // +optional - OpenShiftSDNConfig *OpenShiftSDNConfig `json:"openshiftSDNConfig,omitempty"` - - // ovnKubernetesConfig configures the ovn-kubernetes plugin. - // +optional - OVNKubernetesConfig *OVNKubernetesConfig `json:"ovnKubernetesConfig,omitempty"` -} - -// SimpleMacvlanConfig contains configurations for macvlan interface. -type SimpleMacvlanConfig struct { - // master is the host interface to create the macvlan interface from. - // If not specified, it will be default route interface - // +optional - Master string `json:"master,omitempty"` - - // ipamConfig configures IPAM module will be used for IP Address Management (IPAM). - // +optional - IPAMConfig *IPAMConfig `json:"ipamConfig,omitempty"` - - // mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge - // +optional - Mode MacvlanMode `json:"mode,omitempty"` - - // mtu is the mtu to use for the macvlan interface. if unset, host's - // kernel will select the value. - // +kubebuilder:validation:Minimum=0 - // +optional - MTU uint32 `json:"mtu,omitempty"` -} - -// StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses -type StaticIPAMAddresses struct { - // address is the IP address in CIDR format - // +optional - Address string `json:"address"` - // gateway is IP inside of subnet to designate as the gateway - // +optional - Gateway string `json:"gateway,omitempty"` -} - -// StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes -type StaticIPAMRoutes struct { - // destination points the IP route destination - Destination string `json:"destination"` - // gateway is the route's next-hop IP address - // If unset, a default gateway is assumed (as determined by the CNI plugin). - // +optional - Gateway string `json:"gateway,omitempty"` -} - -// StaticIPAMDNS provides DNS related information for static IPAM -type StaticIPAMDNS struct { - // nameservers points DNS servers for IP lookup - // +optional - // +listType=atomic - Nameservers []string `json:"nameservers,omitempty"` - // domain configures the domainname the local domain used for short hostname lookups - // +optional - Domain string `json:"domain,omitempty"` - // search configures priority ordered search domains for short hostname lookups - // +optional - // +listType=atomic - Search []string `json:"search,omitempty"` -} - -// StaticIPAMConfig contains configurations for static IPAM (IP Address Management) -type StaticIPAMConfig struct { - // addresses configures IP address for the interface - // +optional - // +listType=atomic - Addresses []StaticIPAMAddresses `json:"addresses,omitempty"` - // routes configures IP routes for the interface - // +optional - // +listType=atomic - Routes []StaticIPAMRoutes `json:"routes,omitempty"` - // dns configures DNS for the interface - // +optional - DNS *StaticIPAMDNS `json:"dns,omitempty"` -} - -// IPAMConfig contains configurations for IPAM (IP Address Management) -type IPAMConfig struct { - // type is the type of IPAM module will be used for IP Address Management(IPAM). - // The supported values are IPAMTypeDHCP, IPAMTypeStatic - Type IPAMType `json:"type"` - - // staticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic - // +optional - StaticIPAMConfig *StaticIPAMConfig `json:"staticIPAMConfig,omitempty"` -} - -// AdditionalNetworkDefinition configures an extra network that is available but not -// created by default. Instead, pods must request them by name. -// type must be specified, along with exactly one "Config" that matches the type. -type AdditionalNetworkDefinition struct { - // type is the type of network - // The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan - Type NetworkType `json:"type"` - - // name is the name of the network. This will be populated in the resulting CRD - // This must be unique. - // +required - Name string `json:"name"` - - // namespace is the namespace of the network. This will be populated in the resulting CRD - // If not given the network will be created in the default namespace. - Namespace string `json:"namespace,omitempty"` - - // rawCNIConfig is the raw CNI configuration json to create in the - // NetworkAttachmentDefinition CRD - RawCNIConfig string `json:"rawCNIConfig,omitempty"` - - // simpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan - // +optional - SimpleMacvlanConfig *SimpleMacvlanConfig `json:"simpleMacvlanConfig,omitempty"` -} - -// OpenShiftSDNConfig was used to configure the OpenShift SDN plugin. It is no longer used. -type OpenShiftSDNConfig struct { - // mode is one of "Multitenant", "Subnet", or "NetworkPolicy" - Mode SDNMode `json:"mode"` - - // vxlanPort is the port to use for all vxlan packets. The default is 4789. - // +kubebuilder:validation:Minimum=0 - // +optional - VXLANPort *uint32 `json:"vxlanPort,omitempty"` - - // mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. - // This must be 50 bytes smaller than the machine's uplink. - // +kubebuilder:validation:Minimum=0 - // +optional - MTU *uint32 `json:"mtu,omitempty"` - - // useExternalOpenvswitch used to control whether the operator would deploy an OVS - // DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always - // run as a system service, and this flag is ignored. - // +optional - UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"` - - // enableUnidling controls whether or not the service proxy will support idling - // and unidling of services. By default, unidling is enabled. - EnableUnidling *bool `json:"enableUnidling,omitempty"` -} - -// ovnKubernetesConfig contains the configuration parameters for networks -// using the ovn-kubernetes network project -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="self.?transport.orValue('') == 'NoOverlay' ? self.?routeAdvertisements.orValue('') == 'Enabled' : true",message="routeAdvertisements must be Enabled when transport is NoOverlay" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="self.?transport.orValue('') == 'NoOverlay' ? has(self.noOverlayConfig) : !has(self.noOverlayConfig)",message="noOverlayConfig must be set if transport is NoOverlay, and is forbidden otherwise" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="self.?noOverlayConfig.routing.orValue('') == 'Managed' ? has(self.bgpManagedConfig) : true",message="bgpManagedConfig is required when noOverlayConfig.routing is Managed" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="!has(self.transport) || self.transport == 'Geneve' || has(oldSelf.transport)",message="transport can only be set to Geneve after installation" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="!has(oldSelf.transport) || has(self.transport)",message="transport may not be removed once set" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="!has(oldSelf.noOverlayConfig) || has(self.noOverlayConfig)",message="noOverlayConfig may not be removed once set" -type OVNKubernetesConfig struct { - // mtu is the MTU to use for the tunnel interface. This must be 100 - // bytes smaller than the uplink mtu. - // Default is 1400 - // +kubebuilder:validation:Minimum=0 - // +optional - MTU *uint32 `json:"mtu,omitempty"` - // geneve port is the UDP port to be used by geneve encapulation. - // Default is 6081 - // +kubebuilder:validation:Minimum=1 - // +optional - GenevePort *uint32 `json:"genevePort,omitempty"` - // hybridOverlayConfig configures an additional overlay network for peers that are - // not using OVN. - // +optional - HybridOverlayConfig *HybridOverlayConfig `json:"hybridOverlayConfig,omitempty"` - // ipsecConfig enables and configures IPsec for pods on the pod network within the - // cluster. - // +optional - // +kubebuilder:default={"mode": "Disabled"} - // +default={"mode": "Disabled"} - IPsecConfig *IPsecConfig `json:"ipsecConfig,omitempty"` - // policyAuditConfig is the configuration for network policy audit events. If unset, - // reported defaults are used. - // +optional - PolicyAuditConfig *PolicyAuditConfig `json:"policyAuditConfig,omitempty"` - // gatewayConfig holds the configuration for node gateway options. - // +optional - GatewayConfig *GatewayConfig `json:"gatewayConfig,omitempty"` - // v4InternalSubnet is a v4 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // Default is 100.64.0.0/16 - // +optional - V4InternalSubnet string `json:"v4InternalSubnet,omitempty"` - // v6InternalSubnet is a v6 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // Default is fd98::/64 - // +optional - V6InternalSubnet string `json:"v6InternalSubnet,omitempty"` - // egressIPConfig holds the configuration for EgressIP options. - // +optional - EgressIPConfig EgressIPConfig `json:"egressIPConfig,omitempty"` - // ipv4 allows users to configure IP settings for IPv4 connections. When ommitted, - // this means no opinions and the default configuration is used. Check individual - // fields within ipv4 for details of default values. - // +optional - IPv4 *IPv4OVNKubernetesConfig `json:"ipv4,omitempty"` - // ipv6 allows users to configure IP settings for IPv6 connections. When ommitted, - // this means no opinions and the default configuration is used. Check individual - // fields within ipv4 for details of default values. - // +optional - IPv6 *IPv6OVNKubernetesConfig `json:"ipv6,omitempty"` - - // routeAdvertisements determines if the functionality to advertise cluster - // network routes through a dynamic routing protocol, such as BGP, is - // enabled or not. This functionality is configured through the - // ovn-kubernetes RouteAdvertisements CRD. Requires the 'FRR' routing - // capability provider to be enabled as an additional routing capability. - // Allowed values are "Enabled", "Disabled" and ommited. When omitted, this - // means the user has no opinion and the platform is left to choose - // reasonable defaults. These defaults are subject to change over time. The - // current default is "Disabled". - // +optional - RouteAdvertisements RouteAdvertisementsEnablement `json:"routeAdvertisements,omitempty"` - - // transport sets the transport mode for pods on the default network. - // Allowed values are "NoOverlay" and "Geneve". - // "NoOverlay" avoids tunnel encapsulation, routing pod traffic directly between nodes. - // "Geneve" encapsulates pod traffic using Geneve tunnels between nodes. - // When omitted, this means the user has no opinion and the platform chooses - // a reasonable default which is subject to change over time. - // The current default is "Geneve". - // "NoOverlay" can only be set at installation time and cannot be changed afterwards. - // "Geneve" may be set explicitly at any time to lock in the current default. - // +openshift:enable:FeatureGate=NoOverlayMode - // +kubebuilder:validation:Enum=NoOverlay;Geneve - // +openshift:validation:FeatureGateAwareXValidation:featureGate=NoOverlayMode,rule="self == oldSelf",message="transport is immutable once set" - // +optional - Transport TransportOption `json:"transport,omitempty"` - - // noOverlayConfig contains configuration for no-overlay mode. - // This configuration applies to the default network only. - // It is required when transport is "NoOverlay". - // When omitted, this means the user does not configure no-overlay mode options. - // +openshift:enable:FeatureGate=NoOverlayMode - // +optional - NoOverlayConfig NoOverlayConfig `json:"noOverlayConfig,omitzero,omitempty"` - - // bgpManagedConfig configures the BGP properties for networks (default network or CUDNs) - // in no-overlay mode that specify routing="Managed" in their noOverlayConfig. - // It is required when noOverlayConfig.routing is set to "Managed". - // When omitted, this means the user does not configure BGP for managed routing. - // This field can be set at installation time or on day 2, and can be modified at any time. - // +openshift:enable:FeatureGate=NoOverlayMode - // +optional - BGPManagedConfig BGPManagedConfig `json:"bgpManagedConfig,omitzero,omitempty"` -} - -type IPv4OVNKubernetesConfig struct { - // internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally - // by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect - // architecture that connects the cluster routers on each node together to enable - // east west traffic. The subnet chosen should not overlap with other networks - // specified for OVN-Kubernetes as well as other networks used on the host. - // When ommitted, this means no opinion and the platform is left to choose a reasonable - // default which is subject to change over time. - // The current default subnet is 100.88.0.0/16 - // The subnet must be large enough to accommodate one IP per node in your cluster - // The value must be in proper IPV4 CIDR format - // +kubebuilder:validation:MaxLength=18 - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 4",message="Subnet must be in valid IPV4 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 30",message="subnet must be in the range /0 to /30 inclusive" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && int(self.split('.')[0]) > 0",message="first IP address octet must not be 0" - // +optional - InternalTransitSwitchSubnet string `json:"internalTransitSwitchSubnet,omitempty"` - // internalJoinSubnet is a v4 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // The current default value is 100.64.0.0/16 - // The subnet must be large enough to accommodate one IP per node in your cluster - // The value must be in proper IPV4 CIDR format - // +kubebuilder:validation:MaxLength=18 - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 4",message="Subnet must be in valid IPV4 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 30",message="subnet must be in the range /0 to /30 inclusive" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && int(self.split('.')[0]) > 0",message="first IP address octet must not be 0" - // +optional - InternalJoinSubnet string `json:"internalJoinSubnet,omitempty"` -} - -type IPv6OVNKubernetesConfig struct { - // internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally - // by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect - // architecture that connects the cluster routers on each node together to enable - // east west traffic. The subnet chosen should not overlap with other networks - // specified for OVN-Kubernetes as well as other networks used on the host. - // When ommitted, this means no opinion and the platform is left to choose a reasonable - // default which is subject to change over time. - // The subnet must be large enough to accommodate one IP per node in your cluster - // The current default subnet is fd97::/64 - // The value must be in proper IPV6 CIDR format - // Note that IPV6 dual addresses are not permitted - // +kubebuilder:validation:MaxLength=48 - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 6",message="Subnet must be in valid IPV6 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 125",message="subnet must be in the range /0 to /125 inclusive" - // +optional - InternalTransitSwitchSubnet string `json:"internalTransitSwitchSubnet,omitempty"` - // internalJoinSubnet is a v6 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // The subnet must be large enough to accommodate one IP per node in your cluster - // The current default value is fd98::/64 - // The value must be in proper IPV6 CIDR format - // Note that IPV6 dual addresses are not permitted - // +kubebuilder:validation:MaxLength=48 - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 6",message="Subnet must be in valid IPV6 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 125",message="subnet must be in the range /0 to /125 inclusive" - // +optional - InternalJoinSubnet string `json:"internalJoinSubnet,omitempty"` -} - -type HybridOverlayConfig struct { - // hybridClusterNetwork defines a network space given to nodes on an additional overlay network. - // +listType=atomic - HybridClusterNetwork []ClusterNetworkEntry `json:"hybridClusterNetwork"` - // hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. - // Default is 4789 - // +optional - HybridOverlayVXLANPort *uint32 `json:"hybridOverlayVXLANPort,omitempty"` -} - -// +kubebuilder:validation:XValidation:rule="self == oldSelf || has(self.mode)",message="ipsecConfig.mode is required" -// +kubebuilder:validation:XValidation:rule="has(self.mode) && self.mode == 'Full' ? true : !has(self.full)",message="full is forbidden when mode is not Full" -// +union -type IPsecConfig struct { - // mode defines the behaviour of the ipsec configuration within the platform. - // Valid values are `Disabled`, `External` and `Full`. - // When 'Disabled', ipsec will not be enabled at the node level. - // When 'External', ipsec is enabled on the node level but requires the user to configure the secure communication parameters. - // This mode is for external secure communications and the configuration can be done using the k8s-nmstate operator. - // When 'Full', ipsec is configured on the node level and inter-pod secure communication within the cluster is configured. - // Note with `Full`, if ipsec is desired for communication with external (to the cluster) entities (such as storage arrays), - // this is left to the user to configure. - // +kubebuilder:validation:Enum=Disabled;External;Full - // +optional - // +unionDiscriminator - Mode IPsecMode `json:"mode,omitempty"` - - // full defines configuration parameters for the IPsec `Full` mode. - // This is permitted only when mode is configured with `Full`, - // and forbidden otherwise. - // +unionMember,optional - // +optional - Full *IPsecFullModeConfig `json:"full,omitempty"` -} - -type Encapsulation string - -const ( - // EncapsulationAlways always enable UDP encapsulation regardless of whether NAT is detected. - EncapsulationAlways = "Always" - // EncapsulationAuto enable UDP encapsulation based on the detection of NAT. - EncapsulationAuto = "Auto" -) - -// IPsecFullModeConfig defines configuration parameters for the IPsec `Full` mode. -// +kubebuilder:validation:MinProperties:=1 -type IPsecFullModeConfig struct { - // encapsulation option to configure libreswan on how inter-pod traffic across nodes - // are encapsulated to handle NAT traversal. When configured it uses UDP port 4500 - // for the encapsulation. - // Valid values are Always, Auto and omitted. - // Always means enable UDP encapsulation regardless of whether NAT is detected. - // Auto means enable UDP encapsulation based on the detection of NAT. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is Auto. - // +kubebuilder:validation:Enum:=Always;Auto - // +optional - Encapsulation Encapsulation `json:"encapsulation,omitempty"` -} - -type IPForwardingMode string - -const ( - // IPForwardingRestricted limits the IP forwarding on OVN-Kube managed interfaces (br-ex, br-ex1) to only required - // service and other k8s related traffic - IPForwardingRestricted IPForwardingMode = "Restricted" - - // IPForwardingGlobal allows all IP traffic to be forwarded across OVN-Kube managed interfaces - IPForwardingGlobal IPForwardingMode = "Global" -) - -// GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides -type GatewayConfig struct { - // routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port - // into the host before sending it out. If this is not set, traffic will always egress directly - // from OVN to outside without touching the host stack. Setting this to true means hardware - // offload will not be supported. Default is false if GatewayConfig is specified. - // +kubebuilder:default:=false - // +optional - RoutingViaHost bool `json:"routingViaHost,omitempty"` - // ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). - // By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other - // IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across - // OVN-Kubernetes managed interfaces, then set this field to "Global". - // The supported values are "Restricted" and "Global". - // +optional - IPForwarding IPForwardingMode `json:"ipForwarding,omitempty"` - // ipv4 allows users to configure IP settings for IPv4 connections. When omitted, this means no opinion and the default - // configuration is used. Check individual members fields within ipv4 for details of default values. - // +optional - IPv4 IPv4GatewayConfig `json:"ipv4,omitempty"` - // ipv6 allows users to configure IP settings for IPv6 connections. When omitted, this means no opinion and the default - // configuration is used. Check individual members fields within ipv6 for details of default values. - // +optional - IPv6 IPv6GatewayConfig `json:"ipv6,omitempty"` -} - -// IPV4GatewayConfig holds the configuration paramaters for IPV4 connections in the GatewayConfig for OVN-Kubernetes -type IPv4GatewayConfig struct { - // internalMasqueradeSubnet contains the masquerade addresses in IPV4 CIDR format used internally by - // ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these - // addresses, as well as the shared gateway bridge interface. The values can be changed after - // installation. The subnet chosen should not overlap with other networks specified for - // OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must - // be large enough to accommodate 6 IPs (maximum prefix length /29). - // When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. - // The current default subnet is 169.254.0.0/17 - // The value must be in proper IPV4 CIDR format - // +kubebuilder:validation:MaxLength=18 - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 4",message="Subnet must be in valid IPV4 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 29",message="subnet must be in the range /0 to /29 inclusive" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && int(self.split('.')[0]) > 0",message="first IP address octet must not be 0" - // +optional - InternalMasqueradeSubnet string `json:"internalMasqueradeSubnet,omitempty"` -} - -// IPV6GatewayConfig holds the configuration paramaters for IPV6 connections in the GatewayConfig for OVN-Kubernetes -type IPv6GatewayConfig struct { - // internalMasqueradeSubnet contains the masquerade addresses in IPV6 CIDR format used internally by - // ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these - // addresses, as well as the shared gateway bridge interface. The values can be changed after - // installation. The subnet chosen should not overlap with other networks specified for - // OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must - // be large enough to accommodate 6 IPs (maximum prefix length /125). - // When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. - // The current default subnet is fd69::/112 - // Note that IPV6 dual addresses are not permitted - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).ip().family() == 6",message="Subnet must be in valid IPV6 CIDR format" - // +kubebuilder:validation:XValidation:rule="isCIDR(self) && cidr(self).prefixLength() <= 125",message="subnet must be in the range /0 to /125 inclusive" - // +optional - InternalMasqueradeSubnet string `json:"internalMasqueradeSubnet,omitempty"` -} - -type ExportNetworkFlows struct { - // netFlow defines the NetFlow configuration. - // +optional - NetFlow *NetFlowConfig `json:"netFlow,omitempty"` - // sFlow defines the SFlow configuration. - // +optional - SFlow *SFlowConfig `json:"sFlow,omitempty"` - // ipfix defines IPFIX configuration. - // +optional - IPFIX *IPFIXConfig `json:"ipfix,omitempty"` -} - -type NetFlowConfig struct { - // netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. - // It is a list of strings formatted as ip:port with a maximum of ten items - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=atomic - Collectors []IPPort `json:"collectors,omitempty"` -} - -type SFlowConfig struct { - // sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=atomic - Collectors []IPPort `json:"collectors,omitempty"` -} - -type IPFIXConfig struct { - // ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=10 - // +listType=atomic - Collectors []IPPort `json:"collectors,omitempty"` -} - -// +kubebuilder:validation:Pattern=`^(([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[0-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]):([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$` -type IPPort string - -type PolicyAuditConfig struct { - // rateLimit is the approximate maximum number of messages to generate per-second per-node. If - // unset the default of 20 msg/sec is used. - // +kubebuilder:default=20 - // +kubebuilder:validation:Minimum=1 - // +optional - RateLimit *uint32 `json:"rateLimit,omitempty"` - - // maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs - // Units are in MB and the Default is 50MB - // +kubebuilder:default=50 - // +kubebuilder:validation:Minimum=1 - // +optional - MaxFileSize *uint32 `json:"maxFileSize,omitempty"` - - // maxLogFiles specifies the maximum number of ACL_audit log files that can be present. - // +kubebuilder:default=5 - // +kubebuilder:validation:Minimum=1 - // +optional - MaxLogFiles *int32 `json:"maxLogFiles,omitempty"` - - // destination is the location for policy log messages. - // Regardless of this config, persistent logs will always be dumped to the host - // at /var/log/ovn/ however - // Additionally syslog output may be configured as follows. - // Valid values are: - // - "libc" -> to use the libc syslog() function of the host node's journdald process - // - "udp:host:port" -> for sending syslog over UDP - // - "unix:file" -> for using the UNIX domain socket directly - // - "null" -> to discard all messages logged to syslog - // The default is "null" - // +kubebuilder:default=null - // +kubebuilder:pattern='^libc$|^null$|^udp:(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5]):([0-9]){0,5}$|^unix:(\/[^\/ ]*)+([^\/\s])$' - // +optional - Destination string `json:"destination,omitempty"` - - // syslogFacility the RFC5424 facility for generated messages, e.g. "kern". Default is "local0" - // +kubebuilder:default=local0 - // +kubebuilder:Enum=kern;user;mail;daemon;auth;syslog;lpr;news;uucp;clock;ftp;ntp;audit;alert;clock2;local0;local1;local2;local3;local4;local5;local6;local7 - // +optional - SyslogFacility string `json:"syslogFacility,omitempty"` -} - -// NetworkType describes the network plugin type to configure -type NetworkType string - -// ProxyArgumentList is a list of arguments to pass to the kubeproxy process -// +listType=atomic -type ProxyArgumentList []string - -// ProxyConfig defines the configuration knobs for kubeproxy -// All of these are optional and have sensible defaults -type ProxyConfig struct { - // An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted - // in large clusters for performance reasons, but this is no longer necessary, and there is no reason - // to change this from the default value. - // Default: 30s - IptablesSyncPeriod string `json:"iptablesSyncPeriod,omitempty"` - - // The address to "bind" on - // Defaults to 0.0.0.0 - BindAddress string `json:"bindAddress,omitempty"` - - // Any additional arguments to pass to the kubeproxy process - ProxyArguments map[string]ProxyArgumentList `json:"proxyArguments,omitempty"` -} - -// EgressIPConfig defines the configuration knobs for egressip -type EgressIPConfig struct { - // reachabilityTotalTimeout configures the EgressIP node reachability check total timeout in seconds. - // If the EgressIP node cannot be reached within this timeout, the node is declared down. - // Setting a large value may cause the EgressIP feature to react slowly to node changes. - // In particular, it may react slowly for EgressIP nodes that really have a genuine problem and are unreachable. - // When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default is 1 second. - // A value of 0 disables the EgressIP node's reachability check. - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=60 - // +optional - ReachabilityTotalTimeoutSeconds *uint32 `json:"reachabilityTotalTimeoutSeconds,omitempty"` -} - -const ( - // NetworkTypeOpenShiftSDN means the openshift-sdn plugin will be configured. - // DEPRECATED: OpenShift SDN is no longer supported - NetworkTypeOpenShiftSDN NetworkType = "OpenShiftSDN" - - // NetworkTypeOVNKubernetes means the ovn-kubernetes plugin will be configured. - NetworkTypeOVNKubernetes NetworkType = "OVNKubernetes" - - // NetworkTypeRaw - NetworkTypeRaw NetworkType = "Raw" - - // NetworkTypeSimpleMacvlan - NetworkTypeSimpleMacvlan NetworkType = "SimpleMacvlan" -) - -// SDNMode is the Mode the openshift-sdn plugin is in. -// DEPRECATED: OpenShift SDN is no longer supported -type SDNMode string - -const ( - // SDNModeSubnet is a simple mode that offers no isolation between pods - // DEPRECATED: OpenShift SDN is no longer supported - SDNModeSubnet SDNMode = "Subnet" - - // SDNModeMultitenant is a special "multitenant" mode that offers limited - // isolation configuration between namespaces - // DEPRECATED: OpenShift SDN is no longer supported - SDNModeMultitenant SDNMode = "Multitenant" - - // SDNModeNetworkPolicy is a full NetworkPolicy implementation that allows - // for sophisticated network isolation and segmenting. This is the default. - // DEPRECATED: OpenShift SDN is no longer supported - SDNModeNetworkPolicy SDNMode = "NetworkPolicy" -) - -// MacvlanMode is the Mode of macvlan. The value are lowercase to match the CNI plugin -// config values. See "man ip-link" for its detail. -type MacvlanMode string - -const ( - // MacvlanModeBridge is the macvlan with thin bridge function. - MacvlanModeBridge MacvlanMode = "Bridge" - // MacvlanModePrivate - MacvlanModePrivate MacvlanMode = "Private" - // MacvlanModeVEPA is used with Virtual Ethernet Port Aggregator - // (802.1qbg) swtich - MacvlanModeVEPA MacvlanMode = "VEPA" - // MacvlanModePassthru - MacvlanModePassthru MacvlanMode = "Passthru" -) - -// IPAMType describes the IP address management type to configure -type IPAMType string - -const ( - // IPAMTypeDHCP uses DHCP for IP management - IPAMTypeDHCP IPAMType = "DHCP" - // IPAMTypeStatic uses static IP - IPAMTypeStatic IPAMType = "Static" -) - -// IPsecMode enumerates the modes for IPsec configuration -type IPsecMode string - -const ( - // IPsecModeDisabled disables IPsec altogether - IPsecModeDisabled IPsecMode = "Disabled" - // IPsecModeExternal enables IPsec on the node level, but expects the user to configure it using k8s-nmstate or - // other means - it is most useful for secure communication from the cluster to external endpoints - IPsecModeExternal IPsecMode = "External" - // IPsecModeFull enables IPsec on the node level (the same as IPsecModeExternal), and configures it to secure communication - // between pods on the cluster network. - IPsecModeFull IPsecMode = "Full" -) - -// +kubebuilder:validation:Enum:="";"Enabled";"Disabled" -type RouteAdvertisementsEnablement string - -var ( - // RouteAdvertisementsEnabled enables route advertisements for ovn-kubernetes - RouteAdvertisementsEnabled RouteAdvertisementsEnablement = "Enabled" - // RouteAdvertisementsDisabled disables route advertisements for ovn-kubernetes - RouteAdvertisementsDisabled RouteAdvertisementsEnablement = "Disabled" -) - -// RoutingCapabilitiesProvider is a component providing routing capabilities. -// +kubebuilder:validation:Enum=FRR -type RoutingCapabilitiesProvider string - -const ( - // RoutingCapabilitiesProviderFRR determines FRR is providing advanced - // routing capabilities. - RoutingCapabilitiesProviderFRR RoutingCapabilitiesProvider = "FRR" -) - -// AdditionalRoutingCapabilities describes components and relevant configuration providing -// advanced routing capabilities. -type AdditionalRoutingCapabilities struct { - // providers is a set of enabled components that provide additional routing - // capabilities. Entries on this list must be unique. The only valid value - // is currrently "FRR" which provides FRR routing capabilities through the - // deployment of FRR. - // +listType=atomic - // +required - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=1 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x == y))" - Providers []RoutingCapabilitiesProvider `json:"providers"` -} - -// TransportOption is the type for network transport options -type TransportOption string - -// SNATOption is the type for SNAT configuration options -type SNATOption string - -// RoutingOption is the type for routing configuration options -type RoutingOption string - -// BGPTopology is the type for BGP topology configuration -type BGPTopology string - -const ( - // TransportOptionNoOverlay indicates the network operates in no-overlay mode - TransportOptionNoOverlay TransportOption = "NoOverlay" - // TransportOptionGeneve indicates the network uses Geneve overlay - TransportOptionGeneve TransportOption = "Geneve" - - // SNATEnabled indicates outbound SNAT is enabled - SNATEnabled SNATOption = "Enabled" - // SNATDisabled indicates outbound SNAT is disabled - SNATDisabled SNATOption = "Disabled" - - // RoutingManaged indicates routing is managed by OVN-Kubernetes - RoutingManaged RoutingOption = "Managed" - // RoutingUnmanaged indicates routing is managed by users - RoutingUnmanaged RoutingOption = "Unmanaged" - - // BGPTopologyFullMesh indicates a full mesh BGP topology where every node peers directly with every other node - BGPTopologyFullMesh BGPTopology = "FullMesh" -) - -// NoOverlayConfig contains configuration options for networks operating in no-overlay mode. -type NoOverlayConfig struct { - // outboundSNAT defines the SNAT behavior for outbound traffic from pods. - // Allowed values are "Enabled" and "Disabled". - // When set to "Enabled", SNAT is performed on outbound traffic from pods. - // When set to "Disabled", SNAT is not performed and pod IPs are preserved in outbound traffic. - // This field is required when the network operates in no-overlay mode. - // This field can be set to any value at installation time and can be changed afterwards. - // +kubebuilder:validation:Enum=Enabled;Disabled - // +required - OutboundSNAT SNATOption `json:"outboundSNAT,omitempty"` - - // routing specifies whether the pod network routing is managed by OVN-Kubernetes or users. - // Allowed values are "Managed" and "Unmanaged". - // When set to "Managed", OVN-Kubernetes manages the pod network routing configuration through BGP. - // When set to "Unmanaged", users are responsible for configuring the pod network routing. - // This field is required when the network operates in no-overlay mode. - // This field is immutable once set. - // +kubebuilder:validation:Enum=Managed;Unmanaged - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="routing is immutable once set" - // +required - Routing RoutingOption `json:"routing,omitempty"` -} - -// BGPManagedConfig contains configuration options for BGP when routing is "Managed". -type BGPManagedConfig struct { - // asNumber is the 2-byte or 4-byte Autonomous System Number (ASN) - // to be used in the generated FRR configuration. - // Valid values are 1 to 4294967295. - // When omitted, this defaults to 64512. - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=4294967295 - // +default=64512 - // +optional - ASNumber int64 `json:"asNumber,omitempty"` - - // bgpTopology defines the BGP topology to be used. - // Allowed values are "FullMesh". - // When set to "FullMesh", every node peers directly with every other node via BGP. - // This field is required when BGPManagedConfig is specified. - // +kubebuilder:validation:Enum=FullMesh - // +required - BGPTopology BGPTopology `json:"bgpTopology,omitempty"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_olm.go b/vendor/github.com/openshift/api/operator/v1/types_olm.go deleted file mode 100644 index 07c94ece2..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_olm.go +++ /dev/null @@ -1,61 +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 - -// OLM provides information to configure an operator to manage the OLM controllers -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=olms,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:metadata:annotations=include.release.openshift.io/ibm-cloud-managed=false -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1504 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=operator-lifecycle-manager,operatorOrdering=01 -// +openshift:enable:FeatureGate=NewOLM -// +openshift:capability=OperatorLifecycleManagerV1 -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="olm is a singleton, .metadata.name must be 'cluster'" -type OLM struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - //spec holds user settable values for configuration - //+kubebuilder:validation:Required - Spec OLMSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status OLMStatus `json:"status"` -} - -type OLMSpec struct { - OperatorSpec `json:",inline"` -} - -type OLMStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OLMList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OLMList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []OLM `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go deleted file mode 100644 index c9d104ad2..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftapiserver.go +++ /dev/null @@ -1,64 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=openshiftapiservers,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_30,operatorName=openshift-apiserver,operatorOrdering=01 - -// OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OpenShiftAPIServer struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the OpenShift API Server. - // +required - Spec OpenShiftAPIServerSpec `json:"spec"` - - // status defines the observed status of the OpenShift API Server. - // +optional - Status OpenShiftAPIServerStatus `json:"status"` -} - -type OpenShiftAPIServerSpec struct { - OperatorSpec `json:",inline"` -} - -type OpenShiftAPIServerStatus struct { - OperatorStatus `json:",inline"` - - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - // +optional - // +openshift:enable:FeatureGate=KMSEncryption - EncryptionStatus KMSEncryptionStatus `json:"encryptionStatus,omitempty,omitzero"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OpenShiftAPIServerList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OpenShiftAPIServerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []OpenShiftAPIServer `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go deleted file mode 100644 index 8a553a057..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_openshiftcontrollermanager.go +++ /dev/null @@ -1,56 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=openshiftcontrollermanagers,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=openshift-controller-manager,operatorOrdering=02 - -// OpenShiftControllerManager provides information to configure an operator to manage openshift-controller-manager. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OpenShiftControllerManager struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +required - Spec OpenShiftControllerManagerSpec `json:"spec"` - // +optional - Status OpenShiftControllerManagerStatus `json:"status"` -} - -type OpenShiftControllerManagerSpec struct { - OperatorSpec `json:",inline"` -} - -type OpenShiftControllerManagerStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OpenShiftControllerManagerList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type OpenShiftControllerManagerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []OpenShiftControllerManager `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go b/vendor/github.com/openshift/api/operator/v1/types_scheduler.go deleted file mode 100644 index cfb04e8d9..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_scheduler.go +++ /dev/null @@ -1,59 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=kubeschedulers,scope=Cluster,categories=coreoperators -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_25,operatorName=kube-scheduler,operatorOrdering=01 - -// KubeScheduler provides information to configure an operator to manage scheduler. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeScheduler struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Kubernetes Scheduler - // +required - Spec KubeSchedulerSpec `json:"spec"` - - // status is the most recently observed status of the Kubernetes Scheduler - // +optional - Status KubeSchedulerStatus `json:"status"` -} - -type KubeSchedulerSpec struct { - StaticPodOperatorSpec `json:",inline"` -} - -type KubeSchedulerStatus struct { - StaticPodOperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KubeSchedulerList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type KubeSchedulerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []KubeScheduler `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go b/vendor/github.com/openshift/api/operator/v1/types_serviceca.go deleted file mode 100644 index 48534d4c6..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_serviceca.go +++ /dev/null @@ -1,58 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=servicecas,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/475 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=service-ca,operatorOrdering=02 - -// ServiceCA provides information to configure an operator to manage the service cert controllers -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCA struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - //spec holds user settable values for configuration - // +required - Spec ServiceCASpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status ServiceCAStatus `json:"status"` -} - -type ServiceCASpec struct { - OperatorSpec `json:",inline"` -} - -type ServiceCAStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceCAList is a collection of items -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCAList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []ServiceCA `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go deleted file mode 100644 index e058c065a..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogapiserver.go +++ /dev/null @@ -1,53 +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 - -// ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCatalogAPIServer struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // +required - Spec ServiceCatalogAPIServerSpec `json:"spec"` - // +optional - Status ServiceCatalogAPIServerStatus `json:"status"` -} - -type ServiceCatalogAPIServerSpec struct { - OperatorSpec `json:",inline"` -} - -type ServiceCatalogAPIServerStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceCatalogAPIServerList is a collection of items -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCatalogAPIServerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []ServiceCatalogAPIServer `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go b/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go deleted file mode 100644 index 4fe2aa46a..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_servicecatalogcontrollermanager.go +++ /dev/null @@ -1,53 +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 - -// ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCatalogControllerManager struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // +required - Spec ServiceCatalogControllerManagerSpec `json:"spec"` - // +optional - Status ServiceCatalogControllerManagerStatus `json:"status"` -} - -type ServiceCatalogControllerManagerSpec struct { - OperatorSpec `json:",inline"` -} - -type ServiceCatalogControllerManagerStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceCatalogControllerManagerList is a collection of items -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ServiceCatalogControllerManagerList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []ServiceCatalogControllerManager `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/types_storage.go b/vendor/github.com/openshift/api/operator/v1/types_storage.go deleted file mode 100644 index 69691a83a..000000000 --- a/vendor/github.com/openshift/api/operator/v1/types_storage.go +++ /dev/null @@ -1,79 +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 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=storages,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/670 -// +openshift:file-pattern=cvoRunLevel=0000_50,operatorName=storage,operatorOrdering=01 - -// Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Storage struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec StorageSpec `json:"spec"` - - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status StorageStatus `json:"status"` -} - -// StorageDriverType indicates whether CSI migration should be enabled for drivers where it is optional. -// +kubebuilder:validation:Enum="";LegacyDeprecatedInTreeDriver;CSIWithMigrationDriver -type StorageDriverType string - -const ( - LegacyDeprecatedInTreeDriver StorageDriverType = "LegacyDeprecatedInTreeDriver" - CSIWithMigrationDriver StorageDriverType = "CSIWithMigrationDriver" -) - -// StorageSpec is the specification of the desired behavior of the cluster storage operator. -type StorageSpec struct { - OperatorSpec `json:",inline"` - - // vsphereStorageDriver indicates the storage driver to use on VSphere clusters. - // Once this field is set to CSIWithMigrationDriver, it can not be changed. - // If this is empty, the platform will choose a good default, - // which may change over time without notice. - // The current default is CSIWithMigrationDriver and may not be changed. - // DEPRECATED: This field will be removed in a future release. - // +kubebuilder:validation:XValidation:rule="self != \"LegacyDeprecatedInTreeDriver\"",message="VSphereStorageDriver can not be set to LegacyDeprecatedInTreeDriver" - // +optional - VSphereStorageDriver StorageDriverType `json:"vsphereStorageDriver"` -} - -// StorageStatus defines the observed status of the cluster storage operator. -type StorageStatus struct { - OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// StorageList contains a list of Storages. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type StorageList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []Storage `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go deleted file mode 100644 index 3c244a986..000000000 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,5765 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - authorizationv1 "k8s.io/api/authorization/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AWSCSIDriverConfigSpec) DeepCopyInto(out *AWSCSIDriverConfigSpec) { - *out = *in - if in.EFSVolumeMetrics != nil { - in, out := &in.EFSVolumeMetrics, &out.EFSVolumeMetrics - *out = new(AWSEFSVolumeMetrics) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSCSIDriverConfigSpec. -func (in *AWSCSIDriverConfigSpec) DeepCopy() *AWSCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(AWSCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSClassicLoadBalancerParameters) DeepCopyInto(out *AWSClassicLoadBalancerParameters) { - *out = *in - out.ConnectionIdleTimeout = in.ConnectionIdleTimeout - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = new(AWSSubnets) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSClassicLoadBalancerParameters. -func (in *AWSClassicLoadBalancerParameters) DeepCopy() *AWSClassicLoadBalancerParameters { - if in == nil { - return nil - } - out := new(AWSClassicLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSEFSVolumeMetrics) DeepCopyInto(out *AWSEFSVolumeMetrics) { - *out = *in - if in.RecursiveWalk != nil { - in, out := &in.RecursiveWalk, &out.RecursiveWalk - *out = new(AWSEFSVolumeMetricsRecursiveWalkConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSEFSVolumeMetrics. -func (in *AWSEFSVolumeMetrics) DeepCopy() *AWSEFSVolumeMetrics { - if in == nil { - return nil - } - out := new(AWSEFSVolumeMetrics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSEFSVolumeMetricsRecursiveWalkConfig) DeepCopyInto(out *AWSEFSVolumeMetricsRecursiveWalkConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSEFSVolumeMetricsRecursiveWalkConfig. -func (in *AWSEFSVolumeMetricsRecursiveWalkConfig) DeepCopy() *AWSEFSVolumeMetricsRecursiveWalkConfig { - if in == nil { - return nil - } - out := new(AWSEFSVolumeMetricsRecursiveWalkConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSLoadBalancerParameters) DeepCopyInto(out *AWSLoadBalancerParameters) { - *out = *in - if in.ClassicLoadBalancerParameters != nil { - in, out := &in.ClassicLoadBalancerParameters, &out.ClassicLoadBalancerParameters - *out = new(AWSClassicLoadBalancerParameters) - (*in).DeepCopyInto(*out) - } - if in.NetworkLoadBalancerParameters != nil { - in, out := &in.NetworkLoadBalancerParameters, &out.NetworkLoadBalancerParameters - *out = new(AWSNetworkLoadBalancerParameters) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSLoadBalancerParameters. -func (in *AWSLoadBalancerParameters) DeepCopy() *AWSLoadBalancerParameters { - if in == nil { - return nil - } - out := new(AWSLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSNetworkLoadBalancerParameters) DeepCopyInto(out *AWSNetworkLoadBalancerParameters) { - *out = *in - if in.Subnets != nil { - in, out := &in.Subnets, &out.Subnets - *out = new(AWSSubnets) - (*in).DeepCopyInto(*out) - } - if in.EIPAllocations != nil { - in, out := &in.EIPAllocations, &out.EIPAllocations - *out = make([]EIPAllocation, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSNetworkLoadBalancerParameters. -func (in *AWSNetworkLoadBalancerParameters) DeepCopy() *AWSNetworkLoadBalancerParameters { - if in == nil { - return nil - } - out := new(AWSNetworkLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AWSSubnets) DeepCopyInto(out *AWSSubnets) { - *out = *in - if in.IDs != nil { - in, out := &in.IDs, &out.IDs - *out = make([]AWSSubnetID, len(*in)) - copy(*out, *in) - } - if in.Names != nil { - in, out := &in.Names, &out.Names - *out = make([]AWSSubnetName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSSubnets. -func (in *AWSSubnets) DeepCopy() *AWSSubnets { - if in == nil { - return nil - } - out := new(AWSSubnets) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AccessLogging) DeepCopyInto(out *AccessLogging) { - *out = *in - in.Destination.DeepCopyInto(&out.Destination) - in.HTTPCaptureHeaders.DeepCopyInto(&out.HTTPCaptureHeaders) - if in.HTTPCaptureCookies != nil { - in, out := &in.HTTPCaptureCookies, &out.HTTPCaptureCookies - *out = make([]IngressControllerCaptureHTTPCookie, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AccessLogging. -func (in *AccessLogging) DeepCopy() *AccessLogging { - if in == nil { - return nil - } - out := new(AccessLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AddPage) DeepCopyInto(out *AddPage) { - *out = *in - if in.DisabledActions != nil { - in, out := &in.DisabledActions, &out.DisabledActions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AddPage. -func (in *AddPage) DeepCopy() *AddPage { - if in == nil { - return nil - } - out := new(AddPage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdditionalNetworkDefinition) DeepCopyInto(out *AdditionalNetworkDefinition) { - *out = *in - if in.SimpleMacvlanConfig != nil { - in, out := &in.SimpleMacvlanConfig, &out.SimpleMacvlanConfig - *out = new(SimpleMacvlanConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalNetworkDefinition. -func (in *AdditionalNetworkDefinition) DeepCopy() *AdditionalNetworkDefinition { - if in == nil { - return nil - } - out := new(AdditionalNetworkDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdditionalRoutingCapabilities) DeepCopyInto(out *AdditionalRoutingCapabilities) { - *out = *in - if in.Providers != nil { - in, out := &in.Providers, &out.Providers - *out = make([]RoutingCapabilitiesProvider, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdditionalRoutingCapabilities. -func (in *AdditionalRoutingCapabilities) DeepCopy() *AdditionalRoutingCapabilities { - if in == nil { - return nil - } - out := new(AdditionalRoutingCapabilities) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Authentication) DeepCopyInto(out *Authentication) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authentication. -func (in *Authentication) DeepCopy() *Authentication { - if in == nil { - return nil - } - out := new(Authentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Authentication) 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 *AuthenticationConfigMapReference) DeepCopyInto(out *AuthenticationConfigMapReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationConfigMapReference. -func (in *AuthenticationConfigMapReference) DeepCopy() *AuthenticationConfigMapReference { - if in == nil { - return nil - } - out := new(AuthenticationConfigMapReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationList) DeepCopyInto(out *AuthenticationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Authentication, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationList. -func (in *AuthenticationList) DeepCopy() *AuthenticationList { - if in == nil { - return nil - } - out := new(AuthenticationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AuthenticationList) 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 *AuthenticationProxyConfig) DeepCopyInto(out *AuthenticationProxyConfig) { - *out = *in - if in.NoProxy != nil { - in, out := &in.NoProxy, &out.NoProxy - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.TrustedCA = in.TrustedCA - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationProxyConfig. -func (in *AuthenticationProxyConfig) DeepCopy() *AuthenticationProxyConfig { - if in == nil { - return nil - } - out := new(AuthenticationProxyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AuthenticationSpec) DeepCopyInto(out *AuthenticationSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - in.Proxy.DeepCopyInto(&out.Proxy) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationSpec. -func (in *AuthenticationSpec) DeepCopy() *AuthenticationSpec { - if in == nil { - return nil - } - out := new(AuthenticationSpec) - in.DeepCopyInto(out) - return out -} - -// 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 - in.OAuthAPIServer.DeepCopyInto(&out.OAuthAPIServer) - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthenticationStatus. -func (in *AuthenticationStatus) DeepCopy() *AuthenticationStatus { - if in == nil { - return nil - } - out := new(AuthenticationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureCSIDriverConfigSpec) DeepCopyInto(out *AzureCSIDriverConfigSpec) { - *out = *in - if in.DiskEncryptionSet != nil { - in, out := &in.DiskEncryptionSet, &out.DiskEncryptionSet - *out = new(AzureDiskEncryptionSet) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureCSIDriverConfigSpec. -func (in *AzureCSIDriverConfigSpec) DeepCopy() *AzureCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(AzureCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AzureDiskEncryptionSet) DeepCopyInto(out *AzureDiskEncryptionSet) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureDiskEncryptionSet. -func (in *AzureDiskEncryptionSet) DeepCopy() *AzureDiskEncryptionSet { - if in == nil { - return nil - } - out := new(AzureDiskEncryptionSet) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BGPManagedConfig) DeepCopyInto(out *BGPManagedConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BGPManagedConfig. -func (in *BGPManagedConfig) DeepCopy() *BGPManagedConfig { - if in == nil { - return nil - } - out := new(BGPManagedConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BootImageSkewEnforcementConfig) DeepCopyInto(out *BootImageSkewEnforcementConfig) { - *out = *in - out.Manual = in.Manual - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootImageSkewEnforcementConfig. -func (in *BootImageSkewEnforcementConfig) DeepCopy() *BootImageSkewEnforcementConfig { - if in == nil { - return nil - } - out := new(BootImageSkewEnforcementConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *BootImageSkewEnforcementStatus) DeepCopyInto(out *BootImageSkewEnforcementStatus) { - *out = *in - out.Automatic = in.Automatic - out.Manual = in.Manual - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BootImageSkewEnforcementStatus. -func (in *BootImageSkewEnforcementStatus) DeepCopy() *BootImageSkewEnforcementStatus { - if in == nil { - return nil - } - out := new(BootImageSkewEnforcementStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSIDriverConfigSpec) DeepCopyInto(out *CSIDriverConfigSpec) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSCSIDriverConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.Azure != nil { - in, out := &in.Azure, &out.Azure - *out = new(AzureCSIDriverConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.GCP != nil { - in, out := &in.GCP, &out.GCP - *out = new(GCPCSIDriverConfigSpec) - (*in).DeepCopyInto(*out) - } - if in.IBMCloud != nil { - in, out := &in.IBMCloud, &out.IBMCloud - *out = new(IBMCloudCSIDriverConfigSpec) - **out = **in - } - if in.VSphere != nil { - in, out := &in.VSphere, &out.VSphere - *out = new(VSphereCSIDriverConfigSpec) - (*in).DeepCopyInto(*out) - } - in.SecretsStore.DeepCopyInto(&out.SecretsStore) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSIDriverConfigSpec. -func (in *CSIDriverConfigSpec) DeepCopy() *CSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(CSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSISnapshotController) DeepCopyInto(out *CSISnapshotController) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotController. -func (in *CSISnapshotController) DeepCopy() *CSISnapshotController { - if in == nil { - return nil - } - out := new(CSISnapshotController) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSISnapshotController) 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 *CSISnapshotControllerList) DeepCopyInto(out *CSISnapshotControllerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CSISnapshotController, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerList. -func (in *CSISnapshotControllerList) DeepCopy() *CSISnapshotControllerList { - if in == nil { - return nil - } - out := new(CSISnapshotControllerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CSISnapshotControllerList) 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 *CSISnapshotControllerSpec) DeepCopyInto(out *CSISnapshotControllerSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerSpec. -func (in *CSISnapshotControllerSpec) DeepCopy() *CSISnapshotControllerSpec { - if in == nil { - return nil - } - out := new(CSISnapshotControllerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CSISnapshotControllerStatus) DeepCopyInto(out *CSISnapshotControllerStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CSISnapshotControllerStatus. -func (in *CSISnapshotControllerStatus) DeepCopy() *CSISnapshotControllerStatus { - if in == nil { - return nil - } - out := new(CSISnapshotControllerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Capability) DeepCopyInto(out *Capability) { - *out = *in - out.Visibility = in.Visibility - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Capability. -func (in *Capability) DeepCopy() *Capability { - if in == nil { - return nil - } - out := new(Capability) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CapabilityVisibility) DeepCopyInto(out *CapabilityVisibility) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CapabilityVisibility. -func (in *CapabilityVisibility) DeepCopy() *CapabilityVisibility { - if in == nil { - return nil - } - out := new(CapabilityVisibility) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClientTLS) DeepCopyInto(out *ClientTLS) { - *out = *in - out.ClientCA = in.ClientCA - if in.AllowedSubjectPatterns != nil { - in, out := &in.AllowedSubjectPatterns, &out.AllowedSubjectPatterns - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClientTLS. -func (in *ClientTLS) DeepCopy() *ClientTLS { - if in == nil { - return nil - } - out := new(ClientTLS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredential) DeepCopyInto(out *CloudCredential) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredential. -func (in *CloudCredential) DeepCopy() *CloudCredential { - if in == nil { - return nil - } - out := new(CloudCredential) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudCredential) 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 *CloudCredentialList) DeepCopyInto(out *CloudCredentialList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CloudCredential, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialList. -func (in *CloudCredentialList) DeepCopy() *CloudCredentialList { - if in == nil { - return nil - } - out := new(CloudCredentialList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CloudCredentialList) 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 *CloudCredentialSpec) DeepCopyInto(out *CloudCredentialSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialSpec. -func (in *CloudCredentialSpec) DeepCopy() *CloudCredentialSpec { - if in == nil { - return nil - } - out := new(CloudCredentialSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CloudCredentialStatus) DeepCopyInto(out *CloudCredentialStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CloudCredentialStatus. -func (in *CloudCredentialStatus) DeepCopy() *CloudCredentialStatus { - if in == nil { - return nil - } - out := new(CloudCredentialStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterBootImageAutomatic) DeepCopyInto(out *ClusterBootImageAutomatic) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBootImageAutomatic. -func (in *ClusterBootImageAutomatic) DeepCopy() *ClusterBootImageAutomatic { - if in == nil { - return nil - } - out := new(ClusterBootImageAutomatic) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterBootImageManual) DeepCopyInto(out *ClusterBootImageManual) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterBootImageManual. -func (in *ClusterBootImageManual) DeepCopy() *ClusterBootImageManual { - if in == nil { - return nil - } - out := new(ClusterBootImageManual) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCSIDriver) DeepCopyInto(out *ClusterCSIDriver) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriver. -func (in *ClusterCSIDriver) DeepCopy() *ClusterCSIDriver { - if in == nil { - return nil - } - out := new(ClusterCSIDriver) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterCSIDriver) 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 *ClusterCSIDriverList) DeepCopyInto(out *ClusterCSIDriverList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterCSIDriver, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverList. -func (in *ClusterCSIDriverList) DeepCopy() *ClusterCSIDriverList { - if in == nil { - return nil - } - out := new(ClusterCSIDriverList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterCSIDriverList) 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 *ClusterCSIDriverSpec) DeepCopyInto(out *ClusterCSIDriverSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - in.DriverConfig.DeepCopyInto(&out.DriverConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverSpec. -func (in *ClusterCSIDriverSpec) DeepCopy() *ClusterCSIDriverSpec { - if in == nil { - return nil - } - out := new(ClusterCSIDriverSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterCSIDriverStatus) DeepCopyInto(out *ClusterCSIDriverStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterCSIDriverStatus. -func (in *ClusterCSIDriverStatus) DeepCopy() *ClusterCSIDriverStatus { - if in == nil { - return nil - } - out := new(ClusterCSIDriverStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterNetworkEntry) DeepCopyInto(out *ClusterNetworkEntry) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNetworkEntry. -func (in *ClusterNetworkEntry) DeepCopy() *ClusterNetworkEntry { - if in == nil { - return nil - } - out := new(ClusterNetworkEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Config) DeepCopyInto(out *Config) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. -func (in *Config) DeepCopy() *Config { - if in == nil { - return nil - } - out := new(Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Config) 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 *ConfigList) DeepCopyInto(out *ConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Config, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList. -func (in *ConfigList) DeepCopy() *ConfigList { - if in == nil { - return nil - } - out := new(ConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigList) 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 *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 *ConfigSpec) DeepCopyInto(out *ConfigSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec. -func (in *ConfigSpec) DeepCopy() *ConfigSpec { - if in == nil { - return nil - } - out := new(ConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus. -func (in *ConfigStatus) DeepCopy() *ConfigStatus { - if in == nil { - return nil - } - out := new(ConfigStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Console) DeepCopyInto(out *Console) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Console. -func (in *Console) DeepCopy() *Console { - if in == nil { - return nil - } - out := new(Console) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Console) 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 *ConsoleConfigRoute) DeepCopyInto(out *ConsoleConfigRoute) { - *out = *in - out.Secret = in.Secret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleConfigRoute. -func (in *ConsoleConfigRoute) DeepCopy() *ConsoleConfigRoute { - if in == nil { - return nil - } - out := new(ConsoleConfigRoute) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleCustomization) DeepCopyInto(out *ConsoleCustomization) { - *out = *in - if in.Logos != nil { - in, out := &in.Logos, &out.Logos - *out = make([]Logo, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Capabilities != nil { - in, out := &in.Capabilities, &out.Capabilities - *out = make([]Capability, len(*in)) - copy(*out, *in) - } - out.CustomLogoFile = in.CustomLogoFile - in.DeveloperCatalog.DeepCopyInto(&out.DeveloperCatalog) - in.ProjectAccess.DeepCopyInto(&out.ProjectAccess) - in.QuickStarts.DeepCopyInto(&out.QuickStarts) - in.AddPage.DeepCopyInto(&out.AddPage) - if in.Perspectives != nil { - in, out := &in.Perspectives, &out.Perspectives - *out = make([]Perspective, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleCustomization. -func (in *ConsoleCustomization) DeepCopy() *ConsoleCustomization { - if in == nil { - return nil - } - out := new(ConsoleCustomization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleList) DeepCopyInto(out *ConsoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Console, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleList. -func (in *ConsoleList) DeepCopy() *ConsoleList { - if in == nil { - return nil - } - out := new(ConsoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConsoleList) 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 *ConsoleProviders) DeepCopyInto(out *ConsoleProviders) { - *out = *in - if in.Statuspage != nil { - in, out := &in.Statuspage, &out.Statuspage - *out = new(StatuspageProvider) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleProviders. -func (in *ConsoleProviders) DeepCopy() *ConsoleProviders { - if in == nil { - return nil - } - out := new(ConsoleProviders) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleSpec) DeepCopyInto(out *ConsoleSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - in.Customization.DeepCopyInto(&out.Customization) - in.Providers.DeepCopyInto(&out.Providers) - out.Route = in.Route - if in.Plugins != nil { - in, out := &in.Plugins, &out.Plugins - *out = make([]string, len(*in)) - copy(*out, *in) - } - out.Ingress = in.Ingress - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleSpec. -func (in *ConsoleSpec) DeepCopy() *ConsoleSpec { - if in == nil { - return nil - } - out := new(ConsoleSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConsoleStatus) DeepCopyInto(out *ConsoleStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsoleStatus. -func (in *ConsoleStatus) DeepCopy() *ConsoleStatus { - if in == nil { - return nil - } - out := new(ConsoleStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ContainerLoggingDestinationParameters) DeepCopyInto(out *ContainerLoggingDestinationParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ContainerLoggingDestinationParameters. -func (in *ContainerLoggingDestinationParameters) DeepCopy() *ContainerLoggingDestinationParameters { - if in == nil { - return nil - } - out := new(ContainerLoggingDestinationParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomSecretRotation) DeepCopyInto(out *CustomSecretRotation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomSecretRotation. -func (in *CustomSecretRotation) DeepCopy() *CustomSecretRotation { - if in == nil { - return nil - } - out := new(CustomSecretRotation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNS) DeepCopyInto(out *DNS) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNS. -func (in *DNS) DeepCopy() *DNS { - if in == nil { - return nil - } - out := new(DNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNS) 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 *DNSCache) DeepCopyInto(out *DNSCache) { - *out = *in - out.PositiveTTL = in.PositiveTTL - out.NegativeTTL = in.NegativeTTL - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSCache. -func (in *DNSCache) DeepCopy() *DNSCache { - if in == nil { - return nil - } - out := new(DNSCache) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSList) DeepCopyInto(out *DNSList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]DNS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSList. -func (in *DNSList) DeepCopy() *DNSList { - if in == nil { - return nil - } - out := new(DNSList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DNSList) 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 *DNSNodePlacement) DeepCopyInto(out *DNSNodePlacement) { - *out = *in - 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([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSNodePlacement. -func (in *DNSNodePlacement) DeepCopy() *DNSNodePlacement { - if in == nil { - return nil - } - out := new(DNSNodePlacement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSOverTLSConfig) DeepCopyInto(out *DNSOverTLSConfig) { - *out = *in - out.CABundle = in.CABundle - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSOverTLSConfig. -func (in *DNSOverTLSConfig) DeepCopy() *DNSOverTLSConfig { - if in == nil { - return nil - } - out := new(DNSOverTLSConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSSpec) DeepCopyInto(out *DNSSpec) { - *out = *in - if in.Servers != nil { - in, out := &in.Servers, &out.Servers - *out = make([]Server, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.UpstreamResolvers.DeepCopyInto(&out.UpstreamResolvers) - in.NodePlacement.DeepCopyInto(&out.NodePlacement) - out.Cache = in.Cache - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSSpec. -func (in *DNSSpec) DeepCopy() *DNSSpec { - if in == nil { - return nil - } - out := new(DNSSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSStatus) DeepCopyInto(out *DNSStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]OperatorCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSStatus. -func (in *DNSStatus) DeepCopy() *DNSStatus { - if in == nil { - return nil - } - out := new(DNSStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DNSTransportConfig) DeepCopyInto(out *DNSTransportConfig) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(DNSOverTLSConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSTransportConfig. -func (in *DNSTransportConfig) DeepCopy() *DNSTransportConfig { - if in == nil { - return nil - } - out := new(DNSTransportConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DefaultNetworkDefinition) DeepCopyInto(out *DefaultNetworkDefinition) { - *out = *in - if in.OpenShiftSDNConfig != nil { - in, out := &in.OpenShiftSDNConfig, &out.OpenShiftSDNConfig - *out = new(OpenShiftSDNConfig) - (*in).DeepCopyInto(*out) - } - if in.OVNKubernetesConfig != nil { - in, out := &in.OVNKubernetesConfig, &out.OVNKubernetesConfig - *out = new(OVNKubernetesConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DefaultNetworkDefinition. -func (in *DefaultNetworkDefinition) DeepCopy() *DefaultNetworkDefinition { - if in == nil { - return nil - } - out := new(DefaultNetworkDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeveloperConsoleCatalogCategory) DeepCopyInto(out *DeveloperConsoleCatalogCategory) { - *out = *in - in.DeveloperConsoleCatalogCategoryMeta.DeepCopyInto(&out.DeveloperConsoleCatalogCategoryMeta) - if in.Subcategories != nil { - in, out := &in.Subcategories, &out.Subcategories - *out = make([]DeveloperConsoleCatalogCategoryMeta, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCategory. -func (in *DeveloperConsoleCatalogCategory) DeepCopy() *DeveloperConsoleCatalogCategory { - if in == nil { - return nil - } - out := new(DeveloperConsoleCatalogCategory) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeveloperConsoleCatalogCategoryMeta) DeepCopyInto(out *DeveloperConsoleCatalogCategoryMeta) { - *out = *in - if in.Tags != nil { - in, out := &in.Tags, &out.Tags - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCategoryMeta. -func (in *DeveloperConsoleCatalogCategoryMeta) DeepCopy() *DeveloperConsoleCatalogCategoryMeta { - if in == nil { - return nil - } - out := new(DeveloperConsoleCatalogCategoryMeta) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeveloperConsoleCatalogCustomization) DeepCopyInto(out *DeveloperConsoleCatalogCustomization) { - *out = *in - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]DeveloperConsoleCatalogCategory, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Types.DeepCopyInto(&out.Types) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogCustomization. -func (in *DeveloperConsoleCatalogCustomization) DeepCopy() *DeveloperConsoleCatalogCustomization { - if in == nil { - return nil - } - out := new(DeveloperConsoleCatalogCustomization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeveloperConsoleCatalogTypes) DeepCopyInto(out *DeveloperConsoleCatalogTypes) { - *out = *in - if in.Enabled != nil { - in, out := &in.Enabled, &out.Enabled - *out = new([]string) - if **in != nil { - in, out := *in, *out - *out = make([]string, len(*in)) - copy(*out, *in) - } - } - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = new([]string) - if **in != nil { - in, out := *in, *out - *out = make([]string, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeveloperConsoleCatalogTypes. -func (in *DeveloperConsoleCatalogTypes) DeepCopy() *DeveloperConsoleCatalogTypes { - if in == nil { - return nil - } - out := new(DeveloperConsoleCatalogTypes) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EgressIPConfig) DeepCopyInto(out *EgressIPConfig) { - *out = *in - if in.ReachabilityTotalTimeoutSeconds != nil { - in, out := &in.ReachabilityTotalTimeoutSeconds, &out.ReachabilityTotalTimeoutSeconds - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EgressIPConfig. -func (in *EgressIPConfig) DeepCopy() *EgressIPConfig { - if in == nil { - return nil - } - out := new(EgressIPConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPublishingStrategy) DeepCopyInto(out *EndpointPublishingStrategy) { - *out = *in - if in.LoadBalancer != nil { - in, out := &in.LoadBalancer, &out.LoadBalancer - *out = new(LoadBalancerStrategy) - (*in).DeepCopyInto(*out) - } - if in.HostNetwork != nil { - in, out := &in.HostNetwork, &out.HostNetwork - *out = new(HostNetworkStrategy) - **out = **in - } - if in.Private != nil { - in, out := &in.Private, &out.Private - *out = new(PrivateStrategy) - **out = **in - } - if in.NodePort != nil { - in, out := &in.NodePort, &out.NodePort - *out = new(NodePortStrategy) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPublishingStrategy. -func (in *EndpointPublishingStrategy) DeepCopy() *EndpointPublishingStrategy { - if in == nil { - return nil - } - out := new(EndpointPublishingStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Etcd) DeepCopyInto(out *Etcd) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Etcd. -func (in *Etcd) DeepCopy() *Etcd { - if in == nil { - return nil - } - out := new(Etcd) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Etcd) 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 *EtcdList) DeepCopyInto(out *EtcdList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Etcd, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdList. -func (in *EtcdList) DeepCopy() *EtcdList { - if in == nil { - return nil - } - out := new(EtcdList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EtcdList) 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 *EtcdSpec) DeepCopyInto(out *EtcdSpec) { - *out = *in - in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdSpec. -func (in *EtcdSpec) DeepCopy() *EtcdSpec { - if in == nil { - return nil - } - out := new(EtcdSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdStatus) DeepCopyInto(out *EtcdStatus) { - *out = *in - in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdStatus. -func (in *EtcdStatus) DeepCopy() *EtcdStatus { - if in == nil { - return nil - } - out := new(EtcdStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExportNetworkFlows) DeepCopyInto(out *ExportNetworkFlows) { - *out = *in - if in.NetFlow != nil { - in, out := &in.NetFlow, &out.NetFlow - *out = new(NetFlowConfig) - (*in).DeepCopyInto(*out) - } - if in.SFlow != nil { - in, out := &in.SFlow, &out.SFlow - *out = new(SFlowConfig) - (*in).DeepCopyInto(*out) - } - if in.IPFIX != nil { - in, out := &in.IPFIX, &out.IPFIX - *out = new(IPFIXConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportNetworkFlows. -func (in *ExportNetworkFlows) DeepCopy() *ExportNetworkFlows { - if in == nil { - return nil - } - out := new(ExportNetworkFlows) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FeaturesMigration) DeepCopyInto(out *FeaturesMigration) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FeaturesMigration. -func (in *FeaturesMigration) DeepCopy() *FeaturesMigration { - if in == nil { - return nil - } - out := new(FeaturesMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FileReferenceSource) DeepCopyInto(out *FileReferenceSource) { - *out = *in - if in.ConfigMap != nil { - in, out := &in.ConfigMap, &out.ConfigMap - *out = new(ConfigMapFileReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileReferenceSource. -func (in *FileReferenceSource) DeepCopy() *FileReferenceSource { - if in == nil { - return nil - } - out := new(FileReferenceSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ForwardPlugin) DeepCopyInto(out *ForwardPlugin) { - *out = *in - if in.Upstreams != nil { - in, out := &in.Upstreams, &out.Upstreams - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.TransportConfig.DeepCopyInto(&out.TransportConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ForwardPlugin. -func (in *ForwardPlugin) DeepCopy() *ForwardPlugin { - if in == nil { - return nil - } - out := new(ForwardPlugin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPCSIDriverConfigSpec) DeepCopyInto(out *GCPCSIDriverConfigSpec) { - *out = *in - if in.KMSKey != nil { - in, out := &in.KMSKey, &out.KMSKey - *out = new(GCPKMSKeyReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPCSIDriverConfigSpec. -func (in *GCPCSIDriverConfigSpec) DeepCopy() *GCPCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(GCPCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPKMSKeyReference) DeepCopyInto(out *GCPKMSKeyReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPKMSKeyReference. -func (in *GCPKMSKeyReference) DeepCopy() *GCPKMSKeyReference { - if in == nil { - return nil - } - out := new(GCPKMSKeyReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GCPLoadBalancerParameters) DeepCopyInto(out *GCPLoadBalancerParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCPLoadBalancerParameters. -func (in *GCPLoadBalancerParameters) DeepCopy() *GCPLoadBalancerParameters { - if in == nil { - return nil - } - out := new(GCPLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GatewayConfig) DeepCopyInto(out *GatewayConfig) { - *out = *in - out.IPv4 = in.IPv4 - out.IPv6 = in.IPv6 - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayConfig. -func (in *GatewayConfig) DeepCopy() *GatewayConfig { - if in == nil { - return nil - } - out := new(GatewayConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GatherStatus) DeepCopyInto(out *GatherStatus) { - *out = *in - in.LastGatherTime.DeepCopyInto(&out.LastGatherTime) - out.LastGatherDuration = in.LastGatherDuration - if in.Gatherers != nil { - in, out := &in.Gatherers, &out.Gatherers - *out = make([]GathererStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatherStatus. -func (in *GatherStatus) DeepCopy() *GatherStatus { - if in == nil { - return nil - } - out := new(GatherStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GathererStatus) DeepCopyInto(out *GathererStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.LastGatherDuration = in.LastGatherDuration - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GathererStatus. -func (in *GathererStatus) DeepCopy() *GathererStatus { - if in == nil { - return nil - } - out := new(GathererStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenerationStatus) DeepCopyInto(out *GenerationStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerationStatus. -func (in *GenerationStatus) DeepCopy() *GenerationStatus { - if in == nil { - return nil - } - out := new(GenerationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTTPCompressionPolicy) DeepCopyInto(out *HTTPCompressionPolicy) { - *out = *in - if in.MimeTypes != nil { - in, out := &in.MimeTypes, &out.MimeTypes - *out = make([]CompressionMIMEType, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPCompressionPolicy. -func (in *HTTPCompressionPolicy) DeepCopy() *HTTPCompressionPolicy { - if in == nil { - return nil - } - out := new(HTTPCompressionPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HealthCheck) DeepCopyInto(out *HealthCheck) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HealthCheck. -func (in *HealthCheck) DeepCopy() *HealthCheck { - if in == nil { - return nil - } - out := new(HealthCheck) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HostNetworkStrategy) DeepCopyInto(out *HostNetworkStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostNetworkStrategy. -func (in *HostNetworkStrategy) DeepCopy() *HostNetworkStrategy { - if in == nil { - return nil - } - out := new(HostNetworkStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HybridOverlayConfig) DeepCopyInto(out *HybridOverlayConfig) { - *out = *in - if in.HybridClusterNetwork != nil { - in, out := &in.HybridClusterNetwork, &out.HybridClusterNetwork - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.HybridOverlayVXLANPort != nil { - in, out := &in.HybridOverlayVXLANPort, &out.HybridOverlayVXLANPort - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HybridOverlayConfig. -func (in *HybridOverlayConfig) DeepCopy() *HybridOverlayConfig { - if in == nil { - return nil - } - out := new(HybridOverlayConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IBMCloudCSIDriverConfigSpec) DeepCopyInto(out *IBMCloudCSIDriverConfigSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMCloudCSIDriverConfigSpec. -func (in *IBMCloudCSIDriverConfigSpec) DeepCopy() *IBMCloudCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(IBMCloudCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IBMLoadBalancerParameters) DeepCopyInto(out *IBMLoadBalancerParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IBMLoadBalancerParameters. -func (in *IBMLoadBalancerParameters) DeepCopy() *IBMLoadBalancerParameters { - if in == nil { - return nil - } - out := new(IBMLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPAMConfig) DeepCopyInto(out *IPAMConfig) { - *out = *in - if in.StaticIPAMConfig != nil { - in, out := &in.StaticIPAMConfig, &out.StaticIPAMConfig - *out = new(StaticIPAMConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPAMConfig. -func (in *IPAMConfig) DeepCopy() *IPAMConfig { - if in == nil { - return nil - } - out := new(IPAMConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPFIXConfig) DeepCopyInto(out *IPFIXConfig) { - *out = *in - if in.Collectors != nil { - in, out := &in.Collectors, &out.Collectors - *out = make([]IPPort, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPFIXConfig. -func (in *IPFIXConfig) DeepCopy() *IPFIXConfig { - if in == nil { - return nil - } - out := new(IPFIXConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPsecConfig) DeepCopyInto(out *IPsecConfig) { - *out = *in - if in.Full != nil { - in, out := &in.Full, &out.Full - *out = new(IPsecFullModeConfig) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPsecConfig. -func (in *IPsecConfig) DeepCopy() *IPsecConfig { - if in == nil { - return nil - } - out := new(IPsecConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPsecFullModeConfig) DeepCopyInto(out *IPsecFullModeConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPsecFullModeConfig. -func (in *IPsecFullModeConfig) DeepCopy() *IPsecFullModeConfig { - if in == nil { - return nil - } - out := new(IPsecFullModeConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv4GatewayConfig) DeepCopyInto(out *IPv4GatewayConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4GatewayConfig. -func (in *IPv4GatewayConfig) DeepCopy() *IPv4GatewayConfig { - if in == nil { - return nil - } - out := new(IPv4GatewayConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv4OVNKubernetesConfig) DeepCopyInto(out *IPv4OVNKubernetesConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv4OVNKubernetesConfig. -func (in *IPv4OVNKubernetesConfig) DeepCopy() *IPv4OVNKubernetesConfig { - if in == nil { - return nil - } - out := new(IPv4OVNKubernetesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv6GatewayConfig) DeepCopyInto(out *IPv6GatewayConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv6GatewayConfig. -func (in *IPv6GatewayConfig) DeepCopy() *IPv6GatewayConfig { - if in == nil { - return nil - } - out := new(IPv6GatewayConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IPv6OVNKubernetesConfig) DeepCopyInto(out *IPv6OVNKubernetesConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IPv6OVNKubernetesConfig. -func (in *IPv6OVNKubernetesConfig) DeepCopy() *IPv6OVNKubernetesConfig { - if in == nil { - return nil - } - out := new(IPv6OVNKubernetesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Ingress) DeepCopyInto(out *Ingress) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ingress. -func (in *Ingress) DeepCopy() *Ingress { - if in == nil { - return nil - } - out := new(Ingress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressController) DeepCopyInto(out *IngressController) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressController. -func (in *IngressController) DeepCopy() *IngressController { - if in == nil { - return nil - } - out := new(IngressController) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IngressController) 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 *IngressControllerCaptureHTTPCookie) DeepCopyInto(out *IngressControllerCaptureHTTPCookie) { - *out = *in - out.IngressControllerCaptureHTTPCookieUnion = in.IngressControllerCaptureHTTPCookieUnion - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPCookie. -func (in *IngressControllerCaptureHTTPCookie) DeepCopy() *IngressControllerCaptureHTTPCookie { - if in == nil { - return nil - } - out := new(IngressControllerCaptureHTTPCookie) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerCaptureHTTPCookieUnion) DeepCopyInto(out *IngressControllerCaptureHTTPCookieUnion) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPCookieUnion. -func (in *IngressControllerCaptureHTTPCookieUnion) DeepCopy() *IngressControllerCaptureHTTPCookieUnion { - if in == nil { - return nil - } - out := new(IngressControllerCaptureHTTPCookieUnion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerCaptureHTTPHeader) DeepCopyInto(out *IngressControllerCaptureHTTPHeader) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPHeader. -func (in *IngressControllerCaptureHTTPHeader) DeepCopy() *IngressControllerCaptureHTTPHeader { - if in == nil { - return nil - } - out := new(IngressControllerCaptureHTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerCaptureHTTPHeaders) DeepCopyInto(out *IngressControllerCaptureHTTPHeaders) { - *out = *in - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]IngressControllerCaptureHTTPHeader, len(*in)) - copy(*out, *in) - } - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = make([]IngressControllerCaptureHTTPHeader, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerCaptureHTTPHeaders. -func (in *IngressControllerCaptureHTTPHeaders) DeepCopy() *IngressControllerCaptureHTTPHeaders { - if in == nil { - return nil - } - out := new(IngressControllerCaptureHTTPHeaders) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerHTTPHeader) DeepCopyInto(out *IngressControllerHTTPHeader) { - *out = *in - in.Action.DeepCopyInto(&out.Action) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPHeader. -func (in *IngressControllerHTTPHeader) DeepCopy() *IngressControllerHTTPHeader { - if in == nil { - return nil - } - out := new(IngressControllerHTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerHTTPHeaderActionUnion) DeepCopyInto(out *IngressControllerHTTPHeaderActionUnion) { - *out = *in - if in.Set != nil { - in, out := &in.Set, &out.Set - *out = new(IngressControllerSetHTTPHeader) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPHeaderActionUnion. -func (in *IngressControllerHTTPHeaderActionUnion) DeepCopy() *IngressControllerHTTPHeaderActionUnion { - if in == nil { - return nil - } - out := new(IngressControllerHTTPHeaderActionUnion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerHTTPHeaderActions) DeepCopyInto(out *IngressControllerHTTPHeaderActions) { - *out = *in - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = make([]IngressControllerHTTPHeader, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]IngressControllerHTTPHeader, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPHeaderActions. -func (in *IngressControllerHTTPHeaderActions) DeepCopy() *IngressControllerHTTPHeaderActions { - if in == nil { - return nil - } - out := new(IngressControllerHTTPHeaderActions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerHTTPHeaders) DeepCopyInto(out *IngressControllerHTTPHeaders) { - *out = *in - out.UniqueId = in.UniqueId - if in.HeaderNameCaseAdjustments != nil { - in, out := &in.HeaderNameCaseAdjustments, &out.HeaderNameCaseAdjustments - *out = make([]IngressControllerHTTPHeaderNameCaseAdjustment, len(*in)) - copy(*out, *in) - } - in.Actions.DeepCopyInto(&out.Actions) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPHeaders. -func (in *IngressControllerHTTPHeaders) DeepCopy() *IngressControllerHTTPHeaders { - if in == nil { - return nil - } - out := new(IngressControllerHTTPHeaders) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerHTTPUniqueIdHeaderPolicy) DeepCopyInto(out *IngressControllerHTTPUniqueIdHeaderPolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerHTTPUniqueIdHeaderPolicy. -func (in *IngressControllerHTTPUniqueIdHeaderPolicy) DeepCopy() *IngressControllerHTTPUniqueIdHeaderPolicy { - if in == nil { - return nil - } - out := new(IngressControllerHTTPUniqueIdHeaderPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerList) DeepCopyInto(out *IngressControllerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]IngressController, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerList. -func (in *IngressControllerList) DeepCopy() *IngressControllerList { - if in == nil { - return nil - } - out := new(IngressControllerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IngressControllerList) 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 *IngressControllerLogging) DeepCopyInto(out *IngressControllerLogging) { - *out = *in - if in.Access != nil { - in, out := &in.Access, &out.Access - *out = new(AccessLogging) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerLogging. -func (in *IngressControllerLogging) DeepCopy() *IngressControllerLogging { - if in == nil { - return nil - } - out := new(IngressControllerLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerSetHTTPHeader) DeepCopyInto(out *IngressControllerSetHTTPHeader) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerSetHTTPHeader. -func (in *IngressControllerSetHTTPHeader) DeepCopy() *IngressControllerSetHTTPHeader { - if in == nil { - return nil - } - out := new(IngressControllerSetHTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerSpec) DeepCopyInto(out *IngressControllerSpec) { - *out = *in - out.HttpErrorCodePages = in.HttpErrorCodePages - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.EndpointPublishingStrategy != nil { - in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy - *out = new(EndpointPublishingStrategy) - (*in).DeepCopyInto(*out) - } - if in.DefaultCertificate != nil { - in, out := &in.DefaultCertificate, &out.DefaultCertificate - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.RouteSelector != nil { - in, out := &in.RouteSelector, &out.RouteSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.NodePlacement != nil { - in, out := &in.NodePlacement, &out.NodePlacement - *out = new(NodePlacement) - (*in).DeepCopyInto(*out) - } - if in.TLSSecurityProfile != nil { - in, out := &in.TLSSecurityProfile, &out.TLSSecurityProfile - *out = new(configv1.TLSSecurityProfile) - (*in).DeepCopyInto(*out) - } - in.ClientTLS.DeepCopyInto(&out.ClientTLS) - if in.RouteAdmission != nil { - in, out := &in.RouteAdmission, &out.RouteAdmission - *out = new(RouteAdmissionPolicy) - **out = **in - } - if in.Logging != nil { - in, out := &in.Logging, &out.Logging - *out = new(IngressControllerLogging) - (*in).DeepCopyInto(*out) - } - if in.HTTPHeaders != nil { - in, out := &in.HTTPHeaders, &out.HTTPHeaders - *out = new(IngressControllerHTTPHeaders) - (*in).DeepCopyInto(*out) - } - in.TuningOptions.DeepCopyInto(&out.TuningOptions) - in.UnsupportedConfigOverrides.DeepCopyInto(&out.UnsupportedConfigOverrides) - in.HTTPCompression.DeepCopyInto(&out.HTTPCompression) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerSpec. -func (in *IngressControllerSpec) DeepCopy() *IngressControllerSpec { - if in == nil { - return nil - } - out := new(IngressControllerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerStatus) DeepCopyInto(out *IngressControllerStatus) { - *out = *in - if in.EndpointPublishingStrategy != nil { - in, out := &in.EndpointPublishingStrategy, &out.EndpointPublishingStrategy - *out = new(EndpointPublishingStrategy) - (*in).DeepCopyInto(*out) - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]OperatorCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.TLSProfile != nil { - in, out := &in.TLSProfile, &out.TLSProfile - *out = new(configv1.TLSProfileSpec) - (*in).DeepCopyInto(*out) - } - if in.NamespaceSelector != nil { - in, out := &in.NamespaceSelector, &out.NamespaceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.RouteSelector != nil { - in, out := &in.RouteSelector, &out.RouteSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerStatus. -func (in *IngressControllerStatus) DeepCopy() *IngressControllerStatus { - if in == nil { - return nil - } - out := new(IngressControllerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressControllerTuningOptions) DeepCopyInto(out *IngressControllerTuningOptions) { - *out = *in - if in.ClientTimeout != nil { - in, out := &in.ClientTimeout, &out.ClientTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.ClientFinTimeout != nil { - in, out := &in.ClientFinTimeout, &out.ClientFinTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.ServerTimeout != nil { - in, out := &in.ServerTimeout, &out.ServerTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.ServerFinTimeout != nil { - in, out := &in.ServerFinTimeout, &out.ServerFinTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.TunnelTimeout != nil { - in, out := &in.TunnelTimeout, &out.TunnelTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.ConnectTimeout != nil { - in, out := &in.ConnectTimeout, &out.ConnectTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.HTTPKeepAliveTimeout != nil { - in, out := &in.HTTPKeepAliveTimeout, &out.HTTPKeepAliveTimeout - *out = new(metav1.Duration) - **out = **in - } - if in.TLSInspectDelay != nil { - in, out := &in.TLSInspectDelay, &out.TLSInspectDelay - *out = new(metav1.Duration) - **out = **in - } - if in.HealthCheckInterval != nil { - in, out := &in.HealthCheckInterval, &out.HealthCheckInterval - *out = new(metav1.Duration) - **out = **in - } - out.ReloadInterval = in.ReloadInterval - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressControllerTuningOptions. -func (in *IngressControllerTuningOptions) DeepCopy() *IngressControllerTuningOptions { - if in == nil { - return nil - } - out := new(IngressControllerTuningOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsOperator) DeepCopyInto(out *InsightsOperator) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsOperator. -func (in *InsightsOperator) DeepCopy() *InsightsOperator { - if in == nil { - return nil - } - out := new(InsightsOperator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsOperator) 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 *InsightsOperatorList) DeepCopyInto(out *InsightsOperatorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]InsightsOperator, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsOperatorList. -func (in *InsightsOperatorList) DeepCopy() *InsightsOperatorList { - if in == nil { - return nil - } - out := new(InsightsOperatorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *InsightsOperatorList) 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 *InsightsOperatorSpec) DeepCopyInto(out *InsightsOperatorSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsOperatorSpec. -func (in *InsightsOperatorSpec) DeepCopy() *InsightsOperatorSpec { - if in == nil { - return nil - } - out := new(InsightsOperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsOperatorStatus) DeepCopyInto(out *InsightsOperatorStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - in.GatherStatus.DeepCopyInto(&out.GatherStatus) - in.InsightsReport.DeepCopyInto(&out.InsightsReport) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsOperatorStatus. -func (in *InsightsOperatorStatus) DeepCopy() *InsightsOperatorStatus { - if in == nil { - return nil - } - out := new(InsightsOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *InsightsReport) DeepCopyInto(out *InsightsReport) { - *out = *in - in.DownloadedAt.DeepCopyInto(&out.DownloadedAt) - if in.HealthChecks != nil { - in, out := &in.HealthChecks, &out.HealthChecks - *out = make([]HealthCheck, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InsightsReport. -func (in *InsightsReport) DeepCopy() *InsightsReport { - if in == nil { - return nil - } - out := new(InsightsReport) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IrreconcilableValidationOverrides) DeepCopyInto(out *IrreconcilableValidationOverrides) { - *out = *in - if in.Storage != nil { - in, out := &in.Storage, &out.Storage - *out = make([]IrreconcilableValidationOverridesStorage, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IrreconcilableValidationOverrides. -func (in *IrreconcilableValidationOverrides) DeepCopy() *IrreconcilableValidationOverrides { - if in == nil { - return nil - } - out := new(IrreconcilableValidationOverrides) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSEncryptionStatus) DeepCopyInto(out *KMSEncryptionStatus) { - *out = *in - if in.HealthReports != nil { - in, out := &in.HealthReports, &out.HealthReports - *out = make([]KMSPluginHealthReport, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSEncryptionStatus. -func (in *KMSEncryptionStatus) DeepCopy() *KMSEncryptionStatus { - if in == nil { - return nil - } - out := new(KMSEncryptionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KMSPluginHealthReport) DeepCopyInto(out *KMSPluginHealthReport) { - *out = *in - in.LastCheckedTime.DeepCopyInto(&out.LastCheckedTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KMSPluginHealthReport. -func (in *KMSPluginHealthReport) DeepCopy() *KMSPluginHealthReport { - if in == nil { - return nil - } - out := new(KMSPluginHealthReport) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeAPIServer) DeepCopyInto(out *KubeAPIServer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServer. -func (in *KubeAPIServer) DeepCopy() *KubeAPIServer { - if in == nil { - return nil - } - out := new(KubeAPIServer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeAPIServer) 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 *KubeAPIServerList) DeepCopyInto(out *KubeAPIServerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KubeAPIServer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerList. -func (in *KubeAPIServerList) DeepCopy() *KubeAPIServerList { - if in == nil { - return nil - } - out := new(KubeAPIServerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeAPIServerList) 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 *KubeAPIServerSpec) DeepCopyInto(out *KubeAPIServerSpec) { - *out = *in - in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerSpec. -func (in *KubeAPIServerSpec) DeepCopy() *KubeAPIServerSpec { - if in == nil { - return nil - } - out := new(KubeAPIServerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeAPIServerStatus) DeepCopyInto(out *KubeAPIServerStatus) { - *out = *in - in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus) - if in.ServiceAccountIssuers != nil { - in, out := &in.ServiceAccountIssuers, &out.ServiceAccountIssuers - *out = make([]ServiceAccountIssuerStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.EncryptionStatus.DeepCopyInto(&out.EncryptionStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeAPIServerStatus. -func (in *KubeAPIServerStatus) DeepCopy() *KubeAPIServerStatus { - if in == nil { - return nil - } - out := new(KubeAPIServerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeControllerManager) DeepCopyInto(out *KubeControllerManager) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManager. -func (in *KubeControllerManager) DeepCopy() *KubeControllerManager { - if in == nil { - return nil - } - out := new(KubeControllerManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeControllerManager) 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 *KubeControllerManagerList) DeepCopyInto(out *KubeControllerManagerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KubeControllerManager, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerList. -func (in *KubeControllerManagerList) DeepCopy() *KubeControllerManagerList { - if in == nil { - return nil - } - out := new(KubeControllerManagerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeControllerManagerList) 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 *KubeControllerManagerSpec) DeepCopyInto(out *KubeControllerManagerSpec) { - *out = *in - in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerSpec. -func (in *KubeControllerManagerSpec) DeepCopy() *KubeControllerManagerSpec { - if in == nil { - return nil - } - out := new(KubeControllerManagerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeControllerManagerStatus) DeepCopyInto(out *KubeControllerManagerStatus) { - *out = *in - in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeControllerManagerStatus. -func (in *KubeControllerManagerStatus) DeepCopy() *KubeControllerManagerStatus { - if in == nil { - return nil - } - out := new(KubeControllerManagerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeScheduler) DeepCopyInto(out *KubeScheduler) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeScheduler. -func (in *KubeScheduler) DeepCopy() *KubeScheduler { - if in == nil { - return nil - } - out := new(KubeScheduler) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeScheduler) 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 *KubeSchedulerList) DeepCopyInto(out *KubeSchedulerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KubeScheduler, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerList. -func (in *KubeSchedulerList) DeepCopy() *KubeSchedulerList { - if in == nil { - return nil - } - out := new(KubeSchedulerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeSchedulerList) 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 *KubeSchedulerSpec) DeepCopyInto(out *KubeSchedulerSpec) { - *out = *in - in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerSpec. -func (in *KubeSchedulerSpec) DeepCopy() *KubeSchedulerSpec { - if in == nil { - return nil - } - out := new(KubeSchedulerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeSchedulerStatus) DeepCopyInto(out *KubeSchedulerStatus) { - *out = *in - in.StaticPodOperatorStatus.DeepCopyInto(&out.StaticPodOperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeSchedulerStatus. -func (in *KubeSchedulerStatus) DeepCopy() *KubeSchedulerStatus { - if in == nil { - return nil - } - out := new(KubeSchedulerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeStorageVersionMigrator) DeepCopyInto(out *KubeStorageVersionMigrator) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStorageVersionMigrator. -func (in *KubeStorageVersionMigrator) DeepCopy() *KubeStorageVersionMigrator { - if in == nil { - return nil - } - out := new(KubeStorageVersionMigrator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeStorageVersionMigrator) 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 *KubeStorageVersionMigratorList) DeepCopyInto(out *KubeStorageVersionMigratorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]KubeStorageVersionMigrator, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStorageVersionMigratorList. -func (in *KubeStorageVersionMigratorList) DeepCopy() *KubeStorageVersionMigratorList { - if in == nil { - return nil - } - out := new(KubeStorageVersionMigratorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KubeStorageVersionMigratorList) 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 *KubeStorageVersionMigratorSpec) DeepCopyInto(out *KubeStorageVersionMigratorSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStorageVersionMigratorSpec. -func (in *KubeStorageVersionMigratorSpec) DeepCopy() *KubeStorageVersionMigratorSpec { - if in == nil { - return nil - } - out := new(KubeStorageVersionMigratorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubeStorageVersionMigratorStatus) DeepCopyInto(out *KubeStorageVersionMigratorStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeStorageVersionMigratorStatus. -func (in *KubeStorageVersionMigratorStatus) DeepCopy() *KubeStorageVersionMigratorStatus { - if in == nil { - return nil - } - out := new(KubeStorageVersionMigratorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoadBalancerStrategy) DeepCopyInto(out *LoadBalancerStrategy) { - *out = *in - if in.AllowedSourceRanges != nil { - in, out := &in.AllowedSourceRanges, &out.AllowedSourceRanges - *out = make([]CIDR, len(*in)) - copy(*out, *in) - } - if in.ProviderParameters != nil { - in, out := &in.ProviderParameters, &out.ProviderParameters - *out = new(ProviderLoadBalancerParameters) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoadBalancerStrategy. -func (in *LoadBalancerStrategy) DeepCopy() *LoadBalancerStrategy { - if in == nil { - return nil - } - out := new(LoadBalancerStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoggingDestination) DeepCopyInto(out *LoggingDestination) { - *out = *in - if in.Syslog != nil { - in, out := &in.Syslog, &out.Syslog - *out = new(SyslogLoggingDestinationParameters) - **out = **in - } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(ContainerLoggingDestinationParameters) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingDestination. -func (in *LoggingDestination) DeepCopy() *LoggingDestination { - if in == nil { - return nil - } - out := new(LoggingDestination) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Logo) DeepCopyInto(out *Logo) { - *out = *in - if in.Themes != nil { - in, out := &in.Themes, &out.Themes - *out = make([]Theme, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Logo. -func (in *Logo) DeepCopy() *Logo { - if in == nil { - return nil - } - out := new(Logo) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MTUMigration) DeepCopyInto(out *MTUMigration) { - *out = *in - if in.Network != nil { - in, out := &in.Network, &out.Network - *out = new(MTUMigrationValues) - (*in).DeepCopyInto(*out) - } - if in.Machine != nil { - in, out := &in.Machine, &out.Machine - *out = new(MTUMigrationValues) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTUMigration. -func (in *MTUMigration) DeepCopy() *MTUMigration { - if in == nil { - return nil - } - out := new(MTUMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MTUMigrationValues) DeepCopyInto(out *MTUMigrationValues) { - *out = *in - if in.To != nil { - in, out := &in.To, &out.To - *out = new(uint32) - **out = **in - } - if in.From != nil { - in, out := &in.From, &out.From - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MTUMigrationValues. -func (in *MTUMigrationValues) DeepCopy() *MTUMigrationValues { - if in == nil { - return nil - } - out := new(MTUMigrationValues) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineConfiguration) DeepCopyInto(out *MachineConfiguration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfiguration. -func (in *MachineConfiguration) DeepCopy() *MachineConfiguration { - if in == nil { - return nil - } - out := new(MachineConfiguration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineConfiguration) 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 *MachineConfigurationList) DeepCopyInto(out *MachineConfigurationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]MachineConfiguration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationList. -func (in *MachineConfigurationList) DeepCopy() *MachineConfigurationList { - if in == nil { - return nil - } - out := new(MachineConfigurationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *MachineConfigurationList) 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 *MachineConfigurationSpec) DeepCopyInto(out *MachineConfigurationSpec) { - *out = *in - in.StaticPodOperatorSpec.DeepCopyInto(&out.StaticPodOperatorSpec) - in.ManagedBootImages.DeepCopyInto(&out.ManagedBootImages) - in.NodeDisruptionPolicy.DeepCopyInto(&out.NodeDisruptionPolicy) - in.IrreconcilableValidationOverrides.DeepCopyInto(&out.IrreconcilableValidationOverrides) - out.BootImageSkewEnforcement = in.BootImageSkewEnforcement - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationSpec. -func (in *MachineConfigurationSpec) DeepCopy() *MachineConfigurationSpec { - if in == nil { - return nil - } - out := new(MachineConfigurationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineConfigurationStatus) DeepCopyInto(out *MachineConfigurationStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]metav1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.NodeDisruptionPolicyStatus.DeepCopyInto(&out.NodeDisruptionPolicyStatus) - in.ManagedBootImagesStatus.DeepCopyInto(&out.ManagedBootImagesStatus) - out.BootImageSkewEnforcementStatus = in.BootImageSkewEnforcementStatus - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineConfigurationStatus. -func (in *MachineConfigurationStatus) DeepCopy() *MachineConfigurationStatus { - if in == nil { - return nil - } - out := new(MachineConfigurationStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineManager) DeepCopyInto(out *MachineManager) { - *out = *in - in.Selection.DeepCopyInto(&out.Selection) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineManager. -func (in *MachineManager) DeepCopy() *MachineManager { - if in == nil { - return nil - } - out := new(MachineManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MachineManagerSelector) DeepCopyInto(out *MachineManagerSelector) { - *out = *in - if in.Partial != nil { - in, out := &in.Partial, &out.Partial - *out = new(PartialSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MachineManagerSelector. -func (in *MachineManagerSelector) DeepCopy() *MachineManagerSelector { - if in == nil { - return nil - } - out := new(MachineManagerSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedBootImages) DeepCopyInto(out *ManagedBootImages) { - *out = *in - if in.MachineManagers != nil { - in, out := &in.MachineManagers, &out.MachineManagers - *out = make([]MachineManager, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedBootImages. -func (in *ManagedBootImages) DeepCopy() *ManagedBootImages { - if in == nil { - return nil - } - out := new(ManagedBootImages) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ManagedTokenRequests) DeepCopyInto(out *ManagedTokenRequests) { - *out = *in - if in.Audiences != nil { - in, out := &in.Audiences, &out.Audiences - *out = new([]SecretsStoreTokenRequest) - if **in != nil { - in, out := *in, *out - *out = make([]SecretsStoreTokenRequest, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedTokenRequests. -func (in *ManagedTokenRequests) DeepCopy() *ManagedTokenRequests { - if in == nil { - return nil - } - out := new(ManagedTokenRequests) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyOperatorResource) DeepCopyInto(out *MyOperatorResource) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyOperatorResource. -func (in *MyOperatorResource) DeepCopy() *MyOperatorResource { - if in == nil { - return nil - } - out := new(MyOperatorResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyOperatorResourceSpec) DeepCopyInto(out *MyOperatorResourceSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyOperatorResourceSpec. -func (in *MyOperatorResourceSpec) DeepCopy() *MyOperatorResourceSpec { - if in == nil { - return nil - } - out := new(MyOperatorResourceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MyOperatorResourceStatus) DeepCopyInto(out *MyOperatorResourceStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MyOperatorResourceStatus. -func (in *MyOperatorResourceStatus) DeepCopy() *MyOperatorResourceStatus { - if in == nil { - return nil - } - out := new(MyOperatorResourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetFlowConfig) DeepCopyInto(out *NetFlowConfig) { - *out = *in - if in.Collectors != nil { - in, out := &in.Collectors, &out.Collectors - *out = make([]IPPort, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetFlowConfig. -func (in *NetFlowConfig) DeepCopy() *NetFlowConfig { - if in == nil { - return nil - } - out := new(NetFlowConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Network) DeepCopyInto(out *Network) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Network. -func (in *Network) DeepCopy() *Network { - if in == nil { - return nil - } - out := new(Network) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Network) 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 *NetworkList) DeepCopyInto(out *NetworkList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Network, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkList. -func (in *NetworkList) DeepCopy() *NetworkList { - if in == nil { - return nil - } - out := new(NetworkList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NetworkList) 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 *NetworkMigration) DeepCopyInto(out *NetworkMigration) { - *out = *in - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(MTUMigration) - (*in).DeepCopyInto(*out) - } - if in.Features != nil { - in, out := &in.Features, &out.Features - *out = new(FeaturesMigration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkMigration. -func (in *NetworkMigration) DeepCopy() *NetworkMigration { - if in == nil { - return nil - } - out := new(NetworkMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkSpec) DeepCopyInto(out *NetworkSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - if in.ClusterNetwork != nil { - in, out := &in.ClusterNetwork, &out.ClusterNetwork - *out = make([]ClusterNetworkEntry, len(*in)) - copy(*out, *in) - } - if in.ServiceNetwork != nil { - in, out := &in.ServiceNetwork, &out.ServiceNetwork - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.DefaultNetwork.DeepCopyInto(&out.DefaultNetwork) - if in.AdditionalNetworks != nil { - in, out := &in.AdditionalNetworks, &out.AdditionalNetworks - *out = make([]AdditionalNetworkDefinition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.DisableMultiNetwork != nil { - in, out := &in.DisableMultiNetwork, &out.DisableMultiNetwork - *out = new(bool) - **out = **in - } - if in.UseMultiNetworkPolicy != nil { - in, out := &in.UseMultiNetworkPolicy, &out.UseMultiNetworkPolicy - *out = new(bool) - **out = **in - } - if in.DeployKubeProxy != nil { - in, out := &in.DeployKubeProxy, &out.DeployKubeProxy - *out = new(bool) - **out = **in - } - if in.KubeProxyConfig != nil { - in, out := &in.KubeProxyConfig, &out.KubeProxyConfig - *out = new(ProxyConfig) - (*in).DeepCopyInto(*out) - } - if in.ExportNetworkFlows != nil { - in, out := &in.ExportNetworkFlows, &out.ExportNetworkFlows - *out = new(ExportNetworkFlows) - (*in).DeepCopyInto(*out) - } - if in.Migration != nil { - in, out := &in.Migration, &out.Migration - *out = new(NetworkMigration) - (*in).DeepCopyInto(*out) - } - if in.AdditionalRoutingCapabilities != nil { - in, out := &in.AdditionalRoutingCapabilities, &out.AdditionalRoutingCapabilities - *out = new(AdditionalRoutingCapabilities) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkSpec. -func (in *NetworkSpec) DeepCopy() *NetworkSpec { - if in == nil { - return nil - } - out := new(NetworkSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkStatus) DeepCopyInto(out *NetworkStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkStatus. -func (in *NetworkStatus) DeepCopy() *NetworkStatus { - if in == nil { - return nil - } - out := new(NetworkStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NoOverlayConfig) DeepCopyInto(out *NoOverlayConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NoOverlayConfig. -func (in *NoOverlayConfig) DeepCopy() *NoOverlayConfig { - if in == nil { - return nil - } - out := new(NoOverlayConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyClusterStatus) DeepCopyInto(out *NodeDisruptionPolicyClusterStatus) { - *out = *in - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make([]NodeDisruptionPolicyStatusFile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Units != nil { - in, out := &in.Units, &out.Units - *out = make([]NodeDisruptionPolicyStatusUnit, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.SSHKey.DeepCopyInto(&out.SSHKey) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyClusterStatus. -func (in *NodeDisruptionPolicyClusterStatus) DeepCopy() *NodeDisruptionPolicyClusterStatus { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyClusterStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyConfig) DeepCopyInto(out *NodeDisruptionPolicyConfig) { - *out = *in - if in.Files != nil { - in, out := &in.Files, &out.Files - *out = make([]NodeDisruptionPolicySpecFile, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Units != nil { - in, out := &in.Units, &out.Units - *out = make([]NodeDisruptionPolicySpecUnit, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.SSHKey.DeepCopyInto(&out.SSHKey) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyConfig. -func (in *NodeDisruptionPolicyConfig) DeepCopy() *NodeDisruptionPolicyConfig { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicySpecAction) DeepCopyInto(out *NodeDisruptionPolicySpecAction) { - *out = *in - if in.Reload != nil { - in, out := &in.Reload, &out.Reload - *out = new(ReloadService) - **out = **in - } - if in.Restart != nil { - in, out := &in.Restart, &out.Restart - *out = new(RestartService) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecAction. -func (in *NodeDisruptionPolicySpecAction) DeepCopy() *NodeDisruptionPolicySpecAction { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicySpecAction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicySpecFile) DeepCopyInto(out *NodeDisruptionPolicySpecFile) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicySpecAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecFile. -func (in *NodeDisruptionPolicySpecFile) DeepCopy() *NodeDisruptionPolicySpecFile { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicySpecFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicySpecSSHKey) DeepCopyInto(out *NodeDisruptionPolicySpecSSHKey) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicySpecAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecSSHKey. -func (in *NodeDisruptionPolicySpecSSHKey) DeepCopy() *NodeDisruptionPolicySpecSSHKey { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicySpecSSHKey) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicySpecUnit) DeepCopyInto(out *NodeDisruptionPolicySpecUnit) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicySpecAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicySpecUnit. -func (in *NodeDisruptionPolicySpecUnit) DeepCopy() *NodeDisruptionPolicySpecUnit { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicySpecUnit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyStatus) DeepCopyInto(out *NodeDisruptionPolicyStatus) { - *out = *in - in.ClusterPolicies.DeepCopyInto(&out.ClusterPolicies) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatus. -func (in *NodeDisruptionPolicyStatus) DeepCopy() *NodeDisruptionPolicyStatus { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyStatusAction) DeepCopyInto(out *NodeDisruptionPolicyStatusAction) { - *out = *in - if in.Reload != nil { - in, out := &in.Reload, &out.Reload - *out = new(ReloadService) - **out = **in - } - if in.Restart != nil { - in, out := &in.Restart, &out.Restart - *out = new(RestartService) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusAction. -func (in *NodeDisruptionPolicyStatusAction) DeepCopy() *NodeDisruptionPolicyStatusAction { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyStatusAction) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyStatusFile) DeepCopyInto(out *NodeDisruptionPolicyStatusFile) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicyStatusAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusFile. -func (in *NodeDisruptionPolicyStatusFile) DeepCopy() *NodeDisruptionPolicyStatusFile { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyStatusFile) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyStatusSSHKey) DeepCopyInto(out *NodeDisruptionPolicyStatusSSHKey) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicyStatusAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusSSHKey. -func (in *NodeDisruptionPolicyStatusSSHKey) DeepCopy() *NodeDisruptionPolicyStatusSSHKey { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyStatusSSHKey) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeDisruptionPolicyStatusUnit) DeepCopyInto(out *NodeDisruptionPolicyStatusUnit) { - *out = *in - if in.Actions != nil { - in, out := &in.Actions, &out.Actions - *out = make([]NodeDisruptionPolicyStatusAction, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeDisruptionPolicyStatusUnit. -func (in *NodeDisruptionPolicyStatusUnit) DeepCopy() *NodeDisruptionPolicyStatusUnit { - if in == nil { - return nil - } - out := new(NodeDisruptionPolicyStatusUnit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePlacement) DeepCopyInto(out *NodePlacement) { - *out = *in - if in.NodeSelector != nil { - in, out := &in.NodeSelector, &out.NodeSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePlacement. -func (in *NodePlacement) DeepCopy() *NodePlacement { - if in == nil { - return nil - } - out := new(NodePlacement) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodePortStrategy) DeepCopyInto(out *NodePortStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodePortStrategy. -func (in *NodePortStrategy) DeepCopy() *NodePortStrategy { - if in == nil { - return nil - } - out := new(NodePortStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - if in.LastFailedTime != nil { - in, out := &in.LastFailedTime, &out.LastFailedTime - *out = (*in).DeepCopy() - } - if in.LastFailedRevisionErrors != nil { - in, out := &in.LastFailedRevisionErrors, &out.LastFailedRevisionErrors - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthAPIServerStatus) DeepCopyInto(out *OAuthAPIServerStatus) { - *out = *in - in.EncryptionStatus.DeepCopyInto(&out.EncryptionStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthAPIServerStatus. -func (in *OAuthAPIServerStatus) DeepCopy() *OAuthAPIServerStatus { - if in == nil { - return nil - } - out := new(OAuthAPIServerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OLM) DeepCopyInto(out *OLM) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLM. -func (in *OLM) DeepCopy() *OLM { - if in == nil { - return nil - } - out := new(OLM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OLM) 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 *OLMList) DeepCopyInto(out *OLMList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OLM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMList. -func (in *OLMList) DeepCopy() *OLMList { - if in == nil { - return nil - } - out := new(OLMList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OLMList) 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 *OLMSpec) DeepCopyInto(out *OLMSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMSpec. -func (in *OLMSpec) DeepCopy() *OLMSpec { - if in == nil { - return nil - } - out := new(OLMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OLMStatus) DeepCopyInto(out *OLMStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMStatus. -func (in *OLMStatus) DeepCopy() *OLMStatus { - if in == nil { - return nil - } - out := new(OLMStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OVNKubernetesConfig) DeepCopyInto(out *OVNKubernetesConfig) { - *out = *in - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(uint32) - **out = **in - } - if in.GenevePort != nil { - in, out := &in.GenevePort, &out.GenevePort - *out = new(uint32) - **out = **in - } - if in.HybridOverlayConfig != nil { - in, out := &in.HybridOverlayConfig, &out.HybridOverlayConfig - *out = new(HybridOverlayConfig) - (*in).DeepCopyInto(*out) - } - if in.IPsecConfig != nil { - in, out := &in.IPsecConfig, &out.IPsecConfig - *out = new(IPsecConfig) - (*in).DeepCopyInto(*out) - } - if in.PolicyAuditConfig != nil { - in, out := &in.PolicyAuditConfig, &out.PolicyAuditConfig - *out = new(PolicyAuditConfig) - (*in).DeepCopyInto(*out) - } - if in.GatewayConfig != nil { - in, out := &in.GatewayConfig, &out.GatewayConfig - *out = new(GatewayConfig) - **out = **in - } - in.EgressIPConfig.DeepCopyInto(&out.EgressIPConfig) - if in.IPv4 != nil { - in, out := &in.IPv4, &out.IPv4 - *out = new(IPv4OVNKubernetesConfig) - **out = **in - } - if in.IPv6 != nil { - in, out := &in.IPv6, &out.IPv6 - *out = new(IPv6OVNKubernetesConfig) - **out = **in - } - out.NoOverlayConfig = in.NoOverlayConfig - out.BGPManagedConfig = in.BGPManagedConfig - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OVNKubernetesConfig. -func (in *OVNKubernetesConfig) DeepCopy() *OVNKubernetesConfig { - if in == nil { - return nil - } - out := new(OVNKubernetesConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftAPIServer) DeepCopyInto(out *OpenShiftAPIServer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftAPIServer. -func (in *OpenShiftAPIServer) DeepCopy() *OpenShiftAPIServer { - if in == nil { - return nil - } - out := new(OpenShiftAPIServer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftAPIServer) 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 *OpenShiftAPIServerList) DeepCopyInto(out *OpenShiftAPIServerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OpenShiftAPIServer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftAPIServerList. -func (in *OpenShiftAPIServerList) DeepCopy() *OpenShiftAPIServerList { - if in == nil { - return nil - } - out := new(OpenShiftAPIServerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftAPIServerList) 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 *OpenShiftAPIServerSpec) DeepCopyInto(out *OpenShiftAPIServerSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftAPIServerSpec. -func (in *OpenShiftAPIServerSpec) DeepCopy() *OpenShiftAPIServerSpec { - if in == nil { - return nil - } - out := new(OpenShiftAPIServerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftAPIServerStatus) DeepCopyInto(out *OpenShiftAPIServerStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - in.EncryptionStatus.DeepCopyInto(&out.EncryptionStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftAPIServerStatus. -func (in *OpenShiftAPIServerStatus) DeepCopy() *OpenShiftAPIServerStatus { - if in == nil { - return nil - } - out := new(OpenShiftAPIServerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftControllerManager) DeepCopyInto(out *OpenShiftControllerManager) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftControllerManager. -func (in *OpenShiftControllerManager) DeepCopy() *OpenShiftControllerManager { - if in == nil { - return nil - } - out := new(OpenShiftControllerManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftControllerManager) 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 *OpenShiftControllerManagerList) DeepCopyInto(out *OpenShiftControllerManagerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OpenShiftControllerManager, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftControllerManagerList. -func (in *OpenShiftControllerManagerList) DeepCopy() *OpenShiftControllerManagerList { - if in == nil { - return nil - } - out := new(OpenShiftControllerManagerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenShiftControllerManagerList) 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 *OpenShiftControllerManagerSpec) DeepCopyInto(out *OpenShiftControllerManagerSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftControllerManagerSpec. -func (in *OpenShiftControllerManagerSpec) DeepCopy() *OpenShiftControllerManagerSpec { - if in == nil { - return nil - } - out := new(OpenShiftControllerManagerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftControllerManagerStatus) DeepCopyInto(out *OpenShiftControllerManagerStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftControllerManagerStatus. -func (in *OpenShiftControllerManagerStatus) DeepCopy() *OpenShiftControllerManagerStatus { - if in == nil { - return nil - } - out := new(OpenShiftControllerManagerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenShiftSDNConfig) DeepCopyInto(out *OpenShiftSDNConfig) { - *out = *in - if in.VXLANPort != nil { - in, out := &in.VXLANPort, &out.VXLANPort - *out = new(uint32) - **out = **in - } - if in.MTU != nil { - in, out := &in.MTU, &out.MTU - *out = new(uint32) - **out = **in - } - if in.UseExternalOpenvswitch != nil { - in, out := &in.UseExternalOpenvswitch, &out.UseExternalOpenvswitch - *out = new(bool) - **out = **in - } - if in.EnableUnidling != nil { - in, out := &in.EnableUnidling, &out.EnableUnidling - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenShiftSDNConfig. -func (in *OpenShiftSDNConfig) DeepCopy() *OpenShiftSDNConfig { - if in == nil { - return nil - } - out := new(OpenShiftSDNConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenStackLoadBalancerParameters) DeepCopyInto(out *OpenStackLoadBalancerParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackLoadBalancerParameters. -func (in *OpenStackLoadBalancerParameters) DeepCopy() *OpenStackLoadBalancerParameters { - if in == nil { - return nil - } - out := new(OpenStackLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorCondition) DeepCopyInto(out *OperatorCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorCondition. -func (in *OperatorCondition) DeepCopy() *OperatorCondition { - if in == nil { - return nil - } - out := new(OperatorCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec) { - *out = *in - in.UnsupportedConfigOverrides.DeepCopyInto(&out.UnsupportedConfigOverrides) - in.ObservedConfig.DeepCopyInto(&out.ObservedConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorSpec. -func (in *OperatorSpec) DeepCopy() *OperatorSpec { - if in == nil { - return nil - } - out := new(OperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]OperatorCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Generations != nil { - in, out := &in.Generations, &out.Generations - *out = make([]GenerationStatus, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus. -func (in *OperatorStatus) DeepCopy() *OperatorStatus { - if in == nil { - return nil - } - out := new(OperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PartialSelector) DeepCopyInto(out *PartialSelector) { - *out = *in - if in.MachineResourceSelector != nil { - in, out := &in.MachineResourceSelector, &out.MachineResourceSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PartialSelector. -func (in *PartialSelector) DeepCopy() *PartialSelector { - if in == nil { - return nil - } - out := new(PartialSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Perspective) DeepCopyInto(out *Perspective) { - *out = *in - in.Visibility.DeepCopyInto(&out.Visibility) - if in.PinnedResources != nil { - in, out := &in.PinnedResources, &out.PinnedResources - *out = new([]PinnedResourceReference) - if **in != nil { - in, out := *in, *out - *out = make([]PinnedResourceReference, len(*in)) - copy(*out, *in) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Perspective. -func (in *Perspective) DeepCopy() *Perspective { - if in == nil { - return nil - } - out := new(Perspective) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PerspectiveVisibility) DeepCopyInto(out *PerspectiveVisibility) { - *out = *in - if in.AccessReview != nil { - in, out := &in.AccessReview, &out.AccessReview - *out = new(ResourceAttributesAccessReview) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PerspectiveVisibility. -func (in *PerspectiveVisibility) DeepCopy() *PerspectiveVisibility { - if in == nil { - return nil - } - out := new(PerspectiveVisibility) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PinnedResourceReference) DeepCopyInto(out *PinnedResourceReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PinnedResourceReference. -func (in *PinnedResourceReference) DeepCopy() *PinnedResourceReference { - if in == nil { - return nil - } - out := new(PinnedResourceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PolicyAuditConfig) DeepCopyInto(out *PolicyAuditConfig) { - *out = *in - if in.RateLimit != nil { - in, out := &in.RateLimit, &out.RateLimit - *out = new(uint32) - **out = **in - } - if in.MaxFileSize != nil { - in, out := &in.MaxFileSize, &out.MaxFileSize - *out = new(uint32) - **out = **in - } - if in.MaxLogFiles != nil { - in, out := &in.MaxLogFiles, &out.MaxLogFiles - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PolicyAuditConfig. -func (in *PolicyAuditConfig) DeepCopy() *PolicyAuditConfig { - if in == nil { - return nil - } - out := new(PolicyAuditConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrivateStrategy) DeepCopyInto(out *PrivateStrategy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrivateStrategy. -func (in *PrivateStrategy) DeepCopy() *PrivateStrategy { - if in == nil { - return nil - } - out := new(PrivateStrategy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectAccess) DeepCopyInto(out *ProjectAccess) { - *out = *in - if in.AvailableClusterRoles != nil { - in, out := &in.AvailableClusterRoles, &out.AvailableClusterRoles - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectAccess. -func (in *ProjectAccess) DeepCopy() *ProjectAccess { - if in == nil { - return nil - } - out := new(ProjectAccess) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProviderLoadBalancerParameters) DeepCopyInto(out *ProviderLoadBalancerParameters) { - *out = *in - if in.AWS != nil { - in, out := &in.AWS, &out.AWS - *out = new(AWSLoadBalancerParameters) - (*in).DeepCopyInto(*out) - } - if in.GCP != nil { - in, out := &in.GCP, &out.GCP - *out = new(GCPLoadBalancerParameters) - **out = **in - } - if in.IBM != nil { - in, out := &in.IBM, &out.IBM - *out = new(IBMLoadBalancerParameters) - **out = **in - } - if in.OpenStack != nil { - in, out := &in.OpenStack, &out.OpenStack - *out = new(OpenStackLoadBalancerParameters) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProviderLoadBalancerParameters. -func (in *ProviderLoadBalancerParameters) DeepCopy() *ProviderLoadBalancerParameters { - if in == nil { - return nil - } - out := new(ProviderLoadBalancerParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ProxyArgumentList) DeepCopyInto(out *ProxyArgumentList) { - { - in := &in - *out = make(ProxyArgumentList, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyArgumentList. -func (in ProxyArgumentList) DeepCopy() ProxyArgumentList { - if in == nil { - return nil - } - out := new(ProxyArgumentList) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig) { - *out = *in - if in.ProxyArguments != nil { - in, out := &in.ProxyArguments, &out.ProxyArguments - *out = make(map[string]ProxyArgumentList, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(ProxyArgumentList, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig. -func (in *ProxyConfig) DeepCopy() *ProxyConfig { - if in == nil { - return nil - } - out := new(ProxyConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *QuickStarts) DeepCopyInto(out *QuickStarts) { - *out = *in - if in.Disabled != nil { - in, out := &in.Disabled, &out.Disabled - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuickStarts. -func (in *QuickStarts) DeepCopy() *QuickStarts { - if in == nil { - return nil - } - out := new(QuickStarts) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReloadService) DeepCopyInto(out *ReloadService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReloadService. -func (in *ReloadService) DeepCopy() *ReloadService { - if in == nil { - return nil - } - out := new(ReloadService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceAttributesAccessReview) DeepCopyInto(out *ResourceAttributesAccessReview) { - *out = *in - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = make([]authorizationv1.ResourceAttributes, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Missing != nil { - in, out := &in.Missing, &out.Missing - *out = make([]authorizationv1.ResourceAttributes, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceAttributesAccessReview. -func (in *ResourceAttributesAccessReview) DeepCopy() *ResourceAttributesAccessReview { - if in == nil { - return nil - } - out := new(ResourceAttributesAccessReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RestartService) DeepCopyInto(out *RestartService) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RestartService. -func (in *RestartService) DeepCopy() *RestartService { - if in == nil { - return nil - } - out := new(RestartService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteAdmissionPolicy) DeepCopyInto(out *RouteAdmissionPolicy) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteAdmissionPolicy. -func (in *RouteAdmissionPolicy) DeepCopy() *RouteAdmissionPolicy { - if in == nil { - return nil - } - out := new(RouteAdmissionPolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SFlowConfig) DeepCopyInto(out *SFlowConfig) { - *out = *in - if in.Collectors != nil { - in, out := &in.Collectors, &out.Collectors - *out = make([]IPPort, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SFlowConfig. -func (in *SFlowConfig) DeepCopy() *SFlowConfig { - if in == nil { - return nil - } - out := new(SFlowConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretsStoreCSIDriverConfigSpec) DeepCopyInto(out *SecretsStoreCSIDriverConfigSpec) { - *out = *in - out.SecretRotation = in.SecretRotation - in.TokenRequests.DeepCopyInto(&out.TokenRequests) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsStoreCSIDriverConfigSpec. -func (in *SecretsStoreCSIDriverConfigSpec) DeepCopy() *SecretsStoreCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(SecretsStoreCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretsStoreSecretRotation) DeepCopyInto(out *SecretsStoreSecretRotation) { - *out = *in - out.Custom = in.Custom - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsStoreSecretRotation. -func (in *SecretsStoreSecretRotation) DeepCopy() *SecretsStoreSecretRotation { - if in == nil { - return nil - } - out := new(SecretsStoreSecretRotation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretsStoreTokenRequest) DeepCopyInto(out *SecretsStoreTokenRequest) { - *out = *in - if in.Audience != nil { - in, out := &in.Audience, &out.Audience - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsStoreTokenRequest. -func (in *SecretsStoreTokenRequest) DeepCopy() *SecretsStoreTokenRequest { - if in == nil { - return nil - } - out := new(SecretsStoreTokenRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretsStoreTokenRequests) DeepCopyInto(out *SecretsStoreTokenRequests) { - *out = *in - in.Managed.DeepCopyInto(&out.Managed) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretsStoreTokenRequests. -func (in *SecretsStoreTokenRequests) DeepCopy() *SecretsStoreTokenRequests { - if in == nil { - return nil - } - out := new(SecretsStoreTokenRequests) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Server) DeepCopyInto(out *Server) { - *out = *in - if in.Zones != nil { - in, out := &in.Zones, &out.Zones - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.ForwardPlugin.DeepCopyInto(&out.ForwardPlugin) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Server. -func (in *Server) DeepCopy() *Server { - if in == nil { - return nil - } - out := new(Server) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountIssuerStatus) DeepCopyInto(out *ServiceAccountIssuerStatus) { - *out = *in - if in.ExpirationTime != nil { - in, out := &in.ExpirationTime, &out.ExpirationTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountIssuerStatus. -func (in *ServiceAccountIssuerStatus) DeepCopy() *ServiceAccountIssuerStatus { - if in == nil { - return nil - } - out := new(ServiceAccountIssuerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCA) DeepCopyInto(out *ServiceCA) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCA. -func (in *ServiceCA) DeepCopy() *ServiceCA { - if in == nil { - return nil - } - out := new(ServiceCA) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCA) 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 *ServiceCAList) DeepCopyInto(out *ServiceCAList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceCA, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCAList. -func (in *ServiceCAList) DeepCopy() *ServiceCAList { - if in == nil { - return nil - } - out := new(ServiceCAList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCAList) 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 *ServiceCASpec) DeepCopyInto(out *ServiceCASpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCASpec. -func (in *ServiceCASpec) DeepCopy() *ServiceCASpec { - if in == nil { - return nil - } - out := new(ServiceCASpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCAStatus) DeepCopyInto(out *ServiceCAStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCAStatus. -func (in *ServiceCAStatus) DeepCopy() *ServiceCAStatus { - if in == nil { - return nil - } - out := new(ServiceCAStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCatalogAPIServer) DeepCopyInto(out *ServiceCatalogAPIServer) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogAPIServer. -func (in *ServiceCatalogAPIServer) DeepCopy() *ServiceCatalogAPIServer { - if in == nil { - return nil - } - out := new(ServiceCatalogAPIServer) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCatalogAPIServer) 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 *ServiceCatalogAPIServerList) DeepCopyInto(out *ServiceCatalogAPIServerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceCatalogAPIServer, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogAPIServerList. -func (in *ServiceCatalogAPIServerList) DeepCopy() *ServiceCatalogAPIServerList { - if in == nil { - return nil - } - out := new(ServiceCatalogAPIServerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCatalogAPIServerList) 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 *ServiceCatalogAPIServerSpec) DeepCopyInto(out *ServiceCatalogAPIServerSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogAPIServerSpec. -func (in *ServiceCatalogAPIServerSpec) DeepCopy() *ServiceCatalogAPIServerSpec { - if in == nil { - return nil - } - out := new(ServiceCatalogAPIServerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCatalogAPIServerStatus) DeepCopyInto(out *ServiceCatalogAPIServerStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogAPIServerStatus. -func (in *ServiceCatalogAPIServerStatus) DeepCopy() *ServiceCatalogAPIServerStatus { - if in == nil { - return nil - } - out := new(ServiceCatalogAPIServerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCatalogControllerManager) DeepCopyInto(out *ServiceCatalogControllerManager) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogControllerManager. -func (in *ServiceCatalogControllerManager) DeepCopy() *ServiceCatalogControllerManager { - if in == nil { - return nil - } - out := new(ServiceCatalogControllerManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCatalogControllerManager) 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 *ServiceCatalogControllerManagerList) DeepCopyInto(out *ServiceCatalogControllerManagerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceCatalogControllerManager, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogControllerManagerList. -func (in *ServiceCatalogControllerManagerList) DeepCopy() *ServiceCatalogControllerManagerList { - if in == nil { - return nil - } - out := new(ServiceCatalogControllerManagerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCatalogControllerManagerList) 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 *ServiceCatalogControllerManagerSpec) DeepCopyInto(out *ServiceCatalogControllerManagerSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogControllerManagerSpec. -func (in *ServiceCatalogControllerManagerSpec) DeepCopy() *ServiceCatalogControllerManagerSpec { - if in == nil { - return nil - } - out := new(ServiceCatalogControllerManagerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCatalogControllerManagerStatus) DeepCopyInto(out *ServiceCatalogControllerManagerStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCatalogControllerManagerStatus. -func (in *ServiceCatalogControllerManagerStatus) DeepCopy() *ServiceCatalogControllerManagerStatus { - if in == nil { - return nil - } - out := new(ServiceCatalogControllerManagerStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SimpleMacvlanConfig) DeepCopyInto(out *SimpleMacvlanConfig) { - *out = *in - if in.IPAMConfig != nil { - in, out := &in.IPAMConfig, &out.IPAMConfig - *out = new(IPAMConfig) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SimpleMacvlanConfig. -func (in *SimpleMacvlanConfig) DeepCopy() *SimpleMacvlanConfig { - if in == nil { - return nil - } - out := new(SimpleMacvlanConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticIPAMAddresses) DeepCopyInto(out *StaticIPAMAddresses) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticIPAMAddresses. -func (in *StaticIPAMAddresses) DeepCopy() *StaticIPAMAddresses { - if in == nil { - return nil - } - out := new(StaticIPAMAddresses) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticIPAMConfig) DeepCopyInto(out *StaticIPAMConfig) { - *out = *in - if in.Addresses != nil { - in, out := &in.Addresses, &out.Addresses - *out = make([]StaticIPAMAddresses, len(*in)) - copy(*out, *in) - } - if in.Routes != nil { - in, out := &in.Routes, &out.Routes - *out = make([]StaticIPAMRoutes, len(*in)) - copy(*out, *in) - } - if in.DNS != nil { - in, out := &in.DNS, &out.DNS - *out = new(StaticIPAMDNS) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticIPAMConfig. -func (in *StaticIPAMConfig) DeepCopy() *StaticIPAMConfig { - if in == nil { - return nil - } - out := new(StaticIPAMConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticIPAMDNS) DeepCopyInto(out *StaticIPAMDNS) { - *out = *in - if in.Nameservers != nil { - in, out := &in.Nameservers, &out.Nameservers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Search != nil { - in, out := &in.Search, &out.Search - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticIPAMDNS. -func (in *StaticIPAMDNS) DeepCopy() *StaticIPAMDNS { - if in == nil { - return nil - } - out := new(StaticIPAMDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticIPAMRoutes) DeepCopyInto(out *StaticIPAMRoutes) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticIPAMRoutes. -func (in *StaticIPAMRoutes) DeepCopy() *StaticIPAMRoutes { - if in == nil { - return nil - } - out := new(StaticIPAMRoutes) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticPodOperatorSpec) DeepCopyInto(out *StaticPodOperatorSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticPodOperatorSpec. -func (in *StaticPodOperatorSpec) DeepCopy() *StaticPodOperatorSpec { - if in == nil { - return nil - } - out := new(StaticPodOperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticPodOperatorStatus) DeepCopyInto(out *StaticPodOperatorStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - if in.NodeStatuses != nil { - in, out := &in.NodeStatuses, &out.NodeStatuses - *out = make([]NodeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticPodOperatorStatus. -func (in *StaticPodOperatorStatus) DeepCopy() *StaticPodOperatorStatus { - if in == nil { - return nil - } - out := new(StaticPodOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StatuspageProvider) DeepCopyInto(out *StatuspageProvider) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatuspageProvider. -func (in *StatuspageProvider) DeepCopy() *StatuspageProvider { - if in == nil { - return nil - } - out := new(StatuspageProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Storage) DeepCopyInto(out *Storage) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Storage. -func (in *Storage) DeepCopy() *Storage { - if in == nil { - return nil - } - out := new(Storage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Storage) 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 *StorageList) DeepCopyInto(out *StorageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Storage, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageList. -func (in *StorageList) DeepCopy() *StorageList { - if in == nil { - return nil - } - out := new(StorageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageList) 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 *StorageSpec) DeepCopyInto(out *StorageSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec. -func (in *StorageSpec) DeepCopy() *StorageSpec { - if in == nil { - return nil - } - out := new(StorageSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageStatus) DeepCopyInto(out *StorageStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStatus. -func (in *StorageStatus) DeepCopy() *StorageStatus { - if in == nil { - return nil - } - out := new(StorageStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SyslogLoggingDestinationParameters) DeepCopyInto(out *SyslogLoggingDestinationParameters) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SyslogLoggingDestinationParameters. -func (in *SyslogLoggingDestinationParameters) DeepCopy() *SyslogLoggingDestinationParameters { - if in == nil { - return nil - } - out := new(SyslogLoggingDestinationParameters) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Theme) DeepCopyInto(out *Theme) { - *out = *in - in.Source.DeepCopyInto(&out.Source) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Theme. -func (in *Theme) DeepCopy() *Theme { - if in == nil { - return nil - } - out := new(Theme) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Upstream) DeepCopyInto(out *Upstream) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Upstream. -func (in *Upstream) DeepCopy() *Upstream { - if in == nil { - return nil - } - out := new(Upstream) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *UpstreamResolvers) DeepCopyInto(out *UpstreamResolvers) { - *out = *in - if in.Upstreams != nil { - in, out := &in.Upstreams, &out.Upstreams - *out = make([]Upstream, len(*in)) - copy(*out, *in) - } - in.TransportConfig.DeepCopyInto(&out.TransportConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UpstreamResolvers. -func (in *UpstreamResolvers) DeepCopy() *UpstreamResolvers { - if in == nil { - return nil - } - out := new(UpstreamResolvers) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VSphereCSIDriverConfigSpec) DeepCopyInto(out *VSphereCSIDriverConfigSpec) { - *out = *in - if in.TopologyCategories != nil { - in, out := &in.TopologyCategories, &out.TopologyCategories - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GlobalMaxSnapshotsPerBlockVolume != nil { - in, out := &in.GlobalMaxSnapshotsPerBlockVolume, &out.GlobalMaxSnapshotsPerBlockVolume - *out = new(uint32) - **out = **in - } - if in.GranularMaxSnapshotsPerBlockVolumeInVSAN != nil { - in, out := &in.GranularMaxSnapshotsPerBlockVolumeInVSAN, &out.GranularMaxSnapshotsPerBlockVolumeInVSAN - *out = new(uint32) - **out = **in - } - if in.GranularMaxSnapshotsPerBlockVolumeInVVOL != nil { - in, out := &in.GranularMaxSnapshotsPerBlockVolumeInVVOL, &out.GranularMaxSnapshotsPerBlockVolumeInVVOL - *out = new(uint32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VSphereCSIDriverConfigSpec. -func (in *VSphereCSIDriverConfigSpec) DeepCopy() *VSphereCSIDriverConfigSpec { - if in == nil { - return nil - } - out := new(VSphereCSIDriverConfigSpec) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/operator/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index aab9e3564..000000000 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,461 +0,0 @@ -authentications.operator.openshift.io: - Annotations: - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: authentications.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - AuthenticationComponentProxy - - KMSEncryption - FilenameOperatorName: authentication - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: Authentication - Labels: {} - PluralName: authentications - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -csisnapshotcontrollers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/562 - CRDName: csisnapshotcontrollers.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: csi-snapshot-controller - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_80" - GroupName: operator.openshift.io - HasStatus: true - KindName: CSISnapshotController - Labels: {} - PluralName: csisnapshotcontrollers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -cloudcredentials.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/692 - CRDName: cloudcredentials.operator.openshift.io - Capability: CloudCredential - Category: "" - FeatureGates: [] - FilenameOperatorName: cloud-credential - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_40" - GroupName: operator.openshift.io - HasStatus: true - KindName: CloudCredential - Labels: {} - PluralName: cloudcredentials - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -clustercsidrivers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/701 - CRDName: clustercsidrivers.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - AWSEuropeanSovereignCloudInstall - - VSphereConfigurableMaxAllowedBlockVolumesPerNode - FilenameOperatorName: csi-driver - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: ClusterCSIDriver - Labels: {} - PluralName: clustercsidrivers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -configs.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/612 - CRDName: configs.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: [] - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: operator.openshift.io - HasStatus: true - KindName: Config - Labels: {} - PluralName: configs - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -consoles.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/486 - CRDName: consoles.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: console - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: Console - Labels: {} - PluralName: consoles - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -dnses.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: dnses.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: dns - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_70" - GroupName: operator.openshift.io - HasStatus: true - KindName: DNS - Labels: {} - PluralName: dnses - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -etcds.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/752 - CRDName: etcds.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: - - EtcdBackendQuota - FilenameOperatorName: etcd - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_12" - GroupName: operator.openshift.io - HasStatus: true - KindName: Etcd - Labels: {} - PluralName: etcds - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -ingresscontrollers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/616 - CRDName: ingresscontrollers.operator.openshift.io - Capability: Ingress - Category: "" - FeatureGates: - - IngressControllerDynamicConfigurationManager - - IngressControllerMultipleHAProxyVersions - - TLSGroupPreferences - FilenameOperatorName: ingress - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: IngressController - Labels: {} - PluralName: ingresscontrollers - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -insightsoperators.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1237 - CRDName: insightsoperators.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: insights - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: InsightsOperator - Labels: {} - PluralName: insightsoperators - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -kubeapiservers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: kubeapiservers.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: - - EventTTL - - KMSEncryption - FilenameOperatorName: kube-apiserver - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_20" - GroupName: operator.openshift.io - HasStatus: true - KindName: KubeAPIServer - Labels: {} - PluralName: kubeapiservers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -kubecontrollermanagers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: kubecontrollermanagers.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: [] - FilenameOperatorName: kube-controller-manager - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_25" - GroupName: operator.openshift.io - HasStatus: true - KindName: KubeControllerManager - Labels: {} - PluralName: kubecontrollermanagers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -kubeschedulers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: kubeschedulers.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: [] - FilenameOperatorName: kube-scheduler - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_25" - GroupName: operator.openshift.io - HasStatus: true - KindName: KubeScheduler - Labels: {} - PluralName: kubeschedulers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -kubestorageversionmigrators.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/503 - CRDName: kubestorageversionmigrators.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: kube-storage-version-migrator - FilenameOperatorOrdering: "00" - FilenameRunLevel: "0000_40" - GroupName: operator.openshift.io - HasStatus: true - KindName: KubeStorageVersionMigrator - Labels: {} - PluralName: kubestorageversionmigrators - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -machineconfigurations.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1453 - CRDName: machineconfigurations.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - BootImageSkewEnforcement - - IrreconcilableMachineConfig - - ManagedBootImagesCPMS - FilenameOperatorName: machine-config - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_80" - GroupName: operator.openshift.io - HasStatus: true - KindName: MachineConfiguration - Labels: {} - PluralName: machineconfigurations - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -networks.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: networks.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - NoOverlayMode - FilenameOperatorName: network - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_70" - GroupName: operator.openshift.io - HasStatus: true - KindName: Network - Labels: {} - PluralName: networks - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -olms.operator.openshift.io: - Annotations: - include.release.openshift.io/ibm-cloud-managed: "false" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1504 - CRDName: olms.operator.openshift.io - Capability: OperatorLifecycleManagerV1 - Category: "" - FeatureGates: - - NewOLM - FilenameOperatorName: operator-lifecycle-manager - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: operator.openshift.io - HasStatus: true - KindName: OLM - Labels: {} - PluralName: olms - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - NewOLM - Version: v1 - -openshiftapiservers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: openshiftapiservers.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: - - KMSEncryption - FilenameOperatorName: openshift-apiserver - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_30" - GroupName: operator.openshift.io - HasStatus: true - KindName: OpenShiftAPIServer - Labels: {} - PluralName: openshiftapiservers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -openshiftcontrollermanagers.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: openshiftcontrollermanagers.operator.openshift.io - Capability: "" - Category: coreoperators - FeatureGates: [] - FilenameOperatorName: openshift-controller-manager - FilenameOperatorOrdering: "02" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: OpenShiftControllerManager - Labels: {} - PluralName: openshiftcontrollermanagers - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -servicecas.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/475 - CRDName: servicecas.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: service-ca - FilenameOperatorOrdering: "02" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: ServiceCA - Labels: {} - PluralName: servicecas - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - -storages.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/670 - CRDName: storages.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: storage - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_50" - GroupName: operator.openshift.io - HasStatus: true - KindName: Storage - Labels: {} - PluralName: storages - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go deleted file mode 100644 index 271665a7e..000000000 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.model_name.go +++ /dev/null @@ -1,1236 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSCSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSClassicLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSClassicLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSEFSVolumeMetrics) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSEFSVolumeMetrics" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSEFSVolumeMetricsRecursiveWalkConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSEFSVolumeMetricsRecursiveWalkConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSNetworkLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSNetworkLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AWSSubnets) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AWSSubnets" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AccessLogging) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AccessLogging" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AddPage) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AddPage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdditionalNetworkDefinition) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AdditionalNetworkDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdditionalRoutingCapabilities) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AdditionalRoutingCapabilities" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Authentication) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Authentication" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthenticationConfigMapReference) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AuthenticationConfigMapReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthenticationList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AuthenticationList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthenticationProxyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AuthenticationProxyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthenticationSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AuthenticationSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AuthenticationStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AuthenticationStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AzureCSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AzureDiskEncryptionSet) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.AzureDiskEncryptionSet" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BGPManagedConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.BGPManagedConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BootImageSkewEnforcementConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.BootImageSkewEnforcementConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BootImageSkewEnforcementStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.BootImageSkewEnforcementStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CSISnapshotController) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CSISnapshotController" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CSISnapshotControllerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CSISnapshotControllerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CSISnapshotControllerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CSISnapshotControllerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CSISnapshotControllerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CSISnapshotControllerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Capability) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Capability" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CapabilityVisibility) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CapabilityVisibility" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClientTLS) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClientTLS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CloudCredential) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CloudCredential" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CloudCredentialList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CloudCredentialList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CloudCredentialSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CloudCredentialSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CloudCredentialStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CloudCredentialStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterBootImageAutomatic) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterBootImageAutomatic" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterBootImageManual) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterBootImageManual" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterCSIDriver) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterCSIDriver" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterCSIDriverList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterCSIDriverList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterCSIDriverSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterCSIDriverSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterCSIDriverStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterCSIDriverStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterNetworkEntry) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ClusterNetworkEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Config) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Config" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigMapFileReference) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConfigMapFileReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConfigStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Console) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Console" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleConfigRoute) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleConfigRoute" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleCustomization) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleCustomization" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleProviders) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleProviders" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConsoleStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ConsoleStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ContainerLoggingDestinationParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ContainerLoggingDestinationParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomSecretRotation) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.CustomSecretRotation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNS) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSCache) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSCache" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSNodePlacement) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSNodePlacement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSOverTLSConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSOverTLSConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DNSTransportConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DNSTransportConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DefaultNetworkDefinition) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DefaultNetworkDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeveloperConsoleCatalogCategory) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategory" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeveloperConsoleCatalogCategoryMeta) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategoryMeta" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeveloperConsoleCatalogCustomization) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCustomization" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DeveloperConsoleCatalogTypes) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.DeveloperConsoleCatalogTypes" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EgressIPConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.EgressIPConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EndpointPublishingStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.EndpointPublishingStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Etcd) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Etcd" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.EtcdList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.EtcdSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.EtcdStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ExportNetworkFlows) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ExportNetworkFlows" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FeaturesMigration) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.FeaturesMigration" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FileReferenceSource) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.FileReferenceSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ForwardPlugin) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ForwardPlugin" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GCPCSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPKMSKeyReference) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GCPKMSKeyReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GCPLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GCPLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GatewayConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GatewayConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GatherStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GatherStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GathererStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GathererStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GenerationStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.GenerationStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HTTPCompressionPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.HTTPCompressionPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HealthCheck) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.HealthCheck" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HostNetworkStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.HostNetworkStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HybridOverlayConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.HybridOverlayConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IBMCloudCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IBMCloudCSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IBMLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IBMLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPAMConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPAMConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPFIXConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPFIXConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPsecConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPsecConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPsecFullModeConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPsecFullModeConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPv4GatewayConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPv4GatewayConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPv4OVNKubernetesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPv4OVNKubernetesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPv6GatewayConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPv6GatewayConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IPv6OVNKubernetesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IPv6OVNKubernetesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Ingress) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Ingress" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressController) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressController" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerCaptureHTTPCookie) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPCookie" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerCaptureHTTPCookieUnion) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPCookieUnion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerCaptureHTTPHeader) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerCaptureHTTPHeaders) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeaders" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerHTTPHeader) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerHTTPHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerHTTPHeaderActionUnion) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActionUnion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerHTTPHeaderActions) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerHTTPHeaders) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerHTTPHeaders" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerHTTPUniqueIdHeaderPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerHTTPUniqueIdHeaderPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerLogging) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerLogging" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerSetHTTPHeader) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerSetHTTPHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IngressControllerTuningOptions) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IngressControllerTuningOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsOperator) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.InsightsOperator" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsOperatorList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.InsightsOperatorList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsOperatorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.InsightsOperatorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsOperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.InsightsOperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in InsightsReport) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.InsightsReport" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IrreconcilableValidationOverrides) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.IrreconcilableValidationOverrides" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KMSEncryptionStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KMSEncryptionStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KMSPluginHealthReport) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KMSPluginHealthReport" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServer) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeAPIServer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeAPIServerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeAPIServerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeAPIServerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeAPIServerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManager) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeControllerManager" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManagerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeControllerManagerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManagerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeControllerManagerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeControllerManagerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeControllerManagerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeScheduler) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeScheduler" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeSchedulerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeSchedulerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeSchedulerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeSchedulerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeSchedulerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeSchedulerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStorageVersionMigrator) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeStorageVersionMigrator" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStorageVersionMigratorList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeStorageVersionMigratorList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStorageVersionMigratorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeStorageVersionMigratorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KubeStorageVersionMigratorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.KubeStorageVersionMigratorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LoadBalancerStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.LoadBalancerStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LoggingDestination) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.LoggingDestination" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Logo) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Logo" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MTUMigration) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MTUMigration" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MTUMigrationValues) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MTUMigrationValues" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineConfiguration) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineConfiguration" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineConfigurationList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineConfigurationList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineConfigurationSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineConfigurationSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineConfigurationStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineConfigurationStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineManager) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineManager" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MachineManagerSelector) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MachineManagerSelector" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ManagedBootImages) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ManagedBootImages" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ManagedTokenRequests) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ManagedTokenRequests" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MyOperatorResource) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MyOperatorResource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MyOperatorResourceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MyOperatorResourceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in MyOperatorResourceStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.MyOperatorResourceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetFlowConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NetFlowConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Network) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Network" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NetworkList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkMigration) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NetworkMigration" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NetworkSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NetworkStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NetworkStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NoOverlayConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NoOverlayConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyClusterStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyClusterStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicySpecAction) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicySpecFile) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecFile" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicySpecSSHKey) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecSSHKey" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicySpecUnit) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecUnit" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyStatusAction) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyStatusFile) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusFile" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyStatusSSHKey) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusSSHKey" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeDisruptionPolicyStatusUnit) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusUnit" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodePlacement) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodePlacement" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodePortStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodePortStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.NodeStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthAPIServerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OAuthAPIServerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLM) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OLM" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OLMList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OLMSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OLMStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OVNKubernetesConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OVNKubernetesConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftAPIServer) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftAPIServer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftAPIServerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftAPIServerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftAPIServerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftAPIServerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftAPIServerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftAPIServerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftControllerManager) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftControllerManager" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftControllerManagerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftControllerManagerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftControllerManagerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftControllerManagerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftControllerManagerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftControllerManagerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenShiftSDNConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenShiftSDNConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenStackLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OpenStackLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorCondition) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OperatorCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OperatorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.OperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PartialSelector) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.PartialSelector" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Perspective) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Perspective" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PerspectiveVisibility) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.PerspectiveVisibility" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PinnedResourceReference) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.PinnedResourceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PolicyAuditConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.PolicyAuditConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PrivateStrategy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.PrivateStrategy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectAccess) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ProjectAccess" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProviderLoadBalancerParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ProviderLoadBalancerParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProxyConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ProxyConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in QuickStarts) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.QuickStarts" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ReloadService) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ReloadService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceAttributesAccessReview) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ResourceAttributesAccessReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RestartService) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.RestartService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteAdmissionPolicy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.RouteAdmissionPolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SFlowConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SFlowConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretsStoreCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SecretsStoreCSIDriverConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretsStoreSecretRotation) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SecretsStoreSecretRotation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretsStoreTokenRequest) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SecretsStoreTokenRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecretsStoreTokenRequests) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SecretsStoreTokenRequests" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Server) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Server" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountIssuerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceAccountIssuerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCA) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCA" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCAList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCAList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCASpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCASpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCAStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCAStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogAPIServer) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogAPIServer" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogAPIServerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogAPIServerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogAPIServerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogAPIServerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogAPIServerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogAPIServerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogControllerManager) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogControllerManager" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogControllerManagerList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogControllerManagerSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCatalogControllerManagerStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SimpleMacvlanConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SimpleMacvlanConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticIPAMAddresses) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticIPAMAddresses" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticIPAMConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticIPAMConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticIPAMDNS) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticIPAMDNS" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticIPAMRoutes) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticIPAMRoutes" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticPodOperatorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticPodOperatorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticPodOperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StaticPodOperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StatuspageProvider) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StatuspageProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Storage) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Storage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StorageList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StorageList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StorageSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StorageSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StorageStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.StorageStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SyslogLoggingDestinationParameters) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.SyslogLoggingDestinationParameters" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Theme) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Theme" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Upstream) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.Upstream" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UpstreamResolvers) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.UpstreamResolvers" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VSphereCSIDriverConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1.VSphereCSIDriverConfigSpec" -} diff --git a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 114b5c7a6..000000000 --- a/vendor/github.com/openshift/api/operator/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,2341 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_GenerationStatus = map[string]string{ - "": "GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made.", - "group": "group is the group of the thing you're tracking", - "resource": "resource is the resource type of the thing you're tracking", - "namespace": "namespace is where the thing you're tracking is", - "name": "name is the name of the thing you're tracking", - "lastGeneration": "lastGeneration is the last generation of the workload controller involved", - "hash": "hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps", -} - -func (GenerationStatus) SwaggerDoc() map[string]string { - return map_GenerationStatus -} - -var map_MyOperatorResource = map[string]string{ - "": "MyOperatorResource is an example operator configuration type\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (MyOperatorResource) SwaggerDoc() map[string]string { - return map_MyOperatorResource -} - -var map_NodeStatus = map[string]string{ - "": "NodeStatus provides information about the current state of a particular node managed by this operator.", - "nodeName": "nodeName is the name of the node", - "currentRevision": "currentRevision is the generation of the most recently successful deployment. Can not be set on creation of a nodeStatus. Updates must only increase the value.", - "targetRevision": "targetRevision is the generation of the deployment we're trying to apply. Can not be set on creation of a nodeStatus.", - "lastFailedRevision": "lastFailedRevision is the generation of the deployment we tried and failed to deploy.", - "lastFailedTime": "lastFailedTime is the time the last failed revision failed the last time.", - "lastFailedReason": "lastFailedReason is a machine readable failure reason string.", - "lastFailedCount": "lastFailedCount is how often the installer pod of the last failed revision failed.", - "lastFallbackCount": "lastFallbackCount is how often a fallback to a previous revision happened.", - "lastFailedRevisionErrors": "lastFailedRevisionErrors is a list of human readable errors during the failed deployment referenced in lastFailedRevision.", -} - -func (NodeStatus) SwaggerDoc() map[string]string { - return map_NodeStatus -} - -var map_OperatorCondition = map[string]string{ - "": "OperatorCondition is just the standard condition fields.", - "type": "type of condition in CamelCase or in foo.example.com/CamelCase.", - "status": "status of the condition, one of True, False, Unknown.", - "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", -} - -func (OperatorCondition) SwaggerDoc() map[string]string { - return map_OperatorCondition -} - -var map_OperatorSpec = map[string]string{ - "": "OperatorSpec contains common fields operators need. It is intended to be anonymous included inside of the Spec struct for your particular operator.", - "managementState": "managementState indicates whether and how the operator should manage the component", - "logLevel": "logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for their operands.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", - "operatorLogLevel": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", - "unsupportedConfigOverrides": "unsupportedConfigOverrides overrides the final configuration that was computed by the operator. Red Hat does not support the use of this field. Misuse of this field could lead to unexpected behavior or conflict with other configuration options. Seek guidance from the Red Hat support before using this field. Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster.", - "observedConfig": "observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because it is an input to the level for the operator", -} - -func (OperatorSpec) SwaggerDoc() map[string]string { - return map_OperatorSpec -} - -var map_OperatorStatus = map[string]string{ - "observedGeneration": "observedGeneration is the last generation change you've dealt with", - "conditions": "conditions is a list of conditions and their status", - "version": "version is the level this availability applies to", - "readyReplicas": "readyReplicas indicates how many replicas are ready and at the desired state", - "latestAvailableRevision": "latestAvailableRevision is the deploymentID of the most recent deployment", - "generations": "generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction.", -} - -func (OperatorStatus) SwaggerDoc() map[string]string { - return map_OperatorStatus -} - -var map_StaticPodOperatorSpec = map[string]string{ - "": "StaticPodOperatorSpec is spec for controllers that manage static pods.", - "forceRedeploymentReason": "forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string. This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work this time instead of failing again on the same config.", - "failedRevisionLimit": "failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default)", - "succeededRevisionLimit": "succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api -1 = unlimited, 0 or unset = 5 (default)", -} - -func (StaticPodOperatorSpec) SwaggerDoc() map[string]string { - return map_StaticPodOperatorSpec -} - -var map_StaticPodOperatorStatus = map[string]string{ - "": "StaticPodOperatorStatus is status for controllers that manage static pods. There are different needs because individual node status must be tracked.", - "latestAvailableRevisionReason": "latestAvailableRevisionReason describe the detailed reason for the most recent deployment", - "nodeStatuses": "nodeStatuses track the deployment values and errors across individual nodes", -} - -func (StaticPodOperatorStatus) SwaggerDoc() map[string]string { - return map_StaticPodOperatorStatus -} - -var map_Authentication = map[string]string{ - "": "Authentication provides information to configure an operator to manage authentication.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Authentication) SwaggerDoc() map[string]string { - return map_Authentication -} - -var map_AuthenticationConfigMapReference = map[string]string{ - "": "AuthenticationConfigMapReference references a ConfigMap in the openshift-config namespace.", - "name": "name is the metadata.name of the referenced ConfigMap. Must be a valid DNS subdomain name (RFC 1123): at most 253 characters, only lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character.", -} - -func (AuthenticationConfigMapReference) SwaggerDoc() map[string]string { - return map_AuthenticationConfigMapReference -} - -var map_AuthenticationList = map[string]string{ - "": "AuthenticationList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (AuthenticationList) SwaggerDoc() map[string]string { - return map_AuthenticationList -} - -var map_AuthenticationProxyConfig = map[string]string{ - "": "AuthenticationProxyConfig holds proxy configuration scoped to authentication components (the OAuth server and the cluster authentication operator).", - "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Must be a valid URL with http or https scheme, a non-empty hostname, and no path, query parameters, or fragment. Userinfo (e.g. user:password@host) is allowed for proxy authentication. Maximum length is 2048 characters.", - "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Must be a valid URL with http or https scheme, a non-empty hostname, and no path, query parameters, or fragment. Userinfo (e.g. user:password@host) is allowed for proxy authentication. Maximum length is 2048 characters.", - "noProxy": "noProxy is a list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. Must contain at least one entry when set. Each entry must be between 1 and 253 characters long and at most 64 entries are allowed. Duplicate entries are not permitted. Entries that are not valid hostnames, CIDRs, or IPs are silently ignored. Cluster-internal defaults (.cluster.local, .svc, 127.0.0.1, localhost) are always appended automatically and do not need to be included.", - "trustedCA": "trustedCA is a reference to a ConfigMap in the openshift-config namespace containing a CA certificate bundle under the key \"ca-bundle.crt\". This bundle is appended to the system trust store used by authentication components for proxy TLS connections. When omitted, only the system trust store is used.", -} - -func (AuthenticationProxyConfig) SwaggerDoc() map[string]string { - return map_AuthenticationProxyConfig -} - -var map_AuthenticationSpec = map[string]string{ - "proxy": "proxy configures proxy settings for outbound connections made by the authentication stack. When set, it replaces the cluster-wide proxy (proxy.config.openshift.io/cluster) entirely for authentication — individual fields are not inherited from the cluster-wide configuration. When omitted, the cluster-wide proxy is used if configured; otherwise no proxy is used.", -} - -func (AuthenticationSpec) SwaggerDoc() map[string]string { - return map_AuthenticationSpec -} - -var map_AuthenticationStatus = map[string]string{ - "oauthAPIServer": "oauthAPIServer holds status specific only to oauth-apiserver", -} - -func (AuthenticationStatus) SwaggerDoc() map[string]string { - return map_AuthenticationStatus -} - -var map_OAuthAPIServerStatus = map[string]string{ - "latestAvailableRevision": "latestAvailableRevision is the latest revision used as suffix of revisioned secrets like encryption-config. A new revision causes a new deployment of pods.", - "encryptionStatus": "encryptionStatus contains status reports for the KMS plugin health and its key rotation.", -} - -func (OAuthAPIServerStatus) SwaggerDoc() map[string]string { - return map_OAuthAPIServerStatus -} - -var map_CloudCredential = map[string]string{ - "": "CloudCredential provides a means to configure an operator to manage CredentialsRequests.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (CloudCredential) SwaggerDoc() map[string]string { - return map_CloudCredential -} - -var map_CloudCredentialList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (CloudCredentialList) SwaggerDoc() map[string]string { - return map_CloudCredentialList -} - -var map_CloudCredentialSpec = map[string]string{ - "": "CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator.", - "credentialsMode": "credentialsMode allows informing CCO that it should not attempt to dynamically determine the root cloud credentials capabilities, and it should just run in the specified mode. It also allows putting the operator into \"manual\" mode if desired. Leaving the field in default mode runs CCO so that the cluster's cloud credentials will be dynamically probed for capabilities (on supported clouds/platforms). Supported modes:\n AWS/Azure/GCP: \"\" (Default), \"Mint\", \"Passthrough\", \"Manual\"\n Others: Do not set value as other platforms only support running in \"Passthrough\"", -} - -func (CloudCredentialSpec) SwaggerDoc() map[string]string { - return map_CloudCredentialSpec -} - -var map_CloudCredentialStatus = map[string]string{ - "": "CloudCredentialStatus defines the observed status of the cloud-credential-operator.", -} - -func (CloudCredentialStatus) SwaggerDoc() map[string]string { - return map_CloudCredentialStatus -} - -var map_Config = map[string]string{ - "": "Config specifies the behavior of the config operator which is responsible for creating the initial configuration of other components on the cluster. The operator also handles installation, migration or synchronization of cloud configurations for AWS and Azure cloud based clusters\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Config Operator.", - "status": "status defines the observed status of the Config Operator.", -} - -func (Config) SwaggerDoc() map[string]string { - return map_Config -} - -var map_ConfigList = map[string]string{ - "": "ConfigList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ConfigList) SwaggerDoc() map[string]string { - return map_ConfigList -} - -var map_AddPage = map[string]string{ - "": "AddPage allows customizing actions on the Add page in developer perspective.", - "disabledActions": "disabledActions is a list of actions that are not shown to users. Each action in the list is represented by its ID.", -} - -func (AddPage) SwaggerDoc() map[string]string { - return map_AddPage -} - -var map_Capability = map[string]string{ - "": "Capabilities contains set of UI capabilities and their state in the console UI.", - "name": "name is the unique name of a capability. Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour.", - "visibility": "visibility defines the visibility state of the capability.", -} - -func (Capability) SwaggerDoc() map[string]string { - return map_Capability -} - -var map_CapabilityVisibility = map[string]string{ - "": "CapabilityVisibility defines the criteria to enable/disable a capability.", - "state": "state defines if the capability is enabled or disabled in the console UI. Enabling the capability in the console UI is represented by the \"Enabled\" value. Disabling the capability in the console UI is represented by the \"Disabled\" value.", -} - -func (CapabilityVisibility) SwaggerDoc() map[string]string { - return map_CapabilityVisibility -} - -var map_ConfigMapFileReference = map[string]string{ - "": "ConfigMapFileReference references a specific file within a ConfigMap.", - "name": "name is the name of the ConfigMap. name is a required field. Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. Must be at most 253 characters in length.", - "key": "key is the logo key inside the referenced ConfigMap. Must consist only of alphanumeric characters, dashes (-), underscores (_), and periods (.). Must be at most 253 characters in length. Must end in a valid file extension. A valid file extension must consist of a period followed by 2 to 5 alpha characters.", -} - -func (ConfigMapFileReference) SwaggerDoc() map[string]string { - return map_ConfigMapFileReference -} - -var map_Console = map[string]string{ - "": "Console provides a means to configure an operator to manage the console.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Console) SwaggerDoc() map[string]string { - return map_Console -} - -var map_ConsoleConfigRoute = map[string]string{ - "": "ConsoleConfigRoute holds information on external route access to console. DEPRECATED", - "hostname": "hostname is the desired custom domain under which console will be available.", - "secret": "secret points to secret in the openshift-config namespace that contains custom certificate and key and needs to be created manually by the cluster admin. Referenced Secret is required to contain following key value pairs: - \"tls.crt\" - to specifies custom certificate - \"tls.key\" - to specifies private key of the custom certificate If the custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed.", -} - -func (ConsoleConfigRoute) SwaggerDoc() map[string]string { - return map_ConsoleConfigRoute -} - -var map_ConsoleCustomization = map[string]string{ - "": "ConsoleCustomization defines a list of optional configuration for the console UI. Ensure that Logos and CustomLogoFile cannot be set at the same time.", - "logos": "logos is used to replace the OpenShift Masthead and Favicon logos in the console UI with custom logos. logos is an optional field that allows a list of logos. Only one of logos or customLogoFile can be set at a time. If logos is set, customLogoFile must be unset. When specified, there must be at least one entry and no more than 2 entries. Each type must appear only once in the list.", - "capabilities": "capabilities defines an array of capabilities that can be interacted with in the console UI. Each capability defines a visual state that can be interacted with the console to render in the UI. Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour. Each of the available capabilities may appear only once in the list.", - "brand": "brand is the default branding of the web console which can be overridden by providing the brand field. There is a limited set of specific brand options. This field controls elements of the console such as the logo. Invalid value will prevent a console rollout.", - "documentationBaseURL": "documentationBaseURL links to external documentation are shown in various sections of the web console. Providing documentationBaseURL will override the default documentation URL. Invalid value will prevent a console rollout.", - "customProductName": "customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog instead of the normal OpenShift product name.", - "customLogoFile": "customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a Only one of customLogoFile or logos can be set at a time. ConfigMap in the openshift-config namespace. This can be created with a command like 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. Image size must be less than 1 MB due to constraints on the ConfigMap size. The ConfigMap key should include a file extension so that the console serves the file with the correct MIME type. The recommended file format for the logo is SVG, but other file formats are allowed if supported by the browser. Deprecated: Use logos instead.", - "developerCatalog": "developerCatalog allows to configure the shown developer catalog categories (filters) and types (sub-catalogs).", - "projectAccess": "projectAccess allows customizing the available list of ClusterRoles in the Developer perspective Project access page which can be used by a project admin to specify roles to other users and restrict access within the project. If set, the list will replace the default ClusterRole options.", - "quickStarts": "quickStarts allows customization of available ConsoleQuickStart resources in console.", - "addPage": "addPage allows customizing actions on the Add page in developer perspective.", - "perspectives": "perspectives allows enabling/disabling of perspective(s) that user can see in the Perspective switcher dropdown.", -} - -func (ConsoleCustomization) SwaggerDoc() map[string]string { - return map_ConsoleCustomization -} - -var map_ConsoleList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConsoleList) SwaggerDoc() map[string]string { - return map_ConsoleList -} - -var map_ConsoleProviders = map[string]string{ - "": "ConsoleProviders defines a list of optional additional providers of functionality to the console.", - "statuspage": "statuspage contains ID for statuspage.io page that provides status info about.", -} - -func (ConsoleProviders) SwaggerDoc() map[string]string { - return map_ConsoleProviders -} - -var map_ConsoleSpec = map[string]string{ - "": "ConsoleSpec is the specification of the desired behavior of the Console.", - "customization": "customization is used to optionally provide a small set of customization options to the web console.", - "providers": "providers contains configuration for using specific service providers.", - "route": "route contains hostname and secret reference that contains the serving certificate. If a custom route is specified, a new route will be created with the provided hostname, under which console will be available. In case of custom hostname uses the default routing suffix of the cluster, the Secret specification for a serving certificate will not be needed. In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary. The default console route will be maintained to reserve the default hostname for console if the custom route is removed. If not specified, default route will be used. DEPRECATED", - "plugins": "plugins defines a list of enabled console plugin names.", - "ingress": "ingress allows to configure the alternative ingress for the console. This field is intended for clusters without ingress capability, where access to routes is not possible.", -} - -func (ConsoleSpec) SwaggerDoc() map[string]string { - return map_ConsoleSpec -} - -var map_ConsoleStatus = map[string]string{ - "": "ConsoleStatus defines the observed status of the Console.", -} - -func (ConsoleStatus) SwaggerDoc() map[string]string { - return map_ConsoleStatus -} - -var map_DeveloperConsoleCatalogCategory = map[string]string{ - "": "DeveloperConsoleCatalogCategory for the developer console catalog.", - "subcategories": "subcategories defines a list of child categories.", -} - -func (DeveloperConsoleCatalogCategory) SwaggerDoc() map[string]string { - return map_DeveloperConsoleCatalogCategory -} - -var map_DeveloperConsoleCatalogCategoryMeta = map[string]string{ - "": "DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category.", - "id": "id is an identifier used in the URL to enable deep linking in console. ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters.", - "label": "label defines a category display label. It is required and must have 1-64 characters.", - "tags": "tags is a list of strings that will match the category. A selected category show all items which has at least one overlapping tag between category and item.", -} - -func (DeveloperConsoleCatalogCategoryMeta) SwaggerDoc() map[string]string { - return map_DeveloperConsoleCatalogCategoryMeta -} - -var map_DeveloperConsoleCatalogCustomization = map[string]string{ - "": "DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog.", - "categories": "categories which are shown in the developer catalog.", - "types": "types allows enabling or disabling of sub-catalog types that user can see in the Developer catalog. When omitted, all the sub-catalog types will be shown.", -} - -func (DeveloperConsoleCatalogCustomization) SwaggerDoc() map[string]string { - return map_DeveloperConsoleCatalogCustomization -} - -var map_DeveloperConsoleCatalogTypes = map[string]string{ - "": "DeveloperConsoleCatalogTypes defines the state of the sub-catalog types.", - "state": "state defines if a list of catalog types should be enabled or disabled.", - "enabled": "enabled is a list of developer catalog types (sub-catalogs IDs) that will be shown to users. Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available in the console on the cluster configuration page, or when editing the YAML in the console. Example: \"Devfile\", \"HelmChart\", \"BuilderImage\" If the list is non-empty, a new type will not be shown to the user until it is added to list. If the list is empty the complete developer catalog will be shown.", - "disabled": "disabled is a list of developer catalog types (sub-catalogs IDs) that are not shown to users. Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available in the console on the cluster configuration page, or when editing the YAML in the console. Example: \"Devfile\", \"HelmChart\", \"BuilderImage\" If the list is empty or all the available sub-catalog types are added, then the complete developer catalog should be hidden.", -} - -func (DeveloperConsoleCatalogTypes) SwaggerDoc() map[string]string { - return map_DeveloperConsoleCatalogTypes -} - -var map_FileReferenceSource = map[string]string{ - "": "FileReferenceSource is used by the console to locate the specified file containing a custom logo.", - "from": "from is a required field to specify the source type of the file reference. Allowed values are ConfigMap. When set to ConfigMap, the file will be sourced from a ConfigMap in the openshift-config namespace. The configMap field must be set when from is set to ConfigMap.", - "configMap": "configMap specifies the ConfigMap sourcing details such as the name of the ConfigMap and the key for the file. The ConfigMap must exist in the openshift-config namespace. Required when from is \"ConfigMap\", and forbidden otherwise.", -} - -func (FileReferenceSource) SwaggerDoc() map[string]string { - return map_FileReferenceSource -} - -var map_Ingress = map[string]string{ - "": "Ingress allows cluster admin to configure alternative ingress for the console.", - "consoleURL": "consoleURL is a URL to be used as the base console address. If not specified, the console route hostname will be used. This field is required for clusters without ingress capability, where access to routes is not possible. Make sure that appropriate ingress is set up at this URL. The console operator will monitor the URL and may go degraded if it's unreachable for an extended period. Must use the HTTPS scheme.", - "clientDownloadsURL": "clientDownloadsURL is a URL to be used as the address to download client binaries. If not specified, the downloads route hostname will be used. This field is required for clusters without ingress capability, where access to routes is not possible. The console operator will monitor the URL and may go degraded if it's unreachable for an extended period. Must use the HTTPS scheme.", -} - -func (Ingress) SwaggerDoc() map[string]string { - return map_Ingress -} - -var map_Logo = map[string]string{ - "": "Logo defines a configuration based on theme modes for the console UI logo.", - "type": "type specifies the type of the logo for the console UI. It determines whether the logo is for the masthead or favicon. type is a required field that allows values of Masthead and Favicon. When set to \"Masthead\", the logo will be used in the masthead and about modal of the console UI. When set to \"Favicon\", the logo will be used as the favicon of the console UI.", - "themes": "themes specifies the themes for the console UI logo. themes is a required field that allows a list of themes. Each item in the themes list must have a unique mode and a source field. Each mode determines whether the logo is for the dark or light mode of the console UI. If a theme is not specified, the default OpenShift logo will be displayed for that theme. There must be at least one entry and no more than 2 entries.", -} - -func (Logo) SwaggerDoc() map[string]string { - return map_Logo -} - -var map_Perspective = map[string]string{ - "": "Perspective defines a perspective that cluster admins want to show/hide in the perspective switcher dropdown", - "id": "id defines the id of the perspective. Example: \"dev\", \"admin\". The available perspective ids can be found in the code snippet section next to the yaml editor. Incorrect or unknown ids will be ignored.", - "visibility": "visibility defines the state of perspective along with access review checks if needed for that perspective.", - "pinnedResources": "pinnedResources defines the list of default pinned resources that users will see on the perspective navigation if they have not customized these pinned resources themselves. The list of available Kubernetes resources could be read via `kubectl api-resources`. The console will also provide a configuration UI and a YAML snippet that will list the available resources that can be pinned to the navigation. Incorrect or unknown resources will be ignored.", -} - -func (Perspective) SwaggerDoc() map[string]string { - return map_Perspective -} - -var map_PerspectiveVisibility = map[string]string{ - "": "PerspectiveVisibility defines the criteria to show/hide a perspective", - "state": "state defines the perspective is enabled or disabled or access review check is required.", - "accessReview": "accessReview defines required and missing access review checks.", -} - -func (PerspectiveVisibility) SwaggerDoc() map[string]string { - return map_PerspectiveVisibility -} - -var map_PinnedResourceReference = map[string]string{ - "": "PinnedResourceReference includes the group, version and type of resource", - "group": "group is the API Group of the Resource. Enter empty string for the core group. This value should consist of only lowercase alphanumeric characters, hyphens and periods. Example: \"\", \"apps\", \"build.openshift.io\", etc.", - "version": "version is the API Version of the Resource. This value should consist of only lowercase alphanumeric characters. Example: \"v1\", \"v1beta1\", etc.", - "resource": "resource is the type that is being referenced. It is normally the plural form of the resource kind in lowercase. This value should consist of only lowercase alphanumeric characters and hyphens. Example: \"deployments\", \"deploymentconfigs\", \"pods\", etc.", -} - -func (PinnedResourceReference) SwaggerDoc() map[string]string { - return map_PinnedResourceReference -} - -var map_ProjectAccess = map[string]string{ - "": "ProjectAccess contains options for project access roles", - "availableClusterRoles": "availableClusterRoles is the list of ClusterRole names that are assignable to users through the project access tab.", -} - -func (ProjectAccess) SwaggerDoc() map[string]string { - return map_ProjectAccess -} - -var map_QuickStarts = map[string]string{ - "": "QuickStarts allow cluster admins to customize available ConsoleQuickStart resources.", - "disabled": "disabled is a list of ConsoleQuickStart resource names that are not shown to users.", -} - -func (QuickStarts) SwaggerDoc() map[string]string { - return map_QuickStarts -} - -var map_ResourceAttributesAccessReview = map[string]string{ - "": "ResourceAttributesAccessReview defines the visibility of the perspective depending on the access review checks. `required` and `missing` can work together esp. in the case where the cluster admin wants to show another perspective to users without specific permissions. Out of `required` and `missing` atleast one property should be non-empty.", - "required": "required defines a list of permission checks. The perspective will only be shown when all checks are successful. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the missing access review list.", - "missing": "missing defines a list of permission checks. The perspective will only be shown when at least one check fails. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the required access review list.", -} - -func (ResourceAttributesAccessReview) SwaggerDoc() map[string]string { - return map_ResourceAttributesAccessReview -} - -var map_StatuspageProvider = map[string]string{ - "": "StatuspageProvider provides identity for statuspage account.", - "pageID": "pageID is the unique ID assigned by Statuspage for your page. This must be a public page.", -} - -func (StatuspageProvider) SwaggerDoc() map[string]string { - return map_StatuspageProvider -} - -var map_Theme = map[string]string{ - "": "Theme defines a theme mode for the console UI.", - "mode": "mode is used to specify what theme mode a logo will apply to in the console UI. mode is a required field that allows values of Dark and Light. When set to Dark, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Dark mode. When set to Light, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Light mode.", - "source": "source is used by the console to locate the specified file containing a custom logo. source is a required field that references a ConfigMap name and key that contains the custom logo file in the openshift-config namespace. You can create it with a command like: - 'oc create configmap custom-logos-config --namespace=openshift-config --from-file=/path/to/file' The ConfigMap key must include the file extension so that the console serves the file with the correct MIME type. The recommended file format for the Masthead and Favicon logos is SVG, but other file formats are allowed if supported by the browser. The logo image size must be less than 1 MB due to constraints on the ConfigMap size. For more information, see the documentation: https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/web_console/customizing-web-console#customizing-web-console", -} - -func (Theme) SwaggerDoc() map[string]string { - return map_Theme -} - -var map_AWSCSIDriverConfigSpec = map[string]string{ - "": "AWSCSIDriverConfigSpec defines properties that can be configured for the AWS CSI driver.", - "kmsKeyARN": "kmsKeyARN sets the cluster default storage class to encrypt volumes with a user-defined KMS key, rather than the default KMS key used by AWS. The value may be either the ARN or Alias ARN of a KMS key.\n\nThe ARN must follow the format: arn::kms:::(key|alias)/, where: is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc), is the AWS region, is a 12-digit numeric identifier for the AWS account, is the KMS key ID or alias name.", - "efsVolumeMetrics": "efsVolumeMetrics sets the configuration for collecting metrics from EFS volumes used by the EFS CSI Driver.", -} - -func (AWSCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_AWSCSIDriverConfigSpec -} - -var map_AWSEFSVolumeMetrics = map[string]string{ - "": "AWSEFSVolumeMetrics defines the configuration for volume metrics in the EFS CSI Driver.", - "state": "state defines the state of metric collection in the AWS EFS CSI Driver. This field is required and must be set to one of the following values: Disabled or RecursiveWalk. Disabled means no metrics collection will be performed. This is the default value. RecursiveWalk means the AWS EFS CSI Driver will recursively scan volumes to collect metrics. This process may result in high CPU and memory usage, depending on the volume size.", - "recursiveWalk": "recursiveWalk provides additional configuration for collecting volume metrics in the AWS EFS CSI Driver when the state is set to RecursiveWalk.", -} - -func (AWSEFSVolumeMetrics) SwaggerDoc() map[string]string { - return map_AWSEFSVolumeMetrics -} - -var map_AWSEFSVolumeMetricsRecursiveWalkConfig = map[string]string{ - "": "AWSEFSVolumeMetricsRecursiveWalkConfig defines options for volume metrics in the EFS CSI Driver.", - "refreshPeriodMinutes": "refreshPeriodMinutes specifies the frequency, in minutes, at which volume metrics are refreshed. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 240. The valid range is from 1 to 43200 minutes (30 days).", - "fsRateLimit": "fsRateLimit defines the rate limit, in goroutines per file system, for processing volume metrics. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 5. The valid range is from 1 to 100 goroutines.", -} - -func (AWSEFSVolumeMetricsRecursiveWalkConfig) SwaggerDoc() map[string]string { - return map_AWSEFSVolumeMetricsRecursiveWalkConfig -} - -var map_AzureCSIDriverConfigSpec = map[string]string{ - "": "AzureCSIDriverConfigSpec defines properties that can be configured for the Azure CSI driver.", - "diskEncryptionSet": "diskEncryptionSet sets the cluster default storage class to encrypt volumes with a customer-managed encryption set, rather than the default platform-managed keys.", -} - -func (AzureCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_AzureCSIDriverConfigSpec -} - -var map_AzureDiskEncryptionSet = map[string]string{ - "": "AzureDiskEncryptionSet defines the configuration for a disk encryption set.", - "subscriptionID": "subscriptionID defines the Azure subscription that contains the disk encryption set. The value should meet the following conditions: 1. It should be a 128-bit number. 2. It should be 36 characters (32 hexadecimal characters and 4 hyphens) long. 3. It should be displayed in five groups separated by hyphens (-). 4. The first group should be 8 characters long. 5. The second, third, and fourth groups should be 4 characters long. 6. The fifth group should be 12 characters long. An Example SubscrionID: f2007bbf-f802-4a47-9336-cf7c6b89b378", - "resourceGroup": "resourceGroup defines the Azure resource group that contains the disk encryption set. The value should consist of only alphanumberic characters, underscores (_), parentheses, hyphens and periods. The value should not end in a period and be at most 90 characters in length.", - "name": "name is the name of the disk encryption set that will be set on the default storage class. The value should consist of only alphanumberic characters, underscores (_), hyphens, and be at most 80 characters in length.", -} - -func (AzureDiskEncryptionSet) SwaggerDoc() map[string]string { - return map_AzureDiskEncryptionSet -} - -var map_CSIDriverConfigSpec = map[string]string{ - "": "CSIDriverConfigSpec defines configuration spec that can be used to optionally configure a specific CSI Driver.", - "driverType": "driverType indicates type of CSI driver for which the driverConfig is being applied to. Valid values are: AWS, Azure, GCP, IBMCloud, vSphere, SecretsStore and omitted. Consumers should treat unknown values as a NO-OP.", - "aws": "aws is used to configure the AWS CSI driver.", - "azure": "azure is used to configure the Azure CSI driver.", - "gcp": "gcp is used to configure the GCP CSI driver.", - "ibmcloud": "ibmcloud is used to configure the IBM Cloud CSI driver.", - "vSphere": "vSphere is used to configure the vsphere CSI driver.", - "secretsStore": "secretsStore is used to configure the Secrets Store CSI driver.", -} - -func (CSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_CSIDriverConfigSpec -} - -var map_ClusterCSIDriver = map[string]string{ - "": "ClusterCSIDriver object allows management and configuration of a CSI driver operator installed by default in OpenShift. Name of the object must be name of the CSI driver it operates. See CSIDriverName type for list of allowed values.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (ClusterCSIDriver) SwaggerDoc() map[string]string { - return map_ClusterCSIDriver -} - -var map_ClusterCSIDriverList = map[string]string{ - "": "ClusterCSIDriverList contains a list of ClusterCSIDriver\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ClusterCSIDriverList) SwaggerDoc() map[string]string { - return map_ClusterCSIDriverList -} - -var map_ClusterCSIDriverSpec = map[string]string{ - "": "ClusterCSIDriverSpec is the desired behavior of CSI driver operator", - "storageClassState": "storageClassState determines if CSI operator should create and manage storage classes. If this field value is empty or Managed - CSI operator will continuously reconcile storage class and create if necessary. If this field value is Unmanaged - CSI operator will not reconcile any previously created storage class. If this field value is Removed - CSI operator will delete the storage class it created previously. When omitted, this means the user has no opinion and the platform chooses a reasonable default, which is subject to change over time. The current default behaviour is Managed.", - "driverConfig": "driverConfig can be used to specify platform specific driver configuration. When omitted, this means no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time.", -} - -func (ClusterCSIDriverSpec) SwaggerDoc() map[string]string { - return map_ClusterCSIDriverSpec -} - -var map_ClusterCSIDriverStatus = map[string]string{ - "": "ClusterCSIDriverStatus is the observed status of CSI driver operator", -} - -func (ClusterCSIDriverStatus) SwaggerDoc() map[string]string { - return map_ClusterCSIDriverStatus -} - -var map_CustomSecretRotation = map[string]string{ - "": "CustomSecretRotation holds configuration for custom secret rotation behavior.", - "minimumRefreshAge": "minimumRefreshAge is the minimum time in seconds between secret rotation attempts. Each time kubelet calls NodePublishVolume, the driver checks whether this interval has elapsed since the last successful provider call. If it has, the driver contacts the secret provider to fetch the latest secret values and updates the mounted volume. Setting this value below the kubelet syncFrequency (default: 1 minute) has no additional effect on the actual rotation cadence. Must be at least 1 second and no more than 31560000 seconds (~1 year). When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time.", -} - -func (CustomSecretRotation) SwaggerDoc() map[string]string { - return map_CustomSecretRotation -} - -var map_GCPCSIDriverConfigSpec = map[string]string{ - "": "GCPCSIDriverConfigSpec defines properties that can be configured for the GCP CSI driver.", - "kmsKey": "kmsKey sets the cluster default storage class to encrypt volumes with customer-supplied encryption keys, rather than the default keys managed by GCP.", -} - -func (GCPCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_GCPCSIDriverConfigSpec -} - -var map_GCPKMSKeyReference = map[string]string{ - "": "GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key", - "name": "name is the name of the customer-managed encryption key to be used for disk encryption. The value should correspond to an existing KMS key and should consist of only alphanumeric characters, hyphens (-) and underscores (_), and be at most 63 characters in length.", - "keyRing": "keyRing is the name of the KMS Key Ring which the KMS Key belongs to. The value should correspond to an existing KMS key ring and should consist of only alphanumeric characters, hyphens (-) and underscores (_), and be at most 63 characters in length.", - "projectID": "projectID is the ID of the Project in which the KMS Key Ring exists. It must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited.", - "location": "location is the GCP location in which the Key Ring exists. The value must match an existing GCP location, or \"global\". Defaults to global, if not set.", -} - -func (GCPKMSKeyReference) SwaggerDoc() map[string]string { - return map_GCPKMSKeyReference -} - -var map_IBMCloudCSIDriverConfigSpec = map[string]string{ - "": "IBMCloudCSIDriverConfigSpec defines the properties that can be configured for the IBM Cloud CSI driver.", - "encryptionKeyCRN": "encryptionKeyCRN is the IBM Cloud CRN of the customer-managed root key to use for disk encryption of volumes for the default storage classes.", -} - -func (IBMCloudCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_IBMCloudCSIDriverConfigSpec -} - -var map_ManagedTokenRequests = map[string]string{ - "": "ManagedTokenRequests holds the configuration for operator-managed service account token requests.", - "audiences": "audiences specifies service account token audiences that kubelet will provide to the CSI driver during NodePublishVolume calls. These tokens enable workload identity federation (WIF) with cloud providers such as AWS, Azure, and GCP. When empty, the operator clears all tokenRequests from the CSIDriver object.", -} - -func (ManagedTokenRequests) SwaggerDoc() map[string]string { - return map_ManagedTokenRequests -} - -var map_SecretsStoreCSIDriverConfigSpec = map[string]string{ - "": "SecretsStoreCSIDriverConfigSpec defines properties that can be configured for the Secrets Store CSI driver.", - "secretRotation": "secretRotation controls automatic secret rotation behavior. When omitted, secret rotation is enabled with a default poll interval of 2 minutes.", - "tokenRequests": "tokenRequests controls service account token configuration for workload identity federation (WIF) with cloud providers. When omitted, the operator preserves any existing tokenRequests already configured on the CSIDriver object without modification.", -} - -func (SecretsStoreCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_SecretsStoreCSIDriverConfigSpec -} - -var map_SecretsStoreSecretRotation = map[string]string{ - "": "SecretsStoreSecretRotation configures the automatic secret rotation behavior for the Secrets Store CSI driver.", - "type": "type determines the secret rotation behavior. When \"None\", secret rotation is disabled and secrets are only fetched at initial pod mount time. When \"Custom\", secret rotation is enabled with the configuration specified in the custom field.", - "custom": "custom holds the custom rotation configuration. Only valid when type is \"Custom\".", -} - -func (SecretsStoreSecretRotation) SwaggerDoc() map[string]string { - return map_SecretsStoreSecretRotation -} - -var map_SecretsStoreTokenRequest = map[string]string{ - "": "SecretsStoreTokenRequest specifies a service account token audience configuration for workload identity federation (WIF) with the Secrets Store CSI driver.", - "audience": "audience is the intended audience of the service account token. An empty string means the issued token will use the kube-apiserver's default APIAudiences.", - "expirationSeconds": "expirationSeconds is the requested duration of validity of the service account token. The token issuer may return a token with a different validity duration. When omitted, the token expiration is determined by the kube-apiserver. Must be at least 600 seconds (10 minutes) and no more than 315360000 seconds (~10 years).", -} - -func (SecretsStoreTokenRequest) SwaggerDoc() map[string]string { - return map_SecretsStoreTokenRequest -} - -var map_SecretsStoreTokenRequests = map[string]string{ - "": "SecretsStoreTokenRequests configures how service account tokens are provided to the Secrets Store CSI driver for workload identity federation.", - "type": "type determines how the operator manages tokenRequests on the CSIDriver object. When \"Unmanaged\", existing tokenRequests on the CSIDriver are preserved and the managed field is not used. When \"Managed\", the operator sets tokenRequests from the audiences specified in the managed field, replacing any previously configured values. Once set to \"Managed\", type cannot be reverted back to \"Unmanaged\".", - "managed": "managed holds configuration for operator-managed tokenRequests. Only valid when type is \"Managed\".", -} - -func (SecretsStoreTokenRequests) SwaggerDoc() map[string]string { - return map_SecretsStoreTokenRequests -} - -var map_VSphereCSIDriverConfigSpec = map[string]string{ - "": "VSphereCSIDriverConfigSpec defines properties that can be configured for vsphere CSI driver.", - "topologyCategories": "topologyCategories indicates tag categories with which vcenter resources such as hostcluster or datacenter were tagged with. If cluster Infrastructure object has a topology, values specified in Infrastructure object will be used and modifications to topologyCategories will be rejected.", - "globalMaxSnapshotsPerBlockVolume": "globalMaxSnapshotsPerBlockVolume is a global configuration parameter that applies to volumes on all kinds of datastores. If omitted, the platform chooses a default, which is subject to change over time, currently that default is 3. Snapshots can not be disabled using this parameter. Increasing number of snapshots above 3 can have negative impact on performance, for more details see: https://kb.vmware.com/s/article/1025279 Volume snapshot documentation: https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/3.0/vmware-vsphere-csp-getting-started/GUID-E0B41C69-7EEB-450F-A73D-5FD2FF39E891.html", - "granularMaxSnapshotsPerBlockVolumeInVSAN": "granularMaxSnapshotsPerBlockVolumeInVSAN is a granular configuration parameter on vSAN datastore only. It overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. Snapshots for VSAN can not be disabled using this parameter.", - "granularMaxSnapshotsPerBlockVolumeInVVOL": "granularMaxSnapshotsPerBlockVolumeInVVOL is a granular configuration parameter on Virtual Volumes datastore only. It overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. Snapshots for VVOL can not be disabled using this parameter.", - "maxAllowedBlockVolumesPerNode": "maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting a custom value for the limit of the number of PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by default, however in vSphere version 8 this limit was increased to 255. Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the cluster is updated to ESXi version 8 or higher and that all nodes are running the same version. The limit must be between 1 and 255, which matches the vSphere version 8 maximum. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 59, which matches the limit for vSphere version 7.", -} - -func (VSphereCSIDriverConfigSpec) SwaggerDoc() map[string]string { - return map_VSphereCSIDriverConfigSpec -} - -var map_CSISnapshotController = map[string]string{ - "": "CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (CSISnapshotController) SwaggerDoc() map[string]string { - return map_CSISnapshotController -} - -var map_CSISnapshotControllerList = map[string]string{ - "": "CSISnapshotControllerList contains a list of CSISnapshotControllers.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (CSISnapshotControllerList) SwaggerDoc() map[string]string { - return map_CSISnapshotControllerList -} - -var map_CSISnapshotControllerSpec = map[string]string{ - "": "CSISnapshotControllerSpec is the specification of the desired behavior of the CSISnapshotController operator.", -} - -func (CSISnapshotControllerSpec) SwaggerDoc() map[string]string { - return map_CSISnapshotControllerSpec -} - -var map_CSISnapshotControllerStatus = map[string]string{ - "": "CSISnapshotControllerStatus defines the observed status of the CSISnapshotController operator.", -} - -func (CSISnapshotControllerStatus) SwaggerDoc() map[string]string { - return map_CSISnapshotControllerStatus -} - -var map_DNS = map[string]string{ - "": "DNS manages the CoreDNS component to provide a name resolution service for pods and services in the cluster.\n\nThis supports the DNS-based service discovery specification: https://github.com/kubernetes/dns/blob/master/docs/specification.md\n\nMore details: https://kubernetes.io/docs/tasks/administer-cluster/coredns\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the DNS.", - "status": "status is the most recently observed status of the DNS.", -} - -func (DNS) SwaggerDoc() map[string]string { - return map_DNS -} - -var map_DNSCache = map[string]string{ - "": "DNSCache defines the fields for configuring DNS caching.", - "positiveTTL": "positiveTTL is optional and specifies the amount of time that a positive response should be cached.\n\nIf configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"100s\", \"1m30s\", \"12h30m10s\". Values that are fractions of a second are rounded down to the nearest second. If the configured value is less than 1s, the default value will be used. If not configured, the value will be 0s and OpenShift will use a default value of 900 seconds unless noted otherwise in the respective Corefile for your version of OpenShift. The default value of 900 seconds is subject to change.", - "negativeTTL": "negativeTTL is optional and specifies the amount of time that a negative response should be cached.\n\nIf configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"100s\", \"1m30s\", \"12h30m10s\". Values that are fractions of a second are rounded down to the nearest second. If the configured value is less than 1s, the default value will be used. If not configured, the value will be 0s and OpenShift will use a default value of 30 seconds unless noted otherwise in the respective Corefile for your version of OpenShift. The default value of 30 seconds is subject to change.", -} - -func (DNSCache) SwaggerDoc() map[string]string { - return map_DNSCache -} - -var map_DNSList = map[string]string{ - "": "DNSList contains a list of DNS\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (DNSList) SwaggerDoc() map[string]string { - return map_DNSList -} - -var map_DNSNodePlacement = map[string]string{ - "": "DNSNodePlacement describes the node scheduling configuration for DNS pods.", - "nodeSelector": "nodeSelector is the node selector applied to DNS pods.\n\nIf empty, the default is used, which is currently the following:\n\n kubernetes.io/os: linux\n\nThis default is subject to change.\n\nIf set, the specified selector is used and replaces the default.", - "tolerations": "tolerations is a list of tolerations applied to DNS pods.\n\nIf empty, the DNS operator sets a toleration for the \"node-role.kubernetes.io/master\" taint. This default is subject to change. Specifying tolerations without including a toleration for the \"node-role.kubernetes.io/master\" taint may be risky as it could lead to an outage if all worker nodes become unavailable.\n\nNote that the daemon controller adds some tolerations as well. See https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/", -} - -func (DNSNodePlacement) SwaggerDoc() map[string]string { - return map_DNSNodePlacement -} - -var map_DNSOverTLSConfig = map[string]string{ - "": "DNSOverTLSConfig describes optional DNSTransportConfig fields that should be captured.", - "serverName": "serverName is the upstream server to connect to when forwarding DNS queries. This is required when Transport is set to \"TLS\". ServerName will be validated against the DNS naming conventions in RFC 1123 and should match the TLS certificate installed in the upstream resolver(s).", - "caBundle": "caBundle references a ConfigMap that must contain either a single CA Certificate or a CA Bundle. This allows cluster administrators to provide their own CA or CA bundle for validating the certificate of upstream resolvers.\n\n1. The configmap must contain a `ca-bundle.crt` key. 2. The value must be a PEM encoded CA certificate or CA bundle. 3. The administrator must create this configmap in the openshift-config namespace. 4. The upstream server certificate must contain a Subject Alternative Name (SAN) that matches ServerName.", -} - -func (DNSOverTLSConfig) SwaggerDoc() map[string]string { - return map_DNSOverTLSConfig -} - -var map_DNSSpec = map[string]string{ - "": "DNSSpec is the specification of the desired behavior of the DNS.", - "servers": "servers is a list of DNS resolvers that provide name query delegation for one or more subdomains outside the scope of the cluster domain. If servers consists of more than one Server, longest suffix match will be used to determine the Server.\n\nFor example, if there are two Servers, one for \"foo.com\" and another for \"a.foo.com\", and the name query is for \"www.a.foo.com\", it will be routed to the Server with Zone \"a.foo.com\".\n\nIf this field is nil, no servers are created.", - "upstreamResolvers": "upstreamResolvers defines a schema for configuring CoreDNS to proxy DNS messages to upstream resolvers for the case of the default (\".\") server\n\nIf this field is not specified, the upstream used will default to /etc/resolv.conf, with policy \"sequential\"", - "nodePlacement": "nodePlacement provides explicit control over the scheduling of DNS pods.\n\nGenerally, it is useful to run a DNS pod on every node so that DNS queries are always handled by a local DNS pod instead of going over the network to a DNS pod on another node. However, security policies may require restricting the placement of DNS pods to specific nodes. For example, if a security policy prohibits pods on arbitrary nodes from communicating with the API, a node selector can be specified to restrict DNS pods to nodes that are permitted to communicate with the API. Conversely, if running DNS pods on nodes with a particular taint is desired, a toleration can be specified for that taint.\n\nIf unset, defaults are used. See nodePlacement for more details.", - "managementState": "managementState indicates whether the DNS operator should manage cluster DNS", - "operatorLogLevel": "operatorLogLevel controls the logging level of the DNS Operator. Valid values are: \"Normal\", \"Debug\", \"Trace\". Defaults to \"Normal\". setting operatorLogLevel: Trace will produce extremely verbose logs.", - "logLevel": "logLevel describes the desired logging verbosity for CoreDNS. Any one of the following values may be specified: * Normal logs errors from upstream resolvers. * Debug logs errors, NXDOMAIN responses, and NODATA responses. * Trace logs errors and all responses.\n Setting logLevel: Trace will produce extremely verbose logs.\nValid values are: \"Normal\", \"Debug\", \"Trace\". Defaults to \"Normal\".", - "cache": "cache describes the caching configuration that applies to all server blocks listed in the Corefile. This field allows a cluster admin to optionally configure: * positiveTTL which is a duration for which positive responses should be cached. * negativeTTL which is a duration for which negative responses should be cached. If this is not configured, OpenShift will configure positive and negative caching with a default value that is subject to change. At the time of writing, the default positiveTTL is 900 seconds and the default negativeTTL is 30 seconds or as noted in the respective Corefile for your version of OpenShift.", -} - -func (DNSSpec) SwaggerDoc() map[string]string { - return map_DNSSpec -} - -var map_DNSStatus = map[string]string{ - "": "DNSStatus defines the observed status of the DNS.", - "clusterIP": "clusterIP is the service IP through which this DNS is made available.\n\nIn the case of the default DNS, this will be a well known IP that is used as the default nameserver for pods that are using the default ClusterFirst DNS policy.\n\nIn general, this IP can be specified in a pod's spec.dnsConfig.nameservers list or used explicitly when performing name resolution from within the cluster. Example: dig foo.com @\n\nMore info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies", - "clusterDomain": "clusterDomain is the local cluster DNS domain suffix for DNS services. This will be a subdomain as defined in RFC 1034, section 3.5: https://tools.ietf.org/html/rfc1034#section-3.5 Example: \"cluster.local\"\n\nMore info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service", - "conditions": "conditions provide information about the state of the DNS on the cluster.\n\nThese are the supported DNS conditions:\n\n * Available\n - True if the following conditions are met:\n * DNS controller daemonset is available.\n - False if any of those conditions are unsatisfied.", -} - -func (DNSStatus) SwaggerDoc() map[string]string { - return map_DNSStatus -} - -var map_DNSTransportConfig = map[string]string{ - "": "DNSTransportConfig groups related configuration parameters used for configuring forwarding to upstream resolvers that support DNS-over-TLS.", - "transport": "transport allows cluster administrators to opt-in to using a DNS-over-TLS connection between cluster DNS and an upstream resolver(s). Configuring TLS as the transport at this level without configuring a CABundle will result in the system certificates being used to verify the serving certificate of the upstream resolver(s).\n\nPossible values: \"\" (empty) - This means no explicit choice has been made and the platform chooses the default which is subject to change over time. The current default is \"Cleartext\". \"Cleartext\" - Cluster admin specified cleartext option. This results in the same functionality as an empty value but may be useful when a cluster admin wants to be more explicit about the transport, or wants to switch from \"TLS\" to \"Cleartext\" explicitly. \"TLS\" - This indicates that DNS queries should be sent over a TLS connection. If Transport is set to TLS, you MUST also set ServerName. If a port is not included with the upstream IP, port 853 will be tried by default per RFC 7858 section 3.1; https://datatracker.ietf.org/doc/html/rfc7858#section-3.1.", - "tls": "tls contains the additional configuration options to use when Transport is set to \"TLS\".", -} - -func (DNSTransportConfig) SwaggerDoc() map[string]string { - return map_DNSTransportConfig -} - -var map_ForwardPlugin = map[string]string{ - "": "ForwardPlugin defines a schema for configuring the CoreDNS forward plugin.", - "upstreams": "upstreams is a list of resolvers to forward name queries for subdomains of Zones. Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream returns an error during the exchange, another resolver is tried from Upstreams. The Upstreams are selected in the order specified in Policy. Each upstream is represented by an IP address or IP:port if the upstream listens on a port other than 53.\n\nA maximum of 15 upstreams is allowed per ForwardPlugin.", - "policy": "policy is used to determine the order in which upstream servers are selected for querying. Any one of the following values may be specified:\n\n* \"Random\" picks a random upstream server for each query. * \"RoundRobin\" picks upstream servers in a round-robin order, moving to the next server for each new query. * \"Sequential\" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query.\n\nThe default value is \"Random\"", - "transportConfig": "transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use when forwarding DNS requests to an upstream resolver.\n\nThe default value is \"\" (empty) which results in a standard cleartext connection being used when forwarding DNS requests to an upstream resolver.", - "protocolStrategy": "protocolStrategy specifies the protocol to use for upstream DNS requests. Valid values for protocolStrategy are \"TCP\" and omitted. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is to use the protocol of the original client request. \"TCP\" specifies that the platform should use TCP for all upstream DNS requests, even if the client request uses UDP. \"TCP\" is useful for UDP-specific issues such as those created by non-compliant upstream resolvers, but may consume more bandwidth or increase DNS response time. Note that protocolStrategy only affects the protocol of DNS requests that CoreDNS makes to upstream resolvers. It does not affect the protocol of DNS requests between clients and CoreDNS.", -} - -func (ForwardPlugin) SwaggerDoc() map[string]string { - return map_ForwardPlugin -} - -var map_Server = map[string]string{ - "": "Server defines the schema for a server that runs per instance of CoreDNS.", - "name": "name is required and specifies a unique name for the server. Name must comply with the Service Name Syntax of rfc6335.", - "zones": "zones is required and specifies the subdomains that Server is authoritative for. Zones must conform to the rfc1123 definition of a subdomain. Specifying the cluster domain (i.e., \"cluster.local\") is invalid.", - "forwardPlugin": "forwardPlugin defines a schema for configuring CoreDNS to proxy DNS messages to upstream resolvers.", -} - -func (Server) SwaggerDoc() map[string]string { - return map_Server -} - -var map_Upstream = map[string]string{ - "": "Upstream can either be of type SystemResolvConf, or of type Network.\n\n - For an Upstream of type SystemResolvConf, no further fields are necessary:\n The upstream will be configured to use /etc/resolv.conf.\n - For an Upstream of type Network, a NetworkResolver field needs to be defined\n with an IP address or IP:port if the upstream listens on a port other than 53.", - "type": "type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. Type accepts 2 possible values: SystemResolvConf or Network.\n\n* When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined:\n /etc/resolv.conf will be used\n* When Network is used, the Upstream structure must contain at least an Address", - "address": "address must be defined when Type is set to Network. It will be ignored otherwise. It must be a valid ipv4 or ipv6 address.", - "port": "port may be defined when Type is set to Network. It will be ignored otherwise. Port must be between 65535", -} - -func (Upstream) SwaggerDoc() map[string]string { - return map_Upstream -} - -var map_UpstreamResolvers = map[string]string{ - "": "UpstreamResolvers defines a schema for configuring the CoreDNS forward plugin in the specific case of the default (\".\") server. It defers from ForwardPlugin in the default values it accepts: * At least one upstream should be specified. * the default policy is Sequential", - "upstreams": "upstreams is a list of resolvers to forward name queries for the \".\" domain. Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream returns an error during the exchange, another resolver is tried from Upstreams. The Upstreams are selected in the order specified in Policy.\n\nA maximum of 15 upstreams is allowed per ForwardPlugin. If no Upstreams are specified, /etc/resolv.conf is used by default", - "policy": "policy is used to determine the order in which upstream servers are selected for querying. Any one of the following values may be specified:\n\n* \"Random\" picks a random upstream server for each query. * \"RoundRobin\" picks upstream servers in a round-robin order, moving to the next server for each new query. * \"Sequential\" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query.\n\nThe default value is \"Sequential\"", - "transportConfig": "transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use when forwarding DNS requests to an upstream resolver.\n\nThe default value is \"\" (empty) which results in a standard cleartext connection being used when forwarding DNS requests to an upstream resolver.", - "protocolStrategy": "protocolStrategy specifies the protocol to use for upstream DNS requests. Valid values for protocolStrategy are \"TCP\" and omitted. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is to use the protocol of the original client request. \"TCP\" specifies that the platform should use TCP for all upstream DNS requests, even if the client request uses UDP. \"TCP\" is useful for UDP-specific issues such as those created by non-compliant upstream resolvers, but may consume more bandwidth or increase DNS response time. Note that protocolStrategy only affects the protocol of DNS requests that CoreDNS makes to upstream resolvers. It does not affect the protocol of DNS requests between clients and CoreDNS.", -} - -func (UpstreamResolvers) SwaggerDoc() map[string]string { - return map_UpstreamResolvers -} - -var map_Etcd = map[string]string{ - "": "Etcd provides information to configure an operator to manage etcd.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Etcd) SwaggerDoc() map[string]string { - return map_Etcd -} - -var map_EtcdList = map[string]string{ - "": "KubeAPISOperatorConfigList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (EtcdList) SwaggerDoc() map[string]string { - return map_EtcdList -} - -var map_EtcdSpec = map[string]string{ - "controlPlaneHardwareSpeed": "HardwareSpeed allows user to change the etcd tuning profile which configures the latency parameters for heartbeat interval and leader election timeouts allowing the cluster to tolerate longer round-trip-times between etcd members. Valid values are \"\", \"Standard\" and \"Slower\".\n\t\"\" means no opinion and the platform is left to choose a reasonable default\n\twhich is subject to change without notice.", - "backendQuotaGiB": "backendQuotaGiB sets the etcd backend storage size limit in gibibytes. The value should be an integer not less than 8 and not more than 16. When not specified, the default value is 8.", -} - -func (EtcdSpec) SwaggerDoc() map[string]string { - return map_EtcdSpec -} - -var map_AWSClassicLoadBalancerParameters = map[string]string{ - "": "AWSClassicLoadBalancerParameters holds configuration parameters for an AWS Classic load balancer.", - "connectionIdleTimeout": "connectionIdleTimeout specifies the maximum time period that a connection may be idle before the load balancer closes the connection. The value must be parseable as a time duration value; see . A nil or zero value means no opinion, in which case a default value is used. The default value for this field is 60s. This default is subject to change.", - "subnets": "subnets specifies the subnets to which the load balancer will attach. The subnets may be specified by either their ID or name. The total number of subnets is limited to 10.\n\nIn order for the load balancer to be provisioned with subnets, each subnet must exist, each subnet must be from a different availability zone, and the load balancer service must be recreated to pick up new values.\n\nWhen omitted from the spec, the subnets will be auto-discovered for each availability zone. Auto-discovered subnets are not reported in the status of the IngressController object.", -} - -func (AWSClassicLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_AWSClassicLoadBalancerParameters -} - -var map_AWSLoadBalancerParameters = map[string]string{ - "": "AWSLoadBalancerParameters provides configuration settings that are specific to AWS load balancers.", - "type": "type is the type of AWS load balancer to instantiate for an ingresscontroller.\n\nValid values are:\n\n* \"Classic\": A Classic Load Balancer that makes routing decisions at either\n the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See\n the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb\n\n* \"NLB\": A Network Load Balancer that makes routing decisions at the\n transport layer (TCP/SSL). See the following for additional details:\n\n https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb", - "classicLoadBalancer": "classicLoadBalancerParameters holds configuration parameters for an AWS classic load balancer. Present only if type is Classic.", - "networkLoadBalancer": "networkLoadBalancerParameters holds configuration parameters for an AWS network load balancer. Present only if type is NLB.", -} - -func (AWSLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_AWSLoadBalancerParameters -} - -var map_AWSNetworkLoadBalancerParameters = map[string]string{ - "": "AWSNetworkLoadBalancerParameters holds configuration parameters for an AWS Network load balancer. For Example: Setting AWS EIPs https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html", - "subnets": "subnets specifies the subnets to which the load balancer will attach. The subnets may be specified by either their ID or name. The total number of subnets is limited to 10.\n\nIn order for the load balancer to be provisioned with subnets, each subnet must exist, each subnet must be from a different availability zone, and the load balancer service must be recreated to pick up new values.\n\nWhen omitted from the spec, the subnets will be auto-discovered for each availability zone. Auto-discovered subnets are not reported in the status of the IngressController object.", - "eipAllocations": "eipAllocations is a list of IDs for Elastic IP (EIP) addresses that are assigned to the Network Load Balancer. The following restrictions apply:\n\neipAllocations can only be used with external scope, not internal. An EIP can be allocated to only a single IngressController. The number of EIP allocations must match the number of subnets that are used for the load balancer. Each EIP allocation must be unique. A maximum of 10 EIP allocations are permitted.\n\nSee https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html for general information about configuration, characteristics, and limitations of Elastic IP addresses.", - "protocol": "protocol specifies whether the Network Load Balancer uses PROXY protocol to forward connections to the IngressController.\n\nWhen set to \"TCP\", the NLB uses AWS's native client IP preservation. This may cause hairpin connection failures for internal load balancers when connections are made from pods to router pods on the same node.\n\nWhen set to \"PROXY\", the NLB disables native client IP preservation and uses PROXY protocol v2. The IngressController enables PROXY protocol on HAProxy so that it can parse PROXY protocol headers to obtain the original client IP. This avoids hairpin connection failures.\n\nThe following values are valid for this field:\n\n* \"TCP\". * \"PROXY\".\n\nWhen omitted, this means the user has no opinion and the value is left to the platform to choose a reasonable default, which is subject to change over time. The current default is \"PROXY\".\n\nNote that changing this field may cause brief connection failures during the transition as the NLB attribute change and router rollout occur independently.", -} - -func (AWSNetworkLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_AWSNetworkLoadBalancerParameters -} - -var map_AWSSubnets = map[string]string{ - "": "AWSSubnets contains a list of references to AWS subnets by ID or name.", - "ids": "ids specifies a list of AWS subnets by subnet ID. Subnet IDs must start with \"subnet-\", consist only of alphanumeric characters, must be exactly 24 characters long, must be unique, and the total number of subnets specified by ids and names must not exceed 10.", - "names": "names specifies a list of AWS subnets by subnet name. Subnet names must not start with \"subnet-\", must not include commas, must be under 256 characters in length, must be unique, and the total number of subnets specified by ids and names must not exceed 10.", -} - -func (AWSSubnets) SwaggerDoc() map[string]string { - return map_AWSSubnets -} - -var map_AccessLogging = map[string]string{ - "": "AccessLogging describes how client requests should be logged.", - "destination": "destination is where access logs go.", - "httpLogFormat": "httpLogFormat specifies the format of the log message for an HTTP request.\n\nIf this field is empty, log messages use the implementation's default HTTP log format. For HAProxy's default HTTP log format, see the HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3\n\nNote that this format only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). It does not affect the log format for TLS passthrough connections.", - "httpCaptureHeaders": "httpCaptureHeaders defines HTTP headers that should be captured in access logs. If this field is empty, no headers are captured.\n\nNote that this option only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). Headers cannot be captured for TLS passthrough connections.", - "httpCaptureCookies": "httpCaptureCookies specifies HTTP cookies that should be captured in access logs. If this field is empty, no cookies are captured.", - "logEmptyRequests": "logEmptyRequests specifies how connections on which no request is received should be logged. Typically, these empty requests come from load balancers' health probes or Web browsers' speculative connections (\"preconnect\"), in which case logging these requests may be undesirable. However, these requests may also be caused by network errors, in which case logging empty requests may be useful for diagnosing the errors. In addition, these requests may be caused by port scans, in which case logging empty requests may aid in detecting intrusion attempts. Allowed values for this field are \"Log\" and \"Ignore\". The default value is \"Log\".", -} - -func (AccessLogging) SwaggerDoc() map[string]string { - return map_AccessLogging -} - -var map_ClientTLS = map[string]string{ - "": "ClientTLS specifies TLS configuration to enable client-to-server authentication, which can be used for mutual TLS.", - "clientCertificatePolicy": "clientCertificatePolicy specifies whether the ingress controller requires clients to provide certificates. This field accepts the values \"Required\" or \"Optional\".\n\nNote that the ingress controller only checks client certificates for edge-terminated and reencrypt TLS routes; it cannot check certificates for cleartext HTTP or passthrough TLS routes.", - "clientCA": "clientCA specifies a configmap containing the PEM-encoded CA certificate bundle that should be used to verify a client's certificate. The administrator must create this configmap in the openshift-config namespace.", - "allowedSubjectPatterns": "allowedSubjectPatterns specifies a list of regular expressions that should be matched against the distinguished name on a valid client certificate to filter requests. The regular expressions must use PCRE syntax. If this list is empty, no filtering is performed. If the list is nonempty, then at least one pattern must match a client certificate's distinguished name or else the ingress controller rejects the certificate and denies the connection.", -} - -func (ClientTLS) SwaggerDoc() map[string]string { - return map_ClientTLS -} - -var map_ContainerLoggingDestinationParameters = map[string]string{ - "": "ContainerLoggingDestinationParameters describes parameters for the Container logging destination type.", - "maxLength": "maxLength is the maximum length of the log message.\n\nValid values are integers in the range 480 to 8192, inclusive.\n\nWhen omitted, the default value is 1024.", -} - -func (ContainerLoggingDestinationParameters) SwaggerDoc() map[string]string { - return map_ContainerLoggingDestinationParameters -} - -var map_EndpointPublishingStrategy = map[string]string{ - "": "EndpointPublishingStrategy is a way to publish the endpoints of an IngressController, and represents the type and any additional configuration for a specific type.", - "type": "type is the publishing strategy to use. Valid values are:\n\n* LoadBalancerService\n\nPublishes the ingress controller using a Kubernetes LoadBalancer Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A LoadBalancer Service is created to publish the deployment.\n\nSee: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer\n\nIf domain is set, a wildcard DNS record will be managed to point at the LoadBalancer Service's external name. DNS records are managed only in DNS zones defined by dns.config.openshift.io/cluster .spec.publicZone and .spec.privateZone.\n\nWildcard DNS management is currently supported only on the AWS, Azure, and GCP platforms.\n\n* HostNetwork\n\nPublishes the ingress controller on node ports where the ingress controller is deployed.\n\nIn this configuration, the ingress controller deployment uses host networking, bound to node ports 80 and 443. The user is responsible for configuring an external load balancer to publish the ingress controller via the node ports.\n\n* Private\n\nDoes not publish the ingress controller.\n\nIn this configuration, the ingress controller deployment uses container networking, and is not explicitly published. The user must manually publish the ingress controller.\n\n* NodePortService\n\nPublishes the ingress controller using a Kubernetes NodePort Service.\n\nIn this configuration, the ingress controller deployment uses container networking. A NodePort Service is created to publish the deployment. The specific node ports are dynamically allocated by OpenShift; however, to support static port allocations, user changes to the node port field of the managed NodePort Service will preserved.", - "loadBalancer": "loadBalancer holds parameters for the load balancer. Present only if type is LoadBalancerService.", - "hostNetwork": "hostNetwork holds parameters for the HostNetwork endpoint publishing strategy. Present only if type is HostNetwork.", - "private": "private holds parameters for the Private endpoint publishing strategy. Present only if type is Private.", - "nodePort": "nodePort holds parameters for the NodePortService endpoint publishing strategy. Present only if type is NodePortService.", -} - -func (EndpointPublishingStrategy) SwaggerDoc() map[string]string { - return map_EndpointPublishingStrategy -} - -var map_GCPLoadBalancerParameters = map[string]string{ - "": "GCPLoadBalancerParameters provides configuration settings that are specific to GCP load balancers.", - "clientAccess": "clientAccess describes how client access is restricted for internal load balancers.\n\nValid values are: * \"Global\": Specifying an internal load balancer with Global client access\n allows clients from any region within the VPC to communicate with the load\n balancer.\n\n https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access\n\n* \"Local\": Specifying an internal load balancer with Local client access\n means only clients within the same region (and VPC) as the GCP load balancer\n can communicate with the load balancer. Note that this is the default behavior.\n\n https://cloud.google.com/load-balancing/docs/internal#client_access", -} - -func (GCPLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_GCPLoadBalancerParameters -} - -var map_HTTPCompressionPolicy = map[string]string{ - "": "httpCompressionPolicy turns on compression for the specified MIME types.\n\nThis field is optional, and its absence implies that compression should not be enabled globally in HAProxy.\n\nIf httpCompressionPolicy exists, compression should be enabled only for the specified MIME types.", - "mimeTypes": "mimeTypes is a list of MIME types that should have compression applied. This list can be empty, in which case the ingress controller does not apply compression.\n\nNote: Not all MIME types benefit from compression, but HAProxy will still use resources to try to compress if instructed to. Generally speaking, text (html, css, js, etc.) formats benefit from compression, but formats that are already compressed (image, audio, video, etc.) benefit little in exchange for the time and cpu spent on compressing again. See https://joehonton.medium.com/the-gzip-penalty-d31bd697f1a2", -} - -func (HTTPCompressionPolicy) SwaggerDoc() map[string]string { - return map_HTTPCompressionPolicy -} - -var map_HostNetworkStrategy = map[string]string{ - "": "HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing strategy.", - "protocol": "protocol specifies whether the IngressController expects incoming connections to use plain TCP or whether the IngressController expects PROXY protocol.\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nThe following values are valid for this field:\n\n* The empty string. * \"TCP\". * \"PROXY\".\n\nThe empty string specifies the default, which is TCP without PROXY protocol. Note that the default is subject to change.", - "httpPort": "httpPort is the port on the host which should be used to listen for HTTP requests. This field should be set when port 80 is already in use. The value should not coincide with the NodePort range of the cluster. When the value is 0 or is not specified it defaults to 80.", - "httpsPort": "httpsPort is the port on the host which should be used to listen for HTTPS requests. This field should be set when port 443 is already in use. The value should not coincide with the NodePort range of the cluster. When the value is 0 or is not specified it defaults to 443.", - "statsPort": "statsPort is the port on the host where the stats from the router are published. The value should not coincide with the NodePort range of the cluster. If an external load balancer is configured to forward connections to this IngressController, the load balancer should use this port for health checks. The load balancer can send HTTP probes on this port on a given node, with the path /healthz/ready to determine if the ingress controller is ready to receive traffic on the node. For proper operation the load balancer must not forward traffic to a node until the health check reports ready. The load balancer should also stop forwarding requests within a maximum of 45 seconds after /healthz/ready starts reporting not-ready. Probing every 5 to 10 seconds, with a 5-second timeout and with a threshold of two successful or failed requests to become healthy or unhealthy respectively, are well-tested values. When the value is 0 or is not specified it defaults to 1936.", -} - -func (HostNetworkStrategy) SwaggerDoc() map[string]string { - return map_HostNetworkStrategy -} - -var map_IBMLoadBalancerParameters = map[string]string{ - "": "IBMLoadBalancerParameters provides configuration settings that are specific to IBM Cloud load balancers.", - "protocol": "protocol specifies whether the load balancer uses PROXY protocol to forward connections to the IngressController. See \"service.kubernetes.io/ibm-load-balancer-cloud-provider-enable-features: \"proxy-protocol\"\" at https://cloud.ibm.com/docs/containers?topic=containers-vpc-lbaas\"\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nValid values for protocol are TCP, PROXY and omitted. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is TCP, without the proxy protocol enabled.", -} - -func (IBMLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_IBMLoadBalancerParameters -} - -var map_IngressController = map[string]string{ - "": "IngressController describes a managed ingress controller for the cluster. The controller can service OpenShift Route and Kubernetes Ingress resources.\n\nWhen an IngressController is created, a new ingress controller deployment is created to allow external traffic to reach the services that expose Ingress or Route resources. Updating this resource may lead to disruption for public facing network connections as a new ingress controller revision may be rolled out.\n\nhttps://kubernetes.io/docs/concepts/services-networking/ingress-controllers\n\nWhenever possible, sensible defaults for the platform are used. See each field for more details.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the IngressController.", - "status": "status is the most recently observed status of the IngressController.", -} - -func (IngressController) SwaggerDoc() map[string]string { - return map_IngressController -} - -var map_IngressControllerCaptureHTTPCookie = map[string]string{ - "": "IngressControllerCaptureHTTPCookie describes an HTTP cookie that should be captured.", - "maxLength": "maxLength specifies a maximum length of the string that will be logged, which includes the cookie name, cookie value, and one-character delimiter. If the log entry exceeds this length, the value will be truncated in the log message. Note that the ingress controller may impose a separate bound on the total length of HTTP headers in a request.", -} - -func (IngressControllerCaptureHTTPCookie) SwaggerDoc() map[string]string { - return map_IngressControllerCaptureHTTPCookie -} - -var map_IngressControllerCaptureHTTPCookieUnion = map[string]string{ - "": "IngressControllerCaptureHTTPCookieUnion describes optional fields of an HTTP cookie that should be captured.", - "matchType": "matchType specifies the type of match to be performed on the cookie name. Allowed values are \"Exact\" for an exact string match and \"Prefix\" for a string prefix match. If \"Exact\" is specified, a name must be specified in the name field. If \"Prefix\" is provided, a prefix must be specified in the namePrefix field. For example, specifying matchType \"Prefix\" and namePrefix \"foo\" will capture a cookie named \"foo\" or \"foobar\" but not one named \"bar\". The first matching cookie is captured.", - "name": "name specifies a cookie name. Its value must be a valid HTTP cookie name as defined in RFC 6265 section 4.1.", - "namePrefix": "namePrefix specifies a cookie name prefix. Its value must be a valid HTTP cookie name as defined in RFC 6265 section 4.1.", -} - -func (IngressControllerCaptureHTTPCookieUnion) SwaggerDoc() map[string]string { - return map_IngressControllerCaptureHTTPCookieUnion -} - -var map_IngressControllerCaptureHTTPHeader = map[string]string{ - "": "IngressControllerCaptureHTTPHeader describes an HTTP header that should be captured.", - "name": "name specifies a header name. Its value must be a valid HTTP header name as defined in RFC 2616 section 4.2.", - "maxLength": "maxLength specifies a maximum length for the header value. If a header value exceeds this length, the value will be truncated in the log message. Note that the ingress controller may impose a separate bound on the total length of HTTP headers in a request.", -} - -func (IngressControllerCaptureHTTPHeader) SwaggerDoc() map[string]string { - return map_IngressControllerCaptureHTTPHeader -} - -var map_IngressControllerCaptureHTTPHeaders = map[string]string{ - "": "IngressControllerCaptureHTTPHeaders specifies which HTTP headers the IngressController captures.", - "request": "request specifies which HTTP request headers to capture.\n\nIf this field is empty, no request headers are captured.", - "response": "response specifies which HTTP response headers to capture.\n\nIf this field is empty, no response headers are captured.", -} - -func (IngressControllerCaptureHTTPHeaders) SwaggerDoc() map[string]string { - return map_IngressControllerCaptureHTTPHeaders -} - -var map_IngressControllerHTTPHeader = map[string]string{ - "": "IngressControllerHTTPHeader specifies configuration for setting or deleting an HTTP header.", - "name": "name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header name as defined in RFC 2616 section 4.2. The name must consist only of alphanumeric and the following special characters, \"-!#$%&'*+.^_`\". The following header names are reserved and may not be modified via this API: Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. It must be no more than 255 characters in length. Header name must be unique.", - "action": "action specifies actions to perform on headers, such as setting or deleting headers.", -} - -func (IngressControllerHTTPHeader) SwaggerDoc() map[string]string { - return map_IngressControllerHTTPHeader -} - -var map_IngressControllerHTTPHeaderActionUnion = map[string]string{ - "": "IngressControllerHTTPHeaderActionUnion specifies an action to take on an HTTP header.", - "type": "type defines the type of the action to be applied on the header. Possible values are Set or Delete. Set allows you to set HTTP request and response headers. Delete allows you to delete HTTP request and response headers.", - "set": "set specifies how the HTTP header should be set. This field is required when type is Set and forbidden otherwise.", -} - -func (IngressControllerHTTPHeaderActionUnion) SwaggerDoc() map[string]string { - return map_IngressControllerHTTPHeaderActionUnion -} - -var map_IngressControllerHTTPHeaderActions = map[string]string{ - "": "IngressControllerHTTPHeaderActions defines configuration for actions on HTTP request and response headers.", - "response": "response is a list of HTTP response headers to modify. Actions defined here will modify the response headers of all requests passing through an ingress controller. These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. IngressController actions for response headers will be executed after Route actions. Currently, actions may define to either `Set` or `Delete` headers values. Actions are applied in sequence as defined in this list. A maximum of 20 response header actions may be configured. Sample fetchers allowed are \"res.hdr\" and \"ssl_c_der\". Converters allowed are \"lower\" and \"base64\". Example header values: \"%[res.hdr(X-target),lower]\", \"%{+Q}[ssl_c_der,base64]\".", - "request": "request is a list of HTTP request headers to modify. Actions defined here will modify the request headers of all requests passing through an ingress controller. These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. IngressController actions for request headers will be executed before Route actions. Currently, actions may define to either `Set` or `Delete` headers values. Actions are applied in sequence as defined in this list. A maximum of 20 request header actions may be configured. Sample fetchers allowed are \"req.hdr\" and \"ssl_c_der\". Converters allowed are \"lower\" and \"base64\". Example header values: \"%[req.hdr(X-target),lower]\", \"%{+Q}[ssl_c_der,base64]\". ", -} - -func (IngressControllerHTTPHeaderActions) SwaggerDoc() map[string]string { - return map_IngressControllerHTTPHeaderActions -} - -var map_IngressControllerHTTPHeaders = map[string]string{ - "": "IngressControllerHTTPHeaders specifies how the IngressController handles certain HTTP headers.", - "forwardedHeaderPolicy": "forwardedHeaderPolicy specifies when and how the IngressController sets the Forwarded, X-Forwarded-For, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version HTTP headers. The value may be one of the following:\n\n* \"Append\", which specifies that the IngressController appends the\n headers, preserving existing headers.\n\n* \"Replace\", which specifies that the IngressController sets the\n headers, replacing any existing Forwarded or X-Forwarded-* headers.\n\n* \"IfNone\", which specifies that the IngressController sets the\n headers if they are not already set.\n\n* \"Never\", which specifies that the IngressController never sets the\n headers, preserving any existing headers.\n\nBy default, the policy is \"Append\".", - "uniqueId": "uniqueId describes configuration for a custom HTTP header that the ingress controller should inject into incoming HTTP requests. Typically, this header is configured to have a value that is unique to the HTTP request. The header can be used by applications or included in access logs to facilitate tracing individual HTTP requests.\n\nIf this field is empty, no such header is injected into requests.", - "headerNameCaseAdjustments": "headerNameCaseAdjustments specifies case adjustments that can be applied to HTTP header names. Each adjustment is specified as an HTTP header name with the desired capitalization. For example, specifying \"X-Forwarded-For\" indicates that the \"x-forwarded-for\" HTTP header should be adjusted to have the specified capitalization.\n\nThese adjustments are only applied to cleartext, edge-terminated, and re-encrypt routes, and only when using HTTP/1.\n\nFor request headers, these adjustments are applied only for routes that have the haproxy.router.openshift.io/h1-adjust-case=true annotation. For response headers, these adjustments are applied to all HTTP responses.\n\nIf this field is empty, no request headers are adjusted.", - "actions": "actions specifies options for modifying headers and their values. Note that this option only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). Headers cannot be modified for TLS passthrough connections. Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. `Strict-Transport-Security` may only be configured using the \"haproxy.router.openshift.io/hsts_header\" route annotation, and only in accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. Any actions defined here are applied after any actions related to the following other fields: cache-control, spec.clientTLS, spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, and spec.httpHeaders.headerNameCaseAdjustments. In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after the actions specified in the IngressController's spec.httpHeaders.actions field. In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be executed after the actions specified in the Route's spec.httpHeaders.actions field. Headers set using this API cannot be captured for use in access logs. The following header names are reserved and may not be modified via this API: Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. Note that the total size of all net added headers *after* interpolating dynamic values must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the IngressController. Please refer to the documentation for that API field for more details.", -} - -func (IngressControllerHTTPHeaders) SwaggerDoc() map[string]string { - return map_IngressControllerHTTPHeaders -} - -var map_IngressControllerHTTPUniqueIdHeaderPolicy = map[string]string{ - "": "IngressControllerHTTPUniqueIdHeaderPolicy describes configuration for a unique id header.", - "name": "name specifies the name of the HTTP header (for example, \"unique-id\") that the ingress controller should inject into HTTP requests. The field's value must be a valid HTTP header name as defined in RFC 2616 section 4.2. If the field is empty, no header is injected.", - "format": "format specifies the format for the injected HTTP header's value. This field has no effect unless name is specified. For the HAProxy-based ingress controller implementation, this format uses the same syntax as the HTTP log format. If the field is empty, the default value is \"%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid\"; see the corresponding HAProxy documentation: http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3", -} - -func (IngressControllerHTTPUniqueIdHeaderPolicy) SwaggerDoc() map[string]string { - return map_IngressControllerHTTPUniqueIdHeaderPolicy -} - -var map_IngressControllerList = map[string]string{ - "": "IngressControllerList contains a list of IngressControllers.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (IngressControllerList) SwaggerDoc() map[string]string { - return map_IngressControllerList -} - -var map_IngressControllerLogging = map[string]string{ - "": "IngressControllerLogging describes what should be logged where.", - "access": "access describes how the client requests should be logged.\n\nIf this field is empty, access logging is disabled.", -} - -func (IngressControllerLogging) SwaggerDoc() map[string]string { - return map_IngressControllerLogging -} - -var map_IngressControllerSetHTTPHeader = map[string]string{ - "": "IngressControllerSetHTTPHeader defines the value which needs to be set on an HTTP header.", - "value": "value specifies a header value. Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. The value of this field must be no more than 16384 characters in length. Note that the total size of all net added headers *after* interpolating dynamic values must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the IngressController. ", -} - -func (IngressControllerSetHTTPHeader) SwaggerDoc() map[string]string { - return map_IngressControllerSetHTTPHeader -} - -var map_IngressControllerSpec = map[string]string{ - "": "IngressControllerSpec is the specification of the desired behavior of the IngressController.", - "domain": "domain is a DNS name serviced by the ingress controller and is used to configure multiple features:\n\n* For the LoadBalancerService endpoint publishing strategy, domain is\n used to configure DNS records. See endpointPublishingStrategy.\n\n* When using a generated default certificate, the certificate will be valid\n for domain and its subdomains. See defaultCertificate.\n\n* The value is published to individual Route statuses so that end-users\n know where to target external DNS records.\n\ndomain must be unique among all IngressControllers, and cannot be updated.\n\nIf empty, defaults to ingress.config.openshift.io/cluster .spec.domain.\n\nThe domain value must be a valid DNS name. It must consist of lowercase alphanumeric characters, '-' or '.', and each label must start and end with an alphanumeric character and not exceed 63 characters. Maximum length of a valid DNS domain is 253 characters.\n\nThe implementation may add a prefix such as \"router-default.\" to the domain when constructing the router canonical hostname. To ensure the resulting hostname does not exceed the DNS maximum length of 253 characters, the domain length is additionally validated at the IngressController object level. For the maximum length of the domain value itself, the shortest possible variant of the prefix and the ingress controller name was considered for example \"router-a.\"", - "httpErrorCodePages": "httpErrorCodePages specifies a configmap with custom error pages. The administrator must create this configmap in the openshift-config namespace. This configmap should have keys in the format \"error-page-.http\", where is an HTTP error code. For example, \"error-page-503.http\" defines an error page for HTTP 503 responses. Currently only error pages for 503 and 404 responses can be customized. Each value in the configmap should be the full response, including HTTP headers. Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http If this field is empty, the ingress controller uses the default error pages.", - "replicas": "replicas is the desired number of ingress controller replicas. If unset, the default depends on the value of the defaultPlacement field in the cluster config.openshift.io/v1/ingresses status.\n\nThe value of replicas is set based on the value of a chosen field in the Infrastructure CR. If defaultPlacement is set to ControlPlane, the chosen field will be controlPlaneTopology. If it is set to Workers the chosen field will be infrastructureTopology. Replicas will then be set to 1 or 2 based whether the chosen field's value is SingleReplica or HighlyAvailable, respectively.\n\nThese defaults are subject to change.", - "endpointPublishingStrategy": "endpointPublishingStrategy is used to publish the ingress controller endpoints to other networks, enable load balancer integrations, etc.\n\nIf unset, the default is based on infrastructure.config.openshift.io/cluster .status.platform:\n\n AWS: LoadBalancerService (with External scope)\n Azure: LoadBalancerService (with External scope)\n GCP: LoadBalancerService (with External scope)\n IBMCloud: LoadBalancerService (with External scope)\n AlibabaCloud: LoadBalancerService (with External scope)\n Libvirt: HostNetwork\n\nAny other platform types (including None) default to HostNetwork.\n\nendpointPublishingStrategy cannot be updated.", - "defaultCertificate": "defaultCertificate is a reference to a secret containing the default certificate served by the ingress controller. When Routes don't specify their own certificate, defaultCertificate is used.\n\nThe secret must contain the following keys and data:\n\n tls.crt: certificate file contents\n tls.key: key file contents\n\nIf unset, a wildcard certificate is automatically generated and used. The certificate is valid for the ingress controller domain (and subdomains) and the generated certificate's CA will be automatically integrated with the cluster's trust store.\n\nIf a wildcard certificate is used and shared by multiple HTTP/2 enabled routes (which implies ALPN) then clients (i.e., notably browsers) are at liberty to reuse open connections. This means a client can reuse a connection to another route and that is likely to fail. This behaviour is generally known as connection coalescing.\n\nThe in-use certificate (whether generated or user-specified) will be automatically integrated with OpenShift's built-in OAuth server.", - "namespaceSelector": "namespaceSelector is used to filter the set of namespaces serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", - "routeSelector": "routeSelector is used to filter the set of Routes serviced by the ingress controller. This is useful for implementing shards.\n\nIf unset, the default is no filtering.", - "nodePlacement": "nodePlacement enables explicit control over the scheduling of the ingress controller.\n\nIf unset, defaults are used. See NodePlacement for more details.", - "tlsSecurityProfile": "tlsSecurityProfile specifies settings for TLS connections for ingresscontrollers.\n\nIf unset, the default is based on the apiservers.config.openshift.io/cluster resource.\n\nNote that when using the Old, Intermediate, and Modern profile types, the effective profile configuration is subject to change between releases. For example, given a specification to use the Intermediate profile deployed on release X.Y.Z, an upgrade to release X.Y.Z+1 may cause a new profile configuration to be applied to the ingress controller, resulting in a rollout.", - "clientTLS": "clientTLS specifies settings for requesting and verifying client certificates, which can be used to enable mutual TLS for edge-terminated and reencrypt routes.", - "routeAdmission": "routeAdmission defines a policy for handling new route claims (for example, to allow or deny claims across namespaces).\n\nIf empty, defaults will be applied. See specific routeAdmission fields for details about their defaults.", - "logging": "logging defines parameters for what should be logged where. If this field is empty, operational logs are enabled but access logs are disabled.", - "httpHeaders": "httpHeaders defines policy for HTTP headers.\n\nIf this field is empty, the default values are used.", - "httpEmptyRequestsPolicy": "httpEmptyRequestsPolicy describes how HTTP connections should be handled if the connection times out before a request is received. Allowed values for this field are \"Respond\" and \"Ignore\". If the field is set to \"Respond\", the ingress controller sends an HTTP 400 or 408 response, logs the connection (if access logging is enabled), and counts the connection in the appropriate metrics. If the field is set to \"Ignore\", the ingress controller closes the connection without sending a response, logging the connection, or incrementing metrics. The default value is \"Respond\".\n\nTypically, these connections come from load balancers' health probes or Web browsers' speculative connections (\"preconnect\") and can be safely ignored. However, these requests may also be caused by network errors, and so setting this field to \"Ignore\" may impede detection and diagnosis of problems. In addition, these requests may be caused by port scans, in which case logging empty requests may aid in detecting intrusion attempts.", - "tuningOptions": "tuningOptions defines parameters for adjusting the performance of ingress controller pods. All fields are optional and will use their respective defaults if not set. See specific tuningOptions fields for more details.\n\nSetting fields within tuningOptions is generally not recommended. The default values are suitable for most configurations.", - "unsupportedConfigOverrides": "unsupportedConfigOverrides allows specifying unsupported configuration options. Its use is unsupported.", - "httpCompression": "httpCompression defines a policy for HTTP traffic compression. By default, there is no HTTP compression.", - "idleConnectionTerminationPolicy": "idleConnectionTerminationPolicy maps directly to HAProxy's idle-close-on-response option and controls whether HAProxy keeps idle frontend connections open during a soft stop (router reload).\n\nAllowed values for this field are \"Immediate\" and \"Deferred\". The default value is \"Immediate\".\n\nWhen set to \"Immediate\", idle connections are closed immediately during router reloads. This ensures immediate propagation of route changes but may impact clients sensitive to connection resets.\n\nWhen set to \"Deferred\", HAProxy will maintain idle connections during a soft reload instead of closing them immediately. These connections remain open until any of the following occurs:\n\n - A new request is received on the connection, in which\n case HAProxy handles it in the old process and closes\n the connection after sending the response.\n\n - HAProxy's `timeout http-keep-alive` duration expires.\n By default this is 300 seconds, but it can be changed\n using httpKeepAliveTimeout tuning option.\n\n - The client's keep-alive timeout expires, causing the\n client to close the connection.\n\nSetting Deferred can help prevent errors in clients or load balancers that do not properly handle connection resets. Additionally, this option allows you to retain the pre-2.4 HAProxy behaviour: in HAProxy version 2.2 (OpenShift versions < 4.14), maintaining idle connections during a soft reload was the default behaviour, but starting with HAProxy 2.4, the default changed to closing idle connections immediately.\n\nImportant Consideration:\n\n - Using Deferred will result in temporary inconsistencies\n for the first request on each persistent connection\n after a route update and router reload. This request\n will be processed by the old HAProxy process using its\n old configuration. Subsequent requests will use the\n updated configuration.\n\nOperational Considerations:\n\n - Keeping idle connections open during reloads may lead\n to an accumulation of old HAProxy processes if\n connections remain idle for extended periods,\n especially in environments where frequent reloads\n occur.\n\n - Consider monitoring the number of HAProxy processes in\n the router pods when Deferred is set.\n\n - You may need to enable or adjust the\n `ingress.operator.openshift.io/hard-stop-after`\n duration (configured via an annotation on the\n IngressController resource) in environments with\n frequent reloads to prevent resource exhaustion.", - "closedClientConnectionPolicy": "closedClientConnectionPolicy controls how the IngressController behaves when the client closes the TCP connection while the TLS handshake or HTTP request is in progress. This option maps directly to HAProxy’s \"abortonclose\" option.\n\nValid values are: \"Abort\" and \"Continue\". The default value is \"Continue\".\n\nWhen set to \"Abort\", the router will stop processing the TLS handshake if it is in progress, and it will not send an HTTP request to the backend server if the request has not yet been sent when the client closes the connection.\n\nWhen set to \"Continue\", the router will complete the TLS handshake if it is in progress, or send an HTTP request to the backend server and wait for the backend server's response, regardless of whether the client has closed the connection.\n\nSetting \"Abort\" can help free CPU resources otherwise spent on TLS computation for connections the client has already closed, and can reduce request queue size, thereby reducing the load on saturated backend servers.\n\nImportant Considerations:\n\n - The default policy (\"Continue\") is HTTP-compliant, and requests\n for aborted client connections will still be served.\n Use the \"Continue\" policy to allow a client to send a request\n and then immediately close its side of the connection while\n still receiving a response on the half-closed connection.\n\n - When clients use keep-alive connections, the most common case for premature\n closure is when the user wants to cancel the transfer or when a timeout\n occurs. In that case, the \"Abort\" policy may be used to reduce resource consumption.\n\n - Using RSA keys larger than 2048 bits can significantly slow down\n TLS computations. Consider using the \"Abort\" policy to reduce CPU usage.", - "haproxyVersion": "haproxyVersion specifies the HAProxy version to use for this IngressController.\n\nOpenShift 5.0 introduces HAProxy 3.2 as its default version and supports HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift release introduces a new default HAProxy version, that HAProxy version becomes available as a pinnable value in subsequent OpenShift releases, providing a smooth migration path for administrators who want to defer HAProxy upgrades.\n\nValid values for OpenShift 5.0: - Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0) - \"3.2\": Explicitly pins HAProxy 3.2 for preservation during cluster\n upgrades to future OpenShift releases\n- \"2.8\": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will\n be dropped in the next OpenShift release)\n\nIf a specific HAProxy version is set and would become unsupported in a target cluster upgrade, a preflight check will block the cluster upgrade until this field is updated to unset or a supported version.", -} - -func (IngressControllerSpec) SwaggerDoc() map[string]string { - return map_IngressControllerSpec -} - -var map_IngressControllerStatus = map[string]string{ - "": "IngressControllerStatus defines the observed status of the IngressController.", - "availableReplicas": "availableReplicas is number of observed available replicas according to the ingress controller deployment.", - "selector": "selector is a label selector, in string format, for ingress controller pods corresponding to the IngressController. The number of matching pods should equal the value of availableReplicas.", - "domain": "domain is the actual domain in use.", - "endpointPublishingStrategy": "endpointPublishingStrategy is the actual strategy in use.", - "conditions": "conditions is a list of conditions and their status.\n\nAvailable means the ingress controller deployment is available and servicing route and ingress resources (i.e, .status.availableReplicas equals .spec.replicas)\n\nThere are additional conditions which indicate the status of other ingress controller features and capabilities.\n\n * LoadBalancerManaged\n - True if the following conditions are met:\n * The endpoint publishing strategy requires a service load balancer.\n - False if any of those conditions are unsatisfied.\n\n * LoadBalancerReady\n - True if the following conditions are met:\n * A load balancer is managed.\n * The load balancer is ready.\n - False if any of those conditions are unsatisfied.\n\n * DNSManaged\n - True if the following conditions are met:\n * The endpoint publishing strategy and platform support DNS.\n * The ingress controller domain is set.\n * dns.config.openshift.io/cluster configures DNS zones.\n - False if any of those conditions are unsatisfied.\n\n * DNSReady\n - True if the following conditions are met:\n * DNS is managed.\n * DNS records have been successfully created.\n - False if any of those conditions are unsatisfied.", - "tlsProfile": "tlsProfile is the TLS connection configuration that is in effect.", - "observedGeneration": "observedGeneration is the most recent generation observed.", - "namespaceSelector": "namespaceSelector is the actual namespaceSelector in use.", - "routeSelector": "routeSelector is the actual routeSelector in use.", - "effectiveHAProxyVersion": "effectiveHAProxyVersion reports the HAProxy version currently in use by this IngressController. This reflects the resolved value of the spec.haproxyVersion field. When omitted, the effective value has not yet been resolved by the operator or the feature is not enabled for this cluster.\n\nExamples for OpenShift 5.0: - \"3.2\": Using HAProxy 3.2 - \"2.8\": Using HAProxy 2.8", -} - -func (IngressControllerStatus) SwaggerDoc() map[string]string { - return map_IngressControllerStatus -} - -var map_IngressControllerTuningOptions = map[string]string{ - "": "IngressControllerTuningOptions specifies options for tuning the performance of ingress controller pods", - "headerBufferBytes": "headerBufferBytes describes how much memory should be reserved (in bytes) for IngressController connection sessions. Note that this value must be at least 16384 if HTTP/2 is enabled for the IngressController (https://tools.ietf.org/html/rfc7540). If this field is empty, the IngressController will use a default value of 32768 bytes.\n\nSetting this field is generally not recommended as headerBufferBytes values that are too small may break the IngressController and headerBufferBytes values that are too large could cause the IngressController to use significantly more memory than necessary.", - "headerBufferMaxRewriteBytes": "headerBufferMaxRewriteBytes describes how much memory should be reserved (in bytes) from headerBufferBytes for HTTP header rewriting and appending for IngressController connection sessions. Note that incoming HTTP requests will be limited to (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning headerBufferBytes must be greater than headerBufferMaxRewriteBytes. If this field is empty, the IngressController will use a default value of 8192 bytes.\n\nSetting this field is generally not recommended as headerBufferMaxRewriteBytes values that are too small may break the IngressController and headerBufferMaxRewriteBytes values that are too large could cause the IngressController to use significantly more memory than necessary.", - "threadCount": "threadCount defines the number of threads created per HAProxy process. Creating more threads allows each ingress controller pod to handle more connections, at the cost of more system resources being used. HAProxy currently supports up to 64 threads. If this field is empty, the IngressController will use the default value. The current default is 4 threads, but this may change in future releases.\n\nSetting this field is generally not recommended. Increasing the number of HAProxy threads allows ingress controller pods to utilize more CPU time under load, potentially starving other pods if set too high. Reducing the number of threads may cause the ingress controller to perform poorly.", - "clientTimeout": "clientTimeout defines how long a connection will be held open while waiting for a client response.\n\nIf unset, the default timeout is 30s", - "clientFinTimeout": "clientFinTimeout defines how long a connection will be held open while waiting for the client response to the server/backend closing the connection.\n\nIf unset, the default timeout is 1s", - "serverTimeout": "serverTimeout defines how long a connection will be held open while waiting for a server/backend response.\n\nIf unset, the default timeout is 30s", - "serverFinTimeout": "serverFinTimeout defines how long a connection will be held open while waiting for the server/backend response to the client closing the connection.\n\nIf unset, the default timeout is 1s", - "tunnelTimeout": "tunnelTimeout defines how long a tunnel connection (including websockets) will be held open while the tunnel is idle.\n\nIf unset, the default timeout is 1h", - "connectTimeout": "connectTimeout defines the maximum time to wait for a connection attempt to a server/backend to succeed.\n\nThis field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nWhen omitted, this means the user has no opinion and the platform is left to choose a reasonable default. This default is subject to change over time. The current default is 5s.", - "httpKeepAliveTimeout": "httpKeepAliveTimeout defines the maximum allowed time to wait for a new HTTP request to appear on a connection from the client to the router.\n\nThis field expects an unsigned duration string of a decimal number, with optional fraction and a unit suffix, e.g. \"300ms\", \"1.5s\" or \"2m45s\". Valid time units are \"ms\", \"s\", \"m\". The allowed range is from 1 millisecond to 15 minutes.\n\nWhen omitted, this means the user has no opinion and the platform is left to choose a reasonable default. This default is subject to change over time. The current default is 300s.\n\nLow values (tens of milliseconds or less) can cause clients to close and reopen connections for each request, leading to reduced connection sharing. For HTTP/2, special care should be taken with low values. A few seconds is a reasonable starting point to avoid holding idle connections open while still allowing subsequent requests to reuse the connection.\n\nHigh values (minutes or more) favor connection reuse but may cause idle connections to linger longer.", - "tlsInspectDelay": "tlsInspectDelay defines how long the router can hold data to find a matching route.\n\nSetting this too short can cause the router to fall back to the default certificate for edge-terminated or reencrypt routes even when a better matching certificate could be used.\n\nIf unset, the default inspect delay is 5s", - "healthCheckInterval": "healthCheckInterval defines how long the router waits between two consecutive health checks on its configured backends. This value is applied globally as a default for all routes, but may be overridden per-route by the route annotation \"router.openshift.io/haproxy.health.check.interval\".\n\nExpects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, eg \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nSetting this to less than 5s can cause excess traffic due to too frequent TCP health checks and accompanying SYN packet storms. Alternatively, setting this too high can result in increased latency, due to backend servers that are no longer available, but haven't yet been detected as such.\n\nAn empty or zero healthCheckInterval means no opinion and IngressController chooses a default, which is subject to change over time. Currently the default healthCheckInterval value is 5s.\n\nCurrently the minimum allowed value is 1s and the maximum allowed value is 2147483647ms (24.85 days). Both are subject to change over time.", - "maxConnections": "maxConnections defines the maximum number of simultaneous connections that can be established per HAProxy process. Increasing this value allows each ingress controller pod to handle more connections but at the cost of additional system resources being consumed.\n\nPermitted values are: empty, 0, -1, and the range 2000-2000000.\n\nIf this field is empty or 0, the IngressController will use the default value of 50000, but the default is subject to change in future releases.\n\nIf the value is -1 then HAProxy will dynamically compute a maximum value based on the available ulimits in the running container. Selecting -1 (i.e., auto) will result in a large value being computed (~520000 on OpenShift >=4.10 clusters) and therefore each HAProxy process will incur significant memory usage compared to the current default of 50000.\n\nSetting a value that is greater than the current operating system limit will prevent the HAProxy process from starting.\n\nIf you choose a discrete value (e.g., 750000) and the router pod is migrated to a new node, there's no guarantee that that new node has identical ulimits configured. In such a scenario the pod would fail to start. If you have nodes with different ulimits configured (e.g., different tuned profiles) and you choose a discrete value then the guidance is to use -1 and let the value be computed dynamically at runtime.\n\nYou can monitor memory usage for router containers with the following metric: 'container_memory_working_set_bytes{container=\"router\",namespace=\"openshift-ingress\"}'.\n\nYou can monitor memory usage of individual HAProxy processes in router containers with the following metric: 'container_memory_working_set_bytes{container=\"router\",namespace=\"openshift-ingress\"}/container_processes{container=\"router\",namespace=\"openshift-ingress\"}'.", - "reloadInterval": "reloadInterval defines the minimum interval at which the router is allowed to reload to accept new changes. Increasing this value can prevent the accumulation of HAProxy processes, depending on the scenario. Increasing this interval can also lessen load imbalance on a backend's servers when using the roundrobin balancing algorithm. Alternatively, decreasing this value may decrease latency since updates to HAProxy's configuration can take effect more quickly.\n\nThe value must be a time duration value; see . Currently, the minimum value allowed is 1s, and the maximum allowed value is 120s. Minimum and maximum allowed values may change in future versions of OpenShift. Note that if a duration outside of these bounds is provided, the value of reloadInterval will be capped/floored and not rejected (e.g. a duration of over 120s will be capped to 120s; the IngressController will not reject and replace this disallowed value with the default).\n\nA zero value for reloadInterval tells the IngressController to choose the default, which is currently 5s and subject to change without notice.\n\nThis field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, e.g. \"300ms\", \"1.5h\" or \"2h45m\". Valid time units are \"ns\", \"us\" (or \"µs\" U+00B5 or \"μs\" U+03BC), \"ms\", \"s\", \"m\", \"h\".\n\nNote: Setting a value significantly larger than the default of 5s can cause latency in observing updates to routes and their endpoints. HAProxy's configuration will be reloaded less frequently, and newly created routes will not be served until the subsequent reload.", - "configurationManagement": "configurationManagement specifies how OpenShift router should update the HAProxy configuration. The following values are valid for this field:\n\n* \"ForkAndReload\". * \"Dynamic\".\n\nOmitting this field means that the user has no opinion and the platform may choose a reasonable default. This default is subject to change over time. The current default is \"ForkAndReload\".\n\n\"ForkAndReload\" means that OpenShift router should rewrite the HAProxy configuration file and instruct HAProxy to fork and reload. This is OpenShift router's traditional approach.\n\n\"Dynamic\" means that OpenShift router may use HAProxy's control socket for some configuration updates and fall back to fork and reload for other configuration updates. This is a newer approach, which may be less mature than ForkAndReload. This setting can improve load-balancing fairness and metrics accuracy and reduce CPU and memory usage if HAProxy has frequent configuration updates for route and endpoints updates.\n\nNote: The \"Dynamic\" option is currently experimental and should not be enabled on production clusters.", -} - -func (IngressControllerTuningOptions) SwaggerDoc() map[string]string { - return map_IngressControllerTuningOptions -} - -var map_LoadBalancerStrategy = map[string]string{ - "": "LoadBalancerStrategy holds parameters for a load balancer.", - "scope": "scope indicates the scope at which the load balancer is exposed. Possible values are \"External\" and \"Internal\".", - "allowedSourceRanges": "allowedSourceRanges specifies an allowlist of IP address ranges to which access to the load balancer should be restricted. Each range must be specified using CIDR notation (e.g. \"10.0.0.0/8\" or \"fd00::/8\"). If no range is specified, \"0.0.0.0/0\" for IPv4 and \"::/0\" for IPv6 are used by default, which allows all source addresses.\n\nTo facilitate migration from earlier versions of OpenShift that did not have the allowedSourceRanges field, you may set the service.beta.kubernetes.io/load-balancer-source-ranges annotation on the \"router-\" service in the \"openshift-ingress\" namespace, and this annotation will take effect if allowedSourceRanges is empty on OpenShift 4.12.", - "providerParameters": "providerParameters holds desired load balancer information specific to the underlying infrastructure provider.\n\nIf empty, defaults will be applied. See specific providerParameters fields for details about their defaults.", - "dnsManagementPolicy": "dnsManagementPolicy indicates if the lifecycle of the wildcard DNS record associated with the load balancer service will be managed by the ingress operator. It defaults to Managed. Valid values are: Managed and Unmanaged.", -} - -func (LoadBalancerStrategy) SwaggerDoc() map[string]string { - return map_LoadBalancerStrategy -} - -var map_LoggingDestination = map[string]string{ - "": "LoggingDestination describes a destination for log messages.", - "type": "type is the type of destination for logs. It must be one of the following:\n\n* Container\n\nThe ingress operator configures the sidecar container named \"logs\" on the ingress controller pod and configures the ingress controller to write logs to the sidecar. The logs are then available as container logs. The expectation is that the administrator configures a custom logging solution that reads logs from this sidecar. Note that using container logs means that logs may be dropped if the rate of logs exceeds the container runtime's or the custom logging solution's capacity.\n\n* Syslog\n\nLogs are sent to a syslog endpoint. The administrator must specify an endpoint that can receive syslog messages. The expectation is that the administrator has configured a custom syslog instance.", - "syslog": "syslog holds parameters for a syslog endpoint. Present only if type is Syslog.", - "container": "container holds parameters for the Container logging destination. Present only if type is Container.", -} - -func (LoggingDestination) SwaggerDoc() map[string]string { - return map_LoggingDestination -} - -var map_NodePlacement = map[string]string{ - "": "NodePlacement describes node scheduling configuration for an ingress controller.", - "nodeSelector": "nodeSelector is the node selector applied to ingress controller deployments.\n\nIf set, the specified selector is used and replaces the default.\n\nIf unset, the default depends on the value of the defaultPlacement field in the cluster config.openshift.io/v1/ingresses status.\n\nWhen defaultPlacement is Workers, the default is:\n\n kubernetes.io/os: linux\n node-role.kubernetes.io/worker: ''\n\nWhen defaultPlacement is ControlPlane, the default is:\n\n kubernetes.io/os: linux\n node-role.kubernetes.io/master: ''\n\nThese defaults are subject to change.\n\nNote that using nodeSelector.matchExpressions is not supported. Only nodeSelector.matchLabels may be used. This is a limitation of the Kubernetes API: the pod spec does not allow complex expressions for node selectors.", - "tolerations": "tolerations is a list of tolerations applied to ingress controller deployments.\n\nThe default is an empty list.\n\nSee https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/", -} - -func (NodePlacement) SwaggerDoc() map[string]string { - return map_NodePlacement -} - -var map_NodePortStrategy = map[string]string{ - "": "NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy.", - "protocol": "protocol specifies whether the IngressController expects incoming connections to use plain TCP or whether the IngressController expects PROXY protocol.\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nThe following values are valid for this field:\n\n* The empty string. * \"TCP\". * \"PROXY\".\n\nThe empty string specifies the default, which is TCP without PROXY protocol. Note that the default is subject to change.", -} - -func (NodePortStrategy) SwaggerDoc() map[string]string { - return map_NodePortStrategy -} - -var map_OpenStackLoadBalancerParameters = map[string]string{ - "": "OpenStackLoadBalancerParameters provides configuration settings that are specific to OpenStack load balancers.", - "floatingIP": "floatingIP specifies the IP address that the load balancer will use. When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. When specified, the floating IP has to be pre-created. If the specified value is not a floating IP or is already claimed, the OpenStack cloud provider won't be able to provision the load balancer. This field may only be used if the IngressController has External scope. This value must be a valid IPv4 or IPv6 address. ", -} - -func (OpenStackLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_OpenStackLoadBalancerParameters -} - -var map_PrivateStrategy = map[string]string{ - "": "PrivateStrategy holds parameters for the Private endpoint publishing strategy.", - "protocol": "protocol specifies whether the IngressController expects incoming connections to use plain TCP or whether the IngressController expects PROXY protocol.\n\nPROXY protocol can be used with load balancers that support it to communicate the source addresses of client connections when forwarding those connections to the IngressController. Using PROXY protocol enables the IngressController to report those source addresses instead of reporting the load balancer's address in HTTP headers and logs. Note that enabling PROXY protocol on the IngressController will cause connections to fail if you are not using a load balancer that uses PROXY protocol to forward connections to the IngressController. See http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for information about PROXY protocol.\n\nThe following values are valid for this field:\n\n* The empty string. * \"TCP\". * \"PROXY\".\n\nThe empty string specifies the default, which is TCP without PROXY protocol. Note that the default is subject to change.", -} - -func (PrivateStrategy) SwaggerDoc() map[string]string { - return map_PrivateStrategy -} - -var map_ProviderLoadBalancerParameters = map[string]string{ - "": "ProviderLoadBalancerParameters holds desired load balancer information specific to the underlying infrastructure provider.", - "type": "type is the underlying infrastructure provider for the load balancer. Allowed values are \"AWS\", \"Azure\", \"BareMetal\", \"GCP\", \"IBM\", \"Nutanix\", \"OpenStack\", and \"VSphere\".", - "aws": "aws provides configuration settings that are specific to AWS load balancers.\n\nIf empty, defaults will be applied. See specific aws fields for details about their defaults.", - "gcp": "gcp provides configuration settings that are specific to GCP load balancers.\n\nIf empty, defaults will be applied. See specific gcp fields for details about their defaults.", - "ibm": "ibm provides configuration settings that are specific to IBM Cloud load balancers.\n\nIf empty, defaults will be applied. See specific ibm fields for details about their defaults.", - "openstack": "openstack provides configuration settings that are specific to OpenStack load balancers.\n\nIf empty, defaults will be applied. See specific openstack fields for details about their defaults.", -} - -func (ProviderLoadBalancerParameters) SwaggerDoc() map[string]string { - return map_ProviderLoadBalancerParameters -} - -var map_RouteAdmissionPolicy = map[string]string{ - "": "RouteAdmissionPolicy is an admission policy for allowing new route claims.", - "namespaceOwnership": "namespaceOwnership describes how host name claims across namespaces should be handled.\n\nValue must be one of:\n\n- Strict: Do not allow routes in different namespaces to claim the same host.\n\n- InterNamespaceAllowed: Allow routes to claim different paths of the same\n host name across namespaces.\n\nIf empty, the default is Strict.", - "wildcardPolicy": "wildcardPolicy describes how routes with wildcard policies should be handled for the ingress controller. WildcardPolicy controls use of routes [1] exposed by the ingress controller based on the route's wildcard policy.\n\n[1] https://github.com/openshift/api/blob/master/route/v1/types.go\n\nNote: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed will cause admitted routes with a wildcard policy of Subdomain to stop working. These routes must be updated to a wildcard policy of None to be readmitted by the ingress controller.\n\nWildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values.\n\nIf empty, defaults to \"WildcardsDisallowed\".", -} - -func (RouteAdmissionPolicy) SwaggerDoc() map[string]string { - return map_RouteAdmissionPolicy -} - -var map_SyslogLoggingDestinationParameters = map[string]string{ - "": "SyslogLoggingDestinationParameters describes parameters for the Syslog logging destination type.", - "address": "address is the IP address of the syslog endpoint that receives log messages.", - "port": "port is the UDP port number of the syslog endpoint that receives log messages.", - "facility": "facility specifies the syslog facility of log messages.\n\nIf this field is empty, the facility is \"local1\".", - "maxLength": "maxLength is the maximum length of the log message.\n\nValid values are integers in the range 480 to 4096, inclusive.\n\nWhen omitted, the default value is 1024.", -} - -func (SyslogLoggingDestinationParameters) SwaggerDoc() map[string]string { - return map_SyslogLoggingDestinationParameters -} - -var map_GatherStatus = map[string]string{ - "": "gatherStatus provides information about the last known gather event.", - "lastGatherTime": "lastGatherTime is the last time when Insights data gathering finished. An empty value means that no data has been gathered yet.", - "lastGatherDuration": "lastGatherDuration is the total time taken to process all gatherers during the last gather event.", - "gatherers": "gatherers is a list of active gatherers (and their statuses) in the last gathering.", -} - -func (GatherStatus) SwaggerDoc() map[string]string { - return map_GatherStatus -} - -var map_GathererStatus = map[string]string{ - "": "gathererStatus represents information about a particular data gatherer.", - "conditions": "conditions provide details on the status of each gatherer.", - "name": "name is the name of the gatherer.", - "lastGatherDuration": "lastGatherDuration represents the time spent gathering.", -} - -func (GathererStatus) SwaggerDoc() map[string]string { - return map_GathererStatus -} - -var map_HealthCheck = map[string]string{ - "": "healthCheck represents an Insights health check attributes.", - "description": "description provides basic description of the healtcheck.", - "totalRisk": "totalRisk of the healthcheck. Indicator of the total risk posed by the detected issue; combination of impact and likelihood. The values can be from 1 to 4, and the higher the number, the more important the issue.", - "advisorURI": "advisorURI provides the URL link to the Insights Advisor.", - "state": "state determines what the current state of the health check is. Health check is enabled by default and can be disabled by the user in the Insights advisor user interface.", -} - -func (HealthCheck) SwaggerDoc() map[string]string { - return map_HealthCheck -} - -var map_InsightsOperator = map[string]string{ - "": "\n\nInsightsOperator holds cluster-wide information about the Insights Operator.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Insights.", - "status": "status is the most recently observed status of the Insights operator.", -} - -func (InsightsOperator) SwaggerDoc() map[string]string { - return map_InsightsOperator -} - -var map_InsightsOperatorList = map[string]string{ - "": "InsightsOperatorList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (InsightsOperatorList) SwaggerDoc() map[string]string { - return map_InsightsOperatorList -} - -var map_InsightsOperatorStatus = map[string]string{ - "gatherStatus": "gatherStatus provides basic information about the last Insights data gathering. When omitted, this means no data gathering has taken place yet.", - "insightsReport": "insightsReport provides general Insights analysis results. When omitted, this means no data gathering has taken place yet.", -} - -func (InsightsOperatorStatus) SwaggerDoc() map[string]string { - return map_InsightsOperatorStatus -} - -var map_InsightsReport = map[string]string{ - "": "insightsReport provides Insights health check report based on the most recently sent Insights data.", - "downloadedAt": "downloadedAt is the time when the last Insights report was downloaded. An empty value means that there has not been any Insights report downloaded yet and it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled).", - "healthChecks": "healthChecks provides basic information about active Insights health checks in a cluster.", -} - -func (InsightsReport) SwaggerDoc() map[string]string { - return map_InsightsReport -} - -var map_KMSEncryptionStatus = map[string]string{ - "healthReports": "healthReports contains all KMS plugin health reports. When omitted, no health reports are available. Each entry must have a unique combination of nodeName and keyId.", -} - -func (KMSEncryptionStatus) SwaggerDoc() map[string]string { - return map_KMSEncryptionStatus -} - -var map_KMSPluginHealthReport = map[string]string{ - "nodeName": "nodeName is the name of the node this instance of the plugin runs on. The combination of nodeName and keyId makes this health report unique. The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with an alphanumeric character, and be at most 253 characters in length.", - "keyId": "keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. This is not a cryptographic key used to encrypt/decrypt any resources. The value must be between 1 and 512 characters.", - "status": "status contains a health indicator for the respective KMS plugin The field can have three states: healthy, unhealthy, error. With error and unhealthy containing additional information in Detail.", - "lastCheckedTime": "lastCheckedTime is a timestamp of when the probe was last checked.", - "kekId": "kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. This is not a cryptographic key, but a unique representation of the KEK. The value must be between 1 and 1024 characters.", - "detail": "detail contains additional error/health information for the respective KMS plugin. When omitted, no additional error or health information is provided. When set, the value must be between 1 and 1024 characters.", -} - -func (KMSPluginHealthReport) SwaggerDoc() map[string]string { - return map_KMSPluginHealthReport -} - -var map_KubeAPIServer = map[string]string{ - "": "KubeAPIServer provides information to configure an operator to manage kube-apiserver.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Kubernetes API Server", - "status": "status is the most recently observed status of the Kubernetes API Server", -} - -func (KubeAPIServer) SwaggerDoc() map[string]string { - return map_KubeAPIServer -} - -var map_KubeAPIServerList = map[string]string{ - "": "KubeAPIServerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (KubeAPIServerList) SwaggerDoc() map[string]string { - return map_KubeAPIServerList -} - -var map_KubeAPIServerSpec = map[string]string{ - "eventTTLMinutes": "eventTTLMinutes specifies the amount of time that the events are stored before being deleted. The TTL is allowed between 5 minutes minimum up to a maximum of 180 minutes (3 hours).\n\nLowering this value will reduce the storage required in etcd. Note that this setting will only apply to new events being created and will not update existing events.\n\nWhen omitted this means no opinion, and the platform is left to choose a reasonable default, which is subject to change over time. The current default value is 3h (180 minutes).", -} - -func (KubeAPIServerSpec) SwaggerDoc() map[string]string { - return map_KubeAPIServerSpec -} - -var map_KubeAPIServerStatus = map[string]string{ - "serviceAccountIssuers": "serviceAccountIssuers tracks history of used service account issuers. The item without expiration time represents the currently used service account issuer. The other items represents service account issuers that were used previously and are still being trusted. The default expiration for the items is set by the platform and it defaults to 24h. see: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection", - "encryptionStatus": "encryptionStatus contains status reports for the KMS plugin health and its key rotation.", -} - -func (KubeAPIServerStatus) SwaggerDoc() map[string]string { - return map_KubeAPIServerStatus -} - -var map_ServiceAccountIssuerStatus = map[string]string{ - "name": "name is the name of the service account issuer", - "expirationTime": "expirationTime is the time after which this service account issuer will be pruned and removed from the trusted list of service account issuers.", -} - -func (ServiceAccountIssuerStatus) SwaggerDoc() map[string]string { - return map_ServiceAccountIssuerStatus -} - -var map_KubeControllerManager = map[string]string{ - "": "KubeControllerManager provides information to configure an operator to manage kube-controller-manager.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Kubernetes Controller Manager", - "status": "status is the most recently observed status of the Kubernetes Controller Manager", -} - -func (KubeControllerManager) SwaggerDoc() map[string]string { - return map_KubeControllerManager -} - -var map_KubeControllerManagerList = map[string]string{ - "": "KubeControllerManagerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (KubeControllerManagerList) SwaggerDoc() map[string]string { - return map_KubeControllerManagerList -} - -var map_KubeControllerManagerSpec = map[string]string{ - "useMoreSecureServiceCA": "useMoreSecureServiceCA indicates that the service-ca.crt provided in SA token volumes should include only enough certificates to validate service serving certificates. Once set to true, it cannot be set to false. Even if someone finds a way to set it back to false, the service-ca.crt files that previously existed will only have the more secure content.", -} - -func (KubeControllerManagerSpec) SwaggerDoc() map[string]string { - return map_KubeControllerManagerSpec -} - -var map_KubeStorageVersionMigrator = map[string]string{ - "": "KubeStorageVersionMigrator provides information to configure an operator to manage kube-storage-version-migrator.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (KubeStorageVersionMigrator) SwaggerDoc() map[string]string { - return map_KubeStorageVersionMigrator -} - -var map_KubeStorageVersionMigratorList = map[string]string{ - "": "KubeStorageVersionMigratorList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (KubeStorageVersionMigratorList) SwaggerDoc() map[string]string { - return map_KubeStorageVersionMigratorList -} - -var map_BootImageSkewEnforcementConfig = map[string]string{ - "": "BootImageSkewEnforcementConfig is used to configure how boot image version skew is enforced on the cluster.", - "mode": "mode determines the underlying behavior of skew enforcement mechanism. Valid values are Manual and None. Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP & RHCOS version associated with the last boot image update in the manual field. In Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the skew limit described by the release image. None means that the MCO will no longer monitor the boot image skew. This may affect the cluster's ability to scale. This field is required.", - "manual": "manual describes the current boot image of the cluster. This should be set to the oldest boot image used amongst all machine resources in the cluster. This must include either the RHCOS version of the boot image or the OCP release version which shipped with that RHCOS boot image. Required when mode is set to \"Manual\" and forbidden otherwise.", -} - -func (BootImageSkewEnforcementConfig) SwaggerDoc() map[string]string { - return map_BootImageSkewEnforcementConfig -} - -var map_BootImageSkewEnforcementStatus = map[string]string{ - "": "BootImageSkewEnforcementStatus is the type for the status object. It represents the cluster defaults when the boot image skew enforcement configuration is undefined and reflects the actual configuration when it is defined.", - "mode": "mode determines the underlying behavior of skew enforcement mechanism. Valid values are Automatic, Manual and None. Automatic means that the MCO will perform boot image updates and store the OCP & RHCOS version associated with the last boot image update in the automatic field. Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP & RHCOS version associated with the last boot image update in the manual field. In Automatic and Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the skew limit described by the release image. None means that the MCO will no longer monitor the boot image skew. This may affect the cluster's ability to scale. This field is required.", - "automatic": "automatic describes the current boot image of the cluster. This will be populated by the MCO when performing boot image updates. This value will be compared against the cluster's skew limit to determine skew compliance. Required when mode is set to \"Automatic\" and forbidden otherwise.", - "manual": "manual describes the current boot image of the cluster. This will be populated by the MCO using the values provided in the spec.bootImageSkewEnforcement.manual field. This value will be compared against the cluster's skew limit to determine skew compliance. Required when mode is set to \"Manual\" and forbidden otherwise.", -} - -func (BootImageSkewEnforcementStatus) SwaggerDoc() map[string]string { - return map_BootImageSkewEnforcementStatus -} - -var map_ClusterBootImageAutomatic = map[string]string{ - "": "ClusterBootImageAutomatic is used to describe the cluster boot image in Automatic mode. It stores the RHCOS version of the boot image and the OCP release version which shipped with that RHCOS boot image. At least one of these values are required. If ocpVersion and rhcosVersion are defined, both values will be used for checking skew compliance. If only ocpVersion is defined, only that value will be used for checking skew compliance. If only rhcosVersion is defined, only that value will be used for checking skew compliance.", - "ocpVersion": "ocpVersion provides a string which represents the OCP version of the boot image. This field must match the OCP semver compatible format of x.y.z. This field must be between 5 and 10 characters long.", - "rhcosVersion": "rhcosVersion provides a string which represents the RHCOS version of the boot image This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between 14 and 21 characters long.", -} - -func (ClusterBootImageAutomatic) SwaggerDoc() map[string]string { - return map_ClusterBootImageAutomatic -} - -var map_ClusterBootImageManual = map[string]string{ - "": "ClusterBootImageManual is used to describe the cluster boot image in Manual mode.", - "mode": "mode is used to configure which boot image field is defined in Manual mode. Valid values are OCPVersion and RHCOSVersion. OCPVersion means that the cluster admin is expected to set the OCP version associated with the last boot image update in the OCPVersion field. RHCOSVersion means that the cluster admin is expected to set the RHCOS version associated with the last boot image update in the RHCOSVersion field. This field is required.", - "ocpVersion": "ocpVersion provides a string which represents the OCP version of the boot image. This field must match the OCP semver compatible format of x.y.z. This field must be between 5 and 10 characters long. Required when mode is set to \"OCPVersion\" and forbidden otherwise.", - "rhcosVersion": "rhcosVersion provides a string which represents the RHCOS version of the boot image This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between 14 and 21 characters long. Required when mode is set to \"RHCOSVersion\" and forbidden otherwise.", -} - -func (ClusterBootImageManual) SwaggerDoc() map[string]string { - return map_ClusterBootImageManual -} - -var map_IrreconcilableValidationOverrides = map[string]string{ - "": "IrreconcilableValidationOverrides holds the irreconcilable validations overrides to be applied on each rendered MachineConfig generation.", - "storage": "storage can be used to allow making irreconcilable changes to the selected sections under the `spec.config.storage` field of MachineConfig CRs It must have at least one item, may not exceed 3 items and must not contain duplicates. Allowed element values are \"Disks\", \"FileSystems\", \"Raid\" and omitted. When contains \"Disks\" changes to the `spec.config.storage.disks` section of MachineConfig CRs are allowed. When contains \"FileSystems\" changes to the `spec.config.storage.filesystems` section of MachineConfig CRs are allowed. When contains \"Raid\" changes to the `spec.config.storage.raid` section of MachineConfig CRs are allowed. When omitted changes to the `spec.config.storage` section are forbidden.", -} - -func (IrreconcilableValidationOverrides) SwaggerDoc() map[string]string { - return map_IrreconcilableValidationOverrides -} - -var map_MachineConfiguration = map[string]string{ - "": "MachineConfiguration provides information to configure an operator to manage Machine Configuration.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Machine Config Operator", - "status": "status is the most recently observed status of the Machine Config Operator", -} - -func (MachineConfiguration) SwaggerDoc() map[string]string { - return map_MachineConfiguration -} - -var map_MachineConfigurationList = map[string]string{ - "": "MachineConfigurationList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (MachineConfigurationList) SwaggerDoc() map[string]string { - return map_MachineConfigurationList -} - -var map_MachineConfigurationSpec = map[string]string{ - "managedBootImages": "managedBootImages allows configuration for the management of boot images for machine resources within the cluster. This configuration allows users to select resources that should be updated to the latest boot images during cluster upgrades, ensuring that new machines always boot with the current cluster version's boot image. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The default for each machine manager mode is All for GCP and AWS platforms, and None for all other platforms.", - "nodeDisruptionPolicy": "nodeDisruptionPolicy allows an admin to set granular node disruption actions for MachineConfig-based updates, such as drains, service reloads, etc. Specifying this will allow for less downtime when doing small configuration updates to the cluster. This configuration has no effect on cluster upgrades which will still incur node disruption where required.", - "irreconcilableValidationOverrides": "irreconcilableValidationOverrides is an optional field that can used to make changes to a MachineConfig that cannot be applied to existing nodes. When specified, the fields configured with validation overrides will no longer reject changes to those respective fields due to them not being able to be applied to existing nodes. Only newly provisioned nodes will have these configurations applied. Existing nodes will report observed configuration differences in their MachineConfigNode status.", - "bootImageSkewEnforcement": "bootImageSkewEnforcement allows an admin to configure how boot image version skew is enforced on the cluster. When omitted, this will default to Automatic for clusters that support automatic boot image updates. For clusters that do not support automatic boot image updates, cluster upgrades will be disabled until a skew enforcement mode has been specified. When version skew is being enforced, cluster upgrades will be disabled until the version skew is deemed acceptable for the current release payload.", -} - -func (MachineConfigurationSpec) SwaggerDoc() map[string]string { - return map_MachineConfigurationSpec -} - -var map_MachineConfigurationStatus = map[string]string{ - "observedGeneration": "observedGeneration is the last generation change you've dealt with", - "conditions": "conditions is a list of conditions and their status", - "nodeDisruptionPolicyStatus": "nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, and will be used by the Machine Config Daemon during future node updates.", - "managedBootImagesStatus": "managedBootImagesStatus reflects what the latest cluster-validated boot image configuration is and will be used by Machine Config Controller while performing boot image updates.", - "bootImageSkewEnforcementStatus": "bootImageSkewEnforcementStatus reflects what the latest cluster-validated boot image skew enforcement configuration is and will be used by Machine Config Controller while performing boot image skew enforcement. When omitted, the MCO has no knowledge of how to enforce boot image skew. When the MCO does not know how boot image skew should be enforced, cluster upgrades will be blocked until it can either automatically determine skew enforcement or there is an explicit skew enforcement configuration provided in the spec.bootImageSkewEnforcement field.", -} - -func (MachineConfigurationStatus) SwaggerDoc() map[string]string { - return map_MachineConfigurationStatus -} - -var map_MachineManager = map[string]string{ - "": "MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information such as the resource type and the API Group of the resource. It also provides granular control via the selection field.", - "resource": "resource is the machine management resource's type. Valid values are machinesets and controlplanemachinesets. machinesets means that the machine manager will only register resources of the kind MachineSet. controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet.", - "apiGroup": "apiGroup is name of the APIGroup that the machine management resource belongs to. The only current valid value is machine.openshift.io. machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group.", - "selection": "selection allows granular control of the machine management resources that will be registered for boot image updates.", -} - -func (MachineManager) SwaggerDoc() map[string]string { - return map_MachineManager -} - -var map_MachineManagerSelector = map[string]string{ - "mode": "mode determines how machine managers will be selected for updates. Valid values are All, Partial and None. All means that every resource matched by the machine manager will be updated. Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. None means that every resource matched by the machine manager will not be updated.", - "partial": "partial provides label selector(s) that can be used to match machine management resources. Only permitted when mode is set to \"Partial\".", -} - -func (MachineManagerSelector) SwaggerDoc() map[string]string { - return map_MachineManagerSelector -} - -var map_ManagedBootImages = map[string]string{ - "machineManagers": "machineManagers can be used to register machine management resources for boot image updates. The Machine Config Operator will watch for changes to this list. Only one entry is permitted per type of machine management resource.", -} - -func (ManagedBootImages) SwaggerDoc() map[string]string { - return map_ManagedBootImages -} - -var map_NodeDisruptionPolicyClusterStatus = map[string]string{ - "": "NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a merge of cluster defaults and user provided policies", - "files": "files is a list of MachineConfig file definitions and actions to take to changes on those paths", - "units": "units is a list MachineConfig unit definitions and actions to take on changes to those services", - "sshkey": "sshkey is the overall sshkey MachineConfig definition", -} - -func (NodeDisruptionPolicyClusterStatus) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyClusterStatus -} - -var map_NodeDisruptionPolicyConfig = map[string]string{ - "": "NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys", - "files": "files is a list of MachineConfig file definitions and actions to take to changes on those paths This list supports a maximum of 50 entries.", - "units": "units is a list MachineConfig unit definitions and actions to take on changes to those services This list supports a maximum of 50 entries.", - "sshkey": "sshkey maps to the ignition.sshkeys field in the MachineConfig object, definition an action for this will apply to all sshkey changes in the cluster", -} - -func (NodeDisruptionPolicyConfig) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyConfig -} - -var map_NodeDisruptionPolicySpecAction = map[string]string{ - "type": "type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None. reload/restart requires a corresponding service target specified in the reload/restart field. Other values require no further configuration", - "reload": "reload specifies the service to reload, only valid if type is reload", - "restart": "restart specifies the service to restart, only valid if type is restart", -} - -func (NodeDisruptionPolicySpecAction) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicySpecAction -} - -var map_NodeDisruptionPolicySpecFile = map[string]string{ - "": "NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object", - "path": "path is the location of a file being managed through a MachineConfig. The Actions in the policy will apply to changes to the file at this path.", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicySpecFile) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicySpecFile -} - -var map_NodeDisruptionPolicySpecSSHKey = map[string]string{ - "": "NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicySpecSSHKey) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicySpecSSHKey -} - -var map_NodeDisruptionPolicySpecUnit = map[string]string{ - "": "NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object", - "name": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicySpecUnit) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicySpecUnit -} - -var map_NodeDisruptionPolicyStatus = map[string]string{ - "clusterPolicies": "clusterPolicies is a merge of cluster default and user provided node disruption policies.", -} - -func (NodeDisruptionPolicyStatus) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyStatus -} - -var map_NodeDisruptionPolicyStatusAction = map[string]string{ - "type": "type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special. reload/restart requires a corresponding service target specified in the reload/restart field. Other values require no further configuration", - "reload": "reload specifies the service to reload, only valid if type is reload", - "restart": "restart specifies the service to restart, only valid if type is restart", -} - -func (NodeDisruptionPolicyStatusAction) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyStatusAction -} - -var map_NodeDisruptionPolicyStatusFile = map[string]string{ - "": "NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object", - "path": "path is the location of a file being managed through a MachineConfig. The Actions in the policy will apply to changes to the file at this path.", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicyStatusFile) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyStatusFile -} - -var map_NodeDisruptionPolicyStatusSSHKey = map[string]string{ - "": "NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicyStatusSSHKey) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyStatusSSHKey -} - -var map_NodeDisruptionPolicyStatusUnit = map[string]string{ - "": "NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object", - "name": "name represents the service name of a systemd service managed through a MachineConfig Actions specified will be applied for changes to the named service. Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", - "actions": "actions represents the series of commands to be executed on changes to the file at the corresponding file path. Actions will be applied in the order that they are set in this list. If there are other incoming changes to other MachineConfig entries in the same update that require a reboot, the reboot will supercede these actions. Valid actions are Reboot, Drain, Reload, DaemonReload and None. The Reboot action and the None action cannot be used in conjunction with any of the other actions. This list supports a maximum of 10 entries.", -} - -func (NodeDisruptionPolicyStatusUnit) SwaggerDoc() map[string]string { - return map_NodeDisruptionPolicyStatusUnit -} - -var map_PartialSelector = map[string]string{ - "": "PartialSelector provides label selector(s) that can be used to match machine management resources.", - "machineResourceSelector": "machineResourceSelector is a label selector that can be used to select machine resources like MachineSets.", -} - -func (PartialSelector) SwaggerDoc() map[string]string { - return map_PartialSelector -} - -var map_ReloadService = map[string]string{ - "": "ReloadService allows the user to specify the services to be reloaded", - "serviceName": "serviceName is the full name (e.g. crio.service) of the service to be reloaded Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", -} - -func (ReloadService) SwaggerDoc() map[string]string { - return map_ReloadService -} - -var map_RestartService = map[string]string{ - "": "RestartService allows the user to specify the services to be restarted", - "serviceName": "serviceName is the full name (e.g. crio.service) of the service to be restarted Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, \":\", \"-\", \"_\", \".\", and \"\". ${SERVICETYPE} must be one of \".service\", \".socket\", \".device\", \".mount\", \".automount\", \".swap\", \".target\", \".path\", \".timer\", \".snapshot\", \".slice\" or \".scope\".", -} - -func (RestartService) SwaggerDoc() map[string]string { - return map_RestartService -} - -var map_AdditionalNetworkDefinition = map[string]string{ - "": "AdditionalNetworkDefinition configures an extra network that is available but not created by default. Instead, pods must request them by name. type must be specified, along with exactly one \"Config\" that matches the type.", - "type": "type is the type of network The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan", - "name": "name is the name of the network. This will be populated in the resulting CRD This must be unique.", - "namespace": "namespace is the namespace of the network. This will be populated in the resulting CRD If not given the network will be created in the default namespace.", - "rawCNIConfig": "rawCNIConfig is the raw CNI configuration json to create in the NetworkAttachmentDefinition CRD", - "simpleMacvlanConfig": "simpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan", -} - -func (AdditionalNetworkDefinition) SwaggerDoc() map[string]string { - return map_AdditionalNetworkDefinition -} - -var map_AdditionalRoutingCapabilities = map[string]string{ - "": "AdditionalRoutingCapabilities describes components and relevant configuration providing advanced routing capabilities.", - "providers": "providers is a set of enabled components that provide additional routing capabilities. Entries on this list must be unique. The only valid value is currrently \"FRR\" which provides FRR routing capabilities through the deployment of FRR.", -} - -func (AdditionalRoutingCapabilities) SwaggerDoc() map[string]string { - return map_AdditionalRoutingCapabilities -} - -var map_BGPManagedConfig = map[string]string{ - "": "BGPManagedConfig contains configuration options for BGP when routing is \"Managed\".", - "asNumber": "asNumber is the 2-byte or 4-byte Autonomous System Number (ASN) to be used in the generated FRR configuration. Valid values are 1 to 4294967295. When omitted, this defaults to 64512.", - "bgpTopology": "bgpTopology defines the BGP topology to be used. Allowed values are \"FullMesh\". When set to \"FullMesh\", every node peers directly with every other node via BGP. This field is required when BGPManagedConfig is specified.", -} - -func (BGPManagedConfig) SwaggerDoc() map[string]string { - return map_BGPManagedConfig -} - -var map_ClusterNetworkEntry = map[string]string{ - "": "ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If the HostPrefix field is not used by the plugin, it can be left unset. Not all network providers support multiple ClusterNetworks", -} - -func (ClusterNetworkEntry) SwaggerDoc() map[string]string { - return map_ClusterNetworkEntry -} - -var map_DefaultNetworkDefinition = map[string]string{ - "": "DefaultNetworkDefinition represents a single network plugin's configuration. type must be specified, along with exactly one \"Config\" that matches the type.", - "type": "type is the type of network All NetworkTypes are supported except for NetworkTypeRaw", - "openshiftSDNConfig": "openshiftSDNConfig was previously used to configure the openshift-sdn plugin. DEPRECATED: OpenShift SDN is no longer supported.", - "ovnKubernetesConfig": "ovnKubernetesConfig configures the ovn-kubernetes plugin.", -} - -func (DefaultNetworkDefinition) SwaggerDoc() map[string]string { - return map_DefaultNetworkDefinition -} - -var map_EgressIPConfig = map[string]string{ - "": "EgressIPConfig defines the configuration knobs for egressip", - "reachabilityTotalTimeoutSeconds": "reachabilityTotalTimeout configures the EgressIP node reachability check total timeout in seconds. If the EgressIP node cannot be reached within this timeout, the node is declared down. Setting a large value may cause the EgressIP feature to react slowly to node changes. In particular, it may react slowly for EgressIP nodes that really have a genuine problem and are unreachable. When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is 1 second. A value of 0 disables the EgressIP node's reachability check.", -} - -func (EgressIPConfig) SwaggerDoc() map[string]string { - return map_EgressIPConfig -} - -var map_ExportNetworkFlows = map[string]string{ - "netFlow": "netFlow defines the NetFlow configuration.", - "sFlow": "sFlow defines the SFlow configuration.", - "ipfix": "ipfix defines IPFIX configuration.", -} - -func (ExportNetworkFlows) SwaggerDoc() map[string]string { - return map_ExportNetworkFlows -} - -var map_FeaturesMigration = map[string]string{ - "egressIP": "egressIP specified whether or not the Egress IP configuration was migrated. DEPRECATED: network type migration is no longer supported.", - "egressFirewall": "egressFirewall specified whether or not the Egress Firewall configuration was migrated. DEPRECATED: network type migration is no longer supported.", - "multicast": "multicast specified whether or not the multicast configuration was migrated. DEPRECATED: network type migration is no longer supported.", -} - -func (FeaturesMigration) SwaggerDoc() map[string]string { - return map_FeaturesMigration -} - -var map_GatewayConfig = map[string]string{ - "": "GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides", - "routingViaHost": "routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port into the host before sending it out. If this is not set, traffic will always egress directly from OVN to outside without touching the host stack. Setting this to true means hardware offload will not be supported. Default is false if GatewayConfig is specified.", - "ipForwarding": "ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across OVN-Kubernetes managed interfaces, then set this field to \"Global\". The supported values are \"Restricted\" and \"Global\".", - "ipv4": "ipv4 allows users to configure IP settings for IPv4 connections. When omitted, this means no opinion and the default configuration is used. Check individual members fields within ipv4 for details of default values.", - "ipv6": "ipv6 allows users to configure IP settings for IPv6 connections. When omitted, this means no opinion and the default configuration is used. Check individual members fields within ipv6 for details of default values.", -} - -func (GatewayConfig) SwaggerDoc() map[string]string { - return map_GatewayConfig -} - -var map_HybridOverlayConfig = map[string]string{ - "hybridClusterNetwork": "hybridClusterNetwork defines a network space given to nodes on an additional overlay network.", - "hybridOverlayVXLANPort": "hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. Default is 4789", -} - -func (HybridOverlayConfig) SwaggerDoc() map[string]string { - return map_HybridOverlayConfig -} - -var map_IPAMConfig = map[string]string{ - "": "IPAMConfig contains configurations for IPAM (IP Address Management)", - "type": "type is the type of IPAM module will be used for IP Address Management(IPAM). The supported values are IPAMTypeDHCP, IPAMTypeStatic", - "staticIPAMConfig": "staticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic", -} - -func (IPAMConfig) SwaggerDoc() map[string]string { - return map_IPAMConfig -} - -var map_IPFIXConfig = map[string]string{ - "collectors": "ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items", -} - -func (IPFIXConfig) SwaggerDoc() map[string]string { - return map_IPFIXConfig -} - -var map_IPsecConfig = map[string]string{ - "mode": "mode defines the behaviour of the ipsec configuration within the platform. Valid values are `Disabled`, `External` and `Full`. When 'Disabled', ipsec will not be enabled at the node level. When 'External', ipsec is enabled on the node level but requires the user to configure the secure communication parameters. This mode is for external secure communications and the configuration can be done using the k8s-nmstate operator. When 'Full', ipsec is configured on the node level and inter-pod secure communication within the cluster is configured. Note with `Full`, if ipsec is desired for communication with external (to the cluster) entities (such as storage arrays), this is left to the user to configure.", - "full": "full defines configuration parameters for the IPsec `Full` mode. This is permitted only when mode is configured with `Full`, and forbidden otherwise.", -} - -func (IPsecConfig) SwaggerDoc() map[string]string { - return map_IPsecConfig -} - -var map_IPsecFullModeConfig = map[string]string{ - "": "IPsecFullModeConfig defines configuration parameters for the IPsec `Full` mode.", - "encapsulation": "encapsulation option to configure libreswan on how inter-pod traffic across nodes are encapsulated to handle NAT traversal. When configured it uses UDP port 4500 for the encapsulation. Valid values are Always, Auto and omitted. Always means enable UDP encapsulation regardless of whether NAT is detected. Auto means enable UDP encapsulation based on the detection of NAT. When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. The current default is Auto.", -} - -func (IPsecFullModeConfig) SwaggerDoc() map[string]string { - return map_IPsecFullModeConfig -} - -var map_IPv4GatewayConfig = map[string]string{ - "": "IPV4GatewayConfig holds the configuration paramaters for IPV4 connections in the GatewayConfig for OVN-Kubernetes", - "internalMasqueradeSubnet": "internalMasqueradeSubnet contains the masquerade addresses in IPV4 CIDR format used internally by ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these addresses, as well as the shared gateway bridge interface. The values can be changed after installation. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must be large enough to accommodate 6 IPs (maximum prefix length /29). When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is 169.254.0.0/17 The value must be in proper IPV4 CIDR format", -} - -func (IPv4GatewayConfig) SwaggerDoc() map[string]string { - return map_IPv4GatewayConfig -} - -var map_IPv4OVNKubernetesConfig = map[string]string{ - "internalTransitSwitchSubnet": "internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is 100.88.0.0/16 The subnet must be large enough to accommodate one IP per node in your cluster The value must be in proper IPV4 CIDR format", - "internalJoinSubnet": "internalJoinSubnet is a v4 subnet used internally by ovn-kubernetes in case the default one is being already used by something else. It must not overlap with any other subnet being used by OpenShift or by the node network. The size of the subnet must be larger than the number of nodes. The current default value is 100.64.0.0/16 The subnet must be large enough to accommodate one IP per node in your cluster The value must be in proper IPV4 CIDR format", -} - -func (IPv4OVNKubernetesConfig) SwaggerDoc() map[string]string { - return map_IPv4OVNKubernetesConfig -} - -var map_IPv6GatewayConfig = map[string]string{ - "": "IPV6GatewayConfig holds the configuration paramaters for IPV6 connections in the GatewayConfig for OVN-Kubernetes", - "internalMasqueradeSubnet": "internalMasqueradeSubnet contains the masquerade addresses in IPV6 CIDR format used internally by ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these addresses, as well as the shared gateway bridge interface. The values can be changed after installation. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must be large enough to accommodate 6 IPs (maximum prefix length /125). When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The current default subnet is fd69::/112 Note that IPV6 dual addresses are not permitted", -} - -func (IPv6GatewayConfig) SwaggerDoc() map[string]string { - return map_IPv6GatewayConfig -} - -var map_IPv6OVNKubernetesConfig = map[string]string{ - "internalTransitSwitchSubnet": "internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect architecture that connects the cluster routers on each node together to enable east west traffic. The subnet chosen should not overlap with other networks specified for OVN-Kubernetes as well as other networks used on the host. When ommitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. The subnet must be large enough to accommodate one IP per node in your cluster The current default subnet is fd97::/64 The value must be in proper IPV6 CIDR format Note that IPV6 dual addresses are not permitted", - "internalJoinSubnet": "internalJoinSubnet is a v6 subnet used internally by ovn-kubernetes in case the default one is being already used by something else. It must not overlap with any other subnet being used by OpenShift or by the node network. The size of the subnet must be larger than the number of nodes. The subnet must be large enough to accommodate one IP per node in your cluster The current default value is fd98::/64 The value must be in proper IPV6 CIDR format Note that IPV6 dual addresses are not permitted", -} - -func (IPv6OVNKubernetesConfig) SwaggerDoc() map[string]string { - return map_IPv6OVNKubernetesConfig -} - -var map_MTUMigration = map[string]string{ - "": "MTUMigration contains infomation about MTU migration.", - "network": "network contains information about MTU migration for the default network. Migrations are only allowed to MTU values lower than the machine's uplink MTU by the minimum appropriate offset.", - "machine": "machine contains MTU migration configuration for the machine's uplink. Needs to be migrated along with the default network MTU unless the current uplink MTU already accommodates the default network MTU.", -} - -func (MTUMigration) SwaggerDoc() map[string]string { - return map_MTUMigration -} - -var map_MTUMigrationValues = map[string]string{ - "": "MTUMigrationValues contains the values for a MTU migration.", - "to": "to is the MTU to migrate to.", - "from": "from is the MTU to migrate from.", -} - -func (MTUMigrationValues) SwaggerDoc() map[string]string { - return map_MTUMigrationValues -} - -var map_NetFlowConfig = map[string]string{ - "collectors": "netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. It is a list of strings formatted as ip:port with a maximum of ten items", -} - -func (NetFlowConfig) SwaggerDoc() map[string]string { - return map_NetFlowConfig -} - -var map_Network = map[string]string{ - "": "Network describes the cluster's desired network configuration. It is consumed by the cluster-network-operator.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Network) SwaggerDoc() map[string]string { - return map_Network -} - -var map_NetworkList = map[string]string{ - "": "NetworkList contains a list of Network configurations\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (NetworkList) SwaggerDoc() map[string]string { - return map_NetworkList -} - -var map_NetworkMigration = map[string]string{ - "": "NetworkMigration represents the cluster network migration configuration.", - "mtu": "mtu contains the MTU migration configuration. Set this to allow changing the MTU values for the default network. If unset, the operation of changing the MTU for the default network will be rejected.", - "networkType": "networkType was previously used when changing the default network type. DEPRECATED: network type migration is no longer supported, and setting this to a non-empty value will result in the network operator rejecting the configuration.", - "features": "features was previously used to configure which network plugin features would be migrated in a network type migration. DEPRECATED: network type migration is no longer supported, and setting this to a non-empty value will result in the network operator rejecting the configuration.", - "mode": "mode indicates the mode of network type migration. DEPRECATED: network type migration is no longer supported, and setting this to a non-empty value will result in the network operator rejecting the configuration.", -} - -func (NetworkMigration) SwaggerDoc() map[string]string { - return map_NetworkMigration -} - -var map_NetworkSpec = map[string]string{ - "": "NetworkSpec is the top-level network configuration object.", - "clusterNetwork": "clusterNetwork is the IP address pool to use for pod IPs. Some network providers support multiple ClusterNetworks. Others only support one. This is equivalent to the cluster-cidr.", - "serviceNetwork": "serviceNetwork is the ip address pool to use for Service IPs Currently, all existing network providers only support a single value here, but this is an array to allow for growth.", - "defaultNetwork": "defaultNetwork is the \"default\" network that all pods will receive", - "additionalNetworks": "additionalNetworks is a list of extra networks to make available to pods when multiple networks are enabled.", - "disableMultiNetwork": "disableMultiNetwork defaults to 'false' and this setting enables the pod multi-networking capability. disableMultiNetwork when set to 'true' at cluster install time does not install the components, typically the Multus CNI and the network-attachment-definition CRD, that enable the pod multi-networking capability. Setting the parameter to 'true' might be useful when you need install third-party CNI plugins, but these plugins are not supported by Red Hat. Changing the parameter value as a postinstallation cluster task has no effect.", - "useMultiNetworkPolicy": "useMultiNetworkPolicy enables a controller which allows for MultiNetworkPolicy objects to be used on additional networks as created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy objects, but NetworkPolicy objects only apply to the primary interface. With MultiNetworkPolicy, you can control the traffic that a pod can receive over the secondary interfaces. If unset, this property defaults to 'false' and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is 'true' then the value of this field is ignored.", - "deployKubeProxy": "deployKubeProxy specifies whether or not a standalone kube-proxy should be deployed by the operator. Some network providers include kube-proxy or similar functionality. If unset, the plugin will attempt to select the correct value, which is false when ovn-kubernetes is used and true otherwise.", - "disableNetworkDiagnostics": "disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck CRs from a test pod to every node, apiserver and LB should be disabled or not. If unset, this property defaults to 'false' and network diagnostics is enabled. Setting this to 'true' would reduce the additional load of the pods performing the checks.", - "kubeProxyConfig": "kubeProxyConfig lets us configure desired proxy configuration, if deployKubeProxy is true. If not specified, sensible defaults will be chosen by OpenShift directly.", - "exportNetworkFlows": "exportNetworkFlows enables and configures the export of network flow metadata from the pod network by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. If unset, flows will not be exported to any collector.", - "migration": "migration enables and configures cluster network migration, for network changes that cannot be made instantly.", - "additionalRoutingCapabilities": "additionalRoutingCapabilities describes components and relevant configuration providing additional routing capabilities. When set, it enables such components and the usage of the routing capabilities they provide for the machine network. Upstream operators, like MetalLB operator, requiring these capabilities may rely on, or automatically set this attribute. Network plugins may leverage advanced routing capabilities acquired through the enablement of these components but may require specific configuration on their side to do so; refer to their respective documentation and configuration options.", -} - -func (NetworkSpec) SwaggerDoc() map[string]string { - return map_NetworkSpec -} - -var map_NetworkStatus = map[string]string{ - "": "NetworkStatus is detailed operator status, which is distilled up to the Network clusteroperator object.", -} - -func (NetworkStatus) SwaggerDoc() map[string]string { - return map_NetworkStatus -} - -var map_NoOverlayConfig = map[string]string{ - "": "NoOverlayConfig contains configuration options for networks operating in no-overlay mode.", - "outboundSNAT": "outboundSNAT defines the SNAT behavior for outbound traffic from pods. Allowed values are \"Enabled\" and \"Disabled\". When set to \"Enabled\", SNAT is performed on outbound traffic from pods. When set to \"Disabled\", SNAT is not performed and pod IPs are preserved in outbound traffic. This field is required when the network operates in no-overlay mode. This field can be set to any value at installation time and can be changed afterwards.", - "routing": "routing specifies whether the pod network routing is managed by OVN-Kubernetes or users. Allowed values are \"Managed\" and \"Unmanaged\". When set to \"Managed\", OVN-Kubernetes manages the pod network routing configuration through BGP. When set to \"Unmanaged\", users are responsible for configuring the pod network routing. This field is required when the network operates in no-overlay mode. This field is immutable once set.", -} - -func (NoOverlayConfig) SwaggerDoc() map[string]string { - return map_NoOverlayConfig -} - -var map_OVNKubernetesConfig = map[string]string{ - "": "ovnKubernetesConfig contains the configuration parameters for networks using the ovn-kubernetes network project", - "mtu": "mtu is the MTU to use for the tunnel interface. This must be 100 bytes smaller than the uplink mtu. Default is 1400", - "genevePort": "geneve port is the UDP port to be used by geneve encapulation. Default is 6081", - "hybridOverlayConfig": "hybridOverlayConfig configures an additional overlay network for peers that are not using OVN.", - "ipsecConfig": "ipsecConfig enables and configures IPsec for pods on the pod network within the cluster.", - "policyAuditConfig": "policyAuditConfig is the configuration for network policy audit events. If unset, reported defaults are used.", - "gatewayConfig": "gatewayConfig holds the configuration for node gateway options.", - "v4InternalSubnet": "v4InternalSubnet is a v4 subnet used internally by ovn-kubernetes in case the default one is being already used by something else. It must not overlap with any other subnet being used by OpenShift or by the node network. The size of the subnet must be larger than the number of nodes. Default is 100.64.0.0/16", - "v6InternalSubnet": "v6InternalSubnet is a v6 subnet used internally by ovn-kubernetes in case the default one is being already used by something else. It must not overlap with any other subnet being used by OpenShift or by the node network. The size of the subnet must be larger than the number of nodes. Default is fd98::/64", - "egressIPConfig": "egressIPConfig holds the configuration for EgressIP options.", - "ipv4": "ipv4 allows users to configure IP settings for IPv4 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.", - "ipv6": "ipv6 allows users to configure IP settings for IPv6 connections. When ommitted, this means no opinions and the default configuration is used. Check individual fields within ipv4 for details of default values.", - "routeAdvertisements": "routeAdvertisements determines if the functionality to advertise cluster network routes through a dynamic routing protocol, such as BGP, is enabled or not. This functionality is configured through the ovn-kubernetes RouteAdvertisements CRD. Requires the 'FRR' routing capability provider to be enabled as an additional routing capability. Allowed values are \"Enabled\", \"Disabled\" and ommited. When omitted, this means the user has no opinion and the platform is left to choose reasonable defaults. These defaults are subject to change over time. The current default is \"Disabled\".", - "transport": "transport sets the transport mode for pods on the default network. Allowed values are \"NoOverlay\" and \"Geneve\". \"NoOverlay\" avoids tunnel encapsulation, routing pod traffic directly between nodes. \"Geneve\" encapsulates pod traffic using Geneve tunnels between nodes. When omitted, this means the user has no opinion and the platform chooses a reasonable default which is subject to change over time. The current default is \"Geneve\". \"NoOverlay\" can only be set at installation time and cannot be changed afterwards. \"Geneve\" may be set explicitly at any time to lock in the current default.", - "noOverlayConfig": "noOverlayConfig contains configuration for no-overlay mode. This configuration applies to the default network only. It is required when transport is \"NoOverlay\". When omitted, this means the user does not configure no-overlay mode options.", - "bgpManagedConfig": "bgpManagedConfig configures the BGP properties for networks (default network or CUDNs) in no-overlay mode that specify routing=\"Managed\" in their noOverlayConfig. It is required when noOverlayConfig.routing is set to \"Managed\". When omitted, this means the user does not configure BGP for managed routing. This field can be set at installation time or on day 2, and can be modified at any time.", -} - -func (OVNKubernetesConfig) SwaggerDoc() map[string]string { - return map_OVNKubernetesConfig -} - -var map_OpenShiftSDNConfig = map[string]string{ - "": "OpenShiftSDNConfig was used to configure the OpenShift SDN plugin. It is no longer used.", - "mode": "mode is one of \"Multitenant\", \"Subnet\", or \"NetworkPolicy\"", - "vxlanPort": "vxlanPort is the port to use for all vxlan packets. The default is 4789.", - "mtu": "mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. This must be 50 bytes smaller than the machine's uplink.", - "useExternalOpenvswitch": "useExternalOpenvswitch used to control whether the operator would deploy an OVS DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always run as a system service, and this flag is ignored.", - "enableUnidling": "enableUnidling controls whether or not the service proxy will support idling and unidling of services. By default, unidling is enabled.", -} - -func (OpenShiftSDNConfig) SwaggerDoc() map[string]string { - return map_OpenShiftSDNConfig -} - -var map_PolicyAuditConfig = map[string]string{ - "rateLimit": "rateLimit is the approximate maximum number of messages to generate per-second per-node. If unset the default of 20 msg/sec is used.", - "maxFileSize": "maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs Units are in MB and the Default is 50MB", - "maxLogFiles": "maxLogFiles specifies the maximum number of ACL_audit log files that can be present.", - "destination": "destination is the location for policy log messages. Regardless of this config, persistent logs will always be dumped to the host at /var/log/ovn/ however Additionally syslog output may be configured as follows. Valid values are: - \"libc\" -> to use the libc syslog() function of the host node's journdald process - \"udp:host:port\" -> for sending syslog over UDP - \"unix:file\" -> for using the UNIX domain socket directly - \"null\" -> to discard all messages logged to syslog The default is \"null\"", - "syslogFacility": "syslogFacility the RFC5424 facility for generated messages, e.g. \"kern\". Default is \"local0\"", -} - -func (PolicyAuditConfig) SwaggerDoc() map[string]string { - return map_PolicyAuditConfig -} - -var map_ProxyConfig = map[string]string{ - "": "ProxyConfig defines the configuration knobs for kubeproxy All of these are optional and have sensible defaults", - "iptablesSyncPeriod": "An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted in large clusters for performance reasons, but this is no longer necessary, and there is no reason to change this from the default value. Default: 30s", - "bindAddress": "The address to \"bind\" on Defaults to 0.0.0.0", - "proxyArguments": "Any additional arguments to pass to the kubeproxy process", -} - -func (ProxyConfig) SwaggerDoc() map[string]string { - return map_ProxyConfig -} - -var map_SFlowConfig = map[string]string{ - "collectors": "sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items", -} - -func (SFlowConfig) SwaggerDoc() map[string]string { - return map_SFlowConfig -} - -var map_SimpleMacvlanConfig = map[string]string{ - "": "SimpleMacvlanConfig contains configurations for macvlan interface.", - "master": "master is the host interface to create the macvlan interface from. If not specified, it will be default route interface", - "ipamConfig": "ipamConfig configures IPAM module will be used for IP Address Management (IPAM).", - "mode": "mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge", - "mtu": "mtu is the mtu to use for the macvlan interface. if unset, host's kernel will select the value.", -} - -func (SimpleMacvlanConfig) SwaggerDoc() map[string]string { - return map_SimpleMacvlanConfig -} - -var map_StaticIPAMAddresses = map[string]string{ - "": "StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses", - "address": "address is the IP address in CIDR format", - "gateway": "gateway is IP inside of subnet to designate as the gateway", -} - -func (StaticIPAMAddresses) SwaggerDoc() map[string]string { - return map_StaticIPAMAddresses -} - -var map_StaticIPAMConfig = map[string]string{ - "": "StaticIPAMConfig contains configurations for static IPAM (IP Address Management)", - "addresses": "addresses configures IP address for the interface", - "routes": "routes configures IP routes for the interface", - "dns": "dns configures DNS for the interface", -} - -func (StaticIPAMConfig) SwaggerDoc() map[string]string { - return map_StaticIPAMConfig -} - -var map_StaticIPAMDNS = map[string]string{ - "": "StaticIPAMDNS provides DNS related information for static IPAM", - "nameservers": "nameservers points DNS servers for IP lookup", - "domain": "domain configures the domainname the local domain used for short hostname lookups", - "search": "search configures priority ordered search domains for short hostname lookups", -} - -func (StaticIPAMDNS) SwaggerDoc() map[string]string { - return map_StaticIPAMDNS -} - -var map_StaticIPAMRoutes = map[string]string{ - "": "StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes", - "destination": "destination points the IP route destination", - "gateway": "gateway is the route's next-hop IP address If unset, a default gateway is assumed (as determined by the CNI plugin).", -} - -func (StaticIPAMRoutes) SwaggerDoc() map[string]string { - return map_StaticIPAMRoutes -} - -var map_OLM = map[string]string{ - "": "OLM provides information to configure an operator to manage the OLM controllers\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (OLM) SwaggerDoc() map[string]string { - return map_OLM -} - -var map_OLMList = map[string]string{ - "": "OLMList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (OLMList) SwaggerDoc() map[string]string { - return map_OLMList -} - -var map_OpenShiftAPIServer = map[string]string{ - "": "OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the OpenShift API Server.", - "status": "status defines the observed status of the OpenShift API Server.", -} - -func (OpenShiftAPIServer) SwaggerDoc() map[string]string { - return map_OpenShiftAPIServer -} - -var map_OpenShiftAPIServerList = map[string]string{ - "": "OpenShiftAPIServerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (OpenShiftAPIServerList) SwaggerDoc() map[string]string { - return map_OpenShiftAPIServerList -} - -var map_OpenShiftAPIServerStatus = map[string]string{ - "encryptionStatus": "encryptionStatus contains status reports for the KMS plugin health and its key rotation.", -} - -func (OpenShiftAPIServerStatus) SwaggerDoc() map[string]string { - return map_OpenShiftAPIServerStatus -} - -var map_OpenShiftControllerManager = map[string]string{ - "": "OpenShiftControllerManager provides information to configure an operator to manage openshift-controller-manager.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (OpenShiftControllerManager) SwaggerDoc() map[string]string { - return map_OpenShiftControllerManager -} - -var map_OpenShiftControllerManagerList = map[string]string{ - "": "OpenShiftControllerManagerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (OpenShiftControllerManagerList) SwaggerDoc() map[string]string { - return map_OpenShiftControllerManagerList -} - -var map_KubeScheduler = map[string]string{ - "": "KubeScheduler provides information to configure an operator to manage scheduler.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Kubernetes Scheduler", - "status": "status is the most recently observed status of the Kubernetes Scheduler", -} - -func (KubeScheduler) SwaggerDoc() map[string]string { - return map_KubeScheduler -} - -var map_KubeSchedulerList = map[string]string{ - "": "KubeSchedulerList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (KubeSchedulerList) SwaggerDoc() map[string]string { - return map_KubeSchedulerList -} - -var map_ServiceCA = map[string]string{ - "": "ServiceCA provides information to configure an operator to manage the service cert controllers\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (ServiceCA) SwaggerDoc() map[string]string { - return map_ServiceCA -} - -var map_ServiceCAList = map[string]string{ - "": "ServiceCAList is a collection of items\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ServiceCAList) SwaggerDoc() map[string]string { - return map_ServiceCAList -} - -var map_ServiceCatalogAPIServer = map[string]string{ - "": "ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ServiceCatalogAPIServer) SwaggerDoc() map[string]string { - return map_ServiceCatalogAPIServer -} - -var map_ServiceCatalogAPIServerList = map[string]string{ - "": "ServiceCatalogAPIServerList is a collection of items DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ServiceCatalogAPIServerList) SwaggerDoc() map[string]string { - return map_ServiceCatalogAPIServerList -} - -var map_ServiceCatalogControllerManager = map[string]string{ - "": "ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ServiceCatalogControllerManager) SwaggerDoc() map[string]string { - return map_ServiceCatalogControllerManager -} - -var map_ServiceCatalogControllerManagerList = map[string]string{ - "": "ServiceCatalogControllerManagerList is a collection of items DEPRECATED: will be removed in 4.6\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ServiceCatalogControllerManagerList) SwaggerDoc() map[string]string { - return map_ServiceCatalogControllerManagerList -} - -var map_Storage = map[string]string{ - "": "Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (Storage) SwaggerDoc() map[string]string { - return map_Storage -} - -var map_StorageList = map[string]string{ - "": "StorageList contains a list of Storages.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (StorageList) SwaggerDoc() map[string]string { - return map_StorageList -} - -var map_StorageSpec = map[string]string{ - "": "StorageSpec is the specification of the desired behavior of the cluster storage operator.", - "vsphereStorageDriver": "vsphereStorageDriver indicates the storage driver to use on VSphere clusters. Once this field is set to CSIWithMigrationDriver, it can not be changed. If this is empty, the platform will choose a good default, which may change over time without notice. The current default is CSIWithMigrationDriver and may not be changed. DEPRECATED: This field will be removed in a future release.", -} - -func (StorageSpec) SwaggerDoc() map[string]string { - return map_StorageSpec -} - -var map_StorageStatus = map[string]string{ - "": "StorageStatus defines the observed status of the cluster storage operator.", -} - -func (StorageStatus) SwaggerDoc() map[string]string { - return map_StorageStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/Makefile b/vendor/github.com/openshift/api/operator/v1alpha1/Makefile deleted file mode 100644 index 9cf348382..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="operator.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/doc.go b/vendor/github.com/openshift/api/operator/v1alpha1/doc.go deleted file mode 100644 index 6a48bca3d..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.operator.v1alpha1 - -// +groupName=operator.openshift.io -package v1alpha1 diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/register.go b/vendor/github.com/openshift/api/operator/v1alpha1/register.go deleted file mode 100644 index ec19cba3a..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/register.go +++ /dev/null @@ -1,49 +0,0 @@ -package v1alpha1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "operator.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &GenericOperatorConfig{}, - &ImageContentSourcePolicy{}, - &ImageContentSourcePolicyList{}, - &OLM{}, - &OLMList{}, - &EtcdBackup{}, - &EtcdBackupList{}, - &ClusterVersionOperator{}, - &ClusterVersionOperatorList{}, - &ClusterAPI{}, - &ClusterAPIList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types.go b/vendor/github.com/openshift/api/operator/v1alpha1/types.go deleted file mode 100644 index 932e8c583..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types.go +++ /dev/null @@ -1,204 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - configv1 "github.com/openshift/api/config/v1" -) - -// DEPRECATED: Use v1.ManagementState instead -type ManagementState string - -const ( - // Managed means that the operator is actively managing its resources and trying to keep the component active - // DEPRECATED: Use v1.Managed instead - Managed ManagementState = "Managed" - // Unmanaged means that the operator is not taking any action related to the component - // DEPRECATED: Use v1.Unmanaged instead - Unmanaged ManagementState = "Unmanaged" - // Removed means that the operator is actively managing its resources and trying to remove all traces of the component - // DEPRECATED: Use v1.Removed instead - Removed ManagementState = "Removed" -) - -// OperatorSpec contains common fields for an operator to need. It is intended to be anonymous included -// inside of the Spec struct for you particular operator. -// DEPRECATED: Use v1.OperatorSpec instead -type OperatorSpec struct { - // managementState indicates whether and how the operator should manage the component - ManagementState ManagementState `json:"managementState"` - - // imagePullSpec is the image to use for the component. - ImagePullSpec string `json:"imagePullSpec"` - - // imagePullPolicy specifies the image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, - // or IfNotPresent otherwise. - ImagePullPolicy string `json:"imagePullPolicy"` - - // version is the desired state in major.minor.micro-patch. Usually patch is ignored. - Version string `json:"version"` - - // logging contains glog parameters for the component pods. It's always a command line arg for the moment - Logging LoggingConfig `json:"logging,omitempty"` -} - -// LoggingConfig holds information about configuring logging -// DEPRECATED: Use v1.LogLevel instead -type LoggingConfig struct { - // level is passed to glog. - Level int64 `json:"level"` - - // vmodule is passed to glog. - Vmodule string `json:"vmodule"` -} - -// DEPRECATED: Use v1.ConditionStatus instead -type ConditionStatus string - -const ( - // DEPRECATED: Use v1.ConditionTrue instead - ConditionTrue ConditionStatus = "True" - // DEPRECATED: Use v1.ConditionFalse instead - ConditionFalse ConditionStatus = "False" - // DEPRECATED: Use v1.ConditionUnknown instead - ConditionUnknown ConditionStatus = "Unknown" - - // these conditions match the conditions for the ClusterOperator type. - // DEPRECATED: Use v1.OperatorStatusTypeAvailable instead - OperatorStatusTypeAvailable = "Available" - // DEPRECATED: Use v1.OperatorStatusTypeProgressing instead - OperatorStatusTypeProgressing = "Progressing" - // DEPRECATED: Use v1.OperatorStatusTypeDegraded instead - OperatorStatusTypeFailing = "Failing" - - // DEPRECATED: Use v1.OperatorStatusTypeProgressing instead - OperatorStatusTypeMigrating = "Migrating" - // TODO this is going to be removed - // DEPRECATED: Use v1.OperatorStatusTypeAvailable instead - OperatorStatusTypeSyncSuccessful = "SyncSuccessful" -) - -// OperatorCondition is just the standard condition fields. -// DEPRECATED: Use v1.OperatorCondition instead -type OperatorCondition struct { - Type string `json:"type"` - Status ConditionStatus `json:"status"` - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` - Reason string `json:"reason,omitempty"` - Message string `json:"message,omitempty"` -} - -// VersionAvailability gives information about the synchronization and operational status of a particular version of the component -// DEPRECATED: Use fields in v1.OperatorStatus instead -type VersionAvailability struct { - // version is the level this availability applies to - Version string `json:"version"` - // updatedReplicas indicates how many replicas are at the desired state - UpdatedReplicas int32 `json:"updatedReplicas"` - // readyReplicas indicates how many replicas are ready and at the desired state - ReadyReplicas int32 `json:"readyReplicas"` - // errors indicates what failures are associated with the operator trying to manage this version - Errors []string `json:"errors"` - // generations allows an operator to track what the generation of "important" resources was the last time we updated them - Generations []GenerationHistory `json:"generations"` -} - -// GenerationHistory keeps track of the generation for a given resource so that decisions about forced updated can be made. -// DEPRECATED: Use fields in v1.GenerationStatus instead -type GenerationHistory struct { - // group is the group of the thing you're tracking - Group string `json:"group"` - // resource is the resource type of the thing you're tracking - Resource string `json:"resource"` - // namespace is where the thing you're tracking is - Namespace string `json:"namespace"` - // name is the name of the thing you're tracking - Name string `json:"name"` - // lastGeneration is the last generation of the workload controller involved - LastGeneration int64 `json:"lastGeneration"` -} - -// OperatorStatus contains common fields for an operator to need. It is intended to be anonymous included -// inside of the Status struct for you particular operator. -// DEPRECATED: Use v1.OperatorStatus instead -type OperatorStatus struct { - // observedGeneration is the last generation change you've dealt with - ObservedGeneration int64 `json:"observedGeneration,omitempty"` - - // conditions is a list of conditions and their status - Conditions []OperatorCondition `json:"conditions,omitempty"` - - // state indicates what the operator has observed to be its current operational status. - State ManagementState `json:"state,omitempty"` - // taskSummary is a high level summary of what the controller is currently attempting to do. It is high-level, human-readable - // and not guaranteed in any way. (I needed this for debugging and realized it made a great summary). - TaskSummary string `json:"taskSummary,omitempty"` - - // currentVersionAvailability is availability information for the current version. If it is unmanged or removed, this doesn't exist. - CurrentAvailability *VersionAvailability `json:"currentVersionAvailability,omitempty"` - // targetVersionAvailability is availability information for the target version if we are migrating - TargetAvailability *VersionAvailability `json:"targetVersionAvailability,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GenericOperatorConfig provides information to configure an operator -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:internal -type GenericOperatorConfig struct { - metav1.TypeMeta `json:",inline"` - - // servingInfo is the HTTP serving information for the controller's endpoints - ServingInfo configv1.HTTPServingInfo `json:"servingInfo,omitempty"` - - // leaderElection provides information to elect a leader. Only override this if you have a specific need - LeaderElection configv1.LeaderElection `json:"leaderElection,omitempty"` - - // authentication allows configuration of authentication for the endpoints - Authentication DelegatedAuthentication `json:"authentication,omitempty"` - // authorization allows configuration of authentication for the endpoints - Authorization DelegatedAuthorization `json:"authorization,omitempty"` -} - -// DelegatedAuthentication allows authentication to be disabled. -type DelegatedAuthentication struct { - // disabled indicates that authentication should be disabled. By default it will use delegated authentication. - Disabled bool `json:"disabled,omitempty"` -} - -// DelegatedAuthorization allows authorization to be disabled. -type DelegatedAuthorization struct { - // disabled indicates that authorization should be disabled. By default it will use delegated authorization. - Disabled bool `json:"disabled,omitempty"` -} - -// StaticPodOperatorStatus is status for controllers that manage static pods. There are different needs because individual -// node status must be tracked. -// DEPRECATED: Use v1.StaticPodOperatorStatus instead -type StaticPodOperatorStatus struct { - OperatorStatus `json:",inline"` - - // latestAvailableDeploymentGeneration is the deploymentID of the most recent deployment - LatestAvailableDeploymentGeneration int32 `json:"latestAvailableDeploymentGeneration"` - - // nodeStatuses track the deployment values and errors across individual nodes - NodeStatuses []NodeStatus `json:"nodeStatuses"` -} - -// NodeStatus provides information about the current state of a particular node managed by this operator. -// Deprecated: Use v1.NodeStatus instead -type NodeStatus struct { - // nodeName is the name of the node - NodeName string `json:"nodeName"` - - // currentDeploymentGeneration is the generation of the most recently successful deployment - CurrentDeploymentGeneration int32 `json:"currentDeploymentGeneration"` - // targetDeploymentGeneration is the generation of the deployment we're trying to apply - TargetDeploymentGeneration int32 `json:"targetDeploymentGeneration"` - // lastFailedDeploymentGeneration is the generation of the deployment we tried and failed to deploy. - LastFailedDeploymentGeneration int32 `json:"lastFailedDeploymentGeneration"` - - // lastFailedDeploymentGenerationErrors is a list of the errors during the failed deployment referenced in lastFailedDeploymentGeneration - LastFailedDeploymentErrors []string `json:"lastFailedDeploymentErrors"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterapi.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterapi.go deleted file mode 100644 index 291cedc14..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterapi.go +++ /dev/null @@ -1,301 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusterapis,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2564 -// +openshift:file-pattern=cvoRunLevel=0000_30,operatorName=cluster-api,operatorOrdering=01 -// +openshift:enable:FeatureGate=ClusterAPIMachineManagement -// +kubebuilder:metadata:annotations="release.openshift.io/feature-gate=ClusterAPIMachineManagement" - -// ClusterAPI provides configuration for the capi-operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="clusterapi is a singleton, .metadata.name must be 'cluster'" -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.status) || has(self.status)",message="status may not be removed once set" -type ClusterAPI struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +required - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired behavior of the capi-operator. - // +required - Spec *ClusterAPISpec `json:"spec,omitempty"` - - // status defines the observed status of the capi-operator. - // +optional - Status ClusterAPIStatus `json:"status,omitzero"` -} - -// ClusterAPISpec defines the desired configuration of the capi-operator. -// The spec is required but we deliberately allow it to be empty. -// +kubebuilder:validation:MinProperties=0 -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.unmanagedCustomResourceDefinitions) || has(self.unmanagedCustomResourceDefinitions)",message="unmanagedCustomResourceDefinitions cannot be unset once set" -type ClusterAPISpec struct { - // unmanagedCustomResourceDefinitions is a list of ClusterResourceDefinition (CRD) - // names that should not be managed by the capi-operator installer - // controller. This allows external actors to own specific CRDs while - // capi-operator manages others. - // - // Each CRD name must be a valid DNS-1123 subdomain consisting of lowercase - // alphanumeric characters, '-' or '.', and must start and end with an - // alphanumeric character, with a maximum length of 253 characters. - // CRD names must contain at least two '.' characters. - // Example: "clusters.cluster.x-k8s.io" - // - // Items cannot be removed from this list once added. - // - // The maximum number of unmanagedCustomResourceDefinitions is 128. - // - // +optional - // +listType=set - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=128 - // +kubebuilder:validation:XValidation:rule="oldSelf.all(item, item in self)",message="items cannot be removed from unmanagedCustomResourceDefinitions list" - // +kubebuilder:validation:items:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +kubebuilder:validation:items:XValidation:rule="self.split('.').size() > 2",message="CRD names must contain at least two '.' characters." - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=253 - UnmanagedCustomResourceDefinitions []string `json:"unmanagedCustomResourceDefinitions,omitempty"` -} - -// RevisionName represents the name of a revision. The name must be between 1 -// and 255 characters long. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=255 -type RevisionName string - -// ClusterAPIStatus describes the current state of the capi-operator. -// +kubebuilder:validation:XValidation:rule="self.revisions.exists(r, r.name == self.desiredRevision && self.revisions.all(s, s.revision <= r.revision))",message="desiredRevision must be the name of the revision with the highest revision number" -// +kubebuilder:validation:XValidation:rule="!has(self.currentRevision) || self.revisions.exists(r, r.name == self.currentRevision)",message="currentRevision must correspond to an entry in the revisions list" -// +kubebuilder:validation:XValidation:rule="!has(oldSelf.observedRevisionGeneration) || has(self.observedRevisionGeneration)",message="observedRevisionGeneration may not be unset once set" -type ClusterAPIStatus struct { - // currentRevision is the name of the most recently fully applied revision. - // It is written by the installer controller. If it is absent, it indicates - // that no revision has been fully applied yet. - // If set, currentRevision must correspond to an entry in the revisions list. - // +optional - CurrentRevision RevisionName `json:"currentRevision,omitempty"` - - // desiredRevision is the name of the desired revision. It is written by the - // revision controller. It must be set to the name of the entry in the - // revisions list with the highest revision number. - // +required - DesiredRevision RevisionName `json:"desiredRevision,omitempty"` - - // revisions is a list of all currently active revisions. A revision is - // active until the installer controller updates currentRevision to a later - // revision. It is written by the revision controller. - // - // The maximum number of revisions is 16. - // All revisions must have a unique name. - // All revisions must have a unique revision number. - // When adding a revision, the revision number must be greater than the highest revision number in the list. - // Revisions are immutable, although they can be deleted. - // - // +required - // +listType=atomic - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.name == y.name))",message="each revision must have a unique name" - // +kubebuilder:validation:XValidation:rule="self.all(x, self.exists_one(y, x.revision == y.revision))",message="each revision must have a unique revision number" - // +kubebuilder:validation:XValidation:rule="self.all(new, oldSelf.exists(old, old.name == new.name) || oldSelf.all(old, new.revision > old.revision))",message="new revisions must have a revision number greater than all existing revisions" - // +kubebuilder:validation:XValidation:rule="oldSelf.all(old, !self.exists(new, new.name == old.name) || self.exists(new, new == old))",message="existing revisions are immutable, but may be removed" - Revisions []ClusterAPIInstallerRevision `json:"revisions,omitempty"` - - // observedRevisionGeneration is the generation of the ClusterAPI object that was last observed by the revision controller. - // If specified it must be greater than or equal to 1, and less than 2^53. It may not decrease or be unset once set. - // - // +optional - // +kubebuilder:validation:Minimum=1 - // +kubebuilder:validation:Maximum=9007199254740991 - // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="observedRevisionGeneration may not decrease" - ObservedRevisionGeneration int64 `json:"observedRevisionGeneration,omitempty"` -} - -// +structType=atomic -type ClusterAPIInstallerRevision struct { - // name is the name of a revision. - // +required - Name RevisionName `json:"name,omitempty"` - - // revision is a monotonically increasing number that is assigned to a revision. - // +required - // +kubebuilder:validation:Minimum=1 - Revision int64 `json:"revision,omitempty"` - - // contentID uniquely identifies the content of this revision. - // The contentID must be between 1 and 255 characters long. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - ContentID string `json:"contentID,omitempty"` - - // unmanagedCustomResourceDefinitions is a list of the names of - // ClusterResourceDefinition (CRD) objects which are included in this - // revision, but which should not be installed or updated. If not set, all - // CRDs in the revision will be managed by the CAPI operator. - // +listType=atomic - // +kubebuilder:validation:items:XValidation:rule="!format.dns1123Subdomain().validate(self).hasValue()",message="a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character." - // +kubebuilder:validation:items:MinLength=1 - // +kubebuilder:validation:items:MaxLength=253 - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=128 - // +optional - UnmanagedCustomResourceDefinitions []string `json:"unmanagedCustomResourceDefinitions,omitempty"` - - // manifestSubstitutions is a list of envsubst style substitutions which - // will be applied to manifests in the revision during rendering. If - // defined it must not be empty, and may not contain more than 32 items. - // Each manifest substitution must have a unique key. - // +optional - // +listType=map - // +listMapKey=key - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - ManifestSubstitutions []ClusterAPIInstallerRevisionManifestSubstitution `json:"manifestSubstitutions,omitempty"` - - // components is a list of components which will be installed by this - // revision. Components will be installed in the order they are listed. If - // omitted no components will be installed. - // - // The maximum number of components is 32. - // - // +optional - // +listType=atomic - // +kubebuilder:validation:MinItems=1 - // +kubebuilder:validation:MaxItems=32 - Components []ClusterAPIInstallerComponent `json:"components,omitempty"` -} - -// ClusterAPIInstallerRevisionManifestSubstitution defines an envsubst style -// substitution which will be applied to manifests in a revision during -// rendering. -type ClusterAPIInstallerRevisionManifestSubstitution struct { - // key is the name of the envsubst variable to substitute. It must be a - // valid envsubst variable name, consisting of letters, digits, and - // underscores, and must start with a letter or underscore. The key must - // not be empty, and must not exceed 255 characters. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z_][A-Za-z0-9_]*$')",message="key must start with a letter or underscore, followed by letters, digits, or underscores" - Key string `json:"key,omitempty"` - - // value is the value to substitute for the envsubst variable. It may be - // empty, in which case the variable will be substituted with an empty - // string. The value must not exceed 4096 characters. - // +required - // +kubebuilder:validation:MinLength=0 - // +kubebuilder:validation:MaxLength=4096 - Value *string `json:"value,omitempty"` -} - -// InstallerComponentType is the type of component to install. -// +kubebuilder:validation:Enum=Image -// +enum -type InstallerComponentType string - -const ( - // InstallerComponentTypeImage is an image source for a component. - InstallerComponentTypeImage InstallerComponentType = "Image" -) - -// ClusterAPIInstallerComponent defines a component which will be installed by this revision. -type ClusterAPIInstallerComponent struct { - // name is the human-readable name of the component. The value has no - // effect, and will not be set if the component does not define a name in - // its manifests. If set it must consist of alphanumeric characters, or - // '-', and may not exceed 255 characters. - // +optional - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:XValidation:rule="self.matches('^[A-Za-z0-9-]+$')",message="name must consist of alphanumeric characters or '-'" - Name string `json:"name,omitempty"` - - ClusterAPIInstallerComponentSource `json:",inline"` -} - -// ClusterAPIInstallerComponentSource defines the source of a component which will be installed by this revision. -// +union -// +kubebuilder:validation:XValidation:rule="self.type == 'Image' ? has(self.image) : !has(self.image)",message="image is required when type is Image, and forbidden otherwise" -type ClusterAPIInstallerComponentSource struct { - // type is the source type of the component. - // The only valid value is Image. - // When set to Image, the image field must be set and will define an image source for the component. - // +required - // +unionDiscriminator - Type InstallerComponentType `json:"type,omitempty"` - - // image defines an image source for a component. The image must contain a - // /capi-operator-installer directory containing the component manifests. - // +optional - Image ClusterAPIInstallerComponentImage `json:"image,omitzero"` -} - -// The image name validation regex is derived from the OCI distribution reference: -// https://github.com/distribution/reference/blob/main/regexp.go -// It matches: domainAndPort "/" remoteName -// -// domainAndPort = (domainName | "[" ipv6 "]") [ ":" port ] -// domainName = label ("." label)* -// label = alphanumeric, may contain hyphens but must start/end with [a-zA-Z0-9] -// remoteName = pathComponent ("/" pathComponent)* -// pathComponent = [a-z0-9]+ separated by ".", "_", "__", or "-"+ - -// ImageDigestFormat is a type that conforms to the format host[:port][/namespace[/namespace...]]/name@sha256:. -// The host may be a dotted domain name (including IPv4 addresses like 192.168.1.1), or an IPv6 address in brackets (e.g. [fd00::1]). -// The digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. -// The length of the field must be between 1 to 447 characters. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=447 -// +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" -// +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^(?:(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])(?:\\.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]))*|\\[(?:[a-fA-F0-9:]+)\\])(?::[0-9]+)?/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*(?:/[a-z0-9]+(?:(?:[._]|__|[-]+)[a-z0-9]+)*)*$'))`,message="the OCI Image name should follow the host[:port][/namespace[/namespace...]]/name format, where host is a domain name, IPv4, or IPv6 address in brackets" -type ImageDigestFormat string - -// ClusterAPIInstallerComponentImage defines an image source for a component. -type ClusterAPIInstallerComponentImage struct { - // ref is an image reference to the image containing the component manifests. The reference - // must be a valid image digest reference in the format host[:port][/namespace]/name@sha256:. - // The digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. - // The length of the field must be between 1 to 447 characters. - // +required - Ref ImageDigestFormat `json:"ref,omitempty"` - - // profile is the name of a profile to use from the image. - // - // A profile name may be up to 255 characters long. It must consist of alphanumeric characters, '-', or '_'. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:XValidation:rule="self.matches('^[a-zA-Z0-9-_]+$')",message="profile must consist of alphanumeric characters, '-', or '_'" - Profile string `json:"profile,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterAPIList contains a list of ClusterAPI configurations -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type ClusterAPIList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []ClusterAPI `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go deleted file mode 100644 index ec9cfea9f..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_clusterversion.go +++ /dev/null @@ -1,76 +0,0 @@ -package v1alpha1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterVersionOperator holds cluster-wide information about the Cluster Version Operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:file-pattern=cvoRunLevel=0000_00,operatorName=cluster-version-operator,operatorOrdering=01 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=clusterversionoperators,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2044 -// +openshift:enable:FeatureGate=ClusterVersionOperatorConfiguration -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="ClusterVersionOperator is a singleton; the .metadata.name field must be 'cluster'" -type ClusterVersionOperator struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec is the specification of the desired behavior of the Cluster Version Operator. - // +required - Spec ClusterVersionOperatorSpec `json:"spec"` - - // status is the most recently observed status of the Cluster Version Operator. - // +optional - Status ClusterVersionOperatorStatus `json:"status"` -} - -// ClusterVersionOperatorSpec is the specification of the desired behavior of the Cluster Version Operator. -type ClusterVersionOperatorSpec struct { - // operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a - // simple way to manage coarse grained logging choices that operators have to interpret for themselves. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - // +optional - // +kubebuilder:default=Normal - OperatorLogLevel operatorv1.LogLevel `json:"operatorLogLevel,omitempty"` -} - -// ClusterVersionOperatorStatus defines the observed status of the Cluster Version Operator. -type ClusterVersionOperatorStatus struct { - // observedGeneration represents the most recent generation observed by the operator and specifies the version of - // the spec field currently being synced. - // +optional - // +kubebuilder:validation:XValidation:rule="self >= oldSelf",message="observedGeneration must only increase" - ObservedGeneration int64 `json:"observedGeneration,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterVersionOperatorList is a collection of ClusterVersionOperators. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type ClusterVersionOperatorList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items is a list of ClusterVersionOperators. - // +optional - Items []ClusterVersionOperator `json:"items,omitempty"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go deleted file mode 100644 index dc5d81cea..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_etcdbackup.go +++ /dev/null @@ -1,100 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// -// # EtcdBackup provides configuration options and status for a one-time backup attempt of the etcd cluster -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=etcdbackups,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1482 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=etcd,operatorOrdering=01 -// +openshift:enable:FeatureGate=AutomatedEtcdBackup -type EtcdBackup struct { - metav1.TypeMeta `json:",inline"` - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec EtcdBackupSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status EtcdBackupStatus `json:"status"` -} - -type EtcdBackupSpec struct { - // pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the - // etcd backup file would be saved - // The PVC itself must always be created in the "openshift-etcd" namespace - // If the PVC is left unspecified "" then the platform will choose a reasonable default location to save the backup. - // In the future this would be backups saved across the control-plane master nodes. - // +optional - // +kubebuilder:validation:XValidation:rule="self == oldSelf",message="pvcName is immutable once set" - PVCName string `json:"pvcName"` -} - -type EtcdBackupStatus struct { - // conditions provide details on the status of the etcd backup job. - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` - - // backupJob is the reference to the Job that executes the backup. - // Optional - // +optional - BackupJob *BackupJobReference `json:"backupJob"` -} - -// BackupJobReference holds a reference to the batch/v1 Job created to run the etcd backup -type BackupJobReference struct { - - // namespace is the namespace of the Job. - // this is always expected to be "openshift-etcd" since the user provided PVC - // is also required to be in "openshift-etcd" - // Required - // +required - // +kubebuilder:validation:Pattern:=`^openshift-etcd$` - Namespace string `json:"namespace"` - - // name is the name of the Job. - // Required - // +required - Name string `json:"name"` -} - -type BackupConditionReason string - -var ( - // BackupPending is added to the EtcdBackupStatus Conditions when the etcd backup is pending. - BackupPending BackupConditionReason = "BackupPending" - - // BackupCompleted is added to the EtcdBackupStatus Conditions when the etcd backup has completed. - BackupCompleted BackupConditionReason = "BackupCompleted" - - // BackupFailed is added to the EtcdBackupStatus Conditions when the etcd backup has failed. - BackupFailed BackupConditionReason = "BackupFailed" - - // BackupSkipped is added to the EtcdBackupStatus Conditions when the etcd backup has been skipped. - BackupSkipped BackupConditionReason = "BackupSkipped" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// EtcdBackupList is a collection of items -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type EtcdBackupList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata"` - Items []EtcdBackup `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go deleted file mode 100644 index d4f7e17e6..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_image_content_source_policy.go +++ /dev/null @@ -1,84 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=imagecontentsourcepolicies,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=config-operator,operatorOrdering=01 -// +openshift:compatibility-gen:level=4 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -type ImageContentSourcePolicy struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec holds user settable values for configuration - // +required - Spec ImageContentSourcePolicySpec `json:"spec"` -} - -// ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD. -type ImageContentSourcePolicySpec struct { - // repositoryDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // Only image pull specifications that have an image digest will have this behavior applied - // to them - tags will continue to be pulled from the specified repository in the pull spec. - // - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // +optional - RepositoryDigestMirrors []RepositoryDigestMirrors `json:"repositoryDigestMirrors"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type ImageContentSourcePolicyList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - Items []ImageContentSourcePolicy `json:"items"` -} - -// RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. -// Note: the mirrors only work when pulling the images that are referenced by their digests. -type RepositoryDigestMirrors struct { - // source is the repository that users refer to, e.g. in image pull specifications. - // +required - Source string `json:"source"` - // mirrors is one or more repositories that may also contain the same images. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. Other cluster configuration, - // including (but not limited to) other repositoryDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // +optional - Mirrors []string `json:"mirrors"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go b/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go deleted file mode 100644 index 41d160a20..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/types_olm.go +++ /dev/null @@ -1,64 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - operatorv1 "github.com/openshift/api/operator/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OLM provides information to configure an operator to manage the OLM controllers -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=olms,scope=Cluster -// +kubebuilder:subresource:status -// +kubebuilder:metadata:annotations=include.release.openshift.io/ibm-cloud-managed=false -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1504 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=operator-lifecycle-manager,operatorOrdering=01 -// +openshift:enable:FeatureGate=NewOLM -// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="olm is a singleton, .metadata.name must be 'cluster'" -type OLM struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - //spec holds user settable values for configuration - // +required - Spec OLMSpec `json:"spec"` - // status holds observed values from the cluster. They may not be overridden. - // +optional - Status OLMStatus `json:"status"` -} - -type OLMSpec struct { - operatorv1.OperatorSpec `json:",inline"` -} - -type OLMStatus struct { - operatorv1.OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OLMList is a collection of items -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type OLMList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []OLM `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 3c3dc8e7a..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,868 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *BackupJobReference) DeepCopyInto(out *BackupJobReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BackupJobReference. -func (in *BackupJobReference) DeepCopy() *BackupJobReference { - if in == nil { - return nil - } - out := new(BackupJobReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPI) DeepCopyInto(out *ClusterAPI) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Spec != nil { - in, out := &in.Spec, &out.Spec - *out = new(ClusterAPISpec) - (*in).DeepCopyInto(*out) - } - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPI. -func (in *ClusterAPI) DeepCopy() *ClusterAPI { - if in == nil { - return nil - } - out := new(ClusterAPI) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterAPI) 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 *ClusterAPIInstallerComponent) DeepCopyInto(out *ClusterAPIInstallerComponent) { - *out = *in - out.ClusterAPIInstallerComponentSource = in.ClusterAPIInstallerComponentSource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIInstallerComponent. -func (in *ClusterAPIInstallerComponent) DeepCopy() *ClusterAPIInstallerComponent { - if in == nil { - return nil - } - out := new(ClusterAPIInstallerComponent) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIInstallerComponentImage) DeepCopyInto(out *ClusterAPIInstallerComponentImage) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIInstallerComponentImage. -func (in *ClusterAPIInstallerComponentImage) DeepCopy() *ClusterAPIInstallerComponentImage { - if in == nil { - return nil - } - out := new(ClusterAPIInstallerComponentImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIInstallerComponentSource) DeepCopyInto(out *ClusterAPIInstallerComponentSource) { - *out = *in - out.Image = in.Image - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIInstallerComponentSource. -func (in *ClusterAPIInstallerComponentSource) DeepCopy() *ClusterAPIInstallerComponentSource { - if in == nil { - return nil - } - out := new(ClusterAPIInstallerComponentSource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIInstallerRevision) DeepCopyInto(out *ClusterAPIInstallerRevision) { - *out = *in - if in.UnmanagedCustomResourceDefinitions != nil { - in, out := &in.UnmanagedCustomResourceDefinitions, &out.UnmanagedCustomResourceDefinitions - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ManifestSubstitutions != nil { - in, out := &in.ManifestSubstitutions, &out.ManifestSubstitutions - *out = make([]ClusterAPIInstallerRevisionManifestSubstitution, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Components != nil { - in, out := &in.Components, &out.Components - *out = make([]ClusterAPIInstallerComponent, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIInstallerRevision. -func (in *ClusterAPIInstallerRevision) DeepCopy() *ClusterAPIInstallerRevision { - if in == nil { - return nil - } - out := new(ClusterAPIInstallerRevision) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIInstallerRevisionManifestSubstitution) DeepCopyInto(out *ClusterAPIInstallerRevisionManifestSubstitution) { - *out = *in - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIInstallerRevisionManifestSubstitution. -func (in *ClusterAPIInstallerRevisionManifestSubstitution) DeepCopy() *ClusterAPIInstallerRevisionManifestSubstitution { - if in == nil { - return nil - } - out := new(ClusterAPIInstallerRevisionManifestSubstitution) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIList) DeepCopyInto(out *ClusterAPIList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterAPI, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIList. -func (in *ClusterAPIList) DeepCopy() *ClusterAPIList { - if in == nil { - return nil - } - out := new(ClusterAPIList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterAPIList) 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 *ClusterAPISpec) DeepCopyInto(out *ClusterAPISpec) { - *out = *in - if in.UnmanagedCustomResourceDefinitions != nil { - in, out := &in.UnmanagedCustomResourceDefinitions, &out.UnmanagedCustomResourceDefinitions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPISpec. -func (in *ClusterAPISpec) DeepCopy() *ClusterAPISpec { - if in == nil { - return nil - } - out := new(ClusterAPISpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterAPIStatus) DeepCopyInto(out *ClusterAPIStatus) { - *out = *in - if in.Revisions != nil { - in, out := &in.Revisions, &out.Revisions - *out = make([]ClusterAPIInstallerRevision, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterAPIStatus. -func (in *ClusterAPIStatus) DeepCopy() *ClusterAPIStatus { - if in == nil { - return nil - } - out := new(ClusterAPIStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersionOperator) DeepCopyInto(out *ClusterVersionOperator) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - out.Status = in.Status - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperator. -func (in *ClusterVersionOperator) DeepCopy() *ClusterVersionOperator { - if in == nil { - return nil - } - out := new(ClusterVersionOperator) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterVersionOperator) 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 *ClusterVersionOperatorList) DeepCopyInto(out *ClusterVersionOperatorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterVersionOperator, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorList. -func (in *ClusterVersionOperatorList) DeepCopy() *ClusterVersionOperatorList { - if in == nil { - return nil - } - out := new(ClusterVersionOperatorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterVersionOperatorList) 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 *ClusterVersionOperatorSpec) DeepCopyInto(out *ClusterVersionOperatorSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorSpec. -func (in *ClusterVersionOperatorSpec) DeepCopy() *ClusterVersionOperatorSpec { - if in == nil { - return nil - } - out := new(ClusterVersionOperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterVersionOperatorStatus) DeepCopyInto(out *ClusterVersionOperatorStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterVersionOperatorStatus. -func (in *ClusterVersionOperatorStatus) DeepCopy() *ClusterVersionOperatorStatus { - if in == nil { - return nil - } - out := new(ClusterVersionOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DelegatedAuthentication) DeepCopyInto(out *DelegatedAuthentication) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelegatedAuthentication. -func (in *DelegatedAuthentication) DeepCopy() *DelegatedAuthentication { - if in == nil { - return nil - } - out := new(DelegatedAuthentication) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DelegatedAuthorization) DeepCopyInto(out *DelegatedAuthorization) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DelegatedAuthorization. -func (in *DelegatedAuthorization) DeepCopy() *DelegatedAuthorization { - if in == nil { - return nil - } - out := new(DelegatedAuthorization) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdBackup) DeepCopyInto(out *EtcdBackup) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackup. -func (in *EtcdBackup) DeepCopy() *EtcdBackup { - if in == nil { - return nil - } - out := new(EtcdBackup) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EtcdBackup) 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 *EtcdBackupList) DeepCopyInto(out *EtcdBackupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EtcdBackup, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupList. -func (in *EtcdBackupList) DeepCopy() *EtcdBackupList { - if in == nil { - return nil - } - out := new(EtcdBackupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EtcdBackupList) 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 *EtcdBackupSpec) DeepCopyInto(out *EtcdBackupSpec) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupSpec. -func (in *EtcdBackupSpec) DeepCopy() *EtcdBackupSpec { - if in == nil { - return nil - } - out := new(EtcdBackupSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EtcdBackupStatus) DeepCopyInto(out *EtcdBackupStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.BackupJob != nil { - in, out := &in.BackupJob, &out.BackupJob - *out = new(BackupJobReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EtcdBackupStatus. -func (in *EtcdBackupStatus) DeepCopy() *EtcdBackupStatus { - if in == nil { - return nil - } - out := new(EtcdBackupStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenerationHistory) DeepCopyInto(out *GenerationHistory) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenerationHistory. -func (in *GenerationHistory) DeepCopy() *GenerationHistory { - if in == nil { - return nil - } - out := new(GenerationHistory) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GenericOperatorConfig) DeepCopyInto(out *GenericOperatorConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ServingInfo.DeepCopyInto(&out.ServingInfo) - out.LeaderElection = in.LeaderElection - out.Authentication = in.Authentication - out.Authorization = in.Authorization - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GenericOperatorConfig. -func (in *GenericOperatorConfig) DeepCopy() *GenericOperatorConfig { - if in == nil { - return nil - } - out := new(GenericOperatorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GenericOperatorConfig) 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 *ImageContentSourcePolicy) DeepCopyInto(out *ImageContentSourcePolicy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicy. -func (in *ImageContentSourcePolicy) DeepCopy() *ImageContentSourcePolicy { - if in == nil { - return nil - } - out := new(ImageContentSourcePolicy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentSourcePolicy) 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 *ImageContentSourcePolicyList) DeepCopyInto(out *ImageContentSourcePolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ImageContentSourcePolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicyList. -func (in *ImageContentSourcePolicyList) DeepCopy() *ImageContentSourcePolicyList { - if in == nil { - return nil - } - out := new(ImageContentSourcePolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ImageContentSourcePolicyList) 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 *ImageContentSourcePolicySpec) DeepCopyInto(out *ImageContentSourcePolicySpec) { - *out = *in - if in.RepositoryDigestMirrors != nil { - in, out := &in.RepositoryDigestMirrors, &out.RepositoryDigestMirrors - *out = make([]RepositoryDigestMirrors, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageContentSourcePolicySpec. -func (in *ImageContentSourcePolicySpec) DeepCopy() *ImageContentSourcePolicySpec { - if in == nil { - return nil - } - out := new(ImageContentSourcePolicySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LoggingConfig) DeepCopyInto(out *LoggingConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LoggingConfig. -func (in *LoggingConfig) DeepCopy() *LoggingConfig { - if in == nil { - return nil - } - out := new(LoggingConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeStatus) DeepCopyInto(out *NodeStatus) { - *out = *in - if in.LastFailedDeploymentErrors != nil { - in, out := &in.LastFailedDeploymentErrors, &out.LastFailedDeploymentErrors - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus. -func (in *NodeStatus) DeepCopy() *NodeStatus { - if in == nil { - return nil - } - out := new(NodeStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OLM) DeepCopyInto(out *OLM) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLM. -func (in *OLM) DeepCopy() *OLM { - if in == nil { - return nil - } - out := new(OLM) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OLM) 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 *OLMList) DeepCopyInto(out *OLMList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]OLM, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMList. -func (in *OLMList) DeepCopy() *OLMList { - if in == nil { - return nil - } - out := new(OLMList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OLMList) 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 *OLMSpec) DeepCopyInto(out *OLMSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMSpec. -func (in *OLMSpec) DeepCopy() *OLMSpec { - if in == nil { - return nil - } - out := new(OLMSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OLMStatus) DeepCopyInto(out *OLMStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OLMStatus. -func (in *OLMStatus) DeepCopy() *OLMStatus { - if in == nil { - return nil - } - out := new(OLMStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorCondition) DeepCopyInto(out *OperatorCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorCondition. -func (in *OperatorCondition) DeepCopy() *OperatorCondition { - if in == nil { - return nil - } - out := new(OperatorCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorSpec) DeepCopyInto(out *OperatorSpec) { - *out = *in - out.Logging = in.Logging - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorSpec. -func (in *OperatorSpec) DeepCopy() *OperatorSpec { - if in == nil { - return nil - } - out := new(OperatorSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OperatorStatus) DeepCopyInto(out *OperatorStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]OperatorCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.CurrentAvailability != nil { - in, out := &in.CurrentAvailability, &out.CurrentAvailability - *out = new(VersionAvailability) - (*in).DeepCopyInto(*out) - } - if in.TargetAvailability != nil { - in, out := &in.TargetAvailability, &out.TargetAvailability - *out = new(VersionAvailability) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorStatus. -func (in *OperatorStatus) DeepCopy() *OperatorStatus { - if in == nil { - return nil - } - out := new(OperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RepositoryDigestMirrors) DeepCopyInto(out *RepositoryDigestMirrors) { - *out = *in - if in.Mirrors != nil { - in, out := &in.Mirrors, &out.Mirrors - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RepositoryDigestMirrors. -func (in *RepositoryDigestMirrors) DeepCopy() *RepositoryDigestMirrors { - if in == nil { - return nil - } - out := new(RepositoryDigestMirrors) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StaticPodOperatorStatus) DeepCopyInto(out *StaticPodOperatorStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - if in.NodeStatuses != nil { - in, out := &in.NodeStatuses, &out.NodeStatuses - *out = make([]NodeStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticPodOperatorStatus. -func (in *StaticPodOperatorStatus) DeepCopy() *StaticPodOperatorStatus { - if in == nil { - return nil - } - out := new(StaticPodOperatorStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VersionAvailability) DeepCopyInto(out *VersionAvailability) { - *out = *in - if in.Errors != nil { - in, out := &in.Errors, &out.Errors - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Generations != nil { - in, out := &in.Generations, &out.Generations - *out = make([]GenerationHistory, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VersionAvailability. -func (in *VersionAvailability) DeepCopy() *VersionAvailability { - if in == nil { - return nil - } - out := new(VersionAvailability) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 3ad442d9d..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,117 +0,0 @@ -clusterapis.operator.openshift.io: - Annotations: - release.openshift.io/feature-gate: ClusterAPIMachineManagement - ApprovedPRNumber: https://github.com/openshift/api/pull/2564 - CRDName: clusterapis.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - ClusterAPIMachineManagement - FilenameOperatorName: cluster-api - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_30" - GroupName: operator.openshift.io - HasStatus: true - KindName: ClusterAPI - Labels: {} - PluralName: clusterapis - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - ClusterAPIMachineManagement - Version: v1alpha1 - -clusterversionoperators.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/2044 - CRDName: clusterversionoperators.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - ClusterVersionOperatorConfiguration - FilenameOperatorName: cluster-version-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_00" - GroupName: operator.openshift.io - HasStatus: true - KindName: ClusterVersionOperator - Labels: {} - PluralName: clusterversionoperators - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - ClusterVersionOperatorConfiguration - Version: v1alpha1 - -etcdbackups.operator.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1482 - CRDName: etcdbackups.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - AutomatedEtcdBackup - FilenameOperatorName: etcd - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: operator.openshift.io - HasStatus: true - KindName: EtcdBackup - Labels: {} - PluralName: etcdbackups - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - AutomatedEtcdBackup - Version: v1alpha1 - -imagecontentsourcepolicies.operator.openshift.io: - Annotations: - release.openshift.io/bootstrap-required: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/470 - CRDName: imagecontentsourcepolicies.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: operator.openshift.io - HasStatus: true - KindName: ImageContentSourcePolicy - Labels: {} - PluralName: imagecontentsourcepolicies - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1alpha1 - -olms.operator.openshift.io: - Annotations: - include.release.openshift.io/ibm-cloud-managed: "false" - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/1504 - CRDName: olms.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: - - NewOLM - FilenameOperatorName: operator-lifecycle-manager - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: operator.openshift.io - HasStatus: true - KindName: OLM - Labels: {} - PluralName: olms - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: - - NewOLM - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index e3fe9897d..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,191 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BackupJobReference) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.BackupJobReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPI) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPI" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIInstallerComponent) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponent" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIInstallerComponentImage) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponentImage" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIInstallerComponentSource) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponentSource" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIInstallerRevision) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevision" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIInstallerRevisionManifestSubstitution) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevisionManifestSubstitution" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPISpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPISpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterAPIStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterAPIStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterVersionOperator) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterVersionOperator" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterVersionOperatorList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterVersionOperatorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterVersionOperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DelegatedAuthentication) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.DelegatedAuthentication" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DelegatedAuthorization) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.DelegatedAuthorization" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdBackup) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.EtcdBackup" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdBackupList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.EtcdBackupList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdBackupSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.EtcdBackupSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in EtcdBackupStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.EtcdBackupStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GenerationHistory) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.GenerationHistory" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GenericOperatorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.GenericOperatorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageContentSourcePolicy) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicy" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageContentSourcePolicyList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicyList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ImageContentSourcePolicySpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicySpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LoggingConfig) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.LoggingConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in NodeStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.NodeStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLM) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OLM" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMList) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OLMList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OLMSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OLMStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OLMStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorCondition) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OperatorCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OperatorSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.OperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RepositoryDigestMirrors) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.RepositoryDigestMirrors" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in StaticPodOperatorStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.StaticPodOperatorStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in VersionAvailability) OpenAPIModelName() string { - return "com.github.openshift.api.operator.v1alpha1.VersionAvailability" -} diff --git a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index bf4117768..000000000 --- a/vendor/github.com/openshift/api/operator/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,375 +0,0 @@ -package v1alpha1 - -// 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_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_GenerationHistory = map[string]string{ - "": "GenerationHistory keeps track of the generation for a given resource so that decisions about forced updated can be made. DEPRECATED: Use fields in v1.GenerationStatus instead", - "group": "group is the group of the thing you're tracking", - "resource": "resource is the resource type of the thing you're tracking", - "namespace": "namespace is where the thing you're tracking is", - "name": "name is the name of the thing you're tracking", - "lastGeneration": "lastGeneration is the last generation of the workload controller involved", -} - -func (GenerationHistory) SwaggerDoc() map[string]string { - return map_GenerationHistory -} - -var map_GenericOperatorConfig = map[string]string{ - "": "GenericOperatorConfig provides information to configure an operator\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "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 (GenericOperatorConfig) SwaggerDoc() map[string]string { - return map_GenericOperatorConfig -} - -var map_LoggingConfig = map[string]string{ - "": "LoggingConfig holds information about configuring logging DEPRECATED: Use v1.LogLevel instead", - "level": "level is passed to glog.", - "vmodule": "vmodule is passed to glog.", -} - -func (LoggingConfig) SwaggerDoc() map[string]string { - return map_LoggingConfig -} - -var map_NodeStatus = map[string]string{ - "": "NodeStatus provides information about the current state of a particular node managed by this operator. Deprecated: Use v1.NodeStatus instead", - "nodeName": "nodeName is the name of the node", - "currentDeploymentGeneration": "currentDeploymentGeneration is the generation of the most recently successful deployment", - "targetDeploymentGeneration": "targetDeploymentGeneration is the generation of the deployment we're trying to apply", - "lastFailedDeploymentGeneration": "lastFailedDeploymentGeneration is the generation of the deployment we tried and failed to deploy.", - "lastFailedDeploymentErrors": "lastFailedDeploymentGenerationErrors is a list of the errors during the failed deployment referenced in lastFailedDeploymentGeneration", -} - -func (NodeStatus) SwaggerDoc() map[string]string { - return map_NodeStatus -} - -var map_OperatorCondition = map[string]string{ - "": "OperatorCondition is just the standard condition fields. DEPRECATED: Use v1.OperatorCondition instead", -} - -func (OperatorCondition) SwaggerDoc() map[string]string { - return map_OperatorCondition -} - -var map_OperatorSpec = map[string]string{ - "": "OperatorSpec contains common fields for an operator to need. It is intended to be anonymous included inside of the Spec struct for you particular operator. DEPRECATED: Use v1.OperatorSpec instead", - "managementState": "managementState indicates whether and how the operator should manage the component", - "imagePullSpec": "imagePullSpec is the image to use for the component.", - "imagePullPolicy": "imagePullPolicy specifies the image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.", - "version": "version is the desired state in major.minor.micro-patch. Usually patch is ignored.", - "logging": "logging contains glog parameters for the component pods. It's always a command line arg for the moment", -} - -func (OperatorSpec) SwaggerDoc() map[string]string { - return map_OperatorSpec -} - -var map_OperatorStatus = map[string]string{ - "": "OperatorStatus contains common fields for an operator to need. It is intended to be anonymous included inside of the Status struct for you particular operator. DEPRECATED: Use v1.OperatorStatus instead", - "observedGeneration": "observedGeneration is the last generation change you've dealt with", - "conditions": "conditions is a list of conditions and their status", - "state": "state indicates what the operator has observed to be its current operational status.", - "taskSummary": "taskSummary is a high level summary of what the controller is currently attempting to do. It is high-level, human-readable and not guaranteed in any way. (I needed this for debugging and realized it made a great summary).", - "currentVersionAvailability": "currentVersionAvailability is availability information for the current version. If it is unmanged or removed, this doesn't exist.", - "targetVersionAvailability": "targetVersionAvailability is availability information for the target version if we are migrating", -} - -func (OperatorStatus) SwaggerDoc() map[string]string { - return map_OperatorStatus -} - -var map_StaticPodOperatorStatus = map[string]string{ - "": "StaticPodOperatorStatus is status for controllers that manage static pods. There are different needs because individual node status must be tracked. DEPRECATED: Use v1.StaticPodOperatorStatus instead", - "latestAvailableDeploymentGeneration": "latestAvailableDeploymentGeneration is the deploymentID of the most recent deployment", - "nodeStatuses": "nodeStatuses track the deployment values and errors across individual nodes", -} - -func (StaticPodOperatorStatus) SwaggerDoc() map[string]string { - return map_StaticPodOperatorStatus -} - -var map_VersionAvailability = map[string]string{ - "": "VersionAvailability gives information about the synchronization and operational status of a particular version of the component DEPRECATED: Use fields in v1.OperatorStatus instead", - "version": "version is the level this availability applies to", - "updatedReplicas": "updatedReplicas indicates how many replicas are at the desired state", - "readyReplicas": "readyReplicas indicates how many replicas are ready and at the desired state", - "errors": "errors indicates what failures are associated with the operator trying to manage this version", - "generations": "generations allows an operator to track what the generation of \"important\" resources was the last time we updated them", -} - -func (VersionAvailability) SwaggerDoc() map[string]string { - return map_VersionAvailability -} - -var map_ClusterAPI = map[string]string{ - "": "ClusterAPI provides configuration for the capi-operator.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the capi-operator.", - "status": "status defines the observed status of the capi-operator.", -} - -func (ClusterAPI) SwaggerDoc() map[string]string { - return map_ClusterAPI -} - -var map_ClusterAPIInstallerComponent = map[string]string{ - "": "ClusterAPIInstallerComponent defines a component which will be installed by this revision.", - "name": "name is the human-readable name of the component. The value has no effect, and will not be set if the component does not define a name in its manifests. If set it must consist of alphanumeric characters, or '-', and may not exceed 255 characters.", -} - -func (ClusterAPIInstallerComponent) SwaggerDoc() map[string]string { - return map_ClusterAPIInstallerComponent -} - -var map_ClusterAPIInstallerComponentImage = map[string]string{ - "": "ClusterAPIInstallerComponentImage defines an image source for a component.", - "ref": "ref is an image reference to the image containing the component manifests. The reference must be a valid image digest reference in the format host[:port][/namespace]/name@sha256:. The digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the field must be between 1 to 447 characters.", - "profile": "profile is the name of a profile to use from the image.\n\nA profile name may be up to 255 characters long. It must consist of alphanumeric characters, '-', or '_'.", -} - -func (ClusterAPIInstallerComponentImage) SwaggerDoc() map[string]string { - return map_ClusterAPIInstallerComponentImage -} - -var map_ClusterAPIInstallerComponentSource = map[string]string{ - "": "ClusterAPIInstallerComponentSource defines the source of a component which will be installed by this revision.", - "type": "type is the source type of the component. The only valid value is Image. When set to Image, the image field must be set and will define an image source for the component.", - "image": "image defines an image source for a component. The image must contain a /capi-operator-installer directory containing the component manifests.", -} - -func (ClusterAPIInstallerComponentSource) SwaggerDoc() map[string]string { - return map_ClusterAPIInstallerComponentSource -} - -var map_ClusterAPIInstallerRevision = map[string]string{ - "name": "name is the name of a revision.", - "revision": "revision is a monotonically increasing number that is assigned to a revision.", - "contentID": "contentID uniquely identifies the content of this revision. The contentID must be between 1 and 255 characters long.", - "unmanagedCustomResourceDefinitions": "unmanagedCustomResourceDefinitions is a list of the names of ClusterResourceDefinition (CRD) objects which are included in this revision, but which should not be installed or updated. If not set, all CRDs in the revision will be managed by the CAPI operator.", - "manifestSubstitutions": "manifestSubstitutions is a list of envsubst style substitutions which will be applied to manifests in the revision during rendering. If defined it must not be empty, and may not contain more than 32 items. Each manifest substitution must have a unique key.", - "components": "components is a list of components which will be installed by this revision. Components will be installed in the order they are listed. If omitted no components will be installed.\n\nThe maximum number of components is 32.", -} - -func (ClusterAPIInstallerRevision) SwaggerDoc() map[string]string { - return map_ClusterAPIInstallerRevision -} - -var map_ClusterAPIInstallerRevisionManifestSubstitution = map[string]string{ - "": "ClusterAPIInstallerRevisionManifestSubstitution defines an envsubst style substitution which will be applied to manifests in a revision during rendering.", - "key": "key is the name of the envsubst variable to substitute. It must be a valid envsubst variable name, consisting of letters, digits, and underscores, and must start with a letter or underscore. The key must not be empty, and must not exceed 255 characters.", - "value": "value is the value to substitute for the envsubst variable. It may be empty, in which case the variable will be substituted with an empty string. The value must not exceed 4096 characters.", -} - -func (ClusterAPIInstallerRevisionManifestSubstitution) SwaggerDoc() map[string]string { - return map_ClusterAPIInstallerRevisionManifestSubstitution -} - -var map_ClusterAPIList = map[string]string{ - "": "ClusterAPIList contains a list of ClusterAPI configurations\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ClusterAPIList) SwaggerDoc() map[string]string { - return map_ClusterAPIList -} - -var map_ClusterAPISpec = map[string]string{ - "": "ClusterAPISpec defines the desired configuration of the capi-operator. The spec is required but we deliberately allow it to be empty.", - "unmanagedCustomResourceDefinitions": "unmanagedCustomResourceDefinitions is a list of ClusterResourceDefinition (CRD) names that should not be managed by the capi-operator installer controller. This allows external actors to own specific CRDs while capi-operator manages others.\n\nEach CRD name must be a valid DNS-1123 subdomain consisting of lowercase alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character, with a maximum length of 253 characters. CRD names must contain at least two '.' characters. Example: \"clusters.cluster.x-k8s.io\"\n\nItems cannot be removed from this list once added.\n\nThe maximum number of unmanagedCustomResourceDefinitions is 128.", -} - -func (ClusterAPISpec) SwaggerDoc() map[string]string { - return map_ClusterAPISpec -} - -var map_ClusterAPIStatus = map[string]string{ - "": "ClusterAPIStatus describes the current state of the capi-operator.", - "currentRevision": "currentRevision is the name of the most recently fully applied revision. It is written by the installer controller. If it is absent, it indicates that no revision has been fully applied yet. If set, currentRevision must correspond to an entry in the revisions list.", - "desiredRevision": "desiredRevision is the name of the desired revision. It is written by the revision controller. It must be set to the name of the entry in the revisions list with the highest revision number.", - "revisions": "revisions is a list of all currently active revisions. A revision is active until the installer controller updates currentRevision to a later revision. It is written by the revision controller.\n\nThe maximum number of revisions is 16. All revisions must have a unique name. All revisions must have a unique revision number. When adding a revision, the revision number must be greater than the highest revision number in the list. Revisions are immutable, although they can be deleted.", - "observedRevisionGeneration": "observedRevisionGeneration is the generation of the ClusterAPI object that was last observed by the revision controller. If specified it must be greater than or equal to 1, and less than 2^53. It may not decrease or be unset once set.", -} - -func (ClusterAPIStatus) SwaggerDoc() map[string]string { - return map_ClusterAPIStatus -} - -var map_ClusterVersionOperator = map[string]string{ - "": "ClusterVersionOperator holds cluster-wide information about the Cluster Version Operator.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired behavior of the Cluster Version Operator.", - "status": "status is the most recently observed status of the Cluster Version Operator.", -} - -func (ClusterVersionOperator) SwaggerDoc() map[string]string { - return map_ClusterVersionOperator -} - -var map_ClusterVersionOperatorList = map[string]string{ - "": "ClusterVersionOperatorList is a collection of ClusterVersionOperators.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of ClusterVersionOperators.", -} - -func (ClusterVersionOperatorList) SwaggerDoc() map[string]string { - return map_ClusterVersionOperatorList -} - -var map_ClusterVersionOperatorSpec = map[string]string{ - "": "ClusterVersionOperatorSpec is the specification of the desired behavior of the Cluster Version Operator.", - "operatorLogLevel": "operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a simple way to manage coarse grained logging choices that operators have to interpret for themselves.\n\nValid values are: \"Normal\", \"Debug\", \"Trace\", \"TraceAll\". Defaults to \"Normal\".", -} - -func (ClusterVersionOperatorSpec) SwaggerDoc() map[string]string { - return map_ClusterVersionOperatorSpec -} - -var map_ClusterVersionOperatorStatus = map[string]string{ - "": "ClusterVersionOperatorStatus defines the observed status of the Cluster Version Operator.", - "observedGeneration": "observedGeneration represents the most recent generation observed by the operator and specifies the version of the spec field currently being synced.", -} - -func (ClusterVersionOperatorStatus) SwaggerDoc() map[string]string { - return map_ClusterVersionOperatorStatus -} - -var map_BackupJobReference = map[string]string{ - "": "BackupJobReference holds a reference to the batch/v1 Job created to run the etcd backup", - "namespace": "namespace is the namespace of the Job. this is always expected to be \"openshift-etcd\" since the user provided PVC is also required to be in \"openshift-etcd\" Required", - "name": "name is the name of the Job. Required", -} - -func (BackupJobReference) SwaggerDoc() map[string]string { - return map_BackupJobReference -} - -var map_EtcdBackup = map[string]string{ - "": "\n\n# EtcdBackup provides configuration options and status for a one-time backup attempt of the etcd cluster\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (EtcdBackup) SwaggerDoc() map[string]string { - return map_EtcdBackup -} - -var map_EtcdBackupList = map[string]string{ - "": "EtcdBackupList is a collection of items\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (EtcdBackupList) SwaggerDoc() map[string]string { - return map_EtcdBackupList -} - -var map_EtcdBackupSpec = map[string]string{ - "pvcName": "pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the etcd backup file would be saved The PVC itself must always be created in the \"openshift-etcd\" namespace If the PVC is left unspecified \"\" then the platform will choose a reasonable default location to save the backup. In the future this would be backups saved across the control-plane master nodes.", -} - -func (EtcdBackupSpec) SwaggerDoc() map[string]string { - return map_EtcdBackupSpec -} - -var map_EtcdBackupStatus = map[string]string{ - "conditions": "conditions provide details on the status of the etcd backup job.", - "backupJob": "backupJob is the reference to the Job that executes the backup. Optional", -} - -func (EtcdBackupStatus) SwaggerDoc() map[string]string { - return map_EtcdBackupStatus -} - -var map_ImageContentSourcePolicy = map[string]string{ - "": "ImageContentSourcePolicy holds cluster-wide information about how to handle registry mirror rules. When multiple policies are defined, the outcome of the behavior is defined on each field.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", -} - -func (ImageContentSourcePolicy) SwaggerDoc() map[string]string { - return map_ImageContentSourcePolicy -} - -var map_ImageContentSourcePolicyList = map[string]string{ - "": "ImageContentSourcePolicyList lists the items in the ImageContentSourcePolicy CRD.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ImageContentSourcePolicyList) SwaggerDoc() map[string]string { - return map_ImageContentSourcePolicyList -} - -var map_ImageContentSourcePolicySpec = map[string]string{ - "": "ImageContentSourcePolicySpec is the specification of the ImageContentSourcePolicy CRD.", - "repositoryDigestMirrors": "repositoryDigestMirrors allows images referenced by image digests in pods to be pulled from alternative mirrored repository locations. The image pull specification provided to the pod will be compared to the source locations described in RepositoryDigestMirrors and the image may be pulled down from any of the mirrors in the list instead of the specified repository allowing administrators to choose a potentially faster mirror. Only image pull specifications that have an image digest will have this behavior applied to them - tags will continue to be pulled from the specified repository in the pull spec.\n\nEach “source” repository is treated independently; configurations for different “source” repositories don’t interact.\n\nWhen multiple policies are defined for the same “source” repository, the sets of defined mirrors will be merged together, preserving the relative order of the mirrors, if possible. For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified.", -} - -func (ImageContentSourcePolicySpec) SwaggerDoc() map[string]string { - return map_ImageContentSourcePolicySpec -} - -var map_RepositoryDigestMirrors = map[string]string{ - "": "RepositoryDigestMirrors holds cluster-wide information about how to handle mirros in the registries config. Note: the mirrors only work when pulling the images that are referenced by their digests.", - "source": "source is the repository that users refer to, e.g. in image pull specifications.", - "mirrors": "mirrors is one or more repositories that may also contain the same images. The order of mirrors in this list is treated as the user's desired priority, while source is by default considered lower priority than all mirrors. Other cluster configuration, including (but not limited to) other repositoryDigestMirrors objects, may impact the exact order mirrors are contacted in, or some mirrors may be contacted in parallel, so this should be considered a preference rather than a guarantee of ordering.", -} - -func (RepositoryDigestMirrors) SwaggerDoc() map[string]string { - return map_RepositoryDigestMirrors -} - -var map_OLM = map[string]string{ - "": "OLM provides information to configure an operator to manage the OLM controllers\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec holds user settable values for configuration", - "status": "status holds observed values from the cluster. They may not be overridden.", -} - -func (OLM) SwaggerDoc() map[string]string { - return map_OLM -} - -var map_OLMList = map[string]string{ - "": "OLMList is a collection of items\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (OLMList) SwaggerDoc() map[string]string { - return map_OLMList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/.codegen.yaml b/vendor/github.com/openshift/api/operatorcontrolplane/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/install.go b/vendor/github.com/openshift/api/operatorcontrolplane/install.go deleted file mode 100644 index 8e8abd0ab..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package operatorcontrolplane - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - "github.com/openshift/api/operatorcontrolplane/v1alpha1" -) - -const ( - GroupName = "controlplane.operator.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(v1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/Makefile b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/Makefile deleted file mode 100644 index 11371b126..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="controlplane.operator.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/doc.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/doc.go deleted file mode 100644 index 302abb354..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.operatorcontrolplane.v1alpha1 - -// +kubebuilder:validation:Optional -// +groupName=controlplane.operator.openshift.io - -package v1alpha1 diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/register.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/register.go deleted file mode 100644 index 1ffc55381..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "controlplane.operator.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - metav1.AddToGroupVersion(scheme, GroupVersion) - - scheme.AddKnownTypes(GroupVersion, - &PodNetworkConnectivityCheck{}, - &PodNetworkConnectivityCheckList{}, - ) - - return nil -} diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/types_conditioncheck.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/types_conditioncheck.go deleted file mode 100644 index ba92985c1..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/types_conditioncheck.go +++ /dev/null @@ -1,189 +0,0 @@ -// Package v1alpha1 is an API version in the controlplane.operator.openshift.io group -package v1alpha1 - -import ( - v1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodNetworkConnectivityCheck -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=podnetworkconnectivitychecks,scope=Namespaced -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/639 -// +openshift:file-pattern=cvoRunLevel=0000_10,operatorName=network,operatorOrdering=01 -// +kubebuilder:metadata:annotations=include.release.openshift.io/self-managed-high-availability=true -// +openshift:compatibility-gen:level=4 -type PodNetworkConnectivityCheck struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - // spec defines the source and target of the connectivity check - // +required - Spec PodNetworkConnectivityCheckSpec `json:"spec"` - - // status contains the observed status of the connectivity check - // +optional - Status PodNetworkConnectivityCheckStatus `json:"status,omitempty"` -} - -type PodNetworkConnectivityCheckSpec struct { - // sourcePod names the pod from which the condition will be checked - // +kubebuilder:validation:Pattern=`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$` - // +required - SourcePod string `json:"sourcePod"` - - // EndpointAddress to check. A TCP address of the form host:port. Note that - // if host is a DNS name, then the check would fail if the DNS name cannot - // be resolved. Specify an IP address for host to bypass DNS name lookup. - // +kubebuilder:validation:Pattern=`^\S+:\d*$` - // +required - TargetEndpoint string `json:"targetEndpoint"` - - // TLSClientCert, if specified, references a kubernetes.io/tls type secret with 'tls.crt' and - // 'tls.key' entries containing an optional TLS client certificate and key to be used when - // checking endpoints that require a client certificate in order to gracefully preform the - // scan without causing excessive logging in the endpoint process. The secret must exist in - // the same namespace as this resource. - // +optional - TLSClientCert v1.SecretNameReference `json:"tlsClientCert,omitempty"` -} - -// +k8s:deepcopy-gen=true -type PodNetworkConnectivityCheckStatus struct { - // successes contains logs successful check actions - // +optional - Successes []LogEntry `json:"successes,omitempty"` - - // failures contains logs of unsuccessful check actions - // +optional - Failures []LogEntry `json:"failures,omitempty"` - - // outages contains logs of time periods of outages - // +optional - Outages []OutageEntry `json:"outages,omitempty"` - - // conditions summarize the status of the check - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []PodNetworkConnectivityCheckCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` -} - -// LogEntry records events -type LogEntry struct { - // Start time of check action. - // +required - // +nullable - Start metav1.Time `json:"time"` - - // success indicates if the log entry indicates a success or failure. - // +required - Success bool `json:"success"` - - // reason for status in a machine readable format. - // +optional - Reason string `json:"reason,omitempty"` - - // message explaining status in a human readable format. - // +optional - Message string `json:"message,omitempty"` - - // latency records how long the action mentioned in the entry took. - // +optional - // +nullable - Latency metav1.Duration `json:"latency,omitempty"` -} - -// OutageEntry records time period of an outage -type OutageEntry struct { - - // start of outage detected - // +required - // +nullable - Start metav1.Time `json:"start"` - - // end of outage detected - // +optional - // +nullable - End metav1.Time `json:"end,omitempty"` - - // startLogs contains log entries related to the start of this outage. Should contain - // the original failure, any entries where the failure mode changed. - // +optional - StartLogs []LogEntry `json:"startLogs,omitempty"` - - // endLogs contains log entries related to the end of this outage. Should contain the success - // entry that resolved the outage and possibly a few of the failure log entries that preceded it. - // +optional - EndLogs []LogEntry `json:"endLogs,omitempty"` - - // message summarizes outage details in a human readable format. - // +optional - Message string `json:"message,omitempty"` -} - -// PodNetworkConnectivityCheckCondition represents the overall status of the pod network connectivity. -// +k8s:deepcopy-gen=true -type PodNetworkConnectivityCheckCondition struct { - - // type of the condition - // +required - Type PodNetworkConnectivityCheckConditionType `json:"type"` - - // status of the condition - // +required - Status metav1.ConditionStatus `json:"status"` - - // reason for the condition's last status transition in a machine readable format. - // +optional - Reason string `json:"reason,omitempty"` - - // message indicating details about last transition in a human readable format. - // +optional - Message string `json:"message,omitempty"` - - // Last time the condition transitioned from one status to another. - // +required - // +nullable - LastTransitionTime metav1.Time `json:"lastTransitionTime"` -} - -const ( - LogEntryReasonDNSResolve = "DNSResolve" - LogEntryReasonDNSError = "DNSError" - LogEntryReasonTCPConnect = "TCPConnect" - LogEntryReasonTCPConnectError = "TCPConnectError" -) - -type PodNetworkConnectivityCheckConditionType string - -const ( - // Reachable indicates that the endpoint was reachable from the pod. - Reachable PodNetworkConnectivityCheckConditionType = "Reachable" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodNetworkConnectivityCheckList is a collection of PodNetworkConnectivityCheck -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type PodNetworkConnectivityCheckList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata"` - - // items contains the items - Items []PodNetworkConnectivityCheck `json:"items"` -} diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index d5276d664..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,199 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -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 *LogEntry) DeepCopyInto(out *LogEntry) { - *out = *in - in.Start.DeepCopyInto(&out.Start) - out.Latency = in.Latency - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LogEntry. -func (in *LogEntry) DeepCopy() *LogEntry { - if in == nil { - return nil - } - out := new(LogEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OutageEntry) DeepCopyInto(out *OutageEntry) { - *out = *in - in.Start.DeepCopyInto(&out.Start) - in.End.DeepCopyInto(&out.End) - if in.StartLogs != nil { - in, out := &in.StartLogs, &out.StartLogs - *out = make([]LogEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.EndLogs != nil { - in, out := &in.EndLogs, &out.EndLogs - *out = make([]LogEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OutageEntry. -func (in *OutageEntry) DeepCopy() *OutageEntry { - if in == nil { - return nil - } - out := new(OutageEntry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodNetworkConnectivityCheck) DeepCopyInto(out *PodNetworkConnectivityCheck) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkConnectivityCheck. -func (in *PodNetworkConnectivityCheck) DeepCopy() *PodNetworkConnectivityCheck { - if in == nil { - return nil - } - out := new(PodNetworkConnectivityCheck) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodNetworkConnectivityCheck) 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 *PodNetworkConnectivityCheckCondition) DeepCopyInto(out *PodNetworkConnectivityCheckCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkConnectivityCheckCondition. -func (in *PodNetworkConnectivityCheckCondition) DeepCopy() *PodNetworkConnectivityCheckCondition { - if in == nil { - return nil - } - out := new(PodNetworkConnectivityCheckCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodNetworkConnectivityCheckList) DeepCopyInto(out *PodNetworkConnectivityCheckList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]PodNetworkConnectivityCheck, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkConnectivityCheckList. -func (in *PodNetworkConnectivityCheckList) DeepCopy() *PodNetworkConnectivityCheckList { - if in == nil { - return nil - } - out := new(PodNetworkConnectivityCheckList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodNetworkConnectivityCheckList) 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 *PodNetworkConnectivityCheckSpec) DeepCopyInto(out *PodNetworkConnectivityCheckSpec) { - *out = *in - out.TLSClientCert = in.TLSClientCert - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkConnectivityCheckSpec. -func (in *PodNetworkConnectivityCheckSpec) DeepCopy() *PodNetworkConnectivityCheckSpec { - if in == nil { - return nil - } - out := new(PodNetworkConnectivityCheckSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodNetworkConnectivityCheckStatus) DeepCopyInto(out *PodNetworkConnectivityCheckStatus) { - *out = *in - if in.Successes != nil { - in, out := &in.Successes, &out.Successes - *out = make([]LogEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Failures != nil { - in, out := &in.Failures, &out.Failures - *out = make([]LogEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Outages != nil { - in, out := &in.Outages, &out.Outages - *out = make([]OutageEntry, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]PodNetworkConnectivityCheckCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodNetworkConnectivityCheckStatus. -func (in *PodNetworkConnectivityCheckStatus) DeepCopy() *PodNetworkConnectivityCheckStatus { - if in == nil { - return nil - } - out := new(PodNetworkConnectivityCheckStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 2032118c9..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -podnetworkconnectivitychecks.controlplane.operator.openshift.io: - Annotations: - include.release.openshift.io/self-managed-high-availability: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/639 - CRDName: podnetworkconnectivitychecks.controlplane.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: network - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_10" - GroupName: controlplane.operator.openshift.io - HasStatus: true - KindName: PodNetworkConnectivityCheck - Labels: {} - PluralName: podnetworkconnectivitychecks - PrinterColumns: [] - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 87f0d3b3c..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LogEntry) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.LogEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OutageEntry) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.OutageEntry" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodNetworkConnectivityCheck) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.PodNetworkConnectivityCheck" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodNetworkConnectivityCheckCondition) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.PodNetworkConnectivityCheckCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodNetworkConnectivityCheckList) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.PodNetworkConnectivityCheckList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodNetworkConnectivityCheckSpec) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.PodNetworkConnectivityCheckSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodNetworkConnectivityCheckStatus) OpenAPIModelName() string { - return "com.github.openshift.api.operatorcontrolplane.v1alpha1.PodNetworkConnectivityCheckStatus" -} diff --git a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index f6cd1975d..000000000 --- a/vendor/github.com/openshift/api/operatorcontrolplane/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,95 +0,0 @@ -package v1alpha1 - -// 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_LogEntry = map[string]string{ - "": "LogEntry records events", - "time": "Start time of check action.", - "success": "success indicates if the log entry indicates a success or failure.", - "reason": "reason for status in a machine readable format.", - "message": "message explaining status in a human readable format.", - "latency": "latency records how long the action mentioned in the entry took.", -} - -func (LogEntry) SwaggerDoc() map[string]string { - return map_LogEntry -} - -var map_OutageEntry = map[string]string{ - "": "OutageEntry records time period of an outage", - "start": "start of outage detected", - "end": "end of outage detected", - "startLogs": "startLogs contains log entries related to the start of this outage. Should contain the original failure, any entries where the failure mode changed.", - "endLogs": "endLogs contains log entries related to the end of this outage. Should contain the success entry that resolved the outage and possibly a few of the failure log entries that preceded it.", - "message": "message summarizes outage details in a human readable format.", -} - -func (OutageEntry) SwaggerDoc() map[string]string { - return map_OutageEntry -} - -var map_PodNetworkConnectivityCheck = map[string]string{ - "": "PodNetworkConnectivityCheck\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the source and target of the connectivity check", - "status": "status contains the observed status of the connectivity check", -} - -func (PodNetworkConnectivityCheck) SwaggerDoc() map[string]string { - return map_PodNetworkConnectivityCheck -} - -var map_PodNetworkConnectivityCheckCondition = map[string]string{ - "": "PodNetworkConnectivityCheckCondition represents the overall status of the pod network connectivity.", - "type": "type of the condition", - "status": "status of the condition", - "reason": "reason for the condition's last status transition in a machine readable format.", - "message": "message indicating details about last transition in a human readable format.", - "lastTransitionTime": "Last time the condition transitioned from one status to another.", -} - -func (PodNetworkConnectivityCheckCondition) SwaggerDoc() map[string]string { - return map_PodNetworkConnectivityCheckCondition -} - -var map_PodNetworkConnectivityCheckList = map[string]string{ - "": "PodNetworkConnectivityCheckList is a collection of PodNetworkConnectivityCheck\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (PodNetworkConnectivityCheckList) SwaggerDoc() map[string]string { - return map_PodNetworkConnectivityCheckList -} - -var map_PodNetworkConnectivityCheckSpec = map[string]string{ - "sourcePod": "sourcePod names the pod from which the condition will be checked", - "targetEndpoint": "EndpointAddress to check. A TCP address of the form host:port. Note that if host is a DNS name, then the check would fail if the DNS name cannot be resolved. Specify an IP address for host to bypass DNS name lookup.", - "tlsClientCert": "TLSClientCert, if specified, references a kubernetes.io/tls type secret with 'tls.crt' and 'tls.key' entries containing an optional TLS client certificate and key to be used when checking endpoints that require a client certificate in order to gracefully preform the scan without causing excessive logging in the endpoint process. The secret must exist in the same namespace as this resource.", -} - -func (PodNetworkConnectivityCheckSpec) SwaggerDoc() map[string]string { - return map_PodNetworkConnectivityCheckSpec -} - -var map_PodNetworkConnectivityCheckStatus = map[string]string{ - "successes": "successes contains logs successful check actions", - "failures": "failures contains logs of unsuccessful check actions", - "outages": "outages contains logs of time periods of outages", - "conditions": "conditions summarize the status of the check", -} - -func (PodNetworkConnectivityCheckStatus) SwaggerDoc() map[string]string { - return map_PodNetworkConnectivityCheckStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/osin/install.go b/vendor/github.com/openshift/api/osin/install.go deleted file mode 100644 index 3f773985b..000000000 --- a/vendor/github.com/openshift/api/osin/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package osin - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - osinv1 "github.com/openshift/api/osin/v1" -) - -const ( - GroupName = "osin.config.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(osinv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/osin/v1/doc.go b/vendor/github.com/openshift/api/osin/v1/doc.go deleted file mode 100644 index 970c856a3..000000000 --- a/vendor/github.com/openshift/api/osin/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.osin.v1 - -// +groupName=osin.config.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/osin/v1/register.go b/vendor/github.com/openshift/api/osin/v1/register.go deleted file mode 100644 index 4d54a5df4..000000000 --- a/vendor/github.com/openshift/api/osin/v1/register.go +++ /dev/null @@ -1,50 +0,0 @@ -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "osin.config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &OsinServerConfig{}, - - &BasicAuthPasswordIdentityProvider{}, - &AllowAllPasswordIdentityProvider{}, - &DenyAllPasswordIdentityProvider{}, - &HTPasswdPasswordIdentityProvider{}, - &LDAPPasswordIdentityProvider{}, - &KeystonePasswordIdentityProvider{}, - &RequestHeaderIdentityProvider{}, - &GitHubIdentityProvider{}, - &GitLabIdentityProvider{}, - &GoogleIdentityProvider{}, - &OpenIDIdentityProvider{}, - - &SessionSecrets{}, - ) - return nil -} diff --git a/vendor/github.com/openshift/api/osin/v1/types.go b/vendor/github.com/openshift/api/osin/v1/types.go deleted file mode 100644 index 3f3af3cfa..000000000 --- a/vendor/github.com/openshift/api/osin/v1/types.go +++ /dev/null @@ -1,493 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - - configv1 "github.com/openshift/api/config/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type OsinServerConfig struct { - metav1.TypeMeta `json:",inline"` - - // provides the standard apiserver configuration - configv1.GenericAPIServerConfig `json:",inline"` - - // oauthConfig holds the necessary configuration options for OAuth authentication - OAuthConfig OAuthConfig `json:"oauthConfig"` -} - -// OAuthConfig holds the necessary configuration options for OAuth authentication -type OAuthConfig struct { - // masterCA is the CA for verifying the TLS connection back to the MasterURL. - // This field is deprecated and will be removed in a future release. - // See loginURL for details. - // Deprecated - MasterCA *string `json:"masterCA"` - - // masterURL is used for making server-to-server calls to exchange authorization codes for access tokens - // This field is deprecated and will be removed in a future release. - // See loginURL for details. - // Deprecated - MasterURL string `json:"masterURL"` - - // masterPublicURL is used for building valid client redirect URLs for internal and external access - // This field is deprecated and will be removed in a future release. - // See loginURL for details. - // Deprecated - MasterPublicURL string `json:"masterPublicURL"` - - // loginURL, along with masterCA, masterURL and masterPublicURL have distinct - // meanings depending on how the OAuth server is run. The two states are: - // 1. embedded in the kube api server (all 3.x releases) - // 2. as a standalone external process (all 4.x releases) - // in the embedded configuration, loginURL is equivalent to masterPublicURL - // and the other fields have functionality that matches their docs. - // in the standalone configuration, the fields are used as: - // loginURL is the URL required to login to the cluster: - // oc login --server= - // masterPublicURL is the issuer URL - // it is accessible from inside (service network) and outside (ingress) of the cluster - // masterURL is the loopback variation of the token_endpoint URL with no path component - // it is only accessible from inside (service network) of the cluster - // masterCA is used to perform TLS verification for connections made to masterURL - // For further details, see the IETF Draft: - // https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2 - LoginURL string `json:"loginURL"` - - // assetPublicURL is used for building valid client redirect URLs for external access - AssetPublicURL string `json:"assetPublicURL"` - - // alwaysShowProviderSelection will force the provider selection page to render even when there is only a single provider. - AlwaysShowProviderSelection bool `json:"alwaysShowProviderSelection"` - - //identityProviders is an ordered list of ways for a user to identify themselves - IdentityProviders []IdentityProvider `json:"identityProviders"` - - // grantConfig describes how to handle grants - GrantConfig GrantConfig `json:"grantConfig"` - - // sessionConfig hold information about configuring sessions. - SessionConfig *SessionConfig `json:"sessionConfig"` - - // tokenConfig contains options for authorization and access tokens - TokenConfig TokenConfig `json:"tokenConfig"` - - // templates allow you to customize pages like the login page. - Templates *OAuthTemplates `json:"templates"` - - // proxyTrustedCA is an optional path to a PEM-encoded CA bundle used to - // verify connections to an HTTPS proxy during outbound IdP requests. - // When omitted, proxy connections use the system trust roots only. - ProxyTrustedCA string `json:"proxyTrustedCA,omitempty"` -} - -// OAuthTemplates allow for customization of pages like the login page -type OAuthTemplates struct { - // login is a path to a file containing a go template used to render the login page. - // If unspecified, the default login page is used. - Login string `json:"login"` - - // providerSelection is a path to a file containing a go template used to render the provider selection page. - // If unspecified, the default provider selection page is used. - ProviderSelection string `json:"providerSelection"` - - // error is a path to a file containing a go template used to render error pages during the authentication or grant flow - // If unspecified, the default error page is used. - Error string `json:"error"` -} - -// IdentityProvider provides identities for users authenticating using credentials -type IdentityProvider struct { - // name is used to qualify the identities returned by this provider - Name string `json:"name"` - // challenge indicates whether to issue WWW-Authenticate challenges for this provider - UseAsChallenger bool `json:"challenge"` - // login indicates whether to use this identity provider for unauthenticated browsers to login against - UseAsLogin bool `json:"login"` - // mappingMethod determines how identities from this provider are mapped to users - MappingMethod string `json:"mappingMethod"` - // provider contains the information about how to set up a specific identity provider - // +kubebuilder:pruning:PreserveUnknownFields - Provider runtime.RawExtension `json:"provider"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type BasicAuthPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // RemoteConnectionInfo contains information about how to connect to the external basic auth server - configv1.RemoteConnectionInfo `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AllowAllPasswordIdentityProvider provides identities for users authenticating using non-empty passwords -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type AllowAllPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// DenyAllPasswordIdentityProvider provides no identities for users -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type DenyAllPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type HTPasswdPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // file is a reference to your htpasswd file - File string `json:"file"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type LDAPPasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - // 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 - URL string `json:"url"` - // bindDN is an optional DN to bind with during the search phase. - BindDN string `json:"bindDN"` - // bindPassword is an optional password to bind with during the search phase. - BindPassword configv1.StringSource `json:"bindPassword"` - - // insecure, if true, indicates the connection should not use TLS. - // Cannot be set to true with a URL scheme of "ldaps://" - // If false, "ldaps://" URLs connect using TLS, and "ldap://" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830 - Insecure bool `json:"insecure"` - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `json:"ca"` - // attributes maps LDAP attributes to identities - Attributes LDAPAttributeMapping `json:"attributes"` -} - -// LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields -type LDAPAttributeMapping struct { - // id is the list of attributes whose values should be used as the user ID. Required. - // 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" - 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" - 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 - Email []string `json:"email"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type KeystonePasswordIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - // RemoteConnectionInfo contains information about how to connect to the keystone server - configv1.RemoteConnectionInfo `json:",inline"` - // domainName is required for keystone v3 - DomainName string `json:"domainName"` - // useKeystoneIdentity flag indicates that user should be authenticated by keystone ID, not by username - UseKeystoneIdentity bool `json:"useKeystoneIdentity"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type RequestHeaderIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // 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 - // 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} - LoginURL string `json:"loginURL"` - - // 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 - // 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} - ChallengeURL string `json:"challengeURL"` - - // clientCA is a file 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. - ClientCA string `json:"clientCA"` - // 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. - ClientCommonNames []string `json:"clientCommonNames"` - - // headers is the set of headers to check for identity information - Headers []string `json:"headers"` - // preferredUsernameHeaders is the set of headers to check for the preferred username - PreferredUsernameHeaders []string `json:"preferredUsernameHeaders"` - // nameHeaders is the set of headers to check for the display name - NameHeaders []string `json:"nameHeaders"` - // emailHeaders is the set of headers to check for the email address - EmailHeaders []string `json:"emailHeaders"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitHubIdentityProvider provides identities for users authenticating using GitHub credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GitHubIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret configv1.StringSource `json:"clientSecret"` - // organizations optionally restricts which organizations are allowed to log in - Organizations []string `json:"organizations"` - // teams optionally restricts which teams are allowed to log in. Format is /. - Teams []string `json:"teams"` - // 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 that is configured at /setup/settings#hostname. - Hostname string `json:"hostname"` - // ca is the optional trusted certificate authority bundle to use when making requests to the server. - // If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value. - CA string `json:"ca"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GitLabIdentityProvider provides identities for users authenticating using GitLab credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GitLabIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `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 the oauth client secret - ClientSecret configv1.StringSource `json:"clientSecret"` - // legacy determines if OAuth2 or OIDC should be used - // If true, OAuth2 is used - // If false, OIDC is used - // If nil and the URL's host is gitlab.com, OIDC is used - // Otherwise, OAuth2 is used - // In a future release, nil will default to using OIDC - // Eventually this flag will be removed and only OIDC will be used - Legacy *bool `json:"legacy,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GoogleIdentityProvider provides identities for users authenticating using Google credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type GoogleIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret configv1.StringSource `json:"clientSecret"` - - // hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to - HostedDomain string `json:"hostedDomain"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type OpenIDIdentityProvider struct { - metav1.TypeMeta `json:",inline"` - - // ca is the optional trusted certificate authority bundle to use when making requests to the server - // If empty, the default system roots are used - CA string `json:"ca"` - - // clientID is the oauth client ID - ClientID string `json:"clientID"` - // clientSecret is the oauth client secret - ClientSecret configv1.StringSource `json:"clientSecret"` - - // extraScopes are any scopes to request in addition to the standard "openid" scope. - ExtraScopes []string `json:"extraScopes"` - - // extraAuthorizeParameters are any custom parameters to add to the authorize request. - ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters"` - - // urls to use to authenticate - URLs OpenIDURLs `json:"urls"` - - // claims mappings - Claims OpenIDClaims `json:"claims"` -} - -// OpenIDURLs are URLs to use when authenticating with an OpenID identity provider -type OpenIDURLs struct { - // authorize is the oauth authorization URL - Authorize string `json:"authorize"` - // token is the oauth token granting URL - Token string `json:"token"` - // userInfo is the optional userinfo URL. - // If present, a granted access_token is used to request claims - // If empty, a granted id_token is parsed for claims - UserInfo string `json:"userInfo"` -} - -// OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider -type OpenIDClaims struct { - // id is the list of claims whose values should be used as the user ID. Required. - // OpenID standard identity claim is "sub" - ID []string `json:"id"` - // 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 - 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 - 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 - Email []string `json:"email"` - // groups is the list of claims value of which should be used to synchronize groups - // from the OIDC provider to OpenShift for the user - Groups []string `json:"groups"` -} - -// GrantConfig holds the necessary configuration options for grant handlers -type GrantConfig struct { - // method determines the default strategy to use when an OAuth client requests a grant. - // 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 - Method GrantHandlerType `json:"method"` - - // serviceAccountMethod is used for determining client authorization for service account oauth client. - // It must be either: deny, prompt - ServiceAccountMethod GrantHandlerType `json:"serviceAccountMethod"` -} - -type GrantHandlerType string - -const ( - // auto auto-approves client authorization grant requests - GrantHandlerAuto GrantHandlerType = "auto" - // prompt prompts the user to approve new client authorization grant requests - GrantHandlerPrompt GrantHandlerType = "prompt" - // deny auto-denies client authorization grant requests - GrantHandlerDeny GrantHandlerType = "deny" -) - -// SessionConfig specifies options for cookie-based sessions. Used by AuthRequestHandlerSession -type SessionConfig struct { - // sessionSecretsFile is a reference to a file containing a serialized SessionSecrets object - // If no file is specified, a random signing and encryption key are generated at each server start - SessionSecretsFile string `json:"sessionSecretsFile"` - // sessionMaxAgeSeconds specifies how long created sessions last. Used by AuthRequestHandlerSession - SessionMaxAgeSeconds int32 `json:"sessionMaxAgeSeconds"` - // sessionName is the cookie name used to store the session - SessionName string `json:"sessionName"` -} - -// 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,omitempty"` - // accessTokenMaxAgeSeconds defines the maximum age of access tokens - AccessTokenMaxAgeSeconds int32 `json:"accessTokenMaxAgeSeconds,omitempty"` - // accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect. - // +optional - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` - // accessTokenInactivityTimeout defines the 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. Takes valid time - // duration string such as "5m", "1.5h" or "2h45m". The minimum allowed - // value for duration is 300s (5 minutes). If the timeout is configured - // per client, then that value takes precedence. If the timeout value is - // not specified and the client does not override the value, then tokens - // are valid until their lifetime. - // +optional - AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SessionSecrets list the secrets to use to sign/encrypt and authenticate/decrypt created sessions. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type SessionSecrets struct { - metav1.TypeMeta `json:",inline"` - - // secrets is a list of secrets - // New sessions are signed and encrypted using the first secret. - // Existing sessions are decrypted/authenticated by each secret until one succeeds. This allows rotating secrets. - Secrets []SessionSecret `json:"secrets"` -} - -// SessionSecret is a secret used to authenticate/decrypt cookie-based sessions -type SessionSecret struct { - // authentication is used to authenticate sessions using HMAC. Recommended to use a secret with 32 or 64 bytes. - Authentication string `json:"authentication"` - // encryption is used to encrypt sessions. Must be 16, 24, or 32 characters long, to select AES-128, AES- - Encryption string `json:"encryption"` -} diff --git a/vendor/github.com/openshift/api/osin/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/osin/v1/zz_generated.deepcopy.go deleted file mode 100644 index 7d7234534..000000000 --- a/vendor/github.com/openshift/api/osin/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,645 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AllowAllPasswordIdentityProvider) DeepCopyInto(out *AllowAllPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowAllPasswordIdentityProvider. -func (in *AllowAllPasswordIdentityProvider) DeepCopy() *AllowAllPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(AllowAllPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AllowAllPasswordIdentityProvider) 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 *BasicAuthPasswordIdentityProvider) DeepCopyInto(out *BasicAuthPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.RemoteConnectionInfo = in.RemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuthPasswordIdentityProvider. -func (in *BasicAuthPasswordIdentityProvider) DeepCopy() *BasicAuthPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(BasicAuthPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BasicAuthPasswordIdentityProvider) 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 *DenyAllPasswordIdentityProvider) DeepCopyInto(out *DenyAllPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DenyAllPasswordIdentityProvider. -func (in *DenyAllPasswordIdentityProvider) DeepCopy() *DenyAllPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(DenyAllPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DenyAllPasswordIdentityProvider) 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 *GitHubIdentityProvider) DeepCopyInto(out *GitHubIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.Organizations != nil { - in, out := &in.Organizations, &out.Organizations - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Teams != nil { - in, out := &in.Teams, &out.Teams - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitHubIdentityProvider. -func (in *GitHubIdentityProvider) DeepCopy() *GitHubIdentityProvider { - if in == nil { - return nil - } - out := new(GitHubIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitHubIdentityProvider) 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 *GitLabIdentityProvider) DeepCopyInto(out *GitLabIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.Legacy != nil { - in, out := &in.Legacy, &out.Legacy - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLabIdentityProvider. -func (in *GitLabIdentityProvider) DeepCopy() *GitLabIdentityProvider { - if in == nil { - return nil - } - out := new(GitLabIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GitLabIdentityProvider) 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 *GoogleIdentityProvider) DeepCopyInto(out *GoogleIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GoogleIdentityProvider. -func (in *GoogleIdentityProvider) DeepCopy() *GoogleIdentityProvider { - if in == nil { - return nil - } - out := new(GoogleIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GoogleIdentityProvider) 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 *GrantConfig) DeepCopyInto(out *GrantConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GrantConfig. -func (in *GrantConfig) DeepCopy() *GrantConfig { - if in == nil { - return nil - } - out := new(GrantConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HTPasswdPasswordIdentityProvider) DeepCopyInto(out *HTPasswdPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTPasswdPasswordIdentityProvider. -func (in *HTPasswdPasswordIdentityProvider) DeepCopy() *HTPasswdPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(HTPasswdPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HTPasswdPasswordIdentityProvider) 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 *IdentityProvider) DeepCopyInto(out *IdentityProvider) { - *out = *in - in.Provider.DeepCopyInto(&out.Provider) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityProvider. -func (in *IdentityProvider) DeepCopy() *IdentityProvider { - if in == nil { - return nil - } - out := new(IdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KeystonePasswordIdentityProvider) DeepCopyInto(out *KeystonePasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.RemoteConnectionInfo = in.RemoteConnectionInfo - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeystonePasswordIdentityProvider. -func (in *KeystonePasswordIdentityProvider) DeepCopy() *KeystonePasswordIdentityProvider { - if in == nil { - return nil - } - out := new(KeystonePasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KeystonePasswordIdentityProvider) 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 *LDAPAttributeMapping) DeepCopyInto(out *LDAPAttributeMapping) { - *out = *in - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPAttributeMapping. -func (in *LDAPAttributeMapping) DeepCopy() *LDAPAttributeMapping { - if in == nil { - return nil - } - out := new(LDAPAttributeMapping) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LDAPPasswordIdentityProvider) DeepCopyInto(out *LDAPPasswordIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - out.BindPassword = in.BindPassword - in.Attributes.DeepCopyInto(&out.Attributes) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LDAPPasswordIdentityProvider. -func (in *LDAPPasswordIdentityProvider) DeepCopy() *LDAPPasswordIdentityProvider { - if in == nil { - return nil - } - out := new(LDAPPasswordIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LDAPPasswordIdentityProvider) 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 *OAuthConfig) DeepCopyInto(out *OAuthConfig) { - *out = *in - if in.MasterCA != nil { - in, out := &in.MasterCA, &out.MasterCA - *out = new(string) - **out = **in - } - if in.IdentityProviders != nil { - in, out := &in.IdentityProviders, &out.IdentityProviders - *out = make([]IdentityProvider, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - out.GrantConfig = in.GrantConfig - if in.SessionConfig != nil { - in, out := &in.SessionConfig, &out.SessionConfig - *out = new(SessionConfig) - **out = **in - } - in.TokenConfig.DeepCopyInto(&out.TokenConfig) - if in.Templates != nil { - in, out := &in.Templates, &out.Templates - *out = new(OAuthTemplates) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthConfig. -func (in *OAuthConfig) DeepCopy() *OAuthConfig { - if in == nil { - return nil - } - out := new(OAuthConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OAuthTemplates) DeepCopyInto(out *OAuthTemplates) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuthTemplates. -func (in *OAuthTemplates) DeepCopy() *OAuthTemplates { - if in == nil { - return nil - } - out := new(OAuthTemplates) - 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 - if in.ID != nil { - in, out := &in.ID, &out.ID - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsername != nil { - in, out := &in.PreferredUsername, &out.PreferredUsername - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Name != nil { - in, out := &in.Name, &out.Name - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Email != nil { - in, out := &in.Email, &out.Email - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDClaims. -func (in *OpenIDClaims) DeepCopy() *OpenIDClaims { - if in == nil { - return nil - } - out := new(OpenIDClaims) - in.DeepCopyInto(out) - return out -} - -// 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.TypeMeta = in.TypeMeta - out.ClientSecret = in.ClientSecret - if in.ExtraScopes != nil { - in, out := &in.ExtraScopes, &out.ExtraScopes - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ExtraAuthorizeParameters != nil { - in, out := &in.ExtraAuthorizeParameters, &out.ExtraAuthorizeParameters - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - out.URLs = in.URLs - in.Claims.DeepCopyInto(&out.Claims) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDIdentityProvider. -func (in *OpenIDIdentityProvider) DeepCopy() *OpenIDIdentityProvider { - if in == nil { - return nil - } - out := new(OpenIDIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OpenIDIdentityProvider) 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 *OpenIDURLs) DeepCopyInto(out *OpenIDURLs) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenIDURLs. -func (in *OpenIDURLs) DeepCopy() *OpenIDURLs { - if in == nil { - return nil - } - out := new(OpenIDURLs) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OsinServerConfig) DeepCopyInto(out *OsinServerConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.GenericAPIServerConfig.DeepCopyInto(&out.GenericAPIServerConfig) - in.OAuthConfig.DeepCopyInto(&out.OAuthConfig) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OsinServerConfig. -func (in *OsinServerConfig) DeepCopy() *OsinServerConfig { - if in == nil { - return nil - } - out := new(OsinServerConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *OsinServerConfig) 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 *RequestHeaderIdentityProvider) DeepCopyInto(out *RequestHeaderIdentityProvider) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.ClientCommonNames != nil { - in, out := &in.ClientCommonNames, &out.ClientCommonNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Headers != nil { - in, out := &in.Headers, &out.Headers - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.PreferredUsernameHeaders != nil { - in, out := &in.PreferredUsernameHeaders, &out.PreferredUsernameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NameHeaders != nil { - in, out := &in.NameHeaders, &out.NameHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.EmailHeaders != nil { - in, out := &in.EmailHeaders, &out.EmailHeaders - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderIdentityProvider. -func (in *RequestHeaderIdentityProvider) DeepCopy() *RequestHeaderIdentityProvider { - if in == nil { - return nil - } - out := new(RequestHeaderIdentityProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RequestHeaderIdentityProvider) 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 *SessionConfig) DeepCopyInto(out *SessionConfig) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionConfig. -func (in *SessionConfig) DeepCopy() *SessionConfig { - if in == nil { - return nil - } - out := new(SessionConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionSecret) DeepCopyInto(out *SessionSecret) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionSecret. -func (in *SessionSecret) DeepCopy() *SessionSecret { - if in == nil { - return nil - } - out := new(SessionSecret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SessionSecrets) DeepCopyInto(out *SessionSecrets) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Secrets != nil { - in, out := &in.Secrets, &out.Secrets - *out = make([]SessionSecret, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SessionSecrets. -func (in *SessionSecrets) DeepCopy() *SessionSecrets { - if in == nil { - return nil - } - out := new(SessionSecrets) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SessionSecrets) 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 *TokenConfig) DeepCopyInto(out *TokenConfig) { - *out = *in - if in.AccessTokenInactivityTimeoutSeconds != nil { - in, out := &in.AccessTokenInactivityTimeoutSeconds, &out.AccessTokenInactivityTimeoutSeconds - *out = new(int32) - **out = **in - } - if in.AccessTokenInactivityTimeout != nil { - in, out := &in.AccessTokenInactivityTimeout, &out.AccessTokenInactivityTimeout - *out = new(metav1.Duration) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TokenConfig. -func (in *TokenConfig) DeepCopy() *TokenConfig { - if in == nil { - return nil - } - out := new(TokenConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/osin/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/osin/v1/zz_generated.model_name.go deleted file mode 100644 index 1ac7911e2..000000000 --- a/vendor/github.com/openshift/api/osin/v1/zz_generated.model_name.go +++ /dev/null @@ -1,121 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AllowAllPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.AllowAllPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BasicAuthPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.BasicAuthPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in DenyAllPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.DenyAllPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitHubIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.GitHubIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GitLabIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.GitLabIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GoogleIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.GoogleIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GrantConfig) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.GrantConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in HTPasswdPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.HTPasswdPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.IdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in KeystonePasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.KeystonePasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPAttributeMapping) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.LDAPAttributeMapping" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LDAPPasswordIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.LDAPPasswordIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthConfig) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OAuthConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OAuthTemplates) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OAuthTemplates" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDClaims) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OpenIDClaims" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OpenIDIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OpenIDURLs) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OpenIDURLs" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in OsinServerConfig) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.OsinServerConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RequestHeaderIdentityProvider) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.RequestHeaderIdentityProvider" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionConfig) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.SessionConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionSecret) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.SessionSecret" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SessionSecrets) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.SessionSecrets" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TokenConfig) OpenAPIModelName() string { - return "com.github.openshift.api.osin.v1.TokenConfig" -} diff --git a/vendor/github.com/openshift/api/osin/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/osin/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 6594af945..000000000 --- a/vendor/github.com/openshift/api/osin/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,281 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AllowAllPasswordIdentityProvider = map[string]string{ - "": "AllowAllPasswordIdentityProvider provides identities for users authenticating using non-empty passwords\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (AllowAllPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_AllowAllPasswordIdentityProvider -} - -var map_BasicAuthPasswordIdentityProvider = map[string]string{ - "": "BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (BasicAuthPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_BasicAuthPasswordIdentityProvider -} - -var map_DenyAllPasswordIdentityProvider = map[string]string{ - "": "DenyAllPasswordIdentityProvider provides no identities for users\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", -} - -func (DenyAllPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_DenyAllPasswordIdentityProvider -} - -var map_GitHubIdentityProvider = map[string]string{ - "": "GitHubIdentityProvider provides identities for users authenticating using GitHub credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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 that is configured at /setup/settings#hostname.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server. If empty, the default system roots are used. This can only be configured when hostname is set to a non-empty value.", -} - -func (GitHubIdentityProvider) SwaggerDoc() map[string]string { - return map_GitHubIdentityProvider -} - -var map_GitLabIdentityProvider = map[string]string{ - "": "GitLabIdentityProvider provides identities for users authenticating using GitLab credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "url": "url is the oauth server base URL", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "legacy": "legacy determines if OAuth2 or OIDC should be used If true, OAuth2 is used If false, OIDC is used If nil and the URL's host is gitlab.com, OIDC is used Otherwise, OAuth2 is used In a future release, nil will default to using OIDC Eventually this flag will be removed and only OIDC will be used", -} - -func (GitLabIdentityProvider) SwaggerDoc() map[string]string { - return map_GitLabIdentityProvider -} - -var map_GoogleIdentityProvider = map[string]string{ - "": "GoogleIdentityProvider provides identities for users authenticating using Google credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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_GrantConfig = map[string]string{ - "": "GrantConfig holds the necessary configuration options for grant handlers", - "method": "method determines the default strategy to use when an OAuth client requests a grant. This method will be used only if the specific OAuth client doesn't provide a strategy of their own. Valid grant handling methods are:\n - auto: always approves grant requests, useful for trusted clients\n - prompt: prompts the end user for approval of grant requests, useful for third-party clients\n - deny: always denies grant requests, useful for black-listed clients", - "serviceAccountMethod": "serviceAccountMethod is used for determining client authorization for service account oauth client. It must be either: deny, prompt", -} - -func (GrantConfig) SwaggerDoc() map[string]string { - return map_GrantConfig -} - -var map_HTPasswdPasswordIdentityProvider = map[string]string{ - "": "HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "file": "file is a reference to your htpasswd file", -} - -func (HTPasswdPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_HTPasswdPasswordIdentityProvider -} - -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", - "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", - "provider": "provider contains the information about how to set up a specific identity provider", -} - -func (IdentityProvider) SwaggerDoc() map[string]string { - return map_IdentityProvider -} - -var map_KeystonePasswordIdentityProvider = map[string]string{ - "": "KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "domainName": "domainName is required for keystone v3", - "useKeystoneIdentity": "useKeystoneIdentity flag indicates that user should be authenticated by keystone ID, not by username", -} - -func (KeystonePasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_KeystonePasswordIdentityProvider -} - -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. 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_LDAPPasswordIdentityProvider = map[string]string{ - "": "LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "url": "url is an RFC 2255 URL which specifies the LDAP search parameters to use. The syntax of the URL is\n 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 password to bind with during the search phase.", - "insecure": "insecure, if true, indicates the connection should not use TLS. Cannot be set to true with a URL scheme of \"ldaps://\" If false, \"ldaps://\" URLs connect using TLS, and \"ldap://\" URLs are upgraded to a TLS connection using StartTLS as specified in https://tools.ietf.org/html/rfc2830", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "attributes": "attributes maps LDAP attributes to identities", -} - -func (LDAPPasswordIdentityProvider) SwaggerDoc() map[string]string { - return map_LDAPPasswordIdentityProvider -} - -var map_OAuthConfig = map[string]string{ - "": "OAuthConfig holds the necessary configuration options for OAuth authentication", - "masterCA": "masterCA is the CA for verifying the TLS connection back to the MasterURL. This field is deprecated and will be removed in a future release. See loginURL for details. Deprecated", - "masterURL": "masterURL is used for making server-to-server calls to exchange authorization codes for access tokens This field is deprecated and will be removed in a future release. See loginURL for details. Deprecated", - "masterPublicURL": "masterPublicURL is used for building valid client redirect URLs for internal and external access This field is deprecated and will be removed in a future release. See loginURL for details. Deprecated", - "loginURL": "loginURL, along with masterCA, masterURL and masterPublicURL have distinct meanings depending on how the OAuth server is run. The two states are: 1. embedded in the kube api server (all 3.x releases) 2. as a standalone external process (all 4.x releases) in the embedded configuration, loginURL is equivalent to masterPublicURL and the other fields have functionality that matches their docs. in the standalone configuration, the fields are used as: loginURL is the URL required to login to the cluster: oc login --server= masterPublicURL is the issuer URL it is accessible from inside (service network) and outside (ingress) of the cluster masterURL is the loopback variation of the token_endpoint URL with no path component it is only accessible from inside (service network) of the cluster masterCA is used to perform TLS verification for connections made to masterURL For further details, see the IETF Draft: https://tools.ietf.org/html/draft-ietf-oauth-discovery-04#section-2", - "assetPublicURL": "assetPublicURL is used for building valid client redirect URLs for external access", - "alwaysShowProviderSelection": "alwaysShowProviderSelection will force the provider selection page to render even when there is only a single provider.", - "identityProviders": "identityProviders is an ordered list of ways for a user to identify themselves", - "grantConfig": "grantConfig describes how to handle grants", - "sessionConfig": "sessionConfig hold information about configuring sessions.", - "tokenConfig": "tokenConfig contains options for authorization and access tokens", - "templates": "templates allow you to customize pages like the login page.", - "proxyTrustedCA": "proxyTrustedCA is an optional path to a PEM-encoded CA bundle used to verify connections to an HTTPS proxy during outbound IdP requests. When omitted, proxy connections use the system trust roots only.", -} - -func (OAuthConfig) SwaggerDoc() map[string]string { - return map_OAuthConfig -} - -var map_OAuthTemplates = map[string]string{ - "": "OAuthTemplates allow for customization of pages like the login page", - "login": "login is a path to a file containing a go template used to render the login page. If unspecified, the default login page is used.", - "providerSelection": "providerSelection is a path to a file containing a go template used to render the provider selection page. If unspecified, the default provider selection page is used.", - "error": "error is a path to a file containing a go template used to render error pages during the authentication or grant flow If unspecified, the default error page is used.", -} - -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", - "id": "id is the list of claims whose values should be used as the user ID. Required. OpenID standard identity claim is \"sub\"", - "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 id 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", - "groups": "groups is the list of claims value of which should be used to synchronize groups from the OIDC provider to OpenShift for the user", -} - -func (OpenIDClaims) SwaggerDoc() map[string]string { - return map_OpenIDClaims -} - -var map_OpenIDIdentityProvider = map[string]string{ - "": "OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "ca": "ca is the optional trusted certificate authority bundle to use when making requests to the server If empty, the default system roots are used", - "clientID": "clientID is the oauth client ID", - "clientSecret": "clientSecret is the oauth client secret", - "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_OsinServerConfig = map[string]string{ - "": "Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "oauthConfig": "oauthConfig holds the necessary configuration options for OAuth authentication", -} - -func (OsinServerConfig) SwaggerDoc() map[string]string { - return map_OsinServerConfig -} - -var map_RequestHeaderIdentityProvider = map[string]string{ - "": "RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "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}", - "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}", - "clientCA": "clientCA is a file 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.", - "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_SessionConfig = map[string]string{ - "": "SessionConfig specifies options for cookie-based sessions. Used by AuthRequestHandlerSession", - "sessionSecretsFile": "sessionSecretsFile is a reference to a file containing a serialized SessionSecrets object If no file is specified, a random signing and encryption key are generated at each server start", - "sessionMaxAgeSeconds": "sessionMaxAgeSeconds specifies how long created sessions last. Used by AuthRequestHandlerSession", - "sessionName": "sessionName is the cookie name used to store the session", -} - -func (SessionConfig) SwaggerDoc() map[string]string { - return map_SessionConfig -} - -var map_SessionSecret = map[string]string{ - "": "SessionSecret is a secret used to authenticate/decrypt cookie-based sessions", - "authentication": "authentication is used to authenticate sessions using HMAC. Recommended to use a secret with 32 or 64 bytes.", - "encryption": "encryption is used to encrypt sessions. Must be 16, 24, or 32 characters long, to select AES-128, AES-", -} - -func (SessionSecret) SwaggerDoc() map[string]string { - return map_SessionSecret -} - -var map_SessionSecrets = map[string]string{ - "": "SessionSecrets list the secrets to use to sign/encrypt and authenticate/decrypt created sessions.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "secrets": "secrets is a list of secrets New sessions are signed and encrypted using the first secret. Existing sessions are decrypted/authenticated by each secret until one succeeds. This allows rotating secrets.", -} - -func (SessionSecrets) SwaggerDoc() map[string]string { - return map_SessionSecrets -} - -var map_TokenConfig = map[string]string{ - "": "TokenConfig holds the necessary configuration options for authorization and access tokens", - "authorizeTokenMaxAgeSeconds": "authorizeTokenMaxAgeSeconds defines the maximum age of authorize tokens", - "accessTokenMaxAgeSeconds": "accessTokenMaxAgeSeconds defines the maximum age of access tokens", - "accessTokenInactivityTimeoutSeconds": "accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect.", - "accessTokenInactivityTimeout": "accessTokenInactivityTimeout defines the 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. Takes valid time duration string such as \"5m\", \"1.5h\" or \"2h45m\". The minimum allowed value for duration is 300s (5 minutes). If the timeout is configured per client, then that value takes precedence. If the timeout value is not specified and the client does not override the value, then tokens are valid until their lifetime.", -} - -func (TokenConfig) SwaggerDoc() map[string]string { - return map_TokenConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/pkg/serialization/serialization.go b/vendor/github.com/openshift/api/pkg/serialization/serialization.go deleted file mode 100644 index 70c8e7a99..000000000 --- a/vendor/github.com/openshift/api/pkg/serialization/serialization.go +++ /dev/null @@ -1,45 +0,0 @@ -package serialization - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// DecodeNestedRawExtensionOrUnknown -func DecodeNestedRawExtensionOrUnknown(d runtime.Decoder, ext *runtime.RawExtension) { - if ext.Raw == nil || ext.Object != nil { - return - } - obj, gvk, err := d.Decode(ext.Raw, nil, nil) - if err != nil { - unk := &runtime.Unknown{Raw: ext.Raw} - if runtime.IsNotRegisteredError(err) { - if _, gvk, err := d.Decode(ext.Raw, nil, unk); err == nil { - unk.APIVersion = gvk.GroupVersion().String() - unk.Kind = gvk.Kind - ext.Object = unk - return - } - } - // TODO: record mime-type with the object - if gvk != nil { - unk.APIVersion = gvk.GroupVersion().String() - unk.Kind = gvk.Kind - } - obj = unk - } - ext.Object = obj -} - -// EncodeNestedRawExtension will encode the object in the RawExtension (if not nil) or -// return an error. -func EncodeNestedRawExtension(e runtime.Encoder, ext *runtime.RawExtension) error { - if ext.Raw != nil || ext.Object == nil { - return nil - } - data, err := runtime.Encode(e, ext.Object) - if err != nil { - return err - } - ext.Raw = data - return nil -} diff --git a/vendor/github.com/openshift/api/project/.codegen.yaml b/vendor/github.com/openshift/api/project/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/project/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/project/OWNERS b/vendor/github.com/openshift/api/project/OWNERS deleted file mode 100644 index 9b1548f56..000000000 --- a/vendor/github.com/openshift/api/project/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -reviewers: - - mfojtik diff --git a/vendor/github.com/openshift/api/project/install.go b/vendor/github.com/openshift/api/project/install.go deleted file mode 100644 index c96c7aa26..000000000 --- a/vendor/github.com/openshift/api/project/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package project - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - projectv1 "github.com/openshift/api/project/v1" -) - -const ( - GroupName = "project.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(projectv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/project/v1/doc.go b/vendor/github.com/openshift/api/project/v1/doc.go deleted file mode 100644 index 28e4a9985..000000000 --- a/vendor/github.com/openshift/api/project/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/project/apis/project -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.project.v1 - -// +groupName=project.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/project/v1/generated.pb.go b/vendor/github.com/openshift/api/project/v1/generated.pb.go deleted file mode 100644 index 9e71e711d..000000000 --- a/vendor/github.com/openshift/api/project/v1/generated.pb.go +++ /dev/null @@ -1,1110 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/project/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v11 "k8s.io/api/core/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *Project) Reset() { *m = Project{} } - -func (m *ProjectList) Reset() { *m = ProjectList{} } - -func (m *ProjectRequest) Reset() { *m = ProjectRequest{} } - -func (m *ProjectSpec) Reset() { *m = ProjectSpec{} } - -func (m *ProjectStatus) Reset() { *m = ProjectStatus{} } - -func (m *Project) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Project) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Project) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ProjectList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProjectList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProjectList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ProjectRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProjectRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProjectRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - i -= len(m.DisplayName) - copy(dAtA[i:], m.DisplayName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DisplayName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ProjectSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProjectSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProjectSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Finalizers) > 0 { - for iNdEx := len(m.Finalizers) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Finalizers[iNdEx]) - copy(dAtA[i:], m.Finalizers[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Finalizers[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ProjectStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ProjectStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ProjectStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Phase) - copy(dAtA[i:], m.Phase) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Phase))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Project) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ProjectList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ProjectRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DisplayName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ProjectSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Finalizers) > 0 { - for _, s := range m.Finalizers { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ProjectStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Phase) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Project) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Project{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ProjectSpec", "ProjectSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ProjectStatus", "ProjectStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ProjectList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Project{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Project", "Project", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ProjectList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ProjectRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ProjectRequest{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `}`, - }, "") - return s -} -func (this *ProjectSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ProjectSpec{`, - `Finalizers:` + fmt.Sprintf("%v", this.Finalizers) + `,`, - `}`, - }, "") - return s -} -func (this *ProjectStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]NamespaceCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ProjectStatus{`, - `Phase:` + fmt.Sprintf("%v", this.Phase) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Project) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Project: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Project: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProjectList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProjectList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProjectList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Project{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProjectRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProjectRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProjectRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProjectSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProjectSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProjectSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Finalizers", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Finalizers = append(m.Finalizers, k8s_io_api_core_v1.FinalizerName(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ProjectStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ProjectStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ProjectStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Phase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Phase = k8s_io_api_core_v1.NamespacePhase(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, v11.NamespaceCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/project/v1/generated.proto b/vendor/github.com/openshift/api/project/v1/generated.proto deleted file mode 100644 index d1ffbc341..000000000 --- a/vendor/github.com/openshift/api/project/v1/generated.proto +++ /dev/null @@ -1,90 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.project.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/project/v1"; - -// Projects are the unit of isolation and collaboration in OpenShift. A project has one or more members, -// a quota on the resources that the project may consume, and the security controls on the resources in -// the project. Within a project, members may have different roles - project administrators can set -// membership, editors can create and manage the resources, and viewers can see but not access running -// containers. In a normal cluster project administrators are not able to alter their quotas - that is -// restricted to cluster administrators. -// -// Listing or watching projects will return only projects the user has the reader role on. -// -// An OpenShift project is an alternative representation of a Kubernetes namespace. Projects are exposed -// as editable to end users while namespaces are not. Direct creation of a project is typically restricted -// to administrators, while end users should use the requestproject resource. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Project { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec defines the behavior of the Namespace. - optional ProjectSpec spec = 2; - - // status describes the current status of a Namespace - // +optional - optional ProjectStatus status = 3; -} - -// ProjectList is a list of Project objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ProjectList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of projects - repeated Project items = 2; -} - -// ProjectRequest is the set of options necessary to fully qualify a project request -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ProjectRequest { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // displayName is the display name to apply to a project - optional string displayName = 2; - - // description is the description to apply to a project - optional string description = 3; -} - -// ProjectSpec describes the attributes on a Project -message ProjectSpec { - // finalizers is an opaque list of values that must be empty to permanently remove object from storage - repeated string finalizers = 1; -} - -// ProjectStatus is information about the current status of a Project -message ProjectStatus { - // phase is the current lifecycle phase of the project - // +optional - optional string phase = 1; - - // Represents the latest available observations of the project current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - repeated .k8s.io.api.core.v1.NamespaceCondition conditions = 2; -} - diff --git a/vendor/github.com/openshift/api/project/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/project/v1/generated.protomessage.pb.go deleted file mode 100644 index feaab85c7..000000000 --- a/vendor/github.com/openshift/api/project/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*Project) ProtoMessage() {} - -func (*ProjectList) ProtoMessage() {} - -func (*ProjectRequest) ProtoMessage() {} - -func (*ProjectSpec) ProtoMessage() {} - -func (*ProjectStatus) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/project/v1/legacy.go b/vendor/github.com/openshift/api/project/v1/legacy.go deleted file mode 100644 index 186f905f3..000000000 --- a/vendor/github.com/openshift/api/project/v1/legacy.go +++ /dev/null @@ -1,23 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Project{}, - &ProjectList{}, - &ProjectRequest{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/project/v1/register.go b/vendor/github.com/openshift/api/project/v1/register.go deleted file mode 100644 index e471716ce..000000000 --- a/vendor/github.com/openshift/api/project/v1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "project.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Project{}, - &ProjectList{}, - &ProjectRequest{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/project/v1/types.go b/vendor/github.com/openshift/api/project/v1/types.go deleted file mode 100644 index 5e69b775b..000000000 --- a/vendor/github.com/openshift/api/project/v1/types.go +++ /dev/null @@ -1,111 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ProjectList is a list of Project objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ProjectList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of projects - Items []Project `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -const ( - // These are internal finalizer values to Origin - FinalizerOrigin corev1.FinalizerName = "openshift.io/origin" - // ProjectNodeSelector is an annotation that holds the node selector; - // the node selector annotation determines which nodes will have pods from this project scheduled to them - ProjectNodeSelector = "openshift.io/node-selector" - - // ProjectRequesterAnnotation is the username that requested a given project. Its not guaranteed to be present, - // but it is set by the default project template. - ProjectRequesterAnnotation = "openshift.io/requester" -) - -// ProjectSpec describes the attributes on a Project -type ProjectSpec struct { - // finalizers is an opaque list of values that must be empty to permanently remove object from storage - Finalizers []corev1.FinalizerName `json:"finalizers,omitempty" protobuf:"bytes,1,rep,name=finalizers,casttype=k8s.io/api/core/v1.FinalizerName"` -} - -// ProjectStatus is information about the current status of a Project -type ProjectStatus struct { - // phase is the current lifecycle phase of the project - // +optional - Phase corev1.NamespacePhase `json:"phase,omitempty" protobuf:"bytes,1,opt,name=phase,casttype=k8s.io/api/core/v1.NamespacePhase"` - - // Represents the latest available observations of the project current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []corev1.NamespaceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Projects are the unit of isolation and collaboration in OpenShift. A project has one or more members, -// a quota on the resources that the project may consume, and the security controls on the resources in -// the project. Within a project, members may have different roles - project administrators can set -// membership, editors can create and manage the resources, and viewers can see but not access running -// containers. In a normal cluster project administrators are not able to alter their quotas - that is -// restricted to cluster administrators. -// -// Listing or watching projects will return only projects the user has the reader role on. -// -// An OpenShift project is an alternative representation of a Kubernetes namespace. Projects are exposed -// as editable to end users while namespaces are not. Direct creation of a project is typically restricted -// to administrators, while end users should use the requestproject resource. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Project struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec defines the behavior of the Namespace. - Spec ProjectSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - - // status describes the current status of a Namespace - // +optional - Status ProjectStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient -// +genclient:nonNamespaced -// +genclient:skipVerbs=get,list,create,update,patch,delete,deleteCollection,watch -// +genclient:method=Create,verb=create,result=Project - -// ProjectRequest is the set of options necessary to fully qualify a project request -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ProjectRequest struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // displayName is the display name to apply to a project - DisplayName string `json:"displayName,omitempty" protobuf:"bytes,2,opt,name=displayName"` - // description is the description to apply to a project - Description string `json:"description,omitempty" protobuf:"bytes,3,opt,name=description"` -} diff --git a/vendor/github.com/openshift/api/project/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/project/v1/zz_generated.deepcopy.go deleted file mode 100644 index b712a4811..000000000 --- a/vendor/github.com/openshift/api/project/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - 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 *Project) DeepCopyInto(out *Project) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project. -func (in *Project) DeepCopy() *Project { - if in == nil { - return nil - } - out := new(Project) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Project) 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 *ProjectList) DeepCopyInto(out *ProjectList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Project, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectList. -func (in *ProjectList) DeepCopy() *ProjectList { - if in == nil { - return nil - } - out := new(ProjectList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectList) 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 *ProjectRequest) DeepCopyInto(out *ProjectRequest) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectRequest. -func (in *ProjectRequest) DeepCopy() *ProjectRequest { - if in == nil { - return nil - } - out := new(ProjectRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ProjectRequest) 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 *ProjectSpec) DeepCopyInto(out *ProjectSpec) { - *out = *in - if in.Finalizers != nil { - in, out := &in.Finalizers, &out.Finalizers - *out = make([]corev1.FinalizerName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec. -func (in *ProjectSpec) DeepCopy() *ProjectSpec { - if in == nil { - return nil - } - out := new(ProjectSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProjectStatus) DeepCopyInto(out *ProjectStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]corev1.NamespaceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectStatus. -func (in *ProjectStatus) DeepCopy() *ProjectStatus { - if in == nil { - return nil - } - out := new(ProjectStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/project/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/project/v1/zz_generated.model_name.go deleted file mode 100644 index 0500036ae..000000000 --- a/vendor/github.com/openshift/api/project/v1/zz_generated.model_name.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Project) OpenAPIModelName() string { - return "com.github.openshift.api.project.v1.Project" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectList) OpenAPIModelName() string { - return "com.github.openshift.api.project.v1.ProjectList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectRequest) OpenAPIModelName() string { - return "com.github.openshift.api.project.v1.ProjectRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectSpec) OpenAPIModelName() string { - return "com.github.openshift.api.project.v1.ProjectSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ProjectStatus) OpenAPIModelName() string { - return "com.github.openshift.api.project.v1.ProjectStatus" -} diff --git a/vendor/github.com/openshift/api/project/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/project/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index b764eafac..000000000 --- a/vendor/github.com/openshift/api/project/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,65 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Project = map[string]string{ - "": "Projects are the unit of isolation and collaboration in OpenShift. A project has one or more members, a quota on the resources that the project may consume, and the security controls on the resources in the project. Within a project, members may have different roles - project administrators can set membership, editors can create and manage the resources, and viewers can see but not access running containers. In a normal cluster project administrators are not able to alter their quotas - that is restricted to cluster administrators.\n\nListing or watching projects will return only projects the user has the reader role on.\n\nAn OpenShift project is an alternative representation of a Kubernetes namespace. Projects are exposed as editable to end users while namespaces are not. Direct creation of a project is typically restricted to administrators, while end users should use the requestproject resource.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the behavior of the Namespace.", - "status": "status describes the current status of a Namespace", -} - -func (Project) SwaggerDoc() map[string]string { - return map_Project -} - -var map_ProjectList = map[string]string{ - "": "ProjectList is a list of Project objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of projects", -} - -func (ProjectList) SwaggerDoc() map[string]string { - return map_ProjectList -} - -var map_ProjectRequest = map[string]string{ - "": "ProjectRequest is the set of options necessary to fully qualify a project request\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "displayName": "displayName is the display name to apply to a project", - "description": "description is the description to apply to a project", -} - -func (ProjectRequest) SwaggerDoc() map[string]string { - return map_ProjectRequest -} - -var map_ProjectSpec = map[string]string{ - "": "ProjectSpec describes the attributes on a Project", - "finalizers": "finalizers is an opaque list of values that must be empty to permanently remove object from storage", -} - -func (ProjectSpec) SwaggerDoc() map[string]string { - return map_ProjectSpec -} - -var map_ProjectStatus = map[string]string{ - "": "ProjectStatus is information about the current status of a Project", - "phase": "phase is the current lifecycle phase of the project", - "conditions": "Represents the latest available observations of the project current state.", -} - -func (ProjectStatus) SwaggerDoc() map[string]string { - return map_ProjectStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/quota/.codegen.yaml b/vendor/github.com/openshift/api/quota/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/quota/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/quota/OWNERS b/vendor/github.com/openshift/api/quota/OWNERS deleted file mode 100644 index 75dbd7b56..000000000 --- a/vendor/github.com/openshift/api/quota/OWNERS +++ /dev/null @@ -1,3 +0,0 @@ -reviewers: - - deads2k - - mfojtik diff --git a/vendor/github.com/openshift/api/quota/install.go b/vendor/github.com/openshift/api/quota/install.go deleted file mode 100644 index 2a88e7d0a..000000000 --- a/vendor/github.com/openshift/api/quota/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package quota - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - quotav1 "github.com/openshift/api/quota/v1" -) - -const ( - GroupName = "quota.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(quotav1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/quota/v1/Makefile b/vendor/github.com/openshift/api/quota/v1/Makefile deleted file mode 100644 index 691859dd8..000000000 --- a/vendor/github.com/openshift/api/quota/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="quota.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/quota/v1/doc.go b/vendor/github.com/openshift/api/quota/v1/doc.go deleted file mode 100644 index 6808c1a24..000000000 --- a/vendor/github.com/openshift/api/quota/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/quota/apis/quota -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.quota.v1 - -// +groupName=quota.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/quota/v1/generated.pb.go b/vendor/github.com/openshift/api/quota/v1/generated.pb.go deleted file mode 100644 index f71af7cfa..000000000 --- a/vendor/github.com/openshift/api/quota/v1/generated.pb.go +++ /dev/null @@ -1,1866 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/quota/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *AppliedClusterResourceQuota) Reset() { *m = AppliedClusterResourceQuota{} } - -func (m *AppliedClusterResourceQuotaList) Reset() { *m = AppliedClusterResourceQuotaList{} } - -func (m *ClusterResourceQuota) Reset() { *m = ClusterResourceQuota{} } - -func (m *ClusterResourceQuotaList) Reset() { *m = ClusterResourceQuotaList{} } - -func (m *ClusterResourceQuotaSelector) Reset() { *m = ClusterResourceQuotaSelector{} } - -func (m *ClusterResourceQuotaSpec) Reset() { *m = ClusterResourceQuotaSpec{} } - -func (m *ClusterResourceQuotaStatus) Reset() { *m = ClusterResourceQuotaStatus{} } - -func (m *ResourceQuotaStatusByNamespace) Reset() { *m = ResourceQuotaStatusByNamespace{} } - -func (m *AppliedClusterResourceQuota) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AppliedClusterResourceQuota) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppliedClusterResourceQuota) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AppliedClusterResourceQuotaList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AppliedClusterResourceQuotaList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AppliedClusterResourceQuotaList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterResourceQuota) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterResourceQuota) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterResourceQuota) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterResourceQuotaList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterResourceQuotaList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterResourceQuotaList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterResourceQuotaSelector) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterResourceQuotaSelector) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterResourceQuotaSelector) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AnnotationSelector) > 0 { - keysForAnnotationSelector := make([]string, 0, len(m.AnnotationSelector)) - for k := range m.AnnotationSelector { - keysForAnnotationSelector = append(keysForAnnotationSelector, string(k)) - } - sort.Strings(keysForAnnotationSelector) - for iNdEx := len(keysForAnnotationSelector) - 1; iNdEx >= 0; iNdEx-- { - v := m.AnnotationSelector[string(keysForAnnotationSelector[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAnnotationSelector[iNdEx]) - copy(dAtA[i:], keysForAnnotationSelector[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAnnotationSelector[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x12 - } - } - if m.LabelSelector != nil { - { - size, err := m.LabelSelector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ClusterResourceQuotaSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterResourceQuotaSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterResourceQuotaSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Quota.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Selector.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ClusterResourceQuotaStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ClusterResourceQuotaStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ClusterResourceQuotaStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Namespaces) > 0 { - for iNdEx := len(m.Namespaces) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Namespaces[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Total.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ResourceQuotaStatusByNamespace) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ResourceQuotaStatusByNamespace) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ResourceQuotaStatusByNamespace) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AppliedClusterResourceQuota) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *AppliedClusterResourceQuotaList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ClusterResourceQuota) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ClusterResourceQuotaList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ClusterResourceQuotaSelector) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.LabelSelector != nil { - l = m.LabelSelector.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.AnnotationSelector) > 0 { - for k, v := range m.AnnotationSelector { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *ClusterResourceQuotaSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Selector.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Quota.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ClusterResourceQuotaStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Total.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Namespaces) > 0 { - for _, e := range m.Namespaces { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ResourceQuotaStatusByNamespace) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AppliedClusterResourceQuota) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AppliedClusterResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterResourceQuotaSpec", "ClusterResourceQuotaSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterResourceQuotaStatus", "ClusterResourceQuotaStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *AppliedClusterResourceQuotaList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]AppliedClusterResourceQuota{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "AppliedClusterResourceQuota", "AppliedClusterResourceQuota", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&AppliedClusterResourceQuotaList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ClusterResourceQuota) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterResourceQuota{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ClusterResourceQuotaSpec", "ClusterResourceQuotaSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ClusterResourceQuotaStatus", "ClusterResourceQuotaStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterResourceQuotaList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]ClusterResourceQuota{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "ClusterResourceQuota", "ClusterResourceQuota", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ClusterResourceQuotaList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ClusterResourceQuotaSelector) String() string { - if this == nil { - return "nil" - } - keysForAnnotationSelector := make([]string, 0, len(this.AnnotationSelector)) - for k := range this.AnnotationSelector { - keysForAnnotationSelector = append(keysForAnnotationSelector, k) - } - sort.Strings(keysForAnnotationSelector) - mapStringForAnnotationSelector := "map[string]string{" - for _, k := range keysForAnnotationSelector { - mapStringForAnnotationSelector += fmt.Sprintf("%v: %v,", k, this.AnnotationSelector[k]) - } - mapStringForAnnotationSelector += "}" - s := strings.Join([]string{`&ClusterResourceQuotaSelector{`, - `LabelSelector:` + strings.Replace(fmt.Sprintf("%v", this.LabelSelector), "LabelSelector", "v1.LabelSelector", 1) + `,`, - `AnnotationSelector:` + mapStringForAnnotationSelector + `,`, - `}`, - }, "") - return s -} -func (this *ClusterResourceQuotaSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ClusterResourceQuotaSpec{`, - `Selector:` + strings.Replace(strings.Replace(this.Selector.String(), "ClusterResourceQuotaSelector", "ClusterResourceQuotaSelector", 1), `&`, ``, 1) + `,`, - `Quota:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Quota), "ResourceQuotaSpec", "v11.ResourceQuotaSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ClusterResourceQuotaStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForNamespaces := "[]ResourceQuotaStatusByNamespace{" - for _, f := range this.Namespaces { - repeatedStringForNamespaces += strings.Replace(strings.Replace(f.String(), "ResourceQuotaStatusByNamespace", "ResourceQuotaStatusByNamespace", 1), `&`, ``, 1) + "," - } - repeatedStringForNamespaces += "}" - s := strings.Join([]string{`&ClusterResourceQuotaStatus{`, - `Total:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Total), "ResourceQuotaStatus", "v11.ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, - `Namespaces:` + repeatedStringForNamespaces + `,`, - `}`, - }, "") - return s -} -func (this *ResourceQuotaStatusByNamespace) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ResourceQuotaStatusByNamespace{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Status:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Status), "ResourceQuotaStatus", "v11.ResourceQuotaStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AppliedClusterResourceQuota) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AppliedClusterResourceQuota: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppliedClusterResourceQuota: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AppliedClusterResourceQuotaList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AppliedClusterResourceQuotaList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AppliedClusterResourceQuotaList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, AppliedClusterResourceQuota{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterResourceQuota) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterResourceQuota: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterResourceQuota: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterResourceQuotaList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterResourceQuotaList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterResourceQuotaList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, ClusterResourceQuota{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterResourceQuotaSelector) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterResourceQuotaSelector: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterResourceQuotaSelector: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LabelSelector == nil { - m.LabelSelector = &v1.LabelSelector{} - } - if err := m.LabelSelector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnnotationSelector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AnnotationSelector == nil { - m.AnnotationSelector = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AnnotationSelector[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterResourceQuotaSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterResourceQuotaSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterResourceQuotaSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Selector", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Selector.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Quota", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Quota.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ClusterResourceQuotaStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ClusterResourceQuotaStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ClusterResourceQuotaStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Total.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespaces", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespaces = append(m.Namespaces, ResourceQuotaStatusByNamespace{}) - if err := m.Namespaces[len(m.Namespaces)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ResourceQuotaStatusByNamespace) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ResourceQuotaStatusByNamespace: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ResourceQuotaStatusByNamespace: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/quota/v1/generated.proto b/vendor/github.com/openshift/api/quota/v1/generated.proto deleted file mode 100644 index 998c59473..000000000 --- a/vendor/github.com/openshift/api/quota/v1/generated.proto +++ /dev/null @@ -1,130 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.quota.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/quota/v1"; - -// AppliedClusterResourceQuota mirrors ClusterResourceQuota at a project scope, for projection -// into a project. It allows a project-admin to know which ClusterResourceQuotas are applied to -// his project and their associated usage. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message AppliedClusterResourceQuota { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec defines the desired quota - optional ClusterResourceQuotaSpec spec = 2; - - // status defines the actual enforced quota and its current usage - optional ClusterResourceQuotaStatus status = 3; -} - -// AppliedClusterResourceQuotaList is a collection of AppliedClusterResourceQuotas -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message AppliedClusterResourceQuotaList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of AppliedClusterResourceQuota - repeated AppliedClusterResourceQuota items = 2; -} - -// ClusterResourceQuota mirrors ResourceQuota at a cluster scope. This object is easily convertible to -// synthetic ResourceQuota object to allow quota evaluation re-use. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusterresourcequotas,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_00,operatorName=apiserver,operatorOrdering=01 -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -message ClusterResourceQuota { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec defines the desired quota - optional ClusterResourceQuotaSpec spec = 2; - - // status defines the actual enforced quota and its current usage - optional ClusterResourceQuotaStatus status = 3; -} - -// ClusterResourceQuotaList is a collection of ClusterResourceQuotas -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ClusterResourceQuotaList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of ClusterResourceQuotas - repeated ClusterResourceQuota items = 2; -} - -// ClusterResourceQuotaSelector is used to select projects. At least one of LabelSelector or AnnotationSelector -// must present. If only one is present, it is the only selection criteria. If both are specified, -// the project must match both restrictions. -message ClusterResourceQuotaSelector { - // LabelSelector is used to select projects by label. - // +optional - // +nullable - optional .k8s.io.apimachinery.pkg.apis.meta.v1.LabelSelector labels = 1; - - // AnnotationSelector is used to select projects by annotation. - // +optional - // +nullable - map annotations = 2; -} - -// ClusterResourceQuotaSpec defines the desired quota restrictions -message ClusterResourceQuotaSpec { - // selector is the selector used to match projects. - // It should only select active projects on the scale of dozens (though it can select - // many more less active projects). These projects will contend on object creation through - // this resource. - optional ClusterResourceQuotaSelector selector = 1; - - // quota defines the desired quota - optional .k8s.io.api.core.v1.ResourceQuotaSpec quota = 2; -} - -// ClusterResourceQuotaStatus defines the actual enforced quota and its current usage -message ClusterResourceQuotaStatus { - // total defines the actual enforced quota and its current usage across all projects - optional .k8s.io.api.core.v1.ResourceQuotaStatus total = 1; - - // namespaces slices the usage by project. This division allows for quick resolution of - // deletion reconciliation inside of a single project without requiring a recalculation - // across all projects. This can be used to pull the deltas for a given project. - // +optional - // +nullable - repeated ResourceQuotaStatusByNamespace namespaces = 2; -} - -// ResourceQuotaStatusByNamespace gives status for a particular project -message ResourceQuotaStatusByNamespace { - // namespace the project this status applies to - optional string namespace = 1; - - // status indicates how many resources have been consumed by this project - optional .k8s.io.api.core.v1.ResourceQuotaStatus status = 2; -} - diff --git a/vendor/github.com/openshift/api/quota/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/quota/v1/generated.protomessage.pb.go deleted file mode 100644 index 6158307d7..000000000 --- a/vendor/github.com/openshift/api/quota/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,22 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*AppliedClusterResourceQuota) ProtoMessage() {} - -func (*AppliedClusterResourceQuotaList) ProtoMessage() {} - -func (*ClusterResourceQuota) ProtoMessage() {} - -func (*ClusterResourceQuotaList) ProtoMessage() {} - -func (*ClusterResourceQuotaSelector) ProtoMessage() {} - -func (*ClusterResourceQuotaSpec) ProtoMessage() {} - -func (*ClusterResourceQuotaStatus) ProtoMessage() {} - -func (*ResourceQuotaStatusByNamespace) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/quota/v1/legacy.go b/vendor/github.com/openshift/api/quota/v1/legacy.go deleted file mode 100644 index 402690b5d..000000000 --- a/vendor/github.com/openshift/api/quota/v1/legacy.go +++ /dev/null @@ -1,24 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &ClusterResourceQuota{}, - &ClusterResourceQuotaList{}, - &AppliedClusterResourceQuota{}, - &AppliedClusterResourceQuotaList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/quota/v1/register.go b/vendor/github.com/openshift/api/quota/v1/register.go deleted file mode 100644 index 47c774ef2..000000000 --- a/vendor/github.com/openshift/api/quota/v1/register.go +++ /dev/null @@ -1,41 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "quota.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ClusterResourceQuota{}, - &ClusterResourceQuotaList{}, - &AppliedClusterResourceQuota{}, - &AppliedClusterResourceQuotaList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/quota/v1/types.go b/vendor/github.com/openshift/api/quota/v1/types.go deleted file mode 100644 index 9f6096214..000000000 --- a/vendor/github.com/openshift/api/quota/v1/types.go +++ /dev/null @@ -1,145 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterResourceQuota mirrors ResourceQuota at a cluster scope. This object is easily convertible to -// synthetic ResourceQuota object to allow quota evaluation re-use. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=clusterresourcequotas,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_00,operatorName=apiserver,operatorOrdering=01 -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -type ClusterResourceQuota struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - - // spec defines the desired quota - Spec ClusterResourceQuotaSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - - // status defines the actual enforced quota and its current usage - Status ClusterResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ClusterResourceQuotaSpec defines the desired quota restrictions -type ClusterResourceQuotaSpec struct { - // selector is the selector used to match projects. - // It should only select active projects on the scale of dozens (though it can select - // many more less active projects). These projects will contend on object creation through - // this resource. - Selector ClusterResourceQuotaSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"` - - // quota defines the desired quota - Quota corev1.ResourceQuotaSpec `json:"quota" protobuf:"bytes,2,opt,name=quota"` -} - -// ClusterResourceQuotaSelector is used to select projects. At least one of LabelSelector or AnnotationSelector -// must present. If only one is present, it is the only selection criteria. If both are specified, -// the project must match both restrictions. -type ClusterResourceQuotaSelector struct { - // LabelSelector is used to select projects by label. - // +optional - // +nullable - LabelSelector *metav1.LabelSelector `json:"labels" protobuf:"bytes,1,opt,name=labels"` - - // AnnotationSelector is used to select projects by annotation. - // +optional - // +nullable - AnnotationSelector map[string]string `json:"annotations" protobuf:"bytes,2,rep,name=annotations"` -} - -// ClusterResourceQuotaStatus defines the actual enforced quota and its current usage -type ClusterResourceQuotaStatus struct { - // total defines the actual enforced quota and its current usage across all projects - Total corev1.ResourceQuotaStatus `json:"total" protobuf:"bytes,1,opt,name=total"` - - // namespaces slices the usage by project. This division allows for quick resolution of - // deletion reconciliation inside of a single project without requiring a recalculation - // across all projects. This can be used to pull the deltas for a given project. - // +optional - // +nullable - Namespaces ResourceQuotasStatusByNamespace `json:"namespaces" protobuf:"bytes,2,rep,name=namespaces"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ClusterResourceQuotaList is a collection of ClusterResourceQuotas -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ClusterResourceQuotaList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of ClusterResourceQuotas - Items []ClusterResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ResourceQuotasStatusByNamespace bundles multiple ResourceQuotaStatusByNamespace -type ResourceQuotasStatusByNamespace []ResourceQuotaStatusByNamespace - -// ResourceQuotaStatusByNamespace gives status for a particular project -type ResourceQuotaStatusByNamespace struct { - // namespace the project this status applies to - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - - // status indicates how many resources have been consumed by this project - Status corev1.ResourceQuotaStatus `json:"status" protobuf:"bytes,2,opt,name=status"` -} - -// +genclient -// +genclient:onlyVerbs=get,list -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AppliedClusterResourceQuota mirrors ClusterResourceQuota at a project scope, for projection -// into a project. It allows a project-admin to know which ClusterResourceQuotas are applied to -// his project and their associated usage. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AppliedClusterResourceQuota struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - - // spec defines the desired quota - Spec ClusterResourceQuotaSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - - // status defines the actual enforced quota and its current usage - Status ClusterResourceQuotaStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// AppliedClusterResourceQuotaList is a collection of AppliedClusterResourceQuotas -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type AppliedClusterResourceQuotaList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of AppliedClusterResourceQuota - Items []AppliedClusterResourceQuota `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/quota/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/quota/v1/zz_generated.deepcopy.go deleted file mode 100644 index 3ef29ce03..000000000 --- a/vendor/github.com/openshift/api/quota/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,242 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AppliedClusterResourceQuota) DeepCopyInto(out *AppliedClusterResourceQuota) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedClusterResourceQuota. -func (in *AppliedClusterResourceQuota) DeepCopy() *AppliedClusterResourceQuota { - if in == nil { - return nil - } - out := new(AppliedClusterResourceQuota) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AppliedClusterResourceQuota) 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 *AppliedClusterResourceQuotaList) DeepCopyInto(out *AppliedClusterResourceQuotaList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]AppliedClusterResourceQuota, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AppliedClusterResourceQuotaList. -func (in *AppliedClusterResourceQuotaList) DeepCopy() *AppliedClusterResourceQuotaList { - if in == nil { - return nil - } - out := new(AppliedClusterResourceQuotaList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AppliedClusterResourceQuotaList) 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 *ClusterResourceQuota) DeepCopyInto(out *ClusterResourceQuota) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuota. -func (in *ClusterResourceQuota) DeepCopy() *ClusterResourceQuota { - if in == nil { - return nil - } - out := new(ClusterResourceQuota) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterResourceQuota) 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 *ClusterResourceQuotaList) DeepCopyInto(out *ClusterResourceQuotaList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ClusterResourceQuota, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaList. -func (in *ClusterResourceQuotaList) DeepCopy() *ClusterResourceQuotaList { - if in == nil { - return nil - } - out := new(ClusterResourceQuotaList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterResourceQuotaList) 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 *ClusterResourceQuotaSelector) DeepCopyInto(out *ClusterResourceQuotaSelector) { - *out = *in - if in.LabelSelector != nil { - in, out := &in.LabelSelector, &out.LabelSelector - *out = new(metav1.LabelSelector) - (*in).DeepCopyInto(*out) - } - if in.AnnotationSelector != nil { - in, out := &in.AnnotationSelector, &out.AnnotationSelector - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaSelector. -func (in *ClusterResourceQuotaSelector) DeepCopy() *ClusterResourceQuotaSelector { - if in == nil { - return nil - } - out := new(ClusterResourceQuotaSelector) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterResourceQuotaSpec) DeepCopyInto(out *ClusterResourceQuotaSpec) { - *out = *in - in.Selector.DeepCopyInto(&out.Selector) - in.Quota.DeepCopyInto(&out.Quota) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaSpec. -func (in *ClusterResourceQuotaSpec) DeepCopy() *ClusterResourceQuotaSpec { - if in == nil { - return nil - } - out := new(ClusterResourceQuotaSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterResourceQuotaStatus) DeepCopyInto(out *ClusterResourceQuotaStatus) { - *out = *in - in.Total.DeepCopyInto(&out.Total) - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make(ResourceQuotasStatusByNamespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterResourceQuotaStatus. -func (in *ClusterResourceQuotaStatus) DeepCopy() *ClusterResourceQuotaStatus { - if in == nil { - return nil - } - out := new(ClusterResourceQuotaStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaStatusByNamespace) DeepCopyInto(out *ResourceQuotaStatusByNamespace) { - *out = *in - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaStatusByNamespace. -func (in *ResourceQuotaStatusByNamespace) DeepCopy() *ResourceQuotaStatusByNamespace { - if in == nil { - return nil - } - out := new(ResourceQuotaStatusByNamespace) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ResourceQuotasStatusByNamespace) DeepCopyInto(out *ResourceQuotasStatusByNamespace) { - { - in := &in - *out = make(ResourceQuotasStatusByNamespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotasStatusByNamespace. -func (in ResourceQuotasStatusByNamespace) DeepCopy() ResourceQuotasStatusByNamespace { - if in == nil { - return nil - } - out := new(ResourceQuotasStatusByNamespace) - in.DeepCopyInto(out) - return *out -} diff --git a/vendor/github.com/openshift/api/quota/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/quota/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 1a56a512d..000000000 --- a/vendor/github.com/openshift/api/quota/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,22 +0,0 @@ -clusterresourcequotas.quota.openshift.io: - Annotations: - release.openshift.io/bootstrap-required: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/470 - CRDName: clusterresourcequotas.quota.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: apiserver - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_00" - GroupName: quota.openshift.io - HasStatus: true - KindName: ClusterResourceQuota - Labels: {} - PluralName: clusterresourcequotas - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/quota/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/quota/v1/zz_generated.model_name.go deleted file mode 100644 index 537360b60..000000000 --- a/vendor/github.com/openshift/api/quota/v1/zz_generated.model_name.go +++ /dev/null @@ -1,46 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AppliedClusterResourceQuota) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.AppliedClusterResourceQuota" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AppliedClusterResourceQuotaList) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.AppliedClusterResourceQuotaList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterResourceQuota) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ClusterResourceQuota" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterResourceQuotaList) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ClusterResourceQuotaList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterResourceQuotaSelector) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ClusterResourceQuotaSelector" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterResourceQuotaSpec) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ClusterResourceQuotaSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ClusterResourceQuotaStatus) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ClusterResourceQuotaStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ResourceQuotaStatusByNamespace) OpenAPIModelName() string { - return "com.github.openshift.api.quota.v1.ResourceQuotaStatusByNamespace" -} diff --git a/vendor/github.com/openshift/api/quota/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/quota/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 1bb84b817..000000000 --- a/vendor/github.com/openshift/api/quota/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,96 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AppliedClusterResourceQuota = map[string]string{ - "": "AppliedClusterResourceQuota mirrors ClusterResourceQuota at a project scope, for projection into a project. It allows a project-admin to know which ClusterResourceQuotas are applied to his project and their associated usage.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the desired quota", - "status": "status defines the actual enforced quota and its current usage", -} - -func (AppliedClusterResourceQuota) SwaggerDoc() map[string]string { - return map_AppliedClusterResourceQuota -} - -var map_AppliedClusterResourceQuotaList = map[string]string{ - "": "AppliedClusterResourceQuotaList is a collection of AppliedClusterResourceQuotas\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of AppliedClusterResourceQuota", -} - -func (AppliedClusterResourceQuotaList) SwaggerDoc() map[string]string { - return map_AppliedClusterResourceQuotaList -} - -var map_ClusterResourceQuota = map[string]string{ - "": "ClusterResourceQuota mirrors ResourceQuota at a cluster scope. This object is easily convertible to synthetic ResourceQuota object to allow quota evaluation re-use.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines the desired quota", - "status": "status defines the actual enforced quota and its current usage", -} - -func (ClusterResourceQuota) SwaggerDoc() map[string]string { - return map_ClusterResourceQuota -} - -var map_ClusterResourceQuotaList = map[string]string{ - "": "ClusterResourceQuotaList is a collection of ClusterResourceQuotas\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of ClusterResourceQuotas", -} - -func (ClusterResourceQuotaList) SwaggerDoc() map[string]string { - return map_ClusterResourceQuotaList -} - -var map_ClusterResourceQuotaSelector = map[string]string{ - "": "ClusterResourceQuotaSelector is used to select projects. At least one of LabelSelector or AnnotationSelector must present. If only one is present, it is the only selection criteria. If both are specified, the project must match both restrictions.", - "labels": "LabelSelector is used to select projects by label.", - "annotations": "AnnotationSelector is used to select projects by annotation.", -} - -func (ClusterResourceQuotaSelector) SwaggerDoc() map[string]string { - return map_ClusterResourceQuotaSelector -} - -var map_ClusterResourceQuotaSpec = map[string]string{ - "": "ClusterResourceQuotaSpec defines the desired quota restrictions", - "selector": "selector is the selector used to match projects. It should only select active projects on the scale of dozens (though it can select many more less active projects). These projects will contend on object creation through this resource.", - "quota": "quota defines the desired quota", -} - -func (ClusterResourceQuotaSpec) SwaggerDoc() map[string]string { - return map_ClusterResourceQuotaSpec -} - -var map_ClusterResourceQuotaStatus = map[string]string{ - "": "ClusterResourceQuotaStatus defines the actual enforced quota and its current usage", - "total": "total defines the actual enforced quota and its current usage across all projects", - "namespaces": "namespaces slices the usage by project. This division allows for quick resolution of deletion reconciliation inside of a single project without requiring a recalculation across all projects. This can be used to pull the deltas for a given project.", -} - -func (ClusterResourceQuotaStatus) SwaggerDoc() map[string]string { - return map_ClusterResourceQuotaStatus -} - -var map_ResourceQuotaStatusByNamespace = map[string]string{ - "": "ResourceQuotaStatusByNamespace gives status for a particular project", - "namespace": "namespace the project this status applies to", - "status": "status indicates how many resources have been consumed by this project", -} - -func (ResourceQuotaStatusByNamespace) SwaggerDoc() map[string]string { - return map_ResourceQuotaStatusByNamespace -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/route/.codegen.yaml b/vendor/github.com/openshift/api/route/.codegen.yaml deleted file mode 100644 index b003a5d6c..000000000 --- a/vendor/github.com/openshift/api/route/.codegen.yaml +++ /dev/null @@ -1,5 +0,0 @@ -schemapatch: -swaggerdocs: - commentPolicy: Warn -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/route/OWNERS b/vendor/github.com/openshift/api/route/OWNERS deleted file mode 100644 index 74038975d..000000000 --- a/vendor/github.com/openshift/api/route/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: - - ironcladlou - - knobunc - - pravisankar - - Miciah diff --git a/vendor/github.com/openshift/api/route/install.go b/vendor/github.com/openshift/api/route/install.go deleted file mode 100644 index a08536283..000000000 --- a/vendor/github.com/openshift/api/route/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package route - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - routev1 "github.com/openshift/api/route/v1" -) - -const ( - GroupName = "route.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(routev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/route/v1/Makefile b/vendor/github.com/openshift/api/route/v1/Makefile deleted file mode 100644 index 0e6057620..000000000 --- a/vendor/github.com/openshift/api/route/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="route.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/route/v1/doc.go b/vendor/github.com/openshift/api/route/v1/doc.go deleted file mode 100644 index 1fb4d95d4..000000000 --- a/vendor/github.com/openshift/api/route/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/route/apis/route -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.route.v1 - -// +groupName=route.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/route/v1/generated.pb.go b/vendor/github.com/openshift/api/route/v1/generated.pb.go deleted file mode 100644 index 31367ac7e..000000000 --- a/vendor/github.com/openshift/api/route/v1/generated.pb.go +++ /dev/null @@ -1,3730 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/route/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *LocalObjectReference) Reset() { *m = LocalObjectReference{} } - -func (m *Route) Reset() { *m = Route{} } - -func (m *RouteHTTPHeader) Reset() { *m = RouteHTTPHeader{} } - -func (m *RouteHTTPHeaderActionUnion) Reset() { *m = RouteHTTPHeaderActionUnion{} } - -func (m *RouteHTTPHeaderActions) Reset() { *m = RouteHTTPHeaderActions{} } - -func (m *RouteHTTPHeaders) Reset() { *m = RouteHTTPHeaders{} } - -func (m *RouteIngress) Reset() { *m = RouteIngress{} } - -func (m *RouteIngressCondition) Reset() { *m = RouteIngressCondition{} } - -func (m *RouteList) Reset() { *m = RouteList{} } - -func (m *RoutePort) Reset() { *m = RoutePort{} } - -func (m *RouteSetHTTPHeader) Reset() { *m = RouteSetHTTPHeader{} } - -func (m *RouteSpec) Reset() { *m = RouteSpec{} } - -func (m *RouteStatus) Reset() { *m = RouteStatus{} } - -func (m *RouteTargetReference) Reset() { *m = RouteTargetReference{} } - -func (m *RouterShard) Reset() { *m = RouterShard{} } - -func (m *TLSConfig) Reset() { *m = TLSConfig{} } - -func (m *LocalObjectReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *LocalObjectReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *LocalObjectReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Route) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Route) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Route) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteHTTPHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteHTTPHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteHTTPHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Action.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteHTTPHeaderActionUnion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteHTTPHeaderActionUnion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteHTTPHeaderActionUnion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Set != nil { - { - size, err := m.Set.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteHTTPHeaderActions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteHTTPHeaderActions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteHTTPHeaderActions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Request) > 0 { - for iNdEx := len(m.Request) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Request[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Response) > 0 { - for iNdEx := len(m.Response) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Response[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RouteHTTPHeaders) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteHTTPHeaders) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteHTTPHeaders) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Actions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteIngress) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteIngress) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteIngress) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.RouterCanonicalHostname) - copy(dAtA[i:], m.RouterCanonicalHostname) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RouterCanonicalHostname))) - i-- - dAtA[i] = 0x2a - i -= len(m.WildcardPolicy) - copy(dAtA[i:], m.WildcardPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.WildcardPolicy))) - i-- - dAtA[i] = 0x22 - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.RouterName) - copy(dAtA[i:], m.RouterName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RouterName))) - i-- - dAtA[i] = 0x12 - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteIngressCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteIngressCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteIngressCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LastTransitionTime != nil { - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x22 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RoutePort) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RoutePort) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RoutePort) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.TargetPort.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteSetHTTPHeader) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteSetHTTPHeader) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteSetHTTPHeader) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.HTTPHeaders != nil { - { - size, err := m.HTTPHeaders.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - i -= len(m.Subdomain) - copy(dAtA[i:], m.Subdomain) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Subdomain))) - i-- - dAtA[i] = 0x42 - i -= len(m.WildcardPolicy) - copy(dAtA[i:], m.WildcardPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.WildcardPolicy))) - i-- - dAtA[i] = 0x3a - if m.TLS != nil { - { - size, err := m.TLS.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Port != nil { - { - size, err := m.Port.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if len(m.AlternateBackends) > 0 { - for iNdEx := len(m.AlternateBackends) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AlternateBackends[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - { - size, err := m.To.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x12 - i -= len(m.Host) - copy(dAtA[i:], m.Host) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Host))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouteStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ingress) > 0 { - for iNdEx := len(m.Ingress) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ingress[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *RouteTargetReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouteTargetReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouteTargetReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Weight != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Weight)) - i-- - dAtA[i] = 0x18 - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RouterShard) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RouterShard) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RouterShard) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.DNSSuffix) - copy(dAtA[i:], m.DNSSuffix) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DNSSuffix))) - i-- - dAtA[i] = 0x12 - i -= len(m.ShardName) - copy(dAtA[i:], m.ShardName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShardName))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TLSConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TLSConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TLSConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ExternalCertificate != nil { - { - size, err := m.ExternalCertificate.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - i -= len(m.InsecureEdgeTerminationPolicy) - copy(dAtA[i:], m.InsecureEdgeTerminationPolicy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.InsecureEdgeTerminationPolicy))) - i-- - dAtA[i] = 0x32 - i -= len(m.DestinationCACertificate) - copy(dAtA[i:], m.DestinationCACertificate) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DestinationCACertificate))) - i-- - dAtA[i] = 0x2a - i -= len(m.CACertificate) - copy(dAtA[i:], m.CACertificate) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CACertificate))) - i-- - dAtA[i] = 0x22 - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x1a - i -= len(m.Certificate) - copy(dAtA[i:], m.Certificate) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Certificate))) - i-- - dAtA[i] = 0x12 - i -= len(m.Termination) - copy(dAtA[i:], m.Termination) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Termination))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *LocalObjectReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *Route) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteHTTPHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Action.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteHTTPHeaderActionUnion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.Set != nil { - l = m.Set.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RouteHTTPHeaderActions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Response) > 0 { - for _, e := range m.Response { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Request) > 0 { - for _, e := range m.Request { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RouteHTTPHeaders) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Actions.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteIngress) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.RouterName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.WildcardPolicy) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.RouterCanonicalHostname) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteIngressCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if m.LastTransitionTime != nil { - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RouteList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RoutePort) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TargetPort.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteSetHTTPHeader) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RouteSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Host) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Path) - n += 1 + l + sovGenerated(uint64(l)) - l = m.To.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.AlternateBackends) > 0 { - for _, e := range m.AlternateBackends { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Port != nil { - l = m.Port.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.TLS != nil { - l = m.TLS.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.WildcardPolicy) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Subdomain) - n += 1 + l + sovGenerated(uint64(l)) - if m.HTTPHeaders != nil { - l = m.HTTPHeaders.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RouteStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Ingress) > 0 { - for _, e := range m.Ingress { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RouteTargetReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Weight != nil { - n += 1 + sovGenerated(uint64(*m.Weight)) - } - return n -} - -func (m *RouterShard) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ShardName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DNSSuffix) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TLSConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Termination) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Certificate) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Key) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.CACertificate) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DestinationCACertificate) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.InsecureEdgeTerminationPolicy) - n += 1 + l + sovGenerated(uint64(l)) - if m.ExternalCertificate != nil { - l = m.ExternalCertificate.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *LocalObjectReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&LocalObjectReference{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *Route) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Route{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "RouteSpec", "RouteSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "RouteStatus", "RouteStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteHTTPHeader) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteHTTPHeader{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Action:` + strings.Replace(strings.Replace(this.Action.String(), "RouteHTTPHeaderActionUnion", "RouteHTTPHeaderActionUnion", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteHTTPHeaderActionUnion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteHTTPHeaderActionUnion{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Set:` + strings.Replace(this.Set.String(), "RouteSetHTTPHeader", "RouteSetHTTPHeader", 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteHTTPHeaderActions) String() string { - if this == nil { - return "nil" - } - repeatedStringForResponse := "[]RouteHTTPHeader{" - for _, f := range this.Response { - repeatedStringForResponse += strings.Replace(strings.Replace(f.String(), "RouteHTTPHeader", "RouteHTTPHeader", 1), `&`, ``, 1) + "," - } - repeatedStringForResponse += "}" - repeatedStringForRequest := "[]RouteHTTPHeader{" - for _, f := range this.Request { - repeatedStringForRequest += strings.Replace(strings.Replace(f.String(), "RouteHTTPHeader", "RouteHTTPHeader", 1), `&`, ``, 1) + "," - } - repeatedStringForRequest += "}" - s := strings.Join([]string{`&RouteHTTPHeaderActions{`, - `Response:` + repeatedStringForResponse + `,`, - `Request:` + repeatedStringForRequest + `,`, - `}`, - }, "") - return s -} -func (this *RouteHTTPHeaders) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteHTTPHeaders{`, - `Actions:` + strings.Replace(strings.Replace(this.Actions.String(), "RouteHTTPHeaderActions", "RouteHTTPHeaderActions", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteIngress) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]RouteIngressCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "RouteIngressCondition", "RouteIngressCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&RouteIngress{`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `RouterName:` + fmt.Sprintf("%v", this.RouterName) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `WildcardPolicy:` + fmt.Sprintf("%v", this.WildcardPolicy) + `,`, - `RouterCanonicalHostname:` + fmt.Sprintf("%v", this.RouterCanonicalHostname) + `,`, - `}`, - }, "") - return s -} -func (this *RouteIngressCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteIngressCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `LastTransitionTime:` + strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Route{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Route", "Route", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RouteList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *RoutePort) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RoutePort{`, - `TargetPort:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TargetPort), "IntOrString", "intstr.IntOrString", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteSetHTTPHeader) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteSetHTTPHeader{`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `}`, - }, "") - return s -} -func (this *RouteSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForAlternateBackends := "[]RouteTargetReference{" - for _, f := range this.AlternateBackends { - repeatedStringForAlternateBackends += strings.Replace(strings.Replace(f.String(), "RouteTargetReference", "RouteTargetReference", 1), `&`, ``, 1) + "," - } - repeatedStringForAlternateBackends += "}" - s := strings.Join([]string{`&RouteSpec{`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `To:` + strings.Replace(strings.Replace(this.To.String(), "RouteTargetReference", "RouteTargetReference", 1), `&`, ``, 1) + `,`, - `AlternateBackends:` + repeatedStringForAlternateBackends + `,`, - `Port:` + strings.Replace(this.Port.String(), "RoutePort", "RoutePort", 1) + `,`, - `TLS:` + strings.Replace(this.TLS.String(), "TLSConfig", "TLSConfig", 1) + `,`, - `WildcardPolicy:` + fmt.Sprintf("%v", this.WildcardPolicy) + `,`, - `Subdomain:` + fmt.Sprintf("%v", this.Subdomain) + `,`, - `HTTPHeaders:` + strings.Replace(this.HTTPHeaders.String(), "RouteHTTPHeaders", "RouteHTTPHeaders", 1) + `,`, - `}`, - }, "") - return s -} -func (this *RouteStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForIngress := "[]RouteIngress{" - for _, f := range this.Ingress { - repeatedStringForIngress += strings.Replace(strings.Replace(f.String(), "RouteIngress", "RouteIngress", 1), `&`, ``, 1) + "," - } - repeatedStringForIngress += "}" - s := strings.Join([]string{`&RouteStatus{`, - `Ingress:` + repeatedStringForIngress + `,`, - `}`, - }, "") - return s -} -func (this *RouteTargetReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouteTargetReference{`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Weight:` + valueToStringGenerated(this.Weight) + `,`, - `}`, - }, "") - return s -} -func (this *RouterShard) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RouterShard{`, - `ShardName:` + fmt.Sprintf("%v", this.ShardName) + `,`, - `DNSSuffix:` + fmt.Sprintf("%v", this.DNSSuffix) + `,`, - `}`, - }, "") - return s -} -func (this *TLSConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TLSConfig{`, - `Termination:` + fmt.Sprintf("%v", this.Termination) + `,`, - `Certificate:` + fmt.Sprintf("%v", this.Certificate) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `CACertificate:` + fmt.Sprintf("%v", this.CACertificate) + `,`, - `DestinationCACertificate:` + fmt.Sprintf("%v", this.DestinationCACertificate) + `,`, - `InsecureEdgeTerminationPolicy:` + fmt.Sprintf("%v", this.InsecureEdgeTerminationPolicy) + `,`, - `ExternalCertificate:` + strings.Replace(this.ExternalCertificate.String(), "LocalObjectReference", "LocalObjectReference", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *LocalObjectReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: LocalObjectReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: LocalObjectReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Route) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Route: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Route: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteHTTPHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteHTTPHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteHTTPHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Action", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Action.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteHTTPHeaderActionUnion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteHTTPHeaderActionUnion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteHTTPHeaderActionUnion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = RouteHTTPHeaderActionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Set == nil { - m.Set = &RouteSetHTTPHeader{} - } - if err := m.Set.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteHTTPHeaderActions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteHTTPHeaderActions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteHTTPHeaderActions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Response = append(m.Response, RouteHTTPHeader{}) - if err := m.Response[len(m.Response)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Request = append(m.Request, RouteHTTPHeader{}) - if err := m.Request[len(m.Request)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteHTTPHeaders) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteHTTPHeaders: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteHTTPHeaders: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Actions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Actions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteIngress) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteIngress: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteIngress: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouterName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RouterName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, RouteIngressCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WildcardPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WildcardPolicy = WildcardPolicyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RouterCanonicalHostname", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RouterCanonicalHostname = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteIngressCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteIngressCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteIngressCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = RouteIngressConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.LastTransitionTime == nil { - m.LastTransitionTime = &v1.Time{} - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Route{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RoutePort) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RoutePort: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RoutePort: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TargetPort", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TargetPort.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteSetHTTPHeader) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteSetHTTPHeader: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteSetHTTPHeader: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Host", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Host = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field To", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.To.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AlternateBackends", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AlternateBackends = append(m.AlternateBackends, RouteTargetReference{}) - if err := m.AlternateBackends[len(m.AlternateBackends)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Port == nil { - m.Port = &RoutePort{} - } - if err := m.Port.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TLS", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.TLS == nil { - m.TLS = &TLSConfig{} - } - if err := m.TLS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WildcardPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WildcardPolicy = WildcardPolicyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subdomain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subdomain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HTTPHeaders", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.HTTPHeaders == nil { - m.HTTPHeaders = &RouteHTTPHeaders{} - } - if err := m.HTTPHeaders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ingress", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ingress = append(m.Ingress, RouteIngress{}) - if err := m.Ingress[len(m.Ingress)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouteTargetReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouteTargetReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouteTargetReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Weight = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RouterShard) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RouterShard: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RouterShard: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShardName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShardName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DNSSuffix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DNSSuffix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TLSConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TLSConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TLSConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Termination", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Termination = TLSTerminationType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Certificate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Certificate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CACertificate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CACertificate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationCACertificate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationCACertificate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InsecureEdgeTerminationPolicy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.InsecureEdgeTerminationPolicy = InsecureEdgeTerminationPolicyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalCertificate", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExternalCertificate == nil { - m.ExternalCertificate = &LocalObjectReference{} - } - if err := m.ExternalCertificate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/route/v1/generated.proto b/vendor/github.com/openshift/api/route/v1/generated.proto deleted file mode 100644 index 85018b16b..000000000 --- a/vendor/github.com/openshift/api/route/v1/generated.proto +++ /dev/null @@ -1,471 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.route.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; -import "k8s.io/apimachinery/pkg/util/intstr/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/route/v1"; - -// LocalObjectReference contains enough information to let you locate the -// referenced object inside the same namespace. -// +structType=atomic -message LocalObjectReference { - // name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - optional string name = 1; -} - -// A route allows developers to expose services through an HTTP(S) aware load balancing and proxy -// layer via a public DNS entry. The route may further specify TLS options and a certificate, or -// specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An -// administrator typically configures their router to be visible outside the cluster firewall, and -// may also add additional security, caching, or traffic controls on the service content. Routers -// usually talk directly to the service endpoints. -// -// Once a route is created, the `host` field may not be changed. Generally, routers use the oldest -// route with a given host when resolving conflicts. -// -// Routers are subject to additional customization and may support additional controls via the -// annotations field. -// -// Because administrators may configure multiple routers, the route status field is used to -// return information to clients about the names and states of the route under each router. -// If a client chooses a duplicate name, for instance, the route status conditions are used -// to indicate the route cannot be chosen. -// -// To enable HTTP/2 ALPN on a route it requires a custom -// (non-wildcard) certificate. This prevents connection coalescing by -// clients, notably web browsers. We do not support HTTP/2 ALPN on -// routes that use the default certificate because of the risk of -// connection re-use/coalescing. Routes that do not have their own -// custom certificate will not be HTTP/2 ALPN-enabled on either the -// frontend or the backend. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Route { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec is the desired state of the route - // +kubebuilder:validation:XValidation:rule="!has(self.tls) || self.tls.termination != 'passthrough' || !has(self.httpHeaders)",message="header actions are not permitted when tls termination is passthrough." - optional RouteSpec spec = 2; - - // status is the current state of the route - // +optional - optional RouteStatus status = 3; -} - -// RouteHTTPHeader specifies configuration for setting or deleting an HTTP header. -message RouteHTTPHeader { - // name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - // The name must consist only of alphanumeric and the following special characters, "-!#$%&'*+.^_`". - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. - // It must be no more than 255 characters in length. - // Header name must be unique. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'strict-transport-security'",message="strict-transport-security header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'proxy'",message="proxy header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'cookie'",message="cookie header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'set-cookie'",message="set-cookie header may not be modified via header actions" - optional string name = 1; - - // action specifies actions to perform on headers, such as setting or deleting headers. - // +required - optional RouteHTTPHeaderActionUnion action = 2; -} - -// RouteHTTPHeaderActionUnion specifies an action to take on an HTTP header. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Set' ? has(self.set) : !has(self.set)",message="set is required when type is Set, and forbidden otherwise" -// +union -message RouteHTTPHeaderActionUnion { - // type defines the type of the action to be applied on the header. - // Possible values are Set or Delete. - // Set allows you to set HTTP request and response headers. - // Delete allows you to delete HTTP request and response headers. - // +unionDiscriminator - // +kubebuilder:validation:Enum:=Set;Delete - // +required - optional string type = 1; - - // set defines the HTTP header that should be set: added if it doesn't exist or replaced if it does. - // This field is required when type is Set and forbidden otherwise. - // +optional - // +unionMember - optional RouteSetHTTPHeader set = 2; -} - -// RouteHTTPHeaderActions defines configuration for actions on HTTP request and response headers. -message RouteHTTPHeaderActions { - // response is a list of HTTP response headers to modify. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions defined here will modify the response headers of all requests made through a route. - // These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. - // Route actions will be executed before IngressController actions for response headers. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 response header actions may be configured. - // You can use this field to specify HTTP response headers that should be set or deleted - // when forwarding responses from your application to the client. - // Sample fetchers allowed are "res.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[res.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // Note: This field cannot be used if your route uses TLS passthrough. - // + --- - // + Note: Any change to regex mentioned below must be reflected in the CRD validation of route in https://github.com/openshift/library-go/blob/master/pkg/route/validation/validation.go and vice-versa. - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:res\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are res.hdr, ssl_c_der. Converters allowed are lower, base64." - repeated RouteHTTPHeader response = 1; - - // request is a list of HTTP request headers to modify. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions defined here will modify the request headers of all requests made through a route. - // These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Route actions will be executed after IngressController actions for request headers. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 request header actions may be configured. - // You can use this field to specify HTTP request headers that should be set or deleted - // when forwarding connections from the client to your application. - // Sample fetchers allowed are "req.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[req.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // Any request header configuration applied directly via a Route resource using this API - // will override header configuration for a header of the same name applied via - // spec.httpHeaders.actions on the IngressController or route annotation. - // Note: This field cannot be used if your route uses TLS passthrough. - // + --- - // + Note: Any change to regex mentioned below must be reflected in the CRD validation of route in https://github.com/openshift/library-go/blob/master/pkg/route/validation/validation.go and vice-versa. - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:req\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are req.hdr, ssl_c_der. Converters allowed are lower, base64." - repeated RouteHTTPHeader request = 2; -} - -// RouteHTTPHeaders defines policy for HTTP headers. -message RouteHTTPHeaders { - // actions specifies options for modifying headers and their values. - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be modified for TLS passthrough - // connections. - // Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. - // `Strict-Transport-Security` may only be configured using the "haproxy.router.openshift.io/hsts_header" - // route annotation, and only in accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. - // In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after - // the actions specified in the IngressController's spec.httpHeaders.actions field. - // In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be - // executed after the actions specified in the Route's spec.httpHeaders.actions field. - // The headers set via this API will not appear in access logs. - // Any actions defined here are applied after any actions related to the following other fields: - // cache-control, spec.clientTLS, - // spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, - // and spec.httpHeaders.headerNameCaseAdjustments. - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. Please refer to the documentation - // for that API field for more details. - // +optional - optional RouteHTTPHeaderActions actions = 1; -} - -// RouteIngress holds information about the places where a route is exposed. -message RouteIngress { - // host is the host string under which the route is exposed; this value is required - optional string host = 1; - - // Name is a name chosen by the router to identify itself; this value is required - optional string routerName = 2; - - // conditions is the state of the route, may be empty. - // +listType=map - // +listMapKey=type - repeated RouteIngressCondition conditions = 3; - - // Wildcard policy is the wildcard policy that was allowed where this route is exposed. - optional string wildcardPolicy = 4; - - // CanonicalHostname is the external host name for the router that can be used as a CNAME - // for the host requested for this route. This value is optional and may not be set in all cases. - optional string routerCanonicalHostname = 5; -} - -// RouteIngressCondition contains details for the current condition of this route on a particular -// router. -message RouteIngressCondition { - // type is the type of the condition. - // Currently only Admitted or UnservableInFutureVersions. - optional string type = 1; - - // status is the status of the condition. - // Can be True, False, Unknown. - optional string status = 2; - - // (brief) reason for the condition's last transition, and is usually a machine and human - // readable constant - optional string reason = 3; - - // Human readable message indicating details about last transition. - optional string message = 4; - - // RFC 3339 date and time when this condition last transitioned - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 5; -} - -// RouteList is a collection of Routes. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RouteList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of routes - repeated Route items = 2; -} - -// RoutePort defines a port mapping from a router to an endpoint in the service endpoints. -message RoutePort { - // The target port on pods selected by the service this route points to. - // If this is a string, it will be looked up as a named port in the target - // endpoints port list. Required - optional .k8s.io.apimachinery.pkg.util.intstr.IntOrString targetPort = 1; -} - -// RouteSetHTTPHeader specifies what value needs to be set on an HTTP header. -message RouteSetHTTPHeader { - // value specifies a header value. - // Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in - // http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and - // otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. - // The value of this field must be no more than 16384 characters in length. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. - // + --- - // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. - // + See . - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=16384 - optional string value = 1; -} - -// RouteSpec describes the hostname or path the route exposes, any security information, -// and one to four backends (services) the route points to. Requests are distributed -// among the backends depending on the weights assigned to each backend. When using -// roundrobin scheduling the portion of requests that go to each backend is the backend -// weight divided by the sum of all of the backend weights. When the backend has more than -// one endpoint the requests that end up on the backend are roundrobin distributed among -// the endpoints. Weights are between 0 and 256 with default 100. Weight 0 causes no requests -// to the backend. If all weights are zero the route will be considered to have no backends -// and return a standard 503 response. -// -// The `tls` field is optional and allows specific certificates or behavior for the -// route. Routers typically configure a default certificate on a wildcard domain to -// terminate routes without explicit certificates, but custom hostnames usually must -// choose passthrough (send traffic directly to the backend via the TLS Server-Name- -// Indication field) or provide a certificate. -message RouteSpec { - // host is an alias/DNS that points to the service. Optional. - // If not specified a route name will typically be automatically - // chosen. - // Must follow DNS952 subdomain conventions. - // - // +optional - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - optional string host = 1; - - // subdomain is a DNS subdomain that is requested within the ingress controller's - // domain (as a subdomain). If host is set this field is ignored. An ingress - // controller may choose to ignore this suggested name, in which case the controller - // will report the assigned name in the status.ingress array or refuse to admit the - // route. If this value is set and the server does not support this field host will - // be populated automatically. Otherwise host is left empty. The field may have - // multiple parts separated by a dot, but not all ingress controllers may honor - // the request. This field may not be changed after creation except by a user with - // the update routes/custom-host permission. - // - // Example: subdomain `frontend` automatically receives the router subdomain - // `apps.mycluster.com` to have a full hostname `frontend.apps.mycluster.com`. - // - // +optional - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - optional string subdomain = 8; - - // path that the router watches for, to route traffic for to the service. Optional - // - // +optional - // +kubebuilder:validation:Pattern=`^/` - optional string path = 2; - - // to is an object the route should use as the primary backend. Only the Service kind - // is allowed, and it will be defaulted to Service. If the weight field (0-256 default 100) - // is set to zero, no traffic will be sent to this backend. - optional RouteTargetReference to = 3; - - // alternateBackends allows up to 3 additional backends to be assigned to the route. - // Only the Service kind is allowed, and it will be defaulted to Service. - // Use the weight field in RouteTargetReference object to specify relative preference. - // - // +kubebuilder:validation:MaxItems=3 - // +listType=map - // +listMapKey=name - // +listMapKey=kind - repeated RouteTargetReference alternateBackends = 4; - - // If specified, the port to be used by the router. Most routers will use all - // endpoints exposed by the service by default - set this value to instruct routers - // which port to use. - optional RoutePort port = 5; - - // The tls field provides the ability to configure certificates and termination for the route. - optional TLSConfig tls = 6; - - // Wildcard policy if any for the route. - // Currently only 'Subdomain' or 'None' is allowed. - // - // +kubebuilder:validation:Enum=None;Subdomain;"" - // +kubebuilder:default=None - optional string wildcardPolicy = 7; - - // httpHeaders defines policy for HTTP headers. - // - // +optional - optional RouteHTTPHeaders httpHeaders = 9; -} - -// RouteStatus provides relevant info about the status of a route, including which routers -// acknowledge it. -message RouteStatus { - // ingress describes the places where the route may be exposed. The list of - // ingress points may contain duplicate Host or RouterName values. Routes - // are considered live once they are `Ready` - // +listType=atomic - // +optional - repeated RouteIngress ingress = 1; -} - -// RouteTargetReference specifies the target that resolve into endpoints. Only the 'Service' -// kind is allowed. Use 'weight' field to emphasize one over others. -message RouteTargetReference { - // The kind of target that the route is referring to. Currently, only 'Service' is allowed - // - // +kubebuilder:validation:Enum=Service;"" - // +kubebuilder:default=Service - optional string kind = 1; - - // name of the service/target that is being referred to. e.g. name of the service - // - // +kubebuilder:validation:MinLength=1 - optional string name = 2; - - // weight as an integer between 0 and 256, default 100, that specifies the target's relative weight - // against other target reference objects. 0 suppresses requests to this backend. - // - // +optional - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=256 - // +kubebuilder:default=100 - optional int32 weight = 3; -} - -// RouterShard has information of a routing shard and is used to -// generate host names and routing table entries when a routing shard is -// allocated for a specific route. -// Caveat: This is WIP and will likely undergo modifications when sharding -// support is added. -message RouterShard { - // shardName uniquely identifies a router shard in the "set" of - // routers used for routing traffic to the services. - optional string shardName = 1; - - // dnsSuffix for the shard ala: shard-1.v3.openshift.com - optional string dnsSuffix = 2; -} - -// TLSConfig defines config used to secure a route and provide termination -// -// +kubebuilder:validation:XValidation:rule="has(self.termination) && has(self.insecureEdgeTerminationPolicy) ? !((self.termination=='passthrough') && (self.insecureEdgeTerminationPolicy=='Allow')) : true", message="cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteExternalCertificate,rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" -message TLSConfig { - // termination indicates the TLS termination type. - // - // * edge - TLS termination is done by the router and http is used to communicate with the backend (default) - // - // * passthrough - Traffic is sent straight to the destination without the router providing TLS termination - // - // * reencrypt - TLS termination is done by the router and https is used to communicate with the backend - // - // Note: passthrough termination is incompatible with httpHeader actions - // +kubebuilder:validation:Enum=edge;reencrypt;passthrough - optional string termination = 1; - - // certificate provides certificate contents. This should be a single serving certificate, not a certificate - // chain. Do not include a CA certificate. - optional string certificate = 2; - - // key provides key file contents - optional string key = 3; - - // caCertificate provides the cert authority certificate contents - optional string caCertificate = 4; - - // destinationCACertificate provides the contents of the ca certificate of the final destination. When using reencrypt - // termination this file should be provided in order to have routers use it for health checks on the secure connection. - // If this field is not specified, the router may provide its own destination CA and perform hostname validation using - // the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically - // verify. - optional string destinationCACertificate = 5; - - // insecureEdgeTerminationPolicy indicates the desired behavior for insecure connections to a route. While - // each router may make its own decisions on which ports to expose, this is normally port 80. - // - // If a route does not specify insecureEdgeTerminationPolicy, then the default behavior is "None". - // - // * Allow - traffic is sent to the server on the insecure port (edge/reencrypt terminations only). - // - // * None - no traffic is allowed on the insecure port (default). - // - // * Redirect - clients are redirected to the secure port. - // - // +kubebuilder:validation:Enum=Allow;None;Redirect;"" - optional string insecureEdgeTerminationPolicy = 6; - - // externalCertificate provides certificate contents as a secret reference. - // This should be a single serving certificate, not a certificate - // chain. Do not include a CA certificate. The secret referenced should - // be present in the same namespace as that of the Route. - // Forbidden when `certificate` is set. - // The router service account needs to be granted with read-only access to this secret, - // please refer to openshift docs for additional details. - // - // +openshift:enable:FeatureGate=RouteExternalCertificate - // +optional - optional LocalObjectReference externalCertificate = 7; -} - diff --git a/vendor/github.com/openshift/api/route/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/route/v1/generated.protomessage.pb.go deleted file mode 100644 index 97af0f183..000000000 --- a/vendor/github.com/openshift/api/route/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*LocalObjectReference) ProtoMessage() {} - -func (*Route) ProtoMessage() {} - -func (*RouteHTTPHeader) ProtoMessage() {} - -func (*RouteHTTPHeaderActionUnion) ProtoMessage() {} - -func (*RouteHTTPHeaderActions) ProtoMessage() {} - -func (*RouteHTTPHeaders) ProtoMessage() {} - -func (*RouteIngress) ProtoMessage() {} - -func (*RouteIngressCondition) ProtoMessage() {} - -func (*RouteList) ProtoMessage() {} - -func (*RoutePort) ProtoMessage() {} - -func (*RouteSetHTTPHeader) ProtoMessage() {} - -func (*RouteSpec) ProtoMessage() {} - -func (*RouteStatus) ProtoMessage() {} - -func (*RouteTargetReference) ProtoMessage() {} - -func (*RouterShard) ProtoMessage() {} - -func (*TLSConfig) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/route/v1/legacy.go b/vendor/github.com/openshift/api/route/v1/legacy.go deleted file mode 100644 index 498f5dd0f..000000000 --- a/vendor/github.com/openshift/api/route/v1/legacy.go +++ /dev/null @@ -1,22 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Route{}, - &RouteList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/route/v1/register.go b/vendor/github.com/openshift/api/route/v1/register.go deleted file mode 100644 index 6f99ef5c9..000000000 --- a/vendor/github.com/openshift/api/route/v1/register.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "route.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Route{}, - &RouteList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/route/v1/test-route-validation.sh b/vendor/github.com/openshift/api/route/v1/test-route-validation.sh deleted file mode 100644 index f1192d4a1..000000000 --- a/vendor/github.com/openshift/api/route/v1/test-route-validation.sh +++ /dev/null @@ -1,476 +0,0 @@ -#!/bin/bash - -# This shell script runs a series of `oc` commands to create various OpenShift -# route objects, some invalid and some valid, and verifies that the API rejects -# the invalid ones and admits the valid ones. Note that this script does not -# verify defaulting behavior and does not examine the rejection reason; it only -# checks whether the `oc create` command succeeds or fails. This script -# requires a cluster and a kubeconfig in a location where oc will find it. - -set -uo pipefail - -expect_pass() { - rc=$? - if [[ $rc != 0 ]] - then - tput setaf 1 - echo "expected success: $*, got exit code $rc" - tput sgr0 - exit 1 - fi - tput setaf 2 - echo "got expected success: $*" - tput sgr0 -} - -expect_fail() { - rc=$? - if [[ $rc = 0 ]] - then - tput setaf 1 - echo "expected failure: $*, got exit code $rc" - exit 1 - fi - tput setaf 2 - echo "got expected failure: $*" - tput sgr0 -} - -delete_route() { - oc -n openshift-ingress delete routes.route/testroute || exit 1 -} - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - path: / - tls: - termination: passthrough - to: - kind: Service - name: router-internal-default -EOF -expect_fail 'passthrough with nonempty path' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - path: / - to: - kind: Service - name: router-internal-default -EOF -expect_pass 'non-TLS with nonempty path' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - path: / - tls: - termination: edge - to: - kind: Service - name: router-internal-default -EOF -expect_pass 'edge-terminated with nonempty path' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - path: x - tls: - termination: edge - to: - kind: Service - name: router-internal-default -EOF -expect_fail 'path starting with non-slash character' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - to: - kind: Service - name: router-internal-default - wildcardPolicy: Subdomain -EOF -expect_fail 'spec.wildcardPolicy: Subdomain requires a nonempty value for spec.host' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - port: - targetPort: "" -EOF -expect_fail 'cannot have empty spec.port.targetPort' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - port: - targetPort: 0 -EOF -expect_fail 'cannot have numeric 0 value for spec.port.targetPort' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - port: - targetPort: "0" -EOF -expect_pass 'can have string "0" value for spec.port.targetPort' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - port: - targetPort: 1 -EOF -expect_pass 'can have numeric 1 value for spec.port.targetPort' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - port: - targetPort: x -EOF -expect_pass 'can have string "x" value for spec.port.targetPort' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - tls: - termination: passthrough - to: - kind: Nonsense - name: router-internal-default -EOF -expect_fail 'nonsense value for spec.to.kind' - - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - tls: - termination: passthrough - to: - kind: Service - name: "" -EOF -expect_fail 'spec.to.name cannot be empty' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - weight: -1 -EOF -expect_fail 'spec.to.weight cannot be negative' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - weight: 300 -EOF -expect_fail 'spec.to.weight cannot exceed 256' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - weight: 100 -EOF -expect_pass 'spec.to.weight has a valid value' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - alternateBackends: - - name: router-internal-default - - name: router-internal-default - - name: router-internal-default - - name: router-internal-default -EOF -expect_fail 'cannot have >3 values under spec.alternateBackends' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - alternateBackends: - - name: router-internal-default - - name: "" - - name: router-internal-default -EOF -expect_fail 'cannot have empty spec.alternateBackends[*].name' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - alternateBackends: - - name: router-internal-default - - name: router-internal-default - - name: router-internal-default -EOF -expect_pass 'valid spec.alternateBackends' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - certificate: "x" -EOF -expect_fail 'cannot have both spec.tls.termination: passthrough and nonempty spec.tls.certificate' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - key: "x" -EOF -expect_fail 'cannot have both spec.tls.termination: passthrough and nonempty spec.tls.key' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - caCertificate: "x" -EOF -expect_fail 'cannot have both spec.tls.termination: passthrough and nonempty spec.tls.caCertificate' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - destinationCACertificate: "x" -EOF -expect_fail 'cannot have both spec.tls.termination: passthrough and nonempty spec.tls.destinationCACertificate' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: edge - destinationCACertificate: "x" -EOF -expect_fail 'cannot have both spec.tls.termination: edge and nonempty spec.tls.destinationCACertificate' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: edge - insecureEdgeTerminationPolicy: nonsense -EOF -expect_fail 'cannot have nonsense value for spec.tls.insecureEdgeTerminationPolicy' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - insecureEdgeTerminationPolicy: Allow -EOF -expect_fail 'cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow' - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - insecureEdgeTerminationPolicy: Redirect -EOF -expect_pass 'spec.tls.termination: passthrough is compatible with spec.tls.insecureEdgeTerminationPolicy: Redirect' -delete_route - -oc create -f - <<'EOF' -apiVersion: route.openshift.io/v1 -kind: Route -metadata: - namespace: openshift-ingress - name: testroute -spec: - host: test.foo - to: - name: router-internal-default - tls: - termination: passthrough - insecureEdgeTerminationPolicy: None -EOF -expect_pass 'spec.tls.termination: passthrough is compatible with spec.tls.insecureEdgeTerminationPolicy: None' -delete_route diff --git a/vendor/github.com/openshift/api/route/v1/types.go b/vendor/github.com/openshift/api/route/v1/types.go deleted file mode 100644 index 35c406482..000000000 --- a/vendor/github.com/openshift/api/route/v1/types.go +++ /dev/null @@ -1,560 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/intstr" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +kubebuilder:resource:path=routes,scope=Namespaced -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/1228 -// +kubebuilder:printcolumn:name=Host,JSONPath=.status.ingress[0].host,type=string -// +kubebuilder:printcolumn:name=Admitted,JSONPath=.status.ingress[0].conditions[?(@.type=="Admitted")].status,type=string -// +kubebuilder:printcolumn:name=Service,JSONPath=.spec.to.name,type=string -// +kubebuilder:printcolumn:name=TLS,JSONPath=.spec.tls.type,type=string - -// A route allows developers to expose services through an HTTP(S) aware load balancing and proxy -// layer via a public DNS entry. The route may further specify TLS options and a certificate, or -// specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An -// administrator typically configures their router to be visible outside the cluster firewall, and -// may also add additional security, caching, or traffic controls on the service content. Routers -// usually talk directly to the service endpoints. -// -// Once a route is created, the `host` field may not be changed. Generally, routers use the oldest -// route with a given host when resolving conflicts. -// -// Routers are subject to additional customization and may support additional controls via the -// annotations field. -// -// Because administrators may configure multiple routers, the route status field is used to -// return information to clients about the names and states of the route under each router. -// If a client chooses a duplicate name, for instance, the route status conditions are used -// to indicate the route cannot be chosen. -// -// To enable HTTP/2 ALPN on a route it requires a custom -// (non-wildcard) certificate. This prevents connection coalescing by -// clients, notably web browsers. We do not support HTTP/2 ALPN on -// routes that use the default certificate because of the risk of -// connection re-use/coalescing. Routes that do not have their own -// custom certificate will not be HTTP/2 ALPN-enabled on either the -// frontend or the backend. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Route struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec is the desired state of the route - // +kubebuilder:validation:XValidation:rule="!has(self.tls) || self.tls.termination != 'passthrough' || !has(self.httpHeaders)",message="header actions are not permitted when tls termination is passthrough." - Spec RouteSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status is the current state of the route - // +optional - Status RouteStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RouteList is a collection of Routes. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RouteList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of routes - Items []Route `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// RouteSpec describes the hostname or path the route exposes, any security information, -// and one to four backends (services) the route points to. Requests are distributed -// among the backends depending on the weights assigned to each backend. When using -// roundrobin scheduling the portion of requests that go to each backend is the backend -// weight divided by the sum of all of the backend weights. When the backend has more than -// one endpoint the requests that end up on the backend are roundrobin distributed among -// the endpoints. Weights are between 0 and 256 with default 100. Weight 0 causes no requests -// to the backend. If all weights are zero the route will be considered to have no backends -// and return a standard 503 response. -// -// The `tls` field is optional and allows specific certificates or behavior for the -// route. Routers typically configure a default certificate on a wildcard domain to -// terminate routes without explicit certificates, but custom hostnames usually must -// choose passthrough (send traffic directly to the backend via the TLS Server-Name- -// Indication field) or provide a certificate. -type RouteSpec struct { - // host is an alias/DNS that points to the service. Optional. - // If not specified a route name will typically be automatically - // chosen. - // Must follow DNS952 subdomain conventions. - // - // +optional - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` - // subdomain is a DNS subdomain that is requested within the ingress controller's - // domain (as a subdomain). If host is set this field is ignored. An ingress - // controller may choose to ignore this suggested name, in which case the controller - // will report the assigned name in the status.ingress array or refuse to admit the - // route. If this value is set and the server does not support this field host will - // be populated automatically. Otherwise host is left empty. The field may have - // multiple parts separated by a dot, but not all ingress controllers may honor - // the request. This field may not be changed after creation except by a user with - // the update routes/custom-host permission. - // - // Example: subdomain `frontend` automatically receives the router subdomain - // `apps.mycluster.com` to have a full hostname `frontend.apps.mycluster.com`. - // - // +optional - // +kubebuilder:validation:MaxLength=253 - // +kubebuilder:validation:Pattern=`^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$` - Subdomain string `json:"subdomain,omitempty" protobuf:"bytes,8,opt,name=subdomain"` - - // path that the router watches for, to route traffic for to the service. Optional - // - // +optional - // +kubebuilder:validation:Pattern=`^/` - Path string `json:"path,omitempty" protobuf:"bytes,2,opt,name=path"` - - // to is an object the route should use as the primary backend. Only the Service kind - // is allowed, and it will be defaulted to Service. If the weight field (0-256 default 100) - // is set to zero, no traffic will be sent to this backend. - To RouteTargetReference `json:"to" protobuf:"bytes,3,opt,name=to"` - - // alternateBackends allows up to 3 additional backends to be assigned to the route. - // Only the Service kind is allowed, and it will be defaulted to Service. - // Use the weight field in RouteTargetReference object to specify relative preference. - // - // +kubebuilder:validation:MaxItems=3 - // +listType=map - // +listMapKey=name - // +listMapKey=kind - AlternateBackends []RouteTargetReference `json:"alternateBackends,omitempty" protobuf:"bytes,4,rep,name=alternateBackends"` - - // If specified, the port to be used by the router. Most routers will use all - // endpoints exposed by the service by default - set this value to instruct routers - // which port to use. - Port *RoutePort `json:"port,omitempty" protobuf:"bytes,5,opt,name=port"` - - // The tls field provides the ability to configure certificates and termination for the route. - TLS *TLSConfig `json:"tls,omitempty" protobuf:"bytes,6,opt,name=tls"` - - // Wildcard policy if any for the route. - // Currently only 'Subdomain' or 'None' is allowed. - // - // +kubebuilder:validation:Enum=None;Subdomain;"" - // +kubebuilder:default=None - WildcardPolicy WildcardPolicyType `json:"wildcardPolicy,omitempty" protobuf:"bytes,7,opt,name=wildcardPolicy"` - - // httpHeaders defines policy for HTTP headers. - // - // +optional - HTTPHeaders *RouteHTTPHeaders `json:"httpHeaders,omitempty" protobuf:"bytes,9,opt,name=httpHeaders"` -} - -// RouteHTTPHeaders defines policy for HTTP headers. -type RouteHTTPHeaders struct { - // actions specifies options for modifying headers and their values. - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be modified for TLS passthrough - // connections. - // Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. - // `Strict-Transport-Security` may only be configured using the "haproxy.router.openshift.io/hsts_header" - // route annotation, and only in accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. - // In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after - // the actions specified in the IngressController's spec.httpHeaders.actions field. - // In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be - // executed after the actions specified in the Route's spec.httpHeaders.actions field. - // The headers set via this API will not appear in access logs. - // Any actions defined here are applied after any actions related to the following other fields: - // cache-control, spec.clientTLS, - // spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, - // and spec.httpHeaders.headerNameCaseAdjustments. - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. Please refer to the documentation - // for that API field for more details. - // +optional - Actions RouteHTTPHeaderActions `json:"actions,omitempty" protobuf:"bytes,1,opt,name=actions"` -} - -// RouteHTTPHeaderActions defines configuration for actions on HTTP request and response headers. -type RouteHTTPHeaderActions struct { - // response is a list of HTTP response headers to modify. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions defined here will modify the response headers of all requests made through a route. - // These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. - // Route actions will be executed before IngressController actions for response headers. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 response header actions may be configured. - // You can use this field to specify HTTP response headers that should be set or deleted - // when forwarding responses from your application to the client. - // Sample fetchers allowed are "res.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[res.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // Note: This field cannot be used if your route uses TLS passthrough. - // + --- - // + Note: Any change to regex mentioned below must be reflected in the CRD validation of route in https://github.com/openshift/library-go/blob/master/pkg/route/validation/validation.go and vice-versa. - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:res\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are res.hdr, ssl_c_der. Converters allowed are lower, base64." - Response []RouteHTTPHeader `json:"response" protobuf:"bytes,1,rep,name=response"` - // request is a list of HTTP request headers to modify. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions defined here will modify the request headers of all requests made through a route. - // These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Route actions will be executed after IngressController actions for request headers. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 request header actions may be configured. - // You can use this field to specify HTTP request headers that should be set or deleted - // when forwarding connections from the client to your application. - // Sample fetchers allowed are "req.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[req.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - // Any request header configuration applied directly via a Route resource using this API - // will override header configuration for a header of the same name applied via - // spec.httpHeaders.actions on the IngressController or route annotation. - // Note: This field cannot be used if your route uses TLS passthrough. - // + --- - // + Note: Any change to regex mentioned below must be reflected in the CRD validation of route in https://github.com/openshift/library-go/blob/master/pkg/route/validation/validation.go and vice-versa. - // +listType=map - // +listMapKey=name - // +optional - // +kubebuilder:validation:MaxItems=20 - // +kubebuilder:validation:XValidation:rule=`self.all(key, key.action.type == "Delete" || (has(key.action.set) && key.action.set.value.matches('^(?:%(?:%|(?:\\{[-+]?[QXE](?:,[-+]?[QXE])*\\})?\\[(?:req\\.hdr\\([0-9A-Za-z-]+\\)|ssl_c_der)(?:,(?:lower|base64))*\\])|[^%[:cntrl:]])+$')))`,message="Either the header value provided is not in correct format or the sample fetcher/converter specified is not allowed. The dynamic header value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. Sample fetchers allowed are req.hdr, ssl_c_der. Converters allowed are lower, base64." - Request []RouteHTTPHeader `json:"request" protobuf:"bytes,2,rep,name=request"` -} - -// RouteHTTPHeader specifies configuration for setting or deleting an HTTP header. -type RouteHTTPHeader struct { - // name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - // The name must consist only of alphanumeric and the following special characters, "-!#$%&'*+.^_`". - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Cookie, Set-Cookie. - // It must be no more than 255 characters in length. - // Header name must be unique. - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=255 - // +kubebuilder:validation:Pattern="^[-!#$%&'*+.0-9A-Z^_`a-z|~]+$" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'strict-transport-security'",message="strict-transport-security header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'proxy'",message="proxy header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'cookie'",message="cookie header may not be modified via header actions" - // +kubebuilder:validation:XValidation:rule="self.lowerAscii() != 'set-cookie'",message="set-cookie header may not be modified via header actions" - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // action specifies actions to perform on headers, such as setting or deleting headers. - // +required - Action RouteHTTPHeaderActionUnion `json:"action" protobuf:"bytes,2,opt,name=action"` -} - -// RouteHTTPHeaderActionUnion specifies an action to take on an HTTP header. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Set' ? has(self.set) : !has(self.set)",message="set is required when type is Set, and forbidden otherwise" -// +union -type RouteHTTPHeaderActionUnion struct { - // type defines the type of the action to be applied on the header. - // Possible values are Set or Delete. - // Set allows you to set HTTP request and response headers. - // Delete allows you to delete HTTP request and response headers. - // +unionDiscriminator - // +kubebuilder:validation:Enum:=Set;Delete - // +required - Type RouteHTTPHeaderActionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RouteHTTPHeaderActionType"` - - // set defines the HTTP header that should be set: added if it doesn't exist or replaced if it does. - // This field is required when type is Set and forbidden otherwise. - // +optional - // +unionMember - Set *RouteSetHTTPHeader `json:"set,omitempty" protobuf:"bytes,2,opt,name=set"` -} - -// RouteSetHTTPHeader specifies what value needs to be set on an HTTP header. -type RouteSetHTTPHeader struct { - // value specifies a header value. - // Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in - // http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and - // otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. - // The value of this field must be no more than 16384 characters in length. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. - // + --- - // + Note: This limit was selected as most common web servers have a limit of 16384 characters or some lower limit. - // + See . - // +required - // +kubebuilder:validation:MinLength=1 - // +kubebuilder:validation:MaxLength=16384 - Value string `json:"value" protobuf:"bytes,1,opt,name=value"` -} - -// RouteHTTPHeaderActionType defines actions that can be performed on HTTP headers. -type RouteHTTPHeaderActionType string - -const ( - // Set specifies that an HTTP header should be set. - Set RouteHTTPHeaderActionType = "Set" - // Delete specifies that an HTTP header should be deleted. - Delete RouteHTTPHeaderActionType = "Delete" -) - -// RouteTargetReference specifies the target that resolve into endpoints. Only the 'Service' -// kind is allowed. Use 'weight' field to emphasize one over others. -type RouteTargetReference struct { - // The kind of target that the route is referring to. Currently, only 'Service' is allowed - // - // +kubebuilder:validation:Enum=Service;"" - // +kubebuilder:default=Service - Kind string `json:"kind" protobuf:"bytes,1,opt,name=kind"` - - // name of the service/target that is being referred to. e.g. name of the service - // - // +kubebuilder:validation:MinLength=1 - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - - // weight as an integer between 0 and 256, default 100, that specifies the target's relative weight - // against other target reference objects. 0 suppresses requests to this backend. - // - // +optional - // +kubebuilder:validation:Minimum=0 - // +kubebuilder:validation:Maximum=256 - // +kubebuilder:default=100 - Weight *int32 `json:"weight" protobuf:"varint,3,opt,name=weight"` -} - -// RoutePort defines a port mapping from a router to an endpoint in the service endpoints. -type RoutePort struct { - // The target port on pods selected by the service this route points to. - // If this is a string, it will be looked up as a named port in the target - // endpoints port list. Required - TargetPort intstr.IntOrString `json:"targetPort" protobuf:"bytes,1,opt,name=targetPort"` -} - -// RouteStatus provides relevant info about the status of a route, including which routers -// acknowledge it. -type RouteStatus struct { - // ingress describes the places where the route may be exposed. The list of - // ingress points may contain duplicate Host or RouterName values. Routes - // are considered live once they are `Ready` - // +listType=atomic - // +optional - Ingress []RouteIngress `json:"ingress,omitempty" protobuf:"bytes,1,rep,name=ingress"` -} - -// RouteIngress holds information about the places where a route is exposed. -type RouteIngress struct { - // host is the host string under which the route is exposed; this value is required - Host string `json:"host,omitempty" protobuf:"bytes,1,opt,name=host"` - // Name is a name chosen by the router to identify itself; this value is required - RouterName string `json:"routerName,omitempty" protobuf:"bytes,2,opt,name=routerName"` - // conditions is the state of the route, may be empty. - // +listType=map - // +listMapKey=type - Conditions []RouteIngressCondition `json:"conditions,omitempty" protobuf:"bytes,3,rep,name=conditions"` - // Wildcard policy is the wildcard policy that was allowed where this route is exposed. - WildcardPolicy WildcardPolicyType `json:"wildcardPolicy,omitempty" protobuf:"bytes,4,opt,name=wildcardPolicy"` - // CanonicalHostname is the external host name for the router that can be used as a CNAME - // for the host requested for this route. This value is optional and may not be set in all cases. - RouterCanonicalHostname string `json:"routerCanonicalHostname,omitempty" protobuf:"bytes,5,opt,name=routerCanonicalHostname"` -} - -// RouteIngressConditionType is a valid value for RouteCondition -type RouteIngressConditionType string - -// These are valid conditions of pod. -const ( - // RouteAdmitted means the route is able to service requests for the provided Host - RouteAdmitted RouteIngressConditionType = "Admitted" - // RouteUnservableInFutureVersions indicates that the route is using an unsupported - // configuration that may be incompatible with a future version of OpenShift. - RouteUnservableInFutureVersions RouteIngressConditionType = "UnservableInFutureVersions" -) - -// RouteIngressCondition contains details for the current condition of this route on a particular -// router. -type RouteIngressCondition struct { - // type is the type of the condition. - // Currently only Admitted or UnservableInFutureVersions. - Type RouteIngressConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=RouteIngressConditionType"` - // status is the status of the condition. - // Can be True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/api/core/v1.ConditionStatus"` - // (brief) reason for the condition's last transition, and is usually a machine and human - // readable constant - Reason string `json:"reason,omitempty" protobuf:"bytes,3,opt,name=reason"` - // Human readable message indicating details about last transition. - Message string `json:"message,omitempty" protobuf:"bytes,4,opt,name=message"` - // RFC 3339 date and time when this condition last transitioned - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,5,opt,name=lastTransitionTime"` -} - -// RouterShard has information of a routing shard and is used to -// generate host names and routing table entries when a routing shard is -// allocated for a specific route. -// Caveat: This is WIP and will likely undergo modifications when sharding -// support is added. -type RouterShard struct { - // shardName uniquely identifies a router shard in the "set" of - // routers used for routing traffic to the services. - ShardName string `json:"shardName" protobuf:"bytes,1,opt,name=shardName"` - - // dnsSuffix for the shard ala: shard-1.v3.openshift.com - DNSSuffix string `json:"dnsSuffix" protobuf:"bytes,2,opt,name=dnsSuffix"` -} - -// TLSConfig defines config used to secure a route and provide termination -// -// +kubebuilder:validation:XValidation:rule="has(self.termination) && has(self.insecureEdgeTerminationPolicy) ? !((self.termination=='passthrough') && (self.insecureEdgeTerminationPolicy=='Allow')) : true", message="cannot have both spec.tls.termination: passthrough and spec.tls.insecureEdgeTerminationPolicy: Allow" -// +openshift:validation:FeatureGateAwareXValidation:featureGate=RouteExternalCertificate,rule="!(has(self.certificate) && has(self.externalCertificate))", message="cannot have both spec.tls.certificate and spec.tls.externalCertificate" -type TLSConfig struct { - // termination indicates the TLS termination type. - // - // * edge - TLS termination is done by the router and http is used to communicate with the backend (default) - // - // * passthrough - Traffic is sent straight to the destination without the router providing TLS termination - // - // * reencrypt - TLS termination is done by the router and https is used to communicate with the backend - // - // Note: passthrough termination is incompatible with httpHeader actions - // +kubebuilder:validation:Enum=edge;reencrypt;passthrough - Termination TLSTerminationType `json:"termination" protobuf:"bytes,1,opt,name=termination,casttype=TLSTerminationType"` - - // certificate provides certificate contents. This should be a single serving certificate, not a certificate - // chain. Do not include a CA certificate. - Certificate string `json:"certificate,omitempty" protobuf:"bytes,2,opt,name=certificate"` - - // key provides key file contents - Key string `json:"key,omitempty" protobuf:"bytes,3,opt,name=key"` - - // caCertificate provides the cert authority certificate contents - CACertificate string `json:"caCertificate,omitempty" protobuf:"bytes,4,opt,name=caCertificate"` - - // destinationCACertificate provides the contents of the ca certificate of the final destination. When using reencrypt - // termination this file should be provided in order to have routers use it for health checks on the secure connection. - // If this field is not specified, the router may provide its own destination CA and perform hostname validation using - // the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically - // verify. - DestinationCACertificate string `json:"destinationCACertificate,omitempty" protobuf:"bytes,5,opt,name=destinationCACertificate"` - - // insecureEdgeTerminationPolicy indicates the desired behavior for insecure connections to a route. While - // each router may make its own decisions on which ports to expose, this is normally port 80. - // - // If a route does not specify insecureEdgeTerminationPolicy, then the default behavior is "None". - // - // * Allow - traffic is sent to the server on the insecure port (edge/reencrypt terminations only). - // - // * None - no traffic is allowed on the insecure port (default). - // - // * Redirect - clients are redirected to the secure port. - // - // +kubebuilder:validation:Enum=Allow;None;Redirect;"" - InsecureEdgeTerminationPolicy InsecureEdgeTerminationPolicyType `json:"insecureEdgeTerminationPolicy,omitempty" protobuf:"bytes,6,opt,name=insecureEdgeTerminationPolicy,casttype=InsecureEdgeTerminationPolicyType"` - - // externalCertificate provides certificate contents as a secret reference. - // This should be a single serving certificate, not a certificate - // chain. Do not include a CA certificate. The secret referenced should - // be present in the same namespace as that of the Route. - // Forbidden when `certificate` is set. - // The router service account needs to be granted with read-only access to this secret, - // please refer to openshift docs for additional details. - // - // +openshift:enable:FeatureGate=RouteExternalCertificate - // +optional - ExternalCertificate *LocalObjectReference `json:"externalCertificate,omitempty" protobuf:"bytes,7,opt,name=externalCertificate"` -} - -// LocalObjectReference contains enough information to let you locate the -// referenced object inside the same namespace. -// +structType=atomic -type LocalObjectReference struct { - // name of the referent. - // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` -} - -// TLSTerminationType dictates where the secure communication will stop -// TODO: Reconsider this type in v2 -type TLSTerminationType string - -// InsecureEdgeTerminationPolicyType dictates the behavior of insecure -// connections to an edge-terminated route. -type InsecureEdgeTerminationPolicyType string - -const ( - // TLSTerminationEdge terminate encryption at the edge router. - TLSTerminationEdge TLSTerminationType = "edge" - // TLSTerminationPassthrough terminate encryption at the destination, the destination is responsible for decrypting traffic - TLSTerminationPassthrough TLSTerminationType = "passthrough" - // TLSTerminationReencrypt terminate encryption at the edge router and re-encrypt it with a new certificate supplied by the destination - TLSTerminationReencrypt TLSTerminationType = "reencrypt" - - // InsecureEdgeTerminationPolicyNone disables insecure connections for an edge-terminated route. - InsecureEdgeTerminationPolicyNone InsecureEdgeTerminationPolicyType = "None" - // InsecureEdgeTerminationPolicyAllow allows insecure connections for an edge-terminated route. - InsecureEdgeTerminationPolicyAllow InsecureEdgeTerminationPolicyType = "Allow" - // InsecureEdgeTerminationPolicyRedirect redirects insecure connections for an edge-terminated route. - // As an example, for routers that support HTTP and HTTPS, the - // insecure HTTP connections will be redirected to use HTTPS. - InsecureEdgeTerminationPolicyRedirect InsecureEdgeTerminationPolicyType = "Redirect" -) - -// WildcardPolicyType indicates the type of wildcard support needed by routes. -type WildcardPolicyType string - -const ( - // WildcardPolicyNone indicates no wildcard support is needed. - WildcardPolicyNone WildcardPolicyType = "None" - - // WildcardPolicySubdomain indicates the host needs wildcard support for the subdomain. - // Example: For host = "www.acme.test", indicates that the router - // should support requests for *.acme.test - // Note that this will not match acme.test only *.acme.test - WildcardPolicySubdomain WildcardPolicyType = "Subdomain" -) - -// Route Annotations -const ( - // AllowNonDNSCompliantHostAnnotation indicates that the host name in a route - // configuration is not required to follow strict DNS compliance. - // Unless the annotation is set to true, the route host name must have at least one label. - // Labels must have no more than 63 characters from the set of - // alphanumeric characters, '-' or '.', and must start and end with an alphanumeric - // character. A trailing dot is not allowed. The total host name length must be no more - // than 253 characters. - // - // When the annotation is set to true, the host name must pass a smaller set of - // requirements, i.e.: character set as described above, and total host name - // length must be no more than 253 characters. - // - // NOTE: use of this annotation may validate routes that cannot be admitted and will - // not function. The annotation is provided to allow a custom scenario, e.g. a custom - // ingress controller that relies on the route API, but for some customized purpose - // needs to use routes with invalid hosts. - AllowNonDNSCompliantHostAnnotation = "route.openshift.io/allow-non-dns-compliant-host" -) - -// Ingress-to-route controller -const ( - // IngressToRouteIngressClassControllerName is the name of the - // controller that translates ingresses into routes. This value is - // intended to be used for the spec.controller field of ingressclasses. - IngressToRouteIngressClassControllerName = "openshift.io/ingress-to-route" -) diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go deleted file mode 100644 index 155348d36..000000000 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,368 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *LocalObjectReference) DeepCopyInto(out *LocalObjectReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LocalObjectReference. -func (in *LocalObjectReference) DeepCopy() *LocalObjectReference { - if in == nil { - return nil - } - out := new(LocalObjectReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Route) DeepCopyInto(out *Route) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route. -func (in *Route) DeepCopy() *Route { - if in == nil { - return nil - } - out := new(Route) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Route) 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 *RouteHTTPHeader) DeepCopyInto(out *RouteHTTPHeader) { - *out = *in - in.Action.DeepCopyInto(&out.Action) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteHTTPHeader. -func (in *RouteHTTPHeader) DeepCopy() *RouteHTTPHeader { - if in == nil { - return nil - } - out := new(RouteHTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteHTTPHeaderActionUnion) DeepCopyInto(out *RouteHTTPHeaderActionUnion) { - *out = *in - if in.Set != nil { - in, out := &in.Set, &out.Set - *out = new(RouteSetHTTPHeader) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteHTTPHeaderActionUnion. -func (in *RouteHTTPHeaderActionUnion) DeepCopy() *RouteHTTPHeaderActionUnion { - if in == nil { - return nil - } - out := new(RouteHTTPHeaderActionUnion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteHTTPHeaderActions) DeepCopyInto(out *RouteHTTPHeaderActions) { - *out = *in - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = make([]RouteHTTPHeader, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = make([]RouteHTTPHeader, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteHTTPHeaderActions. -func (in *RouteHTTPHeaderActions) DeepCopy() *RouteHTTPHeaderActions { - if in == nil { - return nil - } - out := new(RouteHTTPHeaderActions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteHTTPHeaders) DeepCopyInto(out *RouteHTTPHeaders) { - *out = *in - in.Actions.DeepCopyInto(&out.Actions) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteHTTPHeaders. -func (in *RouteHTTPHeaders) DeepCopy() *RouteHTTPHeaders { - if in == nil { - return nil - } - out := new(RouteHTTPHeaders) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteIngress) DeepCopyInto(out *RouteIngress) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]RouteIngressCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteIngress. -func (in *RouteIngress) DeepCopy() *RouteIngress { - if in == nil { - return nil - } - out := new(RouteIngress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteIngressCondition) DeepCopyInto(out *RouteIngressCondition) { - *out = *in - if in.LastTransitionTime != nil { - in, out := &in.LastTransitionTime, &out.LastTransitionTime - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteIngressCondition. -func (in *RouteIngressCondition) DeepCopy() *RouteIngressCondition { - if in == nil { - return nil - } - out := new(RouteIngressCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteList) DeepCopyInto(out *RouteList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Route, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteList. -func (in *RouteList) DeepCopy() *RouteList { - if in == nil { - return nil - } - out := new(RouteList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RouteList) 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 *RoutePort) DeepCopyInto(out *RoutePort) { - *out = *in - out.TargetPort = in.TargetPort - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoutePort. -func (in *RoutePort) DeepCopy() *RoutePort { - if in == nil { - return nil - } - out := new(RoutePort) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteSetHTTPHeader) DeepCopyInto(out *RouteSetHTTPHeader) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSetHTTPHeader. -func (in *RouteSetHTTPHeader) DeepCopy() *RouteSetHTTPHeader { - if in == nil { - return nil - } - out := new(RouteSetHTTPHeader) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteSpec) DeepCopyInto(out *RouteSpec) { - *out = *in - in.To.DeepCopyInto(&out.To) - if in.AlternateBackends != nil { - in, out := &in.AlternateBackends, &out.AlternateBackends - *out = make([]RouteTargetReference, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(RoutePort) - **out = **in - } - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(TLSConfig) - (*in).DeepCopyInto(*out) - } - if in.HTTPHeaders != nil { - in, out := &in.HTTPHeaders, &out.HTTPHeaders - *out = new(RouteHTTPHeaders) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteSpec. -func (in *RouteSpec) DeepCopy() *RouteSpec { - if in == nil { - return nil - } - out := new(RouteSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteStatus) DeepCopyInto(out *RouteStatus) { - *out = *in - if in.Ingress != nil { - in, out := &in.Ingress, &out.Ingress - *out = make([]RouteIngress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteStatus. -func (in *RouteStatus) DeepCopy() *RouteStatus { - if in == nil { - return nil - } - out := new(RouteStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouteTargetReference) DeepCopyInto(out *RouteTargetReference) { - *out = *in - if in.Weight != nil { - in, out := &in.Weight, &out.Weight - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouteTargetReference. -func (in *RouteTargetReference) DeepCopy() *RouteTargetReference { - if in == nil { - return nil - } - out := new(RouteTargetReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RouterShard) DeepCopyInto(out *RouterShard) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RouterShard. -func (in *RouterShard) DeepCopy() *RouterShard { - if in == nil { - return nil - } - out := new(RouterShard) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TLSConfig) DeepCopyInto(out *TLSConfig) { - *out = *in - if in.ExternalCertificate != nil { - in, out := &in.ExternalCertificate, &out.ExternalCertificate - *out = new(LocalObjectReference) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig. -func (in *TLSConfig) DeepCopy() *TLSConfig { - if in == nil { - return nil - } - out := new(TLSConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 0277ba2f3..000000000 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,34 +0,0 @@ -routes.route.openshift.io: - Annotations: {} - ApprovedPRNumber: https://github.com/openshift/api/pull/1228 - CRDName: routes.route.openshift.io - Capability: "" - Category: "" - FeatureGates: - - RouteExternalCertificate - FilenameOperatorName: "" - FilenameOperatorOrdering: "" - FilenameRunLevel: "" - GroupName: route.openshift.io - HasStatus: true - KindName: Route - Labels: {} - PluralName: routes - PrinterColumns: - - jsonPath: .status.ingress[0].host - name: Host - type: string - - jsonPath: .status.ingress[0].conditions[?(@.type=="Admitted")].status - name: Admitted - type: string - - jsonPath: .spec.to.name - name: Service - type: string - - jsonPath: .spec.tls.type - name: TLS - type: string - Scope: Namespaced - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/route/v1/zz_generated.model_name.go deleted file mode 100644 index cbdd33762..000000000 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.model_name.go +++ /dev/null @@ -1,86 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in LocalObjectReference) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.LocalObjectReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Route) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.Route" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteHTTPHeader) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteHTTPHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteHTTPHeaderActionUnion) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteHTTPHeaderActionUnion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteHTTPHeaderActions) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteHTTPHeaderActions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteHTTPHeaders) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteHTTPHeaders" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteIngress) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteIngress" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteIngressCondition) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteIngressCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteList) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RoutePort) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RoutePort" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteSetHTTPHeader) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteSetHTTPHeader" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteSpec) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteStatus) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouteTargetReference) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouteTargetReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RouterShard) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.RouterShard" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TLSConfig) OpenAPIModelName() string { - return "com.github.openshift.api.route.v1.TLSConfig" -} diff --git a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 4c8f9eedd..000000000 --- a/vendor/github.com/openshift/api/route/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,189 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_LocalObjectReference = map[string]string{ - "": "LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", - "name": "name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", -} - -func (LocalObjectReference) SwaggerDoc() map[string]string { - return map_LocalObjectReference -} - -var map_Route = map[string]string{ - "": "A route allows developers to expose services through an HTTP(S) aware load balancing and proxy layer via a public DNS entry. The route may further specify TLS options and a certificate, or specify a public CNAME that the router should also accept for HTTP and HTTPS traffic. An administrator typically configures their router to be visible outside the cluster firewall, and may also add additional security, caching, or traffic controls on the service content. Routers usually talk directly to the service endpoints.\n\nOnce a route is created, the `host` field may not be changed. Generally, routers use the oldest route with a given host when resolving conflicts.\n\nRouters are subject to additional customization and may support additional controls via the annotations field.\n\nBecause administrators may configure multiple routers, the route status field is used to return information to clients about the names and states of the route under each router. If a client chooses a duplicate name, for instance, the route status conditions are used to indicate the route cannot be chosen.\n\nTo enable HTTP/2 ALPN on a route it requires a custom (non-wildcard) certificate. This prevents connection coalescing by clients, notably web browsers. We do not support HTTP/2 ALPN on routes that use the default certificate because of the risk of connection re-use/coalescing. Routes that do not have their own custom certificate will not be HTTP/2 ALPN-enabled on either the frontend or the backend.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the desired state of the route", - "status": "status is the current state of the route", -} - -func (Route) SwaggerDoc() map[string]string { - return map_Route -} - -var map_RouteHTTPHeader = map[string]string{ - "": "RouteHTTPHeader specifies configuration for setting or deleting an HTTP header.", - "name": "name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header name as defined in RFC 2616 section 4.2. The name must consist only of alphanumeric and the following special characters, \"-!#$%&'*+.^_`\". The following header names are reserved and may not be modified via this API: Strict-Transport-Security, Proxy, Cookie, Set-Cookie. It must be no more than 255 characters in length. Header name must be unique.", - "action": "action specifies actions to perform on headers, such as setting or deleting headers.", -} - -func (RouteHTTPHeader) SwaggerDoc() map[string]string { - return map_RouteHTTPHeader -} - -var map_RouteHTTPHeaderActionUnion = map[string]string{ - "": "RouteHTTPHeaderActionUnion specifies an action to take on an HTTP header.", - "type": "type defines the type of the action to be applied on the header. Possible values are Set or Delete. Set allows you to set HTTP request and response headers. Delete allows you to delete HTTP request and response headers.", - "set": "set defines the HTTP header that should be set: added if it doesn't exist or replaced if it does. This field is required when type is Set and forbidden otherwise.", -} - -func (RouteHTTPHeaderActionUnion) SwaggerDoc() map[string]string { - return map_RouteHTTPHeaderActionUnion -} - -var map_RouteHTTPHeaderActions = map[string]string{ - "": "RouteHTTPHeaderActions defines configuration for actions on HTTP request and response headers.", - "response": "response is a list of HTTP response headers to modify. Currently, actions may define to either `Set` or `Delete` headers values. Actions defined here will modify the response headers of all requests made through a route. These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. Route actions will be executed before IngressController actions for response headers. Actions are applied in sequence as defined in this list. A maximum of 20 response header actions may be configured. You can use this field to specify HTTP response headers that should be set or deleted when forwarding responses from your application to the client. Sample fetchers allowed are \"res.hdr\" and \"ssl_c_der\". Converters allowed are \"lower\" and \"base64\". Example header values: \"%[res.hdr(X-target),lower]\", \"%{+Q}[ssl_c_der,base64]\". Note: This field cannot be used if your route uses TLS passthrough. ", - "request": "request is a list of HTTP request headers to modify. Currently, actions may define to either `Set` or `Delete` headers values. Actions defined here will modify the request headers of all requests made through a route. These actions are applied to a specific Route defined within a cluster i.e. connections made through a route. Currently, actions may define to either `Set` or `Delete` headers values. Route actions will be executed after IngressController actions for request headers. Actions are applied in sequence as defined in this list. A maximum of 20 request header actions may be configured. You can use this field to specify HTTP request headers that should be set or deleted when forwarding connections from the client to your application. Sample fetchers allowed are \"req.hdr\" and \"ssl_c_der\". Converters allowed are \"lower\" and \"base64\". Example header values: \"%[req.hdr(X-target),lower]\", \"%{+Q}[ssl_c_der,base64]\". Any request header configuration applied directly via a Route resource using this API will override header configuration for a header of the same name applied via spec.httpHeaders.actions on the IngressController or route annotation. Note: This field cannot be used if your route uses TLS passthrough. ", -} - -func (RouteHTTPHeaderActions) SwaggerDoc() map[string]string { - return map_RouteHTTPHeaderActions -} - -var map_RouteHTTPHeaders = map[string]string{ - "": "RouteHTTPHeaders defines policy for HTTP headers.", - "actions": "actions specifies options for modifying headers and their values. Note that this option only applies to cleartext HTTP connections and to secure HTTP connections for which the ingress controller terminates encryption (that is, edge-terminated or reencrypt connections). Headers cannot be modified for TLS passthrough connections. Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. `Strict-Transport-Security` may only be configured using the \"haproxy.router.openshift.io/hsts_header\" route annotation, and only in accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after the actions specified in the IngressController's spec.httpHeaders.actions field. In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be executed after the actions specified in the Route's spec.httpHeaders.actions field. The headers set via this API will not appear in access logs. Any actions defined here are applied after any actions related to the following other fields: cache-control, spec.clientTLS, spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, and spec.httpHeaders.headerNameCaseAdjustments. The following header names are reserved and may not be modified via this API: Strict-Transport-Security, Proxy, Cookie, Set-Cookie. Note that the total size of all net added headers *after* interpolating dynamic values must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the IngressController. Please refer to the documentation for that API field for more details.", -} - -func (RouteHTTPHeaders) SwaggerDoc() map[string]string { - return map_RouteHTTPHeaders -} - -var map_RouteIngress = map[string]string{ - "": "RouteIngress holds information about the places where a route is exposed.", - "host": "host is the host string under which the route is exposed; this value is required", - "routerName": "Name is a name chosen by the router to identify itself; this value is required", - "conditions": "conditions is the state of the route, may be empty.", - "wildcardPolicy": "Wildcard policy is the wildcard policy that was allowed where this route is exposed.", - "routerCanonicalHostname": "CanonicalHostname is the external host name for the router that can be used as a CNAME for the host requested for this route. This value is optional and may not be set in all cases.", -} - -func (RouteIngress) SwaggerDoc() map[string]string { - return map_RouteIngress -} - -var map_RouteIngressCondition = map[string]string{ - "": "RouteIngressCondition contains details for the current condition of this route on a particular router.", - "type": "type is the type of the condition. Currently only Admitted or UnservableInFutureVersions.", - "status": "status is the status of the condition. Can be True, False, Unknown.", - "reason": "(brief) reason for the condition's last transition, and is usually a machine and human readable constant", - "message": "Human readable message indicating details about last transition.", - "lastTransitionTime": "RFC 3339 date and time when this condition last transitioned", -} - -func (RouteIngressCondition) SwaggerDoc() map[string]string { - return map_RouteIngressCondition -} - -var map_RouteList = map[string]string{ - "": "RouteList is a collection of Routes.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of routes", -} - -func (RouteList) SwaggerDoc() map[string]string { - return map_RouteList -} - -var map_RoutePort = map[string]string{ - "": "RoutePort defines a port mapping from a router to an endpoint in the service endpoints.", - "targetPort": "The target port on pods selected by the service this route points to. If this is a string, it will be looked up as a named port in the target endpoints port list. Required", -} - -func (RoutePort) SwaggerDoc() map[string]string { - return map_RoutePort -} - -var map_RouteSetHTTPHeader = map[string]string{ - "": "RouteSetHTTPHeader specifies what value needs to be set on an HTTP header.", - "value": "value specifies a header value. Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. The value of this field must be no more than 16384 characters in length. Note that the total size of all net added headers *after* interpolating dynamic values must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the IngressController. ", -} - -func (RouteSetHTTPHeader) SwaggerDoc() map[string]string { - return map_RouteSetHTTPHeader -} - -var map_RouteSpec = map[string]string{ - "": "RouteSpec describes the hostname or path the route exposes, any security information, and one to four backends (services) the route points to. Requests are distributed among the backends depending on the weights assigned to each backend. When using roundrobin scheduling the portion of requests that go to each backend is the backend weight divided by the sum of all of the backend weights. When the backend has more than one endpoint the requests that end up on the backend are roundrobin distributed among the endpoints. Weights are between 0 and 256 with default 100. Weight 0 causes no requests to the backend. If all weights are zero the route will be considered to have no backends and return a standard 503 response.\n\nThe `tls` field is optional and allows specific certificates or behavior for the route. Routers typically configure a default certificate on a wildcard domain to terminate routes without explicit certificates, but custom hostnames usually must choose passthrough (send traffic directly to the backend via the TLS Server-Name- Indication field) or provide a certificate.", - "host": "host is an alias/DNS that points to the service. Optional. If not specified a route name will typically be automatically chosen. Must follow DNS952 subdomain conventions.", - "subdomain": "subdomain is a DNS subdomain that is requested within the ingress controller's domain (as a subdomain). If host is set this field is ignored. An ingress controller may choose to ignore this suggested name, in which case the controller will report the assigned name in the status.ingress array or refuse to admit the route. If this value is set and the server does not support this field host will be populated automatically. Otherwise host is left empty. The field may have multiple parts separated by a dot, but not all ingress controllers may honor the request. This field may not be changed after creation except by a user with the update routes/custom-host permission.\n\nExample: subdomain `frontend` automatically receives the router subdomain `apps.mycluster.com` to have a full hostname `frontend.apps.mycluster.com`.", - "path": "path that the router watches for, to route traffic for to the service. Optional", - "to": "to is an object the route should use as the primary backend. Only the Service kind is allowed, and it will be defaulted to Service. If the weight field (0-256 default 100) is set to zero, no traffic will be sent to this backend.", - "alternateBackends": "alternateBackends allows up to 3 additional backends to be assigned to the route. Only the Service kind is allowed, and it will be defaulted to Service. Use the weight field in RouteTargetReference object to specify relative preference.", - "port": "If specified, the port to be used by the router. Most routers will use all endpoints exposed by the service by default - set this value to instruct routers which port to use.", - "tls": "The tls field provides the ability to configure certificates and termination for the route.", - "wildcardPolicy": "Wildcard policy if any for the route. Currently only 'Subdomain' or 'None' is allowed.", - "httpHeaders": "httpHeaders defines policy for HTTP headers.", -} - -func (RouteSpec) SwaggerDoc() map[string]string { - return map_RouteSpec -} - -var map_RouteStatus = map[string]string{ - "": "RouteStatus provides relevant info about the status of a route, including which routers acknowledge it.", - "ingress": "ingress describes the places where the route may be exposed. The list of ingress points may contain duplicate Host or RouterName values. Routes are considered live once they are `Ready`", -} - -func (RouteStatus) SwaggerDoc() map[string]string { - return map_RouteStatus -} - -var map_RouteTargetReference = map[string]string{ - "": "RouteTargetReference specifies the target that resolve into endpoints. Only the 'Service' kind is allowed. Use 'weight' field to emphasize one over others.", - "kind": "The kind of target that the route is referring to. Currently, only 'Service' is allowed", - "name": "name of the service/target that is being referred to. e.g. name of the service", - "weight": "weight as an integer between 0 and 256, default 100, that specifies the target's relative weight against other target reference objects. 0 suppresses requests to this backend.", -} - -func (RouteTargetReference) SwaggerDoc() map[string]string { - return map_RouteTargetReference -} - -var map_RouterShard = map[string]string{ - "": "RouterShard has information of a routing shard and is used to generate host names and routing table entries when a routing shard is allocated for a specific route. Caveat: This is WIP and will likely undergo modifications when sharding support is added.", - "shardName": "shardName uniquely identifies a router shard in the \"set\" of routers used for routing traffic to the services.", - "dnsSuffix": "dnsSuffix for the shard ala: shard-1.v3.openshift.com", -} - -func (RouterShard) SwaggerDoc() map[string]string { - return map_RouterShard -} - -var map_TLSConfig = map[string]string{ - "": "TLSConfig defines config used to secure a route and provide termination", - "termination": "termination indicates the TLS termination type.\n\n* edge - TLS termination is done by the router and http is used to communicate with the backend (default)\n\n* passthrough - Traffic is sent straight to the destination without the router providing TLS termination\n\n* reencrypt - TLS termination is done by the router and https is used to communicate with the backend\n\nNote: passthrough termination is incompatible with httpHeader actions", - "certificate": "certificate provides certificate contents. This should be a single serving certificate, not a certificate chain. Do not include a CA certificate.", - "key": "key provides key file contents", - "caCertificate": "caCertificate provides the cert authority certificate contents", - "destinationCACertificate": "destinationCACertificate provides the contents of the ca certificate of the final destination. When using reencrypt termination this file should be provided in order to have routers use it for health checks on the secure connection. If this field is not specified, the router may provide its own destination CA and perform hostname validation using the short service name (service.namespace.svc), which allows infrastructure generated certificates to automatically verify.", - "insecureEdgeTerminationPolicy": "insecureEdgeTerminationPolicy indicates the desired behavior for insecure connections to a route. While each router may make its own decisions on which ports to expose, this is normally port 80.\n\nIf a route does not specify insecureEdgeTerminationPolicy, then the default behavior is \"None\".\n\n* Allow - traffic is sent to the server on the insecure port (edge/reencrypt terminations only).\n\n* None - no traffic is allowed on the insecure port (default).\n\n* Redirect - clients are redirected to the secure port.", - "externalCertificate": "externalCertificate provides certificate contents as a secret reference. This should be a single serving certificate, not a certificate chain. Do not include a CA certificate. The secret referenced should be present in the same namespace as that of the Route. Forbidden when `certificate` is set. The router service account needs to be granted with read-only access to this secret, please refer to openshift docs for additional details.", -} - -func (TLSConfig) SwaggerDoc() map[string]string { - return map_TLSConfig -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/samples/.codegen.yaml b/vendor/github.com/openshift/api/samples/.codegen.yaml deleted file mode 100644 index f10357951..000000000 --- a/vendor/github.com/openshift/api/samples/.codegen.yaml +++ /dev/null @@ -1,4 +0,0 @@ -swaggerdocs: - commentPolicy: Warn -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/samples/install.go b/vendor/github.com/openshift/api/samples/install.go deleted file mode 100644 index 8ad4d8197..000000000 --- a/vendor/github.com/openshift/api/samples/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package samples - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - samplesv1 "github.com/openshift/api/samples/v1" -) - -const ( - GroupName = "samples.operator.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(samplesv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/samples/v1/Makefile b/vendor/github.com/openshift/api/samples/v1/Makefile deleted file mode 100644 index be24ecca0..000000000 --- a/vendor/github.com/openshift/api/samples/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="samples.operator.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/samples/v1/doc.go b/vendor/github.com/openshift/api/samples/v1/doc.go deleted file mode 100644 index 3e392e7f6..000000000 --- a/vendor/github.com/openshift/api/samples/v1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.samples.v1 - -// +groupName=samples.operator.openshift.io -// Package v1 ist he v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/samples/v1/generated.pb.go b/vendor/github.com/openshift/api/samples/v1/generated.pb.go deleted file mode 100644 index e6edccc20..000000000 --- a/vendor/github.com/openshift/api/samples/v1/generated.pb.go +++ /dev/null @@ -1,1685 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/samples/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - github_com_openshift_api_operator_v1 "github.com/openshift/api/operator/v1" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *Config) Reset() { *m = Config{} } - -func (m *ConfigCondition) Reset() { *m = ConfigCondition{} } - -func (m *ConfigList) Reset() { *m = ConfigList{} } - -func (m *ConfigSpec) Reset() { *m = ConfigSpec{} } - -func (m *ConfigStatus) Reset() { *m = ConfigStatus{} } - -func (m *Config) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Config) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Config) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConfigCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x32 - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x2a - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - { - size, err := m.LastUpdateTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConfigList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConfigSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SkippedHelmCharts) > 0 { - for iNdEx := len(m.SkippedHelmCharts) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SkippedHelmCharts[iNdEx]) - copy(dAtA[i:], m.SkippedHelmCharts[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SkippedHelmCharts[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.SkippedTemplates) > 0 { - for iNdEx := len(m.SkippedTemplates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SkippedTemplates[iNdEx]) - copy(dAtA[i:], m.SkippedTemplates[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SkippedTemplates[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.SkippedImagestreams) > 0 { - for iNdEx := len(m.SkippedImagestreams) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SkippedImagestreams[iNdEx]) - copy(dAtA[i:], m.SkippedImagestreams[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SkippedImagestreams[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Architectures) > 0 { - for iNdEx := len(m.Architectures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Architectures[iNdEx]) - copy(dAtA[i:], m.Architectures[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architectures[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i -= len(m.SamplesRegistry) - copy(dAtA[i:], m.SamplesRegistry) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SamplesRegistry))) - i-- - dAtA[i] = 0x12 - i -= len(m.ManagementState) - copy(dAtA[i:], m.ManagementState) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ManagementState))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConfigStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConfigStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConfigStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x42 - if len(m.SkippedTemplates) > 0 { - for iNdEx := len(m.SkippedTemplates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SkippedTemplates[iNdEx]) - copy(dAtA[i:], m.SkippedTemplates[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SkippedTemplates[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.SkippedImagestreams) > 0 { - for iNdEx := len(m.SkippedImagestreams) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SkippedImagestreams[iNdEx]) - copy(dAtA[i:], m.SkippedImagestreams[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SkippedImagestreams[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.Architectures) > 0 { - for iNdEx := len(m.Architectures) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Architectures[iNdEx]) - copy(dAtA[i:], m.Architectures[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Architectures[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - i -= len(m.SamplesRegistry) - copy(dAtA[i:], m.SamplesRegistry) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SamplesRegistry))) - i-- - dAtA[i] = 0x1a - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.ManagementState) - copy(dAtA[i:], m.ManagementState) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ManagementState))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Config) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConfigCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastUpdateTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConfigList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ConfigSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ManagementState) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SamplesRegistry) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Architectures) > 0 { - for _, s := range m.Architectures { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.SkippedImagestreams) > 0 { - for _, s := range m.SkippedImagestreams { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.SkippedTemplates) > 0 { - for _, s := range m.SkippedTemplates { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.SkippedHelmCharts) > 0 { - for _, s := range m.SkippedHelmCharts { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ConfigStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ManagementState) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.SamplesRegistry) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Architectures) > 0 { - for _, s := range m.Architectures { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.SkippedImagestreams) > 0 { - for _, s := range m.SkippedImagestreams { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.SkippedTemplates) > 0 { - for _, s := range m.SkippedTemplates { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Config) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Config{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "ConfigSpec", "ConfigSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "ConfigStatus", "ConfigStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConfigCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastUpdateTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastUpdateTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Config{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Config", "Config", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&ConfigList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ConfigSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConfigSpec{`, - `ManagementState:` + fmt.Sprintf("%v", this.ManagementState) + `,`, - `SamplesRegistry:` + fmt.Sprintf("%v", this.SamplesRegistry) + `,`, - `Architectures:` + fmt.Sprintf("%v", this.Architectures) + `,`, - `SkippedImagestreams:` + fmt.Sprintf("%v", this.SkippedImagestreams) + `,`, - `SkippedTemplates:` + fmt.Sprintf("%v", this.SkippedTemplates) + `,`, - `SkippedHelmCharts:` + fmt.Sprintf("%v", this.SkippedHelmCharts) + `,`, - `}`, - }, "") - return s -} -func (this *ConfigStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]ConfigCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "ConfigCondition", "ConfigCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&ConfigStatus{`, - `ManagementState:` + fmt.Sprintf("%v", this.ManagementState) + `,`, - `Conditions:` + repeatedStringForConditions + `,`, - `SamplesRegistry:` + fmt.Sprintf("%v", this.SamplesRegistry) + `,`, - `Architectures:` + fmt.Sprintf("%v", this.Architectures) + `,`, - `SkippedImagestreams:` + fmt.Sprintf("%v", this.SkippedImagestreams) + `,`, - `SkippedTemplates:` + fmt.Sprintf("%v", this.SkippedTemplates) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Config) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Config: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Config: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = ConfigConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastUpdateTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastUpdateTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Config{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ManagementState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ManagementState = github_com_openshift_api_operator_v1.ManagementState(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SamplesRegistry", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SamplesRegistry = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Architectures", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Architectures = append(m.Architectures, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SkippedImagestreams", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SkippedImagestreams = append(m.SkippedImagestreams, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SkippedTemplates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SkippedTemplates = append(m.SkippedTemplates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SkippedHelmCharts", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SkippedHelmCharts = append(m.SkippedHelmCharts, HelmChartName(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConfigStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConfigStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConfigStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ManagementState", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ManagementState = github_com_openshift_api_operator_v1.ManagementState(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, ConfigCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SamplesRegistry", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SamplesRegistry = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Architectures", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Architectures = append(m.Architectures, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SkippedImagestreams", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SkippedImagestreams = append(m.SkippedImagestreams, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SkippedTemplates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SkippedTemplates = append(m.SkippedTemplates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/samples/v1/generated.proto b/vendor/github.com/openshift/api/samples/v1/generated.proto deleted file mode 100644 index 95220f74b..000000000 --- a/vendor/github.com/openshift/api/samples/v1/generated.proto +++ /dev/null @@ -1,188 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.samples.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/samples/v1"; - -// Config contains the configuration and detailed condition status for the Samples Operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:path=configs,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/513 -// +openshift:file-pattern=operatorOrdering=00 -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift samples operator." -// +kubebuilder:metadata:annotations="displayName=ConfigsSamples" -message Config { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // +required - optional ConfigSpec spec = 2; - - // +optional - optional ConfigStatus status = 3; -} - -// ConfigCondition captures various conditions of the Config -// as entries are processed. -message ConfigCondition { - // type of condition. - optional string type = 1; - - // status of the condition, one of True, False, Unknown. - optional string status = 2; - - // lastUpdateTime is the last time this condition was updated. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastUpdateTime = 3; - - // lastTransitionTime is the last time the condition transitioned from one status to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 4; - - // reason is what caused the condition's last transition. - optional string reason = 5; - - // message is a human readable message indicating details about the transition. - optional string message = 6; -} - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message ConfigList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - repeated Config items = 2; -} - -// ConfigSpec contains the desired configuration and state for the Samples Operator, controlling -// various behavior around the imagestreams and templates it creates/updates in the -// openshift namespace. -message ConfigSpec { - // managementState is top level on/off type of switch for all operators. - // When "Managed", this operator processes config and manipulates the samples accordingly. - // When "Unmanaged", this operator ignores any updates to the resources it watches. - // When "Removed", it reacts that same wasy as it does if the Config object - // is deleted, meaning any ImageStreams or Templates it manages (i.e. it honors the skipped - // lists) and the registry secret are deleted, along with the ConfigMap in the operator's - // namespace that represents the last config used to manipulate the samples, - optional string managementState = 1; - - // samplesRegistry allows for the specification of which registry is accessed - // by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library - // that are pulled into this github repository, but based on our pulling only ocp content it typically - // defaults to registry.redhat.io. - optional string samplesRegistry = 2; - - // architectures determine which hardware architecture(s) to install, where x86_64, ppc64le, and s390x are the only - // supported choices currently. - repeated string architectures = 4; - - // skippedImagestreams specifies names of image streams that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - repeated string skippedImagestreams = 5; - - // skippedTemplates specifies names of templates that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - repeated string skippedTemplates = 6; - - // skippedHelmCharts specifies names of helm charts that should NOT be - // managed. Admins can use this to allow them to delete content - // they don’t want. They will still have to MANUALLY DELETE the - // content but the operator will not recreate(or update) anything - // listed here. Few examples of the name of helmcharts which can be skipped are - // 'redhat-redhat-perl-imagestreams','redhat-redhat-nodejs-imagestreams','redhat-nginx-imagestreams', - // 'redhat-redhat-ruby-imagestreams','redhat-redhat-python-imagestreams','redhat-redhat-php-imagestreams', - // 'redhat-httpd-imagestreams','redhat-redhat-dotnet-imagestreams'. Rest of the names can be obtained from - // openshift console --> helmcharts -->installed helmcharts. This will display the list of all the - // 12 helmcharts(of imagestreams)being installed by Samples Operator. The skippedHelmCharts must be a - // valid Kubernetes resource name. May contain only lowercase alphanumeric characters, hyphens and periods, - // and each period separated segment must begin and end with an alphanumeric character. It must be non-empty - // and at most 253 characters in length - // +listType=set - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.all(x, x.matches('^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'))",message="skippedHelmCharts must be a valid Kubernetes resource name. May contain only lowercase alphanumeric characters, hyphens and periods, and each period separated segment must begin and end with an alphanumeric character" - repeated string skippedhelmCharts = 7; -} - -// ConfigStatus contains the actual configuration in effect, as well as various details -// that describe the state of the Samples Operator. -message ConfigStatus { - // managementState reflects the current operational status of the on/off switch for - // the operator. This operator compares the ManagementState as part of determining that we are turning - // the operator back on (i.e. "Managed") when it was previously "Unmanaged". - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - optional string managementState = 1; - - // conditions represents the available maintenance status of the sample - // imagestreams and templates. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated ConfigCondition conditions = 2; - - // samplesRegistry allows for the specification of which registry is accessed - // by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library - // that are pulled into this github repository, but based on our pulling only ocp content it typically - // defaults to registry.redhat.io. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - optional string samplesRegistry = 3; - - // architectures determine which hardware architecture(s) to install, where x86_64 and ppc64le are the - // supported choices. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated string architectures = 5; - - // skippedImagestreams specifies names of image streams that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated string skippedImagestreams = 6; - - // skippedTemplates specifies names of templates that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - repeated string skippedTemplates = 7; - - // version is the value of the operator's payload based version indicator when it was last successfully processed - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - optional string version = 8; -} - diff --git a/vendor/github.com/openshift/api/samples/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/samples/v1/generated.protomessage.pb.go deleted file mode 100644 index 15d46b4e0..000000000 --- a/vendor/github.com/openshift/api/samples/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,16 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*Config) ProtoMessage() {} - -func (*ConfigCondition) ProtoMessage() {} - -func (*ConfigList) ProtoMessage() {} - -func (*ConfigSpec) ProtoMessage() {} - -func (*ConfigStatus) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/samples/v1/register.go b/vendor/github.com/openshift/api/samples/v1/register.go deleted file mode 100644 index 3b0611e3f..000000000 --- a/vendor/github.com/openshift/api/samples/v1/register.go +++ /dev/null @@ -1,51 +0,0 @@ -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - Version = "v1" - GroupName = "samples.operator.openshift.io" -) - -var ( - scheme = runtime.NewScheme() - GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = SchemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - AddToScheme(scheme) -} - -// addKnownTypes adds the set of types defined in this package to the supplied scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &Config{}, - &ConfigList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/vendor/github.com/openshift/api/samples/v1/types_config.go b/vendor/github.com/openshift/api/samples/v1/types_config.go deleted file mode 100644 index 8d2cf7df5..000000000 --- a/vendor/github.com/openshift/api/samples/v1/types_config.go +++ /dev/null @@ -1,277 +0,0 @@ -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Config contains the configuration and detailed condition status for the Samples Operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -// +kubebuilder:object:root=true -// +kubebuilder:subresource:status -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +kubebuilder:resource:path=configs,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/513 -// +openshift:file-pattern=operatorOrdering=00 -// +kubebuilder:metadata:annotations="description=Extension for configuring openshift samples operator." -// +kubebuilder:metadata:annotations="displayName=ConfigsSamples" -type Config struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - - // +required - Spec ConfigSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // +optional - Status ConfigStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// ConfigSpec contains the desired configuration and state for the Samples Operator, controlling -// various behavior around the imagestreams and templates it creates/updates in the -// openshift namespace. -type ConfigSpec struct { - // managementState is top level on/off type of switch for all operators. - // When "Managed", this operator processes config and manipulates the samples accordingly. - // When "Unmanaged", this operator ignores any updates to the resources it watches. - // When "Removed", it reacts that same wasy as it does if the Config object - // is deleted, meaning any ImageStreams or Templates it manages (i.e. it honors the skipped - // lists) and the registry secret are deleted, along with the ConfigMap in the operator's - // namespace that represents the last config used to manipulate the samples, - ManagementState operatorv1.ManagementState `json:"managementState,omitempty" protobuf:"bytes,1,opt,name=managementState"` - - // samplesRegistry allows for the specification of which registry is accessed - // by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library - // that are pulled into this github repository, but based on our pulling only ocp content it typically - // defaults to registry.redhat.io. - SamplesRegistry string `json:"samplesRegistry,omitempty" protobuf:"bytes,2,opt,name=samplesRegistry"` - - // architectures determine which hardware architecture(s) to install, where x86_64, ppc64le, and s390x are the only - // supported choices currently. - Architectures []string `json:"architectures,omitempty" protobuf:"bytes,4,opt,name=architectures"` - - // skippedImagestreams specifies names of image streams that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - SkippedImagestreams []string `json:"skippedImagestreams,omitempty" protobuf:"bytes,5,opt,name=skippedImagestreams"` - - // skippedTemplates specifies names of templates that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - SkippedTemplates []string `json:"skippedTemplates,omitempty" protobuf:"bytes,6,opt,name=skippedTemplates"` - - // skippedHelmCharts specifies names of helm charts that should NOT be - // managed. Admins can use this to allow them to delete content - // they don’t want. They will still have to MANUALLY DELETE the - // content but the operator will not recreate(or update) anything - // listed here. Few examples of the name of helmcharts which can be skipped are - // 'redhat-redhat-perl-imagestreams','redhat-redhat-nodejs-imagestreams','redhat-nginx-imagestreams', - // 'redhat-redhat-ruby-imagestreams','redhat-redhat-python-imagestreams','redhat-redhat-php-imagestreams', - // 'redhat-httpd-imagestreams','redhat-redhat-dotnet-imagestreams'. Rest of the names can be obtained from - // openshift console --> helmcharts -->installed helmcharts. This will display the list of all the - // 12 helmcharts(of imagestreams)being installed by Samples Operator. The skippedHelmCharts must be a - // valid Kubernetes resource name. May contain only lowercase alphanumeric characters, hyphens and periods, - // and each period separated segment must begin and end with an alphanumeric character. It must be non-empty - // and at most 253 characters in length - // +listType=set - // +kubebuilder:validation:MaxItems=16 - // +kubebuilder:validation:XValidation:rule="self.all(x, x.matches('^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$'))",message="skippedHelmCharts must be a valid Kubernetes resource name. May contain only lowercase alphanumeric characters, hyphens and periods, and each period separated segment must begin and end with an alphanumeric character" - SkippedHelmCharts []HelmChartName `json:"skippedHelmCharts,omitempty" protobuf:"bytes,7,opt,name=skippedhelmCharts"` -} - -// HelmChartName is a string alias that is used to represent the name of a helm chart. -// +kubebuilder:validation:MinLength=1 -// +kubebuilder:validation:MaxLength=253 -type HelmChartName string - -// ConfigStatus contains the actual configuration in effect, as well as various details -// that describe the state of the Samples Operator. -type ConfigStatus struct { - // managementState reflects the current operational status of the on/off switch for - // the operator. This operator compares the ManagementState as part of determining that we are turning - // the operator back on (i.e. "Managed") when it was previously "Unmanaged". - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - ManagementState operatorv1.ManagementState `json:"managementState,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=managementState"` - // conditions represents the available maintenance status of the sample - // imagestreams and templates. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Conditions []ConfigCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,2,rep,name=conditions"` - - // samplesRegistry allows for the specification of which registry is accessed - // by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library - // that are pulled into this github repository, but based on our pulling only ocp content it typically - // defaults to registry.redhat.io. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - SamplesRegistry string `json:"samplesRegistry,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,3,rep,name=samplesRegistry"` - - // architectures determine which hardware architecture(s) to install, where x86_64 and ppc64le are the - // supported choices. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Architectures []string `json:"architectures,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,5,rep,name=architectures"` - - // skippedImagestreams specifies names of image streams that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - SkippedImagestreams []string `json:"skippedImagestreams,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=skippedImagestreams"` - - // skippedTemplates specifies names of templates that should NOT be - // created/updated. Admins can use this to allow them to delete content - // they don’t want. They will still have to manually delete the - // content but the operator will not recreate(or update) anything - // listed here. - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - SkippedTemplates []string `json:"skippedTemplates,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,7,rep,name=skippedTemplates"` - - // version is the value of the operator's payload based version indicator when it was last successfully processed - // +patchMergeKey=type - // +patchStrategy=merge - // +optional - Version string `json:"version,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,8,rep,name=version"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type ConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata" protobuf:"bytes,1,opt,name=metadata"` - Items []Config `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -const ( - // SamplesRegistryCredentials is the name for a secret that contains a username+password/token - // for the registry, where if the secret is present, will be used for authentication. - // The corresponding secret is required to already be formatted as a - // dockerconfig secret so that it can just be copied - // to the openshift namespace - // for use during imagestream import. - SamplesRegistryCredentials = "samples-registry-credentials" - // ConfigName is the name/identifier of the static, singleton operator employed for the samples. - ConfigName = "cluster" - // X86Architecture is the value used to specify the x86_64 hardware architecture - // in the Architectures array field. - X86Architecture = "x86_64" - // AMDArchitecture is the golang value for x86 64 bit hardware architecture; for the purposes - // of this operator, it is equivalent to X86Architecture, which is kept for historical/migration - // purposes - AMDArchitecture = "amd64" - // ARMArchitecture is the value used to specify the aarch64 hardware architecture - // in the Architectures array field. - ARMArchitecture = "arm64" - // PPCArchitecture is the value used to specify the ppc64le hardware architecture - // in the Architectures array field. - PPCArchitecture = "ppc64le" - // S390Architecture is the value used to specify the s390x hardware architecture - // in the Architecture array field. - S390Architecture = "s390x" - // ConfigFinalizer is the text added to the Config.Finalizer field - // to enable finalizer processing. - ConfigFinalizer = GroupName + "/finalizer" - // SamplesManagedLabel is the key for a label added to all the imagestreams and templates - // in the openshift namespace that the Config is managing. This label is adjusted - // when changes to the SkippedImagestreams and SkippedTemplates fields are made. - SamplesManagedLabel = GroupName + "/managed" - // SamplesVersionAnnotation is the key for an annotation set on the imagestreams, templates, - // and secret that this operator manages that signifies the version of the operator that - // last managed the particular resource. - SamplesVersionAnnotation = GroupName + "/version" - // SamplesRecreateCredentialAnnotation is the key for an annotation set on the secret used - // for authentication when configuration moves from Removed to Managed but the associated secret - // in the openshift namespace does not exist. This will initiate creation of the credential - // in the openshift namespace. - SamplesRecreateCredentialAnnotation = GroupName + "/recreate" - // OperatorNamespace is the namespace the operator runs in. - OperatorNamespace = "openshift-cluster-samples-operator" -) - -type ConfigConditionType string - -// the valid conditions of the Config - -const ( - // ImportCredentialsExist represents the state of any credentials specified by - // the SamplesRegistry field in the Spec. - ImportCredentialsExist ConfigConditionType = "ImportCredentialsExist" - // SamplesExist represents whether an incoming Config has been successfully - // processed or not all, or whether the last Config to come in has been - // successfully processed. - SamplesExist ConfigConditionType = "SamplesExist" - // ConfigurationValid represents whether the latest Config to come in - // tried to make a support configuration change. Currently, changes to the - // InstallType and Architectures list after initial processing is not allowed. - ConfigurationValid ConfigConditionType = "ConfigurationValid" - // ImageChangesInProgress represents the state between where the samples operator has - // started updating the imagestreams and when the spec and status generations for each - // tag match. The list of imagestreams that are still in progress will be stored - // in the Reason field of the condition. The Reason field being empty corresponds - // with this condition being marked true. - ImageChangesInProgress ConfigConditionType = "ImageChangesInProgress" - // RemovePending represents whether the Config Spec ManagementState - // has been set to Removed, but we have not completed the deletion of the - // samples, pull secret, etc. and set the Config Spec ManagementState to Removed. - // Also note, while a samples creation/update cycle is still in progress, and ImageChagesInProgress - // is True, the operator will not initiate the deletions, as we - // do not want the create/updates and deletes of the samples to be occurring in parallel. - // So the actual Removed processing will be initated only after ImageChangesInProgress is set - // to false. Once the deletions are done, and the Status ManagementState is Removed, this - // condition is set back to False. Lastly, when this condition is set to True, the - // ClusterOperator Progressing condition will be set to True. - RemovePending ConfigConditionType = "RemovePending" - // MigrationInProgress represents the special case where the operator is running off of - // a new version of its image, and samples are deployed of a previous version. This condition - // facilitates the maintenance of this operator's ClusterOperator object. - MigrationInProgress ConfigConditionType = "MigrationInProgress" - // ImportImageErrorsExist registers any image import failures, separate from ImageChangeInProgress, - // so that we can a) indicate a problem to the ClusterOperator status, b) mark the current - // change cycle as complete in both ClusterOperator and Config; retry on import will - // occur by the next relist interval if it was an intermittent issue; - ImportImageErrorsExist ConfigConditionType = "ImportImageErrorsExist" -) - -// ConfigCondition captures various conditions of the Config -// as entries are processed. -type ConfigCondition struct { - // type of condition. - Type ConfigConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ConfigConditionType"` - // status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=k8s.io/kubernetes/pkg/api/v1.ConditionStatus"` - // lastUpdateTime is the last time this condition was updated. - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"` - // lastTransitionTime is the last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` - // reason is what caused the condition's last transition. - Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` - // message is a human readable message indicating details about the transition. - Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` -} diff --git a/vendor/github.com/openshift/api/samples/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/samples/v1/zz_generated.deepcopy.go deleted file mode 100644 index 115712beb..000000000 --- a/vendor/github.com/openshift/api/samples/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,163 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *Config) DeepCopyInto(out *Config) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Config. -func (in *Config) DeepCopy() *Config { - if in == nil { - return nil - } - out := new(Config) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Config) 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 *ConfigCondition) DeepCopyInto(out *ConfigCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigCondition. -func (in *ConfigCondition) DeepCopy() *ConfigCondition { - if in == nil { - return nil - } - out := new(ConfigCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigList) DeepCopyInto(out *ConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Config, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigList. -func (in *ConfigList) DeepCopy() *ConfigList { - if in == nil { - return nil - } - out := new(ConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigList) 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 *ConfigSpec) DeepCopyInto(out *ConfigSpec) { - *out = *in - if in.Architectures != nil { - in, out := &in.Architectures, &out.Architectures - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SkippedImagestreams != nil { - in, out := &in.SkippedImagestreams, &out.SkippedImagestreams - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SkippedTemplates != nil { - in, out := &in.SkippedTemplates, &out.SkippedTemplates - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SkippedHelmCharts != nil { - in, out := &in.SkippedHelmCharts, &out.SkippedHelmCharts - *out = make([]HelmChartName, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec. -func (in *ConfigSpec) DeepCopy() *ConfigSpec { - if in == nil { - return nil - } - out := new(ConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigStatus) DeepCopyInto(out *ConfigStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]ConfigCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Architectures != nil { - in, out := &in.Architectures, &out.Architectures - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SkippedImagestreams != nil { - in, out := &in.SkippedImagestreams, &out.SkippedImagestreams - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SkippedTemplates != nil { - in, out := &in.SkippedTemplates, &out.SkippedTemplates - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigStatus. -func (in *ConfigStatus) DeepCopy() *ConfigStatus { - if in == nil { - return nil - } - out := new(ConfigStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/samples/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/samples/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 87bf27b51..000000000 --- a/vendor/github.com/openshift/api/samples/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,23 +0,0 @@ -configs.samples.operator.openshift.io: - Annotations: - description: Extension for configuring openshift samples operator. - displayName: ConfigsSamples - ApprovedPRNumber: https://github.com/openshift/api/pull/513 - CRDName: configs.samples.operator.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "00" - FilenameRunLevel: "" - GroupName: samples.operator.openshift.io - HasStatus: true - KindName: Config - Labels: {} - PluralName: configs - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/samples/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/samples/v1/zz_generated.model_name.go deleted file mode 100644 index bf37632ab..000000000 --- a/vendor/github.com/openshift/api/samples/v1/zz_generated.model_name.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Config) OpenAPIModelName() string { - return "com.github.openshift.api.samples.v1.Config" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigCondition) OpenAPIModelName() string { - return "com.github.openshift.api.samples.v1.ConfigCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.samples.v1.ConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.samples.v1.ConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.samples.v1.ConfigStatus" -} diff --git a/vendor/github.com/openshift/api/samples/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/samples/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index b82e704d8..000000000 --- a/vendor/github.com/openshift/api/samples/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,75 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Config = map[string]string{ - "": "Config contains the configuration and detailed condition status for the Samples Operator.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (Config) SwaggerDoc() map[string]string { - return map_Config -} - -var map_ConfigCondition = map[string]string{ - "": "ConfigCondition captures various conditions of the Config as entries are processed.", - "type": "type of condition.", - "status": "status of the condition, one of True, False, Unknown.", - "lastUpdateTime": "lastUpdateTime is the last time this condition was updated.", - "lastTransitionTime": "lastTransitionTime is the last time the condition transitioned from one status to another.", - "reason": "reason is what caused the condition's last transition.", - "message": "message is a human readable message indicating details about the transition.", -} - -func (ConfigCondition) SwaggerDoc() map[string]string { - return map_ConfigCondition -} - -var map_ConfigList = map[string]string{ - "": "Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ConfigList) SwaggerDoc() map[string]string { - return map_ConfigList -} - -var map_ConfigSpec = map[string]string{ - "": "ConfigSpec contains the desired configuration and state for the Samples Operator, controlling various behavior around the imagestreams and templates it creates/updates in the openshift namespace.", - "managementState": "managementState is top level on/off type of switch for all operators. When \"Managed\", this operator processes config and manipulates the samples accordingly. When \"Unmanaged\", this operator ignores any updates to the resources it watches. When \"Removed\", it reacts that same wasy as it does if the Config object is deleted, meaning any ImageStreams or Templates it manages (i.e. it honors the skipped lists) and the registry secret are deleted, along with the ConfigMap in the operator's namespace that represents the last config used to manipulate the samples,", - "samplesRegistry": "samplesRegistry allows for the specification of which registry is accessed by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library that are pulled into this github repository, but based on our pulling only ocp content it typically defaults to registry.redhat.io.", - "architectures": "architectures determine which hardware architecture(s) to install, where x86_64, ppc64le, and s390x are the only supported choices currently.", - "skippedImagestreams": "skippedImagestreams specifies names of image streams that should NOT be created/updated. Admins can use this to allow them to delete content they don’t want. They will still have to manually delete the content but the operator will not recreate(or update) anything listed here.", - "skippedTemplates": "skippedTemplates specifies names of templates that should NOT be created/updated. Admins can use this to allow them to delete content they don’t want. They will still have to manually delete the content but the operator will not recreate(or update) anything listed here.", - "skippedHelmCharts": "skippedHelmCharts specifies names of helm charts that should NOT be managed. Admins can use this to allow them to delete content they don’t want. They will still have to MANUALLY DELETE the content but the operator will not recreate(or update) anything listed here. Few examples of the name of helmcharts which can be skipped are 'redhat-redhat-perl-imagestreams','redhat-redhat-nodejs-imagestreams','redhat-nginx-imagestreams', 'redhat-redhat-ruby-imagestreams','redhat-redhat-python-imagestreams','redhat-redhat-php-imagestreams', 'redhat-httpd-imagestreams','redhat-redhat-dotnet-imagestreams'. Rest of the names can be obtained from openshift console --> helmcharts -->installed helmcharts. This will display the list of all the 12 helmcharts(of imagestreams)being installed by Samples Operator. The skippedHelmCharts must be a valid Kubernetes resource name. May contain only lowercase alphanumeric characters, hyphens and periods, and each period separated segment must begin and end with an alphanumeric character. It must be non-empty and at most 253 characters in length", -} - -func (ConfigSpec) SwaggerDoc() map[string]string { - return map_ConfigSpec -} - -var map_ConfigStatus = map[string]string{ - "": "ConfigStatus contains the actual configuration in effect, as well as various details that describe the state of the Samples Operator.", - "managementState": "managementState reflects the current operational status of the on/off switch for the operator. This operator compares the ManagementState as part of determining that we are turning the operator back on (i.e. \"Managed\") when it was previously \"Unmanaged\".", - "conditions": "conditions represents the available maintenance status of the sample imagestreams and templates.", - "samplesRegistry": "samplesRegistry allows for the specification of which registry is accessed by the ImageStreams for their image content. Defaults on the content in https://github.com/openshift/library that are pulled into this github repository, but based on our pulling only ocp content it typically defaults to registry.redhat.io.", - "architectures": "architectures determine which hardware architecture(s) to install, where x86_64 and ppc64le are the supported choices.", - "skippedImagestreams": "skippedImagestreams specifies names of image streams that should NOT be created/updated. Admins can use this to allow them to delete content they don’t want. They will still have to manually delete the content but the operator will not recreate(or update) anything listed here.", - "skippedTemplates": "skippedTemplates specifies names of templates that should NOT be created/updated. Admins can use this to allow them to delete content they don’t want. They will still have to manually delete the content but the operator will not recreate(or update) anything listed here.", - "version": "version is the value of the operator's payload based version indicator when it was last successfully processed", -} - -func (ConfigStatus) SwaggerDoc() map[string]string { - return map_ConfigStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/security/.codegen.yaml b/vendor/github.com/openshift/api/security/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/security/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/security/install.go b/vendor/github.com/openshift/api/security/install.go deleted file mode 100644 index c2b04c432..000000000 --- a/vendor/github.com/openshift/api/security/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package security - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - securityv1 "github.com/openshift/api/security/v1" -) - -const ( - GroupName = "security.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(securityv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/security/v1/Makefile b/vendor/github.com/openshift/api/security/v1/Makefile deleted file mode 100644 index 096e6fa2c..000000000 --- a/vendor/github.com/openshift/api/security/v1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="security.openshift.io/v1" diff --git a/vendor/github.com/openshift/api/security/v1/consts.go b/vendor/github.com/openshift/api/security/v1/consts.go deleted file mode 100644 index 92147d3c5..000000000 --- a/vendor/github.com/openshift/api/security/v1/consts.go +++ /dev/null @@ -1,21 +0,0 @@ -package v1 - -const ( - UIDRangeAnnotation = "openshift.io/sa.scc.uid-range" - // SupplementalGroupsAnnotation contains a comma delimited list of allocated supplemental groups - // for the namespace. Groups are in the form of a Block which supports {start}/{length} or {start}-{end} - SupplementalGroupsAnnotation = "openshift.io/sa.scc.supplemental-groups" - MCSAnnotation = "openshift.io/sa.scc.mcs" - ValidatedSCCAnnotation = "openshift.io/scc" - // This annotation pins required SCCs for core OpenShift workloads to prevent preemption of custom SCCs. - // It is being used in the SCC admission plugin. - RequiredSCCAnnotation = "openshift.io/required-scc" - - // MinimallySufficientPodSecurityStandard indicates the PodSecurityStandard that matched the SCCs available to the users of the namespace. - MinimallySufficientPodSecurityStandard = "security.openshift.io/MinimallySufficientPodSecurityStandard" - - // ValidatedSCCSubjectTypeAnnotation indicates the subject type that allowed the - // SCC admission. This can be used by controllers to detect potential issues - // between user-driven SCC usage and the ServiceAccount-driven SCC usage. - ValidatedSCCSubjectTypeAnnotation = "security.openshift.io/validated-scc-subject-type" -) diff --git a/vendor/github.com/openshift/api/security/v1/doc.go b/vendor/github.com/openshift/api/security/v1/doc.go deleted file mode 100644 index 4379db030..000000000 --- a/vendor/github.com/openshift/api/security/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/security/apis/security -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.security.v1 - -// +groupName=security.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/security/v1/generated.pb.go b/vendor/github.com/openshift/api/security/v1/generated.pb.go deleted file mode 100644 index 608d2f010..000000000 --- a/vendor/github.com/openshift/api/security/v1/generated.pb.go +++ /dev/null @@ -1,4816 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/security/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v11 "k8s.io/api/core/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *AllowedFlexVolume) Reset() { *m = AllowedFlexVolume{} } - -func (m *FSGroupStrategyOptions) Reset() { *m = FSGroupStrategyOptions{} } - -func (m *IDRange) Reset() { *m = IDRange{} } - -func (m *PodSecurityPolicyReview) Reset() { *m = PodSecurityPolicyReview{} } - -func (m *PodSecurityPolicyReviewSpec) Reset() { *m = PodSecurityPolicyReviewSpec{} } - -func (m *PodSecurityPolicyReviewStatus) Reset() { *m = PodSecurityPolicyReviewStatus{} } - -func (m *PodSecurityPolicySelfSubjectReview) Reset() { *m = PodSecurityPolicySelfSubjectReview{} } - -func (m *PodSecurityPolicySelfSubjectReviewSpec) Reset() { - *m = PodSecurityPolicySelfSubjectReviewSpec{} -} - -func (m *PodSecurityPolicySubjectReview) Reset() { *m = PodSecurityPolicySubjectReview{} } - -func (m *PodSecurityPolicySubjectReviewSpec) Reset() { *m = PodSecurityPolicySubjectReviewSpec{} } - -func (m *PodSecurityPolicySubjectReviewStatus) Reset() { *m = PodSecurityPolicySubjectReviewStatus{} } - -func (m *RangeAllocation) Reset() { *m = RangeAllocation{} } - -func (m *RangeAllocationList) Reset() { *m = RangeAllocationList{} } - -func (m *RunAsUserStrategyOptions) Reset() { *m = RunAsUserStrategyOptions{} } - -func (m *SELinuxContextStrategyOptions) Reset() { *m = SELinuxContextStrategyOptions{} } - -func (m *SecurityContextConstraints) Reset() { *m = SecurityContextConstraints{} } - -func (m *SecurityContextConstraintsList) Reset() { *m = SecurityContextConstraintsList{} } - -func (m *ServiceAccountPodSecurityPolicyReviewStatus) Reset() { - *m = ServiceAccountPodSecurityPolicyReviewStatus{} -} - -func (m *SupplementalGroupsStrategyOptions) Reset() { *m = SupplementalGroupsStrategyOptions{} } - -func (m *AllowedFlexVolume) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AllowedFlexVolume) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AllowedFlexVolume) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Driver) - copy(dAtA[i:], m.Driver) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Driver))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *FSGroupStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FSGroupStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FSGroupStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ranges) > 0 { - for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *IDRange) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IDRange) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IDRange) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.Max)) - i-- - dAtA[i] = 0x10 - i = encodeVarintGenerated(dAtA, i, uint64(m.Min)) - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicyReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicyReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicyReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicyReviewSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicyReviewSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicyReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ServiceAccountNames) > 0 { - for iNdEx := len(m.ServiceAccountNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ServiceAccountNames[iNdEx]) - copy(dAtA[i:], m.ServiceAccountNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ServiceAccountNames[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicyReviewStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicyReviewStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicyReviewStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.AllowedServiceAccounts) > 0 { - for iNdEx := len(m.AllowedServiceAccounts) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllowedServiceAccounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicySelfSubjectReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicySelfSubjectReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicySelfSubjectReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicySelfSubjectReviewSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicySelfSubjectReviewSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicySelfSubjectReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicySubjectReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicySubjectReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicySubjectReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicySubjectReviewSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicySubjectReviewSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicySubjectReviewSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0x12 - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *PodSecurityPolicySubjectReviewStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PodSecurityPolicySubjectReviewStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PodSecurityPolicySubjectReviewStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x12 - if m.AllowedBy != nil { - { - size, err := m.AllowedBy.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RangeAllocation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RangeAllocation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RangeAllocation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Data != nil { - i -= len(m.Data) - copy(dAtA[i:], m.Data) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Data))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Range) - copy(dAtA[i:], m.Range) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Range))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RangeAllocationList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RangeAllocationList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RangeAllocationList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *RunAsUserStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RunAsUserStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *RunAsUserStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.UIDRangeMax != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.UIDRangeMax)) - i-- - dAtA[i] = 0x20 - } - if m.UIDRangeMin != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.UIDRangeMin)) - i-- - dAtA[i] = 0x18 - } - if m.UID != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.UID)) - i-- - dAtA[i] = 0x10 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SELinuxContextStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SELinuxContextStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SELinuxContextStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SELinuxOptions != nil { - { - size, err := m.SELinuxOptions.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecurityContextConstraints) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecurityContextConstraints) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecurityContextConstraints) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.UserNamespaceLevel) - copy(dAtA[i:], m.UserNamespaceLevel) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UserNamespaceLevel))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - if len(m.ForbiddenSysctls) > 0 { - for iNdEx := len(m.ForbiddenSysctls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ForbiddenSysctls[iNdEx]) - copy(dAtA[i:], m.ForbiddenSysctls[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ForbiddenSysctls[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - } - if len(m.AllowedUnsafeSysctls) > 0 { - for iNdEx := len(m.AllowedUnsafeSysctls) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowedUnsafeSysctls[iNdEx]) - copy(dAtA[i:], m.AllowedUnsafeSysctls[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllowedUnsafeSysctls[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - } - if m.AllowPrivilegeEscalation != nil { - i-- - if *m.AllowPrivilegeEscalation { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb8 - } - if m.DefaultAllowPrivilegeEscalation != nil { - i-- - if *m.DefaultAllowPrivilegeEscalation { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if len(m.AllowedFlexVolumes) > 0 { - for iNdEx := len(m.AllowedFlexVolumes) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllowedFlexVolumes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xaa - } - } - if len(m.SeccompProfiles) > 0 { - for iNdEx := len(m.SeccompProfiles) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.SeccompProfiles[iNdEx]) - copy(dAtA[i:], m.SeccompProfiles[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SeccompProfiles[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x9a - } - } - if len(m.Users) > 0 { - for iNdEx := len(m.Users) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Users[iNdEx]) - copy(dAtA[i:], m.Users[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Users[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x92 - } - } - i-- - if m.ReadOnlyRootFilesystem { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - { - size, err := m.FSGroup.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x82 - { - size, err := m.SupplementalGroups.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - { - size, err := m.RunAsUser.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - { - size, err := m.SELinuxContext.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - i-- - if m.AllowHostIPC { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - i-- - if m.AllowHostPID { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - i-- - if m.AllowHostPorts { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - i-- - if m.AllowHostNetwork { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x48 - if len(m.Volumes) > 0 { - for iNdEx := len(m.Volumes) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Volumes[iNdEx]) - copy(dAtA[i:], m.Volumes[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Volumes[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - i-- - if m.AllowHostDirVolumePlugin { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - if len(m.AllowedCapabilities) > 0 { - for iNdEx := len(m.AllowedCapabilities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AllowedCapabilities[iNdEx]) - copy(dAtA[i:], m.AllowedCapabilities[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.AllowedCapabilities[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - if len(m.RequiredDropCapabilities) > 0 { - for iNdEx := len(m.RequiredDropCapabilities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.RequiredDropCapabilities[iNdEx]) - copy(dAtA[i:], m.RequiredDropCapabilities[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequiredDropCapabilities[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.DefaultAddCapabilities) > 0 { - for iNdEx := len(m.DefaultAddCapabilities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.DefaultAddCapabilities[iNdEx]) - copy(dAtA[i:], m.DefaultAddCapabilities[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DefaultAddCapabilities[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - i-- - if m.AllowPrivilegedContainer { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - if m.Priority != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Priority)) - i-- - dAtA[i] = 0x10 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SecurityContextConstraintsList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SecurityContextConstraintsList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SecurityContextConstraintsList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceAccountPodSecurityPolicyReviewStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceAccountPodSecurityPolicyReviewStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceAccountPodSecurityPolicyReviewStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - { - size, err := m.PodSecurityPolicySubjectReviewStatus.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *SupplementalGroupsStrategyOptions) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SupplementalGroupsStrategyOptions) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SupplementalGroupsStrategyOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Ranges) > 0 { - for iNdEx := len(m.Ranges) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Ranges[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AllowedFlexVolume) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Driver) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *FSGroupStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Ranges) > 0 { - for _, e := range m.Ranges { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *IDRange) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 1 + sovGenerated(uint64(m.Min)) - n += 1 + sovGenerated(uint64(m.Max)) - return n -} - -func (m *PodSecurityPolicyReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PodSecurityPolicyReviewSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ServiceAccountNames) > 0 { - for _, s := range m.ServiceAccountNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PodSecurityPolicyReviewStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.AllowedServiceAccounts) > 0 { - for _, e := range m.AllowedServiceAccounts { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PodSecurityPolicySelfSubjectReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PodSecurityPolicySelfSubjectReviewSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PodSecurityPolicySubjectReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *PodSecurityPolicySubjectReviewSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.User) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *PodSecurityPolicySubjectReviewStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.AllowedBy != nil { - l = m.AllowedBy.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *RangeAllocation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Range) - n += 1 + l + sovGenerated(uint64(l)) - if m.Data != nil { - l = len(m.Data) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *RangeAllocationList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *RunAsUserStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.UID != nil { - n += 1 + sovGenerated(uint64(*m.UID)) - } - if m.UIDRangeMin != nil { - n += 1 + sovGenerated(uint64(*m.UIDRangeMin)) - } - if m.UIDRangeMax != nil { - n += 1 + sovGenerated(uint64(*m.UIDRangeMax)) - } - return n -} - -func (m *SELinuxContextStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if m.SELinuxOptions != nil { - l = m.SELinuxOptions.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *SecurityContextConstraints) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Priority != nil { - n += 1 + sovGenerated(uint64(*m.Priority)) - } - n += 2 - if len(m.DefaultAddCapabilities) > 0 { - for _, s := range m.DefaultAddCapabilities { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.RequiredDropCapabilities) > 0 { - for _, s := range m.RequiredDropCapabilities { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.AllowedCapabilities) > 0 { - for _, s := range m.AllowedCapabilities { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - if len(m.Volumes) > 0 { - for _, s := range m.Volumes { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - n += 2 - n += 2 - n += 2 - l = m.SELinuxContext.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.RunAsUser.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.SupplementalGroups.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.FSGroup.Size() - n += 2 + l + sovGenerated(uint64(l)) - n += 3 - if len(m.Users) > 0 { - for _, s := range m.Users { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.SeccompProfiles) > 0 { - for _, s := range m.SeccompProfiles { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.AllowedFlexVolumes) > 0 { - for _, e := range m.AllowedFlexVolumes { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.DefaultAllowPrivilegeEscalation != nil { - n += 3 - } - if m.AllowPrivilegeEscalation != nil { - n += 3 - } - if len(m.AllowedUnsafeSysctls) > 0 { - for _, s := range m.AllowedUnsafeSysctls { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.ForbiddenSysctls) > 0 { - for _, s := range m.ForbiddenSysctls { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - l = len(m.UserNamespaceLevel) - n += 2 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SecurityContextConstraintsList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceAccountPodSecurityPolicyReviewStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.PodSecurityPolicySubjectReviewStatus.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *SupplementalGroupsStrategyOptions) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Ranges) > 0 { - for _, e := range m.Ranges { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AllowedFlexVolume) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AllowedFlexVolume{`, - `Driver:` + fmt.Sprintf("%v", this.Driver) + `,`, - `}`, - }, "") - return s -} -func (this *FSGroupStrategyOptions) String() string { - if this == nil { - return "nil" - } - repeatedStringForRanges := "[]IDRange{" - for _, f := range this.Ranges { - repeatedStringForRanges += strings.Replace(strings.Replace(f.String(), "IDRange", "IDRange", 1), `&`, ``, 1) + "," - } - repeatedStringForRanges += "}" - s := strings.Join([]string{`&FSGroupStrategyOptions{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Ranges:` + repeatedStringForRanges + `,`, - `}`, - }, "") - return s -} -func (this *IDRange) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IDRange{`, - `Min:` + fmt.Sprintf("%v", this.Min) + `,`, - `Max:` + fmt.Sprintf("%v", this.Max) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicyReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicyReview{`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicyReviewSpec", "PodSecurityPolicyReviewSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSecurityPolicyReviewStatus", "PodSecurityPolicyReviewStatus", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicyReviewSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicyReviewSpec{`, - `Template:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v11.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `ServiceAccountNames:` + fmt.Sprintf("%v", this.ServiceAccountNames) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicyReviewStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForAllowedServiceAccounts := "[]ServiceAccountPodSecurityPolicyReviewStatus{" - for _, f := range this.AllowedServiceAccounts { - repeatedStringForAllowedServiceAccounts += strings.Replace(strings.Replace(f.String(), "ServiceAccountPodSecurityPolicyReviewStatus", "ServiceAccountPodSecurityPolicyReviewStatus", 1), `&`, ``, 1) + "," - } - repeatedStringForAllowedServiceAccounts += "}" - s := strings.Join([]string{`&PodSecurityPolicyReviewStatus{`, - `AllowedServiceAccounts:` + repeatedStringForAllowedServiceAccounts + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicySelfSubjectReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicySelfSubjectReview{`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySelfSubjectReviewSpec", "PodSecurityPolicySelfSubjectReviewSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSecurityPolicySubjectReviewStatus", "PodSecurityPolicySubjectReviewStatus", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicySelfSubjectReviewSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicySelfSubjectReviewSpec{`, - `Template:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v11.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicySubjectReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicySubjectReview{`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "PodSecurityPolicySubjectReviewSpec", "PodSecurityPolicySubjectReviewSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "PodSecurityPolicySubjectReviewStatus", "PodSecurityPolicySubjectReviewStatus", 1), `&`, ``, 1) + `,`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicySubjectReviewSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicySubjectReviewSpec{`, - `Template:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v11.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `User:` + fmt.Sprintf("%v", this.User) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `}`, - }, "") - return s -} -func (this *PodSecurityPolicySubjectReviewStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PodSecurityPolicySubjectReviewStatus{`, - `AllowedBy:` + strings.Replace(fmt.Sprintf("%v", this.AllowedBy), "ObjectReference", "v11.ObjectReference", 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Template:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Template), "PodTemplateSpec", "v11.PodTemplateSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *RangeAllocation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RangeAllocation{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Range:` + fmt.Sprintf("%v", this.Range) + `,`, - `Data:` + valueToStringGenerated(this.Data) + `,`, - `}`, - }, "") - return s -} -func (this *RangeAllocationList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]RangeAllocation{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "RangeAllocation", "RangeAllocation", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&RangeAllocationList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *RunAsUserStrategyOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RunAsUserStrategyOptions{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `UID:` + valueToStringGenerated(this.UID) + `,`, - `UIDRangeMin:` + valueToStringGenerated(this.UIDRangeMin) + `,`, - `UIDRangeMax:` + valueToStringGenerated(this.UIDRangeMax) + `,`, - `}`, - }, "") - return s -} -func (this *SELinuxContextStrategyOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SELinuxContextStrategyOptions{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `SELinuxOptions:` + strings.Replace(fmt.Sprintf("%v", this.SELinuxOptions), "SELinuxOptions", "v11.SELinuxOptions", 1) + `,`, - `}`, - }, "") - return s -} -func (this *SecurityContextConstraints) String() string { - if this == nil { - return "nil" - } - repeatedStringForAllowedFlexVolumes := "[]AllowedFlexVolume{" - for _, f := range this.AllowedFlexVolumes { - repeatedStringForAllowedFlexVolumes += strings.Replace(strings.Replace(f.String(), "AllowedFlexVolume", "AllowedFlexVolume", 1), `&`, ``, 1) + "," - } - repeatedStringForAllowedFlexVolumes += "}" - s := strings.Join([]string{`&SecurityContextConstraints{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Priority:` + valueToStringGenerated(this.Priority) + `,`, - `AllowPrivilegedContainer:` + fmt.Sprintf("%v", this.AllowPrivilegedContainer) + `,`, - `DefaultAddCapabilities:` + fmt.Sprintf("%v", this.DefaultAddCapabilities) + `,`, - `RequiredDropCapabilities:` + fmt.Sprintf("%v", this.RequiredDropCapabilities) + `,`, - `AllowedCapabilities:` + fmt.Sprintf("%v", this.AllowedCapabilities) + `,`, - `AllowHostDirVolumePlugin:` + fmt.Sprintf("%v", this.AllowHostDirVolumePlugin) + `,`, - `Volumes:` + fmt.Sprintf("%v", this.Volumes) + `,`, - `AllowHostNetwork:` + fmt.Sprintf("%v", this.AllowHostNetwork) + `,`, - `AllowHostPorts:` + fmt.Sprintf("%v", this.AllowHostPorts) + `,`, - `AllowHostPID:` + fmt.Sprintf("%v", this.AllowHostPID) + `,`, - `AllowHostIPC:` + fmt.Sprintf("%v", this.AllowHostIPC) + `,`, - `SELinuxContext:` + strings.Replace(strings.Replace(this.SELinuxContext.String(), "SELinuxContextStrategyOptions", "SELinuxContextStrategyOptions", 1), `&`, ``, 1) + `,`, - `RunAsUser:` + strings.Replace(strings.Replace(this.RunAsUser.String(), "RunAsUserStrategyOptions", "RunAsUserStrategyOptions", 1), `&`, ``, 1) + `,`, - `SupplementalGroups:` + strings.Replace(strings.Replace(this.SupplementalGroups.String(), "SupplementalGroupsStrategyOptions", "SupplementalGroupsStrategyOptions", 1), `&`, ``, 1) + `,`, - `FSGroup:` + strings.Replace(strings.Replace(this.FSGroup.String(), "FSGroupStrategyOptions", "FSGroupStrategyOptions", 1), `&`, ``, 1) + `,`, - `ReadOnlyRootFilesystem:` + fmt.Sprintf("%v", this.ReadOnlyRootFilesystem) + `,`, - `Users:` + fmt.Sprintf("%v", this.Users) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `SeccompProfiles:` + fmt.Sprintf("%v", this.SeccompProfiles) + `,`, - `AllowedFlexVolumes:` + repeatedStringForAllowedFlexVolumes + `,`, - `DefaultAllowPrivilegeEscalation:` + valueToStringGenerated(this.DefaultAllowPrivilegeEscalation) + `,`, - `AllowPrivilegeEscalation:` + valueToStringGenerated(this.AllowPrivilegeEscalation) + `,`, - `AllowedUnsafeSysctls:` + fmt.Sprintf("%v", this.AllowedUnsafeSysctls) + `,`, - `ForbiddenSysctls:` + fmt.Sprintf("%v", this.ForbiddenSysctls) + `,`, - `UserNamespaceLevel:` + fmt.Sprintf("%v", this.UserNamespaceLevel) + `,`, - `}`, - }, "") - return s -} -func (this *SecurityContextConstraintsList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]SecurityContextConstraints{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "SecurityContextConstraints", "SecurityContextConstraints", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&SecurityContextConstraintsList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *ServiceAccountPodSecurityPolicyReviewStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceAccountPodSecurityPolicyReviewStatus{`, - `PodSecurityPolicySubjectReviewStatus:` + strings.Replace(strings.Replace(this.PodSecurityPolicySubjectReviewStatus.String(), "PodSecurityPolicySubjectReviewStatus", "PodSecurityPolicySubjectReviewStatus", 1), `&`, ``, 1) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `}`, - }, "") - return s -} -func (this *SupplementalGroupsStrategyOptions) String() string { - if this == nil { - return "nil" - } - repeatedStringForRanges := "[]IDRange{" - for _, f := range this.Ranges { - repeatedStringForRanges += strings.Replace(strings.Replace(f.String(), "IDRange", "IDRange", 1), `&`, ``, 1) + "," - } - repeatedStringForRanges += "}" - s := strings.Join([]string{`&SupplementalGroupsStrategyOptions{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Ranges:` + repeatedStringForRanges + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AllowedFlexVolume) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AllowedFlexVolume: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AllowedFlexVolume: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Driver = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FSGroupStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FSGroupStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FSGroupStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = FSGroupStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ranges = append(m.Ranges, IDRange{}) - if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IDRange) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IDRange: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IDRange: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Min", wireType) - } - m.Min = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Min |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Max", wireType) - } - m.Max = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Max |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicyReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicyReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicyReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicyReviewSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicyReviewSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicyReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceAccountNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ServiceAccountNames = append(m.ServiceAccountNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicyReviewStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicyReviewStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicyReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedServiceAccounts", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedServiceAccounts = append(m.AllowedServiceAccounts, ServiceAccountPodSecurityPolicyReviewStatus{}) - if err := m.AllowedServiceAccounts[len(m.AllowedServiceAccounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicySelfSubjectReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicySelfSubjectReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicySelfSubjectReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicySelfSubjectReviewSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicySelfSubjectReviewSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicySelfSubjectReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicySubjectReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicySubjectReviewSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReviewSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReviewSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PodSecurityPolicySubjectReviewStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReviewStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PodSecurityPolicySubjectReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedBy", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AllowedBy == nil { - m.AllowedBy = &v11.ObjectReference{} - } - if err := m.AllowedBy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RangeAllocation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RangeAllocation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RangeAllocation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Range = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) - if m.Data == nil { - m.Data = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RangeAllocationList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RangeAllocationList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RangeAllocationList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, RangeAllocation{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *RunAsUserStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: RunAsUserStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: RunAsUserStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = RunAsUserStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UID = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UIDRangeMin", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UIDRangeMin = &v - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UIDRangeMax", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UIDRangeMax = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SELinuxContextStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SELinuxContextStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SELinuxContextStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = SELinuxContextStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SELinuxOptions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.SELinuxOptions == nil { - m.SELinuxOptions = &v11.SELinuxOptions{} - } - if err := m.SELinuxOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecurityContextConstraints) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecurityContextConstraints: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecurityContextConstraints: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Priority = &v - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowPrivilegedContainer", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowPrivilegedContainer = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultAddCapabilities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DefaultAddCapabilities = append(m.DefaultAddCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequiredDropCapabilities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequiredDropCapabilities = append(m.RequiredDropCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedCapabilities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedCapabilities = append(m.AllowedCapabilities, k8s_io_api_core_v1.Capability(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHostDirVolumePlugin", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowHostDirVolumePlugin = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Volumes = append(m.Volumes, FSType(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHostNetwork", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowHostNetwork = bool(v != 0) - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHostPorts", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowHostPorts = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHostPID", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowHostPID = bool(v != 0) - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowHostIPC", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.AllowHostIPC = bool(v != 0) - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SELinuxContext", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SELinuxContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RunAsUser", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.RunAsUser.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SupplementalGroups", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.SupplementalGroups.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 16: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FSGroup", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.FSGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadOnlyRootFilesystem", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ReadOnlyRootFilesystem = bool(v != 0) - case 18: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Users = append(m.Users, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 19: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SeccompProfiles", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SeccompProfiles = append(m.SeccompProfiles, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 21: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedFlexVolumes", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedFlexVolumes = append(m.AllowedFlexVolumes, AllowedFlexVolume{}) - if err := m.AllowedFlexVolumes[len(m.AllowedFlexVolumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultAllowPrivilegeEscalation", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.DefaultAllowPrivilegeEscalation = &b - case 23: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowPrivilegeEscalation", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.AllowPrivilegeEscalation = &b - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllowedUnsafeSysctls", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllowedUnsafeSysctls = append(m.AllowedUnsafeSysctls, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ForbiddenSysctls", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ForbiddenSysctls = append(m.ForbiddenSysctls, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserNamespaceLevel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UserNamespaceLevel = NamespaceLevelType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SecurityContextConstraintsList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SecurityContextConstraintsList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SecurityContextConstraintsList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, SecurityContextConstraints{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceAccountPodSecurityPolicyReviewStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceAccountPodSecurityPolicyReviewStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceAccountPodSecurityPolicyReviewStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PodSecurityPolicySubjectReviewStatus", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.PodSecurityPolicySubjectReviewStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SupplementalGroupsStrategyOptions) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SupplementalGroupsStrategyOptions: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = SupplementalGroupsStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Ranges = append(m.Ranges, IDRange{}) - if err := m.Ranges[len(m.Ranges)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/security/v1/generated.proto b/vendor/github.com/openshift/api/security/v1/generated.proto deleted file mode 100644 index bb8a37fc0..000000000 --- a/vendor/github.com/openshift/api/security/v1/generated.proto +++ /dev/null @@ -1,424 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.security.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/security/v1"; - -// AllowedFlexVolume represents a single Flexvolume that is allowed to be used. -message AllowedFlexVolume { - // driver is the name of the Flexvolume driver. - optional string driver = 1; -} - -// FSGroupStrategyOptions defines the strategy type and options used to create the strategy. -message FSGroupStrategyOptions { - // type is the strategy that will dictate what FSGroup is used in the SecurityContext. - optional string type = 1; - - // ranges are the allowed ranges of fs groups. If you would like to force a single - // fs group then supply a single range with the same start and end. - // +listType=atomic - repeated IDRange ranges = 2; -} - -// IDRange provides a min/max of an allowed range of IDs. -// TODO: this could be reused for UIDs. -message IDRange { - // min is the start of the range, inclusive. - optional int64 min = 1; - - // max is the end of the range, inclusive. - optional int64 max = 2; -} - -// PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -message PodSecurityPolicyReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 3; - - // spec is the PodSecurityPolicy to check. - optional PodSecurityPolicyReviewSpec spec = 1; - - // status represents the current information/status for the PodSecurityPolicyReview. - optional PodSecurityPolicyReviewStatus status = 2; -} - -// PodSecurityPolicyReviewSpec defines specification for PodSecurityPolicyReview -message PodSecurityPolicyReviewSpec { - // template is the PodTemplateSpec to check. The template.spec.serviceAccountName field is used - // if serviceAccountNames is empty, unless the template.spec.serviceAccountName is empty, - // in which case "default" is used. - // If serviceAccountNames is specified, template.spec.serviceAccountName is ignored. - optional .k8s.io.api.core.v1.PodTemplateSpec template = 1; - - // serviceAccountNames is an optional set of ServiceAccounts to run the check with. - // If serviceAccountNames is empty, the template.spec.serviceAccountName is used, - // unless it's empty, in which case "default" is used instead. - // If serviceAccountNames is specified, template.spec.serviceAccountName is ignored. - repeated string serviceAccountNames = 2; -} - -// PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview. -message PodSecurityPolicyReviewStatus { - // allowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec. - // +optional - repeated ServiceAccountPodSecurityPolicyReviewStatus allowedServiceAccounts = 1; -} - -// PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -message PodSecurityPolicySelfSubjectReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 3; - - // spec defines specification the PodSecurityPolicySelfSubjectReview. - optional PodSecurityPolicySelfSubjectReviewSpec spec = 1; - - // status represents the current information/status for the PodSecurityPolicySelfSubjectReview. - optional PodSecurityPolicySubjectReviewStatus status = 2; -} - -// PodSecurityPolicySelfSubjectReviewSpec contains specification for PodSecurityPolicySelfSubjectReview. -message PodSecurityPolicySelfSubjectReviewSpec { - // template is the PodTemplateSpec to check. - optional .k8s.io.api.core.v1.PodTemplateSpec template = 1; -} - -// PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -message PodSecurityPolicySubjectReview { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 3; - - // spec defines specification for the PodSecurityPolicySubjectReview. - optional PodSecurityPolicySubjectReviewSpec spec = 1; - - // status represents the current information/status for the PodSecurityPolicySubjectReview. - optional PodSecurityPolicySubjectReviewStatus status = 2; -} - -// PodSecurityPolicySubjectReviewSpec defines specification for PodSecurityPolicySubjectReview -message PodSecurityPolicySubjectReviewSpec { - // template is the PodTemplateSpec to check. If template.spec.serviceAccountName is empty it will not be defaulted. - // If its non-empty, it will be checked. - optional .k8s.io.api.core.v1.PodTemplateSpec template = 1; - - // user is the user you're testing for. - // If you specify "user" but not "group", then is it interpreted as "What if user were not a member of any groups. - // If user and groups are empty, then the check is performed using *only* the serviceAccountName in the template. - optional string user = 2; - - // groups is the groups you're testing for. - repeated string groups = 3; -} - -// PodSecurityPolicySubjectReviewStatus contains information/status for PodSecurityPolicySubjectReview. -message PodSecurityPolicySubjectReviewStatus { - // allowedBy is a reference to the rule that allows the PodTemplateSpec. - // A rule can be a SecurityContextConstraint or a PodSecurityPolicy - // A `nil`, indicates that it was denied. - // +optional - optional .k8s.io.api.core.v1.ObjectReference allowedBy = 1; - - // A machine-readable description of why this operation is in the - // "Failure" status. If this value is empty there - // is no information available. - // +optional - optional string reason = 2; - - // template is the PodTemplateSpec after the defaulting is applied. - // +optional - optional .k8s.io.api.core.v1.PodTemplateSpec template = 3; -} - -// RangeAllocation is used so we can easily expose a RangeAllocation typed for security group -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -message RangeAllocation { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // range is a string representing a unique label for a range of uids, "1000000000-2000000000/10000". - optional string range = 2; - - // data is a byte array representing the serialized state of a range allocation. It is a bitmap - // with each bit set to one to represent a range is taken. - optional bytes data = 3; -} - -// RangeAllocationList is a list of RangeAllocations objects -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message RangeAllocationList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of RangeAllocations. - repeated RangeAllocation items = 2; -} - -// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. -message RunAsUserStrategyOptions { - // type is the strategy that will dictate what RunAsUser is used in the SecurityContext. - optional string type = 1; - - // uid is the user id that containers must run as. Required for the MustRunAs strategy if not using - // namespace/service account allocated uids. - optional int64 uid = 2; - - // uidRangeMin defines the min value for a strategy that allocates by range. - optional int64 uidRangeMin = 3; - - // uidRangeMax defines the max value for a strategy that allocates by range. - optional int64 uidRangeMax = 4; -} - -// SELinuxContextStrategyOptions defines the strategy type and any options used to create the strategy. -message SELinuxContextStrategyOptions { - // type is the strategy that will dictate what SELinux context is used in the SecurityContext. - optional string type = 1; - - // seLinuxOptions required to run as; required for MustRunAs - optional .k8s.io.api.core.v1.SELinuxOptions seLinuxOptions = 2; -} - -// SecurityContextConstraints governs the ability to make requests that affect the SecurityContext -// that will be applied to a container. -// For historical reasons SCC was exposed under the core Kubernetes API group. -// That exposure is deprecated and will be removed in a future release - users -// should instead use the security.openshift.io group to manage -// SecurityContextConstraints. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=securitycontextconstraints,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_03,operatorName=config-operator,operatorOrdering=01 -// +kubebuilder:printcolumn:name="Priv",type=string,JSONPath=.allowPrivilegedContainer,description="Determines if a container can request to be run as privileged" -// +kubebuilder:printcolumn:name="Caps",type=string,JSONPath=.allowedCapabilities,description="A list of capabilities that can be requested to add to the container" -// +kubebuilder:printcolumn:name="SELinux",type=string,JSONPath=.seLinuxContext.type,description="Strategy that will dictate what labels will be set in the SecurityContext" -// +kubebuilder:printcolumn:name="RunAsUser",type=string,JSONPath=.runAsUser.type,description="Strategy that will dictate what RunAsUser is used in the SecurityContext" -// +kubebuilder:printcolumn:name="FSGroup",type=string,JSONPath=.fsGroup.type,description="Strategy that will dictate what fs group is used by the SecurityContext" -// +kubebuilder:printcolumn:name="SupGroup",type=string,JSONPath=.supplementalGroups.type,description="Strategy that will dictate what supplemental groups are used by the SecurityContext" -// +kubebuilder:printcolumn:name="Priority",type=string,JSONPath=.priority,description="Sort order of SCCs" -// +kubebuilder:printcolumn:name="ReadOnlyRootFS",type=string,JSONPath=.readOnlyRootFilesystem,description="Force containers to run with a read only root file system" -// +kubebuilder:printcolumn:name="Volumes",type=string,JSONPath=.volumes,description="White list of allowed volume plugins" -// +kubebuilder:singular=securitycontextconstraint -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -message SecurityContextConstraints { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // priority influences the sort order of SCCs when evaluating which SCCs to try first for - // a given pod request based on access in the Users and Groups fields. The higher the int, the - // higher priority. An unset value is considered a 0 priority. If scores - // for multiple SCCs are equal they will be sorted from most restrictive to - // least restrictive. If both priorities and restrictions are equal the - // SCCs will be sorted by name. - // +nullable - optional int32 priority = 2; - - // allowPrivilegedContainer determines if a container can request to be run as privileged. - optional bool allowPrivilegedContainer = 3; - - // defaultAddCapabilities is the default set of capabilities that will be added to the container - // unless the pod spec specifically drops the capability. You may not list a capability in both - // DefaultAddCapabilities and RequiredDropCapabilities. - // +nullable - // +listType=atomic - repeated string defaultAddCapabilities = 4; - - // requiredDropCapabilities are the capabilities that will be dropped from the container. These - // are required to be dropped and cannot be added. - // +nullable - // +listType=atomic - repeated string requiredDropCapabilities = 5; - - // allowedCapabilities is a list of capabilities that can be requested to add to the container. - // Capabilities in this field maybe added at the pod author's discretion. - // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. - // To allow all capabilities you may use '*'. - // +nullable - // +listType=atomic - repeated string allowedCapabilities = 6; - - // allowHostDirVolumePlugin determines if the policy allow containers to use the HostDir volume plugin - // +k8s:conversion-gen=false - optional bool allowHostDirVolumePlugin = 7; - - // volumes is a white list of allowed volume plugins. FSType corresponds directly with the field names - // of a VolumeSource (azureFile, configMap, emptyDir). To allow all volumes you may use "*". - // To allow no volumes, set to ["none"]. - // +nullable - // +listType=atomic - repeated string volumes = 8; - - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all - // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes - // is allowed in the "Volumes" field. - // +optional - // +nullable - // +listType=atomic - repeated AllowedFlexVolume allowedFlexVolumes = 21; - - // allowHostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - optional bool allowHostNetwork = 9; - - // allowHostPorts determines if the policy allows host ports in the containers. - optional bool allowHostPorts = 10; - - // allowHostPID determines if the policy allows host pid in the containers. - optional bool allowHostPID = 11; - - // allowHostIPC determines if the policy allows host ipc in the containers. - optional bool allowHostIPC = 12; - - // userNamespaceLevel determines if the policy allows host users in containers. - // Valid values are "AllowHostLevel", "RequirePodLevel", and omitted. - // When "AllowHostLevel" is set, a pod author may set `hostUsers` to either `true` or `false`. - // When "RequirePodLevel" is set, a pod author must set `hostUsers` to `false`. - // When omitted, the default value is "AllowHostLevel". - // +kubebuilder:validation:Enum="AllowHostLevel";"RequirePodLevel" - // +kubebuilder:default:="AllowHostLevel" - // +default="AllowHostLevel" - // +optional - optional string userNamespaceLevel = 26; - - // defaultAllowPrivilegeEscalation controls the default setting for whether a - // process can gain more privileges than its parent process. - // +optional - // +nullable - optional bool defaultAllowPrivilegeEscalation = 22; - - // allowPrivilegeEscalation determines if a pod can request to allow - // privilege escalation. If unspecified, defaults to true. - // +optional - // +nullable - optional bool allowPrivilegeEscalation = 23; - - // seLinuxContext is the strategy that will dictate what labels will be set in the SecurityContext. - // +nullable - optional SELinuxContextStrategyOptions seLinuxContext = 13; - - // runAsUser is the strategy that will dictate what RunAsUser is used in the SecurityContext. - // +nullable - optional RunAsUserStrategyOptions runAsUser = 14; - - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - // +nullable - optional SupplementalGroupsStrategyOptions supplementalGroups = 15; - - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - // +nullable - optional FSGroupStrategyOptions fsGroup = 16; - - // readOnlyRootFilesystem when set to true will force containers to run with a read only root file - // system. If the container specifically requests to run with a non-read only root file system - // the SCC should deny the pod. - // If set to false the container may run with a read only root file system if it wishes but it - // will not be forced to. - optional bool readOnlyRootFilesystem = 17; - - // The users who have permissions to use this security context constraints - // +optional - // +nullable - // +listType=atomic - repeated string users = 18; - - // The groups that have permission to use this security context constraints - // +optional - // +nullable - // +listType=atomic - repeated string groups = 19; - - // seccompProfiles lists the allowed profiles that may be set for the pod or - // container's seccomp annotations. An unset (nil) or empty value means that no profiles may - // be specified by the pod or container. The wildcard '*' may be used to allow all profiles. When - // used to generate a value for a pod the first non-wildcard profile will be used as - // the default. - // +nullable - // +listType=atomic - repeated string seccompProfiles = 20; - - // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. - // Each entry is either a plain sysctl name or ends in "*" in which case it is considered - // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. - // - // Examples: - // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. - // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. - // +optional - // +nullable - // +listType=atomic - repeated string allowedUnsafeSysctls = 24; - - // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. - // Each entry is either a plain sysctl name or ends in "*" in which case it is considered - // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. - // - // Examples: - // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. - // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. - // +optional - // +nullable - // +listType=atomic - repeated string forbiddenSysctls = 25; -} - -// SecurityContextConstraintsList is a list of SecurityContextConstraints objects -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message SecurityContextConstraintsList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // List of security context constraints. - repeated SecurityContextConstraints items = 2; -} - -// ServiceAccountPodSecurityPolicyReviewStatus represents ServiceAccount name and related review status -message ServiceAccountPodSecurityPolicyReviewStatus { - optional PodSecurityPolicySubjectReviewStatus podSecurityPolicySubjectReviewStatus = 1; - - // name contains the allowed and the denied ServiceAccount name - optional string name = 2; -} - -// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. -message SupplementalGroupsStrategyOptions { - // type is the strategy that will dictate what supplemental groups is used in the SecurityContext. - optional string type = 1; - - // ranges are the allowed ranges of supplemental groups. If you would like to force a single - // supplemental group then supply a single range with the same start and end. - // +listType=atomic - repeated IDRange ranges = 2; -} - diff --git a/vendor/github.com/openshift/api/security/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/security/v1/generated.protomessage.pb.go deleted file mode 100644 index de536ddeb..000000000 --- a/vendor/github.com/openshift/api/security/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*AllowedFlexVolume) ProtoMessage() {} - -func (*FSGroupStrategyOptions) ProtoMessage() {} - -func (*IDRange) ProtoMessage() {} - -func (*PodSecurityPolicyReview) ProtoMessage() {} - -func (*PodSecurityPolicyReviewSpec) ProtoMessage() {} - -func (*PodSecurityPolicyReviewStatus) ProtoMessage() {} - -func (*PodSecurityPolicySelfSubjectReview) ProtoMessage() {} - -func (*PodSecurityPolicySelfSubjectReviewSpec) ProtoMessage() {} - -func (*PodSecurityPolicySubjectReview) ProtoMessage() {} - -func (*PodSecurityPolicySubjectReviewSpec) ProtoMessage() {} - -func (*PodSecurityPolicySubjectReviewStatus) ProtoMessage() {} - -func (*RangeAllocation) ProtoMessage() {} - -func (*RangeAllocationList) ProtoMessage() {} - -func (*RunAsUserStrategyOptions) ProtoMessage() {} - -func (*SELinuxContextStrategyOptions) ProtoMessage() {} - -func (*SecurityContextConstraints) ProtoMessage() {} - -func (*SecurityContextConstraintsList) ProtoMessage() {} - -func (*ServiceAccountPodSecurityPolicyReviewStatus) ProtoMessage() {} - -func (*SupplementalGroupsStrategyOptions) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/security/v1/legacy.go b/vendor/github.com/openshift/api/security/v1/legacy.go deleted file mode 100644 index 34f609a07..000000000 --- a/vendor/github.com/openshift/api/security/v1/legacy.go +++ /dev/null @@ -1,25 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &SecurityContextConstraints{}, - &SecurityContextConstraintsList{}, - &PodSecurityPolicySubjectReview{}, - &PodSecurityPolicySelfSubjectReview{}, - &PodSecurityPolicyReview{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/security/v1/register.go b/vendor/github.com/openshift/api/security/v1/register.go deleted file mode 100644 index 431c3b539..000000000 --- a/vendor/github.com/openshift/api/security/v1/register.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "security.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &SecurityContextConstraints{}, - &SecurityContextConstraintsList{}, - &PodSecurityPolicySubjectReview{}, - &PodSecurityPolicySelfSubjectReview{}, - &PodSecurityPolicyReview{}, - &RangeAllocation{}, - &RangeAllocationList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/security/v1/types.go b/vendor/github.com/openshift/api/security/v1/types.go deleted file mode 100644 index 8972b0dd6..000000000 --- a/vendor/github.com/openshift/api/security/v1/types.go +++ /dev/null @@ -1,521 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AllowAllCapabilities can be used as a value for the -// SecurityContextConstraints.AllowAllCapabilities field and means that any -// capabilities are allowed to be requested. -var AllowAllCapabilities corev1.Capability = "*" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SecurityContextConstraints governs the ability to make requests that affect the SecurityContext -// that will be applied to a container. -// For historical reasons SCC was exposed under the core Kubernetes API group. -// That exposure is deprecated and will be removed in a future release - users -// should instead use the security.openshift.io group to manage -// SecurityContextConstraints. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=securitycontextconstraints,scope=Cluster -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/470 -// +openshift:file-pattern=cvoRunLevel=0000_03,operatorName=config-operator,operatorOrdering=01 -// +kubebuilder:printcolumn:name="Priv",type=string,JSONPath=.allowPrivilegedContainer,description="Determines if a container can request to be run as privileged" -// +kubebuilder:printcolumn:name="Caps",type=string,JSONPath=.allowedCapabilities,description="A list of capabilities that can be requested to add to the container" -// +kubebuilder:printcolumn:name="SELinux",type=string,JSONPath=.seLinuxContext.type,description="Strategy that will dictate what labels will be set in the SecurityContext" -// +kubebuilder:printcolumn:name="RunAsUser",type=string,JSONPath=.runAsUser.type,description="Strategy that will dictate what RunAsUser is used in the SecurityContext" -// +kubebuilder:printcolumn:name="FSGroup",type=string,JSONPath=.fsGroup.type,description="Strategy that will dictate what fs group is used by the SecurityContext" -// +kubebuilder:printcolumn:name="SupGroup",type=string,JSONPath=.supplementalGroups.type,description="Strategy that will dictate what supplemental groups are used by the SecurityContext" -// +kubebuilder:printcolumn:name="Priority",type=string,JSONPath=.priority,description="Sort order of SCCs" -// +kubebuilder:printcolumn:name="ReadOnlyRootFS",type=string,JSONPath=.readOnlyRootFilesystem,description="Force containers to run with a read only root file system" -// +kubebuilder:printcolumn:name="Volumes",type=string,JSONPath=.volumes,description="White list of allowed volume plugins" -// +kubebuilder:singular=securitycontextconstraint -// +openshift:compatibility-gen:level=1 -// +kubebuilder:metadata:annotations=release.openshift.io/bootstrap-required=true -type SecurityContextConstraints struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // priority influences the sort order of SCCs when evaluating which SCCs to try first for - // a given pod request based on access in the Users and Groups fields. The higher the int, the - // higher priority. An unset value is considered a 0 priority. If scores - // for multiple SCCs are equal they will be sorted from most restrictive to - // least restrictive. If both priorities and restrictions are equal the - // SCCs will be sorted by name. - // +nullable - Priority *int32 `json:"priority" protobuf:"varint,2,opt,name=priority"` - - // allowPrivilegedContainer determines if a container can request to be run as privileged. - AllowPrivilegedContainer bool `json:"allowPrivilegedContainer" protobuf:"varint,3,opt,name=allowPrivilegedContainer"` - // defaultAddCapabilities is the default set of capabilities that will be added to the container - // unless the pod spec specifically drops the capability. You may not list a capability in both - // DefaultAddCapabilities and RequiredDropCapabilities. - // +nullable - // +listType=atomic - DefaultAddCapabilities []corev1.Capability `json:"defaultAddCapabilities" protobuf:"bytes,4,rep,name=defaultAddCapabilities,casttype=Capability"` - // requiredDropCapabilities are the capabilities that will be dropped from the container. These - // are required to be dropped and cannot be added. - // +nullable - // +listType=atomic - RequiredDropCapabilities []corev1.Capability `json:"requiredDropCapabilities" protobuf:"bytes,5,rep,name=requiredDropCapabilities,casttype=Capability"` - // allowedCapabilities is a list of capabilities that can be requested to add to the container. - // Capabilities in this field maybe added at the pod author's discretion. - // You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. - // To allow all capabilities you may use '*'. - // +nullable - // +listType=atomic - AllowedCapabilities []corev1.Capability `json:"allowedCapabilities" protobuf:"bytes,6,rep,name=allowedCapabilities,casttype=Capability"` - // allowHostDirVolumePlugin determines if the policy allow containers to use the HostDir volume plugin - // +k8s:conversion-gen=false - AllowHostDirVolumePlugin bool `json:"allowHostDirVolumePlugin" protobuf:"varint,7,opt,name=allowHostDirVolumePlugin"` - // volumes is a white list of allowed volume plugins. FSType corresponds directly with the field names - // of a VolumeSource (azureFile, configMap, emptyDir). To allow all volumes you may use "*". - // To allow no volumes, set to ["none"]. - // +nullable - // +listType=atomic - Volumes []FSType `json:"volumes" protobuf:"bytes,8,rep,name=volumes,casttype=FSType"` - // allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all - // Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes - // is allowed in the "Volumes" field. - // +optional - // +nullable - // +listType=atomic - AllowedFlexVolumes []AllowedFlexVolume `json:"allowedFlexVolumes,omitempty" protobuf:"bytes,21,rep,name=allowedFlexVolumes"` - // allowHostNetwork determines if the policy allows the use of HostNetwork in the pod spec. - AllowHostNetwork bool `json:"allowHostNetwork" protobuf:"varint,9,opt,name=allowHostNetwork"` - // allowHostPorts determines if the policy allows host ports in the containers. - AllowHostPorts bool `json:"allowHostPorts" protobuf:"varint,10,opt,name=allowHostPorts"` - // allowHostPID determines if the policy allows host pid in the containers. - AllowHostPID bool `json:"allowHostPID" protobuf:"varint,11,opt,name=allowHostPID"` - // allowHostIPC determines if the policy allows host ipc in the containers. - AllowHostIPC bool `json:"allowHostIPC" protobuf:"varint,12,opt,name=allowHostIPC"` - // userNamespaceLevel determines if the policy allows host users in containers. - // Valid values are "AllowHostLevel", "RequirePodLevel", and omitted. - // When "AllowHostLevel" is set, a pod author may set `hostUsers` to either `true` or `false`. - // When "RequirePodLevel" is set, a pod author must set `hostUsers` to `false`. - // When omitted, the default value is "AllowHostLevel". - // +kubebuilder:validation:Enum="AllowHostLevel";"RequirePodLevel" - // +kubebuilder:default:="AllowHostLevel" - // +default="AllowHostLevel" - // +optional - UserNamespaceLevel NamespaceLevelType `json:"userNamespaceLevel,omitempty" protobuf:"bytes,26,opt,name=userNamespaceLevel"` - // defaultAllowPrivilegeEscalation controls the default setting for whether a - // process can gain more privileges than its parent process. - // +optional - // +nullable - DefaultAllowPrivilegeEscalation *bool `json:"defaultAllowPrivilegeEscalation,omitempty" protobuf:"varint,22,rep,name=defaultAllowPrivilegeEscalation"` - // allowPrivilegeEscalation determines if a pod can request to allow - // privilege escalation. If unspecified, defaults to true. - // +optional - // +nullable - AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty" protobuf:"varint,23,rep,name=allowPrivilegeEscalation"` - // seLinuxContext is the strategy that will dictate what labels will be set in the SecurityContext. - // +nullable - SELinuxContext SELinuxContextStrategyOptions `json:"seLinuxContext,omitempty" protobuf:"bytes,13,opt,name=seLinuxContext"` - // runAsUser is the strategy that will dictate what RunAsUser is used in the SecurityContext. - // +nullable - RunAsUser RunAsUserStrategyOptions `json:"runAsUser,omitempty" protobuf:"bytes,14,opt,name=runAsUser"` - // supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext. - // +nullable - SupplementalGroups SupplementalGroupsStrategyOptions `json:"supplementalGroups,omitempty" protobuf:"bytes,15,opt,name=supplementalGroups"` - // fsGroup is the strategy that will dictate what fs group is used by the SecurityContext. - // +nullable - FSGroup FSGroupStrategyOptions `json:"fsGroup,omitempty" protobuf:"bytes,16,opt,name=fsGroup"` - // readOnlyRootFilesystem when set to true will force containers to run with a read only root file - // system. If the container specifically requests to run with a non-read only root file system - // the SCC should deny the pod. - // If set to false the container may run with a read only root file system if it wishes but it - // will not be forced to. - ReadOnlyRootFilesystem bool `json:"readOnlyRootFilesystem" protobuf:"varint,17,opt,name=readOnlyRootFilesystem"` - - // The users who have permissions to use this security context constraints - // +optional - // +nullable - // +listType=atomic - Users []string `json:"users" protobuf:"bytes,18,rep,name=users"` - // The groups that have permission to use this security context constraints - // +optional - // +nullable - // +listType=atomic - Groups []string `json:"groups" protobuf:"bytes,19,rep,name=groups"` - - // seccompProfiles lists the allowed profiles that may be set for the pod or - // container's seccomp annotations. An unset (nil) or empty value means that no profiles may - // be specified by the pod or container. The wildcard '*' may be used to allow all profiles. When - // used to generate a value for a pod the first non-wildcard profile will be used as - // the default. - // +nullable - // +listType=atomic - SeccompProfiles []string `json:"seccompProfiles,omitempty" protobuf:"bytes,20,opt,name=seccompProfiles"` - - // allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. - // Each entry is either a plain sysctl name or ends in "*" in which case it is considered - // as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. - // Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection. - // - // Examples: - // e.g. "foo/*" allows "foo/bar", "foo/baz", etc. - // e.g. "foo.*" allows "foo.bar", "foo.baz", etc. - // +optional - // +nullable - // +listType=atomic - AllowedUnsafeSysctls []string `json:"allowedUnsafeSysctls,omitempty" protobuf:"bytes,24,rep,name=allowedUnsafeSysctls"` - // forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. - // Each entry is either a plain sysctl name or ends in "*" in which case it is considered - // as a prefix of forbidden sysctls. Single * means all sysctls are forbidden. - // - // Examples: - // e.g. "foo/*" forbids "foo/bar", "foo/baz", etc. - // e.g. "foo.*" forbids "foo.bar", "foo.baz", etc. - // +optional - // +nullable - // +listType=atomic - ForbiddenSysctls []string `json:"forbiddenSysctls,omitempty" protobuf:"bytes,25,rep,name=forbiddenSysctls"` -} - -// FS Type gives strong typing to different file systems that are used by volumes. -type FSType string - -var ( - FSTypeAzureFile FSType = "azureFile" - FSTypeAzureDisk FSType = "azureDisk" - FSTypeFlocker FSType = "flocker" - FSTypeFlexVolume FSType = "flexVolume" - FSTypeHostPath FSType = "hostPath" - FSTypeEmptyDir FSType = "emptyDir" - FSTypeGCEPersistentDisk FSType = "gcePersistentDisk" - FSTypeAWSElasticBlockStore FSType = "awsElasticBlockStore" - FSTypeGitRepo FSType = "gitRepo" - FSTypeSecret FSType = "secret" - FSTypeNFS FSType = "nfs" - FSTypeISCSI FSType = "iscsi" - FSTypeGlusterfs FSType = "glusterfs" - FSTypePersistentVolumeClaim FSType = "persistentVolumeClaim" - FSTypeRBD FSType = "rbd" - FSTypeCinder FSType = "cinder" - FSTypeCephFS FSType = "cephFS" - FSTypeDownwardAPI FSType = "downwardAPI" - FSTypeFC FSType = "fc" - FSTypeConfigMap FSType = "configMap" - FSTypeVsphereVolume FSType = "vsphere" - FSTypeQuobyte FSType = "quobyte" - FSTypePhotonPersistentDisk FSType = "photonPersistentDisk" - FSProjected FSType = "projected" - FSPortworxVolume FSType = "portworxVolume" - FSScaleIO FSType = "scaleIO" - FSStorageOS FSType = "storageOS" - FSTypeCSI FSType = "csi" - FSTypeEphemeral FSType = "ephemeral" - FSTypeImage FSType = "image" - FSTypeServiceAccountToken FSType = "serviceAccountToken" - FSTypeAll FSType = "*" - FSTypeNone FSType = "none" -) - -// AllowedFlexVolume represents a single Flexvolume that is allowed to be used. -type AllowedFlexVolume struct { - // driver is the name of the Flexvolume driver. - Driver string `json:"driver" protobuf:"bytes,1,opt,name=driver"` -} - -// SELinuxContextStrategyOptions defines the strategy type and any options used to create the strategy. -type SELinuxContextStrategyOptions struct { - // type is the strategy that will dictate what SELinux context is used in the SecurityContext. - Type SELinuxContextStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=SELinuxContextStrategyType"` - // seLinuxOptions required to run as; required for MustRunAs - SELinuxOptions *corev1.SELinuxOptions `json:"seLinuxOptions,omitempty" protobuf:"bytes,2,opt,name=seLinuxOptions"` -} - -// RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy. -type RunAsUserStrategyOptions struct { - // type is the strategy that will dictate what RunAsUser is used in the SecurityContext. - Type RunAsUserStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=RunAsUserStrategyType"` - // uid is the user id that containers must run as. Required for the MustRunAs strategy if not using - // namespace/service account allocated uids. - UID *int64 `json:"uid,omitempty" protobuf:"varint,2,opt,name=uid"` - // uidRangeMin defines the min value for a strategy that allocates by range. - UIDRangeMin *int64 `json:"uidRangeMin,omitempty" protobuf:"varint,3,opt,name=uidRangeMin"` - // uidRangeMax defines the max value for a strategy that allocates by range. - UIDRangeMax *int64 `json:"uidRangeMax,omitempty" protobuf:"varint,4,opt,name=uidRangeMax"` -} - -// FSGroupStrategyOptions defines the strategy type and options used to create the strategy. -type FSGroupStrategyOptions struct { - // type is the strategy that will dictate what FSGroup is used in the SecurityContext. - Type FSGroupStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=FSGroupStrategyType"` - // ranges are the allowed ranges of fs groups. If you would like to force a single - // fs group then supply a single range with the same start and end. - // +listType=atomic - Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` -} - -// SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy. -type SupplementalGroupsStrategyOptions struct { - // type is the strategy that will dictate what supplemental groups is used in the SecurityContext. - Type SupplementalGroupsStrategyType `json:"type,omitempty" protobuf:"bytes,1,opt,name=type,casttype=SupplementalGroupsStrategyType"` - // ranges are the allowed ranges of supplemental groups. If you would like to force a single - // supplemental group then supply a single range with the same start and end. - // +listType=atomic - Ranges []IDRange `json:"ranges,omitempty" protobuf:"bytes,2,rep,name=ranges"` -} - -// IDRange provides a min/max of an allowed range of IDs. -// TODO: this could be reused for UIDs. -type IDRange struct { - // min is the start of the range, inclusive. - Min int64 `json:"min,omitempty" protobuf:"varint,1,opt,name=min"` - // max is the end of the range, inclusive. - Max int64 `json:"max,omitempty" protobuf:"varint,2,opt,name=max"` -} - -// NamespaceLevelType shows the allowable values for the UserNamespaceLevel field. -type NamespaceLevelType string - -// SELinuxContextStrategyType denotes strategy types for generating SELinux options for a -// SecurityContext -type SELinuxContextStrategyType string - -// RunAsUserStrategyType denotes strategy types for generating RunAsUser values for a -// SecurityContext -type RunAsUserStrategyType string - -// SupplementalGroupsStrategyType denotes strategy types for determining valid supplemental -// groups for a SecurityContext. -type SupplementalGroupsStrategyType string - -// FSGroupStrategyType denotes strategy types for generating FSGroup values for a -// SecurityContext -type FSGroupStrategyType string - -const ( - // NamespaceLevelAllowHost allows a pod to set `hostUsers` field to either `true` or `false` - NamespaceLevelAllowHost NamespaceLevelType = "AllowHostLevel" - // NamespaceLevelRequirePod requires the `hostUsers` field be `false` in a pod. - NamespaceLevelRequirePod NamespaceLevelType = "RequirePodLevel" - - // container must have SELinux labels of X applied. - SELinuxStrategyMustRunAs SELinuxContextStrategyType = "MustRunAs" - // container may make requests for any SELinux context labels. - SELinuxStrategyRunAsAny SELinuxContextStrategyType = "RunAsAny" - - // container must run as a particular uid. - RunAsUserStrategyMustRunAs RunAsUserStrategyType = "MustRunAs" - // container must run as a particular uid. - RunAsUserStrategyMustRunAsRange RunAsUserStrategyType = "MustRunAsRange" - // container must run as a non-root uid - RunAsUserStrategyMustRunAsNonRoot RunAsUserStrategyType = "MustRunAsNonRoot" - // container may make requests for any uid. - RunAsUserStrategyRunAsAny RunAsUserStrategyType = "RunAsAny" - - // container must have FSGroup of X applied. - FSGroupStrategyMustRunAs FSGroupStrategyType = "MustRunAs" - // container may make requests for any FSGroup labels. - FSGroupStrategyRunAsAny FSGroupStrategyType = "RunAsAny" - - // container must run as a particular gid. - SupplementalGroupsStrategyMustRunAs SupplementalGroupsStrategyType = "MustRunAs" - // container may make requests for any gid. - SupplementalGroupsStrategyRunAsAny SupplementalGroupsStrategyType = "RunAsAny" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SecurityContextConstraintsList is a list of SecurityContextConstraints objects -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type SecurityContextConstraintsList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of security context constraints. - Items []SecurityContextConstraints `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type PodSecurityPolicySubjectReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"` - - // spec defines specification for the PodSecurityPolicySubjectReview. - Spec PodSecurityPolicySubjectReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"` - - // status represents the current information/status for the PodSecurityPolicySubjectReview. - Status PodSecurityPolicySubjectReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// PodSecurityPolicySubjectReviewSpec defines specification for PodSecurityPolicySubjectReview -type PodSecurityPolicySubjectReviewSpec struct { - // template is the PodTemplateSpec to check. If template.spec.serviceAccountName is empty it will not be defaulted. - // If its non-empty, it will be checked. - Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,1,opt,name=template"` - - // user is the user you're testing for. - // If you specify "user" but not "group", then is it interpreted as "What if user were not a member of any groups. - // If user and groups are empty, then the check is performed using *only* the serviceAccountName in the template. - User string `json:"user,omitempty" protobuf:"bytes,2,opt,name=user"` - - // groups is the groups you're testing for. - Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` -} - -// PodSecurityPolicySubjectReviewStatus contains information/status for PodSecurityPolicySubjectReview. -type PodSecurityPolicySubjectReviewStatus struct { - // allowedBy is a reference to the rule that allows the PodTemplateSpec. - // A rule can be a SecurityContextConstraint or a PodSecurityPolicy - // A `nil`, indicates that it was denied. - // +optional - AllowedBy *corev1.ObjectReference `json:"allowedBy,omitempty" protobuf:"bytes,1,opt,name=allowedBy"` - - // A machine-readable description of why this operation is in the - // "Failure" status. If this value is empty there - // is no information available. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,2,opt,name=reason"` - - // template is the PodTemplateSpec after the defaulting is applied. - // +optional - Template corev1.PodTemplateSpec `json:"template,omitempty" protobuf:"bytes,3,opt,name=template"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type PodSecurityPolicySelfSubjectReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"` - - // spec defines specification the PodSecurityPolicySelfSubjectReview. - Spec PodSecurityPolicySelfSubjectReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"` - - // status represents the current information/status for the PodSecurityPolicySelfSubjectReview. - Status PodSecurityPolicySubjectReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// PodSecurityPolicySelfSubjectReviewSpec contains specification for PodSecurityPolicySelfSubjectReview. -type PodSecurityPolicySelfSubjectReviewSpec struct { - // template is the PodTemplateSpec to check. - Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,1,opt,name=template"` -} - -// +genclient -// +genclient:onlyVerbs=create -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question. -// -// Compatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=2 -type PodSecurityPolicyReview struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,3,opt,name=metadata"` - - // spec is the PodSecurityPolicy to check. - Spec PodSecurityPolicyReviewSpec `json:"spec" protobuf:"bytes,1,opt,name=spec"` - - // status represents the current information/status for the PodSecurityPolicyReview. - Status PodSecurityPolicyReviewStatus `json:"status,omitempty" protobuf:"bytes,2,opt,name=status"` -} - -// PodSecurityPolicyReviewSpec defines specification for PodSecurityPolicyReview -type PodSecurityPolicyReviewSpec struct { - // template is the PodTemplateSpec to check. The template.spec.serviceAccountName field is used - // if serviceAccountNames is empty, unless the template.spec.serviceAccountName is empty, - // in which case "default" is used. - // If serviceAccountNames is specified, template.spec.serviceAccountName is ignored. - Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,1,opt,name=template"` - - // serviceAccountNames is an optional set of ServiceAccounts to run the check with. - // If serviceAccountNames is empty, the template.spec.serviceAccountName is used, - // unless it's empty, in which case "default" is used instead. - // If serviceAccountNames is specified, template.spec.serviceAccountName is ignored. - ServiceAccountNames []string `json:"serviceAccountNames,omitempty" protobuf:"bytes,2,rep,name=serviceAccountNames"` // TODO: find a way to express 'all service accounts' -} - -// PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview. -type PodSecurityPolicyReviewStatus struct { - // allowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec. - // +optional - AllowedServiceAccounts []ServiceAccountPodSecurityPolicyReviewStatus `json:"allowedServiceAccounts" protobuf:"bytes,1,rep,name=allowedServiceAccounts"` -} - -// ServiceAccountPodSecurityPolicyReviewStatus represents ServiceAccount name and related review status -type ServiceAccountPodSecurityPolicyReviewStatus struct { - PodSecurityPolicySubjectReviewStatus `json:",inline" protobuf:"bytes,1,opt,name=podSecurityPolicySubjectReviewStatus"` - - // name contains the allowed and the denied ServiceAccount name - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RangeAllocation is used so we can easily expose a RangeAllocation typed for security group -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type RangeAllocation struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // range is a string representing a unique label for a range of uids, "1000000000-2000000000/10000". - Range string `json:"range" protobuf:"bytes,2,opt,name=range"` - - // data is a byte array representing the serialized state of a range allocation. It is a bitmap - // with each bit set to one to represent a range is taken. - Data []byte `json:"data" protobuf:"bytes,3,opt,name=data"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// RangeAllocationList is a list of RangeAllocations objects -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type RangeAllocationList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // List of RangeAllocations. - Items []RangeAllocation `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go deleted file mode 100644 index d6263fc02..000000000 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,536 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - 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 *AllowedFlexVolume) DeepCopyInto(out *AllowedFlexVolume) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AllowedFlexVolume. -func (in *AllowedFlexVolume) DeepCopy() *AllowedFlexVolume { - if in == nil { - return nil - } - out := new(AllowedFlexVolume) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FSGroupStrategyOptions) DeepCopyInto(out *FSGroupStrategyOptions) { - *out = *in - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]IDRange, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FSGroupStrategyOptions. -func (in *FSGroupStrategyOptions) DeepCopy() *FSGroupStrategyOptions { - if in == nil { - return nil - } - out := new(FSGroupStrategyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IDRange) DeepCopyInto(out *IDRange) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IDRange. -func (in *IDRange) DeepCopy() *IDRange { - if in == nil { - return nil - } - out := new(IDRange) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicyReview) DeepCopyInto(out *PodSecurityPolicyReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyReview. -func (in *PodSecurityPolicyReview) DeepCopy() *PodSecurityPolicyReview { - if in == nil { - return nil - } - out := new(PodSecurityPolicyReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityPolicyReview) 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 *PodSecurityPolicyReviewSpec) DeepCopyInto(out *PodSecurityPolicyReviewSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - if in.ServiceAccountNames != nil { - in, out := &in.ServiceAccountNames, &out.ServiceAccountNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyReviewSpec. -func (in *PodSecurityPolicyReviewSpec) DeepCopy() *PodSecurityPolicyReviewSpec { - if in == nil { - return nil - } - out := new(PodSecurityPolicyReviewSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicyReviewStatus) DeepCopyInto(out *PodSecurityPolicyReviewStatus) { - *out = *in - if in.AllowedServiceAccounts != nil { - in, out := &in.AllowedServiceAccounts, &out.AllowedServiceAccounts - *out = make([]ServiceAccountPodSecurityPolicyReviewStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyReviewStatus. -func (in *PodSecurityPolicyReviewStatus) DeepCopy() *PodSecurityPolicyReviewStatus { - if in == nil { - return nil - } - out := new(PodSecurityPolicyReviewStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicySelfSubjectReview) DeepCopyInto(out *PodSecurityPolicySelfSubjectReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySelfSubjectReview. -func (in *PodSecurityPolicySelfSubjectReview) DeepCopy() *PodSecurityPolicySelfSubjectReview { - if in == nil { - return nil - } - out := new(PodSecurityPolicySelfSubjectReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityPolicySelfSubjectReview) 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 *PodSecurityPolicySelfSubjectReviewSpec) DeepCopyInto(out *PodSecurityPolicySelfSubjectReviewSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySelfSubjectReviewSpec. -func (in *PodSecurityPolicySelfSubjectReviewSpec) DeepCopy() *PodSecurityPolicySelfSubjectReviewSpec { - if in == nil { - return nil - } - out := new(PodSecurityPolicySelfSubjectReviewSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicySubjectReview) DeepCopyInto(out *PodSecurityPolicySubjectReview) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySubjectReview. -func (in *PodSecurityPolicySubjectReview) DeepCopy() *PodSecurityPolicySubjectReview { - if in == nil { - return nil - } - out := new(PodSecurityPolicySubjectReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityPolicySubjectReview) 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 *PodSecurityPolicySubjectReviewSpec) DeepCopyInto(out *PodSecurityPolicySubjectReviewSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySubjectReviewSpec. -func (in *PodSecurityPolicySubjectReviewSpec) DeepCopy() *PodSecurityPolicySubjectReviewSpec { - if in == nil { - return nil - } - out := new(PodSecurityPolicySubjectReviewSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicySubjectReviewStatus) DeepCopyInto(out *PodSecurityPolicySubjectReviewStatus) { - *out = *in - if in.AllowedBy != nil { - in, out := &in.AllowedBy, &out.AllowedBy - *out = new(corev1.ObjectReference) - **out = **in - } - in.Template.DeepCopyInto(&out.Template) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicySubjectReviewStatus. -func (in *PodSecurityPolicySubjectReviewStatus) DeepCopy() *PodSecurityPolicySubjectReviewStatus { - if in == nil { - return nil - } - out := new(PodSecurityPolicySubjectReviewStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RangeAllocation) DeepCopyInto(out *RangeAllocation) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Data != nil { - in, out := &in.Data, &out.Data - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RangeAllocation. -func (in *RangeAllocation) DeepCopy() *RangeAllocation { - if in == nil { - return nil - } - out := new(RangeAllocation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RangeAllocation) 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 *RangeAllocationList) DeepCopyInto(out *RangeAllocationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RangeAllocation, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RangeAllocationList. -func (in *RangeAllocationList) DeepCopy() *RangeAllocationList { - if in == nil { - return nil - } - out := new(RangeAllocationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RangeAllocationList) 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 *RunAsUserStrategyOptions) DeepCopyInto(out *RunAsUserStrategyOptions) { - *out = *in - if in.UID != nil { - in, out := &in.UID, &out.UID - *out = new(int64) - **out = **in - } - if in.UIDRangeMin != nil { - in, out := &in.UIDRangeMin, &out.UIDRangeMin - *out = new(int64) - **out = **in - } - if in.UIDRangeMax != nil { - in, out := &in.UIDRangeMax, &out.UIDRangeMax - *out = new(int64) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunAsUserStrategyOptions. -func (in *RunAsUserStrategyOptions) DeepCopy() *RunAsUserStrategyOptions { - if in == nil { - return nil - } - out := new(RunAsUserStrategyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SELinuxContextStrategyOptions) DeepCopyInto(out *SELinuxContextStrategyOptions) { - *out = *in - if in.SELinuxOptions != nil { - in, out := &in.SELinuxOptions, &out.SELinuxOptions - *out = new(corev1.SELinuxOptions) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SELinuxContextStrategyOptions. -func (in *SELinuxContextStrategyOptions) DeepCopy() *SELinuxContextStrategyOptions { - if in == nil { - return nil - } - out := new(SELinuxContextStrategyOptions) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecurityContextConstraints) DeepCopyInto(out *SecurityContextConstraints) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Priority != nil { - in, out := &in.Priority, &out.Priority - *out = new(int32) - **out = **in - } - if in.DefaultAddCapabilities != nil { - in, out := &in.DefaultAddCapabilities, &out.DefaultAddCapabilities - *out = make([]corev1.Capability, len(*in)) - copy(*out, *in) - } - if in.RequiredDropCapabilities != nil { - in, out := &in.RequiredDropCapabilities, &out.RequiredDropCapabilities - *out = make([]corev1.Capability, len(*in)) - copy(*out, *in) - } - if in.AllowedCapabilities != nil { - in, out := &in.AllowedCapabilities, &out.AllowedCapabilities - *out = make([]corev1.Capability, len(*in)) - copy(*out, *in) - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]FSType, len(*in)) - copy(*out, *in) - } - if in.AllowedFlexVolumes != nil { - in, out := &in.AllowedFlexVolumes, &out.AllowedFlexVolumes - *out = make([]AllowedFlexVolume, len(*in)) - copy(*out, *in) - } - if in.DefaultAllowPrivilegeEscalation != nil { - in, out := &in.DefaultAllowPrivilegeEscalation, &out.DefaultAllowPrivilegeEscalation - *out = new(bool) - **out = **in - } - if in.AllowPrivilegeEscalation != nil { - in, out := &in.AllowPrivilegeEscalation, &out.AllowPrivilegeEscalation - *out = new(bool) - **out = **in - } - in.SELinuxContext.DeepCopyInto(&out.SELinuxContext) - in.RunAsUser.DeepCopyInto(&out.RunAsUser) - in.SupplementalGroups.DeepCopyInto(&out.SupplementalGroups) - in.FSGroup.DeepCopyInto(&out.FSGroup) - if in.Users != nil { - in, out := &in.Users, &out.Users - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.SeccompProfiles != nil { - in, out := &in.SeccompProfiles, &out.SeccompProfiles - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowedUnsafeSysctls != nil { - in, out := &in.AllowedUnsafeSysctls, &out.AllowedUnsafeSysctls - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.ForbiddenSysctls != nil { - in, out := &in.ForbiddenSysctls, &out.ForbiddenSysctls - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContextConstraints. -func (in *SecurityContextConstraints) DeepCopy() *SecurityContextConstraints { - if in == nil { - return nil - } - out := new(SecurityContextConstraints) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecurityContextConstraints) 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 *SecurityContextConstraintsList) DeepCopyInto(out *SecurityContextConstraintsList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SecurityContextConstraints, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecurityContextConstraintsList. -func (in *SecurityContextConstraintsList) DeepCopy() *SecurityContextConstraintsList { - if in == nil { - return nil - } - out := new(SecurityContextConstraintsList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecurityContextConstraintsList) 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 *ServiceAccountPodSecurityPolicyReviewStatus) DeepCopyInto(out *ServiceAccountPodSecurityPolicyReviewStatus) { - *out = *in - in.PodSecurityPolicySubjectReviewStatus.DeepCopyInto(&out.PodSecurityPolicySubjectReviewStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountPodSecurityPolicyReviewStatus. -func (in *ServiceAccountPodSecurityPolicyReviewStatus) DeepCopy() *ServiceAccountPodSecurityPolicyReviewStatus { - if in == nil { - return nil - } - out := new(ServiceAccountPodSecurityPolicyReviewStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SupplementalGroupsStrategyOptions) DeepCopyInto(out *SupplementalGroupsStrategyOptions) { - *out = *in - if in.Ranges != nil { - in, out := &in.Ranges, &out.Ranges - *out = make([]IDRange, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SupplementalGroupsStrategyOptions. -func (in *SupplementalGroupsStrategyOptions) DeepCopy() *SupplementalGroupsStrategyOptions { - if in == nil { - return nil - } - out := new(SupplementalGroupsStrategyOptions) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/security/v1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 86f78058a..000000000 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,59 +0,0 @@ -securitycontextconstraints.security.openshift.io: - Annotations: - release.openshift.io/bootstrap-required: "true" - ApprovedPRNumber: https://github.com/openshift/api/pull/470 - CRDName: securitycontextconstraints.security.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: config-operator - FilenameOperatorOrdering: "01" - FilenameRunLevel: "0000_03" - GroupName: security.openshift.io - HasStatus: false - KindName: SecurityContextConstraints - Labels: {} - PluralName: securitycontextconstraints - PrinterColumns: - - description: Determines if a container can request to be run as privileged - jsonPath: .allowPrivilegedContainer - name: Priv - type: string - - description: A list of capabilities that can be requested to add to the container - jsonPath: .allowedCapabilities - name: Caps - type: string - - description: Strategy that will dictate what labels will be set in the SecurityContext - jsonPath: .seLinuxContext.type - name: SELinux - type: string - - description: Strategy that will dictate what RunAsUser is used in the SecurityContext - jsonPath: .runAsUser.type - name: RunAsUser - type: string - - description: Strategy that will dictate what fs group is used by the SecurityContext - jsonPath: .fsGroup.type - name: FSGroup - type: string - - description: Strategy that will dictate what supplemental groups are used by the - SecurityContext - jsonPath: .supplementalGroups.type - name: SupGroup - type: string - - description: Sort order of SCCs - jsonPath: .priority - name: Priority - type: string - - description: Force containers to run with a read only root file system - jsonPath: .readOnlyRootFilesystem - name: ReadOnlyRootFS - type: string - - description: White list of allowed volume plugins - jsonPath: .volumes - name: Volumes - type: string - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1 - diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/security/v1/zz_generated.model_name.go deleted file mode 100644 index 74df1ce10..000000000 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.model_name.go +++ /dev/null @@ -1,101 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AllowedFlexVolume) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.AllowedFlexVolume" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in FSGroupStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.FSGroupStrategyOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IDRange) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.IDRange" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicyReview) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicyReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicyReviewSpec) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicyReviewSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicyReviewStatus) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicyReviewStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicySelfSubjectReview) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicySelfSubjectReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicySelfSubjectReviewSpec) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicySelfSubjectReviewSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicySubjectReview) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicySubjectReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicySubjectReviewSpec) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicySubjectReviewSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in PodSecurityPolicySubjectReviewStatus) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.PodSecurityPolicySubjectReviewStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RangeAllocation) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.RangeAllocation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RangeAllocationList) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.RangeAllocationList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in RunAsUserStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.RunAsUserStrategyOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SELinuxContextStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.SELinuxContextStrategyOptions" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityContextConstraints) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.SecurityContextConstraints" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SecurityContextConstraintsList) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.SecurityContextConstraintsList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceAccountPodSecurityPolicyReviewStatus) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.ServiceAccountPodSecurityPolicyReviewStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SupplementalGroupsStrategyOptions) OpenAPIModelName() string { - return "com.github.openshift.api.security.v1.SupplementalGroupsStrategyOptions" -} diff --git a/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 67882a66e..000000000 --- a/vendor/github.com/openshift/api/security/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,232 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_AllowedFlexVolume = map[string]string{ - "": "AllowedFlexVolume represents a single Flexvolume that is allowed to be used.", - "driver": "driver is the name of the Flexvolume driver.", -} - -func (AllowedFlexVolume) SwaggerDoc() map[string]string { - return map_AllowedFlexVolume -} - -var map_FSGroupStrategyOptions = map[string]string{ - "": "FSGroupStrategyOptions defines the strategy type and options used to create the strategy.", - "type": "type is the strategy that will dictate what FSGroup is used in the SecurityContext.", - "ranges": "ranges are the allowed ranges of fs groups. If you would like to force a single fs group then supply a single range with the same start and end.", -} - -func (FSGroupStrategyOptions) SwaggerDoc() map[string]string { - return map_FSGroupStrategyOptions -} - -var map_IDRange = map[string]string{ - "": "IDRange provides a min/max of an allowed range of IDs.", - "min": "min is the start of the range, inclusive.", - "max": "max is the end of the range, inclusive.", -} - -func (IDRange) SwaggerDoc() map[string]string { - return map_IDRange -} - -var map_PodSecurityPolicyReview = map[string]string{ - "": "PodSecurityPolicyReview checks which service accounts (not users, since that would be cluster-wide) can create the `PodTemplateSpec` in question.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the PodSecurityPolicy to check.", - "status": "status represents the current information/status for the PodSecurityPolicyReview.", -} - -func (PodSecurityPolicyReview) SwaggerDoc() map[string]string { - return map_PodSecurityPolicyReview -} - -var map_PodSecurityPolicyReviewSpec = map[string]string{ - "": "PodSecurityPolicyReviewSpec defines specification for PodSecurityPolicyReview", - "template": "template is the PodTemplateSpec to check. The template.spec.serviceAccountName field is used if serviceAccountNames is empty, unless the template.spec.serviceAccountName is empty, in which case \"default\" is used. If serviceAccountNames is specified, template.spec.serviceAccountName is ignored.", - "serviceAccountNames": "serviceAccountNames is an optional set of ServiceAccounts to run the check with. If serviceAccountNames is empty, the template.spec.serviceAccountName is used, unless it's empty, in which case \"default\" is used instead. If serviceAccountNames is specified, template.spec.serviceAccountName is ignored.", -} - -func (PodSecurityPolicyReviewSpec) SwaggerDoc() map[string]string { - return map_PodSecurityPolicyReviewSpec -} - -var map_PodSecurityPolicyReviewStatus = map[string]string{ - "": "PodSecurityPolicyReviewStatus represents the status of PodSecurityPolicyReview.", - "allowedServiceAccounts": "allowedServiceAccounts returns the list of service accounts in *this* namespace that have the power to create the PodTemplateSpec.", -} - -func (PodSecurityPolicyReviewStatus) SwaggerDoc() map[string]string { - return map_PodSecurityPolicyReviewStatus -} - -var map_PodSecurityPolicySelfSubjectReview = map[string]string{ - "": "PodSecurityPolicySelfSubjectReview checks whether this user/SA tuple can create the PodTemplateSpec\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines specification the PodSecurityPolicySelfSubjectReview.", - "status": "status represents the current information/status for the PodSecurityPolicySelfSubjectReview.", -} - -func (PodSecurityPolicySelfSubjectReview) SwaggerDoc() map[string]string { - return map_PodSecurityPolicySelfSubjectReview -} - -var map_PodSecurityPolicySelfSubjectReviewSpec = map[string]string{ - "": "PodSecurityPolicySelfSubjectReviewSpec contains specification for PodSecurityPolicySelfSubjectReview.", - "template": "template is the PodTemplateSpec to check.", -} - -func (PodSecurityPolicySelfSubjectReviewSpec) SwaggerDoc() map[string]string { - return map_PodSecurityPolicySelfSubjectReviewSpec -} - -var map_PodSecurityPolicySubjectReview = map[string]string{ - "": "PodSecurityPolicySubjectReview checks whether a particular user/SA tuple can create the PodTemplateSpec.\n\nCompatibility level 2: Stable within a major release for a minimum of 9 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec defines specification for the PodSecurityPolicySubjectReview.", - "status": "status represents the current information/status for the PodSecurityPolicySubjectReview.", -} - -func (PodSecurityPolicySubjectReview) SwaggerDoc() map[string]string { - return map_PodSecurityPolicySubjectReview -} - -var map_PodSecurityPolicySubjectReviewSpec = map[string]string{ - "": "PodSecurityPolicySubjectReviewSpec defines specification for PodSecurityPolicySubjectReview", - "template": "template is the PodTemplateSpec to check. If template.spec.serviceAccountName is empty it will not be defaulted. If its non-empty, it will be checked.", - "user": "user is the user you're testing for. If you specify \"user\" but not \"group\", then is it interpreted as \"What if user were not a member of any groups. If user and groups are empty, then the check is performed using *only* the serviceAccountName in the template.", - "groups": "groups is the groups you're testing for.", -} - -func (PodSecurityPolicySubjectReviewSpec) SwaggerDoc() map[string]string { - return map_PodSecurityPolicySubjectReviewSpec -} - -var map_PodSecurityPolicySubjectReviewStatus = map[string]string{ - "": "PodSecurityPolicySubjectReviewStatus contains information/status for PodSecurityPolicySubjectReview.", - "allowedBy": "allowedBy is a reference to the rule that allows the PodTemplateSpec. A rule can be a SecurityContextConstraint or a PodSecurityPolicy A `nil`, indicates that it was denied.", - "reason": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available.", - "template": "template is the PodTemplateSpec after the defaulting is applied.", -} - -func (PodSecurityPolicySubjectReviewStatus) SwaggerDoc() map[string]string { - return map_PodSecurityPolicySubjectReviewStatus -} - -var map_RangeAllocation = map[string]string{ - "": "RangeAllocation is used so we can easily expose a RangeAllocation typed for security group\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "range": "range is a string representing a unique label for a range of uids, \"1000000000-2000000000/10000\".", - "data": "data is a byte array representing the serialized state of a range allocation. It is a bitmap with each bit set to one to represent a range is taken.", -} - -func (RangeAllocation) SwaggerDoc() map[string]string { - return map_RangeAllocation -} - -var map_RangeAllocationList = map[string]string{ - "": "RangeAllocationList is a list of RangeAllocations objects\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "List of RangeAllocations.", -} - -func (RangeAllocationList) SwaggerDoc() map[string]string { - return map_RangeAllocationList -} - -var map_RunAsUserStrategyOptions = map[string]string{ - "": "RunAsUserStrategyOptions defines the strategy type and any options used to create the strategy.", - "type": "type is the strategy that will dictate what RunAsUser is used in the SecurityContext.", - "uid": "uid is the user id that containers must run as. Required for the MustRunAs strategy if not using namespace/service account allocated uids.", - "uidRangeMin": "uidRangeMin defines the min value for a strategy that allocates by range.", - "uidRangeMax": "uidRangeMax defines the max value for a strategy that allocates by range.", -} - -func (RunAsUserStrategyOptions) SwaggerDoc() map[string]string { - return map_RunAsUserStrategyOptions -} - -var map_SELinuxContextStrategyOptions = map[string]string{ - "": "SELinuxContextStrategyOptions defines the strategy type and any options used to create the strategy.", - "type": "type is the strategy that will dictate what SELinux context is used in the SecurityContext.", - "seLinuxOptions": "seLinuxOptions required to run as; required for MustRunAs", -} - -func (SELinuxContextStrategyOptions) SwaggerDoc() map[string]string { - return map_SELinuxContextStrategyOptions -} - -var map_SecurityContextConstraints = map[string]string{ - "": "SecurityContextConstraints governs the ability to make requests that affect the SecurityContext that will be applied to a container. For historical reasons SCC was exposed under the core Kubernetes API group. That exposure is deprecated and will be removed in a future release - users should instead use the security.openshift.io group to manage SecurityContextConstraints.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "priority": "priority influences the sort order of SCCs when evaluating which SCCs to try first for a given pod request based on access in the Users and Groups fields. The higher the int, the higher priority. An unset value is considered a 0 priority. If scores for multiple SCCs are equal they will be sorted from most restrictive to least restrictive. If both priorities and restrictions are equal the SCCs will be sorted by name.", - "allowPrivilegedContainer": "allowPrivilegedContainer determines if a container can request to be run as privileged.", - "defaultAddCapabilities": "defaultAddCapabilities is the default set of capabilities that will be added to the container unless the pod spec specifically drops the capability. You may not list a capability in both DefaultAddCapabilities and RequiredDropCapabilities.", - "requiredDropCapabilities": "requiredDropCapabilities are the capabilities that will be dropped from the container. These are required to be dropped and cannot be added.", - "allowedCapabilities": "allowedCapabilities is a list of capabilities that can be requested to add to the container. Capabilities in this field maybe added at the pod author's discretion. You must not list a capability in both AllowedCapabilities and RequiredDropCapabilities. To allow all capabilities you may use '*'.", - "allowHostDirVolumePlugin": "allowHostDirVolumePlugin determines if the policy allow containers to use the HostDir volume plugin", - "volumes": "volumes is a white list of allowed volume plugins. FSType corresponds directly with the field names of a VolumeSource (azureFile, configMap, emptyDir). To allow all volumes you may use \"*\". To allow no volumes, set to [\"none\"].", - "allowedFlexVolumes": "allowedFlexVolumes is a whitelist of allowed Flexvolumes. Empty or nil indicates that all Flexvolumes may be used. This parameter is effective only when the usage of the Flexvolumes is allowed in the \"Volumes\" field.", - "allowHostNetwork": "allowHostNetwork determines if the policy allows the use of HostNetwork in the pod spec.", - "allowHostPorts": "allowHostPorts determines if the policy allows host ports in the containers.", - "allowHostPID": "allowHostPID determines if the policy allows host pid in the containers.", - "allowHostIPC": "allowHostIPC determines if the policy allows host ipc in the containers.", - "userNamespaceLevel": "userNamespaceLevel determines if the policy allows host users in containers. Valid values are \"AllowHostLevel\", \"RequirePodLevel\", and omitted. When \"AllowHostLevel\" is set, a pod author may set `hostUsers` to either `true` or `false`. When \"RequirePodLevel\" is set, a pod author must set `hostUsers` to `false`. When omitted, the default value is \"AllowHostLevel\".", - "defaultAllowPrivilegeEscalation": "defaultAllowPrivilegeEscalation controls the default setting for whether a process can gain more privileges than its parent process.", - "allowPrivilegeEscalation": "allowPrivilegeEscalation determines if a pod can request to allow privilege escalation. If unspecified, defaults to true.", - "seLinuxContext": "seLinuxContext is the strategy that will dictate what labels will be set in the SecurityContext.", - "runAsUser": "runAsUser is the strategy that will dictate what RunAsUser is used in the SecurityContext.", - "supplementalGroups": "supplementalGroups is the strategy that will dictate what supplemental groups are used by the SecurityContext.", - "fsGroup": "fsGroup is the strategy that will dictate what fs group is used by the SecurityContext.", - "readOnlyRootFilesystem": "readOnlyRootFilesystem when set to true will force containers to run with a read only root file system. If the container specifically requests to run with a non-read only root file system the SCC should deny the pod. If set to false the container may run with a read only root file system if it wishes but it will not be forced to.", - "users": "The users who have permissions to use this security context constraints", - "groups": "The groups that have permission to use this security context constraints", - "seccompProfiles": "seccompProfiles lists the allowed profiles that may be set for the pod or container's seccomp annotations. An unset (nil) or empty value means that no profiles may be specified by the pod or container.\tThe wildcard '*' may be used to allow all profiles. When used to generate a value for a pod the first non-wildcard profile will be used as the default.", - "allowedUnsafeSysctls": "allowedUnsafeSysctls is a list of explicitly allowed unsafe sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of allowed sysctls. Single * means all unsafe sysctls are allowed. Kubelet has to whitelist all allowed unsafe sysctls explicitly to avoid rejection.\n\nExamples: e.g. \"foo/*\" allows \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" allows \"foo.bar\", \"foo.baz\", etc.", - "forbiddenSysctls": "forbiddenSysctls is a list of explicitly forbidden sysctls, defaults to none. Each entry is either a plain sysctl name or ends in \"*\" in which case it is considered as a prefix of forbidden sysctls. Single * means all sysctls are forbidden.\n\nExamples: e.g. \"foo/*\" forbids \"foo/bar\", \"foo/baz\", etc. e.g. \"foo.*\" forbids \"foo.bar\", \"foo.baz\", etc.", -} - -func (SecurityContextConstraints) SwaggerDoc() map[string]string { - return map_SecurityContextConstraints -} - -var map_SecurityContextConstraintsList = map[string]string{ - "": "SecurityContextConstraintsList is a list of SecurityContextConstraints objects\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "List of security context constraints.", -} - -func (SecurityContextConstraintsList) SwaggerDoc() map[string]string { - return map_SecurityContextConstraintsList -} - -var map_ServiceAccountPodSecurityPolicyReviewStatus = map[string]string{ - "": "ServiceAccountPodSecurityPolicyReviewStatus represents ServiceAccount name and related review status", - "name": "name contains the allowed and the denied ServiceAccount name", -} - -func (ServiceAccountPodSecurityPolicyReviewStatus) SwaggerDoc() map[string]string { - return map_ServiceAccountPodSecurityPolicyReviewStatus -} - -var map_SupplementalGroupsStrategyOptions = map[string]string{ - "": "SupplementalGroupsStrategyOptions defines the strategy type and options used to create the strategy.", - "type": "type is the strategy that will dictate what supplemental groups is used in the SecurityContext.", - "ranges": "ranges are the allowed ranges of supplemental groups. If you would like to force a single supplemental group then supply a single range with the same start and end.", -} - -func (SupplementalGroupsStrategyOptions) SwaggerDoc() map[string]string { - return map_SupplementalGroupsStrategyOptions -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/servicecertsigner/.codegen.yaml b/vendor/github.com/openshift/api/servicecertsigner/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/servicecertsigner/install.go b/vendor/github.com/openshift/api/servicecertsigner/install.go deleted file mode 100644 index 98d891d34..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package servicecertsigner - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - servicecertsignerv1alpha1 "github.com/openshift/api/servicecertsigner/v1alpha1" -) - -const ( - GroupName = "servicecertsigner.config.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(servicecertsignerv1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/doc.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/doc.go deleted file mode 100644 index 1f9da2552..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/doc.go +++ /dev/null @@ -1,7 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.servicecertsigner.v1alpha1 - -// +groupName=servicecertsigner.config.openshift.io -package v1alpha1 diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/register.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/register.go deleted file mode 100644 index 19ef421b2..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/register.go +++ /dev/null @@ -1,40 +0,0 @@ -package v1alpha1 - -import ( - configv1 "github.com/openshift/api/config/v1" - operatorsv1alpha1api "github.com/openshift/api/operator/v1alpha1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "servicecertsigner.config.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, configv1.Install, operatorsv1alpha1api.Install) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &ServiceCertSignerOperatorConfig{}, - &ServiceCertSignerOperatorConfigList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - - return nil -} diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/types.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/types.go deleted file mode 100644 index 3ad1c560f..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/types.go +++ /dev/null @@ -1,53 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - operatorv1 "github.com/openshift/api/operator/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceCertSignerOperatorConfig provides information to configure an operator to manage the service cert signing controllers -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type ServiceCertSignerOperatorConfig struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata"` - - Spec ServiceCertSignerOperatorConfigSpec `json:"spec"` - Status ServiceCertSignerOperatorConfigStatus `json:"status"` -} - -type ServiceCertSignerOperatorConfigSpec struct { - operatorv1.OperatorSpec `json:",inline"` -} - -type ServiceCertSignerOperatorConfigStatus struct { - operatorv1.OperatorStatus `json:",inline"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// ServiceCertSignerOperatorConfigList is a collection of items -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +openshift:compatibility-gen:internal -type ServiceCertSignerOperatorConfigList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - // items contains the items - Items []ServiceCertSignerOperatorConfig `json:"items"` -} diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 58d9447a1..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,105 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -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 *ServiceCertSignerOperatorConfig) DeepCopyInto(out *ServiceCertSignerOperatorConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCertSignerOperatorConfig. -func (in *ServiceCertSignerOperatorConfig) DeepCopy() *ServiceCertSignerOperatorConfig { - if in == nil { - return nil - } - out := new(ServiceCertSignerOperatorConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCertSignerOperatorConfig) 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 *ServiceCertSignerOperatorConfigList) DeepCopyInto(out *ServiceCertSignerOperatorConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ServiceCertSignerOperatorConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCertSignerOperatorConfigList. -func (in *ServiceCertSignerOperatorConfigList) DeepCopy() *ServiceCertSignerOperatorConfigList { - if in == nil { - return nil - } - out := new(ServiceCertSignerOperatorConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceCertSignerOperatorConfigList) 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 *ServiceCertSignerOperatorConfigSpec) DeepCopyInto(out *ServiceCertSignerOperatorConfigSpec) { - *out = *in - in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCertSignerOperatorConfigSpec. -func (in *ServiceCertSignerOperatorConfigSpec) DeepCopy() *ServiceCertSignerOperatorConfigSpec { - if in == nil { - return nil - } - out := new(ServiceCertSignerOperatorConfigSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceCertSignerOperatorConfigStatus) DeepCopyInto(out *ServiceCertSignerOperatorConfigStatus) { - *out = *in - in.OperatorStatus.DeepCopyInto(&out.OperatorStatus) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceCertSignerOperatorConfigStatus. -func (in *ServiceCertSignerOperatorConfigStatus) DeepCopy() *ServiceCertSignerOperatorConfigStatus { - if in == nil { - return nil - } - out := new(ServiceCertSignerOperatorConfigStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index 446c48afe..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,26 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCertSignerOperatorConfig) OpenAPIModelName() string { - return "com.github.openshift.api.servicecertsigner.v1alpha1.ServiceCertSignerOperatorConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCertSignerOperatorConfigList) OpenAPIModelName() string { - return "com.github.openshift.api.servicecertsigner.v1alpha1.ServiceCertSignerOperatorConfigList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCertSignerOperatorConfigSpec) OpenAPIModelName() string { - return "com.github.openshift.api.servicecertsigner.v1alpha1.ServiceCertSignerOperatorConfigSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceCertSignerOperatorConfigStatus) OpenAPIModelName() string { - return "com.github.openshift.api.servicecertsigner.v1alpha1.ServiceCertSignerOperatorConfigStatus" -} diff --git a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 5e341b1da..000000000 --- a/vendor/github.com/openshift/api/servicecertsigner/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,33 +0,0 @@ -package v1alpha1 - -// 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_ServiceCertSignerOperatorConfig = map[string]string{ - "": "ServiceCertSignerOperatorConfig provides information to configure an operator to manage the service cert signing controllers\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (ServiceCertSignerOperatorConfig) SwaggerDoc() map[string]string { - return map_ServiceCertSignerOperatorConfig -} - -var map_ServiceCertSignerOperatorConfigList = map[string]string{ - "": "ServiceCertSignerOperatorConfigList is a collection of items\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items contains the items", -} - -func (ServiceCertSignerOperatorConfigList) SwaggerDoc() map[string]string { - return map_ServiceCertSignerOperatorConfigList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/sharedresource/.codegen.yaml b/vendor/github.com/openshift/api/sharedresource/.codegen.yaml deleted file mode 100644 index ffa2c8d9b..000000000 --- a/vendor/github.com/openshift/api/sharedresource/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -swaggerdocs: - commentPolicy: Warn diff --git a/vendor/github.com/openshift/api/sharedresource/OWNERS b/vendor/github.com/openshift/api/sharedresource/OWNERS deleted file mode 100644 index c89bc9387..000000000 --- a/vendor/github.com/openshift/api/sharedresource/OWNERS +++ /dev/null @@ -1,5 +0,0 @@ -reviewers: - - bparees - - gabemontero - - adambkaplan - - coreydaley diff --git a/vendor/github.com/openshift/api/sharedresource/install.go b/vendor/github.com/openshift/api/sharedresource/install.go deleted file mode 100644 index 40eae94a9..000000000 --- a/vendor/github.com/openshift/api/sharedresource/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package sharedresource - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - v1alpha1 "github.com/openshift/api/sharedresource/v1alpha1" -) - -const ( - GroupName = "sharedresource.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(v1alpha1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/Makefile b/vendor/github.com/openshift/api/sharedresource/v1alpha1/Makefile deleted file mode 100644 index 330157e5b..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -.PHONY: test -test: - make -C ../../tests test GINKGO_EXTRA_ARGS=--focus="sharedresource.openshift.io/v1alpha1" diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go deleted file mode 100644 index 3fa2207b8..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/doc.go +++ /dev/null @@ -1,8 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.sharedresource.v1alpha1 - -// +groupName=sharedresource.openshift.io -// Package v1alplha1 is the v1alpha1 version of the API. -package v1alpha1 diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go deleted file mode 100644 index c390b46fc..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/register.go +++ /dev/null @@ -1,53 +0,0 @@ -package v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const ( - Version = "v1alpha1" - GroupName = "sharedresource.openshift.io" -) - -var ( - scheme = runtime.NewScheme() - GroupVersion = schema.GroupVersion{Group: GroupName, Version: Version} - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // Install is a function which adds this version to a scheme - Install = SchemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = SchemeBuilder.AddToScheme -) - -func init() { - AddToScheme(scheme) -} - -// addKnownTypes adds the set of types defined in this package to the supplied scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &SharedConfigMap{}, - &SharedConfigMapList{}, - &SharedSecret{}, - &SharedSecretList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go deleted file mode 100644 index 51466b0d4..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_configmap.go +++ /dev/null @@ -1,100 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SharedConfigMap allows a ConfigMap to be shared across namespaces. -// Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the -// "csi.sharedresource.openshift.io" CSI driver and a reference to the SharedConfigMap in the volume attributes: -// -// spec: -// -// volumes: -// - name: shared-configmap -// csi: -// driver: csi.sharedresource.openshift.io -// volumeAttributes: -// sharedConfigMap: my-share -// -// For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object -// within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating -// such Role and RoleBinding objects. -// -// `oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share` -// `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` -// -// Shared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// These capabilities should not be used by applications needing long term support. -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=sharedconfigmaps,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/979 -// +kubebuilder:metadata:annotations="description=Extension for sharing ConfigMaps across Namespaces" -// +kubebuilder:metadata:annotations="displayName=SharedConfigMap" -// +k8s:openapi-gen=true -// +openshift:compatibility-gen:level=4 -type SharedConfigMap struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired shared configmap - // +required - Spec SharedConfigMapSpec `json:"spec"` - - // status is the observed status of the shared configmap - Status SharedConfigMapStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SharedConfigMapList contains a list of SharedConfigMap objects. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type SharedConfigMapList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []SharedConfigMap `json:"items"` -} - -// SharedConfigMapReference contains information about which ConfigMap to share -type SharedConfigMapReference struct { - // name represents the name of the ConfigMap that is being referenced. - // +required - Name string `json:"name"` - // namespace represents the namespace where the referenced ConfigMap is located. - // +required - Namespace string `json:"namespace"` -} - -// SharedConfigMapSpec defines the desired state of a SharedConfigMap -// +k8s:openapi-gen=true -type SharedConfigMapSpec struct { - //configMapRef is a reference to the ConfigMap to share - // +required - ConfigMapRef SharedConfigMapReference `json:"configMapRef"` - // description is a user readable explanation of what the backing resource provides. - Description string `json:"description,omitempty"` -} - -// SharedSecretStatus contains the observed status of the shared resource -type SharedConfigMapStatus struct { - // conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go deleted file mode 100644 index 9551fb4a7..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/types_shared_secret.go +++ /dev/null @@ -1,99 +0,0 @@ -package v1alpha1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SharedSecret allows a Secret to be shared across namespaces. -// Pods can mount the shared Secret by adding a CSI volume to the pod specification using the -// "csi.sharedresource.openshift.io" CSI driver and a reference to the SharedSecret in the volume attributes: -// -// spec: -// -// volumes: -// - name: shared-secret -// csi: -// driver: csi.sharedresource.openshift.io -// volumeAttributes: -// sharedSecret: my-share -// -// For the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object -// within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating -// such Role and RoleBinding objects. -// -// `oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share` -// `oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default` -// -// Shared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -// +kubebuilder:object:root=true -// +kubebuilder:resource:path=sharedsecrets,scope=Cluster -// +kubebuilder:subresource:status -// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/979 -// +kubebuilder:metadata:annotations="description=Extension for sharing Secrets across Namespaces" -// +kubebuilder:metadata:annotations="displayName=SharedSecret" -type SharedSecret struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty"` - - // spec is the specification of the desired shared secret - // +required - Spec SharedSecretSpec `json:"spec"` - - // status is the observed status of the shared secret - Status SharedSecretStatus `json:"status,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// SharedSecretList contains a list of SharedSecret objects. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// These capabilities should not be used by applications needing long term support. -// +openshift:compatibility-gen:level=4 -type SharedSecretList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty"` - - Items []SharedSecret `json:"items"` -} - -// SharedSecretReference contains information about which Secret to share -type SharedSecretReference struct { - // name represents the name of the Secret that is being referenced. - // +required - Name string `json:"name"` - // namespace represents the namespace where the referenced Secret is located. - // +required - Namespace string `json:"namespace"` -} - -// SharedSecretSpec defines the desired state of a SharedSecret -// +k8s:openapi-gen=true -type SharedSecretSpec struct { - // secretRef is a reference to the Secret to share - // +required - SecretRef SharedSecretReference `json:"secretRef"` - // description is a user readable explanation of what the backing resource provides. - Description string `json:"description,omitempty"` -} - -// SharedSecretStatus contains the observed status of the shared resource -type SharedSecretStatus struct { - // conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller. - // +listType=map - // +listMapKey=type - // +optional - Conditions []metav1.Condition `json:"conditions,omitempty"` -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index d8ed6e906..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,245 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *SharedConfigMap) DeepCopyInto(out *SharedConfigMap) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMap. -func (in *SharedConfigMap) DeepCopy() *SharedConfigMap { - if in == nil { - return nil - } - out := new(SharedConfigMap) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SharedConfigMap) 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 *SharedConfigMapList) DeepCopyInto(out *SharedConfigMapList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SharedConfigMap, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapList. -func (in *SharedConfigMapList) DeepCopy() *SharedConfigMapList { - if in == nil { - return nil - } - out := new(SharedConfigMapList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SharedConfigMapList) 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 *SharedConfigMapReference) DeepCopyInto(out *SharedConfigMapReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapReference. -func (in *SharedConfigMapReference) DeepCopy() *SharedConfigMapReference { - if in == nil { - return nil - } - out := new(SharedConfigMapReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SharedConfigMapSpec) DeepCopyInto(out *SharedConfigMapSpec) { - *out = *in - out.ConfigMapRef = in.ConfigMapRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapSpec. -func (in *SharedConfigMapSpec) DeepCopy() *SharedConfigMapSpec { - if in == nil { - return nil - } - out := new(SharedConfigMapSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SharedConfigMapStatus) DeepCopyInto(out *SharedConfigMapStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedConfigMapStatus. -func (in *SharedConfigMapStatus) DeepCopy() *SharedConfigMapStatus { - if in == nil { - return nil - } - out := new(SharedConfigMapStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SharedSecret) DeepCopyInto(out *SharedSecret) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecret. -func (in *SharedSecret) DeepCopy() *SharedSecret { - if in == nil { - return nil - } - out := new(SharedSecret) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SharedSecret) 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 *SharedSecretList) DeepCopyInto(out *SharedSecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]SharedSecret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretList. -func (in *SharedSecretList) DeepCopy() *SharedSecretList { - if in == nil { - return nil - } - out := new(SharedSecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SharedSecretList) 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 *SharedSecretReference) DeepCopyInto(out *SharedSecretReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretReference. -func (in *SharedSecretReference) DeepCopy() *SharedSecretReference { - if in == nil { - return nil - } - out := new(SharedSecretReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SharedSecretSpec) DeepCopyInto(out *SharedSecretSpec) { - *out = *in - out.SecretRef = in.SecretRef - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretSpec. -func (in *SharedSecretSpec) DeepCopy() *SharedSecretSpec { - if in == nil { - return nil - } - out := new(SharedSecretSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SharedSecretStatus) DeepCopyInto(out *SharedSecretStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SharedSecretStatus. -func (in *SharedSecretStatus) DeepCopy() *SharedSecretStatus { - if in == nil { - return nil - } - out := new(SharedSecretStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.featuregated-crd-manifests.yaml deleted file mode 100644 index 874f1831e..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.featuregated-crd-manifests.yaml +++ /dev/null @@ -1,46 +0,0 @@ -sharedconfigmaps.sharedresource.openshift.io: - Annotations: - description: Extension for sharing ConfigMaps across Namespaces - displayName: SharedConfigMap - ApprovedPRNumber: https://github.com/openshift/api/pull/979 - CRDName: sharedconfigmaps.sharedresource.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "" - FilenameRunLevel: "" - GroupName: sharedresource.openshift.io - HasStatus: true - KindName: SharedConfigMap - Labels: {} - PluralName: sharedconfigmaps - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1alpha1 - -sharedsecrets.sharedresource.openshift.io: - Annotations: - description: Extension for sharing Secrets across Namespaces - displayName: SharedSecret - ApprovedPRNumber: https://github.com/openshift/api/pull/979 - CRDName: sharedsecrets.sharedresource.openshift.io - Capability: "" - Category: "" - FeatureGates: [] - FilenameOperatorName: "" - FilenameOperatorOrdering: "" - FilenameRunLevel: "" - GroupName: sharedresource.openshift.io - HasStatus: true - KindName: SharedSecret - Labels: {} - PluralName: sharedsecrets - PrinterColumns: [] - Scope: Cluster - ShortNames: null - TopLevelFeatureGates: [] - Version: v1alpha1 - diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.model_name.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.model_name.go deleted file mode 100644 index d8c45a7ae..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.model_name.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1alpha1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedConfigMap) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedConfigMap" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedConfigMapList) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedConfigMapList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedConfigMapReference) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedConfigMapReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedConfigMapSpec) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedConfigMapSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedConfigMapStatus) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedConfigMapStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedSecret) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedSecret" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedSecretList) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedSecretList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedSecretReference) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedSecretReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedSecretSpec) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedSecretSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SharedSecretStatus) OpenAPIModelName() string { - return "com.github.openshift.api.sharedresource.v1alpha1.SharedSecretStatus" -} diff --git a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index ea6334d14..000000000 --- a/vendor/github.com/openshift/api/sharedresource/v1alpha1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,112 +0,0 @@ -package v1alpha1 - -// 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_SharedConfigMap = map[string]string{ - "": "SharedConfigMap allows a ConfigMap to be shared across namespaces. Pods can mount the shared ConfigMap by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedConfigMap in the volume attributes:\n\nspec:\n\n\tvolumes:\n\t- name: shared-configmap\n\t csi:\n\t driver: csi.sharedresource.openshift.io\n\t volumeAttributes:\n\t sharedConfigMap: my-share\n\nFor the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedConfigMap object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.\n\n\t`oc create role shared-resource-my-share --verb=use --resource=sharedconfigmaps.sharedresource.openshift.io --resource-name=my-share`\n\t`oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`\n\nShared resource objects, in this case ConfigMaps, have default permissions of list, get, and watch for system authenticated users.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired shared configmap", - "status": "status is the observed status of the shared configmap", -} - -func (SharedConfigMap) SwaggerDoc() map[string]string { - return map_SharedConfigMap -} - -var map_SharedConfigMapList = map[string]string{ - "": "SharedConfigMapList contains a list of SharedConfigMap objects.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (SharedConfigMapList) SwaggerDoc() map[string]string { - return map_SharedConfigMapList -} - -var map_SharedConfigMapReference = map[string]string{ - "": "SharedConfigMapReference contains information about which ConfigMap to share", - "name": "name represents the name of the ConfigMap that is being referenced.", - "namespace": "namespace represents the namespace where the referenced ConfigMap is located.", -} - -func (SharedConfigMapReference) SwaggerDoc() map[string]string { - return map_SharedConfigMapReference -} - -var map_SharedConfigMapSpec = map[string]string{ - "": "SharedConfigMapSpec defines the desired state of a SharedConfigMap", - "configMapRef": "configMapRef is a reference to the ConfigMap to share", - "description": "description is a user readable explanation of what the backing resource provides.", -} - -func (SharedConfigMapSpec) SwaggerDoc() map[string]string { - return map_SharedConfigMapSpec -} - -var map_SharedConfigMapStatus = map[string]string{ - "": "SharedSecretStatus contains the observed status of the shared resource", - "conditions": "conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.", -} - -func (SharedConfigMapStatus) SwaggerDoc() map[string]string { - return map_SharedConfigMapStatus -} - -var map_SharedSecret = map[string]string{ - "": "SharedSecret allows a Secret to be shared across namespaces. Pods can mount the shared Secret by adding a CSI volume to the pod specification using the \"csi.sharedresource.openshift.io\" CSI driver and a reference to the SharedSecret in the volume attributes:\n\nspec:\n\n\tvolumes:\n\t- name: shared-secret\n\t csi:\n\t driver: csi.sharedresource.openshift.io\n\t volumeAttributes:\n\t sharedSecret: my-share\n\nFor the mount to be successful, the pod's service account must be granted permission to 'use' the named SharedSecret object within its namespace with an appropriate Role and RoleBinding. For compactness, here are example `oc` invocations for creating such Role and RoleBinding objects.\n\n\t`oc create role shared-resource-my-share --verb=use --resource=sharedsecrets.sharedresource.openshift.io --resource-name=my-share`\n\t`oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=my-namespace:default`\n\nShared resource objects, in this case Secrets, have default permissions of list, get, and watch for system authenticated users.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec is the specification of the desired shared secret", - "status": "status is the observed status of the shared secret", -} - -func (SharedSecret) SwaggerDoc() map[string]string { - return map_SharedSecret -} - -var map_SharedSecretList = map[string]string{ - "": "SharedSecretList contains a list of SharedSecret objects.\n\nCompatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. These capabilities should not be used by applications needing long term support.", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", -} - -func (SharedSecretList) SwaggerDoc() map[string]string { - return map_SharedSecretList -} - -var map_SharedSecretReference = map[string]string{ - "": "SharedSecretReference contains information about which Secret to share", - "name": "name represents the name of the Secret that is being referenced.", - "namespace": "namespace represents the namespace where the referenced Secret is located.", -} - -func (SharedSecretReference) SwaggerDoc() map[string]string { - return map_SharedSecretReference -} - -var map_SharedSecretSpec = map[string]string{ - "": "SharedSecretSpec defines the desired state of a SharedSecret", - "secretRef": "secretRef is a reference to the Secret to share", - "description": "description is a user readable explanation of what the backing resource provides.", -} - -func (SharedSecretSpec) SwaggerDoc() map[string]string { - return map_SharedSecretSpec -} - -var map_SharedSecretStatus = map[string]string{ - "": "SharedSecretStatus contains the observed status of the shared resource", - "conditions": "conditions represents any observations made on this particular shared resource by the underlying CSI driver or Share controller.", -} - -func (SharedSecretStatus) SwaggerDoc() map[string]string { - return map_SharedSecretStatus -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/template/.codegen.yaml b/vendor/github.com/openshift/api/template/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/template/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/template/OWNERS b/vendor/github.com/openshift/api/template/OWNERS deleted file mode 100644 index c1ece8b21..000000000 --- a/vendor/github.com/openshift/api/template/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: - - bparees - - gabemontero - - jim-minter diff --git a/vendor/github.com/openshift/api/template/install.go b/vendor/github.com/openshift/api/template/install.go deleted file mode 100644 index 8a69398dd..000000000 --- a/vendor/github.com/openshift/api/template/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package template - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - templatev1 "github.com/openshift/api/template/v1" -) - -const ( - GroupName = "template.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(templatev1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/template/v1/codec.go b/vendor/github.com/openshift/api/template/v1/codec.go deleted file mode 100644 index 9e9177ed6..000000000 --- a/vendor/github.com/openshift/api/template/v1/codec.go +++ /dev/null @@ -1,33 +0,0 @@ -package v1 - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - - "github.com/openshift/api/pkg/serialization" -) - -var _ runtime.NestedObjectDecoder = &Template{} -var _ runtime.NestedObjectEncoder = &Template{} - -// DecodeNestedObjects decodes the object as a runtime.Unknown with JSON content. -func (c *Template) DecodeNestedObjects(d runtime.Decoder) error { - for i := range c.Objects { - if c.Objects[i].Object != nil { - continue - } - c.Objects[i].Object = &runtime.Unknown{ - ContentType: "application/json", - Raw: c.Objects[i].Raw, - } - } - return nil -} -func (c *Template) EncodeNestedObjects(e runtime.Encoder) error { - for i := range c.Objects { - if err := serialization.EncodeNestedRawExtension(unstructured.UnstructuredJSONScheme, &c.Objects[i]); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/openshift/api/template/v1/consts.go b/vendor/github.com/openshift/api/template/v1/consts.go deleted file mode 100644 index cc8b49d55..000000000 --- a/vendor/github.com/openshift/api/template/v1/consts.go +++ /dev/null @@ -1,16 +0,0 @@ -package v1 - -const ( - // TemplateInstanceFinalizer is used to clean up the objects created by the template instance, - // when the template instance is deleted. - TemplateInstanceFinalizer = "template.openshift.io/finalizer" - - // TemplateInstanceOwner is a label applied to all objects created from a template instance - // which contains the uid of the template instance. - TemplateInstanceOwner = "template.openshift.io/template-instance-owner" - - // WaitForReadyAnnotation indicates that the TemplateInstance controller - // should wait for the object to be ready before reporting the template - // instantiation complete. - WaitForReadyAnnotation = "template.alpha.openshift.io/wait-for-ready" -) diff --git a/vendor/github.com/openshift/api/template/v1/doc.go b/vendor/github.com/openshift/api/template/v1/doc.go deleted file mode 100644 index 0cbca9f7e..000000000 --- a/vendor/github.com/openshift/api/template/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/template/apis/template -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.template.v1 - -// +groupName=template.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/template/v1/generated.pb.go b/vendor/github.com/openshift/api/template/v1/generated.pb.go deleted file mode 100644 index 52d46eaa9..000000000 --- a/vendor/github.com/openshift/api/template/v1/generated.pb.go +++ /dev/null @@ -1,3633 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/template/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - k8s_io_api_core_v1 "k8s.io/api/core/v1" - v11 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *BrokerTemplateInstance) Reset() { *m = BrokerTemplateInstance{} } - -func (m *BrokerTemplateInstanceList) Reset() { *m = BrokerTemplateInstanceList{} } - -func (m *BrokerTemplateInstanceSpec) Reset() { *m = BrokerTemplateInstanceSpec{} } - -func (m *ExtraValue) Reset() { *m = ExtraValue{} } - -func (m *Parameter) Reset() { *m = Parameter{} } - -func (m *Template) Reset() { *m = Template{} } - -func (m *TemplateInstance) Reset() { *m = TemplateInstance{} } - -func (m *TemplateInstanceCondition) Reset() { *m = TemplateInstanceCondition{} } - -func (m *TemplateInstanceList) Reset() { *m = TemplateInstanceList{} } - -func (m *TemplateInstanceObject) Reset() { *m = TemplateInstanceObject{} } - -func (m *TemplateInstanceRequester) Reset() { *m = TemplateInstanceRequester{} } - -func (m *TemplateInstanceSpec) Reset() { *m = TemplateInstanceSpec{} } - -func (m *TemplateInstanceStatus) Reset() { *m = TemplateInstanceStatus{} } - -func (m *TemplateList) Reset() { *m = TemplateList{} } - -func (m *BrokerTemplateInstance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BrokerTemplateInstance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BrokerTemplateInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BrokerTemplateInstanceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BrokerTemplateInstanceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BrokerTemplateInstanceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *BrokerTemplateInstanceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *BrokerTemplateInstanceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *BrokerTemplateInstanceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.BindingIDs) > 0 { - for iNdEx := len(m.BindingIDs) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.BindingIDs[iNdEx]) - copy(dAtA[i:], m.BindingIDs[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.BindingIDs[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.TemplateInstance.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m ExtraValue) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m ExtraValue) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m ExtraValue) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m[iNdEx]) - copy(dAtA[i:], m[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *Parameter) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Parameter) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Parameter) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.Required { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - i -= len(m.From) - copy(dAtA[i:], m.From) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.From))) - i-- - dAtA[i] = 0x32 - i -= len(m.Generate) - copy(dAtA[i:], m.Generate) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Generate))) - i-- - dAtA[i] = 0x2a - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x22 - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x1a - i -= len(m.DisplayName) - copy(dAtA[i:], m.DisplayName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DisplayName))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Template) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Template) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Template) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ObjectLabels) > 0 { - keysForObjectLabels := make([]string, 0, len(m.ObjectLabels)) - for k := range m.ObjectLabels { - keysForObjectLabels = append(keysForObjectLabels, string(k)) - } - sort.Strings(keysForObjectLabels) - for iNdEx := len(keysForObjectLabels) - 1; iNdEx >= 0; iNdEx-- { - v := m.ObjectLabels[string(keysForObjectLabels[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForObjectLabels[iNdEx]) - copy(dAtA[i:], keysForObjectLabels[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForObjectLabels[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Parameters) > 0 { - for iNdEx := len(m.Parameters) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Parameters[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Objects) > 0 { - for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Objects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstance) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstance) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstance) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceObject) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceObject) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceObject) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Ref.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceRequester) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceRequester) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceRequester) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Extra) > 0 { - keysForExtra := make([]string, 0, len(m.Extra)) - for k := range m.Extra { - keysForExtra = append(keysForExtra, string(k)) - } - sort.Strings(keysForExtra) - for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { - v := m.Extra[string(keysForExtra[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForExtra[iNdEx]) - copy(dAtA[i:], keysForExtra[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForExtra[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0x12 - i -= len(m.Username) - copy(dAtA[i:], m.Username) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Username))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Requester != nil { - { - size, err := m.Requester.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.Secret != nil { - { - size, err := m.Secret.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.Template.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *TemplateInstanceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateInstanceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateInstanceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Objects) > 0 { - for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Objects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *TemplateList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *TemplateList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *TemplateList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *BrokerTemplateInstance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *BrokerTemplateInstanceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *BrokerTemplateInstanceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.TemplateInstance.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Secret.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.BindingIDs) > 0 { - for _, s := range m.BindingIDs { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m ExtraValue) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Parameter) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DisplayName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Value) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Generate) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.From) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - return n -} - -func (m *Template) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Objects) > 0 { - for _, e := range m.Objects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Parameters) > 0 { - for _, e := range m.Parameters { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.ObjectLabels) > 0 { - for k, v := range m.ObjectLabels { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *TemplateInstance) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TemplateInstanceCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TemplateInstanceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *TemplateInstanceObject) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Ref.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *TemplateInstanceRequester) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Username) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Extra) > 0 { - for k, v := range m.Extra { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *TemplateInstanceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.Template.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Secret != nil { - l = m.Secret.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Requester != nil { - l = m.Requester.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *TemplateInstanceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Objects) > 0 { - for _, e := range m.Objects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *TemplateList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *BrokerTemplateInstance) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BrokerTemplateInstance{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "BrokerTemplateInstanceSpec", "BrokerTemplateInstanceSpec", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *BrokerTemplateInstanceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]BrokerTemplateInstance{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "BrokerTemplateInstance", "BrokerTemplateInstance", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&BrokerTemplateInstanceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *BrokerTemplateInstanceSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BrokerTemplateInstanceSpec{`, - `TemplateInstance:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TemplateInstance), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `Secret:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Secret), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `BindingIDs:` + fmt.Sprintf("%v", this.BindingIDs) + `,`, - `}`, - }, "") - return s -} -func (this *Parameter) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Parameter{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `DisplayName:` + fmt.Sprintf("%v", this.DisplayName) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Generate:` + fmt.Sprintf("%v", this.Generate) + `,`, - `From:` + fmt.Sprintf("%v", this.From) + `,`, - `Required:` + fmt.Sprintf("%v", this.Required) + `,`, - `}`, - }, "") - return s -} -func (this *Template) String() string { - if this == nil { - return "nil" - } - repeatedStringForObjects := "[]RawExtension{" - for _, f := range this.Objects { - repeatedStringForObjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForObjects += "}" - repeatedStringForParameters := "[]Parameter{" - for _, f := range this.Parameters { - repeatedStringForParameters += strings.Replace(strings.Replace(f.String(), "Parameter", "Parameter", 1), `&`, ``, 1) + "," - } - repeatedStringForParameters += "}" - keysForObjectLabels := make([]string, 0, len(this.ObjectLabels)) - for k := range this.ObjectLabels { - keysForObjectLabels = append(keysForObjectLabels, k) - } - sort.Strings(keysForObjectLabels) - mapStringForObjectLabels := "map[string]string{" - for _, k := range keysForObjectLabels { - mapStringForObjectLabels += fmt.Sprintf("%v: %v,", k, this.ObjectLabels[k]) - } - mapStringForObjectLabels += "}" - s := strings.Join([]string{`&Template{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `Objects:` + repeatedStringForObjects + `,`, - `Parameters:` + repeatedStringForParameters + `,`, - `ObjectLabels:` + mapStringForObjectLabels + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstance) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TemplateInstance{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "TemplateInstanceSpec", "TemplateInstanceSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "TemplateInstanceStatus", "TemplateInstanceStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TemplateInstanceCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]TemplateInstance{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "TemplateInstance", "TemplateInstance", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&TemplateInstanceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceObject) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TemplateInstanceObject{`, - `Ref:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ref), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceRequester) String() string { - if this == nil { - return "nil" - } - keysForExtra := make([]string, 0, len(this.Extra)) - for k := range this.Extra { - keysForExtra = append(keysForExtra, k) - } - sort.Strings(keysForExtra) - mapStringForExtra := "map[string]ExtraValue{" - for _, k := range keysForExtra { - mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) - } - mapStringForExtra += "}" - s := strings.Join([]string{`&TemplateInstanceRequester{`, - `Username:` + fmt.Sprintf("%v", this.Username) + `,`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `Extra:` + mapStringForExtra + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&TemplateInstanceSpec{`, - `Template:` + strings.Replace(strings.Replace(this.Template.String(), "Template", "Template", 1), `&`, ``, 1) + `,`, - `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "LocalObjectReference", "v11.LocalObjectReference", 1) + `,`, - `Requester:` + strings.Replace(this.Requester.String(), "TemplateInstanceRequester", "TemplateInstanceRequester", 1) + `,`, - `}`, - }, "") - return s -} -func (this *TemplateInstanceStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]TemplateInstanceCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "TemplateInstanceCondition", "TemplateInstanceCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - repeatedStringForObjects := "[]TemplateInstanceObject{" - for _, f := range this.Objects { - repeatedStringForObjects += strings.Replace(strings.Replace(f.String(), "TemplateInstanceObject", "TemplateInstanceObject", 1), `&`, ``, 1) + "," - } - repeatedStringForObjects += "}" - s := strings.Join([]string{`&TemplateInstanceStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `Objects:` + repeatedStringForObjects + `,`, - `}`, - }, "") - return s -} -func (this *TemplateList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Template{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Template", "Template", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&TemplateList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *BrokerTemplateInstance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BrokerTemplateInstance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BrokerTemplateInstance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BrokerTemplateInstanceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BrokerTemplateInstanceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BrokerTemplateInstanceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, BrokerTemplateInstance{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *BrokerTemplateInstanceSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: BrokerTemplateInstanceSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: BrokerTemplateInstanceSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TemplateInstance", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.TemplateInstance.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BindingIDs", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BindingIDs = append(m.BindingIDs, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExtraValue) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExtraValue: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExtraValue: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Parameter) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Parameter: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Generate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Generate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field From", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.From = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Required = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Template) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Template: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Template: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Objects = append(m.Objects, runtime.RawExtension{}) - if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Parameters = append(m.Parameters, Parameter{}) - if err := m.Parameters[len(m.Parameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectLabels", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ObjectLabels == nil { - m.ObjectLabels = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.ObjectLabels[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstance) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstance: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstance: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = TemplateInstanceConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = k8s_io_api_core_v1.ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, TemplateInstance{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceObject) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceObject: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceObject: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Ref.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceRequester) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceRequester: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceRequester: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Username", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Username = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Extra == nil { - m.Extra = make(map[string]ExtraValue) - } - var mapkey string - mapvalue := &ExtraValue{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &ExtraValue{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Extra[mapkey] = *mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Template", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Template.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Secret == nil { - m.Secret = &v11.LocalObjectReference{} - } - if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Requester", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Requester == nil { - m.Requester = &TemplateInstanceRequester{} - } - if err := m.Requester.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateInstanceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateInstanceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateInstanceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, TemplateInstanceCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Objects = append(m.Objects, TemplateInstanceObject{}) - if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *TemplateList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: TemplateList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: TemplateList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Template{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/template/v1/generated.proto b/vendor/github.com/openshift/api/template/v1/generated.proto deleted file mode 100644 index e1d7a21d4..000000000 --- a/vendor/github.com/openshift/api/template/v1/generated.proto +++ /dev/null @@ -1,264 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.template.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/template/v1"; - -// BrokerTemplateInstance holds the service broker-related state associated with -// a TemplateInstance. BrokerTemplateInstance is part of an experimental API. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BrokerTemplateInstance { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec describes the state of this BrokerTemplateInstance. - optional BrokerTemplateInstanceSpec spec = 2; -} - -// BrokerTemplateInstanceList is a list of BrokerTemplateInstance objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message BrokerTemplateInstanceList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of BrokerTemplateInstances - repeated BrokerTemplateInstance items = 2; -} - -// BrokerTemplateInstanceSpec describes the state of a BrokerTemplateInstance. -message BrokerTemplateInstanceSpec { - // templateInstance is a reference to a TemplateInstance object residing - // in a namespace. - optional .k8s.io.api.core.v1.ObjectReference templateInstance = 1; - - // secret is a reference to a Secret object residing in a namespace, - // containing the necessary template parameters. - optional .k8s.io.api.core.v1.ObjectReference secret = 2; - - // bindingIDs is a list of 'binding_id's provided during successive bind - // calls to the template service broker. - repeated string bindingIDs = 3; -} - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message ExtraValue { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// Parameter defines a name/value variable that is to be processed during -// the Template to Config transformation. -message Parameter { - // name must be set and it can be referenced in Template - // Items using ${PARAMETER_NAME}. Required. - optional string name = 1; - - // Optional: The name that will show in UI instead of parameter 'Name' - optional string displayName = 2; - - // description of a parameter. Optional. - optional string description = 3; - - // value holds the Parameter data. If specified, the generator will be - // ignored. The value replaces all occurrences of the Parameter ${Name} - // expression during the Template to Config transformation. Optional. - optional string value = 4; - - // generate specifies the generator to be used to generate random string - // from an input value specified by From field. The result string is - // stored into Value field. If empty, no generator is being used, leaving - // the result Value untouched. Optional. - // - // The only supported generator is "expression", which accepts a "from" - // value in the form of a simple regular expression containing the - // range expression "[a-zA-Z0-9]", and the length expression "a{length}". - // - // Examples: - // - // from | value - // ----------------------------- - // "test[0-9]{1}x" | "test7x" - // "[0-1]{8}" | "01001100" - // "0x[A-F0-9]{4}" | "0xB3AF" - // "[a-zA-Z0-9]{8}" | "hW4yQU5i" - optional string generate = 5; - - // from is an input value for the generator. Optional. - optional string from = 6; - - // Optional: Indicates the parameter must have a value. Defaults to false. - optional bool required = 7; -} - -// Template contains the inputs needed to produce a Config. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Template { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // message is an optional instructional message that will - // be displayed when this template is instantiated. - // This field should inform the user how to utilize the newly created resources. - // Parameter substitution will be performed on the message before being - // displayed so that generated credentials and other parameters can be - // included in the output. - optional string message = 2; - - // objects is an array of resources to include in this template. - // If a namespace value is hardcoded in the object, it will be removed - // during template instantiation, however if the namespace value - // is, or contains, a ${PARAMETER_REFERENCE}, the resolved - // value after parameter substitution will be respected and the object - // will be created in that namespace. - // +kubebuilder:pruning:PreserveUnknownFields - repeated .k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; - - // parameters is an optional array of Parameters used during the - // Template to Config transformation. - repeated Parameter parameters = 4; - - // labels is a optional set of labels that are applied to every - // object during the Template to Config transformation. - map labels = 5; -} - -// TemplateInstance requests and records the instantiation of a Template. -// TemplateInstance is part of an experimental API. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message TemplateInstance { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec describes the desired state of this TemplateInstance. - optional TemplateInstanceSpec spec = 2; - - // status describes the current state of this TemplateInstance. - // +optional - optional TemplateInstanceStatus status = 3; -} - -// TemplateInstanceCondition contains condition information for a -// TemplateInstance. -message TemplateInstanceCondition { - // type of the condition, currently Ready or InstantiateFailure. - optional string type = 1; - - // status of the condition, one of True, False or Unknown. - optional string status = 2; - - // lastTransitionTime is the last time a condition status transitioned from - // one state to another. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is a brief machine readable explanation for the condition's last - // transition. - optional string reason = 4; - - // message is a human readable description of the details of the last - // transition, complementing reason. - optional string message = 5; -} - -// TemplateInstanceList is a list of TemplateInstance objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message TemplateInstanceList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of Templateinstances - repeated TemplateInstance items = 2; -} - -// TemplateInstanceObject references an object created by a TemplateInstance. -message TemplateInstanceObject { - // ref is a reference to the created object. When used under .spec, only - // name and namespace are used; these can contain references to parameters - // which will be substituted following the usual rules. - optional .k8s.io.api.core.v1.ObjectReference ref = 1; -} - -// TemplateInstanceRequester holds the identity of an agent requesting a -// template instantiation. -message TemplateInstanceRequester { - // username uniquely identifies this user among all active users. - optional string username = 1; - - // uid is a unique value that identifies this user across time; if this user is - // deleted and another user by the same name is added, they will have - // different UIDs. - optional string uid = 2; - - // groups represent the groups this user is a part of. - repeated string groups = 3; - - // extra holds additional information provided by the authenticator. - map extra = 4; -} - -// TemplateInstanceSpec describes the desired state of a TemplateInstance. -message TemplateInstanceSpec { - // template is a full copy of the template for instantiation. - optional Template template = 1; - - // secret is a reference to a Secret object containing the necessary - // template parameters. - optional .k8s.io.api.core.v1.LocalObjectReference secret = 2; - - // requester holds the identity of the agent requesting the template - // instantiation. - // +optional - optional TemplateInstanceRequester requester = 3; -} - -// TemplateInstanceStatus describes the current state of a TemplateInstance. -message TemplateInstanceStatus { - // conditions represent the latest available observations of a - // TemplateInstance's current state. - // +optional - repeated TemplateInstanceCondition conditions = 1; - - // objects references the objects created by the TemplateInstance. - // +optional - repeated TemplateInstanceObject objects = 2; -} - -// TemplateList is a list of Template objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message TemplateList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is a list of templates - repeated Template items = 2; -} - diff --git a/vendor/github.com/openshift/api/template/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/template/v1/generated.protomessage.pb.go deleted file mode 100644 index f01e3f0f3..000000000 --- a/vendor/github.com/openshift/api/template/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*BrokerTemplateInstance) ProtoMessage() {} - -func (*BrokerTemplateInstanceList) ProtoMessage() {} - -func (*BrokerTemplateInstanceSpec) ProtoMessage() {} - -func (*ExtraValue) ProtoMessage() {} - -func (*Parameter) ProtoMessage() {} - -func (*Template) ProtoMessage() {} - -func (*TemplateInstance) ProtoMessage() {} - -func (*TemplateInstanceCondition) ProtoMessage() {} - -func (*TemplateInstanceList) ProtoMessage() {} - -func (*TemplateInstanceObject) ProtoMessage() {} - -func (*TemplateInstanceRequester) ProtoMessage() {} - -func (*TemplateInstanceSpec) ProtoMessage() {} - -func (*TemplateInstanceStatus) ProtoMessage() {} - -func (*TemplateList) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/template/v1/legacy.go b/vendor/github.com/openshift/api/template/v1/legacy.go deleted file mode 100644 index 9266f3ac9..000000000 --- a/vendor/github.com/openshift/api/template/v1/legacy.go +++ /dev/null @@ -1,24 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &Template{}, - &TemplateList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - scheme.AddKnownTypeWithName(legacyGroupVersion.WithKind("TemplateConfig"), &Template{}) - scheme.AddKnownTypeWithName(legacyGroupVersion.WithKind("ProcessedTemplate"), &Template{}) - return nil -} diff --git a/vendor/github.com/openshift/api/template/v1/register.go b/vendor/github.com/openshift/api/template/v1/register.go deleted file mode 100644 index e34ff5610..000000000 --- a/vendor/github.com/openshift/api/template/v1/register.go +++ /dev/null @@ -1,43 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "template.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &Template{}, - &TemplateList{}, - &TemplateInstance{}, - &TemplateInstanceList{}, - &BrokerTemplateInstance{}, - &BrokerTemplateInstanceList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/template/v1/types.go b/vendor/github.com/openshift/api/template/v1/types.go deleted file mode 100644 index e3dee62fa..000000000 --- a/vendor/github.com/openshift/api/template/v1/types.go +++ /dev/null @@ -1,296 +0,0 @@ -package v1 - -import ( - "fmt" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Template contains the inputs needed to produce a Config. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Template struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // message is an optional instructional message that will - // be displayed when this template is instantiated. - // This field should inform the user how to utilize the newly created resources. - // Parameter substitution will be performed on the message before being - // displayed so that generated credentials and other parameters can be - // included in the output. - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - - // objects is an array of resources to include in this template. - // If a namespace value is hardcoded in the object, it will be removed - // during template instantiation, however if the namespace value - // is, or contains, a ${PARAMETER_REFERENCE}, the resolved - // value after parameter substitution will be respected and the object - // will be created in that namespace. - // +kubebuilder:pruning:PreserveUnknownFields - Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` - - // parameters is an optional array of Parameters used during the - // Template to Config transformation. - Parameters []Parameter `json:"parameters,omitempty" protobuf:"bytes,4,rep,name=parameters"` - - // labels is a optional set of labels that are applied to every - // object during the Template to Config transformation. - ObjectLabels map[string]string `json:"labels,omitempty" protobuf:"bytes,5,rep,name=labels"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateList is a list of Template objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type TemplateList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of templates - Items []Template `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// Parameter defines a name/value variable that is to be processed during -// the Template to Config transformation. -type Parameter struct { - // name must be set and it can be referenced in Template - // Items using ${PARAMETER_NAME}. Required. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - - // Optional: The name that will show in UI instead of parameter 'Name' - DisplayName string `json:"displayName,omitempty" protobuf:"bytes,2,opt,name=displayName"` - - // description of a parameter. Optional. - Description string `json:"description,omitempty" protobuf:"bytes,3,opt,name=description"` - - // value holds the Parameter data. If specified, the generator will be - // ignored. The value replaces all occurrences of the Parameter ${Name} - // expression during the Template to Config transformation. Optional. - Value string `json:"value,omitempty" protobuf:"bytes,4,opt,name=value"` - - // generate specifies the generator to be used to generate random string - // from an input value specified by From field. The result string is - // stored into Value field. If empty, no generator is being used, leaving - // the result Value untouched. Optional. - // - // The only supported generator is "expression", which accepts a "from" - // value in the form of a simple regular expression containing the - // range expression "[a-zA-Z0-9]", and the length expression "a{length}". - // - // Examples: - // - // from | value - // ----------------------------- - // "test[0-9]{1}x" | "test7x" - // "[0-1]{8}" | "01001100" - // "0x[A-F0-9]{4}" | "0xB3AF" - // "[a-zA-Z0-9]{8}" | "hW4yQU5i" - // - Generate string `json:"generate,omitempty" protobuf:"bytes,5,opt,name=generate"` - - // from is an input value for the generator. Optional. - From string `json:"from,omitempty" protobuf:"bytes,6,opt,name=from"` - - // Optional: Indicates the parameter must have a value. Defaults to false. - Required bool `json:"required,omitempty" protobuf:"varint,7,opt,name=required"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateInstance requests and records the instantiation of a Template. -// TemplateInstance is part of an experimental API. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type TemplateInstance struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec describes the desired state of this TemplateInstance. - Spec TemplateInstanceSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - - // status describes the current state of this TemplateInstance. - // +optional - Status TemplateInstanceStatus `json:"status" protobuf:"bytes,3,opt,name=status"` -} - -// TemplateInstanceSpec describes the desired state of a TemplateInstance. -type TemplateInstanceSpec struct { - // template is a full copy of the template for instantiation. - Template Template `json:"template" protobuf:"bytes,1,opt,name=template"` - - // secret is a reference to a Secret object containing the necessary - // template parameters. - Secret *corev1.LocalObjectReference `json:"secret,omitempty" protobuf:"bytes,2,opt,name=secret"` - - // requester holds the identity of the agent requesting the template - // instantiation. - // +optional - Requester *TemplateInstanceRequester `json:"requester" protobuf:"bytes,3,opt,name=requester"` -} - -// TemplateInstanceRequester holds the identity of an agent requesting a -// template instantiation. -type TemplateInstanceRequester struct { - // username uniquely identifies this user among all active users. - Username string `json:"username,omitempty" protobuf:"bytes,1,opt,name=username"` - - // uid is a unique value that identifies this user across time; if this user is - // deleted and another user by the same name is added, they will have - // different UIDs. - UID string `json:"uid,omitempty" protobuf:"bytes,2,opt,name=uid"` - - // groups represent the groups this user is a part of. - Groups []string `json:"groups,omitempty" protobuf:"bytes,3,rep,name=groups"` - - // extra holds additional information provided by the authenticator. - Extra map[string]ExtraValue `json:"extra,omitempty" protobuf:"bytes,4,rep,name=extra"` -} - -// ExtraValue masks the value so protobuf can generate -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type ExtraValue []string - -func (t ExtraValue) String() string { - return fmt.Sprintf("%v", []string(t)) -} - -// TemplateInstanceStatus describes the current state of a TemplateInstance. -type TemplateInstanceStatus struct { - // conditions represent the latest available observations of a - // TemplateInstance's current state. - // +optional - Conditions []TemplateInstanceCondition `json:"conditions,omitempty" protobuf:"bytes,1,rep,name=conditions"` - - // objects references the objects created by the TemplateInstance. - // +optional - Objects []TemplateInstanceObject `json:"objects,omitempty" protobuf:"bytes,2,rep,name=objects"` -} - -// TemplateInstanceCondition contains condition information for a -// TemplateInstance. -type TemplateInstanceCondition struct { - // type of the condition, currently Ready or InstantiateFailure. - Type TemplateInstanceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=TemplateInstanceConditionType"` - // status of the condition, one of True, False or Unknown. - Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` - // lastTransitionTime is the last time a condition status transitioned from - // one state to another. - LastTransitionTime metav1.Time `json:"lastTransitionTime" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // reason is a brief machine readable explanation for the condition's last - // transition. - Reason string `json:"reason" protobuf:"bytes,4,opt,name=reason"` - // message is a human readable description of the details of the last - // transition, complementing reason. - Message string `json:"message" protobuf:"bytes,5,opt,name=message"` -} - -// TemplateInstanceConditionType is the type of condition pertaining to a -// TemplateInstance. -type TemplateInstanceConditionType string - -const ( - // TemplateInstanceReady indicates the readiness of the template - // instantiation. - TemplateInstanceReady TemplateInstanceConditionType = "Ready" - // TemplateInstanceInstantiateFailure indicates the failure of the template - // instantiation - TemplateInstanceInstantiateFailure TemplateInstanceConditionType = "InstantiateFailure" -) - -// TemplateInstanceObject references an object created by a TemplateInstance. -type TemplateInstanceObject struct { - // ref is a reference to the created object. When used under .spec, only - // name and namespace are used; these can contain references to parameters - // which will be substituted following the usual rules. - Ref corev1.ObjectReference `json:"ref,omitempty" protobuf:"bytes,1,opt,name=ref"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// TemplateInstanceList is a list of TemplateInstance objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type TemplateInstanceList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of Templateinstances - Items []TemplateInstance `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BrokerTemplateInstance holds the service broker-related state associated with -// a TemplateInstance. BrokerTemplateInstance is part of an experimental API. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BrokerTemplateInstance struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec describes the state of this BrokerTemplateInstance. - Spec BrokerTemplateInstanceSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` -} - -// BrokerTemplateInstanceSpec describes the state of a BrokerTemplateInstance. -type BrokerTemplateInstanceSpec struct { - // templateInstance is a reference to a TemplateInstance object residing - // in a namespace. - TemplateInstance corev1.ObjectReference `json:"templateInstance" protobuf:"bytes,1,opt,name=templateInstance"` - - // secret is a reference to a Secret object residing in a namespace, - // containing the necessary template parameters. - Secret corev1.ObjectReference `json:"secret" protobuf:"bytes,2,opt,name=secret"` - - // bindingIDs is a list of 'binding_id's provided during successive bind - // calls to the template service broker. - BindingIDs []string `json:"bindingIDs,omitempty" protobuf:"bytes,3,rep,name=bindingIDs"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// BrokerTemplateInstanceList is a list of BrokerTemplateInstance objects. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type BrokerTemplateInstanceList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is a list of BrokerTemplateInstances - Items []BrokerTemplateInstance `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/template/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/template/v1/zz_generated.deepcopy.go deleted file mode 100644 index 7cefe4863..000000000 --- a/vendor/github.com/openshift/api/template/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,394 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - 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 *BrokerTemplateInstance) DeepCopyInto(out *BrokerTemplateInstance) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerTemplateInstance. -func (in *BrokerTemplateInstance) DeepCopy() *BrokerTemplateInstance { - if in == nil { - return nil - } - out := new(BrokerTemplateInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BrokerTemplateInstance) 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 *BrokerTemplateInstanceList) DeepCopyInto(out *BrokerTemplateInstanceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]BrokerTemplateInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerTemplateInstanceList. -func (in *BrokerTemplateInstanceList) DeepCopy() *BrokerTemplateInstanceList { - if in == nil { - return nil - } - out := new(BrokerTemplateInstanceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *BrokerTemplateInstanceList) 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 *BrokerTemplateInstanceSpec) DeepCopyInto(out *BrokerTemplateInstanceSpec) { - *out = *in - out.TemplateInstance = in.TemplateInstance - out.Secret = in.Secret - if in.BindingIDs != nil { - in, out := &in.BindingIDs, &out.BindingIDs - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BrokerTemplateInstanceSpec. -func (in *BrokerTemplateInstanceSpec) DeepCopy() *BrokerTemplateInstanceSpec { - if in == nil { - return nil - } - out := new(BrokerTemplateInstanceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ExtraValue) DeepCopyInto(out *ExtraValue) { - { - in := &in - *out = make(ExtraValue, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtraValue. -func (in ExtraValue) DeepCopy() ExtraValue { - if in == nil { - return nil - } - out := new(ExtraValue) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Parameter) DeepCopyInto(out *Parameter) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Parameter. -func (in *Parameter) DeepCopy() *Parameter { - if in == nil { - return nil - } - out := new(Parameter) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Template) DeepCopyInto(out *Template) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Objects != nil { - in, out := &in.Objects, &out.Objects - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Parameters != nil { - in, out := &in.Parameters, &out.Parameters - *out = make([]Parameter, len(*in)) - copy(*out, *in) - } - if in.ObjectLabels != nil { - in, out := &in.ObjectLabels, &out.ObjectLabels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Template. -func (in *Template) DeepCopy() *Template { - if in == nil { - return nil - } - out := new(Template) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Template) 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 *TemplateInstance) DeepCopyInto(out *TemplateInstance) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstance. -func (in *TemplateInstance) DeepCopy() *TemplateInstance { - if in == nil { - return nil - } - out := new(TemplateInstance) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateInstance) 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 *TemplateInstanceCondition) DeepCopyInto(out *TemplateInstanceCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceCondition. -func (in *TemplateInstanceCondition) DeepCopy() *TemplateInstanceCondition { - if in == nil { - return nil - } - out := new(TemplateInstanceCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateInstanceList) DeepCopyInto(out *TemplateInstanceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]TemplateInstance, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceList. -func (in *TemplateInstanceList) DeepCopy() *TemplateInstanceList { - if in == nil { - return nil - } - out := new(TemplateInstanceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateInstanceList) 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 *TemplateInstanceObject) DeepCopyInto(out *TemplateInstanceObject) { - *out = *in - out.Ref = in.Ref - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceObject. -func (in *TemplateInstanceObject) DeepCopy() *TemplateInstanceObject { - if in == nil { - return nil - } - out := new(TemplateInstanceObject) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateInstanceRequester) DeepCopyInto(out *TemplateInstanceRequester) { - *out = *in - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]ExtraValue, len(*in)) - for key, val := range *in { - var outVal []string - if val == nil { - (*out)[key] = nil - } else { - in, out := &val, &outVal - *out = make(ExtraValue, len(*in)) - copy(*out, *in) - } - (*out)[key] = outVal - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceRequester. -func (in *TemplateInstanceRequester) DeepCopy() *TemplateInstanceRequester { - if in == nil { - return nil - } - out := new(TemplateInstanceRequester) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateInstanceSpec) DeepCopyInto(out *TemplateInstanceSpec) { - *out = *in - in.Template.DeepCopyInto(&out.Template) - if in.Secret != nil { - in, out := &in.Secret, &out.Secret - *out = new(corev1.LocalObjectReference) - **out = **in - } - if in.Requester != nil { - in, out := &in.Requester, &out.Requester - *out = new(TemplateInstanceRequester) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceSpec. -func (in *TemplateInstanceSpec) DeepCopy() *TemplateInstanceSpec { - if in == nil { - return nil - } - out := new(TemplateInstanceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateInstanceStatus) DeepCopyInto(out *TemplateInstanceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]TemplateInstanceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Objects != nil { - in, out := &in.Objects, &out.Objects - *out = make([]TemplateInstanceObject, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateInstanceStatus. -func (in *TemplateInstanceStatus) DeepCopy() *TemplateInstanceStatus { - if in == nil { - return nil - } - out := new(TemplateInstanceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TemplateList) DeepCopyInto(out *TemplateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Template, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TemplateList. -func (in *TemplateList) DeepCopy() *TemplateList { - if in == nil { - return nil - } - out := new(TemplateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *TemplateList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/openshift/api/template/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/template/v1/zz_generated.model_name.go deleted file mode 100644 index eb14ace8d..000000000 --- a/vendor/github.com/openshift/api/template/v1/zz_generated.model_name.go +++ /dev/null @@ -1,71 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BrokerTemplateInstance) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.BrokerTemplateInstance" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BrokerTemplateInstanceList) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.BrokerTemplateInstanceList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in BrokerTemplateInstanceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.BrokerTemplateInstanceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Parameter) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.Parameter" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Template) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.Template" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstance) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstance" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceCondition) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceList) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceObject) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceObject" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceRequester) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceRequester" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceSpec) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateInstanceStatus) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateInstanceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in TemplateList) OpenAPIModelName() string { - return "com.github.openshift.api.template.v1.TemplateList" -} diff --git a/vendor/github.com/openshift/api/template/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/template/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index 761390d02..000000000 --- a/vendor/github.com/openshift/api/template/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,159 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_BrokerTemplateInstance = map[string]string{ - "": "BrokerTemplateInstance holds the service broker-related state associated with a TemplateInstance. BrokerTemplateInstance is part of an experimental API.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec describes the state of this BrokerTemplateInstance.", -} - -func (BrokerTemplateInstance) SwaggerDoc() map[string]string { - return map_BrokerTemplateInstance -} - -var map_BrokerTemplateInstanceList = map[string]string{ - "": "BrokerTemplateInstanceList is a list of BrokerTemplateInstance objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of BrokerTemplateInstances", -} - -func (BrokerTemplateInstanceList) SwaggerDoc() map[string]string { - return map_BrokerTemplateInstanceList -} - -var map_BrokerTemplateInstanceSpec = map[string]string{ - "": "BrokerTemplateInstanceSpec describes the state of a BrokerTemplateInstance.", - "templateInstance": "templateInstance is a reference to a TemplateInstance object residing in a namespace.", - "secret": "secret is a reference to a Secret object residing in a namespace, containing the necessary template parameters.", - "bindingIDs": "bindingIDs is a list of 'binding_id's provided during successive bind calls to the template service broker.", -} - -func (BrokerTemplateInstanceSpec) SwaggerDoc() map[string]string { - return map_BrokerTemplateInstanceSpec -} - -var map_Parameter = map[string]string{ - "": "Parameter defines a name/value variable that is to be processed during the Template to Config transformation.", - "name": "name must be set and it can be referenced in Template Items using ${PARAMETER_NAME}. Required.", - "displayName": "Optional: The name that will show in UI instead of parameter 'Name'", - "description": "description of a parameter. Optional.", - "value": "value holds the Parameter data. If specified, the generator will be ignored. The value replaces all occurrences of the Parameter ${Name} expression during the Template to Config transformation. Optional.", - "generate": "generate specifies the generator to be used to generate random string from an input value specified by From field. The result string is stored into Value field. If empty, no generator is being used, leaving the result Value untouched. Optional.\n\nThe only supported generator is \"expression\", which accepts a \"from\" value in the form of a simple regular expression containing the range expression \"[a-zA-Z0-9]\", and the length expression \"a{length}\".\n\nExamples:\n\nfrom | value", - "from": "from is an input value for the generator. Optional.", - "required": "Optional: Indicates the parameter must have a value. Defaults to false.", -} - -func (Parameter) SwaggerDoc() map[string]string { - return map_Parameter -} - -var map_Template = map[string]string{ - "": "Template contains the inputs needed to produce a Config.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "message": "message is an optional instructional message that will be displayed when this template is instantiated. This field should inform the user how to utilize the newly created resources. Parameter substitution will be performed on the message before being displayed so that generated credentials and other parameters can be included in the output.", - "objects": "objects is an array of resources to include in this template. If a namespace value is hardcoded in the object, it will be removed during template instantiation, however if the namespace value is, or contains, a ${PARAMETER_REFERENCE}, the resolved value after parameter substitution will be respected and the object will be created in that namespace.", - "parameters": "parameters is an optional array of Parameters used during the Template to Config transformation.", - "labels": "labels is a optional set of labels that are applied to every object during the Template to Config transformation.", -} - -func (Template) SwaggerDoc() map[string]string { - return map_Template -} - -var map_TemplateInstance = map[string]string{ - "": "TemplateInstance requests and records the instantiation of a Template. TemplateInstance is part of an experimental API.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "spec": "spec describes the desired state of this TemplateInstance.", - "status": "status describes the current state of this TemplateInstance.", -} - -func (TemplateInstance) SwaggerDoc() map[string]string { - return map_TemplateInstance -} - -var map_TemplateInstanceCondition = map[string]string{ - "": "TemplateInstanceCondition contains condition information for a TemplateInstance.", - "type": "type of the condition, currently Ready or InstantiateFailure.", - "status": "status of the condition, one of True, False or Unknown.", - "lastTransitionTime": "lastTransitionTime is the last time a condition status transitioned from one state to another.", - "reason": "reason is a brief machine readable explanation for the condition's last transition.", - "message": "message is a human readable description of the details of the last transition, complementing reason.", -} - -func (TemplateInstanceCondition) SwaggerDoc() map[string]string { - return map_TemplateInstanceCondition -} - -var map_TemplateInstanceList = map[string]string{ - "": "TemplateInstanceList is a list of TemplateInstance objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of Templateinstances", -} - -func (TemplateInstanceList) SwaggerDoc() map[string]string { - return map_TemplateInstanceList -} - -var map_TemplateInstanceObject = map[string]string{ - "": "TemplateInstanceObject references an object created by a TemplateInstance.", - "ref": "ref is a reference to the created object. When used under .spec, only name and namespace are used; these can contain references to parameters which will be substituted following the usual rules.", -} - -func (TemplateInstanceObject) SwaggerDoc() map[string]string { - return map_TemplateInstanceObject -} - -var map_TemplateInstanceRequester = map[string]string{ - "": "TemplateInstanceRequester holds the identity of an agent requesting a template instantiation.", - "username": "username uniquely identifies this user among all active users.", - "uid": "uid is a unique value that identifies this user across time; if this user is deleted and another user by the same name is added, they will have different UIDs.", - "groups": "groups represent the groups this user is a part of.", - "extra": "extra holds additional information provided by the authenticator.", -} - -func (TemplateInstanceRequester) SwaggerDoc() map[string]string { - return map_TemplateInstanceRequester -} - -var map_TemplateInstanceSpec = map[string]string{ - "": "TemplateInstanceSpec describes the desired state of a TemplateInstance.", - "template": "template is a full copy of the template for instantiation.", - "secret": "secret is a reference to a Secret object containing the necessary template parameters.", - "requester": "requester holds the identity of the agent requesting the template instantiation.", -} - -func (TemplateInstanceSpec) SwaggerDoc() map[string]string { - return map_TemplateInstanceSpec -} - -var map_TemplateInstanceStatus = map[string]string{ - "": "TemplateInstanceStatus describes the current state of a TemplateInstance.", - "conditions": "conditions represent the latest available observations of a TemplateInstance's current state.", - "objects": "objects references the objects created by the TemplateInstance.", -} - -func (TemplateInstanceStatus) SwaggerDoc() map[string]string { - return map_TemplateInstanceStatus -} - -var map_TemplateList = map[string]string{ - "": "TemplateList is a list of Template objects.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is a list of templates", -} - -func (TemplateList) SwaggerDoc() map[string]string { - return map_TemplateList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/api/user/.codegen.yaml b/vendor/github.com/openshift/api/user/.codegen.yaml deleted file mode 100644 index f7a37129a..000000000 --- a/vendor/github.com/openshift/api/user/.codegen.yaml +++ /dev/null @@ -1,2 +0,0 @@ -protobuf: - disabled: false diff --git a/vendor/github.com/openshift/api/user/install.go b/vendor/github.com/openshift/api/user/install.go deleted file mode 100644 index 28d498062..000000000 --- a/vendor/github.com/openshift/api/user/install.go +++ /dev/null @@ -1,26 +0,0 @@ -package user - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - - userv1 "github.com/openshift/api/user/v1" -) - -const ( - GroupName = "user.openshift.io" -) - -var ( - schemeBuilder = runtime.NewSchemeBuilder(userv1.Install) - // Install is a function which adds every version of this group to a scheme - Install = schemeBuilder.AddToScheme -) - -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -func Kind(kind string) schema.GroupKind { - return schema.GroupKind{Group: GroupName, Kind: kind} -} diff --git a/vendor/github.com/openshift/api/user/v1/doc.go b/vendor/github.com/openshift/api/user/v1/doc.go deleted file mode 100644 index a8c24927d..000000000 --- a/vendor/github.com/openshift/api/user/v1/doc.go +++ /dev/null @@ -1,9 +0,0 @@ -// +k8s:deepcopy-gen=package,register -// +k8s:conversion-gen=github.com/openshift/origin/pkg/user/apis/user -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:openapi-model-package=com.github.openshift.api.user.v1 - -// +groupName=user.openshift.io -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/github.com/openshift/api/user/v1/generated.pb.go b/vendor/github.com/openshift/api/user/v1/generated.pb.go deleted file mode 100644 index fb671559c..000000000 --- a/vendor/github.com/openshift/api/user/v1/generated.pb.go +++ /dev/null @@ -1,1986 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: github.com/openshift/api/user/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *Group) Reset() { *m = Group{} } - -func (m *GroupList) Reset() { *m = GroupList{} } - -func (m *Identity) Reset() { *m = Identity{} } - -func (m *IdentityList) Reset() { *m = IdentityList{} } - -func (m *OptionalNames) Reset() { *m = OptionalNames{} } - -func (m *User) Reset() { *m = User{} } - -func (m *UserIdentityMapping) Reset() { *m = UserIdentityMapping{} } - -func (m *UserList) Reset() { *m = UserList{} } - -func (m *Group) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Group) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Group) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Users != nil { - { - size, err := m.Users.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *GroupList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GroupList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GroupList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *Identity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Identity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Identity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Extra) > 0 { - keysForExtra := make([]string, 0, len(m.Extra)) - for k := range m.Extra { - keysForExtra = append(keysForExtra, string(k)) - } - sort.Strings(keysForExtra) - for iNdEx := len(keysForExtra) - 1; iNdEx >= 0; iNdEx-- { - v := m.Extra[string(keysForExtra[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForExtra[iNdEx]) - copy(dAtA[i:], keysForExtra[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForExtra[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2a - } - } - { - size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - i -= len(m.ProviderUserName) - copy(dAtA[i:], m.ProviderUserName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderUserName))) - i-- - dAtA[i] = 0x1a - i -= len(m.ProviderName) - copy(dAtA[i:], m.ProviderName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ProviderName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *IdentityList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *IdentityList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *IdentityList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m OptionalNames) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m OptionalNames) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m OptionalNames) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m) > 0 { - for iNdEx := len(m) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m[iNdEx]) - copy(dAtA[i:], m[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m[iNdEx]))) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *User) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *User) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *User) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Groups) > 0 { - for iNdEx := len(m.Groups) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Groups[iNdEx]) - copy(dAtA[i:], m.Groups[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Groups[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.Identities) > 0 { - for iNdEx := len(m.Identities) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Identities[iNdEx]) - copy(dAtA[i:], m.Identities[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Identities[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.FullName) - copy(dAtA[i:], m.FullName) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FullName))) - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *UserIdentityMapping) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserIdentityMapping) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserIdentityMapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.User.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Identity.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *UserList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *UserList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *UserList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Group) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.Users != nil { - l = m.Users.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *GroupList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *Identity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ProviderName) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ProviderUserName) - n += 1 + l + sovGenerated(uint64(l)) - l = m.User.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Extra) > 0 { - for k, v := range m.Extra { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - return n -} - -func (m *IdentityList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m OptionalNames) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m) > 0 { - for _, s := range m { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *User) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.FullName) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Identities) > 0 { - for _, s := range m.Identities { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.Groups) > 0 { - for _, s := range m.Groups { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *UserIdentityMapping) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Identity.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.User.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *UserList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *Group) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Group{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Users:` + strings.Replace(fmt.Sprintf("%v", this.Users), "OptionalNames", "OptionalNames", 1) + `,`, - `}`, - }, "") - return s -} -func (this *GroupList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Group{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Group", "Group", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&GroupList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *Identity) String() string { - if this == nil { - return "nil" - } - keysForExtra := make([]string, 0, len(this.Extra)) - for k := range this.Extra { - keysForExtra = append(keysForExtra, k) - } - sort.Strings(keysForExtra) - mapStringForExtra := "map[string]string{" - for _, k := range keysForExtra { - mapStringForExtra += fmt.Sprintf("%v: %v,", k, this.Extra[k]) - } - mapStringForExtra += "}" - s := strings.Join([]string{`&Identity{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `ProviderName:` + fmt.Sprintf("%v", this.ProviderName) + `,`, - `ProviderUserName:` + fmt.Sprintf("%v", this.ProviderUserName) + `,`, - `User:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.User), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `Extra:` + mapStringForExtra + `,`, - `}`, - }, "") - return s -} -func (this *IdentityList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]Identity{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "Identity", "Identity", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&IdentityList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *User) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&User{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `FullName:` + fmt.Sprintf("%v", this.FullName) + `,`, - `Identities:` + fmt.Sprintf("%v", this.Identities) + `,`, - `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, - `}`, - }, "") - return s -} -func (this *UserIdentityMapping) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UserIdentityMapping{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Identity:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Identity), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `User:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.User), "ObjectReference", "v11.ObjectReference", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *UserList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]User{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "User", "User", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&UserList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *Group) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Group: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Group: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Users", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Users == nil { - m.Users = OptionalNames{} - } - if err := m.Users.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GroupList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: GroupList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GroupList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Group{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Identity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Identity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProviderUserName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ProviderUserName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Extra", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Extra == nil { - m.Extra = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Extra[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *IdentityList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: IdentityList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: IdentityList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, Identity{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *OptionalNames) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: OptionalNames: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: OptionalNames: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - *m = append(*m, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *User) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: User: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: User: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FullName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FullName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identities", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identities = append(m.Identities, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserIdentityMapping) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserIdentityMapping: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserIdentityMapping: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identity", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Identity.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.User.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *UserList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: UserList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: UserList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, User{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/github.com/openshift/api/user/v1/generated.proto b/vendor/github.com/openshift/api/user/v1/generated.proto deleted file mode 100644 index f07b446ad..000000000 --- a/vendor/github.com/openshift/api/user/v1/generated.proto +++ /dev/null @@ -1,144 +0,0 @@ - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package github.com.openshift.api.user.v1; - -import "k8s.io/api/core/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "github.com/openshift/api/user/v1"; - -// Group represents a referenceable set of Users -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Group { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // users is the list of users in this group. - optional OptionalNames users = 2; -} - -// GroupList is a collection of Groups -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message GroupList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of groups - repeated Group items = 2; -} - -// Identity records a successful authentication of a user with an identity provider. The -// information about the source of authentication is stored on the identity, and the identity -// is then associated with a single user object. Multiple identities can reference a single -// user. Information retrieved from the authentication provider is stored in the extra field -// using a schema determined by the provider. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message Identity { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // providerName is the source of identity information - optional string providerName = 2; - - // providerUserName uniquely represents this identity in the scope of the provider - optional string providerUserName = 3; - - // user is a reference to the user this identity is associated with - // Both Name and UID must be set - optional .k8s.io.api.core.v1.ObjectReference user = 4; - - // extra holds extra information about this identity - map extra = 5; -} - -// IdentityList is a collection of Identities -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message IdentityList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of identities - repeated Identity items = 2; -} - -// OptionalNames is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -message OptionalNames { - // items, if empty, will result in an empty slice - - repeated string items = 1; -} - -// Upon log in, every user of the system receives a User and Identity resource. Administrators -// may directly manipulate the attributes of the users for their own tracking, or set groups -// via the API. The user name is unique and is chosen based on the value provided by the -// identity provider - if a user already exists with the incoming name, the user name may have -// a number appended to it depending on the configuration of the system. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message User { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // fullName is the full name of user - optional string fullName = 2; - - // identities are the identities associated with this user - // +optional - repeated string identities = 3; - - // groups specifies group names this user is a member of. - // This field is deprecated and will be removed in a future release. - // Instead, create a Group object containing the name of this User. - repeated string groups = 4; -} - -// UserIdentityMapping maps a user to an identity -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message UserIdentityMapping { - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // identity is a reference to an identity - optional .k8s.io.api.core.v1.ObjectReference identity = 2; - - // user is a reference to a user - optional .k8s.io.api.core.v1.ObjectReference user = 3; -} - -// UserList is a collection of Users -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -message UserList { - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items is the list of users - repeated User items = 2; -} - diff --git a/vendor/github.com/openshift/api/user/v1/generated.protomessage.pb.go b/vendor/github.com/openshift/api/user/v1/generated.protomessage.pb.go deleted file mode 100644 index deab8656e..000000000 --- a/vendor/github.com/openshift/api/user/v1/generated.protomessage.pb.go +++ /dev/null @@ -1,22 +0,0 @@ -//go:build kubernetes_protomessage_one_more_release -// +build kubernetes_protomessage_one_more_release - -// Code generated by go-to-protobuf. DO NOT EDIT. - -package v1 - -func (*Group) ProtoMessage() {} - -func (*GroupList) ProtoMessage() {} - -func (*Identity) ProtoMessage() {} - -func (*IdentityList) ProtoMessage() {} - -func (*OptionalNames) ProtoMessage() {} - -func (*User) ProtoMessage() {} - -func (*UserIdentityMapping) ProtoMessage() {} - -func (*UserList) ProtoMessage() {} diff --git a/vendor/github.com/openshift/api/user/v1/legacy.go b/vendor/github.com/openshift/api/user/v1/legacy.go deleted file mode 100644 index 6817a9f1f..000000000 --- a/vendor/github.com/openshift/api/user/v1/legacy.go +++ /dev/null @@ -1,27 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - legacyGroupVersion = schema.GroupVersion{Group: "", Version: "v1"} - legacySchemeBuilder = runtime.NewSchemeBuilder(addLegacyKnownTypes, corev1.AddToScheme) - DeprecatedInstallWithoutGroup = legacySchemeBuilder.AddToScheme -) - -func addLegacyKnownTypes(scheme *runtime.Scheme) error { - types := []runtime.Object{ - &User{}, - &UserList{}, - &Identity{}, - &IdentityList{}, - &UserIdentityMapping{}, - &Group{}, - &GroupList{}, - } - scheme.AddKnownTypes(legacyGroupVersion, types...) - return nil -} diff --git a/vendor/github.com/openshift/api/user/v1/register.go b/vendor/github.com/openshift/api/user/v1/register.go deleted file mode 100644 index 11341d72a..000000000 --- a/vendor/github.com/openshift/api/user/v1/register.go +++ /dev/null @@ -1,44 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -var ( - GroupName = "user.openshift.io" - GroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - schemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, corev1.AddToScheme) - // Install is a function which adds this version to a scheme - Install = schemeBuilder.AddToScheme - - // SchemeGroupVersion generated code relies on this name - // Deprecated - SchemeGroupVersion = GroupVersion - // AddToScheme exists solely to keep the old generators creating valid code - // DEPRECATED - AddToScheme = schemeBuilder.AddToScheme -) - -// Resource generated code relies on this being here, but it logically belongs to the group -// DEPRECATED -func Resource(resource string) schema.GroupResource { - return schema.GroupResource{Group: GroupName, Resource: resource} -} - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(GroupVersion, - &User{}, - &UserList{}, - &Identity{}, - &IdentityList{}, - &UserIdentityMapping{}, - &Group{}, - &GroupList{}, - ) - metav1.AddToGroupVersion(scheme, GroupVersion) - return nil -} diff --git a/vendor/github.com/openshift/api/user/v1/types.go b/vendor/github.com/openshift/api/user/v1/types.go deleted file mode 100644 index 64ae8c830..000000000 --- a/vendor/github.com/openshift/api/user/v1/types.go +++ /dev/null @@ -1,174 +0,0 @@ -package v1 - -import ( - "fmt" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Upon log in, every user of the system receives a User and Identity resource. Administrators -// may directly manipulate the attributes of the users for their own tracking, or set groups -// via the API. The user name is unique and is chosen based on the value provided by the -// identity provider - if a user already exists with the incoming name, the user name may have -// a number appended to it depending on the configuration of the system. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type User struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // fullName is the full name of user - FullName string `json:"fullName,omitempty" protobuf:"bytes,2,opt,name=fullName"` - - // identities are the identities associated with this user - // +optional - Identities []string `json:"identities,omitempty" protobuf:"bytes,3,rep,name=identities"` - - // groups specifies group names this user is a member of. - // This field is deprecated and will be removed in a future release. - // Instead, create a Group object containing the name of this User. - Groups []string `json:"groups" protobuf:"bytes,4,rep,name=groups"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UserList is a collection of Users -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type UserList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of users - Items []User `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Identity records a successful authentication of a user with an identity provider. The -// information about the source of authentication is stored on the identity, and the identity -// is then associated with a single user object. Multiple identities can reference a single -// user. Information retrieved from the authentication provider is stored in the extra field -// using a schema determined by the provider. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Identity struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // providerName is the source of identity information - ProviderName string `json:"providerName" protobuf:"bytes,2,opt,name=providerName"` - - // providerUserName uniquely represents this identity in the scope of the provider - ProviderUserName string `json:"providerUserName" protobuf:"bytes,3,opt,name=providerUserName"` - - // user is a reference to the user this identity is associated with - // Both Name and UID must be set - User corev1.ObjectReference `json:"user" protobuf:"bytes,4,opt,name=user"` - - // extra holds extra information about this identity - Extra map[string]string `json:"extra,omitempty" protobuf:"bytes,5,rep,name=extra"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// IdentityList is a collection of Identities -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type IdentityList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of identities - Items []Identity `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// +genclient -// +genclient:nonNamespaced -// +genclient:onlyVerbs=get,create,update,delete -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// UserIdentityMapping maps a user to an identity -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type UserIdentityMapping struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // identity is a reference to an identity - Identity corev1.ObjectReference `json:"identity,omitempty" protobuf:"bytes,2,opt,name=identity"` - // user is a reference to a user - User corev1.ObjectReference `json:"user,omitempty" protobuf:"bytes,3,opt,name=user"` -} - -// OptionalNames is an array that may also be left nil to distinguish between set and unset. -// +protobuf.nullable=true -// +protobuf.options.(gogoproto.goproto_stringer)=false -type OptionalNames []string - -func (t OptionalNames) String() string { - return fmt.Sprintf("%v", []string(t)) -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// Group represents a referenceable set of Users -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type Group struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // users is the list of users in this group. - Users OptionalNames `json:"users" protobuf:"bytes,2,rep,name=users"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// GroupList is a collection of Groups -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -// +openshift:compatibility-gen:level=1 -type GroupList struct { - metav1.TypeMeta `json:",inline"` - - // metadata is the standard list's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items is the list of groups - Items []Group `json:"items" protobuf:"bytes,2,rep,name=items"` -} diff --git a/vendor/github.com/openshift/api/user/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/user/v1/zz_generated.deepcopy.go deleted file mode 100644 index b32e715a6..000000000 --- a/vendor/github.com/openshift/api/user/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,258 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -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 *Group) DeepCopyInto(out *Group) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Users != nil { - in, out := &in.Users, &out.Users - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Group. -func (in *Group) DeepCopy() *Group { - if in == nil { - return nil - } - out := new(Group) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Group) 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 *GroupList) DeepCopyInto(out *GroupList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Group, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupList. -func (in *GroupList) DeepCopy() *GroupList { - if in == nil { - return nil - } - out := new(GroupList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GroupList) 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 *Identity) DeepCopyInto(out *Identity) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.User = in.User - if in.Extra != nil { - in, out := &in.Extra, &out.Extra - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Identity. -func (in *Identity) DeepCopy() *Identity { - if in == nil { - return nil - } - out := new(Identity) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *Identity) 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 *IdentityList) DeepCopyInto(out *IdentityList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]Identity, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IdentityList. -func (in *IdentityList) DeepCopy() *IdentityList { - if in == nil { - return nil - } - out := new(IdentityList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IdentityList) 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 OptionalNames) DeepCopyInto(out *OptionalNames) { - { - in := &in - *out = make(OptionalNames, len(*in)) - copy(*out, *in) - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OptionalNames. -func (in OptionalNames) DeepCopy() OptionalNames { - if in == nil { - return nil - } - out := new(OptionalNames) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *User) DeepCopyInto(out *User) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Identities != nil { - in, out := &in.Identities, &out.Identities - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Groups != nil { - in, out := &in.Groups, &out.Groups - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new User. -func (in *User) DeepCopy() *User { - if in == nil { - return nil - } - out := new(User) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *User) 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 *UserIdentityMapping) DeepCopyInto(out *UserIdentityMapping) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Identity = in.Identity - out.User = in.User - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserIdentityMapping. -func (in *UserIdentityMapping) DeepCopy() *UserIdentityMapping { - if in == nil { - return nil - } - out := new(UserIdentityMapping) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserIdentityMapping) 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 *UserList) DeepCopyInto(out *UserList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]User, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new UserList. -func (in *UserList) DeepCopy() *UserList { - if in == nil { - return nil - } - out := new(UserList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *UserList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/github.com/openshift/api/user/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/user/v1/zz_generated.model_name.go deleted file mode 100644 index 1d59e2115..000000000 --- a/vendor/github.com/openshift/api/user/v1/zz_generated.model_name.go +++ /dev/null @@ -1,41 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Code generated by codegen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Group) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.Group" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in GroupList) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.GroupList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in Identity) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.Identity" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in IdentityList) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.IdentityList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in User) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.User" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserIdentityMapping) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.UserIdentityMapping" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in UserList) OpenAPIModelName() string { - return "com.github.openshift.api.user.v1.UserList" -} diff --git a/vendor/github.com/openshift/api/user/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/user/v1/zz_generated.swagger_doc_generated.go deleted file mode 100644 index d85e7dfc5..000000000 --- a/vendor/github.com/openshift/api/user/v1/zz_generated.swagger_doc_generated.go +++ /dev/null @@ -1,90 +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-swagger-docs.sh - -// AUTO-GENERATED FUNCTIONS START HERE -var map_Group = map[string]string{ - "": "Group represents a referenceable set of Users\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "users": "users is the list of users in this group.", -} - -func (Group) SwaggerDoc() map[string]string { - return map_Group -} - -var map_GroupList = map[string]string{ - "": "GroupList is a collection of Groups\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of groups", -} - -func (GroupList) SwaggerDoc() map[string]string { - return map_GroupList -} - -var map_Identity = map[string]string{ - "": "Identity records a successful authentication of a user with an identity provider. The information about the source of authentication is stored on the identity, and the identity is then associated with a single user object. Multiple identities can reference a single user. Information retrieved from the authentication provider is stored in the extra field using a schema determined by the provider.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "providerName": "providerName is the source of identity information", - "providerUserName": "providerUserName uniquely represents this identity in the scope of the provider", - "user": "user is a reference to the user this identity is associated with Both Name and UID must be set", - "extra": "extra holds extra information about this identity", -} - -func (Identity) SwaggerDoc() map[string]string { - return map_Identity -} - -var map_IdentityList = map[string]string{ - "": "IdentityList is a collection of Identities\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of identities", -} - -func (IdentityList) SwaggerDoc() map[string]string { - return map_IdentityList -} - -var map_User = map[string]string{ - "": "Upon log in, every user of the system receives a User and Identity resource. Administrators may directly manipulate the attributes of the users for their own tracking, or set groups via the API. The user name is unique and is chosen based on the value provided by the identity provider - if a user already exists with the incoming name, the user name may have a number appended to it depending on the configuration of the system.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "fullName": "fullName is the full name of user", - "identities": "identities are the identities associated with this user", - "groups": "groups specifies group names this user is a member of. This field is deprecated and will be removed in a future release. Instead, create a Group object containing the name of this User.", -} - -func (User) SwaggerDoc() map[string]string { - return map_User -} - -var map_UserIdentityMapping = map[string]string{ - "": "UserIdentityMapping maps a user to an identity\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "identity": "identity is a reference to an identity", - "user": "user is a reference to a user", -} - -func (UserIdentityMapping) SwaggerDoc() map[string]string { - return map_UserIdentityMapping -} - -var map_UserList = map[string]string{ - "": "UserList is a collection of Users\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", - "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", - "items": "items is the list of users", -} - -func (UserList) SwaggerDoc() map[string]string { - return map_UserList -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/acceptrisk.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/acceptrisk.go deleted file mode 100644 index 09f56804c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/acceptrisk.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AcceptRiskApplyConfiguration represents a declarative configuration of the AcceptRisk type for use -// with apply. -// -// AcceptRisk represents a risk that is considered acceptable. -type AcceptRiskApplyConfiguration struct { - // name is the name of the acceptable risk. - // It must be a non-empty string and must not exceed 256 characters. - Name *string `json:"name,omitempty"` -} - -// AcceptRiskApplyConfiguration constructs a declarative configuration of the AcceptRisk type for use with -// apply. -func AcceptRisk() *AcceptRiskApplyConfiguration { - return &AcceptRiskApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AcceptRiskApplyConfiguration) WithName(value string) *AcceptRiskApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudplatformstatus.go deleted file mode 100644 index 9a3e53e19..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudplatformstatus.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AlibabaCloudPlatformStatusApplyConfiguration represents a declarative configuration of the AlibabaCloudPlatformStatus type for use -// with apply. -// -// AlibabaCloudPlatformStatus holds the current status of the Alibaba Cloud infrastructure provider. -type AlibabaCloudPlatformStatusApplyConfiguration struct { - // region specifies the region for Alibaba Cloud resources created for the cluster. - Region *string `json:"region,omitempty"` - // resourceGroupID is the ID of the resource group for the cluster. - ResourceGroupID *string `json:"resourceGroupID,omitempty"` - // resourceTags is a list of additional tags to apply to Alibaba Cloud resources created for the cluster. - ResourceTags []AlibabaCloudResourceTagApplyConfiguration `json:"resourceTags,omitempty"` -} - -// AlibabaCloudPlatformStatusApplyConfiguration constructs a declarative configuration of the AlibabaCloudPlatformStatus type for use with -// apply. -func AlibabaCloudPlatformStatus() *AlibabaCloudPlatformStatusApplyConfiguration { - return &AlibabaCloudPlatformStatusApplyConfiguration{} -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *AlibabaCloudPlatformStatusApplyConfiguration) WithRegion(value string) *AlibabaCloudPlatformStatusApplyConfiguration { - b.Region = &value - return b -} - -// WithResourceGroupID sets the ResourceGroupID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceGroupID field is set to the value of the last call. -func (b *AlibabaCloudPlatformStatusApplyConfiguration) WithResourceGroupID(value string) *AlibabaCloudPlatformStatusApplyConfiguration { - b.ResourceGroupID = &value - return b -} - -// WithResourceTags adds the given value to the ResourceTags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceTags field. -func (b *AlibabaCloudPlatformStatusApplyConfiguration) WithResourceTags(values ...*AlibabaCloudResourceTagApplyConfiguration) *AlibabaCloudPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceTags") - } - b.ResourceTags = append(b.ResourceTags, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudresourcetag.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudresourcetag.go deleted file mode 100644 index 179408726..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/alibabacloudresourcetag.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AlibabaCloudResourceTagApplyConfiguration represents a declarative configuration of the AlibabaCloudResourceTag type for use -// with apply. -// -// AlibabaCloudResourceTag is the set of tags to add to apply to resources. -type AlibabaCloudResourceTagApplyConfiguration struct { - // key is the key of the tag. - Key *string `json:"key,omitempty"` - // value is the value of the tag. - Value *string `json:"value,omitempty"` -} - -// AlibabaCloudResourceTagApplyConfiguration constructs a declarative configuration of the AlibabaCloudResourceTag type for use with -// apply. -func AlibabaCloudResourceTag() *AlibabaCloudResourceTagApplyConfiguration { - return &AlibabaCloudResourceTagApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *AlibabaCloudResourceTagApplyConfiguration) WithKey(value string) *AlibabaCloudResourceTagApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *AlibabaCloudResourceTagApplyConfiguration) WithValue(value string) *AlibabaCloudResourceTagApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserver.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserver.go deleted file mode 100644 index 7189ef617..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserver.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// APIServerApplyConfiguration represents a declarative configuration of the APIServer type for use -// with apply. -// -// APIServer holds configuration (like serving certificates, client CA and CORS domains) -// shared by all API servers in the system, among them especially kube-apiserver -// and openshift-apiserver. The canonical name of an instance is 'cluster'. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type APIServerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *APIServerSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1.APIServerStatus `json:"status,omitempty"` -} - -// APIServer constructs a declarative configuration of the APIServer type for use with -// apply. -func APIServer(name string) *APIServerApplyConfiguration { - b := &APIServerApplyConfiguration{} - b.WithName(name) - b.WithKind("APIServer") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractAPIServerFrom extracts the applied configuration owned by fieldManager from -// aPIServer for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// aPIServer must be a unmodified APIServer API object that was retrieved from the Kubernetes API. -// ExtractAPIServerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAPIServerFrom(aPIServer *configv1.APIServer, fieldManager string, subresource string) (*APIServerApplyConfiguration, error) { - b := &APIServerApplyConfiguration{} - err := managedfields.ExtractInto(aPIServer, internal.Parser().Type("com.github.openshift.api.config.v1.APIServer"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(aPIServer.Name) - - b.WithKind("APIServer") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractAPIServer extracts the applied configuration owned by fieldManager from -// aPIServer. If no managedFields are found in aPIServer for fieldManager, a -// APIServerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// aPIServer must be a unmodified APIServer API object that was retrieved from the Kubernetes API. -// ExtractAPIServer provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAPIServer(aPIServer *configv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { - return ExtractAPIServerFrom(aPIServer, fieldManager, "") -} - -// ExtractAPIServerStatus extracts the applied configuration owned by fieldManager from -// aPIServer for the status subresource. -func ExtractAPIServerStatus(aPIServer *configv1.APIServer, fieldManager string) (*APIServerApplyConfiguration, error) { - return ExtractAPIServerFrom(aPIServer, fieldManager, "status") -} - -func (b APIServerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithKind(value string) *APIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithAPIVersion(value string) *APIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithName(value string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithGenerateName(value string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithNamespace(value string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithUID(value types.UID) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithResourceVersion(value string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithGeneration(value int64) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServerApplyConfiguration) WithLabels(entries map[string]string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServerApplyConfiguration) WithAnnotations(entries map[string]string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServerApplyConfiguration) WithFinalizers(values ...string) *APIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithSpec(value *APIServerSpecApplyConfiguration) *APIServerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServerApplyConfiguration) WithStatus(value configv1.APIServerStatus) *APIServerApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *APIServerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *APIServerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *APIServerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go deleted file mode 100644 index 5a9af0cb2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverencryption.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// APIServerEncryptionApplyConfiguration represents a declarative configuration of the APIServerEncryption type for use -// with apply. -// -// APIServerEncryption is used to encrypt sensitive resources on the cluster. -type APIServerEncryptionApplyConfiguration struct { - // type defines what encryption type should be used to encrypt resources at the datastore layer. - // When this field is unset (i.e. when it is set to the empty string), identity is implied. - // The behavior of unset can and will change over time. Even if encryption is enabled by default, - // the meaning of unset may change to a different encryption type based on changes in best practices. - // - // When encryption is enabled, all sensitive resources shipped with the platform are encrypted. - // This list of sensitive resources can and will change over time. The current authoritative list is: - // - // 1. secrets - // 2. configmaps - // 3. routes.route.openshift.io - // 4. oauthaccesstokens.oauth.openshift.io - // 5. oauthauthorizetokens.oauth.openshift.io - Type *configv1.EncryptionType `json:"type,omitempty"` - // kms defines the configuration for the external KMS instance that manages the encryption keys, - // when KMS encryption is enabled sensitive resources will be encrypted using keys managed by an - // externally configured KMS instance. - // - // The Key Management Service (KMS) instance provides symmetric encryption and is responsible for - // managing the lifecyle of the encryption keys outside of the control plane. - // This allows integration with an external provider to manage the data encryption keys securely. - KMS *KMSPluginConfigApplyConfiguration `json:"kms,omitempty"` -} - -// APIServerEncryptionApplyConfiguration constructs a declarative configuration of the APIServerEncryption type for use with -// apply. -func APIServerEncryption() *APIServerEncryptionApplyConfiguration { - return &APIServerEncryptionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *APIServerEncryptionApplyConfiguration) WithType(value configv1.EncryptionType) *APIServerEncryptionApplyConfiguration { - b.Type = &value - return b -} - -// WithKMS sets the KMS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KMS field is set to the value of the last call. -func (b *APIServerEncryptionApplyConfiguration) WithKMS(value *KMSPluginConfigApplyConfiguration) *APIServerEncryptionApplyConfiguration { - b.KMS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiservernamedservingcert.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiservernamedservingcert.go deleted file mode 100644 index 385ad9563..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiservernamedservingcert.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// APIServerNamedServingCertApplyConfiguration represents a declarative configuration of the APIServerNamedServingCert type for use -// with apply. -// -// APIServerNamedServingCert maps a server DNS name, as understood by a client, to a certificate. -type APIServerNamedServingCertApplyConfiguration 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. - Names []string `json:"names,omitempty"` - // 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 *SecretNameReferenceApplyConfiguration `json:"servingCertificate,omitempty"` -} - -// APIServerNamedServingCertApplyConfiguration constructs a declarative configuration of the APIServerNamedServingCert type for use with -// apply. -func APIServerNamedServingCert() *APIServerNamedServingCertApplyConfiguration { - return &APIServerNamedServingCertApplyConfiguration{} -} - -// WithNames adds the given value to the Names field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Names field. -func (b *APIServerNamedServingCertApplyConfiguration) WithNames(values ...string) *APIServerNamedServingCertApplyConfiguration { - for i := range values { - b.Names = append(b.Names, values[i]) - } - return b -} - -// WithServingCertificate sets the ServingCertificate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServingCertificate field is set to the value of the last call. -func (b *APIServerNamedServingCertApplyConfiguration) WithServingCertificate(value *SecretNameReferenceApplyConfiguration) *APIServerNamedServingCertApplyConfiguration { - b.ServingCertificate = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverservingcerts.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverservingcerts.go deleted file mode 100644 index 4972c3c94..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverservingcerts.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// APIServerServingCertsApplyConfiguration represents a declarative configuration of the APIServerServingCerts type for use -// with apply. -type APIServerServingCertsApplyConfiguration struct { - // 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. - NamedCertificates []APIServerNamedServingCertApplyConfiguration `json:"namedCertificates,omitempty"` -} - -// APIServerServingCertsApplyConfiguration constructs a declarative configuration of the APIServerServingCerts type for use with -// apply. -func APIServerServingCerts() *APIServerServingCertsApplyConfiguration { - return &APIServerServingCertsApplyConfiguration{} -} - -// WithNamedCertificates adds the given value to the NamedCertificates field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NamedCertificates field. -func (b *APIServerServingCertsApplyConfiguration) WithNamedCertificates(values ...*APIServerNamedServingCertApplyConfiguration) *APIServerServingCertsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNamedCertificates") - } - b.NamedCertificates = append(b.NamedCertificates, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverspec.go deleted file mode 100644 index 42392a353..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/apiserverspec.go +++ /dev/null @@ -1,131 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// APIServerSpecApplyConfiguration represents a declarative configuration of the APIServerSpec type for use -// with apply. -type APIServerSpecApplyConfiguration struct { - // servingCert is the TLS cert info for serving secure traffic. If not specified, operator managed certificates - // will be used for serving secure traffic. - ServingCerts *APIServerServingCertsApplyConfiguration `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. - ClientCA *ConfigMapNameReferenceApplyConfiguration `json:"clientCA,omitempty"` - // additionalCORSAllowedOrigins lists additional, user-defined regular expressions describing hosts for which the - // API server allows access using the CORS headers. This may be needed to access the API and the integrated OAuth - // server from JavaScript applications. - // The values are regular expressions that correspond to the Golang regular expression language. - AdditionalCORSAllowedOrigins []string `json:"additionalCORSAllowedOrigins,omitempty"` - // encryption allows the configuration of encryption of resources at the datastore layer. - Encryption *APIServerEncryptionApplyConfiguration `json:"encryption,omitempty"` - // tlsSecurityProfile specifies settings for TLS connections for externally exposed servers. - // - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default is the Intermediate profile. - TLSSecurityProfile *TLSSecurityProfileApplyConfiguration `json:"tlsSecurityProfile,omitempty"` - // tlsAdherence controls if components in the cluster adhere to the TLS security profile - // configured on this APIServer resource. - // - // Valid values are "LegacyAdheringComponentsOnly" and "StrictAllComponents". - // - // When set to "LegacyAdheringComponentsOnly", components that already honor the - // cluster-wide TLS profile continue to do so. Components that do not already honor - // it continue to use their individual TLS configurations. - // - // When set to "StrictAllComponents", all components must honor the configured TLS - // profile unless they have a component-specific TLS configuration that overrides - // it. This mode is recommended for security-conscious deployments and is required - // for certain compliance frameworks. - // - // Note: Some components such as Kubelet and IngressController have their own - // dedicated TLS configuration mechanisms via KubeletConfig and IngressController - // CRs respectively. When these component-specific TLS configurations are set, - // they take precedence over the cluster-wide tlsSecurityProfile. When not set, - // these components fall back to the cluster-wide default. - // - // Components that encounter an unknown value for tlsAdherence should treat it - // as "StrictAllComponents" and log a warning to ensure forward compatibility - // while defaulting to the more secure behavior. - // - // This field is optional. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is LegacyAdheringComponentsOnly. - // - // Once set, this field may be changed to a different value, but may not be removed. - TLSAdherence *configv1.TLSAdherencePolicy `json:"tlsAdherence,omitempty"` - // audit specifies the settings for audit configuration to be applied to all OpenShift-provided - // API servers in the cluster. - Audit *AuditApplyConfiguration `json:"audit,omitempty"` -} - -// APIServerSpecApplyConfiguration constructs a declarative configuration of the APIServerSpec type for use with -// apply. -func APIServerSpec() *APIServerSpecApplyConfiguration { - return &APIServerSpecApplyConfiguration{} -} - -// WithServingCerts sets the ServingCerts field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServingCerts field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithServingCerts(value *APIServerServingCertsApplyConfiguration) *APIServerSpecApplyConfiguration { - b.ServingCerts = value - return b -} - -// WithClientCA sets the ClientCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCA field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithClientCA(value *ConfigMapNameReferenceApplyConfiguration) *APIServerSpecApplyConfiguration { - b.ClientCA = value - return b -} - -// WithAdditionalCORSAllowedOrigins adds the given value to the AdditionalCORSAllowedOrigins field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalCORSAllowedOrigins field. -func (b *APIServerSpecApplyConfiguration) WithAdditionalCORSAllowedOrigins(values ...string) *APIServerSpecApplyConfiguration { - for i := range values { - b.AdditionalCORSAllowedOrigins = append(b.AdditionalCORSAllowedOrigins, values[i]) - } - return b -} - -// WithEncryption sets the Encryption field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Encryption field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithEncryption(value *APIServerEncryptionApplyConfiguration) *APIServerSpecApplyConfiguration { - b.Encryption = value - return b -} - -// WithTLSSecurityProfile sets the TLSSecurityProfile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSSecurityProfile field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithTLSSecurityProfile(value *TLSSecurityProfileApplyConfiguration) *APIServerSpecApplyConfiguration { - b.TLSSecurityProfile = value - return b -} - -// WithTLSAdherence sets the TLSAdherence field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSAdherence field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithTLSAdherence(value configv1.TLSAdherencePolicy) *APIServerSpecApplyConfiguration { - b.TLSAdherence = &value - return b -} - -// WithAudit sets the Audit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Audit field is set to the value of the last call. -func (b *APIServerSpecApplyConfiguration) WithAudit(value *AuditApplyConfiguration) *APIServerSpecApplyConfiguration { - b.Audit = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/audit.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/audit.go deleted file mode 100644 index a5483d5c7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/audit.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AuditApplyConfiguration represents a declarative configuration of the Audit type for use -// with apply. -type AuditApplyConfiguration struct { - // profile specifies the name of the desired top-level audit profile to be applied to all requests - // sent to any of the OpenShift-provided API servers in the cluster (kube-apiserver, - // openshift-apiserver and oauth-apiserver), with the exception of those requests that match - // one or more of the customRules. - // - // The following profiles are provided: - // - Default: default policy which means MetaData level logging with the exception of events - // (not logged at all), oauthaccesstokens and oauthauthorizetokens (both logged at RequestBody - // level). - // - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for - // write requests (create, update, patch). - // - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response - // HTTP payloads for read requests (get, list). - // - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. - // - // Warning: It is not recommended to disable audit logging by using the `None` profile unless you - // are fully aware of the risks of not logging data that can be beneficial when troubleshooting issues. - // If you disable audit logging and a support situation arises, you might need to enable audit logging - // and reproduce the issue in order to troubleshoot properly. - // - // If unset, the 'Default' profile is used as the default. - Profile *configv1.AuditProfileType `json:"profile,omitempty"` - // customRules specify profiles per group. These profile take precedence over the - // top-level profile field if they apply. They are evaluation from top to bottom and - // the first one that matches, applies. - CustomRules []AuditCustomRuleApplyConfiguration `json:"customRules,omitempty"` -} - -// AuditApplyConfiguration constructs a declarative configuration of the Audit type for use with -// apply. -func Audit() *AuditApplyConfiguration { - return &AuditApplyConfiguration{} -} - -// WithProfile sets the Profile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Profile field is set to the value of the last call. -func (b *AuditApplyConfiguration) WithProfile(value configv1.AuditProfileType) *AuditApplyConfiguration { - b.Profile = &value - return b -} - -// WithCustomRules adds the given value to the CustomRules field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CustomRules field. -func (b *AuditApplyConfiguration) WithCustomRules(values ...*AuditCustomRuleApplyConfiguration) *AuditApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithCustomRules") - } - b.CustomRules = append(b.CustomRules, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/auditcustomrule.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/auditcustomrule.go deleted file mode 100644 index f029288aa..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/auditcustomrule.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AuditCustomRuleApplyConfiguration represents a declarative configuration of the AuditCustomRule type for use -// with apply. -// -// AuditCustomRule describes a custom rule for an audit profile that takes precedence over -// the top-level profile. -type AuditCustomRuleApplyConfiguration struct { - // group is a name of group a request user must be member of in order to this profile to apply. - Group *string `json:"group,omitempty"` - // profile specifies the name of the desired audit policy configuration to be deployed to - // all OpenShift-provided API servers in the cluster. - // - // The following profiles are provided: - // - Default: the existing default policy. - // - WriteRequestBodies: like 'Default', but logs request and response HTTP payloads for - // write requests (create, update, patch). - // - AllRequestBodies: like 'WriteRequestBodies', but also logs request and response - // HTTP payloads for read requests (get, list). - // - None: no requests are logged at all, not even oauthaccesstokens and oauthauthorizetokens. - // - // If unset, the 'Default' profile is used as the default. - Profile *configv1.AuditProfileType `json:"profile,omitempty"` -} - -// AuditCustomRuleApplyConfiguration constructs a declarative configuration of the AuditCustomRule type for use with -// apply. -func AuditCustomRule() *AuditCustomRuleApplyConfiguration { - return &AuditCustomRuleApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *AuditCustomRuleApplyConfiguration) WithGroup(value string) *AuditCustomRuleApplyConfiguration { - b.Group = &value - return b -} - -// WithProfile sets the Profile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Profile field is set to the value of the last call. -func (b *AuditCustomRuleApplyConfiguration) WithProfile(value configv1.AuditProfileType) *AuditCustomRuleApplyConfiguration { - b.Profile = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authentication.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authentication.go deleted file mode 100644 index f407d372c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authentication.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// AuthenticationApplyConfiguration represents a declarative configuration of the Authentication type for use -// with apply. -// -// Authentication specifies cluster-wide settings for authentication (like OAuth and -// webhook token authenticators). The canonical name of an instance is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type AuthenticationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` -} - -// Authentication constructs a declarative configuration of the Authentication type for use with -// apply. -func Authentication(name string) *AuthenticationApplyConfiguration { - b := &AuthenticationApplyConfiguration{} - b.WithName(name) - b.WithKind("Authentication") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractAuthenticationFrom extracts the applied configuration owned by fieldManager from -// authentication for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// authentication must be a unmodified Authentication API object that was retrieved from the Kubernetes API. -// ExtractAuthenticationFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAuthenticationFrom(authentication *configv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { - b := &AuthenticationApplyConfiguration{} - err := managedfields.ExtractInto(authentication, internal.Parser().Type("com.github.openshift.api.config.v1.Authentication"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(authentication.Name) - - b.WithKind("Authentication") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractAuthentication extracts the applied configuration owned by fieldManager from -// authentication. If no managedFields are found in authentication for fieldManager, a -// AuthenticationApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// authentication must be a unmodified Authentication API object that was retrieved from the Kubernetes API. -// ExtractAuthentication provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAuthentication(authentication *configv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { - return ExtractAuthenticationFrom(authentication, fieldManager, "") -} - -// ExtractAuthenticationStatus extracts the applied configuration owned by fieldManager from -// authentication for the status subresource. -func ExtractAuthenticationStatus(authentication *configv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { - return ExtractAuthenticationFrom(authentication, fieldManager, "status") -} - -func (b AuthenticationApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithKind(value string) *AuthenticationApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *AuthenticationApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithName(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithGeneration(value int64) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *AuthenticationApplyConfiguration) WithFinalizers(values ...string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *AuthenticationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithSpec(value *AuthenticationSpecApplyConfiguration) *AuthenticationApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithStatus(value *AuthenticationStatusApplyConfiguration) *AuthenticationApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationspec.go deleted file mode 100644 index 3653cf676..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationspec.go +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AuthenticationSpecApplyConfiguration represents a declarative configuration of the AuthenticationSpec type for use -// with apply. -type AuthenticationSpecApplyConfiguration 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 *configv1.AuthenticationType `json:"type,omitempty"` - // 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. - OAuthMetadata *ConfigMapNameReferenceApplyConfiguration `json:"oauthMetadata,omitempty"` - // webhookTokenAuthenticators is DEPRECATED, setting it has no effect. - WebhookTokenAuthenticators []DeprecatedWebhookTokenAuthenticatorApplyConfiguration `json:"webhookTokenAuthenticators,omitempty"` - // webhookTokenAuthenticator configures a remote token reviewer. - // 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. - // - // Can only be set if "Type" is set to "None". - WebhookTokenAuthenticator *WebhookTokenAuthenticatorApplyConfiguration `json:"webhookTokenAuthenticator,omitempty"` - // serviceAccountIssuer is the identifier of the bound service account token - // issuer. - // The default is https://kubernetes.default.svc - // WARNING: Updating this field will not result in immediate invalidation of all bound tokens with the - // previous issuer value. Instead, the tokens issued by previous service account issuer will continue to - // be trusted for a time period chosen by the platform (currently set to 24h). - // This time period is subject to change over time. - // This allows internal components to transition to use new service account issuer without service distruption. - ServiceAccountIssuer *string `json:"serviceAccountIssuer,omitempty"` - // oidcProviders are OIDC identity providers that can issue tokens for this cluster - // Can only be set if "Type" is set to "OIDC". - // - // At most one provider can be configured. - OIDCProviders []OIDCProviderApplyConfiguration `json:"oidcProviders,omitempty"` -} - -// AuthenticationSpecApplyConfiguration constructs a declarative configuration of the AuthenticationSpec type for use with -// apply. -func AuthenticationSpec() *AuthenticationSpecApplyConfiguration { - return &AuthenticationSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithType(value configv1.AuthenticationType) *AuthenticationSpecApplyConfiguration { - b.Type = &value - return b -} - -// WithOAuthMetadata sets the OAuthMetadata field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OAuthMetadata field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithOAuthMetadata(value *ConfigMapNameReferenceApplyConfiguration) *AuthenticationSpecApplyConfiguration { - b.OAuthMetadata = value - return b -} - -// WithWebhookTokenAuthenticators adds the given value to the WebhookTokenAuthenticators field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the WebhookTokenAuthenticators field. -func (b *AuthenticationSpecApplyConfiguration) WithWebhookTokenAuthenticators(values ...*DeprecatedWebhookTokenAuthenticatorApplyConfiguration) *AuthenticationSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithWebhookTokenAuthenticators") - } - b.WebhookTokenAuthenticators = append(b.WebhookTokenAuthenticators, *values[i]) - } - return b -} - -// WithWebhookTokenAuthenticator sets the WebhookTokenAuthenticator field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the WebhookTokenAuthenticator field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithWebhookTokenAuthenticator(value *WebhookTokenAuthenticatorApplyConfiguration) *AuthenticationSpecApplyConfiguration { - b.WebhookTokenAuthenticator = value - return b -} - -// WithServiceAccountIssuer sets the ServiceAccountIssuer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceAccountIssuer field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithServiceAccountIssuer(value string) *AuthenticationSpecApplyConfiguration { - b.ServiceAccountIssuer = &value - return b -} - -// WithOIDCProviders adds the given value to the OIDCProviders field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OIDCProviders field. -func (b *AuthenticationSpecApplyConfiguration) WithOIDCProviders(values ...*OIDCProviderApplyConfiguration) *AuthenticationSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOIDCProviders") - } - b.OIDCProviders = append(b.OIDCProviders, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationstatus.go deleted file mode 100644 index e8ae75aea..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/authenticationstatus.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AuthenticationStatusApplyConfiguration represents a declarative configuration of the AuthenticationStatus type for use -// with apply. -type AuthenticationStatusApplyConfiguration struct { - // 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. - IntegratedOAuthMetadata *ConfigMapNameReferenceApplyConfiguration `json:"integratedOAuthMetadata,omitempty"` - // oidcClients is where participating operators place the current OIDC client status for OIDC clients that can be customized by the cluster-admin. - OIDCClients []OIDCClientStatusApplyConfiguration `json:"oidcClients,omitempty"` -} - -// AuthenticationStatusApplyConfiguration constructs a declarative configuration of the AuthenticationStatus type for use with -// apply. -func AuthenticationStatus() *AuthenticationStatusApplyConfiguration { - return &AuthenticationStatusApplyConfiguration{} -} - -// WithIntegratedOAuthMetadata sets the IntegratedOAuthMetadata field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IntegratedOAuthMetadata field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithIntegratedOAuthMetadata(value *ConfigMapNameReferenceApplyConfiguration) *AuthenticationStatusApplyConfiguration { - b.IntegratedOAuthMetadata = value - return b -} - -// WithOIDCClients adds the given value to the OIDCClients field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OIDCClients field. -func (b *AuthenticationStatusApplyConfiguration) WithOIDCClients(values ...*OIDCClientStatusApplyConfiguration) *AuthenticationStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOIDCClients") - } - b.OIDCClients = append(b.OIDCClients, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsdnsspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsdnsspec.go deleted file mode 100644 index 457cb43ac..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsdnsspec.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSDNSSpecApplyConfiguration represents a declarative configuration of the AWSDNSSpec type for use -// with apply. -// -// AWSDNSSpec contains DNS configuration specific to the Amazon Web Services cloud provider. -type AWSDNSSpecApplyConfiguration struct { - // privateZoneIAMRole contains the ARN of an IAM role that should be assumed when performing - // operations on the cluster's private hosted zone specified in the cluster DNS config. - // When left empty, no role should be assumed. - // - // The ARN must follow the format: arn::iam:::role/, where: - // is the AWS partition (aws, aws-cn, aws-us-gov, or aws-eusc), - // is a 12-digit numeric identifier for the AWS account, - // is the IAM role name. - PrivateZoneIAMRole *string `json:"privateZoneIAMRole,omitempty"` -} - -// AWSDNSSpecApplyConfiguration constructs a declarative configuration of the AWSDNSSpec type for use with -// apply. -func AWSDNSSpec() *AWSDNSSpecApplyConfiguration { - return &AWSDNSSpecApplyConfiguration{} -} - -// WithPrivateZoneIAMRole sets the PrivateZoneIAMRole field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrivateZoneIAMRole field is set to the value of the last call. -func (b *AWSDNSSpecApplyConfiguration) WithPrivateZoneIAMRole(value string) *AWSDNSSpecApplyConfiguration { - b.PrivateZoneIAMRole = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsingressspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsingressspec.go deleted file mode 100644 index 8b36891a5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsingressspec.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AWSIngressSpecApplyConfiguration represents a declarative configuration of the AWSIngressSpec type for use -// with apply. -// -// AWSIngressSpec holds the desired state of the Ingress for Amazon Web Services infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AWSIngressSpecApplyConfiguration struct { - // type allows user to set a load balancer type. - // When this field is set the default ingresscontroller will get created using the specified LBType. - // If this field is not set then the default ingress controller of LBType Classic will be created. - // Valid values are: - // - // * "Classic": A Classic Load Balancer that makes routing decisions at either - // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See - // the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - // - // * "NLB": A Network Load Balancer that makes routing decisions at the - // transport layer (TCP/SSL). See the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb - Type *configv1.AWSLBType `json:"type,omitempty"` -} - -// AWSIngressSpecApplyConfiguration constructs a declarative configuration of the AWSIngressSpec type for use with -// apply. -func AWSIngressSpec() *AWSIngressSpecApplyConfiguration { - return &AWSIngressSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *AWSIngressSpecApplyConfiguration) WithType(value configv1.AWSLBType) *AWSIngressSpecApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformspec.go deleted file mode 100644 index 710a769f9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformspec.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSPlatformSpecApplyConfiguration represents a declarative configuration of the AWSPlatformSpec type for use -// with apply. -// -// AWSPlatformSpec holds the desired state of the Amazon Web Services infrastructure provider. -// This only includes fields that can be modified in the cluster. -type AWSPlatformSpecApplyConfiguration struct { - // serviceEndpoints list contains custom endpoints which will override default - // service endpoint of AWS Services. - // There must be only one ServiceEndpoint for a service. - ServiceEndpoints []AWSServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` -} - -// AWSPlatformSpecApplyConfiguration constructs a declarative configuration of the AWSPlatformSpec type for use with -// apply. -func AWSPlatformSpec() *AWSPlatformSpecApplyConfiguration { - return &AWSPlatformSpecApplyConfiguration{} -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *AWSPlatformSpecApplyConfiguration) WithServiceEndpoints(values ...*AWSServiceEndpointApplyConfiguration) *AWSPlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go deleted file mode 100644 index 33007c210..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsplatformstatus.go +++ /dev/null @@ -1,93 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AWSPlatformStatusApplyConfiguration represents a declarative configuration of the AWSPlatformStatus type for use -// with apply. -// -// AWSPlatformStatus holds the current status of the Amazon Web Services infrastructure provider. -type AWSPlatformStatusApplyConfiguration struct { - // region holds the default AWS region for new AWS resources created by the cluster. - Region *string `json:"region,omitempty"` - // serviceEndpoints list contains custom endpoints which will override default - // service endpoint of AWS Services. - // There must be only one ServiceEndpoint for a service. - ServiceEndpoints []AWSServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` - // resourceTags is a list of additional tags to apply to AWS resources created for the cluster. - // See https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html for information on tagging AWS resources. - // AWS supports a maximum of 50 tags per resource. OpenShift reserves 25 tags for its use, leaving 25 tags - // available for the user. - ResourceTags []AWSResourceTagApplyConfiguration `json:"resourceTags,omitempty"` - // cloudLoadBalancerConfig holds configuration related to DNS and cloud - // load balancers. It allows configuration of in-cluster DNS as an alternative - // to the platform default DNS implementation. - // When using the ClusterHosted DNS type, Load Balancer IP addresses - // must be provided for the API and internal API load balancers as well as the - // ingress load balancer. - CloudLoadBalancerConfig *CloudLoadBalancerConfigApplyConfiguration `json:"cloudLoadBalancerConfig,omitempty"` - // ipFamily specifies the IP protocol family that should be used for AWS - // network resources. This controls whether AWS resources are created with - // IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary - // protocol family. - IPFamily *configv1.IPFamilyType `json:"ipFamily,omitempty"` -} - -// AWSPlatformStatusApplyConfiguration constructs a declarative configuration of the AWSPlatformStatus type for use with -// apply. -func AWSPlatformStatus() *AWSPlatformStatusApplyConfiguration { - return &AWSPlatformStatusApplyConfiguration{} -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *AWSPlatformStatusApplyConfiguration) WithRegion(value string) *AWSPlatformStatusApplyConfiguration { - b.Region = &value - return b -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *AWSPlatformStatusApplyConfiguration) WithServiceEndpoints(values ...*AWSServiceEndpointApplyConfiguration) *AWSPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} - -// WithResourceTags adds the given value to the ResourceTags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceTags field. -func (b *AWSPlatformStatusApplyConfiguration) WithResourceTags(values ...*AWSResourceTagApplyConfiguration) *AWSPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceTags") - } - b.ResourceTags = append(b.ResourceTags, *values[i]) - } - return b -} - -// WithCloudLoadBalancerConfig sets the CloudLoadBalancerConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudLoadBalancerConfig field is set to the value of the last call. -func (b *AWSPlatformStatusApplyConfiguration) WithCloudLoadBalancerConfig(value *CloudLoadBalancerConfigApplyConfiguration) *AWSPlatformStatusApplyConfiguration { - b.CloudLoadBalancerConfig = value - return b -} - -// WithIPFamily sets the IPFamily field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPFamily field is set to the value of the last call. -func (b *AWSPlatformStatusApplyConfiguration) WithIPFamily(value configv1.IPFamilyType) *AWSPlatformStatusApplyConfiguration { - b.IPFamily = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsresourcetag.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsresourcetag.go deleted file mode 100644 index d602bdeae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsresourcetag.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSResourceTagApplyConfiguration represents a declarative configuration of the AWSResourceTag type for use -// with apply. -// -// AWSResourceTag is a tag to apply to AWS resources created for the cluster. -type AWSResourceTagApplyConfiguration struct { - // key sets the key of the AWS resource tag key-value pair. Key is required when defining an AWS resource tag. - // Key should consist of between 1 and 128 characters, and may - // contain only the set of alphanumeric characters, space (' '), '_', '.', '/', '=', '+', '-', ':', and '@'. - Key *string `json:"key,omitempty"` - // value sets the value of the AWS resource tag key-value pair. Value is required when defining an AWS resource tag. - // Value should consist of between 1 and 256 characters, and may - // contain only the set of alphanumeric characters, space (' '), '_', '.', '/', '=', '+', '-', ':', and '@'. - // Some AWS service do not support empty values. Since tags are added to resources in many services, the - // length of the tag value must meet the requirements of all services. - Value *string `json:"value,omitempty"` -} - -// AWSResourceTagApplyConfiguration constructs a declarative configuration of the AWSResourceTag type for use with -// apply. -func AWSResourceTag() *AWSResourceTagApplyConfiguration { - return &AWSResourceTagApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *AWSResourceTagApplyConfiguration) WithKey(value string) *AWSResourceTagApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *AWSResourceTagApplyConfiguration) WithValue(value string) *AWSResourceTagApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsserviceendpoint.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsserviceendpoint.go deleted file mode 100644 index cde2d5cbf..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/awsserviceendpoint.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSServiceEndpointApplyConfiguration represents a declarative configuration of the AWSServiceEndpoint type for use -// with apply. -// -// AWSServiceEndpoint store the configuration of a custom url to -// override existing defaults of AWS Services. -type AWSServiceEndpointApplyConfiguration struct { - // name is the name of the AWS service. - // The list of all the service names can be found at https://docs.aws.amazon.com/general/latest/gr/aws-service-information.html - // This must be provided and cannot be empty. - Name *string `json:"name,omitempty"` - // url is fully qualified URI with scheme https, that overrides the default generated - // endpoint for a client. - // This must be provided and cannot be empty. - URL *string `json:"url,omitempty"` -} - -// AWSServiceEndpointApplyConfiguration constructs a declarative configuration of the AWSServiceEndpoint type for use with -// apply. -func AWSServiceEndpoint() *AWSServiceEndpointApplyConfiguration { - return &AWSServiceEndpointApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AWSServiceEndpointApplyConfiguration) WithName(value string) *AWSServiceEndpointApplyConfiguration { - b.Name = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *AWSServiceEndpointApplyConfiguration) WithURL(value string) *AWSServiceEndpointApplyConfiguration { - b.URL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureplatformstatus.go deleted file mode 100644 index a3cf6c97c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureplatformstatus.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// AzurePlatformStatusApplyConfiguration represents a declarative configuration of the AzurePlatformStatus type for use -// with apply. -// -// AzurePlatformStatus holds the current status of the Azure infrastructure provider. -type AzurePlatformStatusApplyConfiguration struct { - // resourceGroupName is the Resource Group for new Azure resources created for the cluster. - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - // networkResourceGroupName is the Resource Group for network resources like the Virtual Network and Subnets used by the cluster. - // If empty, the value is same as ResourceGroupName. - NetworkResourceGroupName *string `json:"networkResourceGroupName,omitempty"` - // cloudName is the name of the Azure cloud environment which can be used to configure the Azure SDK - // with the appropriate Azure API endpoints. - // If empty, the value is equal to `AzurePublicCloud`. - CloudName *configv1.AzureCloudEnvironment `json:"cloudName,omitempty"` - // armEndpoint specifies a URL to use for resource management in non-soverign clouds such as Azure Stack. - ARMEndpoint *string `json:"armEndpoint,omitempty"` - // resourceTags is a list of additional tags to apply to Azure resources created for the cluster. - // See https://docs.microsoft.com/en-us/rest/api/resources/tags for information on tagging Azure resources. - // Due to limitations on Automation, Content Delivery Network, DNS Azure resources, a maximum of 15 tags - // may be applied. OpenShift reserves 5 tags for internal use, allowing 10 tags for user configuration. - ResourceTags []AzureResourceTagApplyConfiguration `json:"resourceTags,omitempty"` - // cloudLoadBalancerConfig holds configuration related to DNS and cloud - // load balancers. It allows configuration of in-cluster DNS as an alternative - // to the platform default DNS implementation. - // When using the ClusterHosted DNS type, Load Balancer IP addresses - // must be provided for the API and internal API load balancers as well as the - // ingress load balancer. - CloudLoadBalancerConfig *CloudLoadBalancerConfigApplyConfiguration `json:"cloudLoadBalancerConfig,omitempty"` - // ipFamily specifies the IP protocol family that should be used for Azure - // network resources. This controls whether Azure resources are created with - // IPv4-only, or dual-stack networking with IPv4 or IPv6 as the primary - // protocol family. - IPFamily *configv1.IPFamilyType `json:"ipFamily,omitempty"` -} - -// AzurePlatformStatusApplyConfiguration constructs a declarative configuration of the AzurePlatformStatus type for use with -// apply. -func AzurePlatformStatus() *AzurePlatformStatusApplyConfiguration { - return &AzurePlatformStatusApplyConfiguration{} -} - -// WithResourceGroupName sets the ResourceGroupName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceGroupName field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithResourceGroupName(value string) *AzurePlatformStatusApplyConfiguration { - b.ResourceGroupName = &value - return b -} - -// WithNetworkResourceGroupName sets the NetworkResourceGroupName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkResourceGroupName field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithNetworkResourceGroupName(value string) *AzurePlatformStatusApplyConfiguration { - b.NetworkResourceGroupName = &value - return b -} - -// WithCloudName sets the CloudName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudName field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithCloudName(value configv1.AzureCloudEnvironment) *AzurePlatformStatusApplyConfiguration { - b.CloudName = &value - return b -} - -// WithARMEndpoint sets the ARMEndpoint field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ARMEndpoint field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithARMEndpoint(value string) *AzurePlatformStatusApplyConfiguration { - b.ARMEndpoint = &value - return b -} - -// WithResourceTags adds the given value to the ResourceTags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceTags field. -func (b *AzurePlatformStatusApplyConfiguration) WithResourceTags(values ...*AzureResourceTagApplyConfiguration) *AzurePlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceTags") - } - b.ResourceTags = append(b.ResourceTags, *values[i]) - } - return b -} - -// WithCloudLoadBalancerConfig sets the CloudLoadBalancerConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudLoadBalancerConfig field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithCloudLoadBalancerConfig(value *CloudLoadBalancerConfigApplyConfiguration) *AzurePlatformStatusApplyConfiguration { - b.CloudLoadBalancerConfig = value - return b -} - -// WithIPFamily sets the IPFamily field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPFamily field is set to the value of the last call. -func (b *AzurePlatformStatusApplyConfiguration) WithIPFamily(value configv1.IPFamilyType) *AzurePlatformStatusApplyConfiguration { - b.IPFamily = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureresourcetag.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureresourcetag.go deleted file mode 100644 index 6a170ace0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/azureresourcetag.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AzureResourceTagApplyConfiguration represents a declarative configuration of the AzureResourceTag type for use -// with apply. -// -// AzureResourceTag is a tag to apply to Azure resources created for the cluster. -type AzureResourceTagApplyConfiguration struct { - // key is the key part of the tag. A tag key can have a maximum of 128 characters and cannot be empty. Key - // must begin with a letter, end with a letter, number or underscore, and must contain only alphanumeric - // characters and the following special characters `_ . -`. - Key *string `json:"key,omitempty"` - // value is the value part of the tag. A tag value can have a maximum of 256 characters and cannot be empty. Value - // must contain only alphanumeric characters and the following special characters `_ + , - . / : ; < = > ? @`. - Value *string `json:"value,omitempty"` -} - -// AzureResourceTagApplyConfiguration constructs a declarative configuration of the AzureResourceTag type for use with -// apply. -func AzureResourceTag() *AzureResourceTagApplyConfiguration { - return &AzureResourceTagApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *AzureResourceTagApplyConfiguration) WithKey(value string) *AzureResourceTagApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *AzureResourceTagApplyConfiguration) WithValue(value string) *AzureResourceTagApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go deleted file mode 100644 index feef004d0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformloadbalancer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// BareMetalPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the BareMetalPlatformLoadBalancer type for use -// with apply. -// -// BareMetalPlatformLoadBalancer defines the load balancer used by the cluster on BareMetal platform. -type BareMetalPlatformLoadBalancerApplyConfiguration struct { - // type defines the type of load balancer used by the cluster on BareMetal platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` -} - -// BareMetalPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the BareMetalPlatformLoadBalancer type for use with -// apply. -func BareMetalPlatformLoadBalancer() *BareMetalPlatformLoadBalancerApplyConfiguration { - return &BareMetalPlatformLoadBalancerApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *BareMetalPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *BareMetalPlatformLoadBalancerApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformspec.go deleted file mode 100644 index bb3e073e7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformspec.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// BareMetalPlatformSpecApplyConfiguration represents a declarative configuration of the BareMetalPlatformSpec type for use -// with apply. -// -// BareMetalPlatformSpec holds the desired state of the BareMetal infrastructure provider. -// This only includes fields that can be modified in the cluster. -type BareMetalPlatformSpecApplyConfiguration struct { - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.apiServerInternalIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - APIServerInternalIPs []configv1.IP `json:"apiServerInternalIPs,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.ingressIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - IngressIPs []configv1.IP `json:"ingressIPs,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster - // nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6, - // for example "10.0.0.0/8" or "fd00::/8". - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// BareMetalPlatformSpecApplyConfiguration constructs a declarative configuration of the BareMetalPlatformSpec type for use with -// apply. -func BareMetalPlatformSpec() *BareMetalPlatformSpecApplyConfiguration { - return &BareMetalPlatformSpecApplyConfiguration{} -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...configv1.IP) *BareMetalPlatformSpecApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithIngressIPs(values ...configv1.IP) *BareMetalPlatformSpecApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *BareMetalPlatformSpecApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *BareMetalPlatformSpecApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go deleted file mode 100644 index 1f6dd6df6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/baremetalplatformstatus.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// BareMetalPlatformStatusApplyConfiguration represents a declarative configuration of the BareMetalPlatformStatus type for use -// with apply. -// -// BareMetalPlatformStatus holds the current status of the BareMetal infrastructure provider. -// For more information about the network architecture used with the BareMetal platform type, see: -// https://github.com/openshift/installer/blob/master/docs/design/baremetal/networking-infrastructure.md -type BareMetalPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP *string `json:"ingressIP,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - IngressIPs []string `json:"ingressIPs,omitempty"` - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // BareMetal deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP *string `json:"nodeDNSIP,omitempty"` - // loadBalancer defines how the load balancer used by the cluster is configured. - LoadBalancer *BareMetalPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` - // dnsRecordsType determines whether records for api, api-int, and ingress - // are provided by the internal DNS service or externally. - // Allowed values are `Internal`, `External`, and omitted. - // When set to `Internal`, records are provided by the internal infrastructure and - // no additional user configuration is required for the cluster to function. - // When set to `External`, records are not provided by the internal infrastructure - // and must be configured by the user on a DNS server outside the cluster. - // Cluster nodes must use this external server for their upstream DNS requests. - // This value may only be set when loadBalancer.type is set to UserManaged. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `Internal`. - DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster nodes. - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// BareMetalPlatformStatusApplyConfiguration constructs a declarative configuration of the BareMetalPlatformStatus type for use with -// apply. -func BareMetalPlatformStatus() *BareMetalPlatformStatusApplyConfiguration { - return &BareMetalPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *BareMetalPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *BareMetalPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *BareMetalPlatformStatusApplyConfiguration) WithAPIServerInternalIPs(values ...string) *BareMetalPlatformStatusApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *BareMetalPlatformStatusApplyConfiguration) WithIngressIP(value string) *BareMetalPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *BareMetalPlatformStatusApplyConfiguration) WithIngressIPs(values ...string) *BareMetalPlatformStatusApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithNodeDNSIP sets the NodeDNSIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDNSIP field is set to the value of the last call. -func (b *BareMetalPlatformStatusApplyConfiguration) WithNodeDNSIP(value string) *BareMetalPlatformStatusApplyConfiguration { - b.NodeDNSIP = &value - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *BareMetalPlatformStatusApplyConfiguration) WithLoadBalancer(value *BareMetalPlatformLoadBalancerApplyConfiguration) *BareMetalPlatformStatusApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSRecordsType field is set to the value of the last call. -func (b *BareMetalPlatformStatusApplyConfiguration) WithDNSRecordsType(value configv1.DNSRecordsType) *BareMetalPlatformStatusApplyConfiguration { - b.DNSRecordsType = &value - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *BareMetalPlatformStatusApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *BareMetalPlatformStatusApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/basicauthidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/basicauthidentityprovider.go deleted file mode 100644 index 68b7cb106..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/basicauthidentityprovider.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// BasicAuthIdentityProviderApplyConfiguration represents a declarative configuration of the BasicAuthIdentityProvider type for use -// with apply. -// -// BasicAuthPasswordIdentityProvider provides identities for users authenticating using HTTP basic auth credentials -type BasicAuthIdentityProviderApplyConfiguration struct { - // OAuthRemoteConnectionInfo contains information about how to connect to the external basic auth server - OAuthRemoteConnectionInfoApplyConfiguration `json:",inline"` -} - -// BasicAuthIdentityProviderApplyConfiguration constructs a declarative configuration of the BasicAuthIdentityProvider type for use with -// apply. -func BasicAuthIdentityProvider() *BasicAuthIdentityProviderApplyConfiguration { - return &BasicAuthIdentityProviderApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *BasicAuthIdentityProviderApplyConfiguration) WithURL(value string) *BasicAuthIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.URL = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *BasicAuthIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.CA = value - return b -} - -// WithTLSClientCert sets the TLSClientCert field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientCert field is set to the value of the last call. -func (b *BasicAuthIdentityProviderApplyConfiguration) WithTLSClientCert(value *SecretNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientCert = value - return b -} - -// WithTLSClientKey sets the TLSClientKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientKey field is set to the value of the last call. -func (b *BasicAuthIdentityProviderApplyConfiguration) WithTLSClientKey(value *SecretNameReferenceApplyConfiguration) *BasicAuthIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientKey = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/build.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/build.go deleted file mode 100644 index f44c227ac..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/build.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// BuildApplyConfiguration represents a declarative configuration of the Build type for use -// with apply. -// -// Build configures the behavior of OpenShift builds for the entire cluster. -// This includes default settings that can be overridden in BuildConfig objects, and overrides which are applied to all builds. -// -// The canonical name is "cluster" -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type BuildApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user-settable values for the build controller configuration - Spec *BuildSpecApplyConfiguration `json:"spec,omitempty"` -} - -// Build constructs a declarative configuration of the Build type for use with -// apply. -func Build(name string) *BuildApplyConfiguration { - b := &BuildApplyConfiguration{} - b.WithName(name) - b.WithKind("Build") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractBuildFrom extracts the applied configuration owned by fieldManager from -// build for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// build must be a unmodified Build API object that was retrieved from the Kubernetes API. -// ExtractBuildFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractBuildFrom(build *configv1.Build, fieldManager string, subresource string) (*BuildApplyConfiguration, error) { - b := &BuildApplyConfiguration{} - err := managedfields.ExtractInto(build, internal.Parser().Type("com.github.openshift.api.config.v1.Build"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(build.Name) - - b.WithKind("Build") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractBuild extracts the applied configuration owned by fieldManager from -// build. If no managedFields are found in build for fieldManager, a -// BuildApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// build must be a unmodified Build API object that was retrieved from the Kubernetes API. -// ExtractBuild provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractBuild(build *configv1.Build, fieldManager string) (*BuildApplyConfiguration, error) { - return ExtractBuildFrom(build, fieldManager, "") -} - -func (b BuildApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithKind(value string) *BuildApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithAPIVersion(value string) *BuildApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithName(value string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithGenerateName(value string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithNamespace(value string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithUID(value types.UID) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithResourceVersion(value string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithGeneration(value int64) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *BuildApplyConfiguration) WithLabels(entries map[string]string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *BuildApplyConfiguration) WithAnnotations(entries map[string]string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BuildApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *BuildApplyConfiguration) WithFinalizers(values ...string) *BuildApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *BuildApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *BuildApplyConfiguration) WithSpec(value *BuildSpecApplyConfiguration) *BuildApplyConfiguration { - b.Spec = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *BuildApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *BuildApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *BuildApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *BuildApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/builddefaults.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/builddefaults.go deleted file mode 100644 index 33fa94f14..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/builddefaults.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" -) - -// BuildDefaultsApplyConfiguration represents a declarative configuration of the BuildDefaults type for use -// with apply. -type BuildDefaultsApplyConfiguration struct { - // defaultProxy contains the default proxy settings for all build operations, including image pull/push - // and source download. - // - // Values can be overrode by setting the `HTTP_PROXY`, `HTTPS_PROXY`, and `NO_PROXY` environment variables - // in the build config's strategy. - DefaultProxy *ProxySpecApplyConfiguration `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. - GitProxy *ProxySpecApplyConfiguration `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 - Env []corev1.EnvVar `json:"env,omitempty"` - // 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. - ImageLabels []ImageLabelApplyConfiguration `json:"imageLabels,omitempty"` - // resources defines resource requirements to execute the build. - Resources *corev1.ResourceRequirements `json:"resources,omitempty"` -} - -// BuildDefaultsApplyConfiguration constructs a declarative configuration of the BuildDefaults type for use with -// apply. -func BuildDefaults() *BuildDefaultsApplyConfiguration { - return &BuildDefaultsApplyConfiguration{} -} - -// WithDefaultProxy sets the DefaultProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultProxy field is set to the value of the last call. -func (b *BuildDefaultsApplyConfiguration) WithDefaultProxy(value *ProxySpecApplyConfiguration) *BuildDefaultsApplyConfiguration { - b.DefaultProxy = value - return b -} - -// WithGitProxy sets the GitProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GitProxy field is set to the value of the last call. -func (b *BuildDefaultsApplyConfiguration) WithGitProxy(value *ProxySpecApplyConfiguration) *BuildDefaultsApplyConfiguration { - b.GitProxy = value - return b -} - -// WithEnv adds the given value to the Env field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Env field. -func (b *BuildDefaultsApplyConfiguration) WithEnv(values ...corev1.EnvVar) *BuildDefaultsApplyConfiguration { - for i := range values { - b.Env = append(b.Env, values[i]) - } - return b -} - -// WithImageLabels adds the given value to the ImageLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ImageLabels field. -func (b *BuildDefaultsApplyConfiguration) WithImageLabels(values ...*ImageLabelApplyConfiguration) *BuildDefaultsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithImageLabels") - } - b.ImageLabels = append(b.ImageLabels, *values[i]) - } - return b -} - -// WithResources sets the Resources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resources field is set to the value of the last call. -func (b *BuildDefaultsApplyConfiguration) WithResources(value corev1.ResourceRequirements) *BuildDefaultsApplyConfiguration { - b.Resources = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildoverrides.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildoverrides.go deleted file mode 100644 index 669d5e02c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildoverrides.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" -) - -// BuildOverridesApplyConfiguration represents a declarative configuration of the BuildOverrides type for use -// with apply. -type BuildOverridesApplyConfiguration struct { - // 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. - ImageLabels []ImageLabelApplyConfiguration `json:"imageLabels,omitempty"` - // nodeSelector is a selector which must be true for the build pod to fit on a node - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations is a list of Tolerations that will override any existing - // tolerations set on a build pod. - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // forcePull overrides, if set, the equivalent value in the builds, - // i.e. false disables force pull for all builds, - // true enables force pull for all builds, - // independently of what each build specifies itself - ForcePull *bool `json:"forcePull,omitempty"` -} - -// BuildOverridesApplyConfiguration constructs a declarative configuration of the BuildOverrides type for use with -// apply. -func BuildOverrides() *BuildOverridesApplyConfiguration { - return &BuildOverridesApplyConfiguration{} -} - -// WithImageLabels adds the given value to the ImageLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ImageLabels field. -func (b *BuildOverridesApplyConfiguration) WithImageLabels(values ...*ImageLabelApplyConfiguration) *BuildOverridesApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithImageLabels") - } - b.ImageLabels = append(b.ImageLabels, *values[i]) - } - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *BuildOverridesApplyConfiguration) WithNodeSelector(entries map[string]string) *BuildOverridesApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *BuildOverridesApplyConfiguration) WithTolerations(values ...corev1.Toleration) *BuildOverridesApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithForcePull sets the ForcePull field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForcePull field is set to the value of the last call. -func (b *BuildOverridesApplyConfiguration) WithForcePull(value bool) *BuildOverridesApplyConfiguration { - b.ForcePull = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildspec.go deleted file mode 100644 index e30fd76f1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/buildspec.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// BuildSpecApplyConfiguration represents a declarative configuration of the BuildSpec type for use -// with apply. -type BuildSpecApplyConfiguration 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. - // - // DEPRECATED: Additional CAs for image pull and push should be set on - // image.config.openshift.io/cluster instead. - AdditionalTrustedCA *ConfigMapNameReferenceApplyConfiguration `json:"additionalTrustedCA,omitempty"` - // buildDefaults controls the default information for Builds - BuildDefaults *BuildDefaultsApplyConfiguration `json:"buildDefaults,omitempty"` - // buildOverrides controls override settings for builds - BuildOverrides *BuildOverridesApplyConfiguration `json:"buildOverrides,omitempty"` -} - -// BuildSpecApplyConfiguration constructs a declarative configuration of the BuildSpec type for use with -// apply. -func BuildSpec() *BuildSpecApplyConfiguration { - return &BuildSpecApplyConfiguration{} -} - -// WithAdditionalTrustedCA sets the AdditionalTrustedCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalTrustedCA field is set to the value of the last call. -func (b *BuildSpecApplyConfiguration) WithAdditionalTrustedCA(value *ConfigMapNameReferenceApplyConfiguration) *BuildSpecApplyConfiguration { - b.AdditionalTrustedCA = value - return b -} - -// WithBuildDefaults sets the BuildDefaults field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BuildDefaults field is set to the value of the last call. -func (b *BuildSpecApplyConfiguration) WithBuildDefaults(value *BuildDefaultsApplyConfiguration) *BuildSpecApplyConfiguration { - b.BuildDefaults = value - return b -} - -// WithBuildOverrides sets the BuildOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BuildOverrides field is set to the value of the last call. -func (b *BuildSpecApplyConfiguration) WithBuildOverrides(value *BuildOverridesApplyConfiguration) *BuildSpecApplyConfiguration { - b.BuildOverrides = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientcredentialconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientcredentialconfig.go deleted file mode 100644 index c23f4d530..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientcredentialconfig.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ClientCredentialConfigApplyConfiguration represents a declarative configuration of the ClientCredentialConfig type for use -// with apply. -// -// ClientCredentialConfig configures the client credentials and token endpoint -// to use to get an access token via the OAuth2 client credentials grant flow. -type ClientCredentialConfigApplyConfiguration struct { - // clientID is a required client identifier to use during the OAuth2 client credentials flow. - // clientID must be at least 1 character in length, must not exceed 256 characters in length, - // and must only contain printable ASCII characters. - ClientID *string `json:"clientID,omitempty"` - // clientSecret is a required reference to a Secret in the openshift-config namespace to be used - // as the client secret during the OAuth2 client credentials flow. - // - // The key 'client-secret' is used to locate the client secret data in the Secret. - ClientSecret *ClientSecretSecretReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // tokenEndpoint is a required URL to query for an access token using - // the client credential OAuth2 flow. - // tokenEndpoint must be at least 1 character in length and must not exceed 2048 characters in length. - // tokenEndpoint must be a valid HTTPS URL. - // tokenEndpoint must have a host and a path. - // tokenEndpoint must not contain query parameters, fragments, - // or user information (e.g., "user:password@host"). - TokenEndpoint *string `json:"tokenEndpoint,omitempty"` - // scopes is an optional list of OAuth2 scopes to request when obtaining - // an access token. - // - // If not specified, the token endpoint's default scopes - // will be used. - // - // When specified, there must be at least 1 entry and must not exceed 16 entries. - // Each entry must be at least 1 character in length and must not exceed 256 characters in length. - // Each entry must only contain printable ASCII characters, excluding spaces, double quotes and backslashes. - // Entries must be unique. - Scopes []configv1.OAuth2Scope `json:"scopes,omitempty"` - // tls is an optional field that allows configuring the TLS - // settings used to interact with the identity provider - // as an OAuth2 client. - // - // When omitted, system default TLS settings will be used - // for the OAuth2 client. - TLS *ExternalSourceTLSApplyConfiguration `json:"tls,omitempty"` -} - -// ClientCredentialConfigApplyConfiguration constructs a declarative configuration of the ClientCredentialConfig type for use with -// apply. -func ClientCredentialConfig() *ClientCredentialConfigApplyConfiguration { - return &ClientCredentialConfigApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *ClientCredentialConfigApplyConfiguration) WithClientID(value string) *ClientCredentialConfigApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *ClientCredentialConfigApplyConfiguration) WithClientSecret(value *ClientSecretSecretReferenceApplyConfiguration) *ClientCredentialConfigApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithTokenEndpoint sets the TokenEndpoint field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TokenEndpoint field is set to the value of the last call. -func (b *ClientCredentialConfigApplyConfiguration) WithTokenEndpoint(value string) *ClientCredentialConfigApplyConfiguration { - b.TokenEndpoint = &value - return b -} - -// WithScopes adds the given value to the Scopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ClientCredentialConfigApplyConfiguration) WithScopes(values ...configv1.OAuth2Scope) *ClientCredentialConfigApplyConfiguration { - for i := range values { - b.Scopes = append(b.Scopes, values[i]) - } - return b -} - -// WithTLS sets the TLS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLS field is set to the value of the last call. -func (b *ClientCredentialConfigApplyConfiguration) WithTLS(value *ExternalSourceTLSApplyConfiguration) *ClientCredentialConfigApplyConfiguration { - b.TLS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientsecretsecretreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientsecretsecretreference.go deleted file mode 100644 index 5b2a8fe03..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clientsecretsecretreference.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClientSecretSecretReferenceApplyConfiguration represents a declarative configuration of the ClientSecretSecretReference type for use -// with apply. -// -// ClientSecretSecretReference is a reference to a Secret in the openshift-config -// namespace that should be used for configuring the client secret to be -// used when sourcing claims from external sources with the client credential authentication flow. -type ClientSecretSecretReferenceApplyConfiguration struct { - // name is the required name of the Secret that exists in the openshift-config namespace. - // - // It must be at least 1 character in length, must not exceed 253 characters in length, - // must start and end with a lowercase alphanumeric character, and must only contain - // lowercase alphanumeric characters, '-' or '.'. - Name *string `json:"name,omitempty"` -} - -// ClientSecretSecretReferenceApplyConfiguration constructs a declarative configuration of the ClientSecretSecretReference type for use with -// apply. -func ClientSecretSecretReference() *ClientSecretSecretReferenceApplyConfiguration { - return &ClientSecretSecretReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClientSecretSecretReferenceApplyConfiguration) WithName(value string) *ClientSecretSecretReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go deleted file mode 100644 index efc48bab6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudcontrollermanagerstatus.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CloudControllerManagerStatusApplyConfiguration represents a declarative configuration of the CloudControllerManagerStatus type for use -// with apply. -// -// CloudControllerManagerStatus holds the state of Cloud Controller Manager (a.k.a. CCM or CPI) related settings -type CloudControllerManagerStatusApplyConfiguration struct { - // state determines whether or not an external Cloud Controller Manager is expected to - // be installed within the cluster. - // https://kubernetes.io/docs/tasks/administer-cluster/running-cloud-controller/#running-cloud-controller-manager - // - // Valid values are "External", "None" and omitted. - // When set to "External", new nodes will be tainted as uninitialized when created, - // preventing them from running workloads until they are initialized by the cloud controller manager. - // When omitted or set to "None", new nodes will be not tainted - // and no extra initialization from the cloud controller manager is expected. - State *configv1.CloudControllerManagerState `json:"state,omitempty"` -} - -// CloudControllerManagerStatusApplyConfiguration constructs a declarative configuration of the CloudControllerManagerStatus type for use with -// apply. -func CloudControllerManagerStatus() *CloudControllerManagerStatusApplyConfiguration { - return &CloudControllerManagerStatusApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *CloudControllerManagerStatusApplyConfiguration) WithState(value configv1.CloudControllerManagerState) *CloudControllerManagerStatusApplyConfiguration { - b.State = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go deleted file mode 100644 index e4677d197..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerconfig.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CloudLoadBalancerConfigApplyConfiguration represents a declarative configuration of the CloudLoadBalancerConfig type for use -// with apply. -// -// CloudLoadBalancerConfig contains an union discriminator indicating the type of DNS -// solution in use within the cluster. When the DNSType is `ClusterHosted`, the cloud's -// Load Balancer configuration needs to be provided so that the DNS solution hosted -// within the cluster can be configured with those values. -type CloudLoadBalancerConfigApplyConfiguration struct { - // dnsType indicates the type of DNS solution in use within the cluster. Its default value of - // `PlatformDefault` indicates that the cluster's DNS is the default provided by the cloud platform. - // It can be set to `ClusterHosted` to bypass the configuration of the cloud default DNS. In this mode, - // the cluster needs to provide a self-hosted DNS solution for the cluster's installation to succeed. - // The cluster's use of the cloud's Load Balancers is unaffected by this setting. - // The value is immutable after it has been set at install time. - // Currently, there is no way for the customer to add additional DNS entries into the cluster hosted DNS. - // Enabling this functionality allows the user to start their own DNS solution outside the cluster after - // installation is complete. The customer would be responsible for configuring this custom DNS solution, - // and it can be run in addition to the in-cluster DNS solution. - DNSType *configv1.DNSType `json:"dnsType,omitempty"` - // clusterHosted holds the IP addresses of API, API-Int and Ingress Load - // Balancers on Cloud Platforms. The DNS solution hosted within the cluster - // use these IP addresses to provide resolution for API, API-Int and Ingress - // services. - ClusterHosted *CloudLoadBalancerIPsApplyConfiguration `json:"clusterHosted,omitempty"` -} - -// CloudLoadBalancerConfigApplyConfiguration constructs a declarative configuration of the CloudLoadBalancerConfig type for use with -// apply. -func CloudLoadBalancerConfig() *CloudLoadBalancerConfigApplyConfiguration { - return &CloudLoadBalancerConfigApplyConfiguration{} -} - -// WithDNSType sets the DNSType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSType field is set to the value of the last call. -func (b *CloudLoadBalancerConfigApplyConfiguration) WithDNSType(value configv1.DNSType) *CloudLoadBalancerConfigApplyConfiguration { - b.DNSType = &value - return b -} - -// WithClusterHosted sets the ClusterHosted field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterHosted field is set to the value of the last call. -func (b *CloudLoadBalancerConfigApplyConfiguration) WithClusterHosted(value *CloudLoadBalancerIPsApplyConfiguration) *CloudLoadBalancerConfigApplyConfiguration { - b.ClusterHosted = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerips.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerips.go deleted file mode 100644 index 1ac93beee..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/cloudloadbalancerips.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CloudLoadBalancerIPsApplyConfiguration represents a declarative configuration of the CloudLoadBalancerIPs type for use -// with apply. -// -// CloudLoadBalancerIPs contains the Load Balancer IPs for the cloud's API, -// API-Int and Ingress Load balancers. They will be populated as soon as the -// respective Load Balancers have been configured. These values are utilized -// to configure the DNS solution hosted within the cluster. -type CloudLoadBalancerIPsApplyConfiguration struct { - // apiIntLoadBalancerIPs holds Load Balancer IPs for the internal API service. - // These Load Balancer IP addresses can be IPv4 and/or IPv6 addresses. - // Entries in the apiIntLoadBalancerIPs must be unique. - // A maximum of 16 IP addresses are permitted. - APIIntLoadBalancerIPs []configv1.IP `json:"apiIntLoadBalancerIPs,omitempty"` - // apiLoadBalancerIPs holds Load Balancer IPs for the API service. - // These Load Balancer IP addresses can be IPv4 and/or IPv6 addresses. - // Could be empty for private clusters. - // Entries in the apiLoadBalancerIPs must be unique. - // A maximum of 16 IP addresses are permitted. - APILoadBalancerIPs []configv1.IP `json:"apiLoadBalancerIPs,omitempty"` - // ingressLoadBalancerIPs holds IPs for Ingress Load Balancers. - // These Load Balancer IP addresses can be IPv4 and/or IPv6 addresses. - // Entries in the ingressLoadBalancerIPs must be unique. - // A maximum of 16 IP addresses are permitted. - IngressLoadBalancerIPs []configv1.IP `json:"ingressLoadBalancerIPs,omitempty"` -} - -// CloudLoadBalancerIPsApplyConfiguration constructs a declarative configuration of the CloudLoadBalancerIPs type for use with -// apply. -func CloudLoadBalancerIPs() *CloudLoadBalancerIPsApplyConfiguration { - return &CloudLoadBalancerIPsApplyConfiguration{} -} - -// WithAPIIntLoadBalancerIPs adds the given value to the APIIntLoadBalancerIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIIntLoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPIIntLoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { - for i := range values { - b.APIIntLoadBalancerIPs = append(b.APIIntLoadBalancerIPs, values[i]) - } - return b -} - -// WithAPILoadBalancerIPs adds the given value to the APILoadBalancerIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APILoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithAPILoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { - for i := range values { - b.APILoadBalancerIPs = append(b.APILoadBalancerIPs, values[i]) - } - return b -} - -// WithIngressLoadBalancerIPs adds the given value to the IngressLoadBalancerIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressLoadBalancerIPs field. -func (b *CloudLoadBalancerIPsApplyConfiguration) WithIngressLoadBalancerIPs(values ...configv1.IP) *CloudLoadBalancerIPsApplyConfiguration { - for i := range values { - b.IngressLoadBalancerIPs = append(b.IngressLoadBalancerIPs, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clustercondition.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clustercondition.go deleted file mode 100644 index fddf4243d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clustercondition.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterConditionApplyConfiguration represents a declarative configuration of the ClusterCondition type for use -// with apply. -// -// ClusterCondition is a union of typed cluster conditions. The 'type' -// property determines which of the type-specific properties are relevant. -// When evaluated on a cluster, the condition may match, not match, or -// fail to evaluate. -type ClusterConditionApplyConfiguration struct { - // type represents the cluster-condition type. This defines - // the members and semantics of any additional properties. - Type *string `json:"type,omitempty"` - // promql represents a cluster condition based on PromQL. - PromQL *PromQLClusterConditionApplyConfiguration `json:"promql,omitempty"` -} - -// ClusterConditionApplyConfiguration constructs a declarative configuration of the ClusterCondition type for use with -// apply. -func ClusterCondition() *ClusterConditionApplyConfiguration { - return &ClusterConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ClusterConditionApplyConfiguration) WithType(value string) *ClusterConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithPromQL sets the PromQL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PromQL field is set to the value of the last call. -func (b *ClusterConditionApplyConfiguration) WithPromQL(value *PromQLClusterConditionApplyConfiguration) *ClusterConditionApplyConfiguration { - b.PromQL = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicy.go deleted file mode 100644 index 82e34d112..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicy.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterImagePolicyApplyConfiguration represents a declarative configuration of the ClusterImagePolicy type for use -// with apply. -// -// # ClusterImagePolicy holds cluster-wide configuration for image signature verification -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ClusterImagePolicyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec contains the configuration for the cluster image policy. - Spec *ClusterImagePolicySpecApplyConfiguration `json:"spec,omitempty"` - // status contains the observed state of the resource. - Status *ClusterImagePolicyStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterImagePolicy constructs a declarative configuration of the ClusterImagePolicy type for use with -// apply. -func ClusterImagePolicy(name string) *ClusterImagePolicyApplyConfiguration { - b := &ClusterImagePolicyApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterImagePolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractClusterImagePolicyFrom extracts the applied configuration owned by fieldManager from -// clusterImagePolicy for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// clusterImagePolicy must be a unmodified ClusterImagePolicy API object that was retrieved from the Kubernetes API. -// ExtractClusterImagePolicyFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterImagePolicyFrom(clusterImagePolicy *configv1.ClusterImagePolicy, fieldManager string, subresource string) (*ClusterImagePolicyApplyConfiguration, error) { - b := &ClusterImagePolicyApplyConfiguration{} - err := managedfields.ExtractInto(clusterImagePolicy, internal.Parser().Type("com.github.openshift.api.config.v1.ClusterImagePolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterImagePolicy.Name) - - b.WithKind("ClusterImagePolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractClusterImagePolicy extracts the applied configuration owned by fieldManager from -// clusterImagePolicy. If no managedFields are found in clusterImagePolicy for fieldManager, a -// ClusterImagePolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterImagePolicy must be a unmodified ClusterImagePolicy API object that was retrieved from the Kubernetes API. -// ExtractClusterImagePolicy provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterImagePolicy(clusterImagePolicy *configv1.ClusterImagePolicy, fieldManager string) (*ClusterImagePolicyApplyConfiguration, error) { - return ExtractClusterImagePolicyFrom(clusterImagePolicy, fieldManager, "") -} - -// ExtractClusterImagePolicyStatus extracts the applied configuration owned by fieldManager from -// clusterImagePolicy for the status subresource. -func ExtractClusterImagePolicyStatus(clusterImagePolicy *configv1.ClusterImagePolicy, fieldManager string) (*ClusterImagePolicyApplyConfiguration, error) { - return ExtractClusterImagePolicyFrom(clusterImagePolicy, fieldManager, "status") -} - -func (b ClusterImagePolicyApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithKind(value string) *ClusterImagePolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithAPIVersion(value string) *ClusterImagePolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithName(value string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithGenerateName(value string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithNamespace(value string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithUID(value types.UID) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithResourceVersion(value string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithGeneration(value int64) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterImagePolicyApplyConfiguration) WithLabels(entries map[string]string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterImagePolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterImagePolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterImagePolicyApplyConfiguration) WithFinalizers(values ...string) *ClusterImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterImagePolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithSpec(value *ClusterImagePolicySpecApplyConfiguration) *ClusterImagePolicyApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterImagePolicyApplyConfiguration) WithStatus(value *ClusterImagePolicyStatusApplyConfiguration) *ClusterImagePolicyApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ClusterImagePolicyApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ClusterImagePolicyApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterImagePolicyApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ClusterImagePolicyApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicyspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicyspec.go deleted file mode 100644 index fc0abdc0b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicyspec.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ClusterImagePolicySpecApplyConfiguration represents a declarative configuration of the ClusterImagePolicySpec type for use -// with apply. -// -// CLusterImagePolicySpec is the specification of the ClusterImagePolicy custom resource. -type ClusterImagePolicySpecApplyConfiguration struct { - // scopes is a required field that defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the "Docker Registry HTTP API V2". - // Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). - // More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository - // namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). - // Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. - // This support no more than 256 scopes in one object. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. - // In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories - // quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. - // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. - // For additional details about the format, please refer to the document explaining the docker transport field, - // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker - Scopes []configv1.ImageScope `json:"scopes,omitempty"` - // policy is a required field that contains configuration to allow scopes to be verified, and defines how - // images not matching the verification policy will be treated. - Policy *ImageSigstoreVerificationPolicyApplyConfiguration `json:"policy,omitempty"` -} - -// ClusterImagePolicySpecApplyConfiguration constructs a declarative configuration of the ClusterImagePolicySpec type for use with -// apply. -func ClusterImagePolicySpec() *ClusterImagePolicySpecApplyConfiguration { - return &ClusterImagePolicySpecApplyConfiguration{} -} - -// WithScopes adds the given value to the Scopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ClusterImagePolicySpecApplyConfiguration) WithScopes(values ...configv1.ImageScope) *ClusterImagePolicySpecApplyConfiguration { - for i := range values { - b.Scopes = append(b.Scopes, values[i]) - } - return b -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *ClusterImagePolicySpecApplyConfiguration) WithPolicy(value *ImageSigstoreVerificationPolicyApplyConfiguration) *ClusterImagePolicySpecApplyConfiguration { - b.Policy = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicystatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicystatus.go deleted file mode 100644 index abcfa5ea8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterimagepolicystatus.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterImagePolicyStatusApplyConfiguration represents a declarative configuration of the ClusterImagePolicyStatus type for use -// with apply. -type ClusterImagePolicyStatusApplyConfiguration struct { - // conditions provide details on the status of this API Resource. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// ClusterImagePolicyStatusApplyConfiguration constructs a declarative configuration of the ClusterImagePolicyStatus type for use with -// apply. -func ClusterImagePolicyStatus() *ClusterImagePolicyStatusApplyConfiguration { - return &ClusterImagePolicyStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ClusterImagePolicyStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ClusterImagePolicyStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusternetworkentry.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusternetworkentry.go deleted file mode 100644 index 790ab500f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusternetworkentry.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterNetworkEntryApplyConfiguration represents a declarative configuration of the ClusterNetworkEntry type for use -// with apply. -// -// ClusterNetworkEntry is a contiguous block of IP addresses from which pod IPs -// are allocated. -type ClusterNetworkEntryApplyConfiguration struct { - // The complete block for pod IPs. - CIDR *string `json:"cidr,omitempty"` - // The size (prefix) of block to allocate to each node. If this - // field is not used by the plugin, it can be left unset. - HostPrefix *uint32 `json:"hostPrefix,omitempty"` -} - -// ClusterNetworkEntryApplyConfiguration constructs a declarative configuration of the ClusterNetworkEntry type for use with -// apply. -func ClusterNetworkEntry() *ClusterNetworkEntryApplyConfiguration { - return &ClusterNetworkEntryApplyConfiguration{} -} - -// WithCIDR sets the CIDR field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CIDR field is set to the value of the last call. -func (b *ClusterNetworkEntryApplyConfiguration) WithCIDR(value string) *ClusterNetworkEntryApplyConfiguration { - b.CIDR = &value - return b -} - -// WithHostPrefix sets the HostPrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostPrefix field is set to the value of the last call. -func (b *ClusterNetworkEntryApplyConfiguration) WithHostPrefix(value uint32) *ClusterNetworkEntryApplyConfiguration { - b.HostPrefix = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperator.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperator.go deleted file mode 100644 index d0adae3dc..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperator.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterOperatorApplyConfiguration represents a declarative configuration of the ClusterOperator type for use -// with apply. -// -// ClusterOperator holds the status of a core or optional OpenShift component -// managed by the Cluster Version Operator (CVO). This object is used by -// operators to convey their state to the rest of the cluster. -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ClusterOperatorApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds configuration that could apply to any operator. - Spec *configv1.ClusterOperatorSpec `json:"spec,omitempty"` - // status holds the information about the state of an operator. It is consistent with status information across - // the Kubernetes ecosystem. - Status *ClusterOperatorStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterOperator constructs a declarative configuration of the ClusterOperator type for use with -// apply. -func ClusterOperator(name string) *ClusterOperatorApplyConfiguration { - b := &ClusterOperatorApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterOperator") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractClusterOperatorFrom extracts the applied configuration owned by fieldManager from -// clusterOperator for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// clusterOperator must be a unmodified ClusterOperator API object that was retrieved from the Kubernetes API. -// ExtractClusterOperatorFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterOperatorFrom(clusterOperator *configv1.ClusterOperator, fieldManager string, subresource string) (*ClusterOperatorApplyConfiguration, error) { - b := &ClusterOperatorApplyConfiguration{} - err := managedfields.ExtractInto(clusterOperator, internal.Parser().Type("com.github.openshift.api.config.v1.ClusterOperator"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterOperator.Name) - - b.WithKind("ClusterOperator") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractClusterOperator extracts the applied configuration owned by fieldManager from -// clusterOperator. If no managedFields are found in clusterOperator for fieldManager, a -// ClusterOperatorApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterOperator must be a unmodified ClusterOperator API object that was retrieved from the Kubernetes API. -// ExtractClusterOperator provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterOperator(clusterOperator *configv1.ClusterOperator, fieldManager string) (*ClusterOperatorApplyConfiguration, error) { - return ExtractClusterOperatorFrom(clusterOperator, fieldManager, "") -} - -// ExtractClusterOperatorStatus extracts the applied configuration owned by fieldManager from -// clusterOperator for the status subresource. -func ExtractClusterOperatorStatus(clusterOperator *configv1.ClusterOperator, fieldManager string) (*ClusterOperatorApplyConfiguration, error) { - return ExtractClusterOperatorFrom(clusterOperator, fieldManager, "status") -} - -func (b ClusterOperatorApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithKind(value string) *ClusterOperatorApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithAPIVersion(value string) *ClusterOperatorApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithName(value string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithGenerateName(value string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithNamespace(value string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithUID(value types.UID) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithResourceVersion(value string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithGeneration(value int64) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterOperatorApplyConfiguration) WithLabels(entries map[string]string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterOperatorApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterOperatorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterOperatorApplyConfiguration) WithFinalizers(values ...string) *ClusterOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterOperatorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithSpec(value configv1.ClusterOperatorSpec) *ClusterOperatorApplyConfiguration { - b.Spec = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterOperatorApplyConfiguration) WithStatus(value *ClusterOperatorStatusApplyConfiguration) *ClusterOperatorApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ClusterOperatorApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ClusterOperatorApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterOperatorApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ClusterOperatorApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatus.go deleted file mode 100644 index 48e739690..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatus.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ClusterOperatorStatusApplyConfiguration represents a declarative configuration of the ClusterOperatorStatus type for use -// with apply. -// -// ClusterOperatorStatus provides information about the status of the operator. -type ClusterOperatorStatusApplyConfiguration struct { - // conditions describes the state of the operator's managed and monitored components. - Conditions []ClusterOperatorStatusConditionApplyConfiguration `json:"conditions,omitempty"` - // versions is a slice of operator and operand version tuples. Operators which manage multiple operands will have multiple - // operand entries in the array. Available operators must report the version of the operator itself with the name "operator". - // An operator reports a new "operator" version when it has rolled out the new version to all of its operands. - Versions []OperandVersionApplyConfiguration `json:"versions,omitempty"` - // 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 []ObjectReferenceApplyConfiguration `json:"relatedObjects,omitempty"` - // extension contains any additional status information specific to the - // operator which owns this status object. - Extension *runtime.RawExtension `json:"extension,omitempty"` -} - -// ClusterOperatorStatusApplyConfiguration constructs a declarative configuration of the ClusterOperatorStatus type for use with -// apply. -func ClusterOperatorStatus() *ClusterOperatorStatusApplyConfiguration { - return &ClusterOperatorStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ClusterOperatorStatusApplyConfiguration) WithConditions(values ...*ClusterOperatorStatusConditionApplyConfiguration) *ClusterOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *ClusterOperatorStatusApplyConfiguration) WithVersions(values ...*OperandVersionApplyConfiguration) *ClusterOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} - -// WithRelatedObjects adds the given value to the RelatedObjects field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RelatedObjects field. -func (b *ClusterOperatorStatusApplyConfiguration) WithRelatedObjects(values ...*ObjectReferenceApplyConfiguration) *ClusterOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRelatedObjects") - } - b.RelatedObjects = append(b.RelatedObjects, *values[i]) - } - return b -} - -// WithExtension sets the Extension field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Extension field is set to the value of the last call. -func (b *ClusterOperatorStatusApplyConfiguration) WithExtension(value runtime.RawExtension) *ClusterOperatorStatusApplyConfiguration { - b.Extension = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go deleted file mode 100644 index f7ac19e2b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusteroperatorstatuscondition.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ClusterOperatorStatusConditionApplyConfiguration represents a declarative configuration of the ClusterOperatorStatusCondition type for use -// with apply. -// -// ClusterOperatorStatusCondition represents the state of the operator's -// managed and monitored components. -type ClusterOperatorStatusConditionApplyConfiguration struct { - // type specifies the aspect reported by this condition. - Type *configv1.ClusterStatusConditionType `json:"type,omitempty"` - // status of the condition, one of True, False, Unknown. - Status *configv1.ConditionStatus `json:"status,omitempty"` - // lastTransitionTime is the time of the last update to the current status property. - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - // reason is the CamelCase reason for the condition's current status. - Reason *string `json:"reason,omitempty"` - // message provides additional information about the current condition. - // This is only to be consumed by humans. It may contain Line Feed - // characters (U+000A), which should be rendered as new lines. - Message *string `json:"message,omitempty"` -} - -// ClusterOperatorStatusConditionApplyConfiguration constructs a declarative configuration of the ClusterOperatorStatusCondition type for use with -// apply. -func ClusterOperatorStatusCondition() *ClusterOperatorStatusConditionApplyConfiguration { - return &ClusterOperatorStatusConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithType(value configv1.ClusterStatusConditionType) *ClusterOperatorStatusConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithStatus(value configv1.ConditionStatus) *ClusterOperatorStatusConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *ClusterOperatorStatusConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithReason(value string) *ClusterOperatorStatusConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ClusterOperatorStatusConditionApplyConfiguration) WithMessage(value string) *ClusterOperatorStatusConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversion.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversion.go deleted file mode 100644 index 5cfcb7ea1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversion.go +++ /dev/null @@ -1,280 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterVersionApplyConfiguration represents a declarative configuration of the ClusterVersion type for use -// with apply. -// -// ClusterVersion is the configuration for the ClusterVersionOperator. This is where -// parameters related to automatic updates can be set. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ClusterVersionApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the desired state of the cluster version - the operator will work - // to ensure that the desired version is applied to the cluster. - Spec *ClusterVersionSpecApplyConfiguration `json:"spec,omitempty"` - // status contains information about the available updates and any in-progress - // updates. - Status *ClusterVersionStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterVersion constructs a declarative configuration of the ClusterVersion type for use with -// apply. -func ClusterVersion(name string) *ClusterVersionApplyConfiguration { - b := &ClusterVersionApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterVersion") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractClusterVersionFrom extracts the applied configuration owned by fieldManager from -// clusterVersion for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// clusterVersion must be a unmodified ClusterVersion API object that was retrieved from the Kubernetes API. -// ExtractClusterVersionFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterVersionFrom(clusterVersion *configv1.ClusterVersion, fieldManager string, subresource string) (*ClusterVersionApplyConfiguration, error) { - b := &ClusterVersionApplyConfiguration{} - err := managedfields.ExtractInto(clusterVersion, internal.Parser().Type("com.github.openshift.api.config.v1.ClusterVersion"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterVersion.Name) - - b.WithKind("ClusterVersion") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractClusterVersion extracts the applied configuration owned by fieldManager from -// clusterVersion. If no managedFields are found in clusterVersion for fieldManager, a -// ClusterVersionApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterVersion must be a unmodified ClusterVersion API object that was retrieved from the Kubernetes API. -// ExtractClusterVersion provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterVersion(clusterVersion *configv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { - return ExtractClusterVersionFrom(clusterVersion, fieldManager, "") -} - -// ExtractClusterVersionStatus extracts the applied configuration owned by fieldManager from -// clusterVersion for the status subresource. -func ExtractClusterVersionStatus(clusterVersion *configv1.ClusterVersion, fieldManager string) (*ClusterVersionApplyConfiguration, error) { - return ExtractClusterVersionFrom(clusterVersion, fieldManager, "status") -} - -func (b ClusterVersionApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithKind(value string) *ClusterVersionApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithAPIVersion(value string) *ClusterVersionApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithName(value string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithGenerateName(value string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithNamespace(value string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithUID(value types.UID) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithResourceVersion(value string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithGeneration(value int64) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterVersionApplyConfiguration) WithLabels(entries map[string]string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterVersionApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterVersionApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterVersionApplyConfiguration) WithFinalizers(values ...string) *ClusterVersionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterVersionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithSpec(value *ClusterVersionSpecApplyConfiguration) *ClusterVersionApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterVersionApplyConfiguration) WithStatus(value *ClusterVersionStatusApplyConfiguration) *ClusterVersionApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ClusterVersionApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ClusterVersionApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterVersionApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ClusterVersionApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go deleted file mode 100644 index ba8a408f2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesspec.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ClusterVersionCapabilitiesSpecApplyConfiguration represents a declarative configuration of the ClusterVersionCapabilitiesSpec type for use -// with apply. -// -// ClusterVersionCapabilitiesSpec selects the managed set of -// optional, core cluster components. -type ClusterVersionCapabilitiesSpecApplyConfiguration struct { - // baselineCapabilitySet selects an initial set of - // optional capabilities to enable, which can be extended via - // additionalEnabledCapabilities. If unset, the cluster will - // choose a default, and the default may change over time. - // The current default is vCurrent. - BaselineCapabilitySet *configv1.ClusterVersionCapabilitySet `json:"baselineCapabilitySet,omitempty"` - // additionalEnabledCapabilities extends the set of managed - // capabilities beyond the baseline defined in - // baselineCapabilitySet. The default is an empty set. - AdditionalEnabledCapabilities []configv1.ClusterVersionCapability `json:"additionalEnabledCapabilities,omitempty"` -} - -// ClusterVersionCapabilitiesSpecApplyConfiguration constructs a declarative configuration of the ClusterVersionCapabilitiesSpec type for use with -// apply. -func ClusterVersionCapabilitiesSpec() *ClusterVersionCapabilitiesSpecApplyConfiguration { - return &ClusterVersionCapabilitiesSpecApplyConfiguration{} -} - -// WithBaselineCapabilitySet sets the BaselineCapabilitySet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BaselineCapabilitySet field is set to the value of the last call. -func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithBaselineCapabilitySet(value configv1.ClusterVersionCapabilitySet) *ClusterVersionCapabilitiesSpecApplyConfiguration { - b.BaselineCapabilitySet = &value - return b -} - -// WithAdditionalEnabledCapabilities adds the given value to the AdditionalEnabledCapabilities field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalEnabledCapabilities field. -func (b *ClusterVersionCapabilitiesSpecApplyConfiguration) WithAdditionalEnabledCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesSpecApplyConfiguration { - for i := range values { - b.AdditionalEnabledCapabilities = append(b.AdditionalEnabledCapabilities, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go deleted file mode 100644 index 6198d46c7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversioncapabilitiesstatus.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ClusterVersionCapabilitiesStatusApplyConfiguration represents a declarative configuration of the ClusterVersionCapabilitiesStatus type for use -// with apply. -// -// ClusterVersionCapabilitiesStatus describes the state of optional, -// core cluster components. -type ClusterVersionCapabilitiesStatusApplyConfiguration struct { - // enabledCapabilities lists all the capabilities that are currently managed. - EnabledCapabilities []configv1.ClusterVersionCapability `json:"enabledCapabilities,omitempty"` - // knownCapabilities lists all the capabilities known to the current cluster. - KnownCapabilities []configv1.ClusterVersionCapability `json:"knownCapabilities,omitempty"` -} - -// ClusterVersionCapabilitiesStatusApplyConfiguration constructs a declarative configuration of the ClusterVersionCapabilitiesStatus type for use with -// apply. -func ClusterVersionCapabilitiesStatus() *ClusterVersionCapabilitiesStatusApplyConfiguration { - return &ClusterVersionCapabilitiesStatusApplyConfiguration{} -} - -// WithEnabledCapabilities adds the given value to the EnabledCapabilities field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the EnabledCapabilities field. -func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithEnabledCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { - for i := range values { - b.EnabledCapabilities = append(b.EnabledCapabilities, values[i]) - } - return b -} - -// WithKnownCapabilities adds the given value to the KnownCapabilities field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the KnownCapabilities field. -func (b *ClusterVersionCapabilitiesStatusApplyConfiguration) WithKnownCapabilities(values ...configv1.ClusterVersionCapability) *ClusterVersionCapabilitiesStatusApplyConfiguration { - for i := range values { - b.KnownCapabilities = append(b.KnownCapabilities, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionspec.go deleted file mode 100644 index bb8e4f50d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionspec.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ClusterVersionSpecApplyConfiguration represents a declarative configuration of the ClusterVersionSpec type for use -// with apply. -// -// 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. -type ClusterVersionSpecApplyConfiguration struct { - // 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. - ClusterID *configv1.ClusterID `json:"clusterID,omitempty"` - // 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. - // - // Some of the fields are inter-related with restrictions and meanings described here. - // 1. image is specified, version is specified, architecture is specified. API validation error. - // 2. image is specified, version is specified, architecture is not specified. The version extracted from the referenced image must match the specified version. - // 3. image is specified, version is not specified, architecture is specified. API validation error. - // 4. image is specified, version is not specified, architecture is not specified. image is used. - // 5. image is not specified, version is specified, architecture is specified. version and desired architecture are used to select an image. - // 6. image is not specified, version is specified, architecture is not specified. version and current architecture are used to select an image. - // 7. image is not specified, version is not specified, architecture is specified. API validation error. - // 8. image is not specified, version is not specified, architecture is not specified. API validation error. - // - // If 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 if the - // previous version is within the current minor version. Not all - // rollbacks will succeed, and some may unrecoverably break the - // cluster. - DesiredUpdate *UpdateApplyConfiguration `json:"desiredUpdate,omitempty"` - // upstream may be used to specify the preferred update server. By default - // it will use the appropriate update server for the cluster and region. - Upstream *configv1.URL `json:"upstream,omitempty"` - // channel is an identifier for explicitly requesting a non-default set - // of updates to be applied to this cluster. The default channel will - // contain stable updates that are appropriate for production clusters. - Channel *string `json:"channel,omitempty"` - // capabilities configures the installation of optional, core - // cluster components. A null value here is identical to an - // empty object; see the child properties for default semantics. - Capabilities *ClusterVersionCapabilitiesSpecApplyConfiguration `json:"capabilities,omitempty"` - // signatureStores contains the upstream URIs to verify release signatures and optional - // reference to a config map by name containing the PEM-encoded CA bundle. - // - // By default, CVO will use existing signature stores if this property is empty. - // The CVO will check the release signatures in the local ConfigMaps first. It will search for a valid signature - // in these stores in parallel only when local ConfigMaps did not include a valid signature. - // Validation will fail if none of the signature stores reply with valid signature before timeout. - // Setting signatureStores will replace the default signature stores with custom signature stores. - // Default stores can be used with custom signature stores by adding them manually. - // - // A maximum of 32 signature stores may be configured. - SignatureStores []SignatureStoreApplyConfiguration `json:"signatureStores,omitempty"` - // 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. - Overrides []ComponentOverrideApplyConfiguration `json:"overrides,omitempty"` -} - -// ClusterVersionSpecApplyConfiguration constructs a declarative configuration of the ClusterVersionSpec type for use with -// apply. -func ClusterVersionSpec() *ClusterVersionSpecApplyConfiguration { - return &ClusterVersionSpecApplyConfiguration{} -} - -// WithClusterID sets the ClusterID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterID field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithClusterID(value configv1.ClusterID) *ClusterVersionSpecApplyConfiguration { - b.ClusterID = &value - return b -} - -// WithDesiredUpdate sets the DesiredUpdate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DesiredUpdate field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithDesiredUpdate(value *UpdateApplyConfiguration) *ClusterVersionSpecApplyConfiguration { - b.DesiredUpdate = value - return b -} - -// WithUpstream sets the Upstream field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Upstream field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithUpstream(value configv1.URL) *ClusterVersionSpecApplyConfiguration { - b.Upstream = &value - return b -} - -// WithChannel sets the Channel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Channel field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithChannel(value string) *ClusterVersionSpecApplyConfiguration { - b.Channel = &value - return b -} - -// WithCapabilities sets the Capabilities field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Capabilities field is set to the value of the last call. -func (b *ClusterVersionSpecApplyConfiguration) WithCapabilities(value *ClusterVersionCapabilitiesSpecApplyConfiguration) *ClusterVersionSpecApplyConfiguration { - b.Capabilities = value - return b -} - -// WithSignatureStores adds the given value to the SignatureStores field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the SignatureStores field. -func (b *ClusterVersionSpecApplyConfiguration) WithSignatureStores(values ...*SignatureStoreApplyConfiguration) *ClusterVersionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSignatureStores") - } - b.SignatureStores = append(b.SignatureStores, *values[i]) - } - return b -} - -// WithOverrides adds the given value to the Overrides field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Overrides field. -func (b *ClusterVersionSpecApplyConfiguration) WithOverrides(values ...*ComponentOverrideApplyConfiguration) *ClusterVersionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOverrides") - } - b.Overrides = append(b.Overrides, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionstatus.go deleted file mode 100644 index 3d68af9ea..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/clusterversionstatus.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterVersionStatusApplyConfiguration represents a declarative configuration of the ClusterVersionStatus type for use -// with apply. -// -// 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. -type ClusterVersionStatusApplyConfiguration 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 an image or a tag. - Desired *ReleaseApplyConfiguration `json:"desired,omitempty"` - // 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. - History []UpdateHistoryApplyConfiguration `json:"history,omitempty"` - // 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 a previous version. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - // 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. - VersionHash *string `json:"versionHash,omitempty"` - // capabilities describes the state of optional, core cluster components. - Capabilities *ClusterVersionCapabilitiesStatusApplyConfiguration `json:"capabilities,omitempty"` - // 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 "Degraded" 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. - Conditions []ClusterOperatorStatusConditionApplyConfiguration `json:"conditions,omitempty"` - // availableUpdates contains updates recommended for this - // cluster. Updates which appear in conditionalUpdates but not in - // availableUpdates may expose this cluster to known issues. This list - // may be empty if no updates are recommended, if the update service - // is unavailable, or if an invalid channel has been specified. - AvailableUpdates []ReleaseApplyConfiguration `json:"availableUpdates,omitempty"` - // conditionalUpdates contains the list of updates that may be - // recommended for this cluster if it meets specific required - // conditions. Consumers interested in the set of updates that are - // actually recommended for this cluster should use - // availableUpdates. This list may be empty if no updates are - // recommended, if the update service is unavailable, or if an empty - // or invalid channel has been specified. - ConditionalUpdates []ConditionalUpdateApplyConfiguration `json:"conditionalUpdates,omitempty"` - // conditionalUpdateRisks contains the list of risks associated with conditionalUpdates. - // When performing a conditional update, all its associated risks will be compared with the set of accepted risks in the spec.desiredUpdate.acceptRisks field. - // If all risks for a conditional update are included in the spec.desiredUpdate.acceptRisks set, the conditional update can proceed, otherwise it is blocked. - // The risk names in the list must be unique. - // conditionalUpdateRisks must not contain more than 500 entries. - ConditionalUpdateRisks []ConditionalUpdateRiskApplyConfiguration `json:"conditionalUpdateRisks,omitempty"` -} - -// ClusterVersionStatusApplyConfiguration constructs a declarative configuration of the ClusterVersionStatus type for use with -// apply. -func ClusterVersionStatus() *ClusterVersionStatusApplyConfiguration { - return &ClusterVersionStatusApplyConfiguration{} -} - -// WithDesired sets the Desired field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Desired field is set to the value of the last call. -func (b *ClusterVersionStatusApplyConfiguration) WithDesired(value *ReleaseApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - b.Desired = value - return b -} - -// WithHistory adds the given value to the History field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the History field. -func (b *ClusterVersionStatusApplyConfiguration) WithHistory(values ...*UpdateHistoryApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHistory") - } - b.History = append(b.History, *values[i]) - } - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ClusterVersionStatusApplyConfiguration) WithObservedGeneration(value int64) *ClusterVersionStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} - -// WithVersionHash sets the VersionHash field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VersionHash field is set to the value of the last call. -func (b *ClusterVersionStatusApplyConfiguration) WithVersionHash(value string) *ClusterVersionStatusApplyConfiguration { - b.VersionHash = &value - return b -} - -// WithCapabilities sets the Capabilities field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Capabilities field is set to the value of the last call. -func (b *ClusterVersionStatusApplyConfiguration) WithCapabilities(value *ClusterVersionCapabilitiesStatusApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - b.Capabilities = value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ClusterVersionStatusApplyConfiguration) WithConditions(values ...*ClusterOperatorStatusConditionApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithAvailableUpdates adds the given value to the AvailableUpdates field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AvailableUpdates field. -func (b *ClusterVersionStatusApplyConfiguration) WithAvailableUpdates(values ...*ReleaseApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAvailableUpdates") - } - b.AvailableUpdates = append(b.AvailableUpdates, *values[i]) - } - return b -} - -// WithConditionalUpdates adds the given value to the ConditionalUpdates field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConditionalUpdates field. -func (b *ClusterVersionStatusApplyConfiguration) WithConditionalUpdates(values ...*ConditionalUpdateApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditionalUpdates") - } - b.ConditionalUpdates = append(b.ConditionalUpdates, *values[i]) - } - return b -} - -// WithConditionalUpdateRisks adds the given value to the ConditionalUpdateRisks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConditionalUpdateRisks field. -func (b *ClusterVersionStatusApplyConfiguration) WithConditionalUpdateRisks(values ...*ConditionalUpdateRiskApplyConfiguration) *ClusterVersionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditionalUpdateRisks") - } - b.ConditionalUpdateRisks = append(b.ConditionalUpdateRisks, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentoverride.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentoverride.go deleted file mode 100644 index b304cd6b4..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentoverride.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ComponentOverrideApplyConfiguration represents a declarative configuration of the ComponentOverride type for use -// with apply. -// -// ComponentOverride allows overriding cluster version operator's behavior -// for a component. -type ComponentOverrideApplyConfiguration struct { - // kind indentifies which object to override. - Kind *string `json:"kind,omitempty"` - // group identifies the API group that the kind is in. - Group *string `json:"group,omitempty"` - // namespace is the component's namespace. If the resource is cluster - // scoped, the namespace should be empty. - Namespace *string `json:"namespace,omitempty"` - // name is the component's name. - Name *string `json:"name,omitempty"` - // unmanaged controls if cluster version operator should stop managing the - // resources in this cluster. - // Default: false - Unmanaged *bool `json:"unmanaged,omitempty"` -} - -// ComponentOverrideApplyConfiguration constructs a declarative configuration of the ComponentOverride type for use with -// apply. -func ComponentOverride() *ComponentOverrideApplyConfiguration { - return &ComponentOverrideApplyConfiguration{} -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ComponentOverrideApplyConfiguration) WithKind(value string) *ComponentOverrideApplyConfiguration { - b.Kind = &value - return b -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *ComponentOverrideApplyConfiguration) WithGroup(value string) *ComponentOverrideApplyConfiguration { - b.Group = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ComponentOverrideApplyConfiguration) WithNamespace(value string) *ComponentOverrideApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ComponentOverrideApplyConfiguration) WithName(value string) *ComponentOverrideApplyConfiguration { - b.Name = &value - return b -} - -// WithUnmanaged sets the Unmanaged field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Unmanaged field is set to the value of the last call. -func (b *ComponentOverrideApplyConfiguration) WithUnmanaged(value bool) *ComponentOverrideApplyConfiguration { - b.Unmanaged = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutespec.go deleted file mode 100644 index 990a7230a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutespec.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ComponentRouteSpecApplyConfiguration represents a declarative configuration of the ComponentRouteSpec type for use -// with apply. -// -// ComponentRouteSpec allows for configuration of a route's hostname and serving certificate. -type ComponentRouteSpecApplyConfiguration struct { - // namespace is the namespace of the route to customize. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of status.componentRoutes if the route is to be customized. - Namespace *string `json:"namespace,omitempty"` - // name is the logical name of the route to customize. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of status.componentRoutes if the route is to be customized. - Name *string `json:"name,omitempty"` - // hostname is the hostname that should be used by the route. - Hostname *configv1.Hostname `json:"hostname,omitempty"` - // servingCertKeyPairSecret is a reference to a secret of type `kubernetes.io/tls` in the openshift-config namespace. - // The serving cert/key pair must match and will be used by the operator to fulfill the intent of serving with this name. - // If the custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - ServingCertKeyPairSecret *SecretNameReferenceApplyConfiguration `json:"servingCertKeyPairSecret,omitempty"` - // labels defines additional labels to be applied to the route created - // for the component. These labels are used by the IngressController to - // determine which routes it should manage. Changing labels may cause the - // route to be reassigned to a different IngressController. - // When omitted, no additional labels are applied to the component route. - // When specified, labels must contain at least one entry, up to a maximum of 8. - // Label keys must be valid qualified names, consisting of a name segment and - // an optional prefix separated by a slash (/). The name segment must be at most - // 63 characters in length and must consist only of alphanumeric characters, - // dashes (-), underscores (_), and dots (.), and must start and end with - // alphanumeric characters. The prefix, if specified, must be a DNS subdomain: - // at most 253 characters in length, consisting of dot-separated segments where - // each segment starts and ends with an alphanumeric character. - // Label values must be either empty or 1-63 characters, consisting of - // alphanumeric characters, dashes (-), underscores (_), or dots (.), - // starting and ending with an alphanumeric character. - // Keys with the "kubernetes.io/", "k8s.io/", and "openshift.io/" prefixes are reserved and may not be used. - Labels map[string]configv1.LabelValue `json:"labels,omitempty"` -} - -// ComponentRouteSpecApplyConfiguration constructs a declarative configuration of the ComponentRouteSpec type for use with -// apply. -func ComponentRouteSpec() *ComponentRouteSpecApplyConfiguration { - return &ComponentRouteSpecApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ComponentRouteSpecApplyConfiguration) WithNamespace(value string) *ComponentRouteSpecApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ComponentRouteSpecApplyConfiguration) WithName(value string) *ComponentRouteSpecApplyConfiguration { - b.Name = &value - return b -} - -// WithHostname sets the Hostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hostname field is set to the value of the last call. -func (b *ComponentRouteSpecApplyConfiguration) WithHostname(value configv1.Hostname) *ComponentRouteSpecApplyConfiguration { - b.Hostname = &value - return b -} - -// WithServingCertKeyPairSecret sets the ServingCertKeyPairSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServingCertKeyPairSecret field is set to the value of the last call. -func (b *ComponentRouteSpecApplyConfiguration) WithServingCertKeyPairSecret(value *SecretNameReferenceApplyConfiguration) *ComponentRouteSpecApplyConfiguration { - b.ServingCertKeyPairSecret = value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ComponentRouteSpecApplyConfiguration) WithLabels(entries map[string]configv1.LabelValue) *ComponentRouteSpecApplyConfiguration { - if b.Labels == nil && len(entries) > 0 { - b.Labels = make(map[string]configv1.LabelValue, len(entries)) - } - for k, v := range entries { - b.Labels[k] = v - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutestatus.go deleted file mode 100644 index 6d364d906..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/componentroutestatus.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ComponentRouteStatusApplyConfiguration represents a declarative configuration of the ComponentRouteStatus type for use -// with apply. -// -// ComponentRouteStatus contains information allowing configuration of a route's hostname and serving certificate. -type ComponentRouteStatusApplyConfiguration struct { - // namespace is the namespace of the route to customize. It must be a real namespace. Using an actual namespace - // ensures that no two components will conflict and the same component can be installed multiple times. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of spec.componentRoutes if the route is to be customized. - Namespace *string `json:"namespace,omitempty"` - // name is the logical name of the route to customize. It does not have to be the actual name of a route resource - // but it cannot be renamed. - // - // The namespace and name of this componentRoute must match a corresponding - // entry in the list of spec.componentRoutes if the route is to be customized. - Name *string `json:"name,omitempty"` - // defaultHostname is the hostname of this route prior to customization. - DefaultHostname *configv1.Hostname `json:"defaultHostname,omitempty"` - // consumingUsers is a slice of ServiceAccounts that need to have read permission on the servingCertKeyPairSecret secret. - ConsumingUsers []configv1.ConsumingUser `json:"consumingUsers,omitempty"` - // currentHostnames is the list of current names used by the route. Typically, this list should consist of a single - // hostname, but if multiple hostnames are supported by the route the operator may write multiple entries to this list. - CurrentHostnames []configv1.Hostname `json:"currentHostnames,omitempty"` - // conditions are used to communicate the state of the componentRoutes entry. - // - // Supported conditions include Available, Degraded and Progressing. - // - // If available is true, the content served by the route can be accessed by users. This includes cases - // where a default may continue to serve content while the customized route specified by the cluster-admin - // is being configured. - // - // If Degraded is true, that means something has gone wrong trying to handle the componentRoutes entry. - // The currentHostnames field may or may not be in effect. - // - // If Progressing is true, that means the component is taking some action related to the componentRoutes entry. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - // relatedObjects is a list of resources which are useful when debugging or inspecting how spec.componentRoutes is applied. - RelatedObjects []ObjectReferenceApplyConfiguration `json:"relatedObjects,omitempty"` -} - -// ComponentRouteStatusApplyConfiguration constructs a declarative configuration of the ComponentRouteStatus type for use with -// apply. -func ComponentRouteStatus() *ComponentRouteStatusApplyConfiguration { - return &ComponentRouteStatusApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ComponentRouteStatusApplyConfiguration) WithNamespace(value string) *ComponentRouteStatusApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ComponentRouteStatusApplyConfiguration) WithName(value string) *ComponentRouteStatusApplyConfiguration { - b.Name = &value - return b -} - -// WithDefaultHostname sets the DefaultHostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultHostname field is set to the value of the last call. -func (b *ComponentRouteStatusApplyConfiguration) WithDefaultHostname(value configv1.Hostname) *ComponentRouteStatusApplyConfiguration { - b.DefaultHostname = &value - return b -} - -// WithConsumingUsers adds the given value to the ConsumingUsers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConsumingUsers field. -func (b *ComponentRouteStatusApplyConfiguration) WithConsumingUsers(values ...configv1.ConsumingUser) *ComponentRouteStatusApplyConfiguration { - for i := range values { - b.ConsumingUsers = append(b.ConsumingUsers, values[i]) - } - return b -} - -// WithCurrentHostnames adds the given value to the CurrentHostnames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CurrentHostnames field. -func (b *ComponentRouteStatusApplyConfiguration) WithCurrentHostnames(values ...configv1.Hostname) *ComponentRouteStatusApplyConfiguration { - for i := range values { - b.CurrentHostnames = append(b.CurrentHostnames, values[i]) - } - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ComponentRouteStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ComponentRouteStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithRelatedObjects adds the given value to the RelatedObjects field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RelatedObjects field. -func (b *ComponentRouteStatusApplyConfiguration) WithRelatedObjects(values ...*ObjectReferenceApplyConfiguration) *ComponentRouteStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRelatedObjects") - } - b.RelatedObjects = append(b.RelatedObjects, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdate.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdate.go deleted file mode 100644 index a771436b6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdate.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ConditionalUpdateApplyConfiguration represents a declarative configuration of the ConditionalUpdate type for use -// with apply. -// -// ConditionalUpdate represents an update which is recommended to some -// clusters on the version the current cluster is reconciling, but which -// may not be recommended for the current cluster. -type ConditionalUpdateApplyConfiguration struct { - // release is the target of the update. - Release *ReleaseApplyConfiguration `json:"release,omitempty"` - // riskNames represents the set of the names of conditionalUpdateRisks that are relevant to this update for some clusters. - // The Applies condition of each conditionalUpdateRisks entry declares if that risk applies to this cluster. - // A conditional update is accepted only if each of its risks either does not apply to the cluster or is considered acceptable by the cluster administrator. - // The latter means that the risk names are included in value of the spec.desiredUpdate.acceptRisks field. - // Entries must be unique and must not exceed 256 characters. - // riskNames must not contain more than 500 entries. - RiskNames []string `json:"riskNames,omitempty"` - // risks represents the range of issues associated with - // updating to the target release. The cluster-version - // operator will evaluate all entries, and only recommend the - // update if there is at least one entry and all entries - // recommend the update. - Risks []ConditionalUpdateRiskApplyConfiguration `json:"risks,omitempty"` - // conditions represents the observations of the conditional update's - // current status. Known types are: - // * Recommended, for whether the update is recommended for the current cluster. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// ConditionalUpdateApplyConfiguration constructs a declarative configuration of the ConditionalUpdate type for use with -// apply. -func ConditionalUpdate() *ConditionalUpdateApplyConfiguration { - return &ConditionalUpdateApplyConfiguration{} -} - -// WithRelease sets the Release field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Release field is set to the value of the last call. -func (b *ConditionalUpdateApplyConfiguration) WithRelease(value *ReleaseApplyConfiguration) *ConditionalUpdateApplyConfiguration { - b.Release = value - return b -} - -// WithRiskNames adds the given value to the RiskNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RiskNames field. -func (b *ConditionalUpdateApplyConfiguration) WithRiskNames(values ...string) *ConditionalUpdateApplyConfiguration { - for i := range values { - b.RiskNames = append(b.RiskNames, values[i]) - } - return b -} - -// WithRisks adds the given value to the Risks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Risks field. -func (b *ConditionalUpdateApplyConfiguration) WithRisks(values ...*ConditionalUpdateRiskApplyConfiguration) *ConditionalUpdateApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRisks") - } - b.Risks = append(b.Risks, *values[i]) - } - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ConditionalUpdateApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ConditionalUpdateApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdaterisk.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdaterisk.go deleted file mode 100644 index faf72ba82..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/conditionalupdaterisk.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ConditionalUpdateRiskApplyConfiguration represents a declarative configuration of the ConditionalUpdateRisk type for use -// with apply. -// -// ConditionalUpdateRisk represents a reason and cluster-state -// for not recommending a conditional update. -type ConditionalUpdateRiskApplyConfiguration struct { - // conditions represents the observations of the conditional update - // risk's current status. Known types are: - // * Applies, for whether the risk applies to the current cluster. - // The condition's types in the list must be unique. - // conditions must not contain more than one entry. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - // url contains information about this risk. - URL *string `json:"url,omitempty"` - // name is the CamelCase reason for not recommending a - // conditional update, in the event that matchingRules match the - // cluster state. - Name *string `json:"name,omitempty"` - // message provides additional information about the risk of - // updating, in the event that matchingRules match the cluster - // state. This is only to be consumed by humans. It may - // contain Line Feed characters (U+000A), which should be - // rendered as new lines. - Message *string `json:"message,omitempty"` - // matchingRules is a slice of conditions for deciding which - // clusters match the risk and which do not. The slice is - // ordered by decreasing precedence. The cluster-version - // operator will walk the slice in order, and stop after the - // first it can successfully evaluate. If no condition can be - // successfully evaluated, the update will not be recommended. - MatchingRules []ClusterConditionApplyConfiguration `json:"matchingRules,omitempty"` -} - -// ConditionalUpdateRiskApplyConfiguration constructs a declarative configuration of the ConditionalUpdateRisk type for use with -// apply. -func ConditionalUpdateRisk() *ConditionalUpdateRiskApplyConfiguration { - return &ConditionalUpdateRiskApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ConditionalUpdateRiskApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ConditionalUpdateRiskApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ConditionalUpdateRiskApplyConfiguration) WithURL(value string) *ConditionalUpdateRiskApplyConfiguration { - b.URL = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConditionalUpdateRiskApplyConfiguration) WithName(value string) *ConditionalUpdateRiskApplyConfiguration { - b.Name = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ConditionalUpdateRiskApplyConfiguration) WithMessage(value string) *ConditionalUpdateRiskApplyConfiguration { - b.Message = &value - return b -} - -// WithMatchingRules adds the given value to the MatchingRules field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MatchingRules field. -func (b *ConditionalUpdateRiskApplyConfiguration) WithMatchingRules(values ...*ClusterConditionApplyConfiguration) *ConditionalUpdateRiskApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMatchingRules") - } - b.MatchingRules = append(b.MatchingRules, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapfilereference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapfilereference.go deleted file mode 100644 index fd04f126c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapfilereference.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConfigMapFileReferenceApplyConfiguration represents a declarative configuration of the ConfigMapFileReference type for use -// with apply. -// -// ConfigMapFileReference references a config map in a specific namespace. -// The namespace must be specified at the point of use. -type ConfigMapFileReferenceApplyConfiguration struct { - Name *string `json:"name,omitempty"` - // key allows pointing to a specific key/value inside of the configmap. This is useful for logical file references. - Key *string `json:"key,omitempty"` -} - -// ConfigMapFileReferenceApplyConfiguration constructs a declarative configuration of the ConfigMapFileReference type for use with -// apply. -func ConfigMapFileReference() *ConfigMapFileReferenceApplyConfiguration { - return &ConfigMapFileReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConfigMapFileReferenceApplyConfiguration) WithName(value string) *ConfigMapFileReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *ConfigMapFileReferenceApplyConfiguration) WithKey(value string) *ConfigMapFileReferenceApplyConfiguration { - b.Key = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapnamereference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapnamereference.go deleted file mode 100644 index 4c67ee7f9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/configmapnamereference.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConfigMapNameReferenceApplyConfiguration represents a declarative configuration of the ConfigMapNameReference type for use -// with apply. -// -// ConfigMapNameReference references a config map in a specific namespace. -// The namespace must be specified at the point of use. -type ConfigMapNameReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced config map - Name *string `json:"name,omitempty"` -} - -// ConfigMapNameReferenceApplyConfiguration constructs a declarative configuration of the ConfigMapNameReference type for use with -// apply. -func ConfigMapNameReference() *ConfigMapNameReferenceApplyConfiguration { - return &ConfigMapNameReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConfigMapNameReferenceApplyConfiguration) WithName(value string) *ConfigMapNameReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/console.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/console.go deleted file mode 100644 index 09039257c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/console.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ConsoleApplyConfiguration represents a declarative configuration of the Console type for use -// with apply. -// -// Console holds cluster-wide configuration for the web console, including the -// logout URL, and reports the public URL of the console. The canonical name is -// `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ConsoleApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` -} - -// Console constructs a declarative configuration of the Console type for use with -// apply. -func Console(name string) *ConsoleApplyConfiguration { - b := &ConsoleApplyConfiguration{} - b.WithName(name) - b.WithKind("Console") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractConsoleFrom extracts the applied configuration owned by fieldManager from -// console for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// console must be a unmodified Console API object that was retrieved from the Kubernetes API. -// ExtractConsoleFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConsoleFrom(console *configv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { - b := &ConsoleApplyConfiguration{} - err := managedfields.ExtractInto(console, internal.Parser().Type("com.github.openshift.api.config.v1.Console"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(console.Name) - - b.WithKind("Console") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractConsole extracts the applied configuration owned by fieldManager from -// console. If no managedFields are found in console for fieldManager, a -// ConsoleApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// console must be a unmodified Console API object that was retrieved from the Kubernetes API. -// ExtractConsole provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConsole(console *configv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { - return ExtractConsoleFrom(console, fieldManager, "") -} - -// ExtractConsoleStatus extracts the applied configuration owned by fieldManager from -// console for the status subresource. -func ExtractConsoleStatus(console *configv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { - return ExtractConsoleFrom(console, fieldManager, "status") -} - -func (b ConsoleApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithGeneration(value int64) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ConsoleApplyConfiguration) WithFinalizers(values ...string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ConsoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithSpec(value *ConsoleSpecApplyConfiguration) *ConsoleApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithStatus(value *ConsoleStatusApplyConfiguration) *ConsoleApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consoleauthentication.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consoleauthentication.go deleted file mode 100644 index a1d5c9e00..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consoleauthentication.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConsoleAuthenticationApplyConfiguration represents a declarative configuration of the ConsoleAuthentication type for use -// with apply. -// -// ConsoleAuthentication defines a list of optional configuration for console authentication. -type ConsoleAuthenticationApplyConfiguration struct { - // An optional, absolute URL to redirect web browsers to after logging out of - // the console. If not specified, it will redirect to the default login page. - // This is required when using an identity provider that supports single - // sign-on (SSO) such as: - // - OpenID (Keycloak, Azure) - // - RequestHeader (GSSAPI, SSPI, SAML) - // - OAuth (GitHub, GitLab, Google) - // Logging out of the console will destroy the user's token. The logoutRedirect - // provides the user the option to perform single logout (SLO) through the identity - // provider to destroy their single sign-on session. - LogoutRedirect *string `json:"logoutRedirect,omitempty"` -} - -// ConsoleAuthenticationApplyConfiguration constructs a declarative configuration of the ConsoleAuthentication type for use with -// apply. -func ConsoleAuthentication() *ConsoleAuthenticationApplyConfiguration { - return &ConsoleAuthenticationApplyConfiguration{} -} - -// WithLogoutRedirect sets the LogoutRedirect field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogoutRedirect field is set to the value of the last call. -func (b *ConsoleAuthenticationApplyConfiguration) WithLogoutRedirect(value string) *ConsoleAuthenticationApplyConfiguration { - b.LogoutRedirect = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolespec.go deleted file mode 100644 index 6760392ae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolespec.go +++ /dev/null @@ -1,25 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConsoleSpecApplyConfiguration represents a declarative configuration of the ConsoleSpec type for use -// with apply. -// -// ConsoleSpec is the specification of the desired behavior of the Console. -type ConsoleSpecApplyConfiguration struct { - Authentication *ConsoleAuthenticationApplyConfiguration `json:"authentication,omitempty"` -} - -// ConsoleSpecApplyConfiguration constructs a declarative configuration of the ConsoleSpec type for use with -// apply. -func ConsoleSpec() *ConsoleSpecApplyConfiguration { - return &ConsoleSpecApplyConfiguration{} -} - -// WithAuthentication sets the Authentication field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Authentication field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithAuthentication(value *ConsoleAuthenticationApplyConfiguration) *ConsoleSpecApplyConfiguration { - b.Authentication = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolestatus.go deleted file mode 100644 index cbc5a9496..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/consolestatus.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConsoleStatusApplyConfiguration represents a declarative configuration of the ConsoleStatus type for use -// with apply. -// -// ConsoleStatus defines the observed status of the Console. -type ConsoleStatusApplyConfiguration struct { - // The URL for the console. This will be derived from the host for the route that - // is created for the console. - ConsoleURL *string `json:"consoleURL,omitempty"` -} - -// ConsoleStatusApplyConfiguration constructs a declarative configuration of the ConsoleStatus type for use with -// apply. -func ConsoleStatus() *ConsoleStatusApplyConfiguration { - return &ConsoleStatusApplyConfiguration{} -} - -// WithConsoleURL sets the ConsoleURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConsoleURL field is set to the value of the last call. -func (b *ConsoleStatusApplyConfiguration) WithConsoleURL(value string) *ConsoleStatusApplyConfiguration { - b.ConsoleURL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfig.go deleted file mode 100644 index 94be7a1cd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfig.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CRIOCredentialProviderConfigApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfig type for use -// with apply. -// -// CRIOCredentialProviderConfig holds cluster-wide singleton resource configurations for CRI-O credential provider, the name of this instance is "cluster". CRI-O credential provider is a binary shipped with CRI-O that provides a way to obtain container image pull credentials from external sources. -// For example, it can be used to fetch mirror registry credentials from secrets resources in the cluster within the same namespace the pod will be running in. -// CRIOCredentialProviderConfig configuration specifies the pod image sources registries that should trigger the CRI-O credential provider execution, which will resolve the CRI-O mirror configurations and obtain the necessary credentials for pod creation. -// Note: Configuration changes will only take effect after the kubelet restarts, which is automatically managed by the cluster during rollout. -// -// The resource is a singleton named "cluster". -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type CRIOCredentialProviderConfigApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec defines the desired configuration of the CRI-O Credential Provider. - // This field is required and must be provided when creating the resource. - Spec *CRIOCredentialProviderConfigSpecApplyConfiguration `json:"spec,omitempty"` - // status represents the current state of the CRIOCredentialProviderConfig. - // When omitted or nil, it indicates that the status has not yet been set by the controller. - // The controller will populate this field with validation conditions and operational state. - Status *CRIOCredentialProviderConfigStatusApplyConfiguration `json:"status,omitempty"` -} - -// CRIOCredentialProviderConfig constructs a declarative configuration of the CRIOCredentialProviderConfig type for use with -// apply. -func CRIOCredentialProviderConfig(name string) *CRIOCredentialProviderConfigApplyConfiguration { - b := &CRIOCredentialProviderConfigApplyConfiguration{} - b.WithName(name) - b.WithKind("CRIOCredentialProviderConfig") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractCRIOCredentialProviderConfigFrom extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// cRIOCredentialProviderConfig must be a unmodified CRIOCredentialProviderConfig API object that was retrieved from the Kubernetes API. -// ExtractCRIOCredentialProviderConfigFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, fieldManager string, subresource string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - b := &CRIOCredentialProviderConfigApplyConfiguration{} - err := managedfields.ExtractInto(cRIOCredentialProviderConfig, internal.Parser().Type("com.github.openshift.api.config.v1.CRIOCredentialProviderConfig"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cRIOCredentialProviderConfig.Name) - - b.WithKind("CRIOCredentialProviderConfig") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractCRIOCredentialProviderConfig extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig. If no managedFields are found in cRIOCredentialProviderConfig for fieldManager, a -// CRIOCredentialProviderConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// cRIOCredentialProviderConfig must be a unmodified CRIOCredentialProviderConfig API object that was retrieved from the Kubernetes API. -// ExtractCRIOCredentialProviderConfig provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCRIOCredentialProviderConfig(cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, fieldManager string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - return ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig, fieldManager, "") -} - -// ExtractCRIOCredentialProviderConfigStatus extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig for the status subresource. -func ExtractCRIOCredentialProviderConfigStatus(cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, fieldManager string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - return ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig, fieldManager, "status") -} - -func (b CRIOCredentialProviderConfigApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithKind(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithAPIVersion(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithName(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithGenerateName(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithNamespace(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithUID(value types.UID) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithResourceVersion(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithGeneration(value int64) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithLabels(entries map[string]string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithAnnotations(entries map[string]string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithFinalizers(values ...string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CRIOCredentialProviderConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithSpec(value *CRIOCredentialProviderConfigSpecApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithStatus(value *CRIOCredentialProviderConfigStatusApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigspec.go deleted file mode 100644 index 4820041d7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigspec.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CRIOCredentialProviderConfigSpecApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfigSpec type for use -// with apply. -// -// CRIOCredentialProviderConfigSpec defines the desired configuration of the CRI-O Credential Provider. -type CRIOCredentialProviderConfigSpecApplyConfiguration struct { - // matchImages is a list of string patterns used to determine whether - // the CRI-O credential provider should be invoked for a given image. This list is - // passed to the kubelet CredentialProviderConfig, and if any pattern matches - // the requested image, CRI-O credential provider will be invoked to obtain credentials for pulling - // that image or its mirrors. - // Depending on the platform, the CRI-O credential provider may be installed alongside an existing platform specific provider. - // Conflicts between the existing platform specific provider image match configuration and this list will be handled by - // the following precedence rule: credentials from built-in kubelet providers (e.g., ECR, GCR, ACR) take precedence over those - // from the CRIOCredentialProviderConfig when both match the same image. - // To avoid uncertainty, it is recommended to avoid configuring your private image patterns to overlap with - // existing platform specific provider config(e.g., the entries from https://github.com/openshift/machine-config-operator/blob/main/templates/common/aws/files/etc-kubernetes-credential-providers-ecr-credential-provider.yaml). - // You can check the resource's Status conditions - // to see if any entries were ignored due to exact matches with known built-in provider patterns. - // - // This field is optional, the items of the list must contain between 1 and 50 entries. - // The list is treated as a set, so duplicate entries are not allowed. - // - // For more details, see: - // https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/ - // https://github.com/cri-o/crio-credential-provider#architecture - // - // Each entry in matchImages is a pattern which can optionally contain a port and a path. Each entry must be no longer than 512 characters. - // Wildcards ('*') are supported for full subdomain labels, such as '*.k8s.io' or 'k8s.*.io', - // and for top-level domains, such as 'k8s.*' (which matches 'k8s.io' or 'k8s.net'). - // A global wildcard '*' (matching any domain) is not allowed. - // Wildcards may replace an entire hostname label (e.g., *.example.com), but they cannot appear within a label (e.g., f*oo.example.com) and are not allowed in the port or path. - // For example, 'example.*.com' is valid, but 'exa*mple.*.com' is not. - // Each wildcard matches only a single domain label, - // so '*.io' does **not** match '*.k8s.io'. - // - // A match exists between an image and a matchImage when all of the below are true: - // Both contain the same number of domain parts and each part matches. - // The URL path of an matchImages must be a prefix of the target image URL path. - // If the matchImages contains a port, then the port must match in the image as well. - // - // Example values of matchImages: - // - 123456789.dkr.ecr.us-east-1.amazonaws.com - // - *.azurecr.io - // - gcr.io - // - *.*.registry.io - // - registry.io:8080/path - MatchImages []configv1.MatchImage `json:"matchImages,omitempty"` -} - -// CRIOCredentialProviderConfigSpecApplyConfiguration constructs a declarative configuration of the CRIOCredentialProviderConfigSpec type for use with -// apply. -func CRIOCredentialProviderConfigSpec() *CRIOCredentialProviderConfigSpecApplyConfiguration { - return &CRIOCredentialProviderConfigSpecApplyConfiguration{} -} - -// WithMatchImages adds the given value to the MatchImages field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MatchImages field. -func (b *CRIOCredentialProviderConfigSpecApplyConfiguration) WithMatchImages(values ...configv1.MatchImage) *CRIOCredentialProviderConfigSpecApplyConfiguration { - for i := range values { - b.MatchImages = append(b.MatchImages, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigstatus.go deleted file mode 100644 index 903292fe8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/criocredentialproviderconfigstatus.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CRIOCredentialProviderConfigStatusApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfigStatus type for use -// with apply. -// -// CRIOCredentialProviderConfigStatus defines the observed state of CRIOCredentialProviderConfig -type CRIOCredentialProviderConfigStatusApplyConfiguration struct { - // conditions represent the latest available observations of the configuration state. - // When omitted, it indicates that no conditions have been reported yet. - // The maximum number of conditions is 16. - // Conditions are stored as a map keyed by condition type, ensuring uniqueness. - // - // Expected condition types include: - // "Validated": indicates whether the matchImages configuration is valid - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// CRIOCredentialProviderConfigStatusApplyConfiguration constructs a declarative configuration of the CRIOCredentialProviderConfigStatus type for use with -// apply. -func CRIOCredentialProviderConfigStatus() *CRIOCredentialProviderConfigStatusApplyConfiguration { - return &CRIOCredentialProviderConfigStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CRIOCredentialProviderConfigStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *CRIOCredentialProviderConfigStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/custom.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/custom.go deleted file mode 100644 index 0de7826f9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/custom.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomApplyConfiguration represents a declarative configuration of the Custom type for use -// with apply. -// -// Custom provides the custom configuration of gatherers -type CustomApplyConfiguration struct { - // configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. - // It may not exceed 100 items and each gatherer can be present only once. - // It is possible to disable an entire set of gatherers while allowing a specific function within that set. - // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - Configs []GathererConfigApplyConfiguration `json:"configs,omitempty"` -} - -// CustomApplyConfiguration constructs a declarative configuration of the Custom type for use with -// apply. -func Custom() *CustomApplyConfiguration { - return &CustomApplyConfiguration{} -} - -// WithConfigs adds the given value to the Configs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Configs field. -func (b *CustomApplyConfiguration) WithConfigs(values ...*GathererConfigApplyConfiguration) *CustomApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConfigs") - } - b.Configs = append(b.Configs, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customfeaturegates.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customfeaturegates.go deleted file mode 100644 index 84d6febb5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customfeaturegates.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CustomFeatureGatesApplyConfiguration represents a declarative configuration of the CustomFeatureGates type for use -// with apply. -type CustomFeatureGatesApplyConfiguration struct { - // enabled is a list of all feature gates that you want to force on - Enabled []configv1.FeatureGateName `json:"enabled,omitempty"` - // disabled is a list of all feature gates that you want to force off - Disabled []configv1.FeatureGateName `json:"disabled,omitempty"` -} - -// CustomFeatureGatesApplyConfiguration constructs a declarative configuration of the CustomFeatureGates type for use with -// apply. -func CustomFeatureGates() *CustomFeatureGatesApplyConfiguration { - return &CustomFeatureGatesApplyConfiguration{} -} - -// WithEnabled adds the given value to the Enabled field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Enabled field. -func (b *CustomFeatureGatesApplyConfiguration) WithEnabled(values ...configv1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { - for i := range values { - b.Enabled = append(b.Enabled, values[i]) - } - return b -} - -// WithDisabled adds the given value to the Disabled field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Disabled field. -func (b *CustomFeatureGatesApplyConfiguration) WithDisabled(values ...configv1.FeatureGateName) *CustomFeatureGatesApplyConfiguration { - for i := range values { - b.Disabled = append(b.Disabled, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customtlsprofile.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customtlsprofile.go deleted file mode 100644 index 7b682ef20..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/customtlsprofile.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// CustomTLSProfileApplyConfiguration represents a declarative configuration of the CustomTLSProfile type for use -// with apply. -// -// CustomTLSProfile is a user-defined TLS security profile. Be extremely careful -// using a custom TLS profile as invalid configurations can be catastrophic. -type CustomTLSProfileApplyConfiguration struct { - TLSProfileSpecApplyConfiguration `json:",inline"` -} - -// CustomTLSProfileApplyConfiguration constructs a declarative configuration of the CustomTLSProfile type for use with -// apply. -func CustomTLSProfile() *CustomTLSProfileApplyConfiguration { - return &CustomTLSProfileApplyConfiguration{} -} - -// WithCiphers adds the given value to the Ciphers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Ciphers field. -func (b *CustomTLSProfileApplyConfiguration) WithCiphers(values ...string) *CustomTLSProfileApplyConfiguration { - for i := range values { - b.TLSProfileSpecApplyConfiguration.Ciphers = append(b.TLSProfileSpecApplyConfiguration.Ciphers, values[i]) - } - return b -} - -// WithGroups adds the given value to the Groups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Groups field. -func (b *CustomTLSProfileApplyConfiguration) WithGroups(values ...configv1.TLSGroup) *CustomTLSProfileApplyConfiguration { - for i := range values { - b.TLSProfileSpecApplyConfiguration.Groups = append(b.TLSProfileSpecApplyConfiguration.Groups, values[i]) - } - return b -} - -// WithMinTLSVersion sets the MinTLSVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinTLSVersion field is set to the value of the last call. -func (b *CustomTLSProfileApplyConfiguration) WithMinTLSVersion(value configv1.TLSProtocolVersion) *CustomTLSProfileApplyConfiguration { - b.TLSProfileSpecApplyConfiguration.MinTLSVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/deprecatedwebhooktokenauthenticator.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/deprecatedwebhooktokenauthenticator.go deleted file mode 100644 index 0efc32680..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/deprecatedwebhooktokenauthenticator.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DeprecatedWebhookTokenAuthenticatorApplyConfiguration represents a declarative configuration of the DeprecatedWebhookTokenAuthenticator type for use -// with apply. -// -// deprecatedWebhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator. -// It's the same as WebhookTokenAuthenticator but it's missing the 'required' validation on KubeConfig field. -type DeprecatedWebhookTokenAuthenticatorApplyConfiguration 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 - // 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 *SecretNameReferenceApplyConfiguration `json:"kubeConfig,omitempty"` -} - -// DeprecatedWebhookTokenAuthenticatorApplyConfiguration constructs a declarative configuration of the DeprecatedWebhookTokenAuthenticator type for use with -// apply. -func DeprecatedWebhookTokenAuthenticator() *DeprecatedWebhookTokenAuthenticatorApplyConfiguration { - return &DeprecatedWebhookTokenAuthenticatorApplyConfiguration{} -} - -// WithKubeConfig sets the KubeConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeConfig field is set to the value of the last call. -func (b *DeprecatedWebhookTokenAuthenticatorApplyConfiguration) WithKubeConfig(value *SecretNameReferenceApplyConfiguration) *DeprecatedWebhookTokenAuthenticatorApplyConfiguration { - b.KubeConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dns.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dns.go deleted file mode 100644 index 18e5d1483..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dns.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// DNSApplyConfiguration represents a declarative configuration of the DNS type for use -// with apply. -// -// DNS holds cluster-wide information about DNS. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type DNSApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1.DNSStatus `json:"status,omitempty"` -} - -// DNS constructs a declarative configuration of the DNS type for use with -// apply. -func DNS(name string) *DNSApplyConfiguration { - b := &DNSApplyConfiguration{} - b.WithName(name) - b.WithKind("DNS") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractDNSFrom extracts the applied configuration owned by fieldManager from -// dNS for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// dNS must be a unmodified DNS API object that was retrieved from the Kubernetes API. -// ExtractDNSFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractDNSFrom(dNS *configv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { - b := &DNSApplyConfiguration{} - err := managedfields.ExtractInto(dNS, internal.Parser().Type("com.github.openshift.api.config.v1.DNS"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(dNS.Name) - - b.WithKind("DNS") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractDNS extracts the applied configuration owned by fieldManager from -// dNS. If no managedFields are found in dNS for fieldManager, a -// DNSApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// dNS must be a unmodified DNS API object that was retrieved from the Kubernetes API. -// ExtractDNS provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractDNS(dNS *configv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { - return ExtractDNSFrom(dNS, fieldManager, "") -} - -// ExtractDNSStatus extracts the applied configuration owned by fieldManager from -// dNS for the status subresource. -func ExtractDNSStatus(dNS *configv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { - return ExtractDNSFrom(dNS, fieldManager, "status") -} - -func (b DNSApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithGeneration(value int64) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *DNSApplyConfiguration) WithFinalizers(values ...string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *DNSApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithSpec(value *DNSSpecApplyConfiguration) *DNSApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithStatus(value configv1.DNSStatus) *DNSApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *DNSApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *DNSApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *DNSApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *DNSApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsplatformspec.go deleted file mode 100644 index d77bcf2c3..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsplatformspec.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// DNSPlatformSpecApplyConfiguration represents a declarative configuration of the DNSPlatformSpec type for use -// with apply. -// -// DNSPlatformSpec holds cloud-provider-specific configuration -// for DNS administration. -type DNSPlatformSpecApplyConfiguration struct { - // type is the underlying infrastructure provider for the cluster. - // Allowed values: "", "AWS". - // - // Individual components may not support all platforms, - // and must handle unrecognized platforms with best-effort defaults. - Type *configv1.PlatformType `json:"type,omitempty"` - // aws contains DNS configuration specific to the Amazon Web Services cloud provider. - AWS *AWSDNSSpecApplyConfiguration `json:"aws,omitempty"` -} - -// DNSPlatformSpecApplyConfiguration constructs a declarative configuration of the DNSPlatformSpec type for use with -// apply. -func DNSPlatformSpec() *DNSPlatformSpecApplyConfiguration { - return &DNSPlatformSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *DNSPlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *DNSPlatformSpecApplyConfiguration { - b.Type = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *DNSPlatformSpecApplyConfiguration) WithAWS(value *AWSDNSSpecApplyConfiguration) *DNSPlatformSpecApplyConfiguration { - b.AWS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsspec.go deleted file mode 100644 index efb839645..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnsspec.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DNSSpecApplyConfiguration represents a declarative configuration of the DNSSpec type for use -// with apply. -type DNSSpecApplyConfiguration struct { - // baseDomain is the base domain of the cluster. All managed DNS records will - // be sub-domains of this base. - // - // For example, given the base domain `openshift.example.com`, an API server - // DNS record may be created for `cluster-api.openshift.example.com`. - // - // Once set, this field cannot be changed. - BaseDomain *string `json:"baseDomain,omitempty"` - // publicZone is the location where all the DNS records that are publicly accessible to - // the internet exist. - // - // If this field is nil, no public records should be created. - // - // Once set, this field cannot be changed. - PublicZone *DNSZoneApplyConfiguration `json:"publicZone,omitempty"` - // privateZone is the location where all the DNS records that are only available internally - // to the cluster exist. - // - // If this field is nil, no private records should be created. - // - // Once set, this field cannot be changed. - PrivateZone *DNSZoneApplyConfiguration `json:"privateZone,omitempty"` - // platform holds configuration specific to the underlying - // infrastructure provider for DNS. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - Platform *DNSPlatformSpecApplyConfiguration `json:"platform,omitempty"` -} - -// DNSSpecApplyConfiguration constructs a declarative configuration of the DNSSpec type for use with -// apply. -func DNSSpec() *DNSSpecApplyConfiguration { - return &DNSSpecApplyConfiguration{} -} - -// WithBaseDomain sets the BaseDomain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BaseDomain field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithBaseDomain(value string) *DNSSpecApplyConfiguration { - b.BaseDomain = &value - return b -} - -// WithPublicZone sets the PublicZone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PublicZone field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithPublicZone(value *DNSZoneApplyConfiguration) *DNSSpecApplyConfiguration { - b.PublicZone = value - return b -} - -// WithPrivateZone sets the PrivateZone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrivateZone field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithPrivateZone(value *DNSZoneApplyConfiguration) *DNSSpecApplyConfiguration { - b.PrivateZone = value - return b -} - -// WithPlatform sets the Platform field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Platform field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithPlatform(value *DNSPlatformSpecApplyConfiguration) *DNSSpecApplyConfiguration { - b.Platform = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnszone.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnszone.go deleted file mode 100644 index c637c6efb..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/dnszone.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DNSZoneApplyConfiguration represents a declarative configuration of the DNSZone type for use -// with apply. -// -// DNSZone is used to define a DNS hosted zone. -// A zone can be identified by an ID or tags. -type DNSZoneApplyConfiguration struct { - // id is the identifier that can be used to find the DNS hosted zone. - // - // on AWS zone can be fetched using `ID` as id in [1] - // on Azure zone can be fetched using `ID` as a pre-determined name in [2], - // on GCP zone can be fetched using `ID` as a pre-determined name in [3]. - // - // [1]: https://docs.aws.amazon.com/cli/latest/reference/route53/get-hosted-zone.html#options - // [2]: https://docs.microsoft.com/en-us/cli/azure/network/dns/zone?view=azure-cli-latest#az-network-dns-zone-show - // [3]: https://cloud.google.com/dns/docs/reference/v1/managedZones/get - ID *string `json:"id,omitempty"` - // tags can be used to query the DNS hosted zone. - // - // on AWS, resourcegroupstaggingapi [1] can be used to fetch a zone using `Tags` as tag-filters, - // - // [1]: https://docs.aws.amazon.com/cli/latest/reference/resourcegroupstaggingapi/get-resources.html#options - Tags map[string]string `json:"tags,omitempty"` -} - -// DNSZoneApplyConfiguration constructs a declarative configuration of the DNSZone type for use with -// apply. -func DNSZone() *DNSZoneApplyConfiguration { - return &DNSZoneApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *DNSZoneApplyConfiguration) WithID(value string) *DNSZoneApplyConfiguration { - b.ID = &value - return b -} - -// WithTags puts the entries into the Tags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Tags field, -// overwriting an existing map entries in Tags field with the same key. -func (b *DNSZoneApplyConfiguration) WithTags(entries map[string]string) *DNSZoneApplyConfiguration { - if b.Tags == nil && len(entries) > 0 { - b.Tags = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.Tags[k] = v - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/equinixmetalplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/equinixmetalplatformstatus.go deleted file mode 100644 index e39fcf9d0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/equinixmetalplatformstatus.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// EquinixMetalPlatformStatusApplyConfiguration represents a declarative configuration of the EquinixMetalPlatformStatus type for use -// with apply. -// -// EquinixMetalPlatformStatus holds the current status of the Equinix Metal infrastructure provider. -type EquinixMetalPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - IngressIP *string `json:"ingressIP,omitempty"` -} - -// EquinixMetalPlatformStatusApplyConfiguration constructs a declarative configuration of the EquinixMetalPlatformStatus type for use with -// apply. -func EquinixMetalPlatformStatus() *EquinixMetalPlatformStatusApplyConfiguration { - return &EquinixMetalPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *EquinixMetalPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *EquinixMetalPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *EquinixMetalPlatformStatusApplyConfiguration) WithIngressIP(value string) *EquinixMetalPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalclaimssource.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalclaimssource.go deleted file mode 100644 index 143544e7c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalclaimssource.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalClaimsSourceApplyConfiguration represents a declarative configuration of the ExternalClaimsSource type for use -// with apply. -// -// ExternalClaimsSource provides the configuration for a single external claim source. -type ExternalClaimsSourceApplyConfiguration struct { - // authentication is an optional field that configures how the apiserver authenticates with an external claims source. - // When not specified, anonymous authentication is used which means no 'Authorization' header - // is sent in the HTTP request to fetch the external claims. - Authentication *ExternalSourceAuthenticationApplyConfiguration `json:"authentication,omitempty"` - // tls is an optional field that configures the http client TLS - // settings when fetching external claims from this source. - // - // When omitted, system default TLS settings will be used - // for fetching claims from the external source. - TLS *ExternalSourceTLSApplyConfiguration `json:"tls,omitempty"` - // url is a required configuration of the URL - // for which the external claims are located. - URL *SourceURLApplyConfiguration `json:"url,omitempty"` - // mappings is a required list of the claim - // and response handling expression pairs - // that produces the claims from the external source. - // mappings must have at least 1 entry and must not exceed 16 entries. - // Entries must have a unique name across all external claim sources. - Mappings []SourcedClaimMappingApplyConfiguration `json:"mappings,omitempty"` - // predicates is an optional list of constraints in - // which claims should attempt to be fetched from this - // external source. - // - // When omitted, claims are always fetched - // from this external source. - // - // When specified, all predicates must evaluate to 'true' - // before claims are attempted to be fetched from this external source. - // predicates must have at least 1 entry and must not exceed 16 entries. - // Entries must have unique expressions. - Predicates []ExternalSourcePredicateApplyConfiguration `json:"predicates,omitempty"` -} - -// ExternalClaimsSourceApplyConfiguration constructs a declarative configuration of the ExternalClaimsSource type for use with -// apply. -func ExternalClaimsSource() *ExternalClaimsSourceApplyConfiguration { - return &ExternalClaimsSourceApplyConfiguration{} -} - -// WithAuthentication sets the Authentication field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Authentication field is set to the value of the last call. -func (b *ExternalClaimsSourceApplyConfiguration) WithAuthentication(value *ExternalSourceAuthenticationApplyConfiguration) *ExternalClaimsSourceApplyConfiguration { - b.Authentication = value - return b -} - -// WithTLS sets the TLS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLS field is set to the value of the last call. -func (b *ExternalClaimsSourceApplyConfiguration) WithTLS(value *ExternalSourceTLSApplyConfiguration) *ExternalClaimsSourceApplyConfiguration { - b.TLS = value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ExternalClaimsSourceApplyConfiguration) WithURL(value *SourceURLApplyConfiguration) *ExternalClaimsSourceApplyConfiguration { - b.URL = value - return b -} - -// WithMappings adds the given value to the Mappings field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Mappings field. -func (b *ExternalClaimsSourceApplyConfiguration) WithMappings(values ...*SourcedClaimMappingApplyConfiguration) *ExternalClaimsSourceApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMappings") - } - b.Mappings = append(b.Mappings, *values[i]) - } - return b -} - -// WithPredicates adds the given value to the Predicates field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Predicates field. -func (b *ExternalClaimsSourceApplyConfiguration) WithPredicates(values ...*ExternalSourcePredicateApplyConfiguration) *ExternalClaimsSourceApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithPredicates") - } - b.Predicates = append(b.Predicates, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalipconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalipconfig.go deleted file mode 100644 index e2dc0ddef..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalipconfig.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalIPConfigApplyConfiguration represents a declarative configuration of the ExternalIPConfig type for use -// with apply. -// -// ExternalIPConfig specifies some IP blocks relevant for the ExternalIP field -// of a Service resource. -type ExternalIPConfigApplyConfiguration struct { - // policy is a set of restrictions applied to the ExternalIP field. - // If nil or empty, then ExternalIP is not allowed to be set. - Policy *ExternalIPPolicyApplyConfiguration `json:"policy,omitempty"` - // autoAssignCIDRs is a list of CIDRs from which to automatically assign - // Service.ExternalIP. These are assigned when the service is of type - // LoadBalancer. In general, this is only useful for bare-metal clusters. - // In Openshift 3.x, this was misleadingly called "IngressIPs". - // Automatically assigned External IPs are not affected by any - // ExternalIPPolicy rules. - // Currently, only one entry may be provided. - AutoAssignCIDRs []string `json:"autoAssignCIDRs,omitempty"` -} - -// ExternalIPConfigApplyConfiguration constructs a declarative configuration of the ExternalIPConfig type for use with -// apply. -func ExternalIPConfig() *ExternalIPConfigApplyConfiguration { - return &ExternalIPConfigApplyConfiguration{} -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *ExternalIPConfigApplyConfiguration) WithPolicy(value *ExternalIPPolicyApplyConfiguration) *ExternalIPConfigApplyConfiguration { - b.Policy = value - return b -} - -// WithAutoAssignCIDRs adds the given value to the AutoAssignCIDRs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AutoAssignCIDRs field. -func (b *ExternalIPConfigApplyConfiguration) WithAutoAssignCIDRs(values ...string) *ExternalIPConfigApplyConfiguration { - for i := range values { - b.AutoAssignCIDRs = append(b.AutoAssignCIDRs, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalippolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalippolicy.go deleted file mode 100644 index ae29697ff..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalippolicy.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalIPPolicyApplyConfiguration represents a declarative configuration of the ExternalIPPolicy type for use -// with apply. -// -// ExternalIPPolicy configures exactly which IPs are allowed for the ExternalIP -// field in a Service. If the zero struct is supplied, then none are permitted. -// The policy controller always allows automatically assigned external IPs. -type ExternalIPPolicyApplyConfiguration struct { - // allowedCIDRs is the list of allowed CIDRs. - AllowedCIDRs []string `json:"allowedCIDRs,omitempty"` - // rejectedCIDRs is the list of disallowed CIDRs. These take precedence - // over allowedCIDRs. - RejectedCIDRs []string `json:"rejectedCIDRs,omitempty"` -} - -// ExternalIPPolicyApplyConfiguration constructs a declarative configuration of the ExternalIPPolicy type for use with -// apply. -func ExternalIPPolicy() *ExternalIPPolicyApplyConfiguration { - return &ExternalIPPolicyApplyConfiguration{} -} - -// WithAllowedCIDRs adds the given value to the AllowedCIDRs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllowedCIDRs field. -func (b *ExternalIPPolicyApplyConfiguration) WithAllowedCIDRs(values ...string) *ExternalIPPolicyApplyConfiguration { - for i := range values { - b.AllowedCIDRs = append(b.AllowedCIDRs, values[i]) - } - return b -} - -// WithRejectedCIDRs adds the given value to the RejectedCIDRs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RejectedCIDRs field. -func (b *ExternalIPPolicyApplyConfiguration) WithRejectedCIDRs(values ...string) *ExternalIPPolicyApplyConfiguration { - for i := range values { - b.RejectedCIDRs = append(b.RejectedCIDRs, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformspec.go deleted file mode 100644 index 1d48611bd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformspec.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalPlatformSpecApplyConfiguration represents a declarative configuration of the ExternalPlatformSpec type for use -// with apply. -// -// ExternalPlatformSpec holds the desired state for the generic External infrastructure provider. -type ExternalPlatformSpecApplyConfiguration struct { - // platformName holds the arbitrary string representing the infrastructure provider name, expected to be set at the installation time. - // This field is solely for informational and reporting purposes and is not expected to be used for decision-making. - PlatformName *string `json:"platformName,omitempty"` -} - -// ExternalPlatformSpecApplyConfiguration constructs a declarative configuration of the ExternalPlatformSpec type for use with -// apply. -func ExternalPlatformSpec() *ExternalPlatformSpecApplyConfiguration { - return &ExternalPlatformSpecApplyConfiguration{} -} - -// WithPlatformName sets the PlatformName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PlatformName field is set to the value of the last call. -func (b *ExternalPlatformSpecApplyConfiguration) WithPlatformName(value string) *ExternalPlatformSpecApplyConfiguration { - b.PlatformName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformstatus.go deleted file mode 100644 index f9b6e4c79..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalplatformstatus.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalPlatformStatusApplyConfiguration represents a declarative configuration of the ExternalPlatformStatus type for use -// with apply. -// -// ExternalPlatformStatus holds the current status of the generic External infrastructure provider. -type ExternalPlatformStatusApplyConfiguration struct { - // cloudControllerManager contains settings specific to the external Cloud Controller Manager (a.k.a. CCM or CPI). - // When omitted, new nodes will be not tainted - // and no extra initialization from the cloud controller manager is expected. - CloudControllerManager *CloudControllerManagerStatusApplyConfiguration `json:"cloudControllerManager,omitempty"` -} - -// ExternalPlatformStatusApplyConfiguration constructs a declarative configuration of the ExternalPlatformStatus type for use with -// apply. -func ExternalPlatformStatus() *ExternalPlatformStatusApplyConfiguration { - return &ExternalPlatformStatusApplyConfiguration{} -} - -// WithCloudControllerManager sets the CloudControllerManager field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudControllerManager field is set to the value of the last call. -func (b *ExternalPlatformStatusApplyConfiguration) WithCloudControllerManager(value *CloudControllerManagerStatusApplyConfiguration) *ExternalPlatformStatusApplyConfiguration { - b.CloudControllerManager = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourceauthentication.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourceauthentication.go deleted file mode 100644 index a2deb822e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourceauthentication.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ExternalSourceAuthenticationApplyConfiguration represents a declarative configuration of the ExternalSourceAuthentication type for use -// with apply. -// -// ExternalSourceAuthentication configures how the apiserver should attempt -// to authenticate with an external claims source. -type ExternalSourceAuthenticationApplyConfiguration struct { - // type is a required field that sets the type of - // authentication method used by the authenticator - // when fetching external claims. - // - // Allowed values are 'RequestProvidedToken' and 'ClientCredential'. - // - // When set to 'RequestProvidedToken', the authenticator will - // use the token provided to the kube-apiserver as part of the - // request to authenticate with the external claims source. - // - // When set to 'ClientCredential', the authenticator will - // use the configured client-id, client-secret, and token endpoint - // to fetch an access token using the OAuth2 client credentials grant - // flow. The fetched access token will then be used to authenticate - // with the external claims source. - Type *configv1.ExternalSourceAuthenticationType `json:"type,omitempty"` - // clientCredential configures the client credentials - // and token endpoint to use to get an access token. - // clientCredential is required when type is 'ClientCredential', and forbidden otherwise. - ClientCredential *ClientCredentialConfigApplyConfiguration `json:"clientCredential,omitempty"` -} - -// ExternalSourceAuthenticationApplyConfiguration constructs a declarative configuration of the ExternalSourceAuthentication type for use with -// apply. -func ExternalSourceAuthentication() *ExternalSourceAuthenticationApplyConfiguration { - return &ExternalSourceAuthenticationApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ExternalSourceAuthenticationApplyConfiguration) WithType(value configv1.ExternalSourceAuthenticationType) *ExternalSourceAuthenticationApplyConfiguration { - b.Type = &value - return b -} - -// WithClientCredential sets the ClientCredential field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCredential field is set to the value of the last call. -func (b *ExternalSourceAuthenticationApplyConfiguration) WithClientCredential(value *ClientCredentialConfigApplyConfiguration) *ExternalSourceAuthenticationApplyConfiguration { - b.ClientCredential = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcecertificateauthorityconfigmapreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcecertificateauthorityconfigmapreference.go deleted file mode 100644 index f1fb64e74..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcecertificateauthorityconfigmapreference.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration represents a declarative configuration of the ExternalSourceCertificateAuthorityConfigMapReference type for use -// with apply. -// -// ExternalSourceCertificateAuthorityConfigMapReference is a reference to a ConfigMap in the openshift-config -// namespace that should be used for configuring the certificate authority to be -// used when sourcing claims from external sources. -type ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration struct { - // name is the required name of the ConfigMap that exists in the openshift-config namespace. - // The key "ca-bundle.crt" must be present and must contain the CA certificate to be used - // to verify the external source's TLS certificate. - // - // It must be at least 1 character in length, must not exceed 253 characters in length, - // must start and end with a lowercase alphanumeric character, and must only contain - // lowercase alphanumeric characters, '-' or '.'. - Name *string `json:"name,omitempty"` -} - -// ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration constructs a declarative configuration of the ExternalSourceCertificateAuthorityConfigMapReference type for use with -// apply. -func ExternalSourceCertificateAuthorityConfigMapReference() *ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration { - return &ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration) WithName(value string) *ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcepredicate.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcepredicate.go deleted file mode 100644 index ade172dee..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcepredicate.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalSourcePredicateApplyConfiguration represents a declarative configuration of the ExternalSourcePredicate type for use -// with apply. -// -// ExternalSourcePredicate configures a singular condition -// that must return true before the external source is queried -// to retrieve external claims. -type ExternalSourcePredicateApplyConfiguration struct { - // expression is a required CEL expression that - // is used to determine whether or not an external - // source should be used to fetch external claims. - // - // The expression must return a boolean value, - // where true means that the source should be consulted - // and false means that it should not. - // - // Claims from the token used for the request to the kube-apiserver - // are made available via the `claims` variable. - // - // The contents of the `claims` variable varies based on the claims that are - // present in the token being validated. It is the responsibility of those configuring this - // field to understand what claims the identity provider includes when issuing tokens. - // - // expression must be at least 1 character and must not exceed 1024 characters in length. - Expression *string `json:"expression,omitempty"` -} - -// ExternalSourcePredicateApplyConfiguration constructs a declarative configuration of the ExternalSourcePredicate type for use with -// apply. -func ExternalSourcePredicate() *ExternalSourcePredicateApplyConfiguration { - return &ExternalSourcePredicateApplyConfiguration{} -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *ExternalSourcePredicateApplyConfiguration) WithExpression(value string) *ExternalSourcePredicateApplyConfiguration { - b.Expression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcetls.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcetls.go deleted file mode 100644 index a0b84ad6d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/externalsourcetls.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalSourceTLSApplyConfiguration represents a declarative configuration of the ExternalSourceTLS type for use -// with apply. -// -// ExternalSourceTLS configures the TLS options that the apiserver uses as a client -// when making a request to the external claim source. -type ExternalSourceTLSApplyConfiguration struct { - // certificateAuthority is a required reference to a ConfigMap in the openshift-config - // namespace that contains the CA certificate to use to validate TLS connections with the external claims source. - // The key "ca-bundle.crt" must be present in the referenced ConfigMap and must contain the CA certificate to be used - // to verify the external source's TLS certificate. - CertificateAuthority *ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration `json:"certificateAuthority,omitempty"` -} - -// ExternalSourceTLSApplyConfiguration constructs a declarative configuration of the ExternalSourceTLS type for use with -// apply. -func ExternalSourceTLS() *ExternalSourceTLSApplyConfiguration { - return &ExternalSourceTLSApplyConfiguration{} -} - -// WithCertificateAuthority sets the CertificateAuthority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CertificateAuthority field is set to the value of the last call. -func (b *ExternalSourceTLSApplyConfiguration) WithCertificateAuthority(value *ExternalSourceCertificateAuthorityConfigMapReferenceApplyConfiguration) *ExternalSourceTLSApplyConfiguration { - b.CertificateAuthority = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/extramapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/extramapping.go deleted file mode 100644 index 46fa7c46c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/extramapping.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExtraMappingApplyConfiguration represents a declarative configuration of the ExtraMapping type for use -// with apply. -// -// ExtraMapping allows specifying a key and CEL expression to evaluate the keys' value. -// It is used to create additional mappings and attributes added to a cluster identity from a provided authentication token. -type ExtraMappingApplyConfiguration struct { - // key is a required field that specifies the string to use as the extra attribute key. - // - // key must be a domain-prefix path (e.g 'example.org/foo'). - // key must not exceed 510 characters in length. - // key must contain the '/' character, separating the domain and path characters. - // key must not be empty. - // - // The domain portion of the key (string of characters prior to the '/') must be a valid RFC1123 subdomain. - // It must not exceed 253 characters in length. - // It must start and end with an alphanumeric character. - // It must only contain lower case alphanumeric characters and '-' or '.'. - // It must not use the reserved domains, or be subdomains of, "kubernetes.io", "k8s.io", and "openshift.io". - // - // The path portion of the key (string of characters after the '/') must not be empty and must consist of at least one alphanumeric character, percent-encoded octets, '-', '.', '_', '~', '!', '$', '&', ”', '(', ')', '*', '+', ',', ';', '=', and ':'. - // It must not exceed 256 characters in length. - Key *string `json:"key,omitempty"` - // valueExpression is a required field to specify the CEL expression to extract the extra attribute value from a JWT token's claims. - // valueExpression must produce a string or string array value. - // "", [], and null are treated as the extra mapping not being present. - // Empty string values within an array are filtered out. - // - // CEL expressions have access to the token claims through a CEL variable, 'claims'. - // 'claims' is a map of claim names to claim values. - // For example, the 'sub' claim value can be accessed as 'claims.sub'. - // Nested claims can be accessed using dot notation ('claims.foo.bar'). - // - // valueExpression must not exceed 1024 characters in length. - // valueExpression must not be empty. - ValueExpression *string `json:"valueExpression,omitempty"` -} - -// ExtraMappingApplyConfiguration constructs a declarative configuration of the ExtraMapping type for use with -// apply. -func ExtraMapping() *ExtraMappingApplyConfiguration { - return &ExtraMappingApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *ExtraMappingApplyConfiguration) WithKey(value string) *ExtraMappingApplyConfiguration { - b.Key = &value - return b -} - -// WithValueExpression sets the ValueExpression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ValueExpression field is set to the value of the last call. -func (b *ExtraMappingApplyConfiguration) WithValueExpression(value string) *ExtraMappingApplyConfiguration { - b.ValueExpression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregate.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregate.go deleted file mode 100644 index a32c2bbee..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregate.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// FeatureGateApplyConfiguration represents a declarative configuration of the FeatureGate type for use -// with apply. -// -// Feature holds cluster-wide information about feature gates. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type FeatureGateApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *FeatureGateSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *FeatureGateStatusApplyConfiguration `json:"status,omitempty"` -} - -// FeatureGate constructs a declarative configuration of the FeatureGate type for use with -// apply. -func FeatureGate(name string) *FeatureGateApplyConfiguration { - b := &FeatureGateApplyConfiguration{} - b.WithName(name) - b.WithKind("FeatureGate") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractFeatureGateFrom extracts the applied configuration owned by fieldManager from -// featureGate for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// featureGate must be a unmodified FeatureGate API object that was retrieved from the Kubernetes API. -// ExtractFeatureGateFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractFeatureGateFrom(featureGate *configv1.FeatureGate, fieldManager string, subresource string) (*FeatureGateApplyConfiguration, error) { - b := &FeatureGateApplyConfiguration{} - err := managedfields.ExtractInto(featureGate, internal.Parser().Type("com.github.openshift.api.config.v1.FeatureGate"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(featureGate.Name) - - b.WithKind("FeatureGate") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractFeatureGate extracts the applied configuration owned by fieldManager from -// featureGate. If no managedFields are found in featureGate for fieldManager, a -// FeatureGateApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// featureGate must be a unmodified FeatureGate API object that was retrieved from the Kubernetes API. -// ExtractFeatureGate provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractFeatureGate(featureGate *configv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { - return ExtractFeatureGateFrom(featureGate, fieldManager, "") -} - -// ExtractFeatureGateStatus extracts the applied configuration owned by fieldManager from -// featureGate for the status subresource. -func ExtractFeatureGateStatus(featureGate *configv1.FeatureGate, fieldManager string) (*FeatureGateApplyConfiguration, error) { - return ExtractFeatureGateFrom(featureGate, fieldManager, "status") -} - -func (b FeatureGateApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithKind(value string) *FeatureGateApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithAPIVersion(value string) *FeatureGateApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithName(value string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithGenerateName(value string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithNamespace(value string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithUID(value types.UID) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithResourceVersion(value string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithGeneration(value int64) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *FeatureGateApplyConfiguration) WithLabels(entries map[string]string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *FeatureGateApplyConfiguration) WithAnnotations(entries map[string]string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *FeatureGateApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *FeatureGateApplyConfiguration) WithFinalizers(values ...string) *FeatureGateApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *FeatureGateApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithSpec(value *FeatureGateSpecApplyConfiguration) *FeatureGateApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *FeatureGateApplyConfiguration) WithStatus(value *FeatureGateStatusApplyConfiguration) *FeatureGateApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *FeatureGateApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *FeatureGateApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *FeatureGateApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *FeatureGateApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateattributes.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateattributes.go deleted file mode 100644 index 9a800ca4a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateattributes.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// FeatureGateAttributesApplyConfiguration represents a declarative configuration of the FeatureGateAttributes type for use -// with apply. -type FeatureGateAttributesApplyConfiguration struct { - // name is the name of the FeatureGate. - Name *configv1.FeatureGateName `json:"name,omitempty"` -} - -// FeatureGateAttributesApplyConfiguration constructs a declarative configuration of the FeatureGateAttributes type for use with -// apply. -func FeatureGateAttributes() *FeatureGateAttributesApplyConfiguration { - return &FeatureGateAttributesApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *FeatureGateAttributesApplyConfiguration) WithName(value configv1.FeatureGateName) *FeatureGateAttributesApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatedetails.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatedetails.go deleted file mode 100644 index 3aa4b84e6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatedetails.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// FeatureGateDetailsApplyConfiguration represents a declarative configuration of the FeatureGateDetails type for use -// with apply. -type FeatureGateDetailsApplyConfiguration struct { - // version matches the version provided by the ClusterVersion and in the ClusterOperator.Status.Versions field. - Version *string `json:"version,omitempty"` - // enabled is a list of all feature gates that are enabled in the cluster for the named version. - Enabled []FeatureGateAttributesApplyConfiguration `json:"enabled,omitempty"` - // disabled is a list of all feature gates that are disabled in the cluster for the named version. - Disabled []FeatureGateAttributesApplyConfiguration `json:"disabled,omitempty"` -} - -// FeatureGateDetailsApplyConfiguration constructs a declarative configuration of the FeatureGateDetails type for use with -// apply. -func FeatureGateDetails() *FeatureGateDetailsApplyConfiguration { - return &FeatureGateDetailsApplyConfiguration{} -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *FeatureGateDetailsApplyConfiguration) WithVersion(value string) *FeatureGateDetailsApplyConfiguration { - b.Version = &value - return b -} - -// WithEnabled adds the given value to the Enabled field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Enabled field. -func (b *FeatureGateDetailsApplyConfiguration) WithEnabled(values ...*FeatureGateAttributesApplyConfiguration) *FeatureGateDetailsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithEnabled") - } - b.Enabled = append(b.Enabled, *values[i]) - } - return b -} - -// WithDisabled adds the given value to the Disabled field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Disabled field. -func (b *FeatureGateDetailsApplyConfiguration) WithDisabled(values ...*FeatureGateAttributesApplyConfiguration) *FeatureGateDetailsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithDisabled") - } - b.Disabled = append(b.Disabled, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateselection.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateselection.go deleted file mode 100644 index a5225476d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregateselection.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// FeatureGateSelectionApplyConfiguration represents a declarative configuration of the FeatureGateSelection type for use -// with apply. -type FeatureGateSelectionApplyConfiguration struct { - // featureSet changes the list of features in the cluster. The default is empty. Be very careful adjusting this setting. - // Turning on or off features may cause irreversible changes in your cluster which cannot be undone. - FeatureSet *configv1.FeatureSet `json:"featureSet,omitempty"` - // customNoUpgrade allows the enabling or disabling of any feature. Turning this feature set on IS NOT SUPPORTED, CANNOT BE UNDONE, and PREVENTS UPGRADES. - // Because of its nature, this setting cannot be validated. If you have any typos or accidentally apply invalid combinations - // your cluster may fail in an unrecoverable way. featureSet must equal "CustomNoUpgrade" must be set to use this field. - CustomNoUpgrade *CustomFeatureGatesApplyConfiguration `json:"customNoUpgrade,omitempty"` -} - -// FeatureGateSelectionApplyConfiguration constructs a declarative configuration of the FeatureGateSelection type for use with -// apply. -func FeatureGateSelection() *FeatureGateSelectionApplyConfiguration { - return &FeatureGateSelectionApplyConfiguration{} -} - -// WithFeatureSet sets the FeatureSet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FeatureSet field is set to the value of the last call. -func (b *FeatureGateSelectionApplyConfiguration) WithFeatureSet(value configv1.FeatureSet) *FeatureGateSelectionApplyConfiguration { - b.FeatureSet = &value - return b -} - -// WithCustomNoUpgrade sets the CustomNoUpgrade field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomNoUpgrade field is set to the value of the last call. -func (b *FeatureGateSelectionApplyConfiguration) WithCustomNoUpgrade(value *CustomFeatureGatesApplyConfiguration) *FeatureGateSelectionApplyConfiguration { - b.CustomNoUpgrade = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatespec.go deleted file mode 100644 index d7e6f5e2b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatespec.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// FeatureGateSpecApplyConfiguration represents a declarative configuration of the FeatureGateSpec type for use -// with apply. -type FeatureGateSpecApplyConfiguration struct { - FeatureGateSelectionApplyConfiguration `json:",inline"` -} - -// FeatureGateSpecApplyConfiguration constructs a declarative configuration of the FeatureGateSpec type for use with -// apply. -func FeatureGateSpec() *FeatureGateSpecApplyConfiguration { - return &FeatureGateSpecApplyConfiguration{} -} - -// WithFeatureSet sets the FeatureSet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FeatureSet field is set to the value of the last call. -func (b *FeatureGateSpecApplyConfiguration) WithFeatureSet(value configv1.FeatureSet) *FeatureGateSpecApplyConfiguration { - b.FeatureGateSelectionApplyConfiguration.FeatureSet = &value - return b -} - -// WithCustomNoUpgrade sets the CustomNoUpgrade field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomNoUpgrade field is set to the value of the last call. -func (b *FeatureGateSpecApplyConfiguration) WithCustomNoUpgrade(value *CustomFeatureGatesApplyConfiguration) *FeatureGateSpecApplyConfiguration { - b.FeatureGateSelectionApplyConfiguration.CustomNoUpgrade = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatestatus.go deleted file mode 100644 index ca90fe317..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/featuregatestatus.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// FeatureGateStatusApplyConfiguration represents a declarative configuration of the FeatureGateStatus type for use -// with apply. -type FeatureGateStatusApplyConfiguration struct { - // conditions represent the observations of the current state. - // Known .status.conditions.type are: "DeterminationDegraded" - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - // featureGates contains a list of enabled and disabled featureGates that are keyed by payloadVersion. - // Operators other than the CVO and cluster-config-operator, must read the .status.featureGates, locate - // the version they are managing, find the enabled/disabled featuregates and make the operand and operator match. - // The enabled/disabled values for a particular version may change during the life of the cluster as various - // .spec.featureSet values are selected. - // Operators may choose to restart their processes to pick up these changes, but remembering past enable/disable - // lists is beyond the scope of this API and is the responsibility of individual operators. - // Only featureGates with .version in the ClusterVersion.status will be present in this list. - FeatureGates []FeatureGateDetailsApplyConfiguration `json:"featureGates,omitempty"` -} - -// FeatureGateStatusApplyConfiguration constructs a declarative configuration of the FeatureGateStatus type for use with -// apply. -func FeatureGateStatus() *FeatureGateStatusApplyConfiguration { - return &FeatureGateStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *FeatureGateStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *FeatureGateStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithFeatureGates adds the given value to the FeatureGates field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the FeatureGates field. -func (b *FeatureGateStatusApplyConfiguration) WithFeatureGates(values ...*FeatureGateDetailsApplyConfiguration) *FeatureGateStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFeatureGates") - } - b.FeatureGates = append(b.FeatureGates, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherconfig.go deleted file mode 100644 index 8013512a5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherconfig.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// GatherConfigApplyConfiguration represents a declarative configuration of the GatherConfig type for use -// with apply. -// -// GatherConfig provides data gathering configuration options. -type GatherConfigApplyConfiguration struct { - // dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. - // It may not exceed 2 items and must not contain duplicates. - // Valid values are ObfuscateNetworking and WorkloadNames. - // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. - // When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead. - // When omitted no obfuscation is applied. - DataPolicy []configv1.DataPolicyOption `json:"dataPolicy,omitempty"` - // gatherers is a required field that specifies the configuration of the gatherers. - Gatherers *GatherersApplyConfiguration `json:"gatherers,omitempty"` - // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. - // If omitted, the gathering job will use ephemeral storage. - Storage *StorageApplyConfiguration `json:"storage,omitempty"` -} - -// GatherConfigApplyConfiguration constructs a declarative configuration of the GatherConfig type for use with -// apply. -func GatherConfig() *GatherConfigApplyConfiguration { - return &GatherConfigApplyConfiguration{} -} - -// WithDataPolicy adds the given value to the DataPolicy field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DataPolicy field. -func (b *GatherConfigApplyConfiguration) WithDataPolicy(values ...configv1.DataPolicyOption) *GatherConfigApplyConfiguration { - for i := range values { - b.DataPolicy = append(b.DataPolicy, values[i]) - } - return b -} - -// WithGatherers sets the Gatherers field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Gatherers field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithGatherers(value *GatherersApplyConfiguration) *GatherConfigApplyConfiguration { - b.Gatherers = value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithStorage(value *StorageApplyConfiguration) *GatherConfigApplyConfiguration { - b.Storage = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gathererconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gathererconfig.go deleted file mode 100644 index d63c4d4f0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gathererconfig.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// GathererConfigApplyConfiguration represents a declarative configuration of the GathererConfig type for use -// with apply. -// -// GathererConfig allows to configure specific gatherers -type GathererConfigApplyConfiguration struct { - // name is the required name of a specific gatherer. - // It may not exceed 256 characters. - // The format for a gatherer name is: {gatherer}/{function} where the function is optional. - // Gatherer consists of a lowercase letters only that may include underscores (_). - // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). - // The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - Name *string `json:"name,omitempty"` - // state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". - // When set to Enabled the gatherer will run. - // When set to Disabled the gatherer will not run. - State *configv1.GathererState `json:"state,omitempty"` -} - -// GathererConfigApplyConfiguration constructs a declarative configuration of the GathererConfig type for use with -// apply. -func GathererConfig() *GathererConfigApplyConfiguration { - return &GathererConfigApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *GathererConfigApplyConfiguration) WithName(value string) *GathererConfigApplyConfiguration { - b.Name = &value - return b -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *GathererConfigApplyConfiguration) WithState(value configv1.GathererState) *GathererConfigApplyConfiguration { - b.State = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherers.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherers.go deleted file mode 100644 index 06ee2cf6a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gatherers.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// GatherersApplyConfiguration represents a declarative configuration of the Gatherers type for use -// with apply. -// -// Gatherers specifies the configuration of the gatherers -type GatherersApplyConfiguration struct { - // mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. - // When set to All, all gatherers will run and gather data. - // When set to None, all gatherers will be disabled and no data will be gathered. - // When set to Custom, the custom configuration from the custom field will be applied. - Mode *configv1.GatheringMode `json:"mode,omitempty"` - // custom provides gathering configuration. - // It is required when mode is Custom, and forbidden otherwise. - // Custom configuration allows user to disable only a subset of gatherers. - // Gatherers that are not explicitly disabled in custom configuration will run. - Custom *CustomApplyConfiguration `json:"custom,omitempty"` -} - -// GatherersApplyConfiguration constructs a declarative configuration of the Gatherers type for use with -// apply. -func Gatherers() *GatherersApplyConfiguration { - return &GatherersApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *GatherersApplyConfiguration) WithMode(value configv1.GatheringMode) *GatherersApplyConfiguration { - b.Mode = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *GatherersApplyConfiguration) WithCustom(value *CustomApplyConfiguration) *GatherersApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go deleted file mode 100644 index bf4c761d1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpplatformstatus.go +++ /dev/null @@ -1,86 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GCPPlatformStatusApplyConfiguration represents a declarative configuration of the GCPPlatformStatus type for use -// with apply. -// -// GCPPlatformStatus holds the current status of the Google Cloud Platform infrastructure provider. -type GCPPlatformStatusApplyConfiguration struct { - // resourceGroupName is the Project ID for new GCP resources created for the cluster. - ProjectID *string `json:"projectID,omitempty"` - // region holds the region for new GCP resources created for the cluster. - Region *string `json:"region,omitempty"` - // resourceLabels is a list of additional labels to apply to GCP resources created for the cluster. - // See https://cloud.google.com/compute/docs/labeling-resources for information on labeling GCP resources. - // GCP supports a maximum of 64 labels per resource. OpenShift reserves 32 labels for internal use, - // allowing 32 labels for user configuration. - ResourceLabels []GCPResourceLabelApplyConfiguration `json:"resourceLabels,omitempty"` - // resourceTags is a list of additional tags to apply to GCP resources created for the cluster. - // See https://cloud.google.com/resource-manager/docs/tags/tags-overview for information on - // tagging GCP resources. GCP supports a maximum of 50 tags per resource. - ResourceTags []GCPResourceTagApplyConfiguration `json:"resourceTags,omitempty"` - // cloudLoadBalancerConfig holds configuration related to DNS and cloud - // load balancers. It allows configuration of in-cluster DNS as an alternative - // to the platform default DNS implementation. - // When using the ClusterHosted DNS type, Load Balancer IP addresses - // must be provided for the API and internal API load balancers as well as the - // ingress load balancer. - CloudLoadBalancerConfig *CloudLoadBalancerConfigApplyConfiguration `json:"cloudLoadBalancerConfig,omitempty"` -} - -// GCPPlatformStatusApplyConfiguration constructs a declarative configuration of the GCPPlatformStatus type for use with -// apply. -func GCPPlatformStatus() *GCPPlatformStatusApplyConfiguration { - return &GCPPlatformStatusApplyConfiguration{} -} - -// WithProjectID sets the ProjectID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProjectID field is set to the value of the last call. -func (b *GCPPlatformStatusApplyConfiguration) WithProjectID(value string) *GCPPlatformStatusApplyConfiguration { - b.ProjectID = &value - return b -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *GCPPlatformStatusApplyConfiguration) WithRegion(value string) *GCPPlatformStatusApplyConfiguration { - b.Region = &value - return b -} - -// WithResourceLabels adds the given value to the ResourceLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceLabels field. -func (b *GCPPlatformStatusApplyConfiguration) WithResourceLabels(values ...*GCPResourceLabelApplyConfiguration) *GCPPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceLabels") - } - b.ResourceLabels = append(b.ResourceLabels, *values[i]) - } - return b -} - -// WithResourceTags adds the given value to the ResourceTags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ResourceTags field. -func (b *GCPPlatformStatusApplyConfiguration) WithResourceTags(values ...*GCPResourceTagApplyConfiguration) *GCPPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResourceTags") - } - b.ResourceTags = append(b.ResourceTags, *values[i]) - } - return b -} - -// WithCloudLoadBalancerConfig sets the CloudLoadBalancerConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudLoadBalancerConfig field is set to the value of the last call. -func (b *GCPPlatformStatusApplyConfiguration) WithCloudLoadBalancerConfig(value *CloudLoadBalancerConfigApplyConfiguration) *GCPPlatformStatusApplyConfiguration { - b.CloudLoadBalancerConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcelabel.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcelabel.go deleted file mode 100644 index 1c2f5b570..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcelabel.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GCPResourceLabelApplyConfiguration represents a declarative configuration of the GCPResourceLabel type for use -// with apply. -// -// GCPResourceLabel is a label to apply to GCP resources created for the cluster. -type GCPResourceLabelApplyConfiguration struct { - // key is the key part of the label. A label key can have a maximum of 63 characters and cannot be empty. - // Label key must begin with a lowercase letter, and must contain only lowercase letters, numeric characters, - // and the following special characters `_-`. Label key must not have the reserved prefixes `kubernetes-io` - // and `openshift-io`. - Key *string `json:"key,omitempty"` - // value is the value part of the label. A label value can have a maximum of 63 characters and cannot be empty. - // Value must contain only lowercase letters, numeric characters, and the following special characters `_-`. - Value *string `json:"value,omitempty"` -} - -// GCPResourceLabelApplyConfiguration constructs a declarative configuration of the GCPResourceLabel type for use with -// apply. -func GCPResourceLabel() *GCPResourceLabelApplyConfiguration { - return &GCPResourceLabelApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *GCPResourceLabelApplyConfiguration) WithKey(value string) *GCPResourceLabelApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *GCPResourceLabelApplyConfiguration) WithValue(value string) *GCPResourceLabelApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcetag.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcetag.go deleted file mode 100644 index 7652b2886..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gcpresourcetag.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GCPResourceTagApplyConfiguration represents a declarative configuration of the GCPResourceTag type for use -// with apply. -// -// GCPResourceTag is a tag to apply to GCP resources created for the cluster. -type GCPResourceTagApplyConfiguration struct { - // parentID is the ID of the hierarchical resource where the tags are defined, - // e.g. at the Organization or the Project level. To find the Organization or Project ID refer to the following pages: - // https://cloud.google.com/resource-manager/docs/creating-managing-organization#retrieving_your_organization_id, - // https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects. - // An OrganizationID must consist of decimal numbers, and cannot have leading zeroes. - // A ProjectID must be 6 to 30 characters in length, can only contain lowercase letters, numbers, - // and hyphens, and must start with a letter, and cannot end with a hyphen. - ParentID *string `json:"parentID,omitempty"` - // key is the key part of the tag. A tag key can have a maximum of 63 characters and cannot be empty. - // Tag key must begin and end with an alphanumeric character, and must contain only uppercase, lowercase - // alphanumeric characters, and the following special characters `._-`. - Key *string `json:"key,omitempty"` - // value is the value part of the tag. A tag value can have a maximum of 63 characters and cannot be empty. - // Tag value must begin and end with an alphanumeric character, and must contain only uppercase, lowercase - // alphanumeric characters, and the following special characters `_-.@%=+:,*#&(){}[]` and spaces. - Value *string `json:"value,omitempty"` -} - -// GCPResourceTagApplyConfiguration constructs a declarative configuration of the GCPResourceTag type for use with -// apply. -func GCPResourceTag() *GCPResourceTagApplyConfiguration { - return &GCPResourceTagApplyConfiguration{} -} - -// WithParentID sets the ParentID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ParentID field is set to the value of the last call. -func (b *GCPResourceTagApplyConfiguration) WithParentID(value string) *GCPResourceTagApplyConfiguration { - b.ParentID = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *GCPResourceTagApplyConfiguration) WithKey(value string) *GCPResourceTagApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *GCPResourceTagApplyConfiguration) WithValue(value string) *GCPResourceTagApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/githubidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/githubidentityprovider.go deleted file mode 100644 index 4d91aa734..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/githubidentityprovider.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GitHubIdentityProviderApplyConfiguration represents a declarative configuration of the GitHubIdentityProvider type for use -// with apply. -// -// GitHubIdentityProvider provides identities for users authenticating using GitHub credentials -type GitHubIdentityProviderApplyConfiguration struct { - // clientID is the oauth client ID - ClientID *string `json:"clientID,omitempty"` - // 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 *SecretNameReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // organizations optionally restricts which organizations are allowed to log in - Organizations []string `json:"organizations,omitempty"` - // teams optionally restricts which teams are allowed to log in. Format is /. - Teams []string `json:"teams,omitempty"` - // 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. - Hostname *string `json:"hostname,omitempty"` - // 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. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` -} - -// GitHubIdentityProviderApplyConfiguration constructs a declarative configuration of the GitHubIdentityProvider type for use with -// apply. -func GitHubIdentityProvider() *GitHubIdentityProviderApplyConfiguration { - return &GitHubIdentityProviderApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *GitHubIdentityProviderApplyConfiguration) WithClientID(value string) *GitHubIdentityProviderApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *GitHubIdentityProviderApplyConfiguration) WithClientSecret(value *SecretNameReferenceApplyConfiguration) *GitHubIdentityProviderApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithOrganizations adds the given value to the Organizations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Organizations field. -func (b *GitHubIdentityProviderApplyConfiguration) WithOrganizations(values ...string) *GitHubIdentityProviderApplyConfiguration { - for i := range values { - b.Organizations = append(b.Organizations, values[i]) - } - return b -} - -// WithTeams adds the given value to the Teams field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Teams field. -func (b *GitHubIdentityProviderApplyConfiguration) WithTeams(values ...string) *GitHubIdentityProviderApplyConfiguration { - for i := range values { - b.Teams = append(b.Teams, values[i]) - } - return b -} - -// WithHostname sets the Hostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hostname field is set to the value of the last call. -func (b *GitHubIdentityProviderApplyConfiguration) WithHostname(value string) *GitHubIdentityProviderApplyConfiguration { - b.Hostname = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *GitHubIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *GitHubIdentityProviderApplyConfiguration { - b.CA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gitlabidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gitlabidentityprovider.go deleted file mode 100644 index 8faa741ae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/gitlabidentityprovider.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GitLabIdentityProviderApplyConfiguration represents a declarative configuration of the GitLabIdentityProvider type for use -// with apply. -// -// GitLabIdentityProvider provides identities for users authenticating using GitLab credentials -type GitLabIdentityProviderApplyConfiguration struct { - // clientID is the oauth client ID - ClientID *string `json:"clientID,omitempty"` - // 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 *SecretNameReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // url is the oauth server base URL - URL *string `json:"url,omitempty"` - // 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. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` -} - -// GitLabIdentityProviderApplyConfiguration constructs a declarative configuration of the GitLabIdentityProvider type for use with -// apply. -func GitLabIdentityProvider() *GitLabIdentityProviderApplyConfiguration { - return &GitLabIdentityProviderApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *GitLabIdentityProviderApplyConfiguration) WithClientID(value string) *GitLabIdentityProviderApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *GitLabIdentityProviderApplyConfiguration) WithClientSecret(value *SecretNameReferenceApplyConfiguration) *GitLabIdentityProviderApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *GitLabIdentityProviderApplyConfiguration) WithURL(value string) *GitLabIdentityProviderApplyConfiguration { - b.URL = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *GitLabIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *GitLabIdentityProviderApplyConfiguration { - b.CA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/googleidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/googleidentityprovider.go deleted file mode 100644 index f6d6a381d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/googleidentityprovider.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GoogleIdentityProviderApplyConfiguration represents a declarative configuration of the GoogleIdentityProvider type for use -// with apply. -// -// GoogleIdentityProvider provides identities for users authenticating using Google credentials -type GoogleIdentityProviderApplyConfiguration struct { - // clientID is the oauth client ID - ClientID *string `json:"clientID,omitempty"` - // 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 *SecretNameReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // hostedDomain is the optional Google App domain (e.g. "mycompany.com") to restrict logins to - HostedDomain *string `json:"hostedDomain,omitempty"` -} - -// GoogleIdentityProviderApplyConfiguration constructs a declarative configuration of the GoogleIdentityProvider type for use with -// apply. -func GoogleIdentityProvider() *GoogleIdentityProviderApplyConfiguration { - return &GoogleIdentityProviderApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *GoogleIdentityProviderApplyConfiguration) WithClientID(value string) *GoogleIdentityProviderApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *GoogleIdentityProviderApplyConfiguration) WithClientSecret(value *SecretNameReferenceApplyConfiguration) *GoogleIdentityProviderApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithHostedDomain sets the HostedDomain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostedDomain field is set to the value of the last call. -func (b *GoogleIdentityProviderApplyConfiguration) WithHostedDomain(value string) *GoogleIdentityProviderApplyConfiguration { - b.HostedDomain = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/htpasswdidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/htpasswdidentityprovider.go deleted file mode 100644 index 8ebbe1602..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/htpasswdidentityprovider.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// HTPasswdIdentityProviderApplyConfiguration represents a declarative configuration of the HTPasswdIdentityProvider type for use -// with apply. -// -// HTPasswdPasswordIdentityProvider provides identities for users authenticating using htpasswd credentials -type HTPasswdIdentityProviderApplyConfiguration 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 *SecretNameReferenceApplyConfiguration `json:"fileData,omitempty"` -} - -// HTPasswdIdentityProviderApplyConfiguration constructs a declarative configuration of the HTPasswdIdentityProvider type for use with -// apply. -func HTPasswdIdentityProvider() *HTPasswdIdentityProviderApplyConfiguration { - return &HTPasswdIdentityProviderApplyConfiguration{} -} - -// WithFileData sets the FileData field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FileData field is set to the value of the last call. -func (b *HTPasswdIdentityProviderApplyConfiguration) WithFileData(value *SecretNameReferenceApplyConfiguration) *HTPasswdIdentityProviderApplyConfiguration { - b.FileData = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsource.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsource.go deleted file mode 100644 index dbe7b9c8d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsource.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// HubSourceApplyConfiguration represents a declarative configuration of the HubSource type for use -// with apply. -// -// HubSource is used to specify the hub source and its configuration -type HubSourceApplyConfiguration struct { - // name is the name of one of the default hub sources - Name *string `json:"name,omitempty"` - // disabled is used to disable a default hub source on cluster - Disabled *bool `json:"disabled,omitempty"` -} - -// HubSourceApplyConfiguration constructs a declarative configuration of the HubSource type for use with -// apply. -func HubSource() *HubSourceApplyConfiguration { - return &HubSourceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *HubSourceApplyConfiguration) WithName(value string) *HubSourceApplyConfiguration { - b.Name = &value - return b -} - -// WithDisabled sets the Disabled field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Disabled field is set to the value of the last call. -func (b *HubSourceApplyConfiguration) WithDisabled(value bool) *HubSourceApplyConfiguration { - b.Disabled = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsourcestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsourcestatus.go deleted file mode 100644 index 539e70b4e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/hubsourcestatus.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// HubSourceStatusApplyConfiguration represents a declarative configuration of the HubSourceStatus type for use -// with apply. -// -// HubSourceStatus is used to reflect the current state of applying the -// configuration to a default source -type HubSourceStatusApplyConfiguration struct { - *HubSourceApplyConfiguration `json:"HubSource,omitempty"` - // status indicates success or failure in applying the configuration - Status *string `json:"status,omitempty"` - // message provides more information regarding failures - Message *string `json:"message,omitempty"` -} - -// HubSourceStatusApplyConfiguration constructs a declarative configuration of the HubSourceStatus type for use with -// apply. -func HubSourceStatus() *HubSourceStatusApplyConfiguration { - return &HubSourceStatusApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *HubSourceStatusApplyConfiguration) WithName(value string) *HubSourceStatusApplyConfiguration { - b.ensureHubSourceApplyConfigurationExists() - b.HubSourceApplyConfiguration.Name = &value - return b -} - -// WithDisabled sets the Disabled field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Disabled field is set to the value of the last call. -func (b *HubSourceStatusApplyConfiguration) WithDisabled(value bool) *HubSourceStatusApplyConfiguration { - b.ensureHubSourceApplyConfigurationExists() - b.HubSourceApplyConfiguration.Disabled = &value - return b -} - -func (b *HubSourceStatusApplyConfiguration) ensureHubSourceApplyConfigurationExists() { - if b.HubSourceApplyConfiguration == nil { - b.HubSourceApplyConfiguration = &HubSourceApplyConfiguration{} - } -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *HubSourceStatusApplyConfiguration) WithStatus(value string) *HubSourceStatusApplyConfiguration { - b.Status = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *HubSourceStatusApplyConfiguration) WithMessage(value string) *HubSourceStatusApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformspec.go deleted file mode 100644 index 43fa282c6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformspec.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IBMCloudPlatformSpecApplyConfiguration represents a declarative configuration of the IBMCloudPlatformSpec type for use -// with apply. -// -// IBMCloudPlatformSpec holds the desired state of the IBMCloud infrastructure provider. -// This only includes fields that can be modified in the cluster. -type IBMCloudPlatformSpecApplyConfiguration struct { - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of an IBM service. These endpoints are used by components - // within the cluster when trying to reach the IBM Cloud Services that have been - // overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each - // endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus - // are updated to reflect the same custom endpoints. - // A maximum of 13 service endpoints overrides are supported. - ServiceEndpoints []IBMCloudServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` -} - -// IBMCloudPlatformSpecApplyConfiguration constructs a declarative configuration of the IBMCloudPlatformSpec type for use with -// apply. -func IBMCloudPlatformSpec() *IBMCloudPlatformSpecApplyConfiguration { - return &IBMCloudPlatformSpecApplyConfiguration{} -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *IBMCloudPlatformSpecApplyConfiguration) WithServiceEndpoints(values ...*IBMCloudServiceEndpointApplyConfiguration) *IBMCloudPlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go deleted file mode 100644 index a3fd567bb..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudplatformstatus.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IBMCloudPlatformStatusApplyConfiguration represents a declarative configuration of the IBMCloudPlatformStatus type for use -// with apply. -// -// IBMCloudPlatformStatus holds the current status of the IBMCloud infrastructure provider. -type IBMCloudPlatformStatusApplyConfiguration struct { - // location is where the cluster has been deployed - Location *string `json:"location,omitempty"` - // resourceGroupName is the Resource Group for new IBMCloud resources created for the cluster. - ResourceGroupName *string `json:"resourceGroupName,omitempty"` - // providerType indicates the type of cluster that was created - ProviderType *configv1.IBMCloudProviderType `json:"providerType,omitempty"` - // cisInstanceCRN is the CRN of the Cloud Internet Services instance managing - // the DNS zone for the cluster's base domain - CISInstanceCRN *string `json:"cisInstanceCRN,omitempty"` - // dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone - // for the cluster's base domain - DNSInstanceCRN *string `json:"dnsInstanceCRN,omitempty"` - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of an IBM service. These endpoints are used by components - // within the cluster when trying to reach the IBM Cloud Services that have been - // overridden. The CCCMO reads in the IBMCloudPlatformSpec and validates each - // endpoint is resolvable. Once validated, the cloud config and IBMCloudPlatformStatus - // are updated to reflect the same custom endpoints. - ServiceEndpoints []IBMCloudServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` -} - -// IBMCloudPlatformStatusApplyConfiguration constructs a declarative configuration of the IBMCloudPlatformStatus type for use with -// apply. -func IBMCloudPlatformStatus() *IBMCloudPlatformStatusApplyConfiguration { - return &IBMCloudPlatformStatusApplyConfiguration{} -} - -// WithLocation sets the Location field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Location field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithLocation(value string) *IBMCloudPlatformStatusApplyConfiguration { - b.Location = &value - return b -} - -// WithResourceGroupName sets the ResourceGroupName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceGroupName field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithResourceGroupName(value string) *IBMCloudPlatformStatusApplyConfiguration { - b.ResourceGroupName = &value - return b -} - -// WithProviderType sets the ProviderType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderType field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithProviderType(value configv1.IBMCloudProviderType) *IBMCloudPlatformStatusApplyConfiguration { - b.ProviderType = &value - return b -} - -// WithCISInstanceCRN sets the CISInstanceCRN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CISInstanceCRN field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithCISInstanceCRN(value string) *IBMCloudPlatformStatusApplyConfiguration { - b.CISInstanceCRN = &value - return b -} - -// WithDNSInstanceCRN sets the DNSInstanceCRN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSInstanceCRN field is set to the value of the last call. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithDNSInstanceCRN(value string) *IBMCloudPlatformStatusApplyConfiguration { - b.DNSInstanceCRN = &value - return b -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *IBMCloudPlatformStatusApplyConfiguration) WithServiceEndpoints(values ...*IBMCloudServiceEndpointApplyConfiguration) *IBMCloudPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go deleted file mode 100644 index 825d9b6cb..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ibmcloudserviceendpoint.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IBMCloudServiceEndpointApplyConfiguration represents a declarative configuration of the IBMCloudServiceEndpoint type for use -// with apply. -// -// IBMCloudServiceEndpoint stores the configuration of a custom url to -// override existing defaults of IBM Cloud Services. -type IBMCloudServiceEndpointApplyConfiguration struct { - // name is the name of the IBM Cloud service. - // Possible values are: CIS, COS, COSConfig, DNSServices, GlobalCatalog, GlobalSearch, GlobalTagging, HyperProtect, IAM, KeyProtect, ResourceController, ResourceManager, or VPC. - // For example, the IBM Cloud Private IAM service could be configured with the - // service `name` of `IAM` and `url` of `https://private.iam.cloud.ibm.com` - // Whereas the IBM Cloud Private VPC service for US South (Dallas) could be configured - // with the service `name` of `VPC` and `url` of `https://us.south.private.iaas.cloud.ibm.com` - Name *configv1.IBMCloudServiceName `json:"name,omitempty"` - // url is fully qualified URI with scheme https, that overrides the default generated - // endpoint for a client. - // This must be provided and cannot be empty. The path must follow the pattern - // /v[0,9]+ or /api/v[0,9]+ - URL *string `json:"url,omitempty"` -} - -// IBMCloudServiceEndpointApplyConfiguration constructs a declarative configuration of the IBMCloudServiceEndpoint type for use with -// apply. -func IBMCloudServiceEndpoint() *IBMCloudServiceEndpointApplyConfiguration { - return &IBMCloudServiceEndpointApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IBMCloudServiceEndpointApplyConfiguration) WithName(value configv1.IBMCloudServiceName) *IBMCloudServiceEndpointApplyConfiguration { - b.Name = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *IBMCloudServiceEndpointApplyConfiguration) WithURL(value string) *IBMCloudServiceEndpointApplyConfiguration { - b.URL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityprovider.go deleted file mode 100644 index 7dc10c3e9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityprovider.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IdentityProviderApplyConfiguration represents a declarative configuration of the IdentityProvider type for use -// with apply. -// -// IdentityProvider provides identities for users authenticating using credentials -type IdentityProviderApplyConfiguration 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 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,omitempty"` - // mappingMethod determines how identities from this provider are mapped to users - // Defaults to "claim" - MappingMethod *configv1.MappingMethodType `json:"mappingMethod,omitempty"` - IdentityProviderConfigApplyConfiguration `json:",inline"` -} - -// IdentityProviderApplyConfiguration constructs a declarative configuration of the IdentityProvider type for use with -// apply. -func IdentityProvider() *IdentityProviderApplyConfiguration { - return &IdentityProviderApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithName(value string) *IdentityProviderApplyConfiguration { - b.Name = &value - return b -} - -// WithMappingMethod sets the MappingMethod field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MappingMethod field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithMappingMethod(value configv1.MappingMethodType) *IdentityProviderApplyConfiguration { - b.MappingMethod = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.Type = &value - return b -} - -// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BasicAuth field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithBasicAuth(value *BasicAuthIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.BasicAuth = value - return b -} - -// WithGitHub sets the GitHub field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GitHub field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithGitHub(value *GitHubIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.GitHub = value - return b -} - -// WithGitLab sets the GitLab field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GitLab field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithGitLab(value *GitLabIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.GitLab = value - return b -} - -// WithGoogle sets the Google field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Google field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithGoogle(value *GoogleIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.Google = value - return b -} - -// WithHTPasswd sets the HTPasswd field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTPasswd field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithHTPasswd(value *HTPasswdIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.HTPasswd = value - return b -} - -// WithKeystone sets the Keystone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Keystone field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithKeystone(value *KeystoneIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.Keystone = value - return b -} - -// WithLDAP sets the LDAP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LDAP field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithLDAP(value *LDAPIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.LDAP = value - return b -} - -// WithOpenID sets the OpenID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenID field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithOpenID(value *OpenIDIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.OpenID = value - return b -} - -// WithRequestHeader sets the RequestHeader field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RequestHeader field is set to the value of the last call. -func (b *IdentityProviderApplyConfiguration) WithRequestHeader(value *RequestHeaderIdentityProviderApplyConfiguration) *IdentityProviderApplyConfiguration { - b.IdentityProviderConfigApplyConfiguration.RequestHeader = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityproviderconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityproviderconfig.go deleted file mode 100644 index f0bcdab70..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/identityproviderconfig.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IdentityProviderConfigApplyConfiguration represents a declarative configuration of the IdentityProviderConfig type for use -// with apply. -// -// IdentityProviderConfig contains configuration for using a specific identity provider -type IdentityProviderConfigApplyConfiguration struct { - // type identifies the identity provider type for this entry. - Type *configv1.IdentityProviderType `json:"type,omitempty"` - // basicAuth contains configuration options for the BasicAuth IdP - BasicAuth *BasicAuthIdentityProviderApplyConfiguration `json:"basicAuth,omitempty"` - // github enables user authentication using GitHub credentials - GitHub *GitHubIdentityProviderApplyConfiguration `json:"github,omitempty"` - // gitlab enables user authentication using GitLab credentials - GitLab *GitLabIdentityProviderApplyConfiguration `json:"gitlab,omitempty"` - // google enables user authentication using Google credentials - Google *GoogleIdentityProviderApplyConfiguration `json:"google,omitempty"` - // htpasswd enables user authentication using an HTPasswd file to validate credentials - HTPasswd *HTPasswdIdentityProviderApplyConfiguration `json:"htpasswd,omitempty"` - // keystone enables user authentication using keystone password credentials - Keystone *KeystoneIdentityProviderApplyConfiguration `json:"keystone,omitempty"` - // ldap enables user authentication using LDAP credentials - LDAP *LDAPIdentityProviderApplyConfiguration `json:"ldap,omitempty"` - // openID enables user authentication using OpenID credentials - OpenID *OpenIDIdentityProviderApplyConfiguration `json:"openID,omitempty"` - // requestHeader enables user authentication using request header credentials - RequestHeader *RequestHeaderIdentityProviderApplyConfiguration `json:"requestHeader,omitempty"` -} - -// IdentityProviderConfigApplyConfiguration constructs a declarative configuration of the IdentityProviderConfig type for use with -// apply. -func IdentityProviderConfig() *IdentityProviderConfigApplyConfiguration { - return &IdentityProviderConfigApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithType(value configv1.IdentityProviderType) *IdentityProviderConfigApplyConfiguration { - b.Type = &value - return b -} - -// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BasicAuth field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithBasicAuth(value *BasicAuthIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.BasicAuth = value - return b -} - -// WithGitHub sets the GitHub field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GitHub field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithGitHub(value *GitHubIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.GitHub = value - return b -} - -// WithGitLab sets the GitLab field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GitLab field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithGitLab(value *GitLabIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.GitLab = value - return b -} - -// WithGoogle sets the Google field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Google field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithGoogle(value *GoogleIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.Google = value - return b -} - -// WithHTPasswd sets the HTPasswd field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTPasswd field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithHTPasswd(value *HTPasswdIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.HTPasswd = value - return b -} - -// WithKeystone sets the Keystone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Keystone field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithKeystone(value *KeystoneIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.Keystone = value - return b -} - -// WithLDAP sets the LDAP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LDAP field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithLDAP(value *LDAPIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.LDAP = value - return b -} - -// WithOpenID sets the OpenID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenID field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithOpenID(value *OpenIDIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.OpenID = value - return b -} - -// WithRequestHeader sets the RequestHeader field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RequestHeader field is set to the value of the last call. -func (b *IdentityProviderConfigApplyConfiguration) WithRequestHeader(value *RequestHeaderIdentityProviderApplyConfiguration) *IdentityProviderConfigApplyConfiguration { - b.RequestHeader = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/image.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/image.go deleted file mode 100644 index 7007b836b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/image.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImageApplyConfiguration represents a declarative configuration of the Image type for use -// with apply. -// -// Image governs policies related to imagestream imports and runtime configuration -// for external registries. It allows cluster admins to configure which registries -// OpenShift is allowed to import images from, extra CA trust bundles for external -// registries, and policies to block or allow registry hostnames. -// When exposing OpenShift's image registry to the public, this also lets cluster -// admins specify the external hostname. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ImageApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ImageSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *ImageStatusApplyConfiguration `json:"status,omitempty"` -} - -// Image constructs a declarative configuration of the Image type for use with -// apply. -func Image(name string) *ImageApplyConfiguration { - b := &ImageApplyConfiguration{} - b.WithName(name) - b.WithKind("Image") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractImageFrom extracts the applied configuration owned by fieldManager from -// image for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// image must be a unmodified Image API object that was retrieved from the Kubernetes API. -// ExtractImageFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageFrom(image *configv1.Image, fieldManager string, subresource string) (*ImageApplyConfiguration, error) { - b := &ImageApplyConfiguration{} - err := managedfields.ExtractInto(image, internal.Parser().Type("com.github.openshift.api.config.v1.Image"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(image.Name) - - b.WithKind("Image") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractImage extracts the applied configuration owned by fieldManager from -// image. If no managedFields are found in image for fieldManager, a -// ImageApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// image must be a unmodified Image API object that was retrieved from the Kubernetes API. -// ExtractImage provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImage(image *configv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { - return ExtractImageFrom(image, fieldManager, "") -} - -// ExtractImageStatus extracts the applied configuration owned by fieldManager from -// image for the status subresource. -func ExtractImageStatus(image *configv1.Image, fieldManager string) (*ImageApplyConfiguration, error) { - return ExtractImageFrom(image, fieldManager, "status") -} - -func (b ImageApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithKind(value string) *ImageApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithAPIVersion(value string) *ImageApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithName(value string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithGenerateName(value string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithNamespace(value string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithUID(value types.UID) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithResourceVersion(value string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithGeneration(value int64) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ImageApplyConfiguration) WithLabels(entries map[string]string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ImageApplyConfiguration) WithAnnotations(entries map[string]string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ImageApplyConfiguration) WithFinalizers(values ...string) *ImageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ImageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithSpec(value *ImageSpecApplyConfiguration) *ImageApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ImageApplyConfiguration) WithStatus(value *ImageStatusApplyConfiguration) *ImageApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ImageApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ImageApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ImageApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ImageApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicy.go deleted file mode 100644 index 8dfc184b0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicy.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImageContentPolicyApplyConfiguration represents a declarative configuration of the ImageContentPolicy type for use -// with apply. -// -// ImageContentPolicy holds cluster-wide information about how to handle registry mirror rules. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ImageContentPolicyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ImageContentPolicySpecApplyConfiguration `json:"spec,omitempty"` -} - -// ImageContentPolicy constructs a declarative configuration of the ImageContentPolicy type for use with -// apply. -func ImageContentPolicy(name string) *ImageContentPolicyApplyConfiguration { - b := &ImageContentPolicyApplyConfiguration{} - b.WithName(name) - b.WithKind("ImageContentPolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractImageContentPolicyFrom extracts the applied configuration owned by fieldManager from -// imageContentPolicy for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// imageContentPolicy must be a unmodified ImageContentPolicy API object that was retrieved from the Kubernetes API. -// ExtractImageContentPolicyFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageContentPolicyFrom(imageContentPolicy *configv1.ImageContentPolicy, fieldManager string, subresource string) (*ImageContentPolicyApplyConfiguration, error) { - b := &ImageContentPolicyApplyConfiguration{} - err := managedfields.ExtractInto(imageContentPolicy, internal.Parser().Type("com.github.openshift.api.config.v1.ImageContentPolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(imageContentPolicy.Name) - - b.WithKind("ImageContentPolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractImageContentPolicy extracts the applied configuration owned by fieldManager from -// imageContentPolicy. If no managedFields are found in imageContentPolicy for fieldManager, a -// ImageContentPolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// imageContentPolicy must be a unmodified ImageContentPolicy API object that was retrieved from the Kubernetes API. -// ExtractImageContentPolicy provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageContentPolicy(imageContentPolicy *configv1.ImageContentPolicy, fieldManager string) (*ImageContentPolicyApplyConfiguration, error) { - return ExtractImageContentPolicyFrom(imageContentPolicy, fieldManager, "") -} - -func (b ImageContentPolicyApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithKind(value string) *ImageContentPolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithAPIVersion(value string) *ImageContentPolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithName(value string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithGenerateName(value string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithNamespace(value string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithUID(value types.UID) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithResourceVersion(value string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithGeneration(value int64) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ImageContentPolicyApplyConfiguration) WithLabels(entries map[string]string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ImageContentPolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageContentPolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ImageContentPolicyApplyConfiguration) WithFinalizers(values ...string) *ImageContentPolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ImageContentPolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ImageContentPolicyApplyConfiguration) WithSpec(value *ImageContentPolicySpecApplyConfiguration) *ImageContentPolicyApplyConfiguration { - b.Spec = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ImageContentPolicyApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ImageContentPolicyApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ImageContentPolicyApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ImageContentPolicyApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicyspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicyspec.go deleted file mode 100644 index 35a082408..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagecontentpolicyspec.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImageContentPolicySpecApplyConfiguration represents a declarative configuration of the ImageContentPolicySpec type for use -// with apply. -// -// ImageContentPolicySpec is the specification of the ImageContentPolicy CRD. -type ImageContentPolicySpecApplyConfiguration struct { - // repositoryDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in RepositoryDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To pull image from mirrors by tags, should set the "allowMirrorByTags". - // - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - RepositoryDigestMirrors []RepositoryDigestMirrorsApplyConfiguration `json:"repositoryDigestMirrors,omitempty"` -} - -// ImageContentPolicySpecApplyConfiguration constructs a declarative configuration of the ImageContentPolicySpec type for use with -// apply. -func ImageContentPolicySpec() *ImageContentPolicySpecApplyConfiguration { - return &ImageContentPolicySpecApplyConfiguration{} -} - -// WithRepositoryDigestMirrors adds the given value to the RepositoryDigestMirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RepositoryDigestMirrors field. -func (b *ImageContentPolicySpecApplyConfiguration) WithRepositoryDigestMirrors(values ...*RepositoryDigestMirrorsApplyConfiguration) *ImageContentPolicySpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRepositoryDigestMirrors") - } - b.RepositoryDigestMirrors = append(b.RepositoryDigestMirrors, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrors.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrors.go deleted file mode 100644 index 367135ed1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrors.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ImageDigestMirrorsApplyConfiguration represents a declarative configuration of the ImageDigestMirrors type for use -// with apply. -// -// ImageDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type ImageDigestMirrorsApplyConfiguration struct { - // source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname - // e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. - // "source" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // [*.]host - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - Source *string `json:"source,omitempty"` - // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. - // Images can be pulled from these mirrors only if they are referenced by their digests. - // The mirrored location is obtained by replacing the part of the input reference that - // matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, - // a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo - // repository to be used. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. - // If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be - // pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy" - // Other cluster configuration, including (but not limited to) other imageDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // "mirrors" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - Mirrors []configv1.ImageMirror `json:"mirrors,omitempty"` - // mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. - // If unset, the image will continue to be pulled from the the repository in the pull spec. - // sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - MirrorSourcePolicy *configv1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` -} - -// ImageDigestMirrorsApplyConfiguration constructs a declarative configuration of the ImageDigestMirrors type for use with -// apply. -func ImageDigestMirrors() *ImageDigestMirrorsApplyConfiguration { - return &ImageDigestMirrorsApplyConfiguration{} -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *ImageDigestMirrorsApplyConfiguration) WithSource(value string) *ImageDigestMirrorsApplyConfiguration { - b.Source = &value - return b -} - -// WithMirrors adds the given value to the Mirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *ImageDigestMirrorsApplyConfiguration) WithMirrors(values ...configv1.ImageMirror) *ImageDigestMirrorsApplyConfiguration { - for i := range values { - b.Mirrors = append(b.Mirrors, values[i]) - } - return b -} - -// WithMirrorSourcePolicy sets the MirrorSourcePolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MirrorSourcePolicy field is set to the value of the last call. -func (b *ImageDigestMirrorsApplyConfiguration) WithMirrorSourcePolicy(value configv1.MirrorSourcePolicy) *ImageDigestMirrorsApplyConfiguration { - b.MirrorSourcePolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorset.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorset.go deleted file mode 100644 index e811970ae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorset.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImageDigestMirrorSetApplyConfiguration represents a declarative configuration of the ImageDigestMirrorSet type for use -// with apply. -// -// ImageDigestMirrorSet holds cluster-wide information about how to handle registry mirror rules on using digest pull specification. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ImageDigestMirrorSetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ImageDigestMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` - // status contains the observed state of the resource. - Status *configv1.ImageDigestMirrorSetStatus `json:"status,omitempty"` -} - -// ImageDigestMirrorSet constructs a declarative configuration of the ImageDigestMirrorSet type for use with -// apply. -func ImageDigestMirrorSet(name string) *ImageDigestMirrorSetApplyConfiguration { - b := &ImageDigestMirrorSetApplyConfiguration{} - b.WithName(name) - b.WithKind("ImageDigestMirrorSet") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractImageDigestMirrorSetFrom extracts the applied configuration owned by fieldManager from -// imageDigestMirrorSet for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// imageDigestMirrorSet must be a unmodified ImageDigestMirrorSet API object that was retrieved from the Kubernetes API. -// ExtractImageDigestMirrorSetFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageDigestMirrorSetFrom(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string, subresource string) (*ImageDigestMirrorSetApplyConfiguration, error) { - b := &ImageDigestMirrorSetApplyConfiguration{} - err := managedfields.ExtractInto(imageDigestMirrorSet, internal.Parser().Type("com.github.openshift.api.config.v1.ImageDigestMirrorSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(imageDigestMirrorSet.Name) - - b.WithKind("ImageDigestMirrorSet") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractImageDigestMirrorSet extracts the applied configuration owned by fieldManager from -// imageDigestMirrorSet. If no managedFields are found in imageDigestMirrorSet for fieldManager, a -// ImageDigestMirrorSetApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// imageDigestMirrorSet must be a unmodified ImageDigestMirrorSet API object that was retrieved from the Kubernetes API. -// ExtractImageDigestMirrorSet provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageDigestMirrorSet(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { - return ExtractImageDigestMirrorSetFrom(imageDigestMirrorSet, fieldManager, "") -} - -// ExtractImageDigestMirrorSetStatus extracts the applied configuration owned by fieldManager from -// imageDigestMirrorSet for the status subresource. -func ExtractImageDigestMirrorSetStatus(imageDigestMirrorSet *configv1.ImageDigestMirrorSet, fieldManager string) (*ImageDigestMirrorSetApplyConfiguration, error) { - return ExtractImageDigestMirrorSetFrom(imageDigestMirrorSet, fieldManager, "status") -} - -func (b ImageDigestMirrorSetApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithKind(value string) *ImageDigestMirrorSetApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithAPIVersion(value string) *ImageDigestMirrorSetApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithName(value string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithGenerateName(value string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithNamespace(value string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithUID(value types.UID) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithResourceVersion(value string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithGeneration(value int64) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ImageDigestMirrorSetApplyConfiguration) WithLabels(entries map[string]string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ImageDigestMirrorSetApplyConfiguration) WithAnnotations(entries map[string]string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageDigestMirrorSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ImageDigestMirrorSetApplyConfiguration) WithFinalizers(values ...string) *ImageDigestMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ImageDigestMirrorSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithSpec(value *ImageDigestMirrorSetSpecApplyConfiguration) *ImageDigestMirrorSetApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ImageDigestMirrorSetApplyConfiguration) WithStatus(value configv1.ImageDigestMirrorSetStatus) *ImageDigestMirrorSetApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ImageDigestMirrorSetApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ImageDigestMirrorSetApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ImageDigestMirrorSetApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ImageDigestMirrorSetApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorsetspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorsetspec.go deleted file mode 100644 index 298071a6b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagedigestmirrorsetspec.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImageDigestMirrorSetSpecApplyConfiguration represents a declarative configuration of the ImageDigestMirrorSetSpec type for use -// with apply. -// -// ImageDigestMirrorSetSpec is the specification of the ImageDigestMirrorSet CRD. -type ImageDigestMirrorSetSpecApplyConfiguration struct { - // imageDigestMirrors allows images referenced by image digests in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in imageDigestMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To use mirrors to pull images using tag specification, users should configure - // a list of mirrors using "ImageTagMirrorSet" CRD. - // - // If the image pull specification matches the repository of "source" in multiple imagedigestmirrorset objects, - // only the objects which define the most specific namespace match will be used. - // For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as - // the "source", only the objects using quay.io/libpod/busybox are going to apply - // for pull specification quay.io/libpod/busybox. - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // Users who want to use a specific order of mirrors, should configure them into one list of mirrors using the expected order. - ImageDigestMirrors []ImageDigestMirrorsApplyConfiguration `json:"imageDigestMirrors,omitempty"` -} - -// ImageDigestMirrorSetSpecApplyConfiguration constructs a declarative configuration of the ImageDigestMirrorSetSpec type for use with -// apply. -func ImageDigestMirrorSetSpec() *ImageDigestMirrorSetSpecApplyConfiguration { - return &ImageDigestMirrorSetSpecApplyConfiguration{} -} - -// WithImageDigestMirrors adds the given value to the ImageDigestMirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ImageDigestMirrors field. -func (b *ImageDigestMirrorSetSpecApplyConfiguration) WithImageDigestMirrors(values ...*ImageDigestMirrorsApplyConfiguration) *ImageDigestMirrorSetSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithImageDigestMirrors") - } - b.ImageDigestMirrors = append(b.ImageDigestMirrors, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagelabel.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagelabel.go deleted file mode 100644 index 6f970d19c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagelabel.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImageLabelApplyConfiguration represents a declarative configuration of the ImageLabel type for use -// with apply. -type ImageLabelApplyConfiguration struct { - // name defines the name of the label. It must have non-zero length. - Name *string `json:"name,omitempty"` - // value defines the literal value of the label. - Value *string `json:"value,omitempty"` -} - -// ImageLabelApplyConfiguration constructs a declarative configuration of the ImageLabel type for use with -// apply. -func ImageLabel() *ImageLabelApplyConfiguration { - return &ImageLabelApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImageLabelApplyConfiguration) WithName(value string) *ImageLabelApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *ImageLabelApplyConfiguration) WithValue(value string) *ImageLabelApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicy.go deleted file mode 100644 index 87162e7b3..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicy.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImagePolicyApplyConfiguration represents a declarative configuration of the ImagePolicy type for use -// with apply. -// -// # ImagePolicy holds namespace-wide configuration for image signature verification -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ImagePolicyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ImagePolicySpecApplyConfiguration `json:"spec,omitempty"` - // status contains the observed state of the resource. - Status *ImagePolicyStatusApplyConfiguration `json:"status,omitempty"` -} - -// ImagePolicy constructs a declarative configuration of the ImagePolicy type for use with -// apply. -func ImagePolicy(name, namespace string) *ImagePolicyApplyConfiguration { - b := &ImagePolicyApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("ImagePolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractImagePolicyFrom extracts the applied configuration owned by fieldManager from -// imagePolicy for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// imagePolicy must be a unmodified ImagePolicy API object that was retrieved from the Kubernetes API. -// ExtractImagePolicyFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImagePolicyFrom(imagePolicy *configv1.ImagePolicy, fieldManager string, subresource string) (*ImagePolicyApplyConfiguration, error) { - b := &ImagePolicyApplyConfiguration{} - err := managedfields.ExtractInto(imagePolicy, internal.Parser().Type("com.github.openshift.api.config.v1.ImagePolicy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(imagePolicy.Name) - b.WithNamespace(imagePolicy.Namespace) - - b.WithKind("ImagePolicy") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractImagePolicy extracts the applied configuration owned by fieldManager from -// imagePolicy. If no managedFields are found in imagePolicy for fieldManager, a -// ImagePolicyApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// imagePolicy must be a unmodified ImagePolicy API object that was retrieved from the Kubernetes API. -// ExtractImagePolicy provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImagePolicy(imagePolicy *configv1.ImagePolicy, fieldManager string) (*ImagePolicyApplyConfiguration, error) { - return ExtractImagePolicyFrom(imagePolicy, fieldManager, "") -} - -// ExtractImagePolicyStatus extracts the applied configuration owned by fieldManager from -// imagePolicy for the status subresource. -func ExtractImagePolicyStatus(imagePolicy *configv1.ImagePolicy, fieldManager string) (*ImagePolicyApplyConfiguration, error) { - return ExtractImagePolicyFrom(imagePolicy, fieldManager, "status") -} - -func (b ImagePolicyApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithKind(value string) *ImagePolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithAPIVersion(value string) *ImagePolicyApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithName(value string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithGenerateName(value string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithNamespace(value string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithUID(value types.UID) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithResourceVersion(value string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithGeneration(value int64) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ImagePolicyApplyConfiguration) WithLabels(entries map[string]string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ImagePolicyApplyConfiguration) WithAnnotations(entries map[string]string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImagePolicyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ImagePolicyApplyConfiguration) WithFinalizers(values ...string) *ImagePolicyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ImagePolicyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithSpec(value *ImagePolicySpecApplyConfiguration) *ImagePolicyApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ImagePolicyApplyConfiguration) WithStatus(value *ImagePolicyStatusApplyConfiguration) *ImagePolicyApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ImagePolicyApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ImagePolicyApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ImagePolicyApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ImagePolicyApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyfulciocawithrekorrootoftrust.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyfulciocawithrekorrootoftrust.go deleted file mode 100644 index 6baec09e7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyfulciocawithrekorrootoftrust.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration represents a declarative configuration of the ImagePolicyFulcioCAWithRekorRootOfTrust type for use -// with apply. -// -// ImagePolicyFulcioCAWithRekorRootOfTrust defines the root of trust based on the Fulcio certificate and the Rekor public key. -type ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration struct { - // fulcioCAData is a required field contains inline base64-encoded data for the PEM format fulcio CA. - // fulcioCAData must be at most 8192 characters. - FulcioCAData []byte `json:"fulcioCAData,omitempty"` - // rekorKeyData is a required field contains inline base64-encoded data for the PEM format from the Rekor public key. - // rekorKeyData must be at most 8192 characters. - RekorKeyData []byte `json:"rekorKeyData,omitempty"` - // fulcioSubject is a required field specifies OIDC issuer and the email of the Fulcio authentication configuration. - FulcioSubject *PolicyFulcioSubjectApplyConfiguration `json:"fulcioSubject,omitempty"` -} - -// ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration constructs a declarative configuration of the ImagePolicyFulcioCAWithRekorRootOfTrust type for use with -// apply. -func ImagePolicyFulcioCAWithRekorRootOfTrust() *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration { - return &ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration{} -} - -// WithFulcioCAData adds the given value to the FulcioCAData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the FulcioCAData field. -func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithFulcioCAData(values ...byte) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration { - for i := range values { - b.FulcioCAData = append(b.FulcioCAData, values[i]) - } - return b -} - -// WithRekorKeyData adds the given value to the RekorKeyData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RekorKeyData field. -func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithRekorKeyData(values ...byte) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration { - for i := range values { - b.RekorKeyData = append(b.RekorKeyData, values[i]) - } - return b -} - -// WithFulcioSubject sets the FulcioSubject field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FulcioSubject field is set to the value of the last call. -func (b *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) WithFulcioSubject(value *PolicyFulcioSubjectApplyConfiguration) *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration { - b.FulcioSubject = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypkirootoftrust.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypkirootoftrust.go deleted file mode 100644 index 71b17fd0a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypkirootoftrust.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImagePolicyPKIRootOfTrustApplyConfiguration represents a declarative configuration of the ImagePolicyPKIRootOfTrust type for use -// with apply. -// -// ImagePolicyPKIRootOfTrust defines the root of trust based on Root CA(s) and corresponding intermediate certificates. -type ImagePolicyPKIRootOfTrustApplyConfiguration struct { - // caRootsData contains base64-encoded data of a certificate bundle PEM file, which contains one or more CA roots in the PEM format. The total length of the data must not exceed 8192 characters. - CertificateAuthorityRootsData []byte `json:"caRootsData,omitempty"` - // caIntermediatesData contains base64-encoded data of a certificate bundle PEM file, which contains one or more intermediate certificates in the PEM format. The total length of the data must not exceed 8192 characters. - // caIntermediatesData requires caRootsData to be set. - CertificateAuthorityIntermediatesData []byte `json:"caIntermediatesData,omitempty"` - // pkiCertificateSubject defines the requirements imposed on the subject to which the certificate was issued. - PKICertificateSubject *PKICertificateSubjectApplyConfiguration `json:"pkiCertificateSubject,omitempty"` -} - -// ImagePolicyPKIRootOfTrustApplyConfiguration constructs a declarative configuration of the ImagePolicyPKIRootOfTrust type for use with -// apply. -func ImagePolicyPKIRootOfTrust() *ImagePolicyPKIRootOfTrustApplyConfiguration { - return &ImagePolicyPKIRootOfTrustApplyConfiguration{} -} - -// WithCertificateAuthorityRootsData adds the given value to the CertificateAuthorityRootsData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CertificateAuthorityRootsData field. -func (b *ImagePolicyPKIRootOfTrustApplyConfiguration) WithCertificateAuthorityRootsData(values ...byte) *ImagePolicyPKIRootOfTrustApplyConfiguration { - for i := range values { - b.CertificateAuthorityRootsData = append(b.CertificateAuthorityRootsData, values[i]) - } - return b -} - -// WithCertificateAuthorityIntermediatesData adds the given value to the CertificateAuthorityIntermediatesData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CertificateAuthorityIntermediatesData field. -func (b *ImagePolicyPKIRootOfTrustApplyConfiguration) WithCertificateAuthorityIntermediatesData(values ...byte) *ImagePolicyPKIRootOfTrustApplyConfiguration { - for i := range values { - b.CertificateAuthorityIntermediatesData = append(b.CertificateAuthorityIntermediatesData, values[i]) - } - return b -} - -// WithPKICertificateSubject sets the PKICertificateSubject field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PKICertificateSubject field is set to the value of the last call. -func (b *ImagePolicyPKIRootOfTrustApplyConfiguration) WithPKICertificateSubject(value *PKICertificateSubjectApplyConfiguration) *ImagePolicyPKIRootOfTrustApplyConfiguration { - b.PKICertificateSubject = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypublickeyrootoftrust.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypublickeyrootoftrust.go deleted file mode 100644 index d7fa7f790..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicypublickeyrootoftrust.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImagePolicyPublicKeyRootOfTrustApplyConfiguration represents a declarative configuration of the ImagePolicyPublicKeyRootOfTrust type for use -// with apply. -// -// ImagePolicyPublicKeyRootOfTrust defines the root of trust based on a sigstore public key. -type ImagePolicyPublicKeyRootOfTrustApplyConfiguration struct { - // keyData is a required field contains inline base64-encoded data for the PEM format public key. - // keyData must be at most 8192 characters. - KeyData []byte `json:"keyData,omitempty"` - // rekorKeyData is an optional field contains inline base64-encoded data for the PEM format from the Rekor public key. - // rekorKeyData must be at most 8192 characters. - RekorKeyData []byte `json:"rekorKeyData,omitempty"` -} - -// ImagePolicyPublicKeyRootOfTrustApplyConfiguration constructs a declarative configuration of the ImagePolicyPublicKeyRootOfTrust type for use with -// apply. -func ImagePolicyPublicKeyRootOfTrust() *ImagePolicyPublicKeyRootOfTrustApplyConfiguration { - return &ImagePolicyPublicKeyRootOfTrustApplyConfiguration{} -} - -// WithKeyData adds the given value to the KeyData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the KeyData field. -func (b *ImagePolicyPublicKeyRootOfTrustApplyConfiguration) WithKeyData(values ...byte) *ImagePolicyPublicKeyRootOfTrustApplyConfiguration { - for i := range values { - b.KeyData = append(b.KeyData, values[i]) - } - return b -} - -// WithRekorKeyData adds the given value to the RekorKeyData field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RekorKeyData field. -func (b *ImagePolicyPublicKeyRootOfTrustApplyConfiguration) WithRekorKeyData(values ...byte) *ImagePolicyPublicKeyRootOfTrustApplyConfiguration { - for i := range values { - b.RekorKeyData = append(b.RekorKeyData, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyspec.go deleted file mode 100644 index 64f972bd6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicyspec.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ImagePolicySpecApplyConfiguration represents a declarative configuration of the ImagePolicySpec type for use -// with apply. -// -// ImagePolicySpec is the specification of the ImagePolicy CRD. -type ImagePolicySpecApplyConfiguration struct { - // scopes is a required field that defines the list of image identities assigned to a policy. Each item refers to a scope in a registry implementing the "Docker Registry HTTP API V2". - // Scopes matching individual images are named Docker references in the fully expanded form, either using a tag or digest. For example, docker.io/library/busybox:latest (not busybox:latest). - // More general scopes are prefixes of individual-image scopes, and specify a repository (by omitting the tag or digest), a repository - // namespace, or a registry host (by only specifying the host name and possibly a port number) or a wildcard expression starting with `*.`, for matching all subdomains (not including a port number). - // Wildcards are only supported for subdomain matching, and may not be used in the middle of the host, i.e. *.example.com is a valid case, but example*.*.com is not. - // This support no more than 256 scopes in one object. If multiple scopes match a given image, only the policy requirements for the most specific scope apply. The policy requirements for more general scopes are ignored. - // In addition to setting a policy appropriate for your own deployed applications, make sure that a policy on the OpenShift image repositories - // quay.io/openshift-release-dev/ocp-release, quay.io/openshift-release-dev/ocp-v4.0-art-dev (or on a more general scope) allows deployment of the OpenShift images required for cluster operation. - // If a scope is configured in both the ClusterImagePolicy and the ImagePolicy, or if the scope in ImagePolicy is nested under one of the scopes from the ClusterImagePolicy, only the policy from the ClusterImagePolicy will be applied. - // For additional details about the format, please refer to the document explaining the docker transport field, - // which can be found at: https://github.com/containers/image/blob/main/docs/containers-policy.json.5.md#docker - Scopes []configv1.ImageScope `json:"scopes,omitempty"` - // policy is a required field that contains configuration to allow scopes to be verified, and defines how - // images not matching the verification policy will be treated. - Policy *ImageSigstoreVerificationPolicyApplyConfiguration `json:"policy,omitempty"` -} - -// ImagePolicySpecApplyConfiguration constructs a declarative configuration of the ImagePolicySpec type for use with -// apply. -func ImagePolicySpec() *ImagePolicySpecApplyConfiguration { - return &ImagePolicySpecApplyConfiguration{} -} - -// WithScopes adds the given value to the Scopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *ImagePolicySpecApplyConfiguration) WithScopes(values ...configv1.ImageScope) *ImagePolicySpecApplyConfiguration { - for i := range values { - b.Scopes = append(b.Scopes, values[i]) - } - return b -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *ImagePolicySpecApplyConfiguration) WithPolicy(value *ImageSigstoreVerificationPolicyApplyConfiguration) *ImagePolicySpecApplyConfiguration { - b.Policy = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicystatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicystatus.go deleted file mode 100644 index 560eccb34..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagepolicystatus.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImagePolicyStatusApplyConfiguration represents a declarative configuration of the ImagePolicyStatus type for use -// with apply. -type ImagePolicyStatusApplyConfiguration struct { - // conditions provide details on the status of this API Resource. - // condition type 'Pending' indicates that the customer resource contains a policy that cannot take effect. It is either overwritten by a global policy or the image scope is not valid. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// ImagePolicyStatusApplyConfiguration constructs a declarative configuration of the ImagePolicyStatus type for use with -// apply. -func ImagePolicyStatus() *ImagePolicyStatusApplyConfiguration { - return &ImagePolicyStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ImagePolicyStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *ImagePolicyStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagesigstoreverificationpolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagesigstoreverificationpolicy.go deleted file mode 100644 index c4fd11c68..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagesigstoreverificationpolicy.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImageSigstoreVerificationPolicyApplyConfiguration represents a declarative configuration of the ImageSigstoreVerificationPolicy type for use -// with apply. -// -// ImageSigstoreVerificationPolicy defines the verification policy for the items in the scopes list. -type ImageSigstoreVerificationPolicyApplyConfiguration struct { - // rootOfTrust is a required field that defines the root of trust for verifying image signatures during retrieval. - // This allows image consumers to specify policyType and corresponding configuration of the policy, matching how the policy was generated. - RootOfTrust *PolicyRootOfTrustApplyConfiguration `json:"rootOfTrust,omitempty"` - // signedIdentity is an optional field specifies what image identity the signature claims about the image. This is useful when the image identity in the signature differs from the original image spec, such as when mirror registry is configured for the image scope, the signature from the mirror registry contains the image identity of the mirror instead of the original scope. - // The required matchPolicy field specifies the approach used in the verification process to verify the identity in the signature and the actual image identity, the default matchPolicy is "MatchRepoDigestOrExact". - SignedIdentity *PolicyIdentityApplyConfiguration `json:"signedIdentity,omitempty"` -} - -// ImageSigstoreVerificationPolicyApplyConfiguration constructs a declarative configuration of the ImageSigstoreVerificationPolicy type for use with -// apply. -func ImageSigstoreVerificationPolicy() *ImageSigstoreVerificationPolicyApplyConfiguration { - return &ImageSigstoreVerificationPolicyApplyConfiguration{} -} - -// WithRootOfTrust sets the RootOfTrust field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RootOfTrust field is set to the value of the last call. -func (b *ImageSigstoreVerificationPolicyApplyConfiguration) WithRootOfTrust(value *PolicyRootOfTrustApplyConfiguration) *ImageSigstoreVerificationPolicyApplyConfiguration { - b.RootOfTrust = value - return b -} - -// WithSignedIdentity sets the SignedIdentity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SignedIdentity field is set to the value of the last call. -func (b *ImageSigstoreVerificationPolicyApplyConfiguration) WithSignedIdentity(value *PolicyIdentityApplyConfiguration) *ImageSigstoreVerificationPolicyApplyConfiguration { - b.SignedIdentity = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagespec.go deleted file mode 100644 index 401fa0f85..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagespec.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ImageSpecApplyConfiguration represents a declarative configuration of the ImageSpec type for use -// with apply. -type ImageSpecApplyConfiguration struct { - // 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. - AllowedRegistriesForImport []RegistryLocationApplyConfiguration `json:"allowedRegistriesForImport,omitempty"` - // 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. - ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` - // additionalTrustedCA is a reference to a ConfigMap containing additional CAs that - // should be trusted during imagestream import, pod image pull, build image pull, and - // imageregistry pullthrough. - // The namespace for this config map is openshift-config. - AdditionalTrustedCA *ConfigMapNameReferenceApplyConfiguration `json:"additionalTrustedCA,omitempty"` - // registrySources contains configuration that determines how the container runtime - // should treat individual registries when accessing images for builds+pods. (e.g. - // whether or not to allow insecure access). It does not contain configuration for the - // internal cluster registry. - RegistrySources *RegistrySourcesApplyConfiguration `json:"registrySources,omitempty"` - // imageStreamImportMode controls the import mode behaviour of imagestreams. - // It can be set to `Legacy` or `PreserveOriginal` or the empty string. If this value - // is specified, this setting is applied to all newly created imagestreams which do not have the - // value set. `Legacy` indicates that the legacy behaviour should be used. - // For manifest lists, the legacy behaviour will discard the manifest list and import a single - // sub-manifest. In this case, the platform is chosen in the following order of priority: - // 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. - // `PreserveOriginal` indicates that the original manifest will be preserved. For manifest lists, - // the manifest list and all its sub-manifests will be imported. When empty, the behaviour will be - // decided based on the payload type advertised by the ClusterVersion status, i.e single arch payload - // implies the import mode is Legacy and multi payload implies PreserveOriginal. - ImageStreamImportMode *configv1.ImportModeType `json:"imageStreamImportMode,omitempty"` -} - -// ImageSpecApplyConfiguration constructs a declarative configuration of the ImageSpec type for use with -// apply. -func ImageSpec() *ImageSpecApplyConfiguration { - return &ImageSpecApplyConfiguration{} -} - -// WithAllowedRegistriesForImport adds the given value to the AllowedRegistriesForImport field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllowedRegistriesForImport field. -func (b *ImageSpecApplyConfiguration) WithAllowedRegistriesForImport(values ...*RegistryLocationApplyConfiguration) *ImageSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAllowedRegistriesForImport") - } - b.AllowedRegistriesForImport = append(b.AllowedRegistriesForImport, *values[i]) - } - return b -} - -// WithExternalRegistryHostnames adds the given value to the ExternalRegistryHostnames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExternalRegistryHostnames field. -func (b *ImageSpecApplyConfiguration) WithExternalRegistryHostnames(values ...string) *ImageSpecApplyConfiguration { - for i := range values { - b.ExternalRegistryHostnames = append(b.ExternalRegistryHostnames, values[i]) - } - return b -} - -// WithAdditionalTrustedCA sets the AdditionalTrustedCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalTrustedCA field is set to the value of the last call. -func (b *ImageSpecApplyConfiguration) WithAdditionalTrustedCA(value *ConfigMapNameReferenceApplyConfiguration) *ImageSpecApplyConfiguration { - b.AdditionalTrustedCA = value - return b -} - -// WithRegistrySources sets the RegistrySources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RegistrySources field is set to the value of the last call. -func (b *ImageSpecApplyConfiguration) WithRegistrySources(value *RegistrySourcesApplyConfiguration) *ImageSpecApplyConfiguration { - b.RegistrySources = value - return b -} - -// WithImageStreamImportMode sets the ImageStreamImportMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ImageStreamImportMode field is set to the value of the last call. -func (b *ImageSpecApplyConfiguration) WithImageStreamImportMode(value configv1.ImportModeType) *ImageSpecApplyConfiguration { - b.ImageStreamImportMode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagestatus.go deleted file mode 100644 index df2a4d53e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagestatus.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ImageStatusApplyConfiguration represents a declarative configuration of the ImageStatus type for use -// with apply. -type ImageStatusApplyConfiguration struct { - // internalRegistryHostname sets the hostname for the default internal image - // registry. The value must be in "hostname[:port]" format. - // This value is set by the image registry operator which controls the internal registry - // hostname. - InternalRegistryHostname *string `json:"internalRegistryHostname,omitempty"` - // 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. - ExternalRegistryHostnames []string `json:"externalRegistryHostnames,omitempty"` - // imageStreamImportMode controls the import mode behaviour of imagestreams. It can be - // `Legacy` or `PreserveOriginal`. `Legacy` indicates that the legacy behaviour should be used. - // For manifest lists, the legacy behaviour will discard the manifest list and import a single - // sub-manifest. In this case, the platform is chosen in the following order of priority: - // 1. tag annotations; 2. control plane arch/os; 3. linux/amd64; 4. the first manifest in the list. - // `PreserveOriginal` indicates that the original manifest will be preserved. For manifest lists, - // the manifest list and all its sub-manifests will be imported. This value will be reconciled based - // on either the spec value or if no spec value is specified, the image registry operator would look - // at the ClusterVersion status to determine the payload type and set the import mode accordingly, - // i.e single arch payload implies the import mode is Legacy and multi payload implies PreserveOriginal. - ImageStreamImportMode *configv1.ImportModeType `json:"imageStreamImportMode,omitempty"` -} - -// ImageStatusApplyConfiguration constructs a declarative configuration of the ImageStatus type for use with -// apply. -func ImageStatus() *ImageStatusApplyConfiguration { - return &ImageStatusApplyConfiguration{} -} - -// WithInternalRegistryHostname sets the InternalRegistryHostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalRegistryHostname field is set to the value of the last call. -func (b *ImageStatusApplyConfiguration) WithInternalRegistryHostname(value string) *ImageStatusApplyConfiguration { - b.InternalRegistryHostname = &value - return b -} - -// WithExternalRegistryHostnames adds the given value to the ExternalRegistryHostnames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExternalRegistryHostnames field. -func (b *ImageStatusApplyConfiguration) WithExternalRegistryHostnames(values ...string) *ImageStatusApplyConfiguration { - for i := range values { - b.ExternalRegistryHostnames = append(b.ExternalRegistryHostnames, values[i]) - } - return b -} - -// WithImageStreamImportMode sets the ImageStreamImportMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ImageStreamImportMode field is set to the value of the last call. -func (b *ImageStatusApplyConfiguration) WithImageStreamImportMode(value configv1.ImportModeType) *ImageStatusApplyConfiguration { - b.ImageStreamImportMode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrors.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrors.go deleted file mode 100644 index 3ee7f2592..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrors.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ImageTagMirrorsApplyConfiguration represents a declarative configuration of the ImageTagMirrors type for use -// with apply. -// -// ImageTagMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type ImageTagMirrorsApplyConfiguration struct { - // source matches the repository that users refer to, e.g. in image pull specifications. Setting source to a registry hostname - // e.g. docker.io. quay.io, or registry.redhat.io, will match the image pull specification of corressponding registry. - // "source" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // [*.]host - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - Source *string `json:"source,omitempty"` - // mirrors is zero or more locations that may also contain the same images. No mirror will be configured if not specified. - // Images can be pulled from these mirrors only if they are referenced by their tags. - // The mirrored location is obtained by replacing the part of the input reference that - // matches source by the mirrors entry, e.g. for registry.redhat.io/product/repo reference, - // a (source, mirror) pair *.redhat.io, mirror.local/redhat causes a mirror.local/redhat/product/repo - // repository to be used. - // Pulling images by tag can potentially yield different images, depending on which endpoint we pull from. - // Configuring a list of mirrors using "ImageDigestMirrorSet" CRD and forcing digest-pulls for mirrors avoids that issue. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. - // If no mirror is specified or all image pulls from the mirror list fail, the image will continue to be - // pulled from the repository in the pull spec unless explicitly prohibited by "mirrorSourcePolicy". - // Other cluster configuration, including (but not limited to) other imageTagMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - // "mirrors" uses one of the following formats: - // host[:port] - // host[:port]/namespace[/namespace…] - // host[:port]/namespace[/namespace…]/repo - // for more information about the format, see the document about the location field: - // https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md#choosing-a-registry-toml-table - Mirrors []configv1.ImageMirror `json:"mirrors,omitempty"` - // mirrorSourcePolicy defines the fallback policy if fails to pull image from the mirrors. - // If unset, the image will continue to be pulled from the repository in the pull spec. - // sourcePolicy is valid configuration only when one or more mirrors are in the mirror list. - MirrorSourcePolicy *configv1.MirrorSourcePolicy `json:"mirrorSourcePolicy,omitempty"` -} - -// ImageTagMirrorsApplyConfiguration constructs a declarative configuration of the ImageTagMirrors type for use with -// apply. -func ImageTagMirrors() *ImageTagMirrorsApplyConfiguration { - return &ImageTagMirrorsApplyConfiguration{} -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *ImageTagMirrorsApplyConfiguration) WithSource(value string) *ImageTagMirrorsApplyConfiguration { - b.Source = &value - return b -} - -// WithMirrors adds the given value to the Mirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *ImageTagMirrorsApplyConfiguration) WithMirrors(values ...configv1.ImageMirror) *ImageTagMirrorsApplyConfiguration { - for i := range values { - b.Mirrors = append(b.Mirrors, values[i]) - } - return b -} - -// WithMirrorSourcePolicy sets the MirrorSourcePolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MirrorSourcePolicy field is set to the value of the last call. -func (b *ImageTagMirrorsApplyConfiguration) WithMirrorSourcePolicy(value configv1.MirrorSourcePolicy) *ImageTagMirrorsApplyConfiguration { - b.MirrorSourcePolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorset.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorset.go deleted file mode 100644 index 6c7a72b06..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorset.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ImageTagMirrorSetApplyConfiguration represents a declarative configuration of the ImageTagMirrorSet type for use -// with apply. -// -// ImageTagMirrorSet holds cluster-wide information about how to handle registry mirror rules on using tag pull specification. -// When multiple policies are defined, the outcome of the behavior is defined on each field. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ImageTagMirrorSetApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ImageTagMirrorSetSpecApplyConfiguration `json:"spec,omitempty"` - // status contains the observed state of the resource. - Status *configv1.ImageTagMirrorSetStatus `json:"status,omitempty"` -} - -// ImageTagMirrorSet constructs a declarative configuration of the ImageTagMirrorSet type for use with -// apply. -func ImageTagMirrorSet(name string) *ImageTagMirrorSetApplyConfiguration { - b := &ImageTagMirrorSetApplyConfiguration{} - b.WithName(name) - b.WithKind("ImageTagMirrorSet") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractImageTagMirrorSetFrom extracts the applied configuration owned by fieldManager from -// imageTagMirrorSet for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// imageTagMirrorSet must be a unmodified ImageTagMirrorSet API object that was retrieved from the Kubernetes API. -// ExtractImageTagMirrorSetFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageTagMirrorSetFrom(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string, subresource string) (*ImageTagMirrorSetApplyConfiguration, error) { - b := &ImageTagMirrorSetApplyConfiguration{} - err := managedfields.ExtractInto(imageTagMirrorSet, internal.Parser().Type("com.github.openshift.api.config.v1.ImageTagMirrorSet"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(imageTagMirrorSet.Name) - - b.WithKind("ImageTagMirrorSet") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractImageTagMirrorSet extracts the applied configuration owned by fieldManager from -// imageTagMirrorSet. If no managedFields are found in imageTagMirrorSet for fieldManager, a -// ImageTagMirrorSetApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// imageTagMirrorSet must be a unmodified ImageTagMirrorSet API object that was retrieved from the Kubernetes API. -// ExtractImageTagMirrorSet provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractImageTagMirrorSet(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { - return ExtractImageTagMirrorSetFrom(imageTagMirrorSet, fieldManager, "") -} - -// ExtractImageTagMirrorSetStatus extracts the applied configuration owned by fieldManager from -// imageTagMirrorSet for the status subresource. -func ExtractImageTagMirrorSetStatus(imageTagMirrorSet *configv1.ImageTagMirrorSet, fieldManager string) (*ImageTagMirrorSetApplyConfiguration, error) { - return ExtractImageTagMirrorSetFrom(imageTagMirrorSet, fieldManager, "status") -} - -func (b ImageTagMirrorSetApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithKind(value string) *ImageTagMirrorSetApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithAPIVersion(value string) *ImageTagMirrorSetApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithName(value string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithGenerateName(value string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithNamespace(value string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithUID(value types.UID) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithResourceVersion(value string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithGeneration(value int64) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ImageTagMirrorSetApplyConfiguration) WithLabels(entries map[string]string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ImageTagMirrorSetApplyConfiguration) WithAnnotations(entries map[string]string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ImageTagMirrorSetApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ImageTagMirrorSetApplyConfiguration) WithFinalizers(values ...string) *ImageTagMirrorSetApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ImageTagMirrorSetApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithSpec(value *ImageTagMirrorSetSpecApplyConfiguration) *ImageTagMirrorSetApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ImageTagMirrorSetApplyConfiguration) WithStatus(value configv1.ImageTagMirrorSetStatus) *ImageTagMirrorSetApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ImageTagMirrorSetApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ImageTagMirrorSetApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ImageTagMirrorSetApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ImageTagMirrorSetApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorsetspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorsetspec.go deleted file mode 100644 index 0642d9ede..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/imagetagmirrorsetspec.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ImageTagMirrorSetSpecApplyConfiguration represents a declarative configuration of the ImageTagMirrorSetSpec type for use -// with apply. -// -// ImageTagMirrorSetSpec is the specification of the ImageTagMirrorSet CRD. -type ImageTagMirrorSetSpecApplyConfiguration struct { - // imageTagMirrors allows images referenced by image tags in pods to be - // pulled from alternative mirrored repository locations. The image pull specification - // provided to the pod will be compared to the source locations described in imageTagMirrors - // and the image may be pulled down from any of the mirrors in the list instead of the - // specified repository allowing administrators to choose a potentially faster mirror. - // To use mirrors to pull images using digest specification only, users should configure - // a list of mirrors using "ImageDigestMirrorSet" CRD. - // - // If the image pull specification matches the repository of "source" in multiple imagetagmirrorset objects, - // only the objects which define the most specific namespace match will be used. - // For example, if there are objects using quay.io/libpod and quay.io/libpod/busybox as - // the "source", only the objects using quay.io/libpod/busybox are going to apply - // for pull specification quay.io/libpod/busybox. - // Each “source” repository is treated independently; configurations for different “source” - // repositories don’t interact. - // - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. - // - // When multiple policies are defined for the same “source” repository, the sets of defined - // mirrors will be merged together, preserving the relative order of the mirrors, if possible. - // For example, if policy A has mirrors `a, b, c` and policy B has mirrors `c, d, e`, the - // mirrors will be used in the order `a, b, c, d, e`. If the orders of mirror entries conflict - // (e.g. `a, b` vs. `b, a`) the configuration is not rejected but the resulting order is unspecified. - // Users who want to use a deterministic order of mirrors, should configure them into one list of mirrors using the expected order. - ImageTagMirrors []ImageTagMirrorsApplyConfiguration `json:"imageTagMirrors,omitempty"` -} - -// ImageTagMirrorSetSpecApplyConfiguration constructs a declarative configuration of the ImageTagMirrorSetSpec type for use with -// apply. -func ImageTagMirrorSetSpec() *ImageTagMirrorSetSpecApplyConfiguration { - return &ImageTagMirrorSetSpecApplyConfiguration{} -} - -// WithImageTagMirrors adds the given value to the ImageTagMirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ImageTagMirrors field. -func (b *ImageTagMirrorSetSpecApplyConfiguration) WithImageTagMirrors(values ...*ImageTagMirrorsApplyConfiguration) *ImageTagMirrorSetSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithImageTagMirrors") - } - b.ImageTagMirrors = append(b.ImageTagMirrors, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructure.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructure.go deleted file mode 100644 index 98e5a1b16..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructure.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// InfrastructureApplyConfiguration represents a declarative configuration of the Infrastructure type for use -// with apply. -// -// Infrastructure holds cluster-wide information about Infrastructure. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type InfrastructureApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *InfrastructureSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *InfrastructureStatusApplyConfiguration `json:"status,omitempty"` -} - -// Infrastructure constructs a declarative configuration of the Infrastructure type for use with -// apply. -func Infrastructure(name string) *InfrastructureApplyConfiguration { - b := &InfrastructureApplyConfiguration{} - b.WithName(name) - b.WithKind("Infrastructure") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractInfrastructureFrom extracts the applied configuration owned by fieldManager from -// infrastructure for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// infrastructure must be a unmodified Infrastructure API object that was retrieved from the Kubernetes API. -// ExtractInfrastructureFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInfrastructureFrom(infrastructure *configv1.Infrastructure, fieldManager string, subresource string) (*InfrastructureApplyConfiguration, error) { - b := &InfrastructureApplyConfiguration{} - err := managedfields.ExtractInto(infrastructure, internal.Parser().Type("com.github.openshift.api.config.v1.Infrastructure"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(infrastructure.Name) - - b.WithKind("Infrastructure") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractInfrastructure extracts the applied configuration owned by fieldManager from -// infrastructure. If no managedFields are found in infrastructure for fieldManager, a -// InfrastructureApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// infrastructure must be a unmodified Infrastructure API object that was retrieved from the Kubernetes API. -// ExtractInfrastructure provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInfrastructure(infrastructure *configv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { - return ExtractInfrastructureFrom(infrastructure, fieldManager, "") -} - -// ExtractInfrastructureStatus extracts the applied configuration owned by fieldManager from -// infrastructure for the status subresource. -func ExtractInfrastructureStatus(infrastructure *configv1.Infrastructure, fieldManager string) (*InfrastructureApplyConfiguration, error) { - return ExtractInfrastructureFrom(infrastructure, fieldManager, "status") -} - -func (b InfrastructureApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithKind(value string) *InfrastructureApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithAPIVersion(value string) *InfrastructureApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithName(value string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithGenerateName(value string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithNamespace(value string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithUID(value types.UID) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithResourceVersion(value string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithGeneration(value int64) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *InfrastructureApplyConfiguration) WithLabels(entries map[string]string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *InfrastructureApplyConfiguration) WithAnnotations(entries map[string]string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InfrastructureApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *InfrastructureApplyConfiguration) WithFinalizers(values ...string) *InfrastructureApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *InfrastructureApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithSpec(value *InfrastructureSpecApplyConfiguration) *InfrastructureApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *InfrastructureApplyConfiguration) WithStatus(value *InfrastructureStatusApplyConfiguration) *InfrastructureApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *InfrastructureApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *InfrastructureApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *InfrastructureApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *InfrastructureApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurespec.go deleted file mode 100644 index 135e8568d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurespec.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// InfrastructureSpecApplyConfiguration represents a declarative configuration of the InfrastructureSpec type for use -// with apply. -// -// InfrastructureSpec contains settings that apply to the cluster infrastructure. -type InfrastructureSpecApplyConfiguration struct { - // cloudConfig is a reference to a ConfigMap containing the cloud provider configuration file. - // This configuration file is used to configure the Kubernetes cloud provider integration - // when using the built-in cloud provider integration or the external cloud controller manager. - // The namespace for this config map is openshift-config. - // - // cloudConfig should only be consumed by the kube_cloud_config controller. - // The controller is responsible for using the user configuration in the spec - // for various platforms and combining that with the user provided ConfigMap in this field - // to create a stitched kube cloud config. - // The controller generates a ConfigMap `kube-cloud-config` in `openshift-config-managed` namespace - // with the kube cloud config is stored in `cloud.conf` key. - // All the clients are expected to use the generated ConfigMap only. - CloudConfig *ConfigMapFileReferenceApplyConfiguration `json:"cloudConfig,omitempty"` - // platformSpec holds desired information specific to the underlying - // infrastructure provider. - PlatformSpec *PlatformSpecApplyConfiguration `json:"platformSpec,omitempty"` - // controlPlaneTopology expresses the desired topology configuration for control nodes. - // - // When status.controlPlaneTopology is 'SingleReplica' and spec.controlPlaneTopology is set to 'HighlyAvailable', - // a transition will be triggered to reconfigure the cluster from SingleReplica to HighlyAvailable. - // - // When left blank or status.controlPlaneTopology and spec.controlPlaneTopology are the same value, - // no changes are required and no transitions will be triggered. - // - // This value may be set to match status.controlPlaneTopology regardless of the current value. - ControlPlaneTopology *configv1.TopologyMode `json:"controlPlaneTopology,omitempty"` -} - -// InfrastructureSpecApplyConfiguration constructs a declarative configuration of the InfrastructureSpec type for use with -// apply. -func InfrastructureSpec() *InfrastructureSpecApplyConfiguration { - return &InfrastructureSpecApplyConfiguration{} -} - -// WithCloudConfig sets the CloudConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudConfig field is set to the value of the last call. -func (b *InfrastructureSpecApplyConfiguration) WithCloudConfig(value *ConfigMapFileReferenceApplyConfiguration) *InfrastructureSpecApplyConfiguration { - b.CloudConfig = value - return b -} - -// WithPlatformSpec sets the PlatformSpec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PlatformSpec field is set to the value of the last call. -func (b *InfrastructureSpecApplyConfiguration) WithPlatformSpec(value *PlatformSpecApplyConfiguration) *InfrastructureSpecApplyConfiguration { - b.PlatformSpec = value - return b -} - -// WithControlPlaneTopology sets the ControlPlaneTopology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ControlPlaneTopology field is set to the value of the last call. -func (b *InfrastructureSpecApplyConfiguration) WithControlPlaneTopology(value configv1.TopologyMode) *InfrastructureSpecApplyConfiguration { - b.ControlPlaneTopology = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurestatus.go deleted file mode 100644 index c01827c11..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/infrastructurestatus.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// InfrastructureStatusApplyConfiguration represents a declarative configuration of the InfrastructureStatus type for use -// with apply. -// -// InfrastructureStatus describes the infrastructure the cluster is leveraging. -type InfrastructureStatusApplyConfiguration struct { - // infrastructureName uniquely identifies a cluster with a human friendly name. - // Once set it should not be changed. Must be of max length 27 and must have only - // alphanumeric or hyphen characters. - InfrastructureName *string `json:"infrastructureName,omitempty"` - // platform is the underlying infrastructure provider for the cluster. - // - // Deprecated: Use platformStatus.type instead. - Platform *configv1.PlatformType `json:"platform,omitempty"` - // platformStatus holds status information specific to the underlying - // infrastructure provider. - PlatformStatus *PlatformStatusApplyConfiguration `json:"platformStatus,omitempty"` - // etcdDiscoveryDomain is the domain used to fetch the SRV records for discovering - // etcd servers and clients. - // For more info: https://github.com/etcd-io/etcd/blob/329be66e8b3f9e2e6af83c123ff89297e49ebd15/Documentation/op-guide/clustering.md#dns-discovery - // deprecated: as of 4.7, this field is no longer set or honored. It will be removed in a future release. - EtcdDiscoveryDomain *string `json:"etcdDiscoveryDomain,omitempty"` - // apiServerURL is a valid URI with scheme 'https', address and - // optionally a port (defaulting to 443). apiServerURL can be used by components like the web console - // to tell users where to find the Kubernetes API. - APIServerURL *string `json:"apiServerURL,omitempty"` - // apiServerInternalURL is a valid URI with scheme 'https', - // address and optionally a port (defaulting to 443). apiServerInternalURL can be used by components - // like kubelets, to contact the Kubernetes API server using the - // infrastructure provider rather than Kubernetes networking. - APIServerInternalURL *string `json:"apiServerInternalURI,omitempty"` - // controlPlaneTopology expresses the expectations for operands that normally run on control nodes. - // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. - // The 'SingleReplica' mode will be used in single-node deployments - // and the operators should not configure the operand for highly-available operation - // The 'External' mode indicates that the control plane is hosted externally to the cluster and that - // its components are not visible within the cluster. - // The 'HighlyAvailableArbiter' mode indicates that the control plane will consist of 2 control-plane nodes - // that run conventional services and 1 smaller sized arbiter node that runs a bare minimum of services to maintain quorum. - ControlPlaneTopology *configv1.TopologyMode `json:"controlPlaneTopology,omitempty"` - // infrastructureTopology expresses the expectations for infrastructure services that do not run on control - // plane nodes, usually indicated by a node selector for a `role` value - // other than `master`. - // The default is 'HighlyAvailable', which represents the behavior operators have in a "normal" cluster. - // The 'SingleReplica' mode will be used in single-node deployments - // and the operators should not configure the operand for highly-available operation - // NOTE: External topology mode is not applicable for this field. - InfrastructureTopology *configv1.TopologyMode `json:"infrastructureTopology,omitempty"` - // cpuPartitioning expresses if CPU partitioning is a currently enabled feature in the cluster. - // CPU Partitioning means that this cluster can support partitioning workloads to specific CPU Sets. - // Valid values are "None" and "AllNodes". When omitted, the default value is "None". - // The default value of "None" indicates that no nodes will be setup with CPU partitioning. - // The "AllNodes" value indicates that all nodes have been setup with CPU partitioning, - // and can then be further configured via the PerformanceProfile API. - CPUPartitioning *configv1.CPUPartitioningMode `json:"cpuPartitioning,omitempty"` -} - -// InfrastructureStatusApplyConfiguration constructs a declarative configuration of the InfrastructureStatus type for use with -// apply. -func InfrastructureStatus() *InfrastructureStatusApplyConfiguration { - return &InfrastructureStatusApplyConfiguration{} -} - -// WithInfrastructureName sets the InfrastructureName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InfrastructureName field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureName(value string) *InfrastructureStatusApplyConfiguration { - b.InfrastructureName = &value - return b -} - -// WithPlatform sets the Platform field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Platform field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithPlatform(value configv1.PlatformType) *InfrastructureStatusApplyConfiguration { - b.Platform = &value - return b -} - -// WithPlatformStatus sets the PlatformStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PlatformStatus field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithPlatformStatus(value *PlatformStatusApplyConfiguration) *InfrastructureStatusApplyConfiguration { - b.PlatformStatus = value - return b -} - -// WithEtcdDiscoveryDomain sets the EtcdDiscoveryDomain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EtcdDiscoveryDomain field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithEtcdDiscoveryDomain(value string) *InfrastructureStatusApplyConfiguration { - b.EtcdDiscoveryDomain = &value - return b -} - -// WithAPIServerURL sets the APIServerURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerURL field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithAPIServerURL(value string) *InfrastructureStatusApplyConfiguration { - b.APIServerURL = &value - return b -} - -// WithAPIServerInternalURL sets the APIServerInternalURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalURL field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithAPIServerInternalURL(value string) *InfrastructureStatusApplyConfiguration { - b.APIServerInternalURL = &value - return b -} - -// WithControlPlaneTopology sets the ControlPlaneTopology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ControlPlaneTopology field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithControlPlaneTopology(value configv1.TopologyMode) *InfrastructureStatusApplyConfiguration { - b.ControlPlaneTopology = &value - return b -} - -// WithInfrastructureTopology sets the InfrastructureTopology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InfrastructureTopology field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithInfrastructureTopology(value configv1.TopologyMode) *InfrastructureStatusApplyConfiguration { - b.InfrastructureTopology = &value - return b -} - -// WithCPUPartitioning sets the CPUPartitioning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CPUPartitioning field is set to the value of the last call. -func (b *InfrastructureStatusApplyConfiguration) WithCPUPartitioning(value configv1.CPUPartitioningMode) *InfrastructureStatusApplyConfiguration { - b.CPUPartitioning = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingress.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingress.go deleted file mode 100644 index af5121aa3..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingress.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// IngressApplyConfiguration represents a declarative configuration of the Ingress type for use -// with apply. -// -// Ingress holds cluster-wide information about ingress, including the default ingress domain -// used for routes. The canonical name is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type IngressApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *IngressSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *IngressStatusApplyConfiguration `json:"status,omitempty"` -} - -// Ingress constructs a declarative configuration of the Ingress type for use with -// apply. -func Ingress(name string) *IngressApplyConfiguration { - b := &IngressApplyConfiguration{} - b.WithName(name) - b.WithKind("Ingress") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractIngressFrom extracts the applied configuration owned by fieldManager from -// ingress for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. -// ExtractIngressFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractIngressFrom(ingress *configv1.Ingress, fieldManager string, subresource string) (*IngressApplyConfiguration, error) { - b := &IngressApplyConfiguration{} - err := managedfields.ExtractInto(ingress, internal.Parser().Type("com.github.openshift.api.config.v1.Ingress"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(ingress.Name) - - b.WithKind("Ingress") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractIngress extracts the applied configuration owned by fieldManager from -// ingress. If no managedFields are found in ingress for fieldManager, a -// IngressApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// ingress must be a unmodified Ingress API object that was retrieved from the Kubernetes API. -// ExtractIngress provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractIngress(ingress *configv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return ExtractIngressFrom(ingress, fieldManager, "") -} - -// ExtractIngressStatus extracts the applied configuration owned by fieldManager from -// ingress for the status subresource. -func ExtractIngressStatus(ingress *configv1.Ingress, fieldManager string) (*IngressApplyConfiguration, error) { - return ExtractIngressFrom(ingress, fieldManager, "status") -} - -func (b IngressApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithKind(value string) *IngressApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithAPIVersion(value string) *IngressApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithName(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithGenerateName(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithNamespace(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithUID(value types.UID) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithResourceVersion(value string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithGeneration(value int64) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *IngressApplyConfiguration) WithLabels(entries map[string]string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *IngressApplyConfiguration) WithAnnotations(entries map[string]string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *IngressApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *IngressApplyConfiguration) WithFinalizers(values ...string) *IngressApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *IngressApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithSpec(value *IngressSpecApplyConfiguration) *IngressApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithStatus(value *IngressStatusApplyConfiguration) *IngressApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *IngressApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *IngressApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *IngressApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *IngressApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressplatformspec.go deleted file mode 100644 index 7d42ec243..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressplatformspec.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IngressPlatformSpecApplyConfiguration represents a declarative configuration of the IngressPlatformSpec type for use -// with apply. -// -// IngressPlatformSpec holds the desired state of Ingress specific to the underlying infrastructure provider -// of the current cluster. Since these are used at spec-level for the underlying cluster, it -// is supposed that only one of the spec structs is set. -type IngressPlatformSpecApplyConfiguration struct { - // type is the underlying infrastructure provider for the cluster. - // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "KubeVirt", "EquinixMetal", "PowerVS", - // "AlibabaCloud", "Nutanix" and "None". Individual components may not support all platforms, - // and must handle unrecognized platforms as None if they do not support that platform. - Type *configv1.PlatformType `json:"type,omitempty"` - // aws contains settings specific to the Amazon Web Services infrastructure provider. - AWS *AWSIngressSpecApplyConfiguration `json:"aws,omitempty"` -} - -// IngressPlatformSpecApplyConfiguration constructs a declarative configuration of the IngressPlatformSpec type for use with -// apply. -func IngressPlatformSpec() *IngressPlatformSpecApplyConfiguration { - return &IngressPlatformSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *IngressPlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *IngressPlatformSpecApplyConfiguration { - b.Type = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *IngressPlatformSpecApplyConfiguration) WithAWS(value *AWSIngressSpecApplyConfiguration) *IngressPlatformSpecApplyConfiguration { - b.AWS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressspec.go deleted file mode 100644 index 50d825238..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressspec.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressSpecApplyConfiguration represents a declarative configuration of the IngressSpec type for use -// with apply. -type IngressSpecApplyConfiguration struct { - // 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: "..". - // - // It is also used as the default wildcard domain suffix for ingress. The - // default ingresscontroller domain will follow this pattern: "*.". - // - // Once set, changing domain is not currently supported. - Domain *string `json:"domain,omitempty"` - // appsDomain is an optional domain to use instead of the one specified - // in the domain field when a Route is created without specifying an explicit - // host. If appsDomain is nonempty, this value is used to generate default - // host values for Route. Unlike domain, appsDomain may be modified after - // installation. - // This assumes a new ingresscontroller has been setup with a wildcard - // certificate. - AppsDomain *string `json:"appsDomain,omitempty"` - // componentRoutes is an optional list of routes that are managed by OpenShift components - // that a cluster-admin is able to configure the hostname and serving certificate for. - // The namespace and name of each route in this list should match an existing entry in the - // status.componentRoutes list. - // - // To determine the set of configurable Routes, look at namespace and name of entries in the - // .status.componentRoutes list, where participating operators write the status of - // configurable routes. - // A maximum of 250 component routes may be configured. - ComponentRoutes []ComponentRouteSpecApplyConfiguration `json:"componentRoutes,omitempty"` - // requiredHSTSPolicies specifies HSTS policies that are required to be set on newly created or updated routes - // matching the domainPattern/s and namespaceSelector/s that are specified in the policy. - // Each requiredHSTSPolicy must have at least a domainPattern and a maxAge to validate a route HSTS Policy route - // annotation, and affect route admission. - // - // A candidate route is checked for HSTS Policies if it has the HSTS Policy route annotation: - // "haproxy.router.openshift.io/hsts_header" - // E.g. haproxy.router.openshift.io/hsts_header: max-age=31536000;preload;includeSubDomains - // - // - For each candidate route, if it matches a requiredHSTSPolicy domainPattern and optional namespaceSelector, - // then the maxAge, preloadPolicy, and includeSubdomainsPolicy must be valid to be admitted. Otherwise, the route - // is rejected. - // - The first match, by domainPattern and optional namespaceSelector, in the ordering of the RequiredHSTSPolicies - // determines the route's admission status. - // - If the candidate route doesn't match any requiredHSTSPolicy domainPattern and optional namespaceSelector, - // then it may use any HSTS Policy annotation. - // - // The HSTS policy configuration may be changed after routes have already been created. An update to a previously - // admitted route may then fail if the updated route does not conform to the updated HSTS policy configuration. - // However, changing the HSTS policy configuration will not cause a route that is already admitted to stop working. - // - // Note that if there are no RequiredHSTSPolicies, any HSTS Policy annotation on the route is valid. - RequiredHSTSPolicies []RequiredHSTSPolicyApplyConfiguration `json:"requiredHSTSPolicies,omitempty"` - // loadBalancer contains the load balancer details in general which are not only specific to the underlying infrastructure - // provider of the current cluster and are required for Ingress Controller to work on OpenShift. - LoadBalancer *LoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` -} - -// IngressSpecApplyConfiguration constructs a declarative configuration of the IngressSpec type for use with -// apply. -func IngressSpec() *IngressSpecApplyConfiguration { - return &IngressSpecApplyConfiguration{} -} - -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *IngressSpecApplyConfiguration) WithDomain(value string) *IngressSpecApplyConfiguration { - b.Domain = &value - return b -} - -// WithAppsDomain sets the AppsDomain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AppsDomain field is set to the value of the last call. -func (b *IngressSpecApplyConfiguration) WithAppsDomain(value string) *IngressSpecApplyConfiguration { - b.AppsDomain = &value - return b -} - -// WithComponentRoutes adds the given value to the ComponentRoutes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ComponentRoutes field. -func (b *IngressSpecApplyConfiguration) WithComponentRoutes(values ...*ComponentRouteSpecApplyConfiguration) *IngressSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithComponentRoutes") - } - b.ComponentRoutes = append(b.ComponentRoutes, *values[i]) - } - return b -} - -// WithRequiredHSTSPolicies adds the given value to the RequiredHSTSPolicies field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RequiredHSTSPolicies field. -func (b *IngressSpecApplyConfiguration) WithRequiredHSTSPolicies(values ...*RequiredHSTSPolicyApplyConfiguration) *IngressSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRequiredHSTSPolicies") - } - b.RequiredHSTSPolicies = append(b.RequiredHSTSPolicies, *values[i]) - } - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *IngressSpecApplyConfiguration) WithLoadBalancer(value *LoadBalancerApplyConfiguration) *IngressSpecApplyConfiguration { - b.LoadBalancer = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressstatus.go deleted file mode 100644 index f9bf00a41..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ingressstatus.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// IngressStatusApplyConfiguration represents a declarative configuration of the IngressStatus type for use -// with apply. -type IngressStatusApplyConfiguration struct { - // componentRoutes is where participating operators place the current route status for routes whose - // hostnames and serving certificates can be customized by the cluster-admin. - ComponentRoutes []ComponentRouteStatusApplyConfiguration `json:"componentRoutes,omitempty"` - // defaultPlacement is set at installation time to control which - // nodes will host the ingress router pods by default. The options are - // control-plane nodes or worker nodes. - // - // This field works by dictating how the Cluster Ingress Operator will - // consider unset replicas and nodePlacement fields in IngressController - // resources when creating the corresponding Deployments. - // - // See the documentation for the IngressController replicas and nodePlacement - // fields for more information. - // - // When omitted, the default value is Workers - DefaultPlacement *configv1.DefaultPlacement `json:"defaultPlacement,omitempty"` -} - -// IngressStatusApplyConfiguration constructs a declarative configuration of the IngressStatus type for use with -// apply. -func IngressStatus() *IngressStatusApplyConfiguration { - return &IngressStatusApplyConfiguration{} -} - -// WithComponentRoutes adds the given value to the ComponentRoutes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ComponentRoutes field. -func (b *IngressStatusApplyConfiguration) WithComponentRoutes(values ...*ComponentRouteStatusApplyConfiguration) *IngressStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithComponentRoutes") - } - b.ComponentRoutes = append(b.ComponentRoutes, *values[i]) - } - return b -} - -// WithDefaultPlacement sets the DefaultPlacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultPlacement field is set to the value of the last call. -func (b *IngressStatusApplyConfiguration) WithDefaultPlacement(value configv1.DefaultPlacement) *IngressStatusApplyConfiguration { - b.DefaultPlacement = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagather.go deleted file mode 100644 index 4ad9a53ed..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagather.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// InsightsDataGatherApplyConfiguration represents a declarative configuration of the InsightsDataGather type for use -// with apply. -// -// InsightsDataGather provides data gather configuration options for the Insights Operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type InsightsDataGatherApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *InsightsDataGatherSpecApplyConfiguration `json:"spec,omitempty"` -} - -// InsightsDataGather constructs a declarative configuration of the InsightsDataGather type for use with -// apply. -func InsightsDataGather(name string) *InsightsDataGatherApplyConfiguration { - b := &InsightsDataGatherApplyConfiguration{} - b.WithName(name) - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractInsightsDataGatherFrom extracts the applied configuration owned by fieldManager from -// insightsDataGather for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGatherFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGatherFrom(insightsDataGather *configv1.InsightsDataGather, fieldManager string, subresource string) (*InsightsDataGatherApplyConfiguration, error) { - b := &InsightsDataGatherApplyConfiguration{} - err := managedfields.ExtractInto(insightsDataGather, internal.Parser().Type("com.github.openshift.api.config.v1.InsightsDataGather"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(insightsDataGather.Name) - - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractInsightsDataGather extracts the applied configuration owned by fieldManager from -// insightsDataGather. If no managedFields are found in insightsDataGather for fieldManager, a -// InsightsDataGatherApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGather provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGather(insightsDataGather *configv1.InsightsDataGather, fieldManager string) (*InsightsDataGatherApplyConfiguration, error) { - return ExtractInsightsDataGatherFrom(insightsDataGather, fieldManager, "") -} - -func (b InsightsDataGatherApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithKind(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithAPIVersion(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGenerateName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithNamespace(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithUID(value types.UID) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithResourceVersion(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGeneration(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithLabels(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InsightsDataGatherApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *InsightsDataGatherApplyConfiguration) WithFinalizers(values ...string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *InsightsDataGatherApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithSpec(value *InsightsDataGatherSpecApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.Spec = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagatherspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagatherspec.go deleted file mode 100644 index 0d3bc710a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/insightsdatagatherspec.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// InsightsDataGatherSpecApplyConfiguration represents a declarative configuration of the InsightsDataGatherSpec type for use -// with apply. -// -// InsightsDataGatherSpec contains the configuration for the data gathering. -type InsightsDataGatherSpecApplyConfiguration struct { - // gatherConfig is a required spec attribute that includes all the configuration options related to gathering of the Insights data and its uploading to the ingress. - GatherConfig *GatherConfigApplyConfiguration `json:"gatherConfig,omitempty"` -} - -// InsightsDataGatherSpecApplyConfiguration constructs a declarative configuration of the InsightsDataGatherSpec type for use with -// apply. -func InsightsDataGatherSpec() *InsightsDataGatherSpecApplyConfiguration { - return &InsightsDataGatherSpecApplyConfiguration{} -} - -// WithGatherConfig sets the GatherConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GatherConfig field is set to the value of the last call. -func (b *InsightsDataGatherSpecApplyConfiguration) WithGatherConfig(value *GatherConfigApplyConfiguration) *InsightsDataGatherSpecApplyConfiguration { - b.GatherConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/keystoneidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/keystoneidentityprovider.go deleted file mode 100644 index a1c62e0e1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/keystoneidentityprovider.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KeystoneIdentityProviderApplyConfiguration represents a declarative configuration of the KeystoneIdentityProvider type for use -// with apply. -// -// KeystonePasswordIdentityProvider provides identities for users authenticating using keystone password credentials -type KeystoneIdentityProviderApplyConfiguration struct { - // OAuthRemoteConnectionInfo contains information about how to connect to the keystone server - OAuthRemoteConnectionInfoApplyConfiguration `json:",inline"` - // domainName is required for keystone v3 - DomainName *string `json:"domainName,omitempty"` -} - -// KeystoneIdentityProviderApplyConfiguration constructs a declarative configuration of the KeystoneIdentityProvider type for use with -// apply. -func KeystoneIdentityProvider() *KeystoneIdentityProviderApplyConfiguration { - return &KeystoneIdentityProviderApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *KeystoneIdentityProviderApplyConfiguration) WithURL(value string) *KeystoneIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.URL = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *KeystoneIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.CA = value - return b -} - -// WithTLSClientCert sets the TLSClientCert field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientCert field is set to the value of the last call. -func (b *KeystoneIdentityProviderApplyConfiguration) WithTLSClientCert(value *SecretNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientCert = value - return b -} - -// WithTLSClientKey sets the TLSClientKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientKey field is set to the value of the last call. -func (b *KeystoneIdentityProviderApplyConfiguration) WithTLSClientKey(value *SecretNameReferenceApplyConfiguration) *KeystoneIdentityProviderApplyConfiguration { - b.OAuthRemoteConnectionInfoApplyConfiguration.TLSClientKey = value - return b -} - -// WithDomainName sets the DomainName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DomainName field is set to the value of the last call. -func (b *KeystoneIdentityProviderApplyConfiguration) WithDomainName(value string) *KeystoneIdentityProviderApplyConfiguration { - b.DomainName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmspluginconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmspluginconfig.go deleted file mode 100644 index fc266edc4..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kmspluginconfig.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// KMSPluginConfigApplyConfiguration represents a declarative configuration of the KMSPluginConfig type for use -// with apply. -// -// KMSPluginConfig defines the configuration for the KMS instance -// that will be used with KMS encryption -type KMSPluginConfigApplyConfiguration struct { - // type defines the kind of platform for the KMS provider. - // Allowed values are Vault. - // When set to Vault, the plugin connects to a HashiCorp Vault server for key management. - Type *configv1.KMSProviderType `json:"type,omitempty"` - // vault defines the configuration for the Vault KMS plugin. - // The plugin connects to a Vault Enterprise server that is managed - // by the user outside the purview of the control plane. - // This field must be set when type is Vault, and must be unset otherwise. - Vault *VaultKMSPluginConfigApplyConfiguration `json:"vault,omitempty"` -} - -// KMSPluginConfigApplyConfiguration constructs a declarative configuration of the KMSPluginConfig type for use with -// apply. -func KMSPluginConfig() *KMSPluginConfigApplyConfiguration { - return &KMSPluginConfigApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *KMSPluginConfigApplyConfiguration) WithType(value configv1.KMSProviderType) *KMSPluginConfigApplyConfiguration { - b.Type = &value - return b -} - -// WithVault sets the Vault field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Vault field is set to the value of the last call. -func (b *KMSPluginConfigApplyConfiguration) WithVault(value *VaultKMSPluginConfigApplyConfiguration) *KMSPluginConfigApplyConfiguration { - b.Vault = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kubevirtplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kubevirtplatformstatus.go deleted file mode 100644 index ca4614297..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/kubevirtplatformstatus.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KubevirtPlatformStatusApplyConfiguration represents a declarative configuration of the KubevirtPlatformStatus type for use -// with apply. -// -// KubevirtPlatformStatus holds the current status of the kubevirt infrastructure provider. -type KubevirtPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - IngressIP *string `json:"ingressIP,omitempty"` -} - -// KubevirtPlatformStatusApplyConfiguration constructs a declarative configuration of the KubevirtPlatformStatus type for use with -// apply. -func KubevirtPlatformStatus() *KubevirtPlatformStatusApplyConfiguration { - return &KubevirtPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *KubevirtPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *KubevirtPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *KubevirtPlatformStatusApplyConfiguration) WithIngressIP(value string) *KubevirtPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapattributemapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapattributemapping.go deleted file mode 100644 index 29c14570e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapattributemapping.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// LDAPAttributeMappingApplyConfiguration represents a declarative configuration of the LDAPAttributeMapping type for use -// with apply. -// -// LDAPAttributeMapping maps LDAP attributes to OpenShift identity fields -type LDAPAttributeMappingApplyConfiguration struct { - // 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" - ID []string `json:"id,omitempty"` - // preferredUsername is the list of attributes whose values should be used as the preferred username. - // LDAP standard login attribute is "uid" - PreferredUsername []string `json:"preferredUsername,omitempty"` - // 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" - Name []string `json:"name,omitempty"` - // 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 - Email []string `json:"email,omitempty"` -} - -// LDAPAttributeMappingApplyConfiguration constructs a declarative configuration of the LDAPAttributeMapping type for use with -// apply. -func LDAPAttributeMapping() *LDAPAttributeMappingApplyConfiguration { - return &LDAPAttributeMappingApplyConfiguration{} -} - -// WithID adds the given value to the ID field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ID field. -func (b *LDAPAttributeMappingApplyConfiguration) WithID(values ...string) *LDAPAttributeMappingApplyConfiguration { - for i := range values { - b.ID = append(b.ID, values[i]) - } - return b -} - -// WithPreferredUsername adds the given value to the PreferredUsername field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PreferredUsername field. -func (b *LDAPAttributeMappingApplyConfiguration) WithPreferredUsername(values ...string) *LDAPAttributeMappingApplyConfiguration { - for i := range values { - b.PreferredUsername = append(b.PreferredUsername, values[i]) - } - return b -} - -// WithName adds the given value to the Name field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Name field. -func (b *LDAPAttributeMappingApplyConfiguration) WithName(values ...string) *LDAPAttributeMappingApplyConfiguration { - for i := range values { - b.Name = append(b.Name, values[i]) - } - return b -} - -// WithEmail adds the given value to the Email field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Email field. -func (b *LDAPAttributeMappingApplyConfiguration) WithEmail(values ...string) *LDAPAttributeMappingApplyConfiguration { - for i := range values { - b.Email = append(b.Email, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapidentityprovider.go deleted file mode 100644 index cd45699e7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ldapidentityprovider.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// LDAPIdentityProviderApplyConfiguration represents a declarative configuration of the LDAPIdentityProvider type for use -// with apply. -// -// LDAPPasswordIdentityProvider provides identities for users authenticating using LDAP credentials -type LDAPIdentityProviderApplyConfiguration 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 - URL *string `json:"url,omitempty"` - // bindDN is an optional DN to bind with during the search phase. - BindDN *string `json:"bindDN,omitempty"` - // 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. - BindPassword *SecretNameReferenceApplyConfiguration `json:"bindPassword,omitempty"` - // 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 - // attempt to connect using TLS, even when `insecure` is set to `true` - // When `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. - Insecure *bool `json:"insecure,omitempty"` - // 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. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` - // attributes maps LDAP attributes to identities - Attributes *LDAPAttributeMappingApplyConfiguration `json:"attributes,omitempty"` -} - -// LDAPIdentityProviderApplyConfiguration constructs a declarative configuration of the LDAPIdentityProvider type for use with -// apply. -func LDAPIdentityProvider() *LDAPIdentityProviderApplyConfiguration { - return &LDAPIdentityProviderApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithURL(value string) *LDAPIdentityProviderApplyConfiguration { - b.URL = &value - return b -} - -// WithBindDN sets the BindDN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BindDN field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithBindDN(value string) *LDAPIdentityProviderApplyConfiguration { - b.BindDN = &value - return b -} - -// WithBindPassword sets the BindPassword field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BindPassword field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithBindPassword(value *SecretNameReferenceApplyConfiguration) *LDAPIdentityProviderApplyConfiguration { - b.BindPassword = value - return b -} - -// WithInsecure sets the Insecure field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Insecure field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithInsecure(value bool) *LDAPIdentityProviderApplyConfiguration { - b.Insecure = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *LDAPIdentityProviderApplyConfiguration { - b.CA = value - return b -} - -// WithAttributes sets the Attributes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Attributes field is set to the value of the last call. -func (b *LDAPIdentityProviderApplyConfiguration) WithAttributes(value *LDAPAttributeMappingApplyConfiguration) *LDAPIdentityProviderApplyConfiguration { - b.Attributes = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/loadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/loadbalancer.go deleted file mode 100644 index 060777387..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/loadbalancer.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// LoadBalancerApplyConfiguration represents a declarative configuration of the LoadBalancer type for use -// with apply. -type LoadBalancerApplyConfiguration struct { - // platform holds configuration specific to the underlying - // infrastructure provider for the ingress load balancers. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - Platform *IngressPlatformSpecApplyConfiguration `json:"platform,omitempty"` -} - -// LoadBalancerApplyConfiguration constructs a declarative configuration of the LoadBalancer type for use with -// apply. -func LoadBalancer() *LoadBalancerApplyConfiguration { - return &LoadBalancerApplyConfiguration{} -} - -// WithPlatform sets the Platform field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Platform field is set to the value of the last call. -func (b *LoadBalancerApplyConfiguration) WithPlatform(value *IngressPlatformSpecApplyConfiguration) *LoadBalancerApplyConfiguration { - b.Platform = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/maxagepolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/maxagepolicy.go deleted file mode 100644 index 027b5d38d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/maxagepolicy.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// MaxAgePolicyApplyConfiguration represents a declarative configuration of the MaxAgePolicy type for use -// with apply. -// -// MaxAgePolicy contains a numeric range for specifying a compliant HSTS max-age for the enclosing RequiredHSTSPolicy -type MaxAgePolicyApplyConfiguration struct { - // The largest allowed value (in seconds) of the RequiredHSTSPolicy max-age - // This value can be left unspecified, in which case no upper limit is enforced. - LargestMaxAge *int32 `json:"largestMaxAge,omitempty"` - // The smallest allowed value (in seconds) of the RequiredHSTSPolicy max-age - // Setting max-age=0 allows the deletion of an existing HSTS header from a host. This is a necessary - // tool for administrators to quickly correct mistakes. - // This value can be left unspecified, in which case no lower limit is enforced. - SmallestMaxAge *int32 `json:"smallestMaxAge,omitempty"` -} - -// MaxAgePolicyApplyConfiguration constructs a declarative configuration of the MaxAgePolicy type for use with -// apply. -func MaxAgePolicy() *MaxAgePolicyApplyConfiguration { - return &MaxAgePolicyApplyConfiguration{} -} - -// WithLargestMaxAge sets the LargestMaxAge field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LargestMaxAge field is set to the value of the last call. -func (b *MaxAgePolicyApplyConfiguration) WithLargestMaxAge(value int32) *MaxAgePolicyApplyConfiguration { - b.LargestMaxAge = &value - return b -} - -// WithSmallestMaxAge sets the SmallestMaxAge field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SmallestMaxAge field is set to the value of the last call. -func (b *MaxAgePolicyApplyConfiguration) WithSmallestMaxAge(value int32) *MaxAgePolicyApplyConfiguration { - b.SmallestMaxAge = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigration.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigration.go deleted file mode 100644 index fc3229da6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigration.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// MTUMigrationApplyConfiguration represents a declarative configuration of the MTUMigration type for use -// with apply. -// -// MTUMigration contains infomation about MTU migration. -type MTUMigrationApplyConfiguration struct { - // network contains MTU migration configuration for the default network. - Network *MTUMigrationValuesApplyConfiguration `json:"network,omitempty"` - // machine contains MTU migration configuration for the machine's uplink. - Machine *MTUMigrationValuesApplyConfiguration `json:"machine,omitempty"` -} - -// MTUMigrationApplyConfiguration constructs a declarative configuration of the MTUMigration type for use with -// apply. -func MTUMigration() *MTUMigrationApplyConfiguration { - return &MTUMigrationApplyConfiguration{} -} - -// WithNetwork sets the Network field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Network field is set to the value of the last call. -func (b *MTUMigrationApplyConfiguration) WithNetwork(value *MTUMigrationValuesApplyConfiguration) *MTUMigrationApplyConfiguration { - b.Network = value - return b -} - -// WithMachine sets the Machine field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Machine field is set to the value of the last call. -func (b *MTUMigrationApplyConfiguration) WithMachine(value *MTUMigrationValuesApplyConfiguration) *MTUMigrationApplyConfiguration { - b.Machine = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigrationvalues.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigrationvalues.go deleted file mode 100644 index f9c51c216..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/mtumigrationvalues.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// MTUMigrationValuesApplyConfiguration represents a declarative configuration of the MTUMigrationValues type for use -// with apply. -// -// MTUMigrationValues contains the values for a MTU migration. -type MTUMigrationValuesApplyConfiguration struct { - // to is the MTU to migrate to. - To *uint32 `json:"to,omitempty"` - // from is the MTU to migrate from. - From *uint32 `json:"from,omitempty"` -} - -// MTUMigrationValuesApplyConfiguration constructs a declarative configuration of the MTUMigrationValues type for use with -// apply. -func MTUMigrationValues() *MTUMigrationValuesApplyConfiguration { - return &MTUMigrationValuesApplyConfiguration{} -} - -// WithTo sets the To field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the To field is set to the value of the last call. -func (b *MTUMigrationValuesApplyConfiguration) WithTo(value uint32) *MTUMigrationValuesApplyConfiguration { - b.To = &value - return b -} - -// WithFrom sets the From field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the From field is set to the value of the last call. -func (b *MTUMigrationValuesApplyConfiguration) WithFrom(value uint32) *MTUMigrationValuesApplyConfiguration { - b.From = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/network.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/network.go deleted file mode 100644 index 4394aa2e5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/network.go +++ /dev/null @@ -1,281 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NetworkApplyConfiguration represents a declarative configuration of the Network type for use -// with apply. -// -// Network holds cluster-wide information about Network. The canonical name is `cluster`. It is used to configure the desired network configuration, such as: IP address pools for services/pod IPs, network plugin, etc. -// Please view network.spec for an explanation on what applies when configuring this resource. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type NetworkApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for 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, most spec fields are immutable after installation. Please view the individual ones for further details on each. - Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` -} - -// Network constructs a declarative configuration of the Network type for use with -// apply. -func Network(name string) *NetworkApplyConfiguration { - b := &NetworkApplyConfiguration{} - b.WithName(name) - b.WithKind("Network") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractNetworkFrom extracts the applied configuration owned by fieldManager from -// network for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// network must be a unmodified Network API object that was retrieved from the Kubernetes API. -// ExtractNetworkFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNetworkFrom(network *configv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { - b := &NetworkApplyConfiguration{} - err := managedfields.ExtractInto(network, internal.Parser().Type("com.github.openshift.api.config.v1.Network"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(network.Name) - - b.WithKind("Network") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractNetwork extracts the applied configuration owned by fieldManager from -// network. If no managedFields are found in network for fieldManager, a -// NetworkApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// network must be a unmodified Network API object that was retrieved from the Kubernetes API. -// ExtractNetwork provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNetwork(network *configv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { - return ExtractNetworkFrom(network, fieldManager, "") -} - -// ExtractNetworkStatus extracts the applied configuration owned by fieldManager from -// network for the status subresource. -func ExtractNetworkStatus(network *configv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { - return ExtractNetworkFrom(network, fieldManager, "status") -} - -func (b NetworkApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithGeneration(value int64) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *NetworkApplyConfiguration) WithFinalizers(values ...string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *NetworkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithSpec(value *NetworkSpecApplyConfiguration) *NetworkApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithStatus(value *NetworkStatusApplyConfiguration) *NetworkApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnostics.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnostics.go deleted file mode 100644 index 3e8db03d5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnostics.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NetworkDiagnosticsApplyConfiguration represents a declarative configuration of the NetworkDiagnostics type for use -// with apply. -// -// NetworkDiagnostics defines network diagnostics configuration -type NetworkDiagnosticsApplyConfiguration struct { - // mode controls the network diagnostics mode - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is All. - Mode *configv1.NetworkDiagnosticsMode `json:"mode,omitempty"` - // sourcePlacement controls the scheduling of network diagnostics source deployment - // - // See NetworkDiagnosticsSourcePlacement for more details about default values. - SourcePlacement *NetworkDiagnosticsSourcePlacementApplyConfiguration `json:"sourcePlacement,omitempty"` - // targetPlacement controls the scheduling of network diagnostics target daemonset - // - // See NetworkDiagnosticsTargetPlacement for more details about default values. - TargetPlacement *NetworkDiagnosticsTargetPlacementApplyConfiguration `json:"targetPlacement,omitempty"` -} - -// NetworkDiagnosticsApplyConfiguration constructs a declarative configuration of the NetworkDiagnostics type for use with -// apply. -func NetworkDiagnostics() *NetworkDiagnosticsApplyConfiguration { - return &NetworkDiagnosticsApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *NetworkDiagnosticsApplyConfiguration) WithMode(value configv1.NetworkDiagnosticsMode) *NetworkDiagnosticsApplyConfiguration { - b.Mode = &value - return b -} - -// WithSourcePlacement sets the SourcePlacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SourcePlacement field is set to the value of the last call. -func (b *NetworkDiagnosticsApplyConfiguration) WithSourcePlacement(value *NetworkDiagnosticsSourcePlacementApplyConfiguration) *NetworkDiagnosticsApplyConfiguration { - b.SourcePlacement = value - return b -} - -// WithTargetPlacement sets the TargetPlacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetPlacement field is set to the value of the last call. -func (b *NetworkDiagnosticsApplyConfiguration) WithTargetPlacement(value *NetworkDiagnosticsTargetPlacementApplyConfiguration) *NetworkDiagnosticsApplyConfiguration { - b.TargetPlacement = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go deleted file mode 100644 index 9b21cd5e7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticssourceplacement.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" -) - -// NetworkDiagnosticsSourcePlacementApplyConfiguration represents a declarative configuration of the NetworkDiagnosticsSourcePlacement type for use -// with apply. -// -// NetworkDiagnosticsSourcePlacement defines node scheduling configuration network diagnostics source components -type NetworkDiagnosticsSourcePlacementApplyConfiguration struct { - // nodeSelector is the node selector applied to network diagnostics components - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `kubernetes.io/os: linux`. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations is a list of tolerations applied to network diagnostics components - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is an empty list. - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// NetworkDiagnosticsSourcePlacementApplyConfiguration constructs a declarative configuration of the NetworkDiagnosticsSourcePlacement type for use with -// apply. -func NetworkDiagnosticsSourcePlacement() *NetworkDiagnosticsSourcePlacementApplyConfiguration { - return &NetworkDiagnosticsSourcePlacementApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *NetworkDiagnosticsSourcePlacementApplyConfiguration) WithNodeSelector(entries map[string]string) *NetworkDiagnosticsSourcePlacementApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *NetworkDiagnosticsSourcePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NetworkDiagnosticsSourcePlacementApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go deleted file mode 100644 index f6bd8fb82..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkdiagnosticstargetplacement.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" -) - -// NetworkDiagnosticsTargetPlacementApplyConfiguration represents a declarative configuration of the NetworkDiagnosticsTargetPlacement type for use -// with apply. -// -// NetworkDiagnosticsTargetPlacement defines node scheduling configuration network diagnostics target components -type NetworkDiagnosticsTargetPlacementApplyConfiguration struct { - // nodeSelector is the node selector applied to network diagnostics components - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `kubernetes.io/os: linux`. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations is a list of tolerations applied to network diagnostics components - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `- operator: "Exists"` which means that all taints are tolerated. - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// NetworkDiagnosticsTargetPlacementApplyConfiguration constructs a declarative configuration of the NetworkDiagnosticsTargetPlacement type for use with -// apply. -func NetworkDiagnosticsTargetPlacement() *NetworkDiagnosticsTargetPlacementApplyConfiguration { - return &NetworkDiagnosticsTargetPlacementApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *NetworkDiagnosticsTargetPlacementApplyConfiguration) WithNodeSelector(entries map[string]string) *NetworkDiagnosticsTargetPlacementApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *NetworkDiagnosticsTargetPlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NetworkDiagnosticsTargetPlacementApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkmigration.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkmigration.go deleted file mode 100644 index d6fffb597..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkmigration.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NetworkMigrationApplyConfiguration represents a declarative configuration of the NetworkMigration type for use -// with apply. -// -// NetworkMigration represents the network migration status. -type NetworkMigrationApplyConfiguration struct { - // networkType is the target plugin that is being deployed. - // DEPRECATED: network type migration is no longer supported, - // so this should always be unset. - NetworkType *string `json:"networkType,omitempty"` - // mtu is the MTU configuration that is being deployed. - MTU *MTUMigrationApplyConfiguration `json:"mtu,omitempty"` -} - -// NetworkMigrationApplyConfiguration constructs a declarative configuration of the NetworkMigration type for use with -// apply. -func NetworkMigration() *NetworkMigrationApplyConfiguration { - return &NetworkMigrationApplyConfiguration{} -} - -// WithNetworkType sets the NetworkType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkType field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithNetworkType(value string) *NetworkMigrationApplyConfiguration { - b.NetworkType = &value - return b -} - -// WithMTU sets the MTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MTU field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithMTU(value *MTUMigrationApplyConfiguration) *NetworkMigrationApplyConfiguration { - b.MTU = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkobservabilityspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkobservabilityspec.go deleted file mode 100644 index 5e58d8e9c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkobservabilityspec.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NetworkObservabilitySpecApplyConfiguration represents a declarative configuration of the NetworkObservabilitySpec type for use -// with apply. -// -// NetworkObservabilitySpec defines the configuration for network observability installation -type NetworkObservabilitySpecApplyConfiguration struct { - // installationPolicy controls whether network observability is installed during cluster deployment. - // Valid values are "InstallAndEnable" and "NoAction". - // When set to "InstallAndEnable", ensure that network observability will be installed and enabled on the cluster. If already installed, no action taken, but if it gets uninstalled, it will install it again. - // When set to "NoAction", nothing will be done regarding Network observability. - // During the installation of NetworkObservability, the platform checks for any existing manual installations. - // If a successful installation using the OLMv0 or OLMv1 API is detected, it will be used. - // If the platform cannot determine how the current version was installed, or if the existing installation is incomplete, the installation process will stop. - InstallationPolicy *configv1.NetworkObservabilityInstallationPolicy `json:"installationPolicy,omitempty"` -} - -// NetworkObservabilitySpecApplyConfiguration constructs a declarative configuration of the NetworkObservabilitySpec type for use with -// apply. -func NetworkObservabilitySpec() *NetworkObservabilitySpecApplyConfiguration { - return &NetworkObservabilitySpecApplyConfiguration{} -} - -// WithInstallationPolicy sets the InstallationPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InstallationPolicy field is set to the value of the last call. -func (b *NetworkObservabilitySpecApplyConfiguration) WithInstallationPolicy(value configv1.NetworkObservabilityInstallationPolicy) *NetworkObservabilitySpecApplyConfiguration { - b.InstallationPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkspec.go deleted file mode 100644 index 27e7480ec..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkspec.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NetworkSpecApplyConfiguration represents a declarative configuration of the NetworkSpec type for use -// with apply. -// -// 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, most spec fields are immutable after installation. Please view the individual ones for further details on each. -type NetworkSpecApplyConfiguration struct { - // IP address pool to use for pod IPs. - // This field is immutable after installation. - ClusterNetwork []ClusterNetworkEntryApplyConfiguration `json:"clusterNetwork,omitempty"` - // IP address pool for services. - // Currently, we only support a single entry here. - // This field is immutable after installation. - ServiceNetwork []string `json:"serviceNetwork,omitempty"` - // networkType is the plugin that is to be deployed (e.g. OVNKubernetes). - // This should match a value that the cluster-network-operator understands, - // or else no networking will be installed. - // Currently supported values are: - // - OVNKubernetes - // This field is immutable after installation. - NetworkType *string `json:"networkType,omitempty"` - // externalIP defines configuration for controllers that - // affect Service.ExternalIP. If nil, then ExternalIP is - // not allowed to be set. - ExternalIP *ExternalIPConfigApplyConfiguration `json:"externalIP,omitempty"` - // The port range allowed for Services of type NodePort. - // If not specified, the default of 30000-32767 will be used. - // Such Services without a NodePort specified will have one - // automatically allocated from this range. - // This parameter can be updated after the cluster is - // installed. - ServiceNodePortRange *string `json:"serviceNodePortRange,omitempty"` - // networkDiagnostics defines network diagnostics configuration. - // - // Takes precedence over spec.disableNetworkDiagnostics in network.operator.openshift.io. - // If networkDiagnostics is not specified or is empty, - // and the spec.disableNetworkDiagnostics flag in network.operator.openshift.io is set to true, - // the network diagnostics feature will be disabled. - NetworkDiagnostics *NetworkDiagnosticsApplyConfiguration `json:"networkDiagnostics,omitempty"` - // networkObservability is an optional field that configures network observability installation - // during cluster deployment (day-0). - // When omitted, unless this is a SNO cluster, network observability will be installed if not already present, after that, no action taken. - NetworkObservability *NetworkObservabilitySpecApplyConfiguration `json:"networkObservability,omitempty"` -} - -// NetworkSpecApplyConfiguration constructs a declarative configuration of the NetworkSpec type for use with -// apply. -func NetworkSpec() *NetworkSpecApplyConfiguration { - return &NetworkSpecApplyConfiguration{} -} - -// WithClusterNetwork adds the given value to the ClusterNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ClusterNetwork field. -func (b *NetworkSpecApplyConfiguration) WithClusterNetwork(values ...*ClusterNetworkEntryApplyConfiguration) *NetworkSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithClusterNetwork") - } - b.ClusterNetwork = append(b.ClusterNetwork, *values[i]) - } - return b -} - -// WithServiceNetwork adds the given value to the ServiceNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceNetwork field. -func (b *NetworkSpecApplyConfiguration) WithServiceNetwork(values ...string) *NetworkSpecApplyConfiguration { - for i := range values { - b.ServiceNetwork = append(b.ServiceNetwork, values[i]) - } - return b -} - -// WithNetworkType sets the NetworkType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkType field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithNetworkType(value string) *NetworkSpecApplyConfiguration { - b.NetworkType = &value - return b -} - -// WithExternalIP sets the ExternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExternalIP field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithExternalIP(value *ExternalIPConfigApplyConfiguration) *NetworkSpecApplyConfiguration { - b.ExternalIP = value - return b -} - -// WithServiceNodePortRange sets the ServiceNodePortRange field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceNodePortRange field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithServiceNodePortRange(value string) *NetworkSpecApplyConfiguration { - b.ServiceNodePortRange = &value - return b -} - -// WithNetworkDiagnostics sets the NetworkDiagnostics field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkDiagnostics field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithNetworkDiagnostics(value *NetworkDiagnosticsApplyConfiguration) *NetworkSpecApplyConfiguration { - b.NetworkDiagnostics = value - return b -} - -// WithNetworkObservability sets the NetworkObservability field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkObservability field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithNetworkObservability(value *NetworkObservabilitySpecApplyConfiguration) *NetworkSpecApplyConfiguration { - b.NetworkObservability = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkstatus.go deleted file mode 100644 index 43a1533c1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/networkstatus.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NetworkStatusApplyConfiguration represents a declarative configuration of the NetworkStatus type for use -// with apply. -// -// NetworkStatus is the current network configuration. -type NetworkStatusApplyConfiguration struct { - // IP address pool to use for pod IPs. - ClusterNetwork []ClusterNetworkEntryApplyConfiguration `json:"clusterNetwork,omitempty"` - // IP address pool for services. - // Currently, we only support a single entry here. - ServiceNetwork []string `json:"serviceNetwork,omitempty"` - // networkType is the plugin that is deployed (e.g. OVNKubernetes). - NetworkType *string `json:"networkType,omitempty"` - // clusterNetworkMTU is the MTU for inter-pod networking. - ClusterNetworkMTU *int `json:"clusterNetworkMTU,omitempty"` - // migration contains the cluster network migration configuration. - Migration *NetworkMigrationApplyConfiguration `json:"migration,omitempty"` - // conditions represents the observations of a network.config current state. - // Known .status.conditions.type are: "NetworkDiagnosticsAvailable" - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// NetworkStatusApplyConfiguration constructs a declarative configuration of the NetworkStatus type for use with -// apply. -func NetworkStatus() *NetworkStatusApplyConfiguration { - return &NetworkStatusApplyConfiguration{} -} - -// WithClusterNetwork adds the given value to the ClusterNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ClusterNetwork field. -func (b *NetworkStatusApplyConfiguration) WithClusterNetwork(values ...*ClusterNetworkEntryApplyConfiguration) *NetworkStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithClusterNetwork") - } - b.ClusterNetwork = append(b.ClusterNetwork, *values[i]) - } - return b -} - -// WithServiceNetwork adds the given value to the ServiceNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceNetwork field. -func (b *NetworkStatusApplyConfiguration) WithServiceNetwork(values ...string) *NetworkStatusApplyConfiguration { - for i := range values { - b.ServiceNetwork = append(b.ServiceNetwork, values[i]) - } - return b -} - -// WithNetworkType sets the NetworkType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkType field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithNetworkType(value string) *NetworkStatusApplyConfiguration { - b.NetworkType = &value - return b -} - -// WithClusterNetworkMTU sets the ClusterNetworkMTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterNetworkMTU field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithClusterNetworkMTU(value int) *NetworkStatusApplyConfiguration { - b.ClusterNetworkMTU = &value - return b -} - -// WithMigration sets the Migration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Migration field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithMigration(value *NetworkMigrationApplyConfiguration) *NetworkStatusApplyConfiguration { - b.Migration = value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NetworkStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *NetworkStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/node.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/node.go deleted file mode 100644 index 973b721a0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/node.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NodeApplyConfiguration represents a declarative configuration of the Node type for use -// with apply. -// -// Node holds cluster-wide information about node specific features. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type NodeApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *NodeSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values. - Status *NodeStatusApplyConfiguration `json:"status,omitempty"` -} - -// Node constructs a declarative configuration of the Node type for use with -// apply. -func Node(name string) *NodeApplyConfiguration { - b := &NodeApplyConfiguration{} - b.WithName(name) - b.WithKind("Node") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractNodeFrom extracts the applied configuration owned by fieldManager from -// node for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// node must be a unmodified Node API object that was retrieved from the Kubernetes API. -// ExtractNodeFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNodeFrom(node *configv1.Node, fieldManager string, subresource string) (*NodeApplyConfiguration, error) { - b := &NodeApplyConfiguration{} - err := managedfields.ExtractInto(node, internal.Parser().Type("com.github.openshift.api.config.v1.Node"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(node.Name) - - b.WithKind("Node") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractNode extracts the applied configuration owned by fieldManager from -// node. If no managedFields are found in node for fieldManager, a -// NodeApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// node must be a unmodified Node API object that was retrieved from the Kubernetes API. -// ExtractNode provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNode(node *configv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { - return ExtractNodeFrom(node, fieldManager, "") -} - -// ExtractNodeStatus extracts the applied configuration owned by fieldManager from -// node for the status subresource. -func ExtractNodeStatus(node *configv1.Node, fieldManager string) (*NodeApplyConfiguration, error) { - return ExtractNodeFrom(node, fieldManager, "status") -} - -func (b NodeApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithKind(value string) *NodeApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithAPIVersion(value string) *NodeApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithName(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithGenerateName(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithNamespace(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithUID(value types.UID) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithResourceVersion(value string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithGeneration(value int64) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *NodeApplyConfiguration) WithLabels(entries map[string]string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *NodeApplyConfiguration) WithAnnotations(entries map[string]string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NodeApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *NodeApplyConfiguration) WithFinalizers(values ...string) *NodeApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *NodeApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithSpec(value *NodeSpecApplyConfiguration) *NodeApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *NodeApplyConfiguration) WithStatus(value *NodeStatusApplyConfiguration) *NodeApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *NodeApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *NodeApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *NodeApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *NodeApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodespec.go deleted file mode 100644 index 33b70402d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodespec.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NodeSpecApplyConfiguration represents a declarative configuration of the NodeSpec type for use -// with apply. -type NodeSpecApplyConfiguration struct { - // cgroupMode determines the cgroups version on the node - CgroupMode *configv1.CgroupMode `json:"cgroupMode,omitempty"` - // workerLatencyProfile determins the how fast the kubelet is updating - // the status and corresponding reaction of the cluster - WorkerLatencyProfile *configv1.WorkerLatencyProfileType `json:"workerLatencyProfile,omitempty"` - // minimumKubeletVersion is the lowest version of a kubelet that can join the cluster. - // Specifically, the apiserver will deny most authorization requests of kubelets that are older - // than the specified version, only allowing the kubelet to get and update its node object, and perform - // subjectaccessreviews. - // This means any kubelet that attempts to join the cluster will not be able to run any assigned workloads, - // and will eventually be marked as not ready. - // Its max length is 8, so maximum version allowed is either "9.999.99" or "99.99.99". - // Since the kubelet reports the version of the kubernetes release, not Openshift, this field references - // the underlying kubernetes version this version of Openshift is based off of. - // In other words: if an admin wishes to ensure no nodes run an older version than Openshift 4.17, then - // they should set the minimumKubeletVersion to 1.30.0. - // When comparing versions, the kubelet's version is stripped of any contents outside of major.minor.patch version. - // Thus, a kubelet with version "1.0.0-ec.0" will be compatible with minimumKubeletVersion "1.0.0" or earlier. - MinimumKubeletVersion *string `json:"minimumKubeletVersion,omitempty"` -} - -// NodeSpecApplyConfiguration constructs a declarative configuration of the NodeSpec type for use with -// apply. -func NodeSpec() *NodeSpecApplyConfiguration { - return &NodeSpecApplyConfiguration{} -} - -// WithCgroupMode sets the CgroupMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CgroupMode field is set to the value of the last call. -func (b *NodeSpecApplyConfiguration) WithCgroupMode(value configv1.CgroupMode) *NodeSpecApplyConfiguration { - b.CgroupMode = &value - return b -} - -// WithWorkerLatencyProfile sets the WorkerLatencyProfile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the WorkerLatencyProfile field is set to the value of the last call. -func (b *NodeSpecApplyConfiguration) WithWorkerLatencyProfile(value configv1.WorkerLatencyProfileType) *NodeSpecApplyConfiguration { - b.WorkerLatencyProfile = &value - return b -} - -// WithMinimumKubeletVersion sets the MinimumKubeletVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinimumKubeletVersion field is set to the value of the last call. -func (b *NodeSpecApplyConfiguration) WithMinimumKubeletVersion(value string) *NodeSpecApplyConfiguration { - b.MinimumKubeletVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodestatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodestatus.go deleted file mode 100644 index 009495ca5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nodestatus.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use -// with apply. -type NodeStatusApplyConfiguration struct { - // conditions contain the details and the current state of the nodes.config object - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with -// apply. -func NodeStatus() *NodeStatusApplyConfiguration { - return &NodeStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NodeStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *NodeStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixfailuredomain.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixfailuredomain.go deleted file mode 100644 index 98f175f55..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixfailuredomain.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NutanixFailureDomainApplyConfiguration represents a declarative configuration of the NutanixFailureDomain type for use -// with apply. -// -// NutanixFailureDomain configures failure domain information for the Nutanix platform. -type NutanixFailureDomainApplyConfiguration struct { - // name defines the unique name of a failure domain. - // Name is required and must be at most 64 characters in length. - // It must consist of only lower case alphanumeric characters and hyphens (-). - // It must start and end with an alphanumeric character. - // This value is arbitrary and is used to identify the failure domain within the platform. - Name *string `json:"name,omitempty"` - // cluster is to identify the cluster (the Prism Element under management of the Prism Central), - // in which the Machine's VM will be created. The cluster identifier (uuid or name) can be obtained - // from the Prism Central console or using the prism_central API. - Cluster *NutanixResourceIdentifierApplyConfiguration `json:"cluster,omitempty"` - // subnets holds a list of identifiers (one or more) of the cluster's network subnets - // If the feature gate NutanixMultiSubnets is enabled, up to 32 subnets may be configured. - // for the Machine's VM to connect to. The subnet identifiers (uuid or name) can be - // obtained from the Prism Central console or using the prism_central API. - Subnets []NutanixResourceIdentifierApplyConfiguration `json:"subnets,omitempty"` -} - -// NutanixFailureDomainApplyConfiguration constructs a declarative configuration of the NutanixFailureDomain type for use with -// apply. -func NutanixFailureDomain() *NutanixFailureDomainApplyConfiguration { - return &NutanixFailureDomainApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NutanixFailureDomainApplyConfiguration) WithName(value string) *NutanixFailureDomainApplyConfiguration { - b.Name = &value - return b -} - -// WithCluster sets the Cluster field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Cluster field is set to the value of the last call. -func (b *NutanixFailureDomainApplyConfiguration) WithCluster(value *NutanixResourceIdentifierApplyConfiguration) *NutanixFailureDomainApplyConfiguration { - b.Cluster = value - return b -} - -// WithSubnets adds the given value to the Subnets field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Subnets field. -func (b *NutanixFailureDomainApplyConfiguration) WithSubnets(values ...*NutanixResourceIdentifierApplyConfiguration) *NutanixFailureDomainApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSubnets") - } - b.Subnets = append(b.Subnets, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go deleted file mode 100644 index 6f90a6fe0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformloadbalancer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NutanixPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the NutanixPlatformLoadBalancer type for use -// with apply. -// -// NutanixPlatformLoadBalancer defines the load balancer used by the cluster on Nutanix platform. -type NutanixPlatformLoadBalancerApplyConfiguration struct { - // type defines the type of load balancer used by the cluster on Nutanix platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` -} - -// NutanixPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the NutanixPlatformLoadBalancer type for use with -// apply. -func NutanixPlatformLoadBalancer() *NutanixPlatformLoadBalancerApplyConfiguration { - return &NutanixPlatformLoadBalancerApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *NutanixPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *NutanixPlatformLoadBalancerApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformspec.go deleted file mode 100644 index f23258e50..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformspec.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NutanixPlatformSpecApplyConfiguration represents a declarative configuration of the NutanixPlatformSpec type for use -// with apply. -// -// NutanixPlatformSpec holds the desired state of the Nutanix infrastructure provider. -// This only includes fields that can be modified in the cluster. -type NutanixPlatformSpecApplyConfiguration struct { - // prismCentral holds the endpoint address and port to access the Nutanix Prism Central. - // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. - // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the - // proxy spec.noProxy list. - PrismCentral *NutanixPrismEndpointApplyConfiguration `json:"prismCentral,omitempty"` - // prismElements holds one or more endpoint address and port data to access the Nutanix - // Prism Elements (clusters) of the Nutanix Prism Central. Currently we only support one - // Prism Element (cluster) for an OpenShift cluster, where all the Nutanix resources (VMs, subnets, volumes, etc.) - // used in the OpenShift cluster are located. In the future, we may support Nutanix resources (VMs, etc.) - // spread over multiple Prism Elements (clusters) of the Prism Central. - PrismElements []NutanixPrismElementEndpointApplyConfiguration `json:"prismElements,omitempty"` - // failureDomains configures failure domains information for the Nutanix platform. - // When set, the failure domains defined here may be used to spread Machines across - // prism element clusters to improve fault tolerance of the cluster. - FailureDomains []NutanixFailureDomainApplyConfiguration `json:"failureDomains,omitempty"` -} - -// NutanixPlatformSpecApplyConfiguration constructs a declarative configuration of the NutanixPlatformSpec type for use with -// apply. -func NutanixPlatformSpec() *NutanixPlatformSpecApplyConfiguration { - return &NutanixPlatformSpecApplyConfiguration{} -} - -// WithPrismCentral sets the PrismCentral field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrismCentral field is set to the value of the last call. -func (b *NutanixPlatformSpecApplyConfiguration) WithPrismCentral(value *NutanixPrismEndpointApplyConfiguration) *NutanixPlatformSpecApplyConfiguration { - b.PrismCentral = value - return b -} - -// WithPrismElements adds the given value to the PrismElements field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PrismElements field. -func (b *NutanixPlatformSpecApplyConfiguration) WithPrismElements(values ...*NutanixPrismElementEndpointApplyConfiguration) *NutanixPlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithPrismElements") - } - b.PrismElements = append(b.PrismElements, *values[i]) - } - return b -} - -// WithFailureDomains adds the given value to the FailureDomains field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the FailureDomains field. -func (b *NutanixPlatformSpecApplyConfiguration) WithFailureDomains(values ...*NutanixFailureDomainApplyConfiguration) *NutanixPlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFailureDomains") - } - b.FailureDomains = append(b.FailureDomains, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformstatus.go deleted file mode 100644 index ea9c150d7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixplatformstatus.go +++ /dev/null @@ -1,110 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NutanixPlatformStatusApplyConfiguration represents a declarative configuration of the NutanixPlatformStatus type for use -// with apply. -// -// NutanixPlatformStatus holds the current status of the Nutanix infrastructure provider. -type NutanixPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP *string `json:"ingressIP,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - IngressIPs []string `json:"ingressIPs,omitempty"` - // loadBalancer defines how the load balancer used by the cluster is configured. - LoadBalancer *NutanixPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` - // dnsRecordsType determines whether records for api, api-int, and ingress - // are provided by the internal DNS service or externally. - // Allowed values are `Internal`, `External`, and omitted. - // When set to `Internal`, records are provided by the internal infrastructure and - // no additional user configuration is required for the cluster to function. - // When set to `External`, records are not provided by the internal infrastructure - // and must be configured by the user on a DNS server outside the cluster. - // Cluster nodes must use this external server for their upstream DNS requests. - // This value may only be set when loadBalancer.type is set to UserManaged. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `Internal`. - DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"` -} - -// NutanixPlatformStatusApplyConfiguration constructs a declarative configuration of the NutanixPlatformStatus type for use with -// apply. -func NutanixPlatformStatus() *NutanixPlatformStatusApplyConfiguration { - return &NutanixPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *NutanixPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *NutanixPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *NutanixPlatformStatusApplyConfiguration) WithAPIServerInternalIPs(values ...string) *NutanixPlatformStatusApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *NutanixPlatformStatusApplyConfiguration) WithIngressIP(value string) *NutanixPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *NutanixPlatformStatusApplyConfiguration) WithIngressIPs(values ...string) *NutanixPlatformStatusApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *NutanixPlatformStatusApplyConfiguration) WithLoadBalancer(value *NutanixPlatformLoadBalancerApplyConfiguration) *NutanixPlatformStatusApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSRecordsType field is set to the value of the last call. -func (b *NutanixPlatformStatusApplyConfiguration) WithDNSRecordsType(value configv1.DNSRecordsType) *NutanixPlatformStatusApplyConfiguration { - b.DNSRecordsType = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismelementendpoint.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismelementendpoint.go deleted file mode 100644 index 82fd902fd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismelementendpoint.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NutanixPrismElementEndpointApplyConfiguration represents a declarative configuration of the NutanixPrismElementEndpoint type for use -// with apply. -// -// NutanixPrismElementEndpoint holds the name and endpoint data for a Prism Element (cluster) -type NutanixPrismElementEndpointApplyConfiguration struct { - // name is the name of the Prism Element (cluster). This value will correspond with - // the cluster field configured on other resources (eg Machines, PVCs, etc). - Name *string `json:"name,omitempty"` - // endpoint holds the endpoint address and port data of the Prism Element (cluster). - // When a cluster-wide proxy is installed, by default, this endpoint will be accessed via the proxy. - // Should you wish for communication with this endpoint not to be proxied, please add the endpoint to the - // proxy spec.noProxy list. - Endpoint *NutanixPrismEndpointApplyConfiguration `json:"endpoint,omitempty"` -} - -// NutanixPrismElementEndpointApplyConfiguration constructs a declarative configuration of the NutanixPrismElementEndpoint type for use with -// apply. -func NutanixPrismElementEndpoint() *NutanixPrismElementEndpointApplyConfiguration { - return &NutanixPrismElementEndpointApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NutanixPrismElementEndpointApplyConfiguration) WithName(value string) *NutanixPrismElementEndpointApplyConfiguration { - b.Name = &value - return b -} - -// WithEndpoint sets the Endpoint field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Endpoint field is set to the value of the last call. -func (b *NutanixPrismElementEndpointApplyConfiguration) WithEndpoint(value *NutanixPrismEndpointApplyConfiguration) *NutanixPrismElementEndpointApplyConfiguration { - b.Endpoint = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismendpoint.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismendpoint.go deleted file mode 100644 index 8df7c656d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixprismendpoint.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NutanixPrismEndpointApplyConfiguration represents a declarative configuration of the NutanixPrismEndpoint type for use -// with apply. -// -// NutanixPrismEndpoint holds the endpoint address and port to access the Nutanix Prism Central or Element (cluster) -type NutanixPrismEndpointApplyConfiguration struct { - // address is the endpoint address (DNS name or IP address) of the Nutanix Prism Central or Element (cluster) - Address *string `json:"address,omitempty"` - // port is the port number to access the Nutanix Prism Central or Element (cluster) - Port *int32 `json:"port,omitempty"` -} - -// NutanixPrismEndpointApplyConfiguration constructs a declarative configuration of the NutanixPrismEndpoint type for use with -// apply. -func NutanixPrismEndpoint() *NutanixPrismEndpointApplyConfiguration { - return &NutanixPrismEndpointApplyConfiguration{} -} - -// WithAddress sets the Address field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Address field is set to the value of the last call. -func (b *NutanixPrismEndpointApplyConfiguration) WithAddress(value string) *NutanixPrismEndpointApplyConfiguration { - b.Address = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *NutanixPrismEndpointApplyConfiguration) WithPort(value int32) *NutanixPrismEndpointApplyConfiguration { - b.Port = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixresourceidentifier.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixresourceidentifier.go deleted file mode 100644 index 35ac7b08f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/nutanixresourceidentifier.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// NutanixResourceIdentifierApplyConfiguration represents a declarative configuration of the NutanixResourceIdentifier type for use -// with apply. -// -// NutanixResourceIdentifier holds the identity of a Nutanix PC resource (cluster, image, subnet, etc.) -type NutanixResourceIdentifierApplyConfiguration struct { - // type is the identifier type to use for this resource. - Type *configv1.NutanixIdentifierType `json:"type,omitempty"` - // uuid is the UUID of the resource in the PC. It cannot be empty if the type is UUID. - UUID *string `json:"uuid,omitempty"` - // name is the resource name in the PC. It cannot be empty if the type is Name. - Name *string `json:"name,omitempty"` -} - -// NutanixResourceIdentifierApplyConfiguration constructs a declarative configuration of the NutanixResourceIdentifier type for use with -// apply. -func NutanixResourceIdentifier() *NutanixResourceIdentifierApplyConfiguration { - return &NutanixResourceIdentifierApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *NutanixResourceIdentifierApplyConfiguration) WithType(value configv1.NutanixIdentifierType) *NutanixResourceIdentifierApplyConfiguration { - b.Type = &value - return b -} - -// WithUUID sets the UUID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UUID field is set to the value of the last call. -func (b *NutanixResourceIdentifierApplyConfiguration) WithUUID(value string) *NutanixResourceIdentifierApplyConfiguration { - b.UUID = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NutanixResourceIdentifierApplyConfiguration) WithName(value string) *NutanixResourceIdentifierApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauth.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauth.go deleted file mode 100644 index 05ca60505..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauth.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OAuthApplyConfiguration represents a declarative configuration of the OAuth type for use -// with apply. -// -// 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. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type OAuthApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *OAuthSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1.OAuthStatus `json:"status,omitempty"` -} - -// OAuth constructs a declarative configuration of the OAuth type for use with -// apply. -func OAuth(name string) *OAuthApplyConfiguration { - b := &OAuthApplyConfiguration{} - b.WithName(name) - b.WithKind("OAuth") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractOAuthFrom extracts the applied configuration owned by fieldManager from -// oAuth for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// oAuth must be a unmodified OAuth API object that was retrieved from the Kubernetes API. -// ExtractOAuthFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOAuthFrom(oAuth *configv1.OAuth, fieldManager string, subresource string) (*OAuthApplyConfiguration, error) { - b := &OAuthApplyConfiguration{} - err := managedfields.ExtractInto(oAuth, internal.Parser().Type("com.github.openshift.api.config.v1.OAuth"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(oAuth.Name) - - b.WithKind("OAuth") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractOAuth extracts the applied configuration owned by fieldManager from -// oAuth. If no managedFields are found in oAuth for fieldManager, a -// OAuthApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// oAuth must be a unmodified OAuth API object that was retrieved from the Kubernetes API. -// ExtractOAuth provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOAuth(oAuth *configv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { - return ExtractOAuthFrom(oAuth, fieldManager, "") -} - -// ExtractOAuthStatus extracts the applied configuration owned by fieldManager from -// oAuth for the status subresource. -func ExtractOAuthStatus(oAuth *configv1.OAuth, fieldManager string) (*OAuthApplyConfiguration, error) { - return ExtractOAuthFrom(oAuth, fieldManager, "status") -} - -func (b OAuthApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithKind(value string) *OAuthApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithAPIVersion(value string) *OAuthApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithName(value string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithGenerateName(value string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithNamespace(value string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithUID(value types.UID) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithResourceVersion(value string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithGeneration(value int64) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *OAuthApplyConfiguration) WithLabels(entries map[string]string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *OAuthApplyConfiguration) WithAnnotations(entries map[string]string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OAuthApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *OAuthApplyConfiguration) WithFinalizers(values ...string) *OAuthApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *OAuthApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithSpec(value *OAuthSpecApplyConfiguration) *OAuthApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OAuthApplyConfiguration) WithStatus(value configv1.OAuthStatus) *OAuthApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *OAuthApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *OAuthApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *OAuthApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *OAuthApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthremoteconnectioninfo.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthremoteconnectioninfo.go deleted file mode 100644 index 7d5270309..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthremoteconnectioninfo.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OAuthRemoteConnectionInfoApplyConfiguration represents a declarative configuration of the OAuthRemoteConnectionInfo type for use -// with apply. -// -// OAuthRemoteConnectionInfo holds information necessary for establishing a remote connection -type OAuthRemoteConnectionInfoApplyConfiguration struct { - // url is the remote URL to connect to - URL *string `json:"url,omitempty"` - // 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. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` - // 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. - TLSClientCert *SecretNameReferenceApplyConfiguration `json:"tlsClientCert,omitempty"` - // 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. - TLSClientKey *SecretNameReferenceApplyConfiguration `json:"tlsClientKey,omitempty"` -} - -// OAuthRemoteConnectionInfoApplyConfiguration constructs a declarative configuration of the OAuthRemoteConnectionInfo type for use with -// apply. -func OAuthRemoteConnectionInfo() *OAuthRemoteConnectionInfoApplyConfiguration { - return &OAuthRemoteConnectionInfoApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *OAuthRemoteConnectionInfoApplyConfiguration) WithURL(value string) *OAuthRemoteConnectionInfoApplyConfiguration { - b.URL = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *OAuthRemoteConnectionInfoApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *OAuthRemoteConnectionInfoApplyConfiguration { - b.CA = value - return b -} - -// WithTLSClientCert sets the TLSClientCert field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientCert field is set to the value of the last call. -func (b *OAuthRemoteConnectionInfoApplyConfiguration) WithTLSClientCert(value *SecretNameReferenceApplyConfiguration) *OAuthRemoteConnectionInfoApplyConfiguration { - b.TLSClientCert = value - return b -} - -// WithTLSClientKey sets the TLSClientKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSClientKey field is set to the value of the last call. -func (b *OAuthRemoteConnectionInfoApplyConfiguration) WithTLSClientKey(value *SecretNameReferenceApplyConfiguration) *OAuthRemoteConnectionInfoApplyConfiguration { - b.TLSClientKey = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthspec.go deleted file mode 100644 index 1ea678273..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthspec.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OAuthSpecApplyConfiguration represents a declarative configuration of the OAuthSpec type for use -// with apply. -// -// OAuthSpec contains desired cluster auth configuration -type OAuthSpecApplyConfiguration struct { - // identityProviders is an ordered list of ways for a user to identify themselves. - // When this list is empty, no identities are provisioned for users. - IdentityProviders []IdentityProviderApplyConfiguration `json:"identityProviders,omitempty"` - // tokenConfig contains options for authorization and access tokens - TokenConfig *TokenConfigApplyConfiguration `json:"tokenConfig,omitempty"` - // templates allow you to customize pages like the login page. - Templates *OAuthTemplatesApplyConfiguration `json:"templates,omitempty"` -} - -// OAuthSpecApplyConfiguration constructs a declarative configuration of the OAuthSpec type for use with -// apply. -func OAuthSpec() *OAuthSpecApplyConfiguration { - return &OAuthSpecApplyConfiguration{} -} - -// WithIdentityProviders adds the given value to the IdentityProviders field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IdentityProviders field. -func (b *OAuthSpecApplyConfiguration) WithIdentityProviders(values ...*IdentityProviderApplyConfiguration) *OAuthSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithIdentityProviders") - } - b.IdentityProviders = append(b.IdentityProviders, *values[i]) - } - return b -} - -// WithTokenConfig sets the TokenConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TokenConfig field is set to the value of the last call. -func (b *OAuthSpecApplyConfiguration) WithTokenConfig(value *TokenConfigApplyConfiguration) *OAuthSpecApplyConfiguration { - b.TokenConfig = value - return b -} - -// WithTemplates sets the Templates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Templates field is set to the value of the last call. -func (b *OAuthSpecApplyConfiguration) WithTemplates(value *OAuthTemplatesApplyConfiguration) *OAuthSpecApplyConfiguration { - b.Templates = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthtemplates.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthtemplates.go deleted file mode 100644 index 85ec763fc..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oauthtemplates.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OAuthTemplatesApplyConfiguration represents a declarative configuration of the OAuthTemplates type for use -// with apply. -// -// OAuthTemplates allow for customization of pages like the login page -type OAuthTemplatesApplyConfiguration struct { - // 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. - Login *SecretNameReferenceApplyConfiguration `json:"login,omitempty"` - // 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. - ProviderSelection *SecretNameReferenceApplyConfiguration `json:"providerSelection,omitempty"` - // 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. - Error *SecretNameReferenceApplyConfiguration `json:"error,omitempty"` -} - -// OAuthTemplatesApplyConfiguration constructs a declarative configuration of the OAuthTemplates type for use with -// apply. -func OAuthTemplates() *OAuthTemplatesApplyConfiguration { - return &OAuthTemplatesApplyConfiguration{} -} - -// WithLogin sets the Login field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Login field is set to the value of the last call. -func (b *OAuthTemplatesApplyConfiguration) WithLogin(value *SecretNameReferenceApplyConfiguration) *OAuthTemplatesApplyConfiguration { - b.Login = value - return b -} - -// WithProviderSelection sets the ProviderSelection field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderSelection field is set to the value of the last call. -func (b *OAuthTemplatesApplyConfiguration) WithProviderSelection(value *SecretNameReferenceApplyConfiguration) *OAuthTemplatesApplyConfiguration { - b.ProviderSelection = value - return b -} - -// WithError sets the Error field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Error field is set to the value of the last call. -func (b *OAuthTemplatesApplyConfiguration) WithError(value *SecretNameReferenceApplyConfiguration) *OAuthTemplatesApplyConfiguration { - b.Error = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/objectreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/objectreference.go deleted file mode 100644 index 96ce2cb96..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/objectreference.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ObjectReferenceApplyConfiguration represents a declarative configuration of the ObjectReference type for use -// with apply. -// -// ObjectReference contains enough information to let you inspect or modify the referred object. -type ObjectReferenceApplyConfiguration struct { - // group of the referent. - Group *string `json:"group,omitempty"` - // resource of the referent. - Resource *string `json:"resource,omitempty"` - // namespace of the referent. - Namespace *string `json:"namespace,omitempty"` - // name of the referent. - Name *string `json:"name,omitempty"` -} - -// ObjectReferenceApplyConfiguration constructs a declarative configuration of the ObjectReference type for use with -// apply. -func ObjectReference() *ObjectReferenceApplyConfiguration { - return &ObjectReferenceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *ObjectReferenceApplyConfiguration) WithGroup(value string) *ObjectReferenceApplyConfiguration { - b.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *ObjectReferenceApplyConfiguration) WithResource(value string) *ObjectReferenceApplyConfiguration { - b.Resource = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ObjectReferenceApplyConfiguration) WithNamespace(value string) *ObjectReferenceApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ObjectReferenceApplyConfiguration) WithName(value string) *ObjectReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientconfig.go deleted file mode 100644 index a3d4e7471..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientconfig.go +++ /dev/null @@ -1,90 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OIDCClientConfigApplyConfiguration represents a declarative configuration of the OIDCClientConfig type for use -// with apply. -// -// OIDCClientConfig configures how platform clients interact with identity providers as an authentication method. -type OIDCClientConfigApplyConfiguration struct { - // componentName is a required field that specifies the name of the platform component being configured to use the identity provider as an authentication mode. - // - // It is used in combination with componentNamespace as a unique identifier. - // - // componentName must not be an empty string ("") and must not exceed 256 characters in length. - ComponentName *string `json:"componentName,omitempty"` - // componentNamespace is a required field that specifies the namespace in which the platform component being configured to use the identity provider as an authentication mode is running. - // - // It is used in combination with componentName as a unique identifier. - // - // componentNamespace must not be an empty string ("") and must not exceed 63 characters in length. - ComponentNamespace *string `json:"componentNamespace,omitempty"` - // clientID is a required field that configures the client identifier, from the identity provider, that the platform component uses for authentication requests made to the identity provider. - // The identity provider must accept this identifier for platform components to be able to use the identity provider as an authentication mode. - // - // clientID must not be an empty string (""). - ClientID *string `json:"clientID,omitempty"` - // clientSecret is an optional field that configures the client secret used by the platform component when making authentication requests to the identity provider. - // - // When not specified, no client secret will be used when making authentication requests to the identity provider. - // - // When specified, clientSecret references a Secret in the 'openshift-config' namespace that contains the client secret in the 'clientSecret' key of the '.data' field. - // - // The client secret will be used when making authentication requests to the identity provider. - // - // Public clients do not require a client secret but private clients do require a client secret to work with the identity provider. - ClientSecret *SecretNameReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // extraScopes is an optional field that configures the extra scopes that should be requested by the platform component when making authentication requests to the identity provider. - // This is useful if you have configured claim mappings that requires specific scopes to be requested beyond the standard OIDC scopes. - // - // When omitted, no additional scopes are requested. - ExtraScopes []string `json:"extraScopes,omitempty"` -} - -// OIDCClientConfigApplyConfiguration constructs a declarative configuration of the OIDCClientConfig type for use with -// apply. -func OIDCClientConfig() *OIDCClientConfigApplyConfiguration { - return &OIDCClientConfigApplyConfiguration{} -} - -// WithComponentName sets the ComponentName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ComponentName field is set to the value of the last call. -func (b *OIDCClientConfigApplyConfiguration) WithComponentName(value string) *OIDCClientConfigApplyConfiguration { - b.ComponentName = &value - return b -} - -// WithComponentNamespace sets the ComponentNamespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ComponentNamespace field is set to the value of the last call. -func (b *OIDCClientConfigApplyConfiguration) WithComponentNamespace(value string) *OIDCClientConfigApplyConfiguration { - b.ComponentNamespace = &value - return b -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *OIDCClientConfigApplyConfiguration) WithClientID(value string) *OIDCClientConfigApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *OIDCClientConfigApplyConfiguration) WithClientSecret(value *SecretNameReferenceApplyConfiguration) *OIDCClientConfigApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithExtraScopes adds the given value to the ExtraScopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExtraScopes field. -func (b *OIDCClientConfigApplyConfiguration) WithExtraScopes(values ...string) *OIDCClientConfigApplyConfiguration { - for i := range values { - b.ExtraScopes = append(b.ExtraScopes, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientreference.go deleted file mode 100644 index f99461c40..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientreference.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OIDCClientReferenceApplyConfiguration represents a declarative configuration of the OIDCClientReference type for use -// with apply. -// -// OIDCClientReference is a reference to a platform component -// client configuration. -type OIDCClientReferenceApplyConfiguration struct { - // oidcProviderName is a required reference to the 'name' of the identity provider configured in 'oidcProviders' that this client is associated with. - // - // oidcProviderName must not be an empty string (""). - OIDCProviderName *string `json:"oidcProviderName,omitempty"` - // issuerURL is a required field that specifies the URL of the identity provider that this client is configured to make requests against. - // - // issuerURL must use the 'https' scheme. - IssuerURL *string `json:"issuerURL,omitempty"` - // clientID is a required field that specifies the client identifier, from the identity provider, that the platform component is using for authentication requests made to the identity provider. - // - // clientID must not be empty. - ClientID *string `json:"clientID,omitempty"` -} - -// OIDCClientReferenceApplyConfiguration constructs a declarative configuration of the OIDCClientReference type for use with -// apply. -func OIDCClientReference() *OIDCClientReferenceApplyConfiguration { - return &OIDCClientReferenceApplyConfiguration{} -} - -// WithOIDCProviderName sets the OIDCProviderName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OIDCProviderName field is set to the value of the last call. -func (b *OIDCClientReferenceApplyConfiguration) WithOIDCProviderName(value string) *OIDCClientReferenceApplyConfiguration { - b.OIDCProviderName = &value - return b -} - -// WithIssuerURL sets the IssuerURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IssuerURL field is set to the value of the last call. -func (b *OIDCClientReferenceApplyConfiguration) WithIssuerURL(value string) *OIDCClientReferenceApplyConfiguration { - b.IssuerURL = &value - return b -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *OIDCClientReferenceApplyConfiguration) WithClientID(value string) *OIDCClientReferenceApplyConfiguration { - b.ClientID = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientstatus.go deleted file mode 100644 index 24b7cedb7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcclientstatus.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OIDCClientStatusApplyConfiguration represents a declarative configuration of the OIDCClientStatus type for use -// with apply. -// -// OIDCClientStatus represents the current state -// of platform components and how they interact with -// the configured identity providers. -type OIDCClientStatusApplyConfiguration struct { - // componentName is a required field that specifies the name of the platform component using the identity provider as an authentication mode. - // It is used in combination with componentNamespace as a unique identifier. - // - // componentName must not be an empty string ("") and must not exceed 256 characters in length. - ComponentName *string `json:"componentName,omitempty"` - // componentNamespace is a required field that specifies the namespace in which the platform component using the identity provider as an authentication mode is running. - // - // It is used in combination with componentName as a unique identifier. - // - // componentNamespace must not be an empty string ("") and must not exceed 63 characters in length. - ComponentNamespace *string `json:"componentNamespace,omitempty"` - // currentOIDCClients is an optional list of clients that the component is currently using. - // - // Entries must have unique issuerURL/clientID pairs. - CurrentOIDCClients []OIDCClientReferenceApplyConfiguration `json:"currentOIDCClients,omitempty"` - // consumingUsers is an optional list of ServiceAccounts requiring read permissions on the `clientSecret` secret. - // - // consumingUsers must not exceed 5 entries. - ConsumingUsers []configv1.ConsumingUser `json:"consumingUsers,omitempty"` - // conditions are used to communicate the state of the `oidcClients` entry. - // - // Supported conditions include Available, Degraded and Progressing. - // - // If Available is true, the component is successfully using the configured client. - // If Degraded is true, that means something has gone wrong trying to handle the client configuration. - // If Progressing is true, that means the component is taking some action related to the `oidcClients` entry. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// OIDCClientStatusApplyConfiguration constructs a declarative configuration of the OIDCClientStatus type for use with -// apply. -func OIDCClientStatus() *OIDCClientStatusApplyConfiguration { - return &OIDCClientStatusApplyConfiguration{} -} - -// WithComponentName sets the ComponentName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ComponentName field is set to the value of the last call. -func (b *OIDCClientStatusApplyConfiguration) WithComponentName(value string) *OIDCClientStatusApplyConfiguration { - b.ComponentName = &value - return b -} - -// WithComponentNamespace sets the ComponentNamespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ComponentNamespace field is set to the value of the last call. -func (b *OIDCClientStatusApplyConfiguration) WithComponentNamespace(value string) *OIDCClientStatusApplyConfiguration { - b.ComponentNamespace = &value - return b -} - -// WithCurrentOIDCClients adds the given value to the CurrentOIDCClients field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CurrentOIDCClients field. -func (b *OIDCClientStatusApplyConfiguration) WithCurrentOIDCClients(values ...*OIDCClientReferenceApplyConfiguration) *OIDCClientStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithCurrentOIDCClients") - } - b.CurrentOIDCClients = append(b.CurrentOIDCClients, *values[i]) - } - return b -} - -// WithConsumingUsers adds the given value to the ConsumingUsers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConsumingUsers field. -func (b *OIDCClientStatusApplyConfiguration) WithConsumingUsers(values ...configv1.ConsumingUser) *OIDCClientStatusApplyConfiguration { - for i := range values { - b.ConsumingUsers = append(b.ConsumingUsers, values[i]) - } - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *OIDCClientStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *OIDCClientStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcprovider.go deleted file mode 100644 index 4fb1c97eb..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/oidcprovider.go +++ /dev/null @@ -1,132 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OIDCProviderApplyConfiguration represents a declarative configuration of the OIDCProvider type for use -// with apply. -type OIDCProviderApplyConfiguration struct { - // name is a required field that configures the unique human-readable identifier associated with the identity provider. - // It is used to distinguish between multiple identity providers and has no impact on token validation or authentication mechanics. - // - // name must not be an empty string (""). - Name *string `json:"name,omitempty"` - // issuer is a required field that configures how the platform interacts with the identity provider and how tokens issued from the identity provider are evaluated by the Kubernetes API server. - Issuer *TokenIssuerApplyConfiguration `json:"issuer,omitempty"` - // oidcClients is an optional field that configures how on-cluster, platform clients should request tokens from the identity provider. - // oidcClients must not exceed 20 entries and entries must have unique namespace/name pairs. - OIDCClients []OIDCClientConfigApplyConfiguration `json:"oidcClients,omitempty"` - // claimMappings is a required field that configures the rules to be used by the Kubernetes API server for translating claims in a JWT token, issued by the identity provider, to a cluster identity. - ClaimMappings *TokenClaimMappingsApplyConfiguration `json:"claimMappings,omitempty"` - // claimValidationRules is an optional field that configures the rules to be used by the Kubernetes API server for validating the claims in a JWT token issued by the identity provider. - // - // Validation rules are joined via an AND operation. - ClaimValidationRules []TokenClaimValidationRuleApplyConfiguration `json:"claimValidationRules,omitempty"` - // userValidationRules is an optional field that configures the set of rules used to validate the cluster user identity that was constructed via mapping token claims to user identity attributes. - // Rules are CEL expressions that must evaluate to 'true' for authentication to succeed. - // If any rule in the chain of rules evaluates to 'false', authentication will fail. - // When specified, at least one rule must be specified and no more than 64 rules may be specified. - UserValidationRules []TokenUserValidationRuleApplyConfiguration `json:"userValidationRules,omitempty"` - // externalClaimsSources is an optional field that can be used to configure - // sources, external to the token provided in a request, in which claims - // should be fetched from and made available to the claim mapping process - // that is used to build the identity of a token holder. - // - // For example, fetching additional user metadata from an OIDC provider's UserInfo endpoint. - // - // When not specified, only claims present in the token itself will be available - // in the claim mapping process. - // - // When specified, at least one external claim source must be specified and no more than 5 - // sources may be specified. - // All external claim sources must have unique claim mappings. - // When an external source responds and resolves additional claims successfully, they will - // be made available as claims during the claim mapping process. - // Externally sourced claims with the same name as a claim existing within the token will - // overwrite the claim data from the token with the externally sourced information. - // If an external source does not respond, responds with an error, or the additional - // claim data cannot be resolved from the response successfully it will not be - // included in the claim data passed to the claim mapping process. - ExternalClaimsSources []ExternalClaimsSourceApplyConfiguration `json:"externalClaimsSources,omitempty"` -} - -// OIDCProviderApplyConfiguration constructs a declarative configuration of the OIDCProvider type for use with -// apply. -func OIDCProvider() *OIDCProviderApplyConfiguration { - return &OIDCProviderApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OIDCProviderApplyConfiguration) WithName(value string) *OIDCProviderApplyConfiguration { - b.Name = &value - return b -} - -// WithIssuer sets the Issuer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Issuer field is set to the value of the last call. -func (b *OIDCProviderApplyConfiguration) WithIssuer(value *TokenIssuerApplyConfiguration) *OIDCProviderApplyConfiguration { - b.Issuer = value - return b -} - -// WithOIDCClients adds the given value to the OIDCClients field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OIDCClients field. -func (b *OIDCProviderApplyConfiguration) WithOIDCClients(values ...*OIDCClientConfigApplyConfiguration) *OIDCProviderApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOIDCClients") - } - b.OIDCClients = append(b.OIDCClients, *values[i]) - } - return b -} - -// WithClaimMappings sets the ClaimMappings field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClaimMappings field is set to the value of the last call. -func (b *OIDCProviderApplyConfiguration) WithClaimMappings(value *TokenClaimMappingsApplyConfiguration) *OIDCProviderApplyConfiguration { - b.ClaimMappings = value - return b -} - -// WithClaimValidationRules adds the given value to the ClaimValidationRules field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ClaimValidationRules field. -func (b *OIDCProviderApplyConfiguration) WithClaimValidationRules(values ...*TokenClaimValidationRuleApplyConfiguration) *OIDCProviderApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithClaimValidationRules") - } - b.ClaimValidationRules = append(b.ClaimValidationRules, *values[i]) - } - return b -} - -// WithUserValidationRules adds the given value to the UserValidationRules field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the UserValidationRules field. -func (b *OIDCProviderApplyConfiguration) WithUserValidationRules(values ...*TokenUserValidationRuleApplyConfiguration) *OIDCProviderApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithUserValidationRules") - } - b.UserValidationRules = append(b.UserValidationRules, *values[i]) - } - return b -} - -// WithExternalClaimsSources adds the given value to the ExternalClaimsSources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExternalClaimsSources field. -func (b *OIDCProviderApplyConfiguration) WithExternalClaimsSources(values ...*ExternalClaimsSourceApplyConfiguration) *OIDCProviderApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithExternalClaimsSources") - } - b.ExternalClaimsSources = append(b.ExternalClaimsSources, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openidclaims.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openidclaims.go deleted file mode 100644 index b1edbc525..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openidclaims.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OpenIDClaimsApplyConfiguration represents a declarative configuration of the OpenIDClaims type for use -// with apply. -// -// OpenIDClaims contains a list of OpenID claims to use when authenticating with an OpenID identity provider -type OpenIDClaimsApplyConfiguration 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 sub claim - PreferredUsername []string `json:"preferredUsername,omitempty"` - // 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 - Name []string `json:"name,omitempty"` - // 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 - Email []string `json:"email,omitempty"` - // groups is the list of claims value of which should be used to synchronize groups - // from the OIDC provider to OpenShift for the user. - // If multiple claims are specified, the first one with a non-empty value is used. - Groups []configv1.OpenIDClaim `json:"groups,omitempty"` -} - -// OpenIDClaimsApplyConfiguration constructs a declarative configuration of the OpenIDClaims type for use with -// apply. -func OpenIDClaims() *OpenIDClaimsApplyConfiguration { - return &OpenIDClaimsApplyConfiguration{} -} - -// WithPreferredUsername adds the given value to the PreferredUsername field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PreferredUsername field. -func (b *OpenIDClaimsApplyConfiguration) WithPreferredUsername(values ...string) *OpenIDClaimsApplyConfiguration { - for i := range values { - b.PreferredUsername = append(b.PreferredUsername, values[i]) - } - return b -} - -// WithName adds the given value to the Name field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Name field. -func (b *OpenIDClaimsApplyConfiguration) WithName(values ...string) *OpenIDClaimsApplyConfiguration { - for i := range values { - b.Name = append(b.Name, values[i]) - } - return b -} - -// WithEmail adds the given value to the Email field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Email field. -func (b *OpenIDClaimsApplyConfiguration) WithEmail(values ...string) *OpenIDClaimsApplyConfiguration { - for i := range values { - b.Email = append(b.Email, values[i]) - } - return b -} - -// WithGroups adds the given value to the Groups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Groups field. -func (b *OpenIDClaimsApplyConfiguration) WithGroups(values ...configv1.OpenIDClaim) *OpenIDClaimsApplyConfiguration { - for i := range values { - b.Groups = append(b.Groups, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openididentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openididentityprovider.go deleted file mode 100644 index 83029b444..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openididentityprovider.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OpenIDIdentityProviderApplyConfiguration represents a declarative configuration of the OpenIDIdentityProvider type for use -// with apply. -// -// OpenIDIdentityProvider provides identities for users authenticating using OpenID credentials -type OpenIDIdentityProviderApplyConfiguration struct { - // clientID is the oauth client ID - ClientID *string `json:"clientID,omitempty"` - // 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 *SecretNameReferenceApplyConfiguration `json:"clientSecret,omitempty"` - // 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. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` - // extraScopes are any scopes to request in addition to the standard "openid" scope. - ExtraScopes []string `json:"extraScopes,omitempty"` - // extraAuthorizeParameters are any custom parameters to add to the authorize request. - ExtraAuthorizeParameters map[string]string `json:"extraAuthorizeParameters,omitempty"` - // issuer is the URL that the OpenID Provider asserts as its Issuer Identifier. - // It must use the https scheme with no query or fragment component. - Issuer *string `json:"issuer,omitempty"` - // claims mappings - Claims *OpenIDClaimsApplyConfiguration `json:"claims,omitempty"` -} - -// OpenIDIdentityProviderApplyConfiguration constructs a declarative configuration of the OpenIDIdentityProvider type for use with -// apply. -func OpenIDIdentityProvider() *OpenIDIdentityProviderApplyConfiguration { - return &OpenIDIdentityProviderApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *OpenIDIdentityProviderApplyConfiguration) WithClientID(value string) *OpenIDIdentityProviderApplyConfiguration { - b.ClientID = &value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *OpenIDIdentityProviderApplyConfiguration) WithClientSecret(value *SecretNameReferenceApplyConfiguration) *OpenIDIdentityProviderApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *OpenIDIdentityProviderApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *OpenIDIdentityProviderApplyConfiguration { - b.CA = value - return b -} - -// WithExtraScopes adds the given value to the ExtraScopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExtraScopes field. -func (b *OpenIDIdentityProviderApplyConfiguration) WithExtraScopes(values ...string) *OpenIDIdentityProviderApplyConfiguration { - for i := range values { - b.ExtraScopes = append(b.ExtraScopes, values[i]) - } - return b -} - -// WithExtraAuthorizeParameters puts the entries into the ExtraAuthorizeParameters field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the ExtraAuthorizeParameters field, -// overwriting an existing map entries in ExtraAuthorizeParameters field with the same key. -func (b *OpenIDIdentityProviderApplyConfiguration) WithExtraAuthorizeParameters(entries map[string]string) *OpenIDIdentityProviderApplyConfiguration { - if b.ExtraAuthorizeParameters == nil && len(entries) > 0 { - b.ExtraAuthorizeParameters = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ExtraAuthorizeParameters[k] = v - } - return b -} - -// WithIssuer sets the Issuer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Issuer field is set to the value of the last call. -func (b *OpenIDIdentityProviderApplyConfiguration) WithIssuer(value string) *OpenIDIdentityProviderApplyConfiguration { - b.Issuer = &value - return b -} - -// WithClaims sets the Claims field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claims field is set to the value of the last call. -func (b *OpenIDIdentityProviderApplyConfiguration) WithClaims(value *OpenIDClaimsApplyConfiguration) *OpenIDIdentityProviderApplyConfiguration { - b.Claims = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go deleted file mode 100644 index bec239f9b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformloadbalancer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OpenStackPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the OpenStackPlatformLoadBalancer type for use -// with apply. -// -// OpenStackPlatformLoadBalancer defines the load balancer used by the cluster on OpenStack platform. -type OpenStackPlatformLoadBalancerApplyConfiguration struct { - // type defines the type of load balancer used by the cluster on OpenStack platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` -} - -// OpenStackPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the OpenStackPlatformLoadBalancer type for use with -// apply. -func OpenStackPlatformLoadBalancer() *OpenStackPlatformLoadBalancerApplyConfiguration { - return &OpenStackPlatformLoadBalancerApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *OpenStackPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *OpenStackPlatformLoadBalancerApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformspec.go deleted file mode 100644 index 863d1b0ea..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformspec.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OpenStackPlatformSpecApplyConfiguration represents a declarative configuration of the OpenStackPlatformSpec type for use -// with apply. -// -// OpenStackPlatformSpec holds the desired state of the OpenStack infrastructure provider. -// This only includes fields that can be modified in the cluster. -type OpenStackPlatformSpecApplyConfiguration struct { - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.apiServerInternalIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - APIServerInternalIPs []configv1.IP `json:"apiServerInternalIPs,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.ingressIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - IngressIPs []configv1.IP `json:"ingressIPs,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster - // nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6, - // for example "10.0.0.0/8" or "fd00::/8". - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// OpenStackPlatformSpecApplyConfiguration constructs a declarative configuration of the OpenStackPlatformSpec type for use with -// apply. -func OpenStackPlatformSpec() *OpenStackPlatformSpecApplyConfiguration { - return &OpenStackPlatformSpecApplyConfiguration{} -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...configv1.IP) *OpenStackPlatformSpecApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithIngressIPs(values ...configv1.IP) *OpenStackPlatformSpecApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *OpenStackPlatformSpecApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *OpenStackPlatformSpecApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformstatus.go deleted file mode 100644 index 7ecab5117..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/openstackplatformstatus.go +++ /dev/null @@ -1,148 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OpenStackPlatformStatusApplyConfiguration represents a declarative configuration of the OpenStackPlatformStatus type for use -// with apply. -// -// OpenStackPlatformStatus holds the current status of the OpenStack infrastructure provider. -type OpenStackPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"` - // cloudName is the name of the desired OpenStack cloud in the - // client configuration file (`clouds.yaml`). - CloudName *string `json:"cloudName,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP *string `json:"ingressIP,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - IngressIPs []string `json:"ingressIPs,omitempty"` - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // OpenStack deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP *string `json:"nodeDNSIP,omitempty"` - // loadBalancer defines how the load balancer used by the cluster is configured. - LoadBalancer *OpenStackPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` - // dnsRecordsType determines whether records for api, api-int, and ingress - // are provided by the internal DNS service or externally. - // Allowed values are `Internal`, `External`, and omitted. - // When set to `Internal`, records are provided by the internal infrastructure and - // no additional user configuration is required for the cluster to function. - // When set to `External`, records are not provided by the internal infrastructure - // and must be configured by the user on a DNS server outside the cluster. - // Cluster nodes must use this external server for their upstream DNS requests. - // This value may only be set when loadBalancer.type is set to UserManaged. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `Internal`. - DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster nodes. - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// OpenStackPlatformStatusApplyConfiguration constructs a declarative configuration of the OpenStackPlatformStatus type for use with -// apply. -func OpenStackPlatformStatus() *OpenStackPlatformStatusApplyConfiguration { - return &OpenStackPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *OpenStackPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *OpenStackPlatformStatusApplyConfiguration) WithAPIServerInternalIPs(values ...string) *OpenStackPlatformStatusApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithCloudName sets the CloudName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CloudName field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithCloudName(value string) *OpenStackPlatformStatusApplyConfiguration { - b.CloudName = &value - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithIngressIP(value string) *OpenStackPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *OpenStackPlatformStatusApplyConfiguration) WithIngressIPs(values ...string) *OpenStackPlatformStatusApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithNodeDNSIP sets the NodeDNSIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDNSIP field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithNodeDNSIP(value string) *OpenStackPlatformStatusApplyConfiguration { - b.NodeDNSIP = &value - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithLoadBalancer(value *OpenStackPlatformLoadBalancerApplyConfiguration) *OpenStackPlatformStatusApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSRecordsType field is set to the value of the last call. -func (b *OpenStackPlatformStatusApplyConfiguration) WithDNSRecordsType(value configv1.DNSRecordsType) *OpenStackPlatformStatusApplyConfiguration { - b.DNSRecordsType = &value - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *OpenStackPlatformStatusApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *OpenStackPlatformStatusApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operandversion.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operandversion.go deleted file mode 100644 index 67d5c56c1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operandversion.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OperandVersionApplyConfiguration represents a declarative configuration of the OperandVersion type for use -// with apply. -type OperandVersionApplyConfiguration struct { - // name is the name of the particular operand this version is for. It usually matches container images, not operators. - Name *string `json:"name,omitempty"` - // version indicates which version of a particular operand is currently being managed. It must always match the Available - // operand. 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,omitempty"` -} - -// OperandVersionApplyConfiguration constructs a declarative configuration of the OperandVersion type for use with -// apply. -func OperandVersion() *OperandVersionApplyConfiguration { - return &OperandVersionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OperandVersionApplyConfiguration) WithName(value string) *OperandVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *OperandVersionApplyConfiguration) WithVersion(value string) *OperandVersionApplyConfiguration { - b.Version = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhub.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhub.go deleted file mode 100644 index 5f86f3b57..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhub.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OperatorHubApplyConfiguration represents a declarative configuration of the OperatorHub type for use -// with apply. -// -// OperatorHub is the Schema for the operatorhubs API. It can be used to change -// the state of the default hub sources for OperatorHub on the cluster from -// enabled to disabled and vice versa. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type OperatorHubApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OperatorHubSpecApplyConfiguration `json:"spec,omitempty"` - Status *OperatorHubStatusApplyConfiguration `json:"status,omitempty"` -} - -// OperatorHub constructs a declarative configuration of the OperatorHub type for use with -// apply. -func OperatorHub(name string) *OperatorHubApplyConfiguration { - b := &OperatorHubApplyConfiguration{} - b.WithName(name) - b.WithKind("OperatorHub") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractOperatorHubFrom extracts the applied configuration owned by fieldManager from -// operatorHub for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// operatorHub must be a unmodified OperatorHub API object that was retrieved from the Kubernetes API. -// ExtractOperatorHubFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOperatorHubFrom(operatorHub *configv1.OperatorHub, fieldManager string, subresource string) (*OperatorHubApplyConfiguration, error) { - b := &OperatorHubApplyConfiguration{} - err := managedfields.ExtractInto(operatorHub, internal.Parser().Type("com.github.openshift.api.config.v1.OperatorHub"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(operatorHub.Name) - - b.WithKind("OperatorHub") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractOperatorHub extracts the applied configuration owned by fieldManager from -// operatorHub. If no managedFields are found in operatorHub for fieldManager, a -// OperatorHubApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// operatorHub must be a unmodified OperatorHub API object that was retrieved from the Kubernetes API. -// ExtractOperatorHub provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOperatorHub(operatorHub *configv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { - return ExtractOperatorHubFrom(operatorHub, fieldManager, "") -} - -// ExtractOperatorHubStatus extracts the applied configuration owned by fieldManager from -// operatorHub for the status subresource. -func ExtractOperatorHubStatus(operatorHub *configv1.OperatorHub, fieldManager string) (*OperatorHubApplyConfiguration, error) { - return ExtractOperatorHubFrom(operatorHub, fieldManager, "status") -} - -func (b OperatorHubApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithKind(value string) *OperatorHubApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithAPIVersion(value string) *OperatorHubApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithName(value string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithGenerateName(value string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithNamespace(value string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithUID(value types.UID) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithResourceVersion(value string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithGeneration(value int64) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *OperatorHubApplyConfiguration) WithLabels(entries map[string]string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *OperatorHubApplyConfiguration) WithAnnotations(entries map[string]string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OperatorHubApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *OperatorHubApplyConfiguration) WithFinalizers(values ...string) *OperatorHubApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *OperatorHubApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithSpec(value *OperatorHubSpecApplyConfiguration) *OperatorHubApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OperatorHubApplyConfiguration) WithStatus(value *OperatorHubStatusApplyConfiguration) *OperatorHubApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *OperatorHubApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *OperatorHubApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *OperatorHubApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *OperatorHubApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubspec.go deleted file mode 100644 index dac0696c5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubspec.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OperatorHubSpecApplyConfiguration represents a declarative configuration of the OperatorHubSpec type for use -// with apply. -// -// OperatorHubSpec defines the desired state of OperatorHub -type OperatorHubSpecApplyConfiguration struct { - // disableAllDefaultSources allows you to disable all the default hub - // sources. If this is true, a specific entry in sources can be used to - // enable a default source. If this is false, a specific entry in - // sources can be used to disable or enable a default source. - DisableAllDefaultSources *bool `json:"disableAllDefaultSources,omitempty"` - // sources is the list of default hub sources and their configuration. - // If the list is empty, it implies that the default hub sources are - // enabled on the cluster unless disableAllDefaultSources is true. - // If disableAllDefaultSources is true and sources is not empty, - // the configuration present in sources will take precedence. The list of - // default hub sources and their current state will always be reflected in - // the status block. - Sources []HubSourceApplyConfiguration `json:"sources,omitempty"` -} - -// OperatorHubSpecApplyConfiguration constructs a declarative configuration of the OperatorHubSpec type for use with -// apply. -func OperatorHubSpec() *OperatorHubSpecApplyConfiguration { - return &OperatorHubSpecApplyConfiguration{} -} - -// WithDisableAllDefaultSources sets the DisableAllDefaultSources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DisableAllDefaultSources field is set to the value of the last call. -func (b *OperatorHubSpecApplyConfiguration) WithDisableAllDefaultSources(value bool) *OperatorHubSpecApplyConfiguration { - b.DisableAllDefaultSources = &value - return b -} - -// WithSources adds the given value to the Sources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Sources field. -func (b *OperatorHubSpecApplyConfiguration) WithSources(values ...*HubSourceApplyConfiguration) *OperatorHubSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSources") - } - b.Sources = append(b.Sources, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubstatus.go deleted file mode 100644 index 26c8fc500..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/operatorhubstatus.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OperatorHubStatusApplyConfiguration represents a declarative configuration of the OperatorHubStatus type for use -// with apply. -// -// OperatorHubStatus defines the observed state of OperatorHub. The current -// state of the default hub sources will always be reflected here. -type OperatorHubStatusApplyConfiguration struct { - // sources encapsulates the result of applying the configuration for each - // hub source - Sources []HubSourceStatusApplyConfiguration `json:"sources,omitempty"` -} - -// OperatorHubStatusApplyConfiguration constructs a declarative configuration of the OperatorHubStatus type for use with -// apply. -func OperatorHubStatus() *OperatorHubStatusApplyConfiguration { - return &OperatorHubStatusApplyConfiguration{} -} - -// WithSources adds the given value to the Sources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Sources field. -func (b *OperatorHubStatusApplyConfiguration) WithSources(values ...*HubSourceStatusApplyConfiguration) *OperatorHubStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSources") - } - b.Sources = append(b.Sources, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go deleted file mode 100644 index 9b8aa08dd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformloadbalancer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OvirtPlatformLoadBalancerApplyConfiguration represents a declarative configuration of the OvirtPlatformLoadBalancer type for use -// with apply. -// -// OvirtPlatformLoadBalancer defines the load balancer used by the cluster on Ovirt platform. -type OvirtPlatformLoadBalancerApplyConfiguration struct { - // type defines the type of load balancer used by the cluster on Ovirt platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` -} - -// OvirtPlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the OvirtPlatformLoadBalancer type for use with -// apply. -func OvirtPlatformLoadBalancer() *OvirtPlatformLoadBalancerApplyConfiguration { - return &OvirtPlatformLoadBalancerApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *OvirtPlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *OvirtPlatformLoadBalancerApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformstatus.go deleted file mode 100644 index ba4603729..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/ovirtplatformstatus.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// OvirtPlatformStatusApplyConfiguration represents a declarative configuration of the OvirtPlatformStatus type for use -// with apply. -// -// OvirtPlatformStatus holds the current status of the oVirt infrastructure provider. -type OvirtPlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP *string `json:"ingressIP,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - IngressIPs []string `json:"ingressIPs,omitempty"` - // deprecated: as of 4.6, this field is no longer set or honored. It will be removed in a future release. - NodeDNSIP *string `json:"nodeDNSIP,omitempty"` - // loadBalancer defines how the load balancer used by the cluster is configured. - LoadBalancer *OvirtPlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` - // dnsRecordsType determines whether records for api, api-int, and ingress - // are provided by the internal DNS service or externally. - // Allowed values are `Internal`, `External`, and omitted. - // When set to `Internal`, records are provided by the internal infrastructure and - // no additional user configuration is required for the cluster to function. - // When set to `External`, records are not provided by the internal infrastructure - // and must be configured by the user on a DNS server outside the cluster. - // Cluster nodes must use this external server for their upstream DNS requests. - // This value may only be set when loadBalancer.type is set to UserManaged. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `Internal`. - DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"` -} - -// OvirtPlatformStatusApplyConfiguration constructs a declarative configuration of the OvirtPlatformStatus type for use with -// apply. -func OvirtPlatformStatus() *OvirtPlatformStatusApplyConfiguration { - return &OvirtPlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *OvirtPlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *OvirtPlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *OvirtPlatformStatusApplyConfiguration) WithAPIServerInternalIPs(values ...string) *OvirtPlatformStatusApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *OvirtPlatformStatusApplyConfiguration) WithIngressIP(value string) *OvirtPlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *OvirtPlatformStatusApplyConfiguration) WithIngressIPs(values ...string) *OvirtPlatformStatusApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithNodeDNSIP sets the NodeDNSIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDNSIP field is set to the value of the last call. -func (b *OvirtPlatformStatusApplyConfiguration) WithNodeDNSIP(value string) *OvirtPlatformStatusApplyConfiguration { - b.NodeDNSIP = &value - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *OvirtPlatformStatusApplyConfiguration) WithLoadBalancer(value *OvirtPlatformLoadBalancerApplyConfiguration) *OvirtPlatformStatusApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSRecordsType field is set to the value of the last call. -func (b *OvirtPlatformStatusApplyConfiguration) WithDNSRecordsType(value configv1.DNSRecordsType) *OvirtPlatformStatusApplyConfiguration { - b.DNSRecordsType = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeclaimreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeclaimreference.go deleted file mode 100644 index 9a557f2dd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeclaimreference.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PersistentVolumeClaimReferenceApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimReference type for use -// with apply. -// -// PersistentVolumeClaimReference is a reference to a PersistentVolumeClaim. -type PersistentVolumeClaimReferenceApplyConfiguration struct { - // name is the name of the PersistentVolumeClaim that will be used to store the Insights data archive. - // It is a string that follows the DNS1123 subdomain format. - // It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// PersistentVolumeClaimReferenceApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimReference type for use with -// apply. -func PersistentVolumeClaimReference() *PersistentVolumeClaimReferenceApplyConfiguration { - return &PersistentVolumeClaimReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PersistentVolumeClaimReferenceApplyConfiguration) WithName(value string) *PersistentVolumeClaimReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeconfig.go deleted file mode 100644 index ce5e58a99..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/persistentvolumeconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PersistentVolumeConfigApplyConfiguration represents a declarative configuration of the PersistentVolumeConfig type for use -// with apply. -// -// PersistentVolumeConfig provides configuration options for PersistentVolume storage. -type PersistentVolumeConfigApplyConfiguration struct { - // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. - // The PersistentVolumeClaim must be created in the openshift-insights namespace. - Claim *PersistentVolumeClaimReferenceApplyConfiguration `json:"claim,omitempty"` - // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default mount path is /var/lib/insights-operator - // The path may not exceed 1024 characters and must not contain a colon. - MountPath *string `json:"mountPath,omitempty"` -} - -// PersistentVolumeConfigApplyConfiguration constructs a declarative configuration of the PersistentVolumeConfig type for use with -// apply. -func PersistentVolumeConfig() *PersistentVolumeConfigApplyConfiguration { - return &PersistentVolumeConfigApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithClaim(value *PersistentVolumeClaimReferenceApplyConfiguration) *PersistentVolumeConfigApplyConfiguration { - b.Claim = value - return b -} - -// WithMountPath sets the MountPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MountPath field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithMountPath(value string) *PersistentVolumeConfigApplyConfiguration { - b.MountPath = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/pkicertificatesubject.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/pkicertificatesubject.go deleted file mode 100644 index 63fd15879..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/pkicertificatesubject.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PKICertificateSubjectApplyConfiguration represents a declarative configuration of the PKICertificateSubject type for use -// with apply. -// -// PKICertificateSubject defines the requirements imposed on the subject to which the certificate was issued. -type PKICertificateSubjectApplyConfiguration struct { - // email specifies the expected email address imposed on the subject to which the certificate was issued, and must match the email address listed in the Subject Alternative Name (SAN) field of the certificate. - // The email must be a valid email address and at most 320 characters in length. - Email *string `json:"email,omitempty"` - // hostname specifies the expected hostname imposed on the subject to which the certificate was issued, and it must match the hostname listed in the Subject Alternative Name (SAN) DNS field of the certificate. - // The hostname must be a valid dns 1123 subdomain name, optionally prefixed by '*.', and at most 253 characters in length. - // It must consist only of lowercase alphanumeric characters, hyphens, periods and the optional preceding asterisk. - Hostname *string `json:"hostname,omitempty"` -} - -// PKICertificateSubjectApplyConfiguration constructs a declarative configuration of the PKICertificateSubject type for use with -// apply. -func PKICertificateSubject() *PKICertificateSubjectApplyConfiguration { - return &PKICertificateSubjectApplyConfiguration{} -} - -// WithEmail sets the Email field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Email field is set to the value of the last call. -func (b *PKICertificateSubjectApplyConfiguration) WithEmail(value string) *PKICertificateSubjectApplyConfiguration { - b.Email = &value - return b -} - -// WithHostname sets the Hostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hostname field is set to the value of the last call. -func (b *PKICertificateSubjectApplyConfiguration) WithHostname(value string) *PKICertificateSubjectApplyConfiguration { - b.Hostname = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformspec.go deleted file mode 100644 index 5034ec734..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformspec.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PlatformSpecApplyConfiguration represents a declarative configuration of the PlatformSpec type for use -// with apply. -// -// PlatformSpec holds the desired state specific to the underlying infrastructure provider -// of the current cluster. Since these are used at spec-level for the underlying cluster, it -// is supposed that only one of the spec structs is set. -type PlatformSpecApplyConfiguration struct { - // type 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. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "IBMCloud", "KubeVirt", "EquinixMetal", - // "PowerVS", "AlibabaCloud", "Nutanix", "External", and "None". Individual - // components may not support all platforms, and must handle unrecognized - // platforms as None if they do not support that platform. - Type *configv1.PlatformType `json:"type,omitempty"` - // aws contains settings specific to the Amazon Web Services infrastructure provider. - AWS *AWSPlatformSpecApplyConfiguration `json:"aws,omitempty"` - // azure contains settings specific to the Azure infrastructure provider. - Azure *configv1.AzurePlatformSpec `json:"azure,omitempty"` - // gcp contains settings specific to the Google Cloud Platform infrastructure provider. - GCP *configv1.GCPPlatformSpec `json:"gcp,omitempty"` - // baremetal contains settings specific to the BareMetal platform. - BareMetal *BareMetalPlatformSpecApplyConfiguration `json:"baremetal,omitempty"` - // openstack contains settings specific to the OpenStack infrastructure provider. - OpenStack *OpenStackPlatformSpecApplyConfiguration `json:"openstack,omitempty"` - // ovirt contains settings specific to the oVirt infrastructure provider. - Ovirt *configv1.OvirtPlatformSpec `json:"ovirt,omitempty"` - // vsphere contains settings specific to the VSphere infrastructure provider. - VSphere *VSpherePlatformSpecApplyConfiguration `json:"vsphere,omitempty"` - // ibmcloud contains settings specific to the IBMCloud infrastructure provider. - IBMCloud *IBMCloudPlatformSpecApplyConfiguration `json:"ibmcloud,omitempty"` - // kubevirt contains settings specific to the kubevirt infrastructure provider. - Kubevirt *configv1.KubevirtPlatformSpec `json:"kubevirt,omitempty"` - // equinixMetal contains settings specific to the Equinix Metal infrastructure provider. - EquinixMetal *configv1.EquinixMetalPlatformSpec `json:"equinixMetal,omitempty"` - // powervs contains settings specific to the IBM Power Systems Virtual Servers infrastructure provider. - PowerVS *PowerVSPlatformSpecApplyConfiguration `json:"powervs,omitempty"` - // alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - AlibabaCloud *configv1.AlibabaCloudPlatformSpec `json:"alibabaCloud,omitempty"` - // nutanix contains settings specific to the Nutanix infrastructure provider. - Nutanix *NutanixPlatformSpecApplyConfiguration `json:"nutanix,omitempty"` - // ExternalPlatformType represents generic infrastructure provider. - // Platform-specific components should be supplemented separately. - External *ExternalPlatformSpecApplyConfiguration `json:"external,omitempty"` -} - -// PlatformSpecApplyConfiguration constructs a declarative configuration of the PlatformSpec type for use with -// apply. -func PlatformSpec() *PlatformSpecApplyConfiguration { - return &PlatformSpecApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithType(value configv1.PlatformType) *PlatformSpecApplyConfiguration { - b.Type = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithAWS(value *AWSPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.AWS = value - return b -} - -// WithAzure sets the Azure field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Azure field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithAzure(value configv1.AzurePlatformSpec) *PlatformSpecApplyConfiguration { - b.Azure = &value - return b -} - -// WithGCP sets the GCP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GCP field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithGCP(value configv1.GCPPlatformSpec) *PlatformSpecApplyConfiguration { - b.GCP = &value - return b -} - -// WithBareMetal sets the BareMetal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BareMetal field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithBareMetal(value *BareMetalPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.BareMetal = value - return b -} - -// WithOpenStack sets the OpenStack field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenStack field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithOpenStack(value *OpenStackPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.OpenStack = value - return b -} - -// WithOvirt sets the Ovirt field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ovirt field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithOvirt(value configv1.OvirtPlatformSpec) *PlatformSpecApplyConfiguration { - b.Ovirt = &value - return b -} - -// WithVSphere sets the VSphere field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VSphere field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithVSphere(value *VSpherePlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.VSphere = value - return b -} - -// WithIBMCloud sets the IBMCloud field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IBMCloud field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithIBMCloud(value *IBMCloudPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.IBMCloud = value - return b -} - -// WithKubevirt sets the Kubevirt field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kubevirt field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithKubevirt(value configv1.KubevirtPlatformSpec) *PlatformSpecApplyConfiguration { - b.Kubevirt = &value - return b -} - -// WithEquinixMetal sets the EquinixMetal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EquinixMetal field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithEquinixMetal(value configv1.EquinixMetalPlatformSpec) *PlatformSpecApplyConfiguration { - b.EquinixMetal = &value - return b -} - -// WithPowerVS sets the PowerVS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PowerVS field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithPowerVS(value *PowerVSPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.PowerVS = value - return b -} - -// WithAlibabaCloud sets the AlibabaCloud field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AlibabaCloud field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithAlibabaCloud(value configv1.AlibabaCloudPlatformSpec) *PlatformSpecApplyConfiguration { - b.AlibabaCloud = &value - return b -} - -// WithNutanix sets the Nutanix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Nutanix field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithNutanix(value *NutanixPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.Nutanix = value - return b -} - -// WithExternal sets the External field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the External field is set to the value of the last call. -func (b *PlatformSpecApplyConfiguration) WithExternal(value *ExternalPlatformSpecApplyConfiguration) *PlatformSpecApplyConfiguration { - b.External = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformstatus.go deleted file mode 100644 index a24f6d207..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/platformstatus.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PlatformStatusApplyConfiguration represents a declarative configuration of the PlatformStatus type for use -// with apply. -// -// PlatformStatus holds the current status specific to the underlying infrastructure provider -// of the current cluster. Since these are used at status-level for the underlying cluster, it -// is supposed that only one of the status structs is set. -type PlatformStatusApplyConfiguration struct { - // type 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. Allowed values are "AWS", "Azure", "BareMetal", "GCP", "Libvirt", - // "OpenStack", "VSphere", "oVirt", "EquinixMetal", "PowerVS", "AlibabaCloud", "Nutanix" and "None". - // Individual components may not support all platforms, and must handle - // unrecognized platforms as None if they do not support that platform. - // - // This value will be synced with to the `status.platform` and `status.platformStatus.type`. - // Currently this value cannot be changed once set. - Type *configv1.PlatformType `json:"type,omitempty"` - // aws contains settings specific to the Amazon Web Services infrastructure provider. - AWS *AWSPlatformStatusApplyConfiguration `json:"aws,omitempty"` - // azure contains settings specific to the Azure infrastructure provider. - Azure *AzurePlatformStatusApplyConfiguration `json:"azure,omitempty"` - // gcp contains settings specific to the Google Cloud Platform infrastructure provider. - GCP *GCPPlatformStatusApplyConfiguration `json:"gcp,omitempty"` - // baremetal contains settings specific to the BareMetal platform. - BareMetal *BareMetalPlatformStatusApplyConfiguration `json:"baremetal,omitempty"` - // openstack contains settings specific to the OpenStack infrastructure provider. - OpenStack *OpenStackPlatformStatusApplyConfiguration `json:"openstack,omitempty"` - // ovirt contains settings specific to the oVirt infrastructure provider. - Ovirt *OvirtPlatformStatusApplyConfiguration `json:"ovirt,omitempty"` - // vsphere contains settings specific to the VSphere infrastructure provider. - VSphere *VSpherePlatformStatusApplyConfiguration `json:"vsphere,omitempty"` - // ibmcloud contains settings specific to the IBMCloud infrastructure provider. - IBMCloud *IBMCloudPlatformStatusApplyConfiguration `json:"ibmcloud,omitempty"` - // kubevirt contains settings specific to the kubevirt infrastructure provider. - Kubevirt *KubevirtPlatformStatusApplyConfiguration `json:"kubevirt,omitempty"` - // equinixMetal contains settings specific to the Equinix Metal infrastructure provider. - EquinixMetal *EquinixMetalPlatformStatusApplyConfiguration `json:"equinixMetal,omitempty"` - // powervs contains settings specific to the Power Systems Virtual Servers infrastructure provider. - PowerVS *PowerVSPlatformStatusApplyConfiguration `json:"powervs,omitempty"` - // alibabaCloud contains settings specific to the Alibaba Cloud infrastructure provider. - AlibabaCloud *AlibabaCloudPlatformStatusApplyConfiguration `json:"alibabaCloud,omitempty"` - // nutanix contains settings specific to the Nutanix infrastructure provider. - Nutanix *NutanixPlatformStatusApplyConfiguration `json:"nutanix,omitempty"` - // external contains settings specific to the generic External infrastructure provider. - External *ExternalPlatformStatusApplyConfiguration `json:"external,omitempty"` -} - -// PlatformStatusApplyConfiguration constructs a declarative configuration of the PlatformStatus type for use with -// apply. -func PlatformStatus() *PlatformStatusApplyConfiguration { - return &PlatformStatusApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithType(value configv1.PlatformType) *PlatformStatusApplyConfiguration { - b.Type = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithAWS(value *AWSPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.AWS = value - return b -} - -// WithAzure sets the Azure field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Azure field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithAzure(value *AzurePlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.Azure = value - return b -} - -// WithGCP sets the GCP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GCP field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithGCP(value *GCPPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.GCP = value - return b -} - -// WithBareMetal sets the BareMetal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BareMetal field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithBareMetal(value *BareMetalPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.BareMetal = value - return b -} - -// WithOpenStack sets the OpenStack field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenStack field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithOpenStack(value *OpenStackPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.OpenStack = value - return b -} - -// WithOvirt sets the Ovirt field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ovirt field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithOvirt(value *OvirtPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.Ovirt = value - return b -} - -// WithVSphere sets the VSphere field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VSphere field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithVSphere(value *VSpherePlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.VSphere = value - return b -} - -// WithIBMCloud sets the IBMCloud field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IBMCloud field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithIBMCloud(value *IBMCloudPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.IBMCloud = value - return b -} - -// WithKubevirt sets the Kubevirt field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kubevirt field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithKubevirt(value *KubevirtPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.Kubevirt = value - return b -} - -// WithEquinixMetal sets the EquinixMetal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EquinixMetal field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithEquinixMetal(value *EquinixMetalPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.EquinixMetal = value - return b -} - -// WithPowerVS sets the PowerVS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PowerVS field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithPowerVS(value *PowerVSPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.PowerVS = value - return b -} - -// WithAlibabaCloud sets the AlibabaCloud field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AlibabaCloud field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithAlibabaCloud(value *AlibabaCloudPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.AlibabaCloud = value - return b -} - -// WithNutanix sets the Nutanix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Nutanix field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithNutanix(value *NutanixPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.Nutanix = value - return b -} - -// WithExternal sets the External field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the External field is set to the value of the last call. -func (b *PlatformStatusApplyConfiguration) WithExternal(value *ExternalPlatformStatusApplyConfiguration) *PlatformStatusApplyConfiguration { - b.External = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyfulciosubject.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyfulciosubject.go deleted file mode 100644 index d47722610..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyfulciosubject.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PolicyFulcioSubjectApplyConfiguration represents a declarative configuration of the PolicyFulcioSubject type for use -// with apply. -// -// PolicyFulcioSubject defines the OIDC issuer and the email of the Fulcio authentication configuration. -type PolicyFulcioSubjectApplyConfiguration struct { - // oidcIssuer is a required filed contains the expected OIDC issuer. The oidcIssuer must be a valid URL and at most 2048 characters in length. - // It will be verified that the Fulcio-issued certificate contains a (Fulcio-defined) certificate extension pointing at this OIDC issuer URL. - // When Fulcio issues certificates, it includes a value based on an URL inside the client-provided ID token. - // Example: "https://expected.OIDC.issuer/" - OIDCIssuer *string `json:"oidcIssuer,omitempty"` - // signedEmail is a required field holds the email address that the Fulcio certificate is issued for. - // The signedEmail must be a valid email address and at most 320 characters in length. - // Example: "expected-signing-user@example.com" - SignedEmail *string `json:"signedEmail,omitempty"` -} - -// PolicyFulcioSubjectApplyConfiguration constructs a declarative configuration of the PolicyFulcioSubject type for use with -// apply. -func PolicyFulcioSubject() *PolicyFulcioSubjectApplyConfiguration { - return &PolicyFulcioSubjectApplyConfiguration{} -} - -// WithOIDCIssuer sets the OIDCIssuer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OIDCIssuer field is set to the value of the last call. -func (b *PolicyFulcioSubjectApplyConfiguration) WithOIDCIssuer(value string) *PolicyFulcioSubjectApplyConfiguration { - b.OIDCIssuer = &value - return b -} - -// WithSignedEmail sets the SignedEmail field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SignedEmail field is set to the value of the last call. -func (b *PolicyFulcioSubjectApplyConfiguration) WithSignedEmail(value string) *PolicyFulcioSubjectApplyConfiguration { - b.SignedEmail = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyidentity.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyidentity.go deleted file mode 100644 index 9c5728218..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyidentity.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PolicyIdentityApplyConfiguration represents a declarative configuration of the PolicyIdentity type for use -// with apply. -// -// PolicyIdentity defines image identity the signature claims about the image. When omitted, the default matchPolicy is "MatchRepoDigestOrExact". -type PolicyIdentityApplyConfiguration struct { - // matchPolicy is a required filed specifies matching strategy to verify the image identity in the signature against the image scope. - // Allowed values are "MatchRepoDigestOrExact", "MatchRepository", "ExactRepository", "RemapIdentity". When omitted, the default value is "MatchRepoDigestOrExact". - // When set to "MatchRepoDigestOrExact", the identity in the signature must be in the same repository as the image identity if the image identity is referenced by a digest. Otherwise, the identity in the signature must be the same as the image identity. - // When set to "MatchRepository", the identity in the signature must be in the same repository as the image identity. - // When set to "ExactRepository", the exactRepository must be specified. The identity in the signature must be in the same repository as a specific identity specified by "repository". - // When set to "RemapIdentity", the remapIdentity must be specified. The signature must be in the same as the remapped image identity. Remapped image identity is obtained by replacing the "prefix" with the specified “signedPrefix” if the the image identity matches the specified remapPrefix. - MatchPolicy *configv1.IdentityMatchPolicy `json:"matchPolicy,omitempty"` - // exactRepository specifies the repository that must be exactly matched by the identity in the signature. - // exactRepository is required if matchPolicy is set to "ExactRepository". It is used to verify that the signature claims an identity matching this exact repository, rather than the original image identity. - PolicyMatchExactRepository *PolicyMatchExactRepositoryApplyConfiguration `json:"exactRepository,omitempty"` - // remapIdentity specifies the prefix remapping rule for verifying image identity. - // remapIdentity is required if matchPolicy is set to "RemapIdentity". It is used to verify that the signature claims a different registry/repository prefix than the original image. - PolicyMatchRemapIdentity *PolicyMatchRemapIdentityApplyConfiguration `json:"remapIdentity,omitempty"` -} - -// PolicyIdentityApplyConfiguration constructs a declarative configuration of the PolicyIdentity type for use with -// apply. -func PolicyIdentity() *PolicyIdentityApplyConfiguration { - return &PolicyIdentityApplyConfiguration{} -} - -// WithMatchPolicy sets the MatchPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MatchPolicy field is set to the value of the last call. -func (b *PolicyIdentityApplyConfiguration) WithMatchPolicy(value configv1.IdentityMatchPolicy) *PolicyIdentityApplyConfiguration { - b.MatchPolicy = &value - return b -} - -// WithPolicyMatchExactRepository sets the PolicyMatchExactRepository field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PolicyMatchExactRepository field is set to the value of the last call. -func (b *PolicyIdentityApplyConfiguration) WithPolicyMatchExactRepository(value *PolicyMatchExactRepositoryApplyConfiguration) *PolicyIdentityApplyConfiguration { - b.PolicyMatchExactRepository = value - return b -} - -// WithPolicyMatchRemapIdentity sets the PolicyMatchRemapIdentity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PolicyMatchRemapIdentity field is set to the value of the last call. -func (b *PolicyIdentityApplyConfiguration) WithPolicyMatchRemapIdentity(value *PolicyMatchRemapIdentityApplyConfiguration) *PolicyIdentityApplyConfiguration { - b.PolicyMatchRemapIdentity = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchexactrepository.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchexactrepository.go deleted file mode 100644 index 2b988ad4c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchexactrepository.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PolicyMatchExactRepositoryApplyConfiguration represents a declarative configuration of the PolicyMatchExactRepository type for use -// with apply. -type PolicyMatchExactRepositoryApplyConfiguration struct { - // repository is the reference of the image identity to be matched. - // repository is required if matchPolicy is set to "ExactRepository". - // The value should be a repository name (by omitting the tag or digest) in a registry implementing the "Docker Registry HTTP API V2". For example, docker.io/library/busybox - Repository *configv1.IdentityRepositoryPrefix `json:"repository,omitempty"` -} - -// PolicyMatchExactRepositoryApplyConfiguration constructs a declarative configuration of the PolicyMatchExactRepository type for use with -// apply. -func PolicyMatchExactRepository() *PolicyMatchExactRepositoryApplyConfiguration { - return &PolicyMatchExactRepositoryApplyConfiguration{} -} - -// WithRepository sets the Repository field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Repository field is set to the value of the last call. -func (b *PolicyMatchExactRepositoryApplyConfiguration) WithRepository(value configv1.IdentityRepositoryPrefix) *PolicyMatchExactRepositoryApplyConfiguration { - b.Repository = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchremapidentity.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchremapidentity.go deleted file mode 100644 index a12763447..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policymatchremapidentity.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PolicyMatchRemapIdentityApplyConfiguration represents a declarative configuration of the PolicyMatchRemapIdentity type for use -// with apply. -type PolicyMatchRemapIdentityApplyConfiguration struct { - // prefix is required if matchPolicy is set to "RemapIdentity". - // prefix is the prefix of the image identity to be matched. - // If the image identity matches the specified prefix, that prefix is replaced by the specified “signedPrefix” (otherwise it is used as unchanged and no remapping takes place). - // This is useful when verifying signatures for a mirror of some other repository namespace that preserves the vendor’s repository structure. - // The prefix and signedPrefix values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces, - // or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form. - // For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox. - Prefix *configv1.IdentityRepositoryPrefix `json:"prefix,omitempty"` - // signedPrefix is required if matchPolicy is set to "RemapIdentity". - // signedPrefix is the prefix of the image identity to be matched in the signature. The format is the same as "prefix". The values can be either host[:port] values (matching exactly the same host[:port], string), repository namespaces, - // or repositories (i.e. they must not contain tags/digests), and match as prefixes of the fully expanded form. - // For example, docker.io/library/busybox (not busybox) to specify that single repository, or docker.io/library (not an empty string) to specify the parent namespace of docker.io/library/busybox. - SignedPrefix *configv1.IdentityRepositoryPrefix `json:"signedPrefix,omitempty"` -} - -// PolicyMatchRemapIdentityApplyConfiguration constructs a declarative configuration of the PolicyMatchRemapIdentity type for use with -// apply. -func PolicyMatchRemapIdentity() *PolicyMatchRemapIdentityApplyConfiguration { - return &PolicyMatchRemapIdentityApplyConfiguration{} -} - -// WithPrefix sets the Prefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Prefix field is set to the value of the last call. -func (b *PolicyMatchRemapIdentityApplyConfiguration) WithPrefix(value configv1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { - b.Prefix = &value - return b -} - -// WithSignedPrefix sets the SignedPrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SignedPrefix field is set to the value of the last call. -func (b *PolicyMatchRemapIdentityApplyConfiguration) WithSignedPrefix(value configv1.IdentityRepositoryPrefix) *PolicyMatchRemapIdentityApplyConfiguration { - b.SignedPrefix = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyrootoftrust.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyrootoftrust.go deleted file mode 100644 index 78463deb6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/policyrootoftrust.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// PolicyRootOfTrustApplyConfiguration represents a declarative configuration of the PolicyRootOfTrust type for use -// with apply. -// -// PolicyRootOfTrust defines the root of trust based on the selected policyType. -type PolicyRootOfTrustApplyConfiguration struct { - // policyType is a required field specifies the type of the policy for verification. This field must correspond to how the policy was generated. - // Allowed values are "PublicKey", "FulcioCAWithRekor", and "PKI". - // When set to "PublicKey", the policy relies on a sigstore publicKey and may optionally use a Rekor verification. - // When set to "FulcioCAWithRekor", the policy is based on the Fulcio certification and incorporates a Rekor verification. - // When set to "PKI", the policy is based on the certificates from Bring Your Own Public Key Infrastructure (BYOPKI). - PolicyType *configv1.PolicyType `json:"policyType,omitempty"` - // publicKey defines the root of trust configuration based on a sigstore public key. Optionally include a Rekor public key for Rekor verification. - // publicKey is required when policyType is PublicKey, and forbidden otherwise. - PublicKey *ImagePolicyPublicKeyRootOfTrustApplyConfiguration `json:"publicKey,omitempty"` - // fulcioCAWithRekor defines the root of trust configuration based on the Fulcio certificate and the Rekor public key. - // fulcioCAWithRekor is required when policyType is FulcioCAWithRekor, and forbidden otherwise - // For more information about Fulcio and Rekor, please refer to the document at: - // https://github.com/sigstore/fulcio and https://github.com/sigstore/rekor - FulcioCAWithRekor *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration `json:"fulcioCAWithRekor,omitempty"` - // pki defines the root of trust configuration based on Bring Your Own Public Key Infrastructure (BYOPKI) Root CA(s) and corresponding intermediate certificates. - // pki is required when policyType is PKI, and forbidden otherwise. - PKI *ImagePolicyPKIRootOfTrustApplyConfiguration `json:"pki,omitempty"` -} - -// PolicyRootOfTrustApplyConfiguration constructs a declarative configuration of the PolicyRootOfTrust type for use with -// apply. -func PolicyRootOfTrust() *PolicyRootOfTrustApplyConfiguration { - return &PolicyRootOfTrustApplyConfiguration{} -} - -// WithPolicyType sets the PolicyType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PolicyType field is set to the value of the last call. -func (b *PolicyRootOfTrustApplyConfiguration) WithPolicyType(value configv1.PolicyType) *PolicyRootOfTrustApplyConfiguration { - b.PolicyType = &value - return b -} - -// WithPublicKey sets the PublicKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PublicKey field is set to the value of the last call. -func (b *PolicyRootOfTrustApplyConfiguration) WithPublicKey(value *ImagePolicyPublicKeyRootOfTrustApplyConfiguration) *PolicyRootOfTrustApplyConfiguration { - b.PublicKey = value - return b -} - -// WithFulcioCAWithRekor sets the FulcioCAWithRekor field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FulcioCAWithRekor field is set to the value of the last call. -func (b *PolicyRootOfTrustApplyConfiguration) WithFulcioCAWithRekor(value *ImagePolicyFulcioCAWithRekorRootOfTrustApplyConfiguration) *PolicyRootOfTrustApplyConfiguration { - b.FulcioCAWithRekor = value - return b -} - -// WithPKI sets the PKI field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PKI field is set to the value of the last call. -func (b *PolicyRootOfTrustApplyConfiguration) WithPKI(value *ImagePolicyPKIRootOfTrustApplyConfiguration) *PolicyRootOfTrustApplyConfiguration { - b.PKI = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformspec.go deleted file mode 100644 index 3ec6312ba..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformspec.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PowerVSPlatformSpecApplyConfiguration represents a declarative configuration of the PowerVSPlatformSpec type for use -// with apply. -// -// PowerVSPlatformSpec holds the desired state of the IBM Power Systems Virtual Servers infrastructure provider. -// This only includes fields that can be modified in the cluster. -type PowerVSPlatformSpecApplyConfiguration struct { - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of a Power VS service. - ServiceEndpoints []PowerVSServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` -} - -// PowerVSPlatformSpecApplyConfiguration constructs a declarative configuration of the PowerVSPlatformSpec type for use with -// apply. -func PowerVSPlatformSpec() *PowerVSPlatformSpecApplyConfiguration { - return &PowerVSPlatformSpecApplyConfiguration{} -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *PowerVSPlatformSpecApplyConfiguration) WithServiceEndpoints(values ...*PowerVSServiceEndpointApplyConfiguration) *PowerVSPlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformstatus.go deleted file mode 100644 index 8d6b0b3ad..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsplatformstatus.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PowerVSPlatformStatusApplyConfiguration represents a declarative configuration of the PowerVSPlatformStatus type for use -// with apply. -// -// PowerVSPlatformStatus holds the current status of the IBM Power Systems Virtual Servers infrastrucutre provider. -type PowerVSPlatformStatusApplyConfiguration struct { - // region holds the default Power VS region for new Power VS resources created by the cluster. - Region *string `json:"region,omitempty"` - // zone holds the default zone for the new Power VS resources created by the cluster. - // Note: Currently only single-zone OCP clusters are supported - Zone *string `json:"zone,omitempty"` - // resourceGroup is the resource group name for new IBMCloud resources created for a cluster. - // The resource group specified here will be used by cluster-image-registry-operator to set up a COS Instance in IBMCloud for the cluster registry. - // More about resource groups can be found here: https://cloud.ibm.com/docs/account?topic=account-rgs. - // When omitted, the image registry operator won't be able to configure storage, - // which results in the image registry cluster operator not being in an available state. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // serviceEndpoints is a list of custom endpoints which will override the default - // service endpoints of a Power VS service. - ServiceEndpoints []PowerVSServiceEndpointApplyConfiguration `json:"serviceEndpoints,omitempty"` - // cisInstanceCRN is the CRN of the Cloud Internet Services instance managing - // the DNS zone for the cluster's base domain - CISInstanceCRN *string `json:"cisInstanceCRN,omitempty"` - // dnsInstanceCRN is the CRN of the DNS Services instance managing the DNS zone - // for the cluster's base domain - DNSInstanceCRN *string `json:"dnsInstanceCRN,omitempty"` -} - -// PowerVSPlatformStatusApplyConfiguration constructs a declarative configuration of the PowerVSPlatformStatus type for use with -// apply. -func PowerVSPlatformStatus() *PowerVSPlatformStatusApplyConfiguration { - return &PowerVSPlatformStatusApplyConfiguration{} -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *PowerVSPlatformStatusApplyConfiguration) WithRegion(value string) *PowerVSPlatformStatusApplyConfiguration { - b.Region = &value - return b -} - -// WithZone sets the Zone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Zone field is set to the value of the last call. -func (b *PowerVSPlatformStatusApplyConfiguration) WithZone(value string) *PowerVSPlatformStatusApplyConfiguration { - b.Zone = &value - return b -} - -// WithResourceGroup sets the ResourceGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceGroup field is set to the value of the last call. -func (b *PowerVSPlatformStatusApplyConfiguration) WithResourceGroup(value string) *PowerVSPlatformStatusApplyConfiguration { - b.ResourceGroup = &value - return b -} - -// WithServiceEndpoints adds the given value to the ServiceEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceEndpoints field. -func (b *PowerVSPlatformStatusApplyConfiguration) WithServiceEndpoints(values ...*PowerVSServiceEndpointApplyConfiguration) *PowerVSPlatformStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceEndpoints") - } - b.ServiceEndpoints = append(b.ServiceEndpoints, *values[i]) - } - return b -} - -// WithCISInstanceCRN sets the CISInstanceCRN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CISInstanceCRN field is set to the value of the last call. -func (b *PowerVSPlatformStatusApplyConfiguration) WithCISInstanceCRN(value string) *PowerVSPlatformStatusApplyConfiguration { - b.CISInstanceCRN = &value - return b -} - -// WithDNSInstanceCRN sets the DNSInstanceCRN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSInstanceCRN field is set to the value of the last call. -func (b *PowerVSPlatformStatusApplyConfiguration) WithDNSInstanceCRN(value string) *PowerVSPlatformStatusApplyConfiguration { - b.DNSInstanceCRN = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsserviceendpoint.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsserviceendpoint.go deleted file mode 100644 index e2b1fac87..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/powervsserviceendpoint.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PowerVSServiceEndpointApplyConfiguration represents a declarative configuration of the PowerVSServiceEndpoint type for use -// with apply. -// -// PowervsServiceEndpoint stores the configuration of a custom url to -// override existing defaults of PowerVS Services. -type PowerVSServiceEndpointApplyConfiguration struct { - // name is the name of the Power VS service. - // Few of the services are - // IAM - https://cloud.ibm.com/apidocs/iam-identity-token-api - // ResourceController - https://cloud.ibm.com/apidocs/resource-controller/resource-controller - // Power Cloud - https://cloud.ibm.com/apidocs/power-cloud - Name *string `json:"name,omitempty"` - // url is fully qualified URI with scheme https, that overrides the default generated - // endpoint for a client. - // This must be provided and cannot be empty. - URL *string `json:"url,omitempty"` -} - -// PowerVSServiceEndpointApplyConfiguration constructs a declarative configuration of the PowerVSServiceEndpoint type for use with -// apply. -func PowerVSServiceEndpoint() *PowerVSServiceEndpointApplyConfiguration { - return &PowerVSServiceEndpointApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PowerVSServiceEndpointApplyConfiguration) WithName(value string) *PowerVSServiceEndpointApplyConfiguration { - b.Name = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *PowerVSServiceEndpointApplyConfiguration) WithURL(value string) *PowerVSServiceEndpointApplyConfiguration { - b.URL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/prefixedclaimmapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/prefixedclaimmapping.go deleted file mode 100644 index 08ebf26a8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/prefixedclaimmapping.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PrefixedClaimMappingApplyConfiguration represents a declarative configuration of the PrefixedClaimMapping type for use -// with apply. -// -// PrefixedClaimMapping configures a claim mapping -// that allows for an optional prefix. -type PrefixedClaimMappingApplyConfiguration struct { - TokenClaimMappingApplyConfiguration `json:",inline"` - // prefix is an optional field that configures the prefix that will be applied to the cluster identity attribute during the process of mapping JWT claims to cluster identity attributes. - // - // When omitted or set to an empty string (""), no prefix is applied to the cluster identity attribute. - // Must not be set to a non-empty value when expression is set. - // - // Example: if `prefix` is set to "myoidc:" and the `claim` in JWT contains an array of strings "a", "b" and "c", the mapping will result in an array of string "myoidc:a", "myoidc:b" and "myoidc:c". - Prefix *string `json:"prefix,omitempty"` -} - -// PrefixedClaimMappingApplyConfiguration constructs a declarative configuration of the PrefixedClaimMapping type for use with -// apply. -func PrefixedClaimMapping() *PrefixedClaimMappingApplyConfiguration { - return &PrefixedClaimMappingApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *PrefixedClaimMappingApplyConfiguration) WithClaim(value string) *PrefixedClaimMappingApplyConfiguration { - b.TokenClaimMappingApplyConfiguration.Claim = &value - return b -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *PrefixedClaimMappingApplyConfiguration) WithExpression(value string) *PrefixedClaimMappingApplyConfiguration { - b.TokenClaimMappingApplyConfiguration.Expression = &value - return b -} - -// WithPrefix sets the Prefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Prefix field is set to the value of the last call. -func (b *PrefixedClaimMappingApplyConfiguration) WithPrefix(value string) *PrefixedClaimMappingApplyConfiguration { - b.Prefix = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/profilecustomizations.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/profilecustomizations.go deleted file mode 100644 index 034c96924..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/profilecustomizations.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ProfileCustomizationsApplyConfiguration represents a declarative configuration of the ProfileCustomizations type for use -// with apply. -// -// ProfileCustomizations contains various parameters for modifying the default behavior of certain profiles -type ProfileCustomizationsApplyConfiguration struct { - // dynamicResourceAllocation allows to enable or disable dynamic resource allocation within the scheduler. - // Dynamic resource allocation is an API for requesting and sharing resources between pods and containers inside a pod. - // Third-party resource drivers are responsible for tracking and allocating resources. - // Different kinds of resources support arbitrary parameters for defining requirements and initialization. - // Valid values are Enabled, Disabled and omitted. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. - // The current default is Disabled. - DynamicResourceAllocation *configv1.DRAEnablement `json:"dynamicResourceAllocation,omitempty"` -} - -// ProfileCustomizationsApplyConfiguration constructs a declarative configuration of the ProfileCustomizations type for use with -// apply. -func ProfileCustomizations() *ProfileCustomizationsApplyConfiguration { - return &ProfileCustomizationsApplyConfiguration{} -} - -// WithDynamicResourceAllocation sets the DynamicResourceAllocation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DynamicResourceAllocation field is set to the value of the last call. -func (b *ProfileCustomizationsApplyConfiguration) WithDynamicResourceAllocation(value configv1.DRAEnablement) *ProfileCustomizationsApplyConfiguration { - b.DynamicResourceAllocation = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/project.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/project.go deleted file mode 100644 index 5bcc3a26e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/project.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ProjectApplyConfiguration represents a declarative configuration of the Project type for use -// with apply. -// -// Project holds cluster-wide information about Project. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ProjectApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ProjectSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1.ProjectStatus `json:"status,omitempty"` -} - -// Project constructs a declarative configuration of the Project type for use with -// apply. -func Project(name string) *ProjectApplyConfiguration { - b := &ProjectApplyConfiguration{} - b.WithName(name) - b.WithKind("Project") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractProjectFrom extracts the applied configuration owned by fieldManager from -// project for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// project must be a unmodified Project API object that was retrieved from the Kubernetes API. -// ExtractProjectFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractProjectFrom(project *configv1.Project, fieldManager string, subresource string) (*ProjectApplyConfiguration, error) { - b := &ProjectApplyConfiguration{} - err := managedfields.ExtractInto(project, internal.Parser().Type("com.github.openshift.api.config.v1.Project"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(project.Name) - - b.WithKind("Project") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractProject extracts the applied configuration owned by fieldManager from -// project. If no managedFields are found in project for fieldManager, a -// ProjectApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// project must be a unmodified Project API object that was retrieved from the Kubernetes API. -// ExtractProject provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractProject(project *configv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { - return ExtractProjectFrom(project, fieldManager, "") -} - -// ExtractProjectStatus extracts the applied configuration owned by fieldManager from -// project for the status subresource. -func ExtractProjectStatus(project *configv1.Project, fieldManager string) (*ProjectApplyConfiguration, error) { - return ExtractProjectFrom(project, fieldManager, "status") -} - -func (b ProjectApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithKind(value string) *ProjectApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithAPIVersion(value string) *ProjectApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithName(value string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithGenerateName(value string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithNamespace(value string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithUID(value types.UID) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithResourceVersion(value string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithGeneration(value int64) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ProjectApplyConfiguration) WithLabels(entries map[string]string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ProjectApplyConfiguration) WithAnnotations(entries map[string]string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProjectApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ProjectApplyConfiguration) WithFinalizers(values ...string) *ProjectApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ProjectApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithSpec(value *ProjectSpecApplyConfiguration) *ProjectApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ProjectApplyConfiguration) WithStatus(value configv1.ProjectStatus) *ProjectApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ProjectApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ProjectApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ProjectApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ProjectApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/projectspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/projectspec.go deleted file mode 100644 index bb1ba8535..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/projectspec.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ProjectSpecApplyConfiguration represents a declarative configuration of the ProjectSpec type for use -// with apply. -// -// ProjectSpec holds the project creation configuration. -type ProjectSpecApplyConfiguration struct { - // 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,omitempty"` - // 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. - ProjectRequestTemplate *TemplateReferenceApplyConfiguration `json:"projectRequestTemplate,omitempty"` -} - -// ProjectSpecApplyConfiguration constructs a declarative configuration of the ProjectSpec type for use with -// apply. -func ProjectSpec() *ProjectSpecApplyConfiguration { - return &ProjectSpecApplyConfiguration{} -} - -// WithProjectRequestMessage sets the ProjectRequestMessage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProjectRequestMessage field is set to the value of the last call. -func (b *ProjectSpecApplyConfiguration) WithProjectRequestMessage(value string) *ProjectSpecApplyConfiguration { - b.ProjectRequestMessage = &value - return b -} - -// WithProjectRequestTemplate sets the ProjectRequestTemplate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProjectRequestTemplate field is set to the value of the last call. -func (b *ProjectSpecApplyConfiguration) WithProjectRequestTemplate(value *TemplateReferenceApplyConfiguration) *ProjectSpecApplyConfiguration { - b.ProjectRequestTemplate = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/promqlclustercondition.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/promqlclustercondition.go deleted file mode 100644 index fcb66c6fd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/promqlclustercondition.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PromQLClusterConditionApplyConfiguration represents a declarative configuration of the PromQLClusterCondition type for use -// with apply. -// -// PromQLClusterCondition represents a cluster condition based on PromQL. -type PromQLClusterConditionApplyConfiguration struct { - // promql is a PromQL query classifying clusters. This query - // query should return a 1 in the match case and a 0 in the - // does-not-match case. Queries which return no time - // series, or which return values besides 0 or 1, are - // evaluation failures. - PromQL *string `json:"promql,omitempty"` -} - -// PromQLClusterConditionApplyConfiguration constructs a declarative configuration of the PromQLClusterCondition type for use with -// apply. -func PromQLClusterCondition() *PromQLClusterConditionApplyConfiguration { - return &PromQLClusterConditionApplyConfiguration{} -} - -// WithPromQL sets the PromQL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PromQL field is set to the value of the last call. -func (b *PromQLClusterConditionApplyConfiguration) WithPromQL(value string) *PromQLClusterConditionApplyConfiguration { - b.PromQL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxy.go deleted file mode 100644 index 155de1eaf..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxy.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ProxyApplyConfiguration represents a declarative configuration of the Proxy type for use -// with apply. -// -// Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster` -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ProxyApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user-settable values for the proxy configuration - Spec *ProxySpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *ProxyStatusApplyConfiguration `json:"status,omitempty"` -} - -// Proxy constructs a declarative configuration of the Proxy type for use with -// apply. -func Proxy(name string) *ProxyApplyConfiguration { - b := &ProxyApplyConfiguration{} - b.WithName(name) - b.WithKind("Proxy") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractProxyFrom extracts the applied configuration owned by fieldManager from -// proxy for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// proxy must be a unmodified Proxy API object that was retrieved from the Kubernetes API. -// ExtractProxyFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractProxyFrom(proxy *configv1.Proxy, fieldManager string, subresource string) (*ProxyApplyConfiguration, error) { - b := &ProxyApplyConfiguration{} - err := managedfields.ExtractInto(proxy, internal.Parser().Type("com.github.openshift.api.config.v1.Proxy"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(proxy.Name) - - b.WithKind("Proxy") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractProxy extracts the applied configuration owned by fieldManager from -// proxy. If no managedFields are found in proxy for fieldManager, a -// ProxyApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// proxy must be a unmodified Proxy API object that was retrieved from the Kubernetes API. -// ExtractProxy provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractProxy(proxy *configv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { - return ExtractProxyFrom(proxy, fieldManager, "") -} - -// ExtractProxyStatus extracts the applied configuration owned by fieldManager from -// proxy for the status subresource. -func ExtractProxyStatus(proxy *configv1.Proxy, fieldManager string) (*ProxyApplyConfiguration, error) { - return ExtractProxyFrom(proxy, fieldManager, "status") -} - -func (b ProxyApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithKind(value string) *ProxyApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithAPIVersion(value string) *ProxyApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithName(value string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithGenerateName(value string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithNamespace(value string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithUID(value types.UID) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithResourceVersion(value string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithGeneration(value int64) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ProxyApplyConfiguration) WithLabels(entries map[string]string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ProxyApplyConfiguration) WithAnnotations(entries map[string]string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ProxyApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ProxyApplyConfiguration) WithFinalizers(values ...string) *ProxyApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ProxyApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithSpec(value *ProxySpecApplyConfiguration) *ProxyApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ProxyApplyConfiguration) WithStatus(value *ProxyStatusApplyConfiguration) *ProxyApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ProxyApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ProxyApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ProxyApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ProxyApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxyspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxyspec.go deleted file mode 100644 index 6ddce630f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxyspec.go +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ProxySpecApplyConfiguration represents a declarative configuration of the ProxySpec type for use -// with apply. -// -// ProxySpec contains cluster proxy creation configuration. -type ProxySpecApplyConfiguration 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 a comma-separated list of hostnames and/or CIDRs and/or IPs for which the proxy should not be used. - // Empty means unset and will not result in an env var. - NoProxy *string `json:"noProxy,omitempty"` - // readinessEndpoints is a list of endpoints used to verify readiness of the proxy. - ReadinessEndpoints []string `json:"readinessEndpoints,omitempty"` - // trustedCA is a reference to a ConfigMap containing a CA certificate bundle. - // The trustedCA field should only be consumed by a proxy validator. The - // validator is responsible for reading the certificate bundle from the required - // key "ca-bundle.crt", merging it with the system default trust bundle, - // and writing the merged trust bundle to a ConfigMap named "trusted-ca-bundle" - // in the "openshift-config-managed" namespace. Clients that expect to make - // proxy connections must use the trusted-ca-bundle for all HTTPS requests to - // the proxy, and may use the trusted-ca-bundle for non-proxy HTTPS requests as - // well. - // - // The namespace for the ConfigMap referenced by trustedCA is - // "openshift-config". Here is an example ConfigMap (in yaml): - // - // apiVersion: v1 - // kind: ConfigMap - // metadata: - // name: user-ca-bundle - // namespace: openshift-config - // data: - // ca-bundle.crt: | - // -----BEGIN CERTIFICATE----- - // Custom CA certificate bundle. - // -----END CERTIFICATE----- - TrustedCA *ConfigMapNameReferenceApplyConfiguration `json:"trustedCA,omitempty"` -} - -// ProxySpecApplyConfiguration constructs a declarative configuration of the ProxySpec type for use with -// apply. -func ProxySpec() *ProxySpecApplyConfiguration { - return &ProxySpecApplyConfiguration{} -} - -// WithHTTPProxy sets the HTTPProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPProxy field is set to the value of the last call. -func (b *ProxySpecApplyConfiguration) WithHTTPProxy(value string) *ProxySpecApplyConfiguration { - b.HTTPProxy = &value - return b -} - -// WithHTTPSProxy sets the HTTPSProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPSProxy field is set to the value of the last call. -func (b *ProxySpecApplyConfiguration) WithHTTPSProxy(value string) *ProxySpecApplyConfiguration { - b.HTTPSProxy = &value - return b -} - -// WithNoProxy sets the NoProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NoProxy field is set to the value of the last call. -func (b *ProxySpecApplyConfiguration) WithNoProxy(value string) *ProxySpecApplyConfiguration { - b.NoProxy = &value - return b -} - -// WithReadinessEndpoints adds the given value to the ReadinessEndpoints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ReadinessEndpoints field. -func (b *ProxySpecApplyConfiguration) WithReadinessEndpoints(values ...string) *ProxySpecApplyConfiguration { - for i := range values { - b.ReadinessEndpoints = append(b.ReadinessEndpoints, values[i]) - } - return b -} - -// WithTrustedCA sets the TrustedCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TrustedCA field is set to the value of the last call. -func (b *ProxySpecApplyConfiguration) WithTrustedCA(value *ConfigMapNameReferenceApplyConfiguration) *ProxySpecApplyConfiguration { - b.TrustedCA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxystatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxystatus.go deleted file mode 100644 index 7b6b58ff4..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/proxystatus.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ProxyStatusApplyConfiguration represents a declarative configuration of the ProxyStatus type for use -// with apply. -// -// ProxyStatus shows current known state of the cluster proxy. -type ProxyStatusApplyConfiguration struct { - // httpProxy is the URL of the proxy for HTTP requests. - HTTPProxy *string `json:"httpProxy,omitempty"` - // httpsProxy is the URL of the proxy for HTTPS requests. - HTTPSProxy *string `json:"httpsProxy,omitempty"` - // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. - NoProxy *string `json:"noProxy,omitempty"` -} - -// ProxyStatusApplyConfiguration constructs a declarative configuration of the ProxyStatus type for use with -// apply. -func ProxyStatus() *ProxyStatusApplyConfiguration { - return &ProxyStatusApplyConfiguration{} -} - -// WithHTTPProxy sets the HTTPProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPProxy field is set to the value of the last call. -func (b *ProxyStatusApplyConfiguration) WithHTTPProxy(value string) *ProxyStatusApplyConfiguration { - b.HTTPProxy = &value - return b -} - -// WithHTTPSProxy sets the HTTPSProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPSProxy field is set to the value of the last call. -func (b *ProxyStatusApplyConfiguration) WithHTTPSProxy(value string) *ProxyStatusApplyConfiguration { - b.HTTPSProxy = &value - return b -} - -// WithNoProxy sets the NoProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NoProxy field is set to the value of the last call. -func (b *ProxyStatusApplyConfiguration) WithNoProxy(value string) *ProxyStatusApplyConfiguration { - b.NoProxy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrylocation.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrylocation.go deleted file mode 100644 index 1994631dd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrylocation.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// RegistryLocationApplyConfiguration represents a declarative configuration of the RegistryLocation type for use -// with apply. -// -// RegistryLocation contains a location of the registry specified by the registry domain -// name. The domain name might include wildcards, like '*' or '??'. -type RegistryLocationApplyConfiguration struct { - // 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. - DomainName *string `json:"domainName,omitempty"` - // insecure indicates whether the registry is secure (https) or insecure (http) - // By default (if not specified) the registry is assumed as secure. - Insecure *bool `json:"insecure,omitempty"` -} - -// RegistryLocationApplyConfiguration constructs a declarative configuration of the RegistryLocation type for use with -// apply. -func RegistryLocation() *RegistryLocationApplyConfiguration { - return &RegistryLocationApplyConfiguration{} -} - -// WithDomainName sets the DomainName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DomainName field is set to the value of the last call. -func (b *RegistryLocationApplyConfiguration) WithDomainName(value string) *RegistryLocationApplyConfiguration { - b.DomainName = &value - return b -} - -// WithInsecure sets the Insecure field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Insecure field is set to the value of the last call. -func (b *RegistryLocationApplyConfiguration) WithInsecure(value bool) *RegistryLocationApplyConfiguration { - b.Insecure = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrysources.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrysources.go deleted file mode 100644 index 9fd5335da..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/registrysources.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// RegistrySourcesApplyConfiguration represents a declarative configuration of the RegistrySources type for use -// with apply. -// -// RegistrySources holds cluster-wide information about how to handle the registries config. -type RegistrySourcesApplyConfiguration struct { - // insecureRegistries are registries which do not have a valid TLS certificates or only support HTTP connections. - // Each entry must be a valid registry scope in the format hostname[:port][/path], - // optionally prefixed with "*." for wildcard subdomains (e.g., "*.example.com"). - // The hostname must consist of valid DNS labels separated by dots, where each label - // contains only alphanumeric characters and hyphens and does not start or end with a hyphen. - // Entries must not be empty, must not include tags (e.g., ":latest") or digests (e.g., "@sha256:..."), - // and must be at most 256 characters in length. The list may contain at most 1024 entries. - InsecureRegistries []string `json:"insecureRegistries,omitempty"` - // blockedRegistries cannot be used for image pull and push actions. All other registries are permitted. - // Each entry must be a valid registry scope in the format hostname[:port][/path], - // optionally prefixed with "*." for wildcard subdomains (e.g., "*.example.com"). - // The hostname must consist of valid DNS labels separated by dots, where each label - // contains only alphanumeric characters and hyphens and does not start or end with a hyphen. - // Entries must not be empty, must not include tags (e.g., ":latest") or digests (e.g., "@sha256:..."), - // and must be at most 256 characters in length. The list may contain at most 1024 entries. - // - // Only one of BlockedRegistries or AllowedRegistries may be set. - BlockedRegistries []string `json:"blockedRegistries,omitempty"` - // allowedRegistries are the only registries permitted for image pull and push actions. All other registries are denied. - // Each entry must be a valid registry scope in the format hostname[:port][/path], - // optionally prefixed with "*." for wildcard subdomains (e.g., "*.example.com"). - // The hostname must consist of valid DNS labels separated by dots, where each label - // contains only alphanumeric characters and hyphens and does not start or end with a hyphen. - // Entries must not be empty, must not include tags (e.g., ":latest") or digests (e.g., "@sha256:..."), - // and must be at most 256 characters in length. The list may contain at most 1024 entries. - // - // Only one of BlockedRegistries or AllowedRegistries may be set. - AllowedRegistries []string `json:"allowedRegistries,omitempty"` - // containerRuntimeSearchRegistries are registries that will be searched when pulling images that do not have fully qualified - // domains in their pull specs. Registries will be searched in the order provided in the list. - // Note: this search list only works with the container runtime, i.e CRI-O. Will NOT work with builds or imagestream imports. - ContainerRuntimeSearchRegistries []string `json:"containerRuntimeSearchRegistries,omitempty"` -} - -// RegistrySourcesApplyConfiguration constructs a declarative configuration of the RegistrySources type for use with -// apply. -func RegistrySources() *RegistrySourcesApplyConfiguration { - return &RegistrySourcesApplyConfiguration{} -} - -// WithInsecureRegistries adds the given value to the InsecureRegistries field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the InsecureRegistries field. -func (b *RegistrySourcesApplyConfiguration) WithInsecureRegistries(values ...string) *RegistrySourcesApplyConfiguration { - for i := range values { - b.InsecureRegistries = append(b.InsecureRegistries, values[i]) - } - return b -} - -// WithBlockedRegistries adds the given value to the BlockedRegistries field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the BlockedRegistries field. -func (b *RegistrySourcesApplyConfiguration) WithBlockedRegistries(values ...string) *RegistrySourcesApplyConfiguration { - for i := range values { - b.BlockedRegistries = append(b.BlockedRegistries, values[i]) - } - return b -} - -// WithAllowedRegistries adds the given value to the AllowedRegistries field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllowedRegistries field. -func (b *RegistrySourcesApplyConfiguration) WithAllowedRegistries(values ...string) *RegistrySourcesApplyConfiguration { - for i := range values { - b.AllowedRegistries = append(b.AllowedRegistries, values[i]) - } - return b -} - -// WithContainerRuntimeSearchRegistries adds the given value to the ContainerRuntimeSearchRegistries field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ContainerRuntimeSearchRegistries field. -func (b *RegistrySourcesApplyConfiguration) WithContainerRuntimeSearchRegistries(values ...string) *RegistrySourcesApplyConfiguration { - for i := range values { - b.ContainerRuntimeSearchRegistries = append(b.ContainerRuntimeSearchRegistries, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/release.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/release.go deleted file mode 100644 index 488e486b8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/release.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ReleaseApplyConfiguration represents a declarative configuration of the Release type for use -// with apply. -// -// Release represents an OpenShift release image and associated metadata. -type ReleaseApplyConfiguration struct { - // architecture is an optional field that indicates the - // value of the cluster architecture. In this context cluster - // architecture means either a single architecture or a multi - // architecture. - // Valid values are 'Multi' and empty. - Architecture *configv1.ClusterVersionArchitecture `json:"architecture,omitempty"` - // version is a semantic version identifying the update version. When this - // field is part of spec, version is optional if image is specified. - Version *string `json:"version,omitempty"` - // 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. - Image *string `json:"image,omitempty"` - // url contains information about this release. This URL is set by - // the 'url' metadata property on a release or the metadata returned by - // the update API and should be displayed as a link in user - // interfaces. The URL field may not be set for test or nightly - // releases. - URL *configv1.URL `json:"url,omitempty"` - // channels is the set of Cincinnati channels to which the release - // currently belongs. - Channels []string `json:"channels,omitempty"` -} - -// ReleaseApplyConfiguration constructs a declarative configuration of the Release type for use with -// apply. -func Release() *ReleaseApplyConfiguration { - return &ReleaseApplyConfiguration{} -} - -// WithArchitecture sets the Architecture field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Architecture field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithArchitecture(value configv1.ClusterVersionArchitecture) *ReleaseApplyConfiguration { - b.Architecture = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithVersion(value string) *ReleaseApplyConfiguration { - b.Version = &value - return b -} - -// WithImage sets the Image field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Image field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithImage(value string) *ReleaseApplyConfiguration { - b.Image = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ReleaseApplyConfiguration) WithURL(value configv1.URL) *ReleaseApplyConfiguration { - b.URL = &value - return b -} - -// WithChannels adds the given value to the Channels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Channels field. -func (b *ReleaseApplyConfiguration) WithChannels(values ...string) *ReleaseApplyConfiguration { - for i := range values { - b.Channels = append(b.Channels, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/repositorydigestmirrors.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/repositorydigestmirrors.go deleted file mode 100644 index 8a211863b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/repositorydigestmirrors.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// RepositoryDigestMirrorsApplyConfiguration represents a declarative configuration of the RepositoryDigestMirrors type for use -// with apply. -// -// RepositoryDigestMirrors holds cluster-wide information about how to handle mirrors in the registries config. -type RepositoryDigestMirrorsApplyConfiguration struct { - // source is the repository that users refer to, e.g. in image pull specifications. - Source *string `json:"source,omitempty"` - // allowMirrorByTags if true, the mirrors can be used to pull the images that are referenced by their tags. Default is false, the mirrors only work when pulling the images that are referenced by their digests. - // Pulling images by tag can potentially yield different images, depending on which endpoint - // we pull from. Forcing digest-pulls for mirrors avoids that issue. - AllowMirrorByTags *bool `json:"allowMirrorByTags,omitempty"` - // mirrors is zero or more repositories that may also contain the same images. - // If the "mirrors" is not specified, the image will continue to be pulled from the specified - // repository in the pull spec. No mirror will be configured. - // The order of mirrors in this list is treated as the user's desired priority, while source - // is by default considered lower priority than all mirrors. Other cluster configuration, - // including (but not limited to) other repositoryDigestMirrors objects, - // may impact the exact order mirrors are contacted in, or some mirrors may be contacted - // in parallel, so this should be considered a preference rather than a guarantee of ordering. - Mirrors []configv1.Mirror `json:"mirrors,omitempty"` -} - -// RepositoryDigestMirrorsApplyConfiguration constructs a declarative configuration of the RepositoryDigestMirrors type for use with -// apply. -func RepositoryDigestMirrors() *RepositoryDigestMirrorsApplyConfiguration { - return &RepositoryDigestMirrorsApplyConfiguration{} -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *RepositoryDigestMirrorsApplyConfiguration) WithSource(value string) *RepositoryDigestMirrorsApplyConfiguration { - b.Source = &value - return b -} - -// WithAllowMirrorByTags sets the AllowMirrorByTags field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AllowMirrorByTags field is set to the value of the last call. -func (b *RepositoryDigestMirrorsApplyConfiguration) WithAllowMirrorByTags(value bool) *RepositoryDigestMirrorsApplyConfiguration { - b.AllowMirrorByTags = &value - return b -} - -// WithMirrors adds the given value to the Mirrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Mirrors field. -func (b *RepositoryDigestMirrorsApplyConfiguration) WithMirrors(values ...configv1.Mirror) *RepositoryDigestMirrorsApplyConfiguration { - for i := range values { - b.Mirrors = append(b.Mirrors, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requestheaderidentityprovider.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requestheaderidentityprovider.go deleted file mode 100644 index 674bf56e1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requestheaderidentityprovider.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// RequestHeaderIdentityProviderApplyConfiguration represents a declarative configuration of the RequestHeaderIdentityProvider type for use -// with apply. -// -// RequestHeaderIdentityProvider provides identities for users authenticating using request header credentials -type RequestHeaderIdentityProviderApplyConfiguration struct { - // 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 - // 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 login is set to true. - LoginURL *string `json:"loginURL,omitempty"` - // 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 - // 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 challenge is set to true. - ChallengeURL *string `json:"challengeURL,omitempty"` - // 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 *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` - // 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. - ClientCommonNames []string `json:"clientCommonNames,omitempty"` - // headers is the set of headers to check for identity information - Headers []string `json:"headers,omitempty"` - // preferredUsernameHeaders is the set of headers to check for the preferred username - PreferredUsernameHeaders []string `json:"preferredUsernameHeaders,omitempty"` - // nameHeaders is the set of headers to check for the display name - NameHeaders []string `json:"nameHeaders,omitempty"` - // emailHeaders is the set of headers to check for the email address - EmailHeaders []string `json:"emailHeaders,omitempty"` -} - -// RequestHeaderIdentityProviderApplyConfiguration constructs a declarative configuration of the RequestHeaderIdentityProvider type for use with -// apply. -func RequestHeaderIdentityProvider() *RequestHeaderIdentityProviderApplyConfiguration { - return &RequestHeaderIdentityProviderApplyConfiguration{} -} - -// WithLoginURL sets the LoginURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoginURL field is set to the value of the last call. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithLoginURL(value string) *RequestHeaderIdentityProviderApplyConfiguration { - b.LoginURL = &value - return b -} - -// WithChallengeURL sets the ChallengeURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ChallengeURL field is set to the value of the last call. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithChallengeURL(value string) *RequestHeaderIdentityProviderApplyConfiguration { - b.ChallengeURL = &value - return b -} - -// WithClientCA sets the ClientCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCA field is set to the value of the last call. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithClientCA(value *ConfigMapNameReferenceApplyConfiguration) *RequestHeaderIdentityProviderApplyConfiguration { - b.ClientCA = value - return b -} - -// WithClientCommonNames adds the given value to the ClientCommonNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ClientCommonNames field. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithClientCommonNames(values ...string) *RequestHeaderIdentityProviderApplyConfiguration { - for i := range values { - b.ClientCommonNames = append(b.ClientCommonNames, values[i]) - } - return b -} - -// WithHeaders adds the given value to the Headers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Headers field. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithHeaders(values ...string) *RequestHeaderIdentityProviderApplyConfiguration { - for i := range values { - b.Headers = append(b.Headers, values[i]) - } - return b -} - -// WithPreferredUsernameHeaders adds the given value to the PreferredUsernameHeaders field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PreferredUsernameHeaders field. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithPreferredUsernameHeaders(values ...string) *RequestHeaderIdentityProviderApplyConfiguration { - for i := range values { - b.PreferredUsernameHeaders = append(b.PreferredUsernameHeaders, values[i]) - } - return b -} - -// WithNameHeaders adds the given value to the NameHeaders field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NameHeaders field. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithNameHeaders(values ...string) *RequestHeaderIdentityProviderApplyConfiguration { - for i := range values { - b.NameHeaders = append(b.NameHeaders, values[i]) - } - return b -} - -// WithEmailHeaders adds the given value to the EmailHeaders field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the EmailHeaders field. -func (b *RequestHeaderIdentityProviderApplyConfiguration) WithEmailHeaders(values ...string) *RequestHeaderIdentityProviderApplyConfiguration { - for i := range values { - b.EmailHeaders = append(b.EmailHeaders, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requiredhstspolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requiredhstspolicy.go deleted file mode 100644 index e78614500..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/requiredhstspolicy.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// RequiredHSTSPolicyApplyConfiguration represents a declarative configuration of the RequiredHSTSPolicy type for use -// with apply. -type RequiredHSTSPolicyApplyConfiguration struct { - // namespaceSelector specifies a label selector such that the policy applies only to those routes that - // are in namespaces with labels that match the selector, and are in one of the DomainPatterns. - // Defaults to the empty LabelSelector, which matches everything. - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - // domainPatterns is a list of domains for which the desired HSTS annotations are required. - // If domainPatterns is specified and a route is created with a spec.host matching one of the domains, - // the route must specify the HSTS Policy components described in the matching RequiredHSTSPolicy. - // - // The use of wildcards is allowed like this: *.foo.com matches everything under foo.com. - // foo.com only matches foo.com, so to cover foo.com and everything under it, you must specify *both*. - DomainPatterns []string `json:"domainPatterns,omitempty"` - // maxAge is the delta time range in seconds during which hosts are regarded as HSTS hosts. - // If set to 0, it negates the effect, and hosts are removed as HSTS hosts. - // If set to 0 and includeSubdomains is specified, all subdomains of the host are also removed as HSTS hosts. - // maxAge is a time-to-live value, and if this policy is not refreshed on a client, the HSTS - // policy will eventually expire on that client. - MaxAge *MaxAgePolicyApplyConfiguration `json:"maxAge,omitempty"` - // preloadPolicy directs the client to include hosts in its host preload list so that - // it never needs to do an initial load to get the HSTS header (note that this is not defined - // in RFC 6797 and is therefore client implementation-dependent). - PreloadPolicy *configv1.PreloadPolicy `json:"preloadPolicy,omitempty"` - // includeSubDomainsPolicy means the HSTS Policy should apply to any subdomains of the host's - // domain name. Thus, for the host bar.foo.com, if includeSubDomainsPolicy was set to RequireIncludeSubDomains: - // - the host app.bar.foo.com would inherit the HSTS Policy of bar.foo.com - // - the host bar.foo.com would inherit the HSTS Policy of bar.foo.com - // - the host foo.com would NOT inherit the HSTS Policy of bar.foo.com - // - the host def.foo.com would NOT inherit the HSTS Policy of bar.foo.com - IncludeSubDomainsPolicy *configv1.IncludeSubDomainsPolicy `json:"includeSubDomainsPolicy,omitempty"` -} - -// RequiredHSTSPolicyApplyConfiguration constructs a declarative configuration of the RequiredHSTSPolicy type for use with -// apply. -func RequiredHSTSPolicy() *RequiredHSTSPolicyApplyConfiguration { - return &RequiredHSTSPolicyApplyConfiguration{} -} - -// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *RequiredHSTSPolicyApplyConfiguration { - b.NamespaceSelector = value - return b -} - -// WithDomainPatterns adds the given value to the DomainPatterns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DomainPatterns field. -func (b *RequiredHSTSPolicyApplyConfiguration) WithDomainPatterns(values ...string) *RequiredHSTSPolicyApplyConfiguration { - for i := range values { - b.DomainPatterns = append(b.DomainPatterns, values[i]) - } - return b -} - -// WithMaxAge sets the MaxAge field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxAge field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithMaxAge(value *MaxAgePolicyApplyConfiguration) *RequiredHSTSPolicyApplyConfiguration { - b.MaxAge = value - return b -} - -// WithPreloadPolicy sets the PreloadPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PreloadPolicy field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithPreloadPolicy(value configv1.PreloadPolicy) *RequiredHSTSPolicyApplyConfiguration { - b.PreloadPolicy = &value - return b -} - -// WithIncludeSubDomainsPolicy sets the IncludeSubDomainsPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IncludeSubDomainsPolicy field is set to the value of the last call. -func (b *RequiredHSTSPolicyApplyConfiguration) WithIncludeSubDomainsPolicy(value configv1.IncludeSubDomainsPolicy) *RequiredHSTSPolicyApplyConfiguration { - b.IncludeSubDomainsPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/scheduler.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/scheduler.go deleted file mode 100644 index 3e6a19393..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/scheduler.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// SchedulerApplyConfiguration represents a declarative configuration of the Scheduler type for use -// with apply. -// -// Scheduler holds cluster-wide config information to run the Kubernetes Scheduler -// and influence its placement decisions. The canonical name for this config is `cluster`. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type SchedulerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *SchedulerSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1.SchedulerStatus `json:"status,omitempty"` -} - -// Scheduler constructs a declarative configuration of the Scheduler type for use with -// apply. -func Scheduler(name string) *SchedulerApplyConfiguration { - b := &SchedulerApplyConfiguration{} - b.WithName(name) - b.WithKind("Scheduler") - b.WithAPIVersion("config.openshift.io/v1") - return b -} - -// ExtractSchedulerFrom extracts the applied configuration owned by fieldManager from -// scheduler for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// scheduler must be a unmodified Scheduler API object that was retrieved from the Kubernetes API. -// ExtractSchedulerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractSchedulerFrom(scheduler *configv1.Scheduler, fieldManager string, subresource string) (*SchedulerApplyConfiguration, error) { - b := &SchedulerApplyConfiguration{} - err := managedfields.ExtractInto(scheduler, internal.Parser().Type("com.github.openshift.api.config.v1.Scheduler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(scheduler.Name) - - b.WithKind("Scheduler") - b.WithAPIVersion("config.openshift.io/v1") - return b, nil -} - -// ExtractScheduler extracts the applied configuration owned by fieldManager from -// scheduler. If no managedFields are found in scheduler for fieldManager, a -// SchedulerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// scheduler must be a unmodified Scheduler API object that was retrieved from the Kubernetes API. -// ExtractScheduler provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractScheduler(scheduler *configv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { - return ExtractSchedulerFrom(scheduler, fieldManager, "") -} - -// ExtractSchedulerStatus extracts the applied configuration owned by fieldManager from -// scheduler for the status subresource. -func ExtractSchedulerStatus(scheduler *configv1.Scheduler, fieldManager string) (*SchedulerApplyConfiguration, error) { - return ExtractSchedulerFrom(scheduler, fieldManager, "status") -} - -func (b SchedulerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithKind(value string) *SchedulerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithAPIVersion(value string) *SchedulerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithName(value string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithGenerateName(value string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithNamespace(value string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithUID(value types.UID) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithResourceVersion(value string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithGeneration(value int64) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *SchedulerApplyConfiguration) WithLabels(entries map[string]string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *SchedulerApplyConfiguration) WithAnnotations(entries map[string]string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *SchedulerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *SchedulerApplyConfiguration) WithFinalizers(values ...string) *SchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *SchedulerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithSpec(value *SchedulerSpecApplyConfiguration) *SchedulerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *SchedulerApplyConfiguration) WithStatus(value configv1.SchedulerStatus) *SchedulerApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *SchedulerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *SchedulerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *SchedulerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *SchedulerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/schedulerspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/schedulerspec.go deleted file mode 100644 index 64d0aab07..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/schedulerspec.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// SchedulerSpecApplyConfiguration represents a declarative configuration of the SchedulerSpec type for use -// with apply. -type SchedulerSpecApplyConfiguration struct { - // DEPRECATED: the scheduler Policy API has been deprecated and will be removed in a future release. - // policy is a reference to a ConfigMap containing scheduler policy which has - // user specified predicates and priorities. If this ConfigMap is not available - // scheduler will default to use DefaultAlgorithmProvider. - // The namespace for this configmap is openshift-config. - Policy *ConfigMapNameReferenceApplyConfiguration `json:"policy,omitempty"` - // profile sets which scheduling profile should be set in order to configure scheduling - // decisions for new pods. - // - // Valid values are "LowNodeUtilization", "HighNodeUtilization", "NoScoring" - // Defaults to "LowNodeUtilization" - Profile *configv1.SchedulerProfile `json:"profile,omitempty"` - // profileCustomizations contains configuration for modifying the default behavior of existing scheduler profiles. - // Deprecated: no longer needed, since DRA is GA starting with 4.21, and - // is enabled by' default in the cluster, this field will be removed in 4.24. - ProfileCustomizations *ProfileCustomizationsApplyConfiguration `json:"profileCustomizations,omitempty"` - // defaultNodeSelector helps set the cluster-wide default node selector to - // restrict pod placement to specific nodes. This is applied to the pods - // created in all namespaces and creates an intersection with any existing - // nodeSelectors already set on a pod, additionally constraining that pod's selector. - // For example, - // defaultNodeSelector: "type=user-node,region=east" would set nodeSelector - // field in pod spec to "type=user-node,region=east" to all pods created - // in all namespaces. Namespaces having project-wide node selectors won't be - // impacted even if this field is set. This adds an annotation section to - // the namespace. - // For example, if a new namespace is created with - // node-selector='type=user-node,region=east', - // the annotation openshift.io/node-selector: type=user-node,region=east - // gets added to the project. When the openshift.io/node-selector annotation - // is set on the project the value is used in preference to the value we are setting - // for defaultNodeSelector field. - // For instance, - // openshift.io/node-selector: "type=user-node,region=west" means - // that the default of "type=user-node,region=east" set in defaultNodeSelector - // would not be applied. - DefaultNodeSelector *string `json:"defaultNodeSelector,omitempty"` - // mastersSchedulable allows masters nodes to be schedulable. When this flag is - // turned on, all the master nodes in the cluster will be made schedulable, - // so that workload pods can run on them. The default value for this field is false, - // meaning none of the master nodes are schedulable. - // Important Note: Once the workload pods start running on the master nodes, - // extreme care must be taken to ensure that cluster-critical control plane components - // are not impacted. - // Please turn on this field after doing due diligence. - MastersSchedulable *bool `json:"mastersSchedulable,omitempty"` -} - -// SchedulerSpecApplyConfiguration constructs a declarative configuration of the SchedulerSpec type for use with -// apply. -func SchedulerSpec() *SchedulerSpecApplyConfiguration { - return &SchedulerSpecApplyConfiguration{} -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *SchedulerSpecApplyConfiguration) WithPolicy(value *ConfigMapNameReferenceApplyConfiguration) *SchedulerSpecApplyConfiguration { - b.Policy = value - return b -} - -// WithProfile sets the Profile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Profile field is set to the value of the last call. -func (b *SchedulerSpecApplyConfiguration) WithProfile(value configv1.SchedulerProfile) *SchedulerSpecApplyConfiguration { - b.Profile = &value - return b -} - -// WithProfileCustomizations sets the ProfileCustomizations field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProfileCustomizations field is set to the value of the last call. -func (b *SchedulerSpecApplyConfiguration) WithProfileCustomizations(value *ProfileCustomizationsApplyConfiguration) *SchedulerSpecApplyConfiguration { - b.ProfileCustomizations = value - return b -} - -// WithDefaultNodeSelector sets the DefaultNodeSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultNodeSelector field is set to the value of the last call. -func (b *SchedulerSpecApplyConfiguration) WithDefaultNodeSelector(value string) *SchedulerSpecApplyConfiguration { - b.DefaultNodeSelector = &value - return b -} - -// WithMastersSchedulable sets the MastersSchedulable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MastersSchedulable field is set to the value of the last call. -func (b *SchedulerSpecApplyConfiguration) WithMastersSchedulable(value bool) *SchedulerSpecApplyConfiguration { - b.MastersSchedulable = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/secretnamereference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/secretnamereference.go deleted file mode 100644 index 110052b0c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/secretnamereference.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SecretNameReferenceApplyConfiguration represents a declarative configuration of the SecretNameReference type for use -// with apply. -// -// SecretNameReference references a secret in a specific namespace. -// The namespace must be specified at the point of use. -type SecretNameReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced secret - Name *string `json:"name,omitempty"` -} - -// SecretNameReferenceApplyConfiguration constructs a declarative configuration of the SecretNameReference type for use with -// apply. -func SecretNameReference() *SecretNameReferenceApplyConfiguration { - return &SecretNameReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *SecretNameReferenceApplyConfiguration) WithName(value string) *SecretNameReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/signaturestore.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/signaturestore.go deleted file mode 100644 index cb2e6a2f2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/signaturestore.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SignatureStoreApplyConfiguration represents a declarative configuration of the SignatureStore type for use -// with apply. -// -// SignatureStore represents the URL of custom Signature Store -type SignatureStoreApplyConfiguration struct { - // url contains the upstream custom signature store URL. - // url should be a valid absolute http/https URI of an upstream signature store as per rfc1738. - // This must be provided and cannot be empty. - URL *string `json:"url,omitempty"` - // 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 signature store is not honored. - // If the specified ca data is not valid, the signature store is not honored. - // If empty, we fall back to the CA configured via Proxy, which is appended to the default system roots. - // The namespace for this config map is openshift-config. - CA *ConfigMapNameReferenceApplyConfiguration `json:"ca,omitempty"` -} - -// SignatureStoreApplyConfiguration constructs a declarative configuration of the SignatureStore type for use with -// apply. -func SignatureStore() *SignatureStoreApplyConfiguration { - return &SignatureStoreApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *SignatureStoreApplyConfiguration) WithURL(value string) *SignatureStoreApplyConfiguration { - b.URL = &value - return b -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *SignatureStoreApplyConfiguration) WithCA(value *ConfigMapNameReferenceApplyConfiguration) *SignatureStoreApplyConfiguration { - b.CA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourcedclaimmapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourcedclaimmapping.go deleted file mode 100644 index 92c4dc24f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourcedclaimmapping.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SourcedClaimMappingApplyConfiguration represents a declarative configuration of the SourcedClaimMapping type for use -// with apply. -// -// SourcedClaimMapping configures the mapping behavior for a single external claim -// from the response the apiserver received from the external claim source. -type SourcedClaimMappingApplyConfiguration struct { - // name is a required name of the claim that - // will be produced and made available during - // the claim-to-identity mapping process. - // name must consist of only lowercase alpha characters and underscores ('_'). - // name must be at least 1 character and must not exceed 256 characters in length. - Name *string `json:"name,omitempty"` - // expression is a required CEL expression that - // will produce a value to be assigned to the claim. - // The full response body from the request to the - // external claim source is provided via the - // `response.body` variable. - // - // The contents of the `response.body` variable varies based on the response received - // from the external source. It is the responsibility of those configuring - // this expression to understand what is returned from the external source. - // - // expression must be at least 1 character and must not exceed 1024 characters in length. - Expression *string `json:"expression,omitempty"` -} - -// SourcedClaimMappingApplyConfiguration constructs a declarative configuration of the SourcedClaimMapping type for use with -// apply. -func SourcedClaimMapping() *SourcedClaimMappingApplyConfiguration { - return &SourcedClaimMappingApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *SourcedClaimMappingApplyConfiguration) WithName(value string) *SourcedClaimMappingApplyConfiguration { - b.Name = &value - return b -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *SourcedClaimMappingApplyConfiguration) WithExpression(value string) *SourcedClaimMappingApplyConfiguration { - b.Expression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourceurl.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourceurl.go deleted file mode 100644 index b94a89f39..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/sourceurl.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SourceURLApplyConfiguration represents a declarative configuration of the SourceURL type for use -// with apply. -// -// SourceURL configures the options used to build the URL that is queried for external claims. -type SourceURLApplyConfiguration struct { - // hostname is a required hostname for which the external claims are located. - // - // It must be a valid DNS subdomain name as per RFC1123. - // - // This means that it must start and end with a lowercase alphanumeric character, - // must only consist of lowercase alphanumeric characters, '-', and '.'. - // hostname may optionally specify a port in the format ':{port}'. - // If a port is specified it must not exceed 65535. - // - // hostname must be at least 1 character in length. - // When specifying a port, hostname must not exceed 259 characters in length. - // When not specifying a port, hostname must not exceed 253 characters in length. - Hostname *string `json:"hostname,omitempty"` - // pathExpression is a required CEL expression that returns a list - // of string values used to construct the URL path. - // Claims from the token used for the request to the kube-apiserver - // are made available via the `claims` variable. - // expression must be at least 1 character in length and must not exceed 1024 characters in length. - // - // Values in the returned list will be joined with the hostname using a forward slash - // (`/`) as a separator. Values in the returned list do not need to include the forward slash. - // If a forward slash is included in a returned value, it will be encoded as `%2F`. - // - // Example of a static path configuration: - // - // pathExpression: ['realms', 'k8s', 'protocol', 'openid-connect', 'userinfo'] - // - // The above example would resolve to the path: '/realms/k8s/protocol/openid-connect/userinfo' - // - // Example of a dynamic path configuration: - // - // pathExpression: "['admin', 'realms', 'k8s', 'users'] + [claims.sub] + ['groups']" - // - // Assuming 'claims.sub' is set to '12345', the above example would resolve to the path: '/admin/realms/k8s/users/12345/groups' - PathExpression *string `json:"pathExpression,omitempty"` -} - -// SourceURLApplyConfiguration constructs a declarative configuration of the SourceURL type for use with -// apply. -func SourceURL() *SourceURLApplyConfiguration { - return &SourceURLApplyConfiguration{} -} - -// WithHostname sets the Hostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hostname field is set to the value of the last call. -func (b *SourceURLApplyConfiguration) WithHostname(value string) *SourceURLApplyConfiguration { - b.Hostname = &value - return b -} - -// WithPathExpression sets the PathExpression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PathExpression field is set to the value of the last call. -func (b *SourceURLApplyConfiguration) WithPathExpression(value string) *SourceURLApplyConfiguration { - b.PathExpression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/storage.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/storage.go deleted file mode 100644 index c55fd9ef5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/storage.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// StorageApplyConfiguration represents a declarative configuration of the Storage type for use -// with apply. -// -// Storage provides persistent storage configuration options for gathering jobs. -// If the type is set to PersistentVolume, then the PersistentVolume must be defined. -// If the type is set to Ephemeral, then the PersistentVolume must not be defined. -type StorageApplyConfiguration struct { - // type is a required field that specifies the type of storage that will be used to store the Insights data archive. - // Valid values are "PersistentVolume" and "Ephemeral". - // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. - // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field. - Type *configv1.StorageType `json:"type,omitempty"` - // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. - // The PersistentVolume must be created in the openshift-insights namespace. - PersistentVolume *PersistentVolumeConfigApplyConfiguration `json:"persistentVolume,omitempty"` -} - -// StorageApplyConfiguration constructs a declarative configuration of the Storage type for use with -// apply. -func Storage() *StorageApplyConfiguration { - return &StorageApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithType(value configv1.StorageType) *StorageApplyConfiguration { - b.Type = &value - return b -} - -// WithPersistentVolume sets the PersistentVolume field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PersistentVolume field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithPersistentVolume(value *PersistentVolumeConfigApplyConfiguration) *StorageApplyConfiguration { - b.PersistentVolume = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/templatereference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/templatereference.go deleted file mode 100644 index be63642b6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/templatereference.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TemplateReferenceApplyConfiguration represents a declarative configuration of the TemplateReference type for use -// with apply. -// -// TemplateReference references a template in a specific namespace. -// The namespace must be specified at the point of use. -type TemplateReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced project request template - Name *string `json:"name,omitempty"` -} - -// TemplateReferenceApplyConfiguration constructs a declarative configuration of the TemplateReference type for use with -// apply. -func TemplateReference() *TemplateReferenceApplyConfiguration { - return &TemplateReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *TemplateReferenceApplyConfiguration) WithName(value string) *TemplateReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlsprofilespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlsprofilespec.go deleted file mode 100644 index cbefaf516..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlsprofilespec.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// TLSProfileSpecApplyConfiguration represents a declarative configuration of the TLSProfileSpec type for use -// with apply. -// -// TLSProfileSpec is the desired behavior of a TLSSecurityProfile. -type TLSProfileSpecApplyConfiguration struct { - // ciphers is used to specify the cipher algorithms that are negotiated - // during the TLS handshake. Operators may remove entries that their operands - // do not support. For example, to use only ECDHE-RSA-AES128-GCM-SHA256 (yaml): - // - // ciphers: - // - ECDHE-RSA-AES128-GCM-SHA256 - // - // TLS 1.3 cipher suites (e.g. TLS_AES_128_GCM_SHA256) are not configurable - // and are always enabled when TLS 1.3 is negotiated. - Ciphers []string `json:"ciphers,omitempty"` - // groups is an optional, ordered field used to specify the supported groups (formerly known as - // elliptic curves) that are used during the TLS handshake. The order of the groups represents - // a suggested preference, with the most preferred group first. Note that not all platform - // components honor the ordering: Go-based components use Go's internal preference order and - // treat this list as a filter of allowed groups rather than an ordered preference. - // Operators may remove entries their operands do not support. - // - // When omitted, this means no opinion and the platform is left to choose reasonable defaults which are - // subject to change over time and may be different per platform component depending on the underlying TLS - // libraries they use. If specified, the list must contain at least one and at most 7 groups, - // and each group must be unique. - // - // For example, to use X25519 and secp256r1 (yaml): - // - // groups: - // - X25519 - // - secp256r1 - Groups []configv1.TLSGroup `json:"groups,omitempty"` - // minTLSVersion is used to specify the minimal version of the TLS protocol - // that is negotiated during the TLS handshake. For example, to use TLS - // versions 1.1, 1.2 and 1.3 (yaml): - // - // minTLSVersion: VersionTLS11 - MinTLSVersion *configv1.TLSProtocolVersion `json:"minTLSVersion,omitempty"` -} - -// TLSProfileSpecApplyConfiguration constructs a declarative configuration of the TLSProfileSpec type for use with -// apply. -func TLSProfileSpec() *TLSProfileSpecApplyConfiguration { - return &TLSProfileSpecApplyConfiguration{} -} - -// WithCiphers adds the given value to the Ciphers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Ciphers field. -func (b *TLSProfileSpecApplyConfiguration) WithCiphers(values ...string) *TLSProfileSpecApplyConfiguration { - for i := range values { - b.Ciphers = append(b.Ciphers, values[i]) - } - return b -} - -// WithGroups adds the given value to the Groups field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Groups field. -func (b *TLSProfileSpecApplyConfiguration) WithGroups(values ...configv1.TLSGroup) *TLSProfileSpecApplyConfiguration { - for i := range values { - b.Groups = append(b.Groups, values[i]) - } - return b -} - -// WithMinTLSVersion sets the MinTLSVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinTLSVersion field is set to the value of the last call. -func (b *TLSProfileSpecApplyConfiguration) WithMinTLSVersion(value configv1.TLSProtocolVersion) *TLSProfileSpecApplyConfiguration { - b.MinTLSVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlssecurityprofile.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlssecurityprofile.go deleted file mode 100644 index eab7cd452..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tlssecurityprofile.go +++ /dev/null @@ -1,161 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// TLSSecurityProfileApplyConfiguration represents a declarative configuration of the TLSSecurityProfile type for use -// with apply. -// -// TLSSecurityProfile defines the schema for a TLS security profile. This object -// is used by operators to apply TLS security settings to operands. -type TLSSecurityProfileApplyConfiguration struct { - // type is one of Old, Intermediate, Modern or Custom. Custom provides the - // ability to specify individual TLS security profile parameters. - // - // The cipher and groups lists in these profiles are based on version 5.8 of the - // Mozilla Server Side TLS configuration guidelines. - // See: https://ssl-config.mozilla.org/guidelines/5.8.json - // - // The groups are listed in suggested preference order, with the most preferred group first. - // Note that not all platform components honor the ordering: Go-based components use Go's - // internal preference order and treat this list as a filter of allowed groups rather than - // an ordered preference. - // Note that X25519MLKEM768 is a post-quantum hybrid group that is not - // FIPS-approved and should be ignored by components running in FIPS mode. - // - // The profiles are intent based, so they may change over time as new ciphers are - // developed and existing ciphers are found to be insecure. Depending on - // precisely which ciphers are available to a process, the list may be reduced. - Type *configv1.TLSProfileType `json:"type,omitempty"` - // old is a TLS profile for use when services need to be accessed by very old - // clients or libraries and should be used only as a last resort. - // - // The supported groups list includes by default the following groups - // in suggested preference order (ordering may not be honored by all implementations): - // X25519MLKEM768, X25519, secp256r1, secp384r1. - // - // This profile is equivalent to a Custom profile specified as: - // minTLSVersion: VersionTLS10 - // ciphers: - // - TLS_AES_128_GCM_SHA256 - // - TLS_AES_256_GCM_SHA384 - // - TLS_CHACHA20_POLY1305_SHA256 - // - ECDHE-ECDSA-AES128-GCM-SHA256 - // - ECDHE-RSA-AES128-GCM-SHA256 - // - ECDHE-ECDSA-AES256-GCM-SHA384 - // - ECDHE-RSA-AES256-GCM-SHA384 - // - ECDHE-ECDSA-CHACHA20-POLY1305 - // - ECDHE-RSA-CHACHA20-POLY1305 - // - ECDHE-ECDSA-AES128-SHA256 - // - ECDHE-RSA-AES128-SHA256 - // - ECDHE-ECDSA-AES128-SHA - // - ECDHE-RSA-AES128-SHA - // - ECDHE-ECDSA-AES256-SHA384 - // - ECDHE-RSA-AES256-SHA384 - // - ECDHE-ECDSA-AES256-SHA - // - ECDHE-RSA-AES256-SHA - // - AES128-GCM-SHA256 - // - AES256-GCM-SHA384 - // - AES128-SHA256 - // - AES256-SHA256 - // - AES128-SHA - // - AES256-SHA - // - DES-CBC3-SHA - Old *configv1.OldTLSProfile `json:"old,omitempty"` - // intermediate is a TLS profile for use when you do not need compatibility with - // legacy clients and want to remain highly secure while being compatible with - // most clients currently in use. - // - // The supported groups list includes by default the following groups - // in suggested preference order (ordering may not be honored by all implementations): - // X25519MLKEM768, X25519, secp256r1, secp384r1. - // - // This profile is equivalent to a Custom profile specified as: - // minTLSVersion: VersionTLS12 - // ciphers: - // - TLS_AES_128_GCM_SHA256 - // - TLS_AES_256_GCM_SHA384 - // - TLS_CHACHA20_POLY1305_SHA256 - // - ECDHE-ECDSA-AES128-GCM-SHA256 - // - ECDHE-RSA-AES128-GCM-SHA256 - // - ECDHE-ECDSA-AES256-GCM-SHA384 - // - ECDHE-RSA-AES256-GCM-SHA384 - // - ECDHE-ECDSA-CHACHA20-POLY1305 - // - ECDHE-RSA-CHACHA20-POLY1305 - Intermediate *configv1.IntermediateTLSProfile `json:"intermediate,omitempty"` - // modern is a TLS security profile for use with clients that support TLS 1.3 and - // do not need backward compatibility for older clients. - // The supported groups list includes by default the following groups - // in suggested preference order (ordering may not be honored by all implementations): - // X25519MLKEM768, X25519, secp256r1, secp384r1. - // This profile is equivalent to a Custom profile specified as: - // minTLSVersion: VersionTLS13 - // ciphers: - // - TLS_AES_128_GCM_SHA256 - // - TLS_AES_256_GCM_SHA384 - // - TLS_CHACHA20_POLY1305_SHA256 - Modern *configv1.ModernTLSProfile `json:"modern,omitempty"` - // custom is a user-defined TLS security profile. Be extremely careful using a custom - // profile as invalid configurations can be catastrophic. - // - // The supported groups list for this profile is empty by default. - // - // An example custom profile looks like this: - // - // minTLSVersion: VersionTLS11 - // ciphers: - // - ECDHE-ECDSA-CHACHA20-POLY1305 - // - ECDHE-RSA-CHACHA20-POLY1305 - // - ECDHE-RSA-AES128-GCM-SHA256 - // - ECDHE-ECDSA-AES128-GCM-SHA256 - Custom *CustomTLSProfileApplyConfiguration `json:"custom,omitempty"` -} - -// TLSSecurityProfileApplyConfiguration constructs a declarative configuration of the TLSSecurityProfile type for use with -// apply. -func TLSSecurityProfile() *TLSSecurityProfileApplyConfiguration { - return &TLSSecurityProfileApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithType(value configv1.TLSProfileType) *TLSSecurityProfileApplyConfiguration { - b.Type = &value - return b -} - -// WithOld sets the Old field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Old field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithOld(value configv1.OldTLSProfile) *TLSSecurityProfileApplyConfiguration { - b.Old = &value - return b -} - -// WithIntermediate sets the Intermediate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Intermediate field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithIntermediate(value configv1.IntermediateTLSProfile) *TLSSecurityProfileApplyConfiguration { - b.Intermediate = &value - return b -} - -// WithModern sets the Modern field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Modern field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithModern(value configv1.ModernTLSProfile) *TLSSecurityProfileApplyConfiguration { - b.Modern = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *TLSSecurityProfileApplyConfiguration) WithCustom(value *CustomTLSProfileApplyConfiguration) *TLSSecurityProfileApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmapping.go deleted file mode 100644 index bedd170ae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmapping.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenClaimMappingApplyConfiguration represents a declarative configuration of the TokenClaimMapping type for use -// with apply. -// -// TokenClaimMapping allows specifying a JWT token claim to be used when mapping claims from an authentication token to cluster identities. -type TokenClaimMappingApplyConfiguration struct { - // claim is an optional field for specifying the JWT token claim that is used in the mapping. - // The value of this claim will be assigned to the field in which this mapping is associated. - // claim must not exceed 256 characters in length. - // When set to the empty string `""`, this means that no named claim should be used for the group mapping. - // claim is required when the ExternalOIDCWithUpstreamParity feature gate is not enabled. - Claim *string `json:"claim,omitempty"` - // expression is an optional CEL expression used to derive - // group values from JWT claims. - // - // CEL expressions have access to the token claims through a CEL variable, 'claims'. - // - // expression must be at least 1 character and must not exceed 1024 characters in length . - // - // When specified, claim must not be set or be explicitly set to the empty string (`""`). - Expression *string `json:"expression,omitempty"` -} - -// TokenClaimMappingApplyConfiguration constructs a declarative configuration of the TokenClaimMapping type for use with -// apply. -func TokenClaimMapping() *TokenClaimMappingApplyConfiguration { - return &TokenClaimMappingApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *TokenClaimMappingApplyConfiguration) WithClaim(value string) *TokenClaimMappingApplyConfiguration { - b.Claim = &value - return b -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *TokenClaimMappingApplyConfiguration) WithExpression(value string) *TokenClaimMappingApplyConfiguration { - b.Expression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmappings.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmappings.go deleted file mode 100644 index bb704d34f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimmappings.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenClaimMappingsApplyConfiguration represents a declarative configuration of the TokenClaimMappings type for use -// with apply. -type TokenClaimMappingsApplyConfiguration struct { - // username is a required field that configures how the username of a cluster identity should be constructed from the claims in a JWT token issued by the identity provider. - Username *UsernameClaimMappingApplyConfiguration `json:"username,omitempty"` - // groups is an optional field that configures how the groups of a cluster identity should be constructed from the claims in a JWT token issued by the identity provider. - // - // When referencing a claim, if the claim is present in the JWT token, its value must be a list of groups separated by a comma (','). - // - // For example - '"example"' and '"exampleOne", "exampleTwo", "exampleThree"' are valid claim values. - Groups *PrefixedClaimMappingApplyConfiguration `json:"groups,omitempty"` - // uid is an optional field for configuring the claim mapping used to construct the uid for the cluster identity. - // - // When using uid.claim to specify the claim it must be a single string value. - // When using uid.expression the expression must result in a single string value. - // - // When omitted, this means the user has no opinion and the platform is left to choose a default, which is subject to change over time. - // - // The current default is to use the 'sub' claim. - UID *TokenClaimOrExpressionMappingApplyConfiguration `json:"uid,omitempty"` - // extra is an optional field for configuring the mappings used to construct the extra attribute for the cluster identity. - // When omitted, no extra attributes will be present on the cluster identity. - // - // key values for extra mappings must be unique. - // A maximum of 32 extra attribute mappings may be provided. - Extra []ExtraMappingApplyConfiguration `json:"extra,omitempty"` -} - -// TokenClaimMappingsApplyConfiguration constructs a declarative configuration of the TokenClaimMappings type for use with -// apply. -func TokenClaimMappings() *TokenClaimMappingsApplyConfiguration { - return &TokenClaimMappingsApplyConfiguration{} -} - -// WithUsername sets the Username field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Username field is set to the value of the last call. -func (b *TokenClaimMappingsApplyConfiguration) WithUsername(value *UsernameClaimMappingApplyConfiguration) *TokenClaimMappingsApplyConfiguration { - b.Username = value - return b -} - -// WithGroups sets the Groups field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Groups field is set to the value of the last call. -func (b *TokenClaimMappingsApplyConfiguration) WithGroups(value *PrefixedClaimMappingApplyConfiguration) *TokenClaimMappingsApplyConfiguration { - b.Groups = value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *TokenClaimMappingsApplyConfiguration) WithUID(value *TokenClaimOrExpressionMappingApplyConfiguration) *TokenClaimMappingsApplyConfiguration { - b.UID = value - return b -} - -// WithExtra adds the given value to the Extra field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Extra field. -func (b *TokenClaimMappingsApplyConfiguration) WithExtra(values ...*ExtraMappingApplyConfiguration) *TokenClaimMappingsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithExtra") - } - b.Extra = append(b.Extra, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimorexpressionmapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimorexpressionmapping.go deleted file mode 100644 index e4f62674d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimorexpressionmapping.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenClaimOrExpressionMappingApplyConfiguration represents a declarative configuration of the TokenClaimOrExpressionMapping type for use -// with apply. -// -// TokenClaimOrExpressionMapping allows specifying either a JWT token claim or CEL expression to be used when mapping claims from an authentication token to cluster identities. -type TokenClaimOrExpressionMappingApplyConfiguration struct { - // claim is an optional field for specifying the JWT token claim that is used in the mapping. - // The value of this claim will be assigned to the field in which this mapping is associated. - // - // Precisely one of claim or expression must be set. - // claim must not be specified when expression is set. - // When specified, claim must be at least 1 character in length and must not exceed 256 characters in length. - Claim *string `json:"claim,omitempty"` - // expression is an optional field for specifying a CEL expression that produces a string value from JWT token claims. - // - // CEL expressions have access to the token claims through a CEL variable, 'claims'. - // 'claims' is a map of claim names to claim values. - // For example, the 'sub' claim value can be accessed as 'claims.sub'. - // Nested claims can be accessed using dot notation ('claims.foo.bar'). - // - // Precisely one of claim or expression must be set. - // expression must not be specified when claim is set. - // When specified, expression must be at least 1 character in length and must not exceed 1024 characters in length. - Expression *string `json:"expression,omitempty"` -} - -// TokenClaimOrExpressionMappingApplyConfiguration constructs a declarative configuration of the TokenClaimOrExpressionMapping type for use with -// apply. -func TokenClaimOrExpressionMapping() *TokenClaimOrExpressionMappingApplyConfiguration { - return &TokenClaimOrExpressionMappingApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *TokenClaimOrExpressionMappingApplyConfiguration) WithClaim(value string) *TokenClaimOrExpressionMappingApplyConfiguration { - b.Claim = &value - return b -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *TokenClaimOrExpressionMappingApplyConfiguration) WithExpression(value string) *TokenClaimOrExpressionMappingApplyConfiguration { - b.Expression = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationcelrule.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationcelrule.go deleted file mode 100644 index 72df2376c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationcelrule.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenClaimValidationCELRuleApplyConfiguration represents a declarative configuration of the TokenClaimValidationCELRule type for use -// with apply. -type TokenClaimValidationCELRuleApplyConfiguration struct { - // expression is a CEL expression evaluated against token claims. - // expression is required, must be at least 1 character in length and must not exceed 1024 characters. - // The expression must return a boolean value where 'true' signals a valid token and 'false' an invalid one. - Expression *string `json:"expression,omitempty"` - // message is a required human-readable message to be logged by the Kubernetes API server if the CEL expression defined in 'expression' fails. - // message must be at least 1 character in length and must not exceed 256 characters. - Message *string `json:"message,omitempty"` -} - -// TokenClaimValidationCELRuleApplyConfiguration constructs a declarative configuration of the TokenClaimValidationCELRule type for use with -// apply. -func TokenClaimValidationCELRule() *TokenClaimValidationCELRuleApplyConfiguration { - return &TokenClaimValidationCELRuleApplyConfiguration{} -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *TokenClaimValidationCELRuleApplyConfiguration) WithExpression(value string) *TokenClaimValidationCELRuleApplyConfiguration { - b.Expression = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *TokenClaimValidationCELRuleApplyConfiguration) WithMessage(value string) *TokenClaimValidationCELRuleApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go deleted file mode 100644 index 53a70c17a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenclaimvalidationrule.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// TokenClaimValidationRuleApplyConfiguration represents a declarative configuration of the TokenClaimValidationRule type for use -// with apply. -// -// TokenClaimValidationRule represents a validation rule based on token claims. -// If type is RequiredClaim, requiredClaim must be set. -// If Type is CEL, CEL must be set and RequiredClaim must be omitted. -type TokenClaimValidationRuleApplyConfiguration struct { - // type is an optional field that configures the type of the validation rule. - // - // Allowed values are "RequiredClaim" and "CEL". - // - // When set to 'RequiredClaim', the Kubernetes API server will be configured to validate that the incoming JWT contains the required claim and that its value matches the required value. - // - // When set to 'CEL', the Kubernetes API server will be configured to validate the incoming JWT against the configured CEL expression. - Type *configv1.TokenValidationRuleType `json:"type,omitempty"` - // requiredClaim allows configuring a required claim name and its expected value. - // This field is required when `type` is set to RequiredClaim, and must be omitted when `type` is set to any other value. - // The Kubernetes API server uses this field to validate if an incoming JWT is valid for this identity provider. - RequiredClaim *TokenRequiredClaimApplyConfiguration `json:"requiredClaim,omitempty"` - // cel holds the CEL expression and message for validation. - // Must be set when Type is "CEL", and forbidden otherwise. - CEL *TokenClaimValidationCELRuleApplyConfiguration `json:"cel,omitempty"` -} - -// TokenClaimValidationRuleApplyConfiguration constructs a declarative configuration of the TokenClaimValidationRule type for use with -// apply. -func TokenClaimValidationRule() *TokenClaimValidationRuleApplyConfiguration { - return &TokenClaimValidationRuleApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *TokenClaimValidationRuleApplyConfiguration) WithType(value configv1.TokenValidationRuleType) *TokenClaimValidationRuleApplyConfiguration { - b.Type = &value - return b -} - -// WithRequiredClaim sets the RequiredClaim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RequiredClaim field is set to the value of the last call. -func (b *TokenClaimValidationRuleApplyConfiguration) WithRequiredClaim(value *TokenRequiredClaimApplyConfiguration) *TokenClaimValidationRuleApplyConfiguration { - b.RequiredClaim = value - return b -} - -// WithCEL sets the CEL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CEL field is set to the value of the last call. -func (b *TokenClaimValidationRuleApplyConfiguration) WithCEL(value *TokenClaimValidationCELRuleApplyConfiguration) *TokenClaimValidationRuleApplyConfiguration { - b.CEL = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenconfig.go deleted file mode 100644 index fffc18a98..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenconfig.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// TokenConfigApplyConfiguration represents a declarative configuration of the TokenConfig type for use -// with apply. -// -// TokenConfig holds the necessary configuration options for authorization and access tokens -type TokenConfigApplyConfiguration struct { - // accessTokenMaxAgeSeconds defines the maximum age of access tokens - AccessTokenMaxAgeSeconds *int32 `json:"accessTokenMaxAgeSeconds,omitempty"` - // accessTokenInactivityTimeoutSeconds - DEPRECATED: setting this field has no effect. - AccessTokenInactivityTimeoutSeconds *int32 `json:"accessTokenInactivityTimeoutSeconds,omitempty"` - // accessTokenInactivityTimeout defines the 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. Takes valid time - // duration string such as "5m", "1.5h" or "2h45m". The minimum allowed - // value for duration is 300s (5 minutes). If the timeout is configured - // per client, then that value takes precedence. If the timeout value is - // not specified and the client does not override the value, then tokens - // are valid until their lifetime. - // - // WARNING: existing tokens' timeout will not be affected (lowered) by changing this value - AccessTokenInactivityTimeout *metav1.Duration `json:"accessTokenInactivityTimeout,omitempty"` -} - -// TokenConfigApplyConfiguration constructs a declarative configuration of the TokenConfig type for use with -// apply. -func TokenConfig() *TokenConfigApplyConfiguration { - return &TokenConfigApplyConfiguration{} -} - -// WithAccessTokenMaxAgeSeconds sets the AccessTokenMaxAgeSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AccessTokenMaxAgeSeconds field is set to the value of the last call. -func (b *TokenConfigApplyConfiguration) WithAccessTokenMaxAgeSeconds(value int32) *TokenConfigApplyConfiguration { - b.AccessTokenMaxAgeSeconds = &value - return b -} - -// WithAccessTokenInactivityTimeoutSeconds sets the AccessTokenInactivityTimeoutSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AccessTokenInactivityTimeoutSeconds field is set to the value of the last call. -func (b *TokenConfigApplyConfiguration) WithAccessTokenInactivityTimeoutSeconds(value int32) *TokenConfigApplyConfiguration { - b.AccessTokenInactivityTimeoutSeconds = &value - return b -} - -// WithAccessTokenInactivityTimeout sets the AccessTokenInactivityTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AccessTokenInactivityTimeout field is set to the value of the last call. -func (b *TokenConfigApplyConfiguration) WithAccessTokenInactivityTimeout(value metav1.Duration) *TokenConfigApplyConfiguration { - b.AccessTokenInactivityTimeout = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenissuer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenissuer.go deleted file mode 100644 index 0675a9b3a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenissuer.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// TokenIssuerApplyConfiguration represents a declarative configuration of the TokenIssuer type for use -// with apply. -type TokenIssuerApplyConfiguration struct { - // issuerURL is a required field that configures the URL used to issue tokens by the identity provider. - // The Kubernetes API server determines how authentication tokens should be handled by matching the 'iss' claim in the JWT to the issuerURL of configured identity providers. - // - // Must be at least 1 character and must not exceed 512 characters in length. - // Must be a valid URL that uses the 'https' scheme and does not contain a query, fragment or user. - URL *string `json:"issuerURL,omitempty"` - // audiences is a required field that configures the acceptable audiences the JWT token, issued by the identity provider, must be issued to. - // At least one of the entries must match the 'aud' claim in the JWT token. - // - // audiences must contain at least one entry and must not exceed ten entries. - Audiences []configv1.TokenAudience `json:"audiences,omitempty"` - // issuerCertificateAuthority is an optional field that configures the certificate authority, used by the Kubernetes API server, to validate the connection to the identity provider when fetching discovery information. - // - // When not specified, the system trust is used. - // - // When specified, it must reference a ConfigMap in the openshift-config namespace containing the PEM-encoded CA certificates under the 'ca-bundle.crt' key in the data field of the ConfigMap. - CertificateAuthority *ConfigMapNameReferenceApplyConfiguration `json:"issuerCertificateAuthority,omitempty"` - // discoveryURL is an optional field that, if specified, overrides the default discovery endpoint used to retrieve OIDC configuration metadata. - // By default, the discovery URL is derived from `issuerURL` as "{issuerURL}/.well-known/openid-configuration". - // - // The discoveryURL must be a valid absolute HTTPS URL. - // It must not contain query parameters, user information, or fragments. - // Additionally, it must differ from the value of `issuerURL` (ignoring trailing slashes). - // The discoveryURL value must be at least 1 character long and no longer than 2048 characters. - DiscoveryURL *string `json:"discoveryURL,omitempty"` -} - -// TokenIssuerApplyConfiguration constructs a declarative configuration of the TokenIssuer type for use with -// apply. -func TokenIssuer() *TokenIssuerApplyConfiguration { - return &TokenIssuerApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *TokenIssuerApplyConfiguration) WithURL(value string) *TokenIssuerApplyConfiguration { - b.URL = &value - return b -} - -// WithAudiences adds the given value to the Audiences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Audiences field. -func (b *TokenIssuerApplyConfiguration) WithAudiences(values ...configv1.TokenAudience) *TokenIssuerApplyConfiguration { - for i := range values { - b.Audiences = append(b.Audiences, values[i]) - } - return b -} - -// WithCertificateAuthority sets the CertificateAuthority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CertificateAuthority field is set to the value of the last call. -func (b *TokenIssuerApplyConfiguration) WithCertificateAuthority(value *ConfigMapNameReferenceApplyConfiguration) *TokenIssuerApplyConfiguration { - b.CertificateAuthority = value - return b -} - -// WithDiscoveryURL sets the DiscoveryURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DiscoveryURL field is set to the value of the last call. -func (b *TokenIssuerApplyConfiguration) WithDiscoveryURL(value string) *TokenIssuerApplyConfiguration { - b.DiscoveryURL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenrequiredclaim.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenrequiredclaim.go deleted file mode 100644 index 1e1003d94..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenrequiredclaim.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenRequiredClaimApplyConfiguration represents a declarative configuration of the TokenRequiredClaim type for use -// with apply. -type TokenRequiredClaimApplyConfiguration struct { - // claim is a required field that configures the name of the required claim. - // When taken from the JWT claims, claim must be a string value. - // - // claim must not be an empty string (""). - Claim *string `json:"claim,omitempty"` - // requiredValue is a required field that configures the value that 'claim' must have when taken from the incoming JWT claims. - // If the value in the JWT claims does not match, the token will be rejected for authentication. - // - // requiredValue must not be an empty string (""). - RequiredValue *string `json:"requiredValue,omitempty"` -} - -// TokenRequiredClaimApplyConfiguration constructs a declarative configuration of the TokenRequiredClaim type for use with -// apply. -func TokenRequiredClaim() *TokenRequiredClaimApplyConfiguration { - return &TokenRequiredClaimApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *TokenRequiredClaimApplyConfiguration) WithClaim(value string) *TokenRequiredClaimApplyConfiguration { - b.Claim = &value - return b -} - -// WithRequiredValue sets the RequiredValue field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RequiredValue field is set to the value of the last call. -func (b *TokenRequiredClaimApplyConfiguration) WithRequiredValue(value string) *TokenRequiredClaimApplyConfiguration { - b.RequiredValue = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenuservalidationrule.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenuservalidationrule.go deleted file mode 100644 index 9e0a2bdc0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/tokenuservalidationrule.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// TokenUserValidationRuleApplyConfiguration represents a declarative configuration of the TokenUserValidationRule type for use -// with apply. -// -// TokenUserValidationRule provides a CEL-based rule used to validate a token subject. -// Each rule contains a CEL expression that is evaluated against the token’s claims. -type TokenUserValidationRuleApplyConfiguration struct { - // expression is a required CEL expression that performs a validation on cluster user identity attributes like username, groups, etc. - // - // The expression must evaluate to a boolean value. - // When the expression evaluates to 'true', the cluster user identity is considered valid. - // When the expression evaluates to 'false', the cluster user identity is not considered valid. - // expression must be at least 1 character in length and must not exceed 1024 characters. - Expression *string `json:"expression,omitempty"` - // message is a required human-readable message to be logged by the Kubernetes API server if the CEL expression defined in 'expression' fails. - // message must be at least 1 character in length and must not exceed 256 characters. - Message *string `json:"message,omitempty"` -} - -// TokenUserValidationRuleApplyConfiguration constructs a declarative configuration of the TokenUserValidationRule type for use with -// apply. -func TokenUserValidationRule() *TokenUserValidationRuleApplyConfiguration { - return &TokenUserValidationRuleApplyConfiguration{} -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *TokenUserValidationRuleApplyConfiguration) WithExpression(value string) *TokenUserValidationRuleApplyConfiguration { - b.Expression = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *TokenUserValidationRuleApplyConfiguration) WithMessage(value string) *TokenUserValidationRuleApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/update.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/update.go deleted file mode 100644 index db1128deb..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/update.go +++ /dev/null @@ -1,122 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// UpdateApplyConfiguration represents a declarative configuration of the Update type for use -// with apply. -// -// Update represents an administrator update request. -type UpdateApplyConfiguration struct { - // architecture is an optional field that indicates the desired - // value of the cluster architecture. In this context cluster - // architecture means either a single architecture or a multi - // architecture. architecture can only be set to Multi thereby - // only allowing updates from single to multi architecture. If - // architecture is set, image cannot be set and version must be - // set. - // Valid values are 'Multi' and empty. - Architecture *configv1.ClusterVersionArchitecture `json:"architecture,omitempty"` - // version is a semantic version identifying the update version. - // version is required if architecture is specified. - // If both version and image are set, the version extracted from the referenced image must match the specified version. - Version *string `json:"version,omitempty"` - // image is a container image location that contains the update. - // image should be used when the desired version does not exist in availableUpdates or history. - // When image is set, architecture cannot be specified. - // If both version and image are set, the version extracted from the referenced image must match the specified version. - Image *string `json:"image,omitempty"` - // force allows an administrator to update to an image that has failed - // verification or upgradeable checks that are designed to keep your - // cluster safe. Only use this if: - // * you are testing unsigned release images in short-lived test clusters or - // * you are working around a known bug in the cluster-version - // operator and you have verified the authenticity of the provided - // image yourself. - // The provided image will run with full administrative access - // to the cluster. Do not use this flag with images that come from unknown - // or potentially malicious sources. - Force *bool `json:"force,omitempty"` - // acceptRisks is an optional set of names of conditional update risks that are considered acceptable. - // A conditional update is performed only if all of its risks are acceptable. - // This list may contain entries that apply to current, previous or future updates. - // The entries therefore may not map directly to a risk in .status.conditionalUpdateRisks. - // acceptRisks must not contain more than 1000 entries. - // Entries in this list must be unique. - AcceptRisks []AcceptRiskApplyConfiguration `json:"acceptRisks,omitempty"` - // mode determines how an update should be processed. - // The only valid value is "Preflight". - // When omitted, the cluster performs a normal update by applying the specified version or image to the cluster. - // This is the standard update behavior. - // When set to "Preflight", the cluster runs compatibility checks against the target release without - // performing an actual update. Compatibility results, including any detected risks, are reported - // in status.conditionalUpdates and status.conditionalUpdateRisks alongside risks from the update - // recommendation service. - // This allows administrators to assess update readiness and address issues before committing to the update. - // Preflight mode is particularly useful for skip-level updates where upgrade compatibility needs to be - // verified across multiple minor versions. - // When mode is set to "Preflight", the same rules for version, image, and architecture apply as for normal updates. - Mode *configv1.UpdateMode `json:"mode,omitempty"` -} - -// UpdateApplyConfiguration constructs a declarative configuration of the Update type for use with -// apply. -func Update() *UpdateApplyConfiguration { - return &UpdateApplyConfiguration{} -} - -// WithArchitecture sets the Architecture field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Architecture field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithArchitecture(value configv1.ClusterVersionArchitecture) *UpdateApplyConfiguration { - b.Architecture = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithVersion(value string) *UpdateApplyConfiguration { - b.Version = &value - return b -} - -// WithImage sets the Image field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Image field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithImage(value string) *UpdateApplyConfiguration { - b.Image = &value - return b -} - -// WithForce sets the Force field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Force field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithForce(value bool) *UpdateApplyConfiguration { - b.Force = &value - return b -} - -// WithAcceptRisks adds the given value to the AcceptRisks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AcceptRisks field. -func (b *UpdateApplyConfiguration) WithAcceptRisks(values ...*AcceptRiskApplyConfiguration) *UpdateApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAcceptRisks") - } - b.AcceptRisks = append(b.AcceptRisks, *values[i]) - } - return b -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *UpdateApplyConfiguration) WithMode(value configv1.UpdateMode) *UpdateApplyConfiguration { - b.Mode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/updatehistory.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/updatehistory.go deleted file mode 100644 index 6e5f4e98e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/updatehistory.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// UpdateHistoryApplyConfiguration represents a declarative configuration of the UpdateHistory type for use -// with apply. -// -// UpdateHistory is a single attempted update to the cluster. -type UpdateHistoryApplyConfiguration struct { - // 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). - State *configv1.UpdateState `json:"state,omitempty"` - // startedTime is the time at which the update was started. - StartedTime *metav1.Time `json:"startedTime,omitempty"` - // 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). - CompletionTime *metav1.Time `json:"completionTime,omitempty"` - // version is a semantic version 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. - Version *string `json:"version,omitempty"` - // image is a container image location that contains the update. This value - // is always populated. - Image *string `json:"image,omitempty"` - // verified indicates whether the provided update was properly verified - // before it was installed. If this is false the cluster may not be trusted. - // Verified does not cover upgradeable checks that depend on the cluster - // state at the time when the update target was accepted. - Verified *bool `json:"verified,omitempty"` - // acceptedRisks records risks which were accepted to initiate the update. - // For example, it may mention an Upgradeable=False or missing signature - // that was overridden via desiredUpdate.force, or an update that was - // initiated despite not being in the availableUpdates set of recommended - // update targets. - AcceptedRisks *string `json:"acceptedRisks,omitempty"` -} - -// UpdateHistoryApplyConfiguration constructs a declarative configuration of the UpdateHistory type for use with -// apply. -func UpdateHistory() *UpdateHistoryApplyConfiguration { - return &UpdateHistoryApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithState(value configv1.UpdateState) *UpdateHistoryApplyConfiguration { - b.State = &value - return b -} - -// WithStartedTime sets the StartedTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StartedTime field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithStartedTime(value metav1.Time) *UpdateHistoryApplyConfiguration { - b.StartedTime = &value - return b -} - -// WithCompletionTime sets the CompletionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CompletionTime field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithCompletionTime(value metav1.Time) *UpdateHistoryApplyConfiguration { - b.CompletionTime = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithVersion(value string) *UpdateHistoryApplyConfiguration { - b.Version = &value - return b -} - -// WithImage sets the Image field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Image field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithImage(value string) *UpdateHistoryApplyConfiguration { - b.Image = &value - return b -} - -// WithVerified sets the Verified field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Verified field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithVerified(value bool) *UpdateHistoryApplyConfiguration { - b.Verified = &value - return b -} - -// WithAcceptedRisks sets the AcceptedRisks field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedRisks field is set to the value of the last call. -func (b *UpdateHistoryApplyConfiguration) WithAcceptedRisks(value string) *UpdateHistoryApplyConfiguration { - b.AcceptedRisks = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameclaimmapping.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameclaimmapping.go deleted file mode 100644 index 8676ae891..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameclaimmapping.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// UsernameClaimMappingApplyConfiguration represents a declarative configuration of the UsernameClaimMapping type for use -// with apply. -type UsernameClaimMappingApplyConfiguration struct { - // claim is an optional field that configures the JWT token claim whose value is assigned to the cluster identity field associated with this mapping. - // claim is required when the ExternalOIDCWithUpstreamParity feature gate is not enabled. - // When the ExternalOIDCWithUpstreamParity feature gate is enabled, claim must not be set when expression is set. - // - // claim must not be an empty string ("") and must not exceed 256 characters. - Claim *string `json:"claim,omitempty"` - // expression is an optional CEL expression used to derive - // the username from JWT claims. - // - // CEL expressions have access to the token claims - // through a CEL variable, 'claims'. - // - // expression must be at least 1 character and must not exceed 1024 characters in length. - // expression must not be set when claim is set. - Expression *string `json:"expression,omitempty"` - // prefixPolicy is an optional field that configures how a prefix should be applied to the value of the JWT claim specified in the 'claim' field. - // - // Allowed values are 'Prefix', 'NoPrefix', and omitted (not provided or an empty string). - // - // When set to 'Prefix', the value specified in the prefix field will be prepended to the value of the JWT claim. - // The prefix field must be set when prefixPolicy is 'Prefix'. - // Must not be set to 'Prefix' when expression is set. - // When set to 'NoPrefix', no prefix will be prepended to the value of the JWT claim. - // When omitted, this means no opinion and the platform is left to choose any prefixes that are applied which is subject to change over time. - // Currently, the platform prepends `{issuerURL}#` to the value of the JWT claim when the claim is not 'email'. - // - // As an example, consider the following scenario: - // - // `prefix` is unset, `issuerURL` is set to `https://myoidc.tld`, - // the JWT claims include "username":"userA" and "email":"userA@myoidc.tld", - // and `claim` is set to: - // - "username": the mapped value will be "https://myoidc.tld#userA" - // - "email": the mapped value will be "userA@myoidc.tld" - PrefixPolicy *configv1.UsernamePrefixPolicy `json:"prefixPolicy,omitempty"` - // prefix configures the prefix that should be prepended to the value of the JWT claim. - // - // prefix must be set when prefixPolicy is set to 'Prefix' and must be unset otherwise. - Prefix *UsernamePrefixApplyConfiguration `json:"prefix,omitempty"` -} - -// UsernameClaimMappingApplyConfiguration constructs a declarative configuration of the UsernameClaimMapping type for use with -// apply. -func UsernameClaimMapping() *UsernameClaimMappingApplyConfiguration { - return &UsernameClaimMappingApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *UsernameClaimMappingApplyConfiguration) WithClaim(value string) *UsernameClaimMappingApplyConfiguration { - b.Claim = &value - return b -} - -// WithExpression sets the Expression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Expression field is set to the value of the last call. -func (b *UsernameClaimMappingApplyConfiguration) WithExpression(value string) *UsernameClaimMappingApplyConfiguration { - b.Expression = &value - return b -} - -// WithPrefixPolicy sets the PrefixPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrefixPolicy field is set to the value of the last call. -func (b *UsernameClaimMappingApplyConfiguration) WithPrefixPolicy(value configv1.UsernamePrefixPolicy) *UsernameClaimMappingApplyConfiguration { - b.PrefixPolicy = &value - return b -} - -// WithPrefix sets the Prefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Prefix field is set to the value of the last call. -func (b *UsernameClaimMappingApplyConfiguration) WithPrefix(value *UsernamePrefixApplyConfiguration) *UsernameClaimMappingApplyConfiguration { - b.Prefix = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameprefix.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameprefix.go deleted file mode 100644 index e05bf0087..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/usernameprefix.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// UsernamePrefixApplyConfiguration represents a declarative configuration of the UsernamePrefix type for use -// with apply. -// -// UsernamePrefix configures the string that should -// be used as a prefix for username claim mappings. -type UsernamePrefixApplyConfiguration struct { - // prefixString is a required field that configures the prefix that will be applied to cluster identity username attribute during the process of mapping JWT claims to cluster identity attributes. - // - // prefixString must not be an empty string (""). - PrefixString *string `json:"prefixString,omitempty"` -} - -// UsernamePrefixApplyConfiguration constructs a declarative configuration of the UsernamePrefix type for use with -// apply. -func UsernamePrefix() *UsernamePrefixApplyConfiguration { - return &UsernamePrefixApplyConfiguration{} -} - -// WithPrefixString sets the PrefixString field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrefixString field is set to the value of the last call. -func (b *UsernamePrefixApplyConfiguration) WithPrefixString(value string) *UsernamePrefixApplyConfiguration { - b.PrefixString = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultapproleauthentication.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultapproleauthentication.go deleted file mode 100644 index 9119cbe19..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultapproleauthentication.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VaultAppRoleAuthenticationApplyConfiguration represents a declarative configuration of the VaultAppRoleAuthentication type for use -// with apply. -// -// VaultAppRoleAuthentication defines the configuration for AppRole authentication with Vault. -type VaultAppRoleAuthenticationApplyConfiguration struct { - // secret references a secret in the openshift-config namespace containing - // the AppRole credentials used to authenticate with Vault. - // The referenced Secret must contain two keys: "role-id" for the AppRole Role ID and "secret-id" for the AppRole Secret ID. - Secret *VaultSecretReferenceApplyConfiguration `json:"secret,omitempty"` -} - -// VaultAppRoleAuthenticationApplyConfiguration constructs a declarative configuration of the VaultAppRoleAuthentication type for use with -// apply. -func VaultAppRoleAuthentication() *VaultAppRoleAuthenticationApplyConfiguration { - return &VaultAppRoleAuthenticationApplyConfiguration{} -} - -// WithSecret sets the Secret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Secret field is set to the value of the last call. -func (b *VaultAppRoleAuthenticationApplyConfiguration) WithSecret(value *VaultSecretReferenceApplyConfiguration) *VaultAppRoleAuthenticationApplyConfiguration { - b.Secret = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultauthentication.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultauthentication.go deleted file mode 100644 index 466bbc797..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultauthentication.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VaultAuthenticationApplyConfiguration represents a declarative configuration of the VaultAuthentication type for use -// with apply. -// -// VaultAuthentication defines the authentication method used to authenticate with Vault. -type VaultAuthenticationApplyConfiguration struct { - // type defines the authentication method used to authenticate with Vault. - // Allowed values are AppRole. - // When set to AppRole, the plugin uses AppRole credentials to authenticate with Vault. - Type *configv1.VaultAuthenticationType `json:"type,omitempty"` - // appRole defines the configuration for AppRole authentication. - // This field must be set when type is AppRole, and must be unset otherwise. - AppRole *VaultAppRoleAuthenticationApplyConfiguration `json:"appRole,omitempty"` -} - -// VaultAuthenticationApplyConfiguration constructs a declarative configuration of the VaultAuthentication type for use with -// apply. -func VaultAuthentication() *VaultAuthenticationApplyConfiguration { - return &VaultAuthenticationApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *VaultAuthenticationApplyConfiguration) WithType(value configv1.VaultAuthenticationType) *VaultAuthenticationApplyConfiguration { - b.Type = &value - return b -} - -// WithAppRole sets the AppRole field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AppRole field is set to the value of the last call. -func (b *VaultAuthenticationApplyConfiguration) WithAppRole(value *VaultAppRoleAuthenticationApplyConfiguration) *VaultAuthenticationApplyConfiguration { - b.AppRole = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultconfigmapreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultconfigmapreference.go deleted file mode 100644 index cb0e46af8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultconfigmapreference.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VaultConfigMapReferenceApplyConfiguration represents a declarative configuration of the VaultConfigMapReference type for use -// with apply. -// -// VaultConfigMapReference references a ConfigMap in the openshift-config namespace. -type VaultConfigMapReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced ConfigMap in the openshift-config namespace. - // The name must be a valid DNS subdomain name: it must contain no more than 253 characters, - // contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// VaultConfigMapReferenceApplyConfiguration constructs a declarative configuration of the VaultConfigMapReference type for use with -// apply. -func VaultConfigMapReference() *VaultConfigMapReferenceApplyConfiguration { - return &VaultConfigMapReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *VaultConfigMapReferenceApplyConfiguration) WithName(value string) *VaultConfigMapReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go deleted file mode 100644 index 736095a27..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultkmspluginconfig.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VaultKMSPluginConfigApplyConfiguration represents a declarative configuration of the VaultKMSPluginConfig type for use -// with apply. -// -// VaultKMSPluginConfig defines the KMS plugin configuration specific to Vault KMS -type VaultKMSPluginConfigApplyConfiguration struct { - // kmsPluginImage specifies the container image for the HashiCorp Vault KMS plugin. - // - // The image must be a fully qualified OCI image pull spec with a SHA256 digest. - // The format is: host[:port][/namespace]/name@sha256: - // where the digest must be 64 characters long and consist only of lowercase hexadecimal characters, a-f and 0-9. - // The total length must be between 75 and 447 characters. - // - // Short names (e.g., "vault-plugin" or "hashicorp/vault-plugin") are not allowed. - // The registry hostname must be included and must contain at least one dot. - // Image tags (e.g., ":latest", ":v1.0.0") are not allowed. - // - // Consult the OpenShift documentation for compatible plugin versions with your cluster version, - // then obtain the image digest for that version from HashiCorp's container registry. - // - // For disconnected environments, mirror the plugin image to an accessible registry - // and reference the mirrored location with its digest. - KMSPluginImage *string `json:"kmsPluginImage,omitempty"` - // vaultAddress specifies the address of the HashiCorp Vault instance. - // The value must be a valid HTTPS URL containing only scheme, host, and optional port. - // Paths, user info, query parameters, and fragments are not allowed. - // - // Format: https://hostname[:port] - // Example: https://vault.example.com:8200 - // - // The value must be between 1 and 512 characters. - VaultAddress *string `json:"vaultAddress,omitempty"` - // vaultNamespace specifies the Vault namespace where the Transit secrets engine is mounted. - // This is only applicable for Vault Enterprise installations. - // When this field is not set, no namespace is used. - // - // The value must be between 1 and 4096 characters. - // The namespace cannot end with a forward slash, cannot contain spaces, and cannot be one of the reserved strings: root, sys, audit, auth, cubbyhole, or identity. - VaultNamespace *string `json:"vaultNamespace,omitempty"` - // tls contains the TLS configuration for connecting to the Vault server. - // When this field is not set, system default TLS settings are used. - TLS *VaultTLSConfigApplyConfiguration `json:"tls,omitempty"` - // authentication defines the authentication method used to authenticate with Vault. - Authentication *VaultAuthenticationApplyConfiguration `json:"authentication,omitempty"` - // transitMount specifies the mount path of the Vault Transit engine. - // - // The transit mount must be between 1 and 1024 characters, cannot start or - // end with a forward slash, cannot contain consecutive forward slashes, and - // must only contain RFC 3986 unreserved characters (alphanumeric, hyphen, - // period, underscore, tilde) and forward slashes as path separators. - TransitMount *string `json:"transitMount,omitempty"` - // transitKey specifies the name of the encryption key in Vault's Transit engine. - // This key is used to encrypt and decrypt data. - // - // The transit key must be between 1 and 512 characters, cannot contain forward slashes, - // and must only contain alphanumeric characters, hyphens, periods, and underscores. - TransitKey *string `json:"transitKey,omitempty"` -} - -// VaultKMSPluginConfigApplyConfiguration constructs a declarative configuration of the VaultKMSPluginConfig type for use with -// apply. -func VaultKMSPluginConfig() *VaultKMSPluginConfigApplyConfiguration { - return &VaultKMSPluginConfigApplyConfiguration{} -} - -// WithKMSPluginImage sets the KMSPluginImage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KMSPluginImage field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithKMSPluginImage(value string) *VaultKMSPluginConfigApplyConfiguration { - b.KMSPluginImage = &value - return b -} - -// WithVaultAddress sets the VaultAddress field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VaultAddress field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithVaultAddress(value string) *VaultKMSPluginConfigApplyConfiguration { - b.VaultAddress = &value - return b -} - -// WithVaultNamespace sets the VaultNamespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VaultNamespace field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithVaultNamespace(value string) *VaultKMSPluginConfigApplyConfiguration { - b.VaultNamespace = &value - return b -} - -// WithTLS sets the TLS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLS field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithTLS(value *VaultTLSConfigApplyConfiguration) *VaultKMSPluginConfigApplyConfiguration { - b.TLS = value - return b -} - -// WithAuthentication sets the Authentication field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Authentication field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithAuthentication(value *VaultAuthenticationApplyConfiguration) *VaultKMSPluginConfigApplyConfiguration { - b.Authentication = value - return b -} - -// WithTransitMount sets the TransitMount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransitMount field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithTransitMount(value string) *VaultKMSPluginConfigApplyConfiguration { - b.TransitMount = &value - return b -} - -// WithTransitKey sets the TransitKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransitKey field is set to the value of the last call. -func (b *VaultKMSPluginConfigApplyConfiguration) WithTransitKey(value string) *VaultKMSPluginConfigApplyConfiguration { - b.TransitKey = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultsecretreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultsecretreference.go deleted file mode 100644 index 5918611ed..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaultsecretreference.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VaultSecretReferenceApplyConfiguration represents a declarative configuration of the VaultSecretReference type for use -// with apply. -// -// VaultSecretReference references a secret in the openshift-config namespace. -type VaultSecretReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced secret in the openshift-config namespace. - // The name must be a valid DNS subdomain name: it must contain no more than 253 characters, - // contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// VaultSecretReferenceApplyConfiguration constructs a declarative configuration of the VaultSecretReference type for use with -// apply. -func VaultSecretReference() *VaultSecretReferenceApplyConfiguration { - return &VaultSecretReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *VaultSecretReferenceApplyConfiguration) WithName(value string) *VaultSecretReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaulttlsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaulttlsconfig.go deleted file mode 100644 index 04bf8c3bf..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vaulttlsconfig.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VaultTLSConfigApplyConfiguration represents a declarative configuration of the VaultTLSConfig type for use -// with apply. -// -// VaultTLSConfig contains TLS configuration for connecting to Vault. -type VaultTLSConfigApplyConfiguration struct { - // caBundle references a ConfigMap in the openshift-config namespace containing - // the CA certificate bundle used to verify the TLS connection to the Vault server. - // The referenced ConfigMap must contain the CA bundle in the key "ca-bundle.crt". - // When this field is not set, the system's trusted CA certificates are used. - // - // The namespace for the ConfigMap is openshift-config. - // - // Example ConfigMap: - // apiVersion: v1 - // kind: ConfigMap - // metadata: - // name: vault-ca-bundle - // namespace: openshift-config - // data: - // ca-bundle.crt: | - // -----BEGIN CERTIFICATE----- - // ... - // -----END CERTIFICATE----- - CABundle *VaultConfigMapReferenceApplyConfiguration `json:"caBundle,omitempty"` - // serverName specifies the Server Name Indication (SNI) to use when connecting to Vault via TLS. - // This is useful when the Vault server's hostname doesn't match its TLS certificate. - // When this field is not set, the hostname from vaultAddress is used for SNI. - // - // The value must be a valid DNS hostname: it must contain no more than 253 characters, - // contain only lowercase alphanumeric characters, '-' or '.', and start and end with an alphanumeric character. - ServerName *string `json:"serverName,omitempty"` -} - -// VaultTLSConfigApplyConfiguration constructs a declarative configuration of the VaultTLSConfig type for use with -// apply. -func VaultTLSConfig() *VaultTLSConfigApplyConfiguration { - return &VaultTLSConfigApplyConfiguration{} -} - -// WithCABundle sets the CABundle field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CABundle field is set to the value of the last call. -func (b *VaultTLSConfigApplyConfiguration) WithCABundle(value *VaultConfigMapReferenceApplyConfiguration) *VaultTLSConfigApplyConfiguration { - b.CABundle = value - return b -} - -// WithServerName sets the ServerName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServerName field is set to the value of the last call. -func (b *VaultTLSConfigApplyConfiguration) WithServerName(value string) *VaultTLSConfigApplyConfiguration { - b.ServerName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainhostgroup.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainhostgroup.go deleted file mode 100644 index 651fb4e5e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainhostgroup.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSphereFailureDomainHostGroupApplyConfiguration represents a declarative configuration of the VSphereFailureDomainHostGroup type for use -// with apply. -// -// VSphereFailureDomainHostGroup holds the vmGroup and the hostGroup names in vCenter -// corresponds to a vm-host group of type Virtual Machine and Host respectively. Is also -// contains the vmHostRule which is an affinity vm-host rule in vCenter. -type VSphereFailureDomainHostGroupApplyConfiguration struct { - // vmGroup is the name of the vm-host group of type virtual machine within vCenter for this failure domain. - // vmGroup is limited to 80 characters. - // This field is required when the VSphereFailureDomain ZoneType is HostGroup - VMGroup *string `json:"vmGroup,omitempty"` - // hostGroup is the name of the vm-host group of type host within vCenter for this failure domain. - // hostGroup is limited to 80 characters. - // This field is required when the VSphereFailureDomain ZoneType is HostGroup - HostGroup *string `json:"hostGroup,omitempty"` - // vmHostRule is the name of the affinity vm-host rule within vCenter for this failure domain. - // vmHostRule is limited to 80 characters. - // This field is required when the VSphereFailureDomain ZoneType is HostGroup - VMHostRule *string `json:"vmHostRule,omitempty"` -} - -// VSphereFailureDomainHostGroupApplyConfiguration constructs a declarative configuration of the VSphereFailureDomainHostGroup type for use with -// apply. -func VSphereFailureDomainHostGroup() *VSphereFailureDomainHostGroupApplyConfiguration { - return &VSphereFailureDomainHostGroupApplyConfiguration{} -} - -// WithVMGroup sets the VMGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VMGroup field is set to the value of the last call. -func (b *VSphereFailureDomainHostGroupApplyConfiguration) WithVMGroup(value string) *VSphereFailureDomainHostGroupApplyConfiguration { - b.VMGroup = &value - return b -} - -// WithHostGroup sets the HostGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostGroup field is set to the value of the last call. -func (b *VSphereFailureDomainHostGroupApplyConfiguration) WithHostGroup(value string) *VSphereFailureDomainHostGroupApplyConfiguration { - b.HostGroup = &value - return b -} - -// WithVMHostRule sets the VMHostRule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VMHostRule field is set to the value of the last call. -func (b *VSphereFailureDomainHostGroupApplyConfiguration) WithVMHostRule(value string) *VSphereFailureDomainHostGroupApplyConfiguration { - b.VMHostRule = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go deleted file mode 100644 index 83f1253c3..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainregionaffinity.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VSphereFailureDomainRegionAffinityApplyConfiguration represents a declarative configuration of the VSphereFailureDomainRegionAffinity type for use -// with apply. -// -// VSphereFailureDomainRegionAffinity contains the region type which is the string representation of the -// VSphereFailureDomainRegionType with available options of Datacenter and ComputeCluster. -type VSphereFailureDomainRegionAffinityApplyConfiguration struct { - // type determines the vSphere object type for a region within this failure domain. - // Available types are Datacenter and ComputeCluster. - // When set to Datacenter, this means the vCenter Datacenter defined is the region. - // When set to ComputeCluster, this means the vCenter cluster defined is the region. - Type *configv1.VSphereFailureDomainRegionType `json:"type,omitempty"` -} - -// VSphereFailureDomainRegionAffinityApplyConfiguration constructs a declarative configuration of the VSphereFailureDomainRegionAffinity type for use with -// apply. -func VSphereFailureDomainRegionAffinity() *VSphereFailureDomainRegionAffinityApplyConfiguration { - return &VSphereFailureDomainRegionAffinityApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *VSphereFailureDomainRegionAffinityApplyConfiguration) WithType(value configv1.VSphereFailureDomainRegionType) *VSphereFailureDomainRegionAffinityApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go deleted file mode 100644 index 1cbb05bed..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vspherefailuredomainzoneaffinity.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VSphereFailureDomainZoneAffinityApplyConfiguration represents a declarative configuration of the VSphereFailureDomainZoneAffinity type for use -// with apply. -// -// VSphereFailureDomainZoneAffinity contains the vCenter cluster vm-host group (virtual machine and host types) -// and the vm-host affinity rule that together creates an affinity configuration for vm-host based zonal. -// This configuration within vCenter creates the required association between a failure domain, virtual machines -// and ESXi hosts to create a vm-host based zone. -type VSphereFailureDomainZoneAffinityApplyConfiguration struct { - // type determines the vSphere object type for a zone within this failure domain. - // Available types are ComputeCluster and HostGroup. - // When set to ComputeCluster, this means the vCenter cluster defined is the zone. - // When set to HostGroup, hostGroup must be configured with hostGroup, vmGroup and vmHostRule and - // this means the zone is defined by the grouping of those fields. - Type *configv1.VSphereFailureDomainZoneType `json:"type,omitempty"` - // hostGroup holds the vmGroup and the hostGroup names in vCenter - // corresponds to a vm-host group of type Virtual Machine and Host respectively. Is also - // contains the vmHostRule which is an affinity vm-host rule in vCenter. - HostGroup *VSphereFailureDomainHostGroupApplyConfiguration `json:"hostGroup,omitempty"` -} - -// VSphereFailureDomainZoneAffinityApplyConfiguration constructs a declarative configuration of the VSphereFailureDomainZoneAffinity type for use with -// apply. -func VSphereFailureDomainZoneAffinity() *VSphereFailureDomainZoneAffinityApplyConfiguration { - return &VSphereFailureDomainZoneAffinityApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *VSphereFailureDomainZoneAffinityApplyConfiguration) WithType(value configv1.VSphereFailureDomainZoneType) *VSphereFailureDomainZoneAffinityApplyConfiguration { - b.Type = &value - return b -} - -// WithHostGroup sets the HostGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostGroup field is set to the value of the last call. -func (b *VSphereFailureDomainZoneAffinityApplyConfiguration) WithHostGroup(value *VSphereFailureDomainHostGroupApplyConfiguration) *VSphereFailureDomainZoneAffinityApplyConfiguration { - b.HostGroup = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go deleted file mode 100644 index 4f3d37e0f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformfailuredomainspec.go +++ /dev/null @@ -1,97 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSpherePlatformFailureDomainSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformFailureDomainSpec type for use -// with apply. -// -// VSpherePlatformFailureDomainSpec holds the region and zone failure domain and the vCenter topology of that failure domain. -type VSpherePlatformFailureDomainSpecApplyConfiguration struct { - // name defines the arbitrary but unique name - // of a failure domain. - Name *string `json:"name,omitempty"` - // region defines the name of a region tag that will - // be attached to a vCenter datacenter. The tag - // category in vCenter must be named openshift-region. - Region *string `json:"region,omitempty"` - // zone defines the name of a zone tag that will - // be attached to a vCenter cluster. The tag - // category in vCenter must be named openshift-zone. - Zone *string `json:"zone,omitempty"` - // regionAffinity holds the type of region, Datacenter or ComputeCluster. - // When set to Datacenter, this means the region is a vCenter Datacenter as defined in topology. - // When set to ComputeCluster, this means the region is a vCenter Cluster as defined in topology. - RegionAffinity *VSphereFailureDomainRegionAffinityApplyConfiguration `json:"regionAffinity,omitempty"` - // zoneAffinity holds the type of the zone and the hostGroup which - // vmGroup and the hostGroup names in vCenter corresponds to - // a vm-host group of type Virtual Machine and Host respectively. Is also - // contains the vmHostRule which is an affinity vm-host rule in vCenter. - ZoneAffinity *VSphereFailureDomainZoneAffinityApplyConfiguration `json:"zoneAffinity,omitempty"` - // server is the fully-qualified domain name or the IP address of the vCenter server. - // --- - Server *string `json:"server,omitempty"` - // topology describes a given failure domain using vSphere constructs - Topology *VSpherePlatformTopologyApplyConfiguration `json:"topology,omitempty"` -} - -// VSpherePlatformFailureDomainSpecApplyConfiguration constructs a declarative configuration of the VSpherePlatformFailureDomainSpec type for use with -// apply. -func VSpherePlatformFailureDomainSpec() *VSpherePlatformFailureDomainSpecApplyConfiguration { - return &VSpherePlatformFailureDomainSpecApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithName(value string) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.Name = &value - return b -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithRegion(value string) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.Region = &value - return b -} - -// WithZone sets the Zone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Zone field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithZone(value string) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.Zone = &value - return b -} - -// WithRegionAffinity sets the RegionAffinity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RegionAffinity field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithRegionAffinity(value *VSphereFailureDomainRegionAffinityApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.RegionAffinity = value - return b -} - -// WithZoneAffinity sets the ZoneAffinity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ZoneAffinity field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithZoneAffinity(value *VSphereFailureDomainZoneAffinityApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.ZoneAffinity = value - return b -} - -// WithServer sets the Server field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Server field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithServer(value string) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.Server = &value - return b -} - -// WithTopology sets the Topology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Topology field is set to the value of the last call. -func (b *VSpherePlatformFailureDomainSpecApplyConfiguration) WithTopology(value *VSpherePlatformTopologyApplyConfiguration) *VSpherePlatformFailureDomainSpecApplyConfiguration { - b.Topology = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go deleted file mode 100644 index be5b90e62..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformloadbalancer.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VSpherePlatformLoadBalancerApplyConfiguration represents a declarative configuration of the VSpherePlatformLoadBalancer type for use -// with apply. -// -// VSpherePlatformLoadBalancer defines the load balancer used by the cluster on VSphere platform. -type VSpherePlatformLoadBalancerApplyConfiguration struct { - // type defines the type of load balancer used by the cluster on VSphere platform - // which can be a user-managed or openshift-managed load balancer - // that is to be used for the OpenShift API and Ingress endpoints. - // When set to OpenShiftManagedDefault the static pods in charge of API and Ingress traffic load-balancing - // defined in the machine config operator will be deployed. - // When set to UserManaged these static pods will not be deployed and it is expected that - // the load balancer is configured out of band by the deployer. - // When omitted, this means no opinion and the platform is left to choose a reasonable default. - // The default value is OpenShiftManagedDefault. - Type *configv1.PlatformLoadBalancerType `json:"type,omitempty"` -} - -// VSpherePlatformLoadBalancerApplyConfiguration constructs a declarative configuration of the VSpherePlatformLoadBalancer type for use with -// apply. -func VSpherePlatformLoadBalancer() *VSpherePlatformLoadBalancerApplyConfiguration { - return &VSpherePlatformLoadBalancerApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *VSpherePlatformLoadBalancerApplyConfiguration) WithType(value configv1.PlatformLoadBalancerType) *VSpherePlatformLoadBalancerApplyConfiguration { - b.Type = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworking.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworking.go deleted file mode 100644 index 8926b249a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworking.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSpherePlatformNodeNetworkingApplyConfiguration represents a declarative configuration of the VSpherePlatformNodeNetworking type for use -// with apply. -// -// VSpherePlatformNodeNetworking holds the external and internal node networking spec. -type VSpherePlatformNodeNetworkingApplyConfiguration struct { - // external represents the network configuration of the node that is externally routable. - External *VSpherePlatformNodeNetworkingSpecApplyConfiguration `json:"external,omitempty"` - // internal represents the network configuration of the node that is routable only within the cluster. - Internal *VSpherePlatformNodeNetworkingSpecApplyConfiguration `json:"internal,omitempty"` -} - -// VSpherePlatformNodeNetworkingApplyConfiguration constructs a declarative configuration of the VSpherePlatformNodeNetworking type for use with -// apply. -func VSpherePlatformNodeNetworking() *VSpherePlatformNodeNetworkingApplyConfiguration { - return &VSpherePlatformNodeNetworkingApplyConfiguration{} -} - -// WithExternal sets the External field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the External field is set to the value of the last call. -func (b *VSpherePlatformNodeNetworkingApplyConfiguration) WithExternal(value *VSpherePlatformNodeNetworkingSpecApplyConfiguration) *VSpherePlatformNodeNetworkingApplyConfiguration { - b.External = value - return b -} - -// WithInternal sets the Internal field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Internal field is set to the value of the last call. -func (b *VSpherePlatformNodeNetworkingApplyConfiguration) WithInternal(value *VSpherePlatformNodeNetworkingSpecApplyConfiguration) *VSpherePlatformNodeNetworkingApplyConfiguration { - b.Internal = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworkingspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworkingspec.go deleted file mode 100644 index e90950493..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformnodenetworkingspec.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSpherePlatformNodeNetworkingSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformNodeNetworkingSpec type for use -// with apply. -// -// VSpherePlatformNodeNetworkingSpec holds the network CIDR(s) and port group name for -// including and excluding IP ranges in the cloud provider. -// This would be used for example when multiple network adapters are attached to -// a guest to help determine which IP address the cloud config manager should use -// for the external and internal node networking. -type VSpherePlatformNodeNetworkingSpecApplyConfiguration struct { - // networkSubnetCidr IP address on VirtualMachine's network interfaces included in the fields' CIDRs - // that will be used in respective status.addresses fields. - // --- - NetworkSubnetCIDR []string `json:"networkSubnetCidr,omitempty"` - // network VirtualMachine's VM Network names that will be used to when searching - // for status.addresses fields. Note that if internal.networkSubnetCIDR and - // external.networkSubnetCIDR are not set, then the vNIC associated to this network must - // only have a single IP address assigned to it. - // The available networks (port groups) can be listed using - // `govc ls 'network/*'` - Network *string `json:"network,omitempty"` - // excludeNetworkSubnetCidr IP addresses in subnet ranges will be excluded when selecting - // the IP address from the VirtualMachine's VM for use in the status.addresses fields. - // --- - ExcludeNetworkSubnetCIDR []string `json:"excludeNetworkSubnetCidr,omitempty"` -} - -// VSpherePlatformNodeNetworkingSpecApplyConfiguration constructs a declarative configuration of the VSpherePlatformNodeNetworkingSpec type for use with -// apply. -func VSpherePlatformNodeNetworkingSpec() *VSpherePlatformNodeNetworkingSpecApplyConfiguration { - return &VSpherePlatformNodeNetworkingSpecApplyConfiguration{} -} - -// WithNetworkSubnetCIDR adds the given value to the NetworkSubnetCIDR field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NetworkSubnetCIDR field. -func (b *VSpherePlatformNodeNetworkingSpecApplyConfiguration) WithNetworkSubnetCIDR(values ...string) *VSpherePlatformNodeNetworkingSpecApplyConfiguration { - for i := range values { - b.NetworkSubnetCIDR = append(b.NetworkSubnetCIDR, values[i]) - } - return b -} - -// WithNetwork sets the Network field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Network field is set to the value of the last call. -func (b *VSpherePlatformNodeNetworkingSpecApplyConfiguration) WithNetwork(value string) *VSpherePlatformNodeNetworkingSpecApplyConfiguration { - b.Network = &value - return b -} - -// WithExcludeNetworkSubnetCIDR adds the given value to the ExcludeNetworkSubnetCIDR field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExcludeNetworkSubnetCIDR field. -func (b *VSpherePlatformNodeNetworkingSpecApplyConfiguration) WithExcludeNetworkSubnetCIDR(values ...string) *VSpherePlatformNodeNetworkingSpecApplyConfiguration { - for i := range values { - b.ExcludeNetworkSubnetCIDR = append(b.ExcludeNetworkSubnetCIDR, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go deleted file mode 100644 index 4f31602e5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformspec.go +++ /dev/null @@ -1,128 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VSpherePlatformSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformSpec type for use -// with apply. -// -// VSpherePlatformSpec holds the desired state of the vSphere infrastructure provider. -// In the future the cloud provider operator, storage operator and machine operator will -// use these fields for configuration. -type VSpherePlatformSpecApplyConfiguration struct { - // vcenters holds the connection details for services to communicate with vCenter. - // Up to 3 vCenters are supported. - // Once the cluster has been installed, you are unable to change the current number of defined - // vCenters except when 1.) the cluster has been upgraded from a version of OpenShift - // where the vsphere platform spec was not present or 2.) in TechPreview you are able to add and - // remove vCenters but may not remove all vCenters. You may make modifications to the existing - // vCenters that are defined in the vcenters list in order to match with any added or modified - // failure domains. - // --- - VCenters []VSpherePlatformVCenterSpecApplyConfiguration `json:"vcenters,omitempty"` - // failureDomains contains the definition of region, zone and the vCenter topology. - // If this is omitted failure domains (regions and zones) will not be used. - FailureDomains []VSpherePlatformFailureDomainSpecApplyConfiguration `json:"failureDomains,omitempty"` - // nodeNetworking contains the definition of internal and external network constraints for - // assigning the node's networking. - // If this field is omitted, networking defaults to the legacy - // address selection behavior which is to only support a single address and - // return the first one found. - NodeNetworking *VSpherePlatformNodeNetworkingApplyConfiguration `json:"nodeNetworking,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.apiServerInternalIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - APIServerInternalIPs []configv1.IP `json:"apiServerInternalIPs,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. - // In dual stack clusters this list contains two IP addresses, one from IPv4 - // family and one from IPv6. - // In single stack clusters a single IP address is expected. - // When omitted, values from the status.ingressIPs will be used. - // Once set, the list cannot be completely removed (but its second entry can). - IngressIPs []configv1.IP `json:"ingressIPs,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster - // nodes. Each network is provided in the CIDR format and should be IPv4 or IPv6, - // for example "10.0.0.0/8" or "fd00::/8". - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// VSpherePlatformSpecApplyConfiguration constructs a declarative configuration of the VSpherePlatformSpec type for use with -// apply. -func VSpherePlatformSpec() *VSpherePlatformSpecApplyConfiguration { - return &VSpherePlatformSpecApplyConfiguration{} -} - -// WithVCenters adds the given value to the VCenters field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the VCenters field. -func (b *VSpherePlatformSpecApplyConfiguration) WithVCenters(values ...*VSpherePlatformVCenterSpecApplyConfiguration) *VSpherePlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVCenters") - } - b.VCenters = append(b.VCenters, *values[i]) - } - return b -} - -// WithFailureDomains adds the given value to the FailureDomains field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the FailureDomains field. -func (b *VSpherePlatformSpecApplyConfiguration) WithFailureDomains(values ...*VSpherePlatformFailureDomainSpecApplyConfiguration) *VSpherePlatformSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFailureDomains") - } - b.FailureDomains = append(b.FailureDomains, *values[i]) - } - return b -} - -// WithNodeNetworking sets the NodeNetworking field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeNetworking field is set to the value of the last call. -func (b *VSpherePlatformSpecApplyConfiguration) WithNodeNetworking(value *VSpherePlatformNodeNetworkingApplyConfiguration) *VSpherePlatformSpecApplyConfiguration { - b.NodeNetworking = value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *VSpherePlatformSpecApplyConfiguration) WithAPIServerInternalIPs(values ...configv1.IP) *VSpherePlatformSpecApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *VSpherePlatformSpecApplyConfiguration) WithIngressIPs(values ...configv1.IP) *VSpherePlatformSpecApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *VSpherePlatformSpecApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *VSpherePlatformSpecApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformstatus.go deleted file mode 100644 index 6d7ca4e85..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformstatus.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// VSpherePlatformStatusApplyConfiguration represents a declarative configuration of the VSpherePlatformStatus type for use -// with apply. -// -// VSpherePlatformStatus holds the current status of the vSphere infrastructure provider. -type VSpherePlatformStatusApplyConfiguration struct { - // apiServerInternalIP is an IP address to contact the Kubernetes API server that can be used - // by components inside the cluster, like kubelets using the infrastructure rather - // than Kubernetes networking. It is the IP that the Infrastructure.status.apiServerInternalURI - // points to. It is the IP for a self-hosted load balancer in front of the API servers. - // - // Deprecated: Use APIServerInternalIPs instead. - APIServerInternalIP *string `json:"apiServerInternalIP,omitempty"` - // apiServerInternalIPs are the IP addresses to contact the Kubernetes API - // server that can be used by components inside the cluster, like kubelets - // using the infrastructure rather than Kubernetes networking. These are the - // IPs for a self-hosted load balancer in front of the API servers. In dual - // stack clusters this list contains two IPs otherwise only one. - APIServerInternalIPs []string `json:"apiServerInternalIPs,omitempty"` - // ingressIP is an external IP which routes to the default ingress controller. - // The IP is a suitable target of a wildcard DNS record used to resolve default route host names. - // - // Deprecated: Use IngressIPs instead. - IngressIP *string `json:"ingressIP,omitempty"` - // ingressIPs are the external IPs which route to the default ingress - // controller. The IPs are suitable targets of a wildcard DNS record used to - // resolve default route host names. In dual stack clusters this list - // contains two IPs otherwise only one. - IngressIPs []string `json:"ingressIPs,omitempty"` - // nodeDNSIP is the IP address for the internal DNS used by the - // nodes. Unlike the one managed by the DNS operator, `NodeDNSIP` - // provides name resolution for the nodes themselves. There is no DNS-as-a-service for - // vSphere deployments. In order to minimize necessary changes to the - // datacenter DNS, a DNS service is hosted as a static pod to serve those hostnames - // to the nodes in the cluster. - NodeDNSIP *string `json:"nodeDNSIP,omitempty"` - // loadBalancer defines how the load balancer used by the cluster is configured. - LoadBalancer *VSpherePlatformLoadBalancerApplyConfiguration `json:"loadBalancer,omitempty"` - // dnsRecordsType determines whether records for api, api-int, and ingress - // are provided by the internal DNS service or externally. - // Allowed values are `Internal`, `External`, and omitted. - // When set to `Internal`, records are provided by the internal infrastructure and - // no additional user configuration is required for the cluster to function. - // When set to `External`, records are not provided by the internal infrastructure - // and must be configured by the user on a DNS server outside the cluster. - // Cluster nodes must use this external server for their upstream DNS requests. - // This value may only be set when loadBalancer.type is set to UserManaged. - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default is `Internal`. - DNSRecordsType *configv1.DNSRecordsType `json:"dnsRecordsType,omitempty"` - // machineNetworks are IP networks used to connect all the OpenShift cluster nodes. - MachineNetworks []configv1.CIDR `json:"machineNetworks,omitempty"` -} - -// VSpherePlatformStatusApplyConfiguration constructs a declarative configuration of the VSpherePlatformStatus type for use with -// apply. -func VSpherePlatformStatus() *VSpherePlatformStatusApplyConfiguration { - return &VSpherePlatformStatusApplyConfiguration{} -} - -// WithAPIServerInternalIP sets the APIServerInternalIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIServerInternalIP field is set to the value of the last call. -func (b *VSpherePlatformStatusApplyConfiguration) WithAPIServerInternalIP(value string) *VSpherePlatformStatusApplyConfiguration { - b.APIServerInternalIP = &value - return b -} - -// WithAPIServerInternalIPs adds the given value to the APIServerInternalIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the APIServerInternalIPs field. -func (b *VSpherePlatformStatusApplyConfiguration) WithAPIServerInternalIPs(values ...string) *VSpherePlatformStatusApplyConfiguration { - for i := range values { - b.APIServerInternalIPs = append(b.APIServerInternalIPs, values[i]) - } - return b -} - -// WithIngressIP sets the IngressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IngressIP field is set to the value of the last call. -func (b *VSpherePlatformStatusApplyConfiguration) WithIngressIP(value string) *VSpherePlatformStatusApplyConfiguration { - b.IngressIP = &value - return b -} - -// WithIngressIPs adds the given value to the IngressIPs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IngressIPs field. -func (b *VSpherePlatformStatusApplyConfiguration) WithIngressIPs(values ...string) *VSpherePlatformStatusApplyConfiguration { - for i := range values { - b.IngressIPs = append(b.IngressIPs, values[i]) - } - return b -} - -// WithNodeDNSIP sets the NodeDNSIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDNSIP field is set to the value of the last call. -func (b *VSpherePlatformStatusApplyConfiguration) WithNodeDNSIP(value string) *VSpherePlatformStatusApplyConfiguration { - b.NodeDNSIP = &value - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *VSpherePlatformStatusApplyConfiguration) WithLoadBalancer(value *VSpherePlatformLoadBalancerApplyConfiguration) *VSpherePlatformStatusApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithDNSRecordsType sets the DNSRecordsType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSRecordsType field is set to the value of the last call. -func (b *VSpherePlatformStatusApplyConfiguration) WithDNSRecordsType(value configv1.DNSRecordsType) *VSpherePlatformStatusApplyConfiguration { - b.DNSRecordsType = &value - return b -} - -// WithMachineNetworks adds the given value to the MachineNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineNetworks field. -func (b *VSpherePlatformStatusApplyConfiguration) WithMachineNetworks(values ...configv1.CIDR) *VSpherePlatformStatusApplyConfiguration { - for i := range values { - b.MachineNetworks = append(b.MachineNetworks, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformtopology.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformtopology.go deleted file mode 100644 index 411f55207..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformtopology.go +++ /dev/null @@ -1,116 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSpherePlatformTopologyApplyConfiguration represents a declarative configuration of the VSpherePlatformTopology type for use -// with apply. -// -// VSpherePlatformTopology holds the required and optional vCenter objects - datacenter, -// computeCluster, networks, datastore and resourcePool - to provision virtual machines. -type VSpherePlatformTopologyApplyConfiguration struct { - // datacenter is the name of vCenter datacenter in which virtual machines will be located. - // The maximum length of the datacenter name is 80 characters. - Datacenter *string `json:"datacenter,omitempty"` - // computeCluster the absolute path of the vCenter cluster - // in which virtual machine will be located. - // The absolute path is of the form //host/. - // The maximum length of the path is 2048 characters. - ComputeCluster *string `json:"computeCluster,omitempty"` - // networks is the list of port group network names within this failure domain. - // If feature gate VSphereMultiNetworks is enabled, up to 10 network adapters may be defined. - // 10 is the maximum number of virtual network devices which may be attached to a VM as defined by: - // https://configmax.esp.vmware.com/guest?vmwareproduct=vSphere&release=vSphere%208.0&categories=1-0 - // The available networks (port groups) can be listed using - // `govc ls 'network/*'` - // Networks should be in the form of an absolute path: - // //network/. - Networks []string `json:"networks,omitempty"` - // datastore is the absolute path of the datastore in which the - // virtual machine is located. - // The absolute path is of the form //datastore/ - // The maximum length of the path is 2048 characters. - Datastore *string `json:"datastore,omitempty"` - // resourcePool is the absolute path of the resource pool where virtual machines will be - // created. The absolute path is of the form //host//Resources/. - // The maximum length of the path is 2048 characters. - ResourcePool *string `json:"resourcePool,omitempty"` - // folder is the absolute path of the folder where - // virtual machines are located. The absolute path - // is of the form //vm/. - // The maximum length of the path is 2048 characters. - Folder *string `json:"folder,omitempty"` - // template is the full inventory path of the virtual machine or template - // that will be cloned when creating new machines in this failure domain. - // The maximum length of the path is 2048 characters. - // - // When omitted, the template will be calculated by the control plane - // machineset operator based on the region and zone defined in - // VSpherePlatformFailureDomainSpec. - // For example, for zone=zonea, region=region1, and infrastructure name=test, - // the template path would be calculated as //vm/test-rhcos-region1-zonea. - Template *string `json:"template,omitempty"` -} - -// VSpherePlatformTopologyApplyConfiguration constructs a declarative configuration of the VSpherePlatformTopology type for use with -// apply. -func VSpherePlatformTopology() *VSpherePlatformTopologyApplyConfiguration { - return &VSpherePlatformTopologyApplyConfiguration{} -} - -// WithDatacenter sets the Datacenter field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Datacenter field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithDatacenter(value string) *VSpherePlatformTopologyApplyConfiguration { - b.Datacenter = &value - return b -} - -// WithComputeCluster sets the ComputeCluster field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ComputeCluster field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithComputeCluster(value string) *VSpherePlatformTopologyApplyConfiguration { - b.ComputeCluster = &value - return b -} - -// WithNetworks adds the given value to the Networks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Networks field. -func (b *VSpherePlatformTopologyApplyConfiguration) WithNetworks(values ...string) *VSpherePlatformTopologyApplyConfiguration { - for i := range values { - b.Networks = append(b.Networks, values[i]) - } - return b -} - -// WithDatastore sets the Datastore field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Datastore field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithDatastore(value string) *VSpherePlatformTopologyApplyConfiguration { - b.Datastore = &value - return b -} - -// WithResourcePool sets the ResourcePool field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourcePool field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithResourcePool(value string) *VSpherePlatformTopologyApplyConfiguration { - b.ResourcePool = &value - return b -} - -// WithFolder sets the Folder field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Folder field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithFolder(value string) *VSpherePlatformTopologyApplyConfiguration { - b.Folder = &value - return b -} - -// WithTemplate sets the Template field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Template field is set to the value of the last call. -func (b *VSpherePlatformTopologyApplyConfiguration) WithTemplate(value string) *VSpherePlatformTopologyApplyConfiguration { - b.Template = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformvcenterspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformvcenterspec.go deleted file mode 100644 index 6a05ec6b6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/vsphereplatformvcenterspec.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSpherePlatformVCenterSpecApplyConfiguration represents a declarative configuration of the VSpherePlatformVCenterSpec type for use -// with apply. -// -// VSpherePlatformVCenterSpec stores the vCenter connection fields. -// This is used by the vSphere CCM. -type VSpherePlatformVCenterSpecApplyConfiguration struct { - // server is the fully-qualified domain name or the IP address of the vCenter server. - // --- - Server *string `json:"server,omitempty"` - // port is the TCP port that will be used to communicate to - // the vCenter endpoint. - // When omitted, this means the user has no opinion and - // it is up to the platform to choose a sensible default, - // which is subject to change over time. - Port *int32 `json:"port,omitempty"` - // The vCenter Datacenters in which the RHCOS - // vm guests are located. This field will - // be used by the Cloud Controller Manager. - // Each datacenter listed here should be used within - // a topology. - Datacenters []string `json:"datacenters,omitempty"` -} - -// VSpherePlatformVCenterSpecApplyConfiguration constructs a declarative configuration of the VSpherePlatformVCenterSpec type for use with -// apply. -func VSpherePlatformVCenterSpec() *VSpherePlatformVCenterSpecApplyConfiguration { - return &VSpherePlatformVCenterSpecApplyConfiguration{} -} - -// WithServer sets the Server field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Server field is set to the value of the last call. -func (b *VSpherePlatformVCenterSpecApplyConfiguration) WithServer(value string) *VSpherePlatformVCenterSpecApplyConfiguration { - b.Server = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *VSpherePlatformVCenterSpecApplyConfiguration) WithPort(value int32) *VSpherePlatformVCenterSpecApplyConfiguration { - b.Port = &value - return b -} - -// WithDatacenters adds the given value to the Datacenters field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Datacenters field. -func (b *VSpherePlatformVCenterSpecApplyConfiguration) WithDatacenters(values ...string) *VSpherePlatformVCenterSpecApplyConfiguration { - for i := range values { - b.Datacenters = append(b.Datacenters, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/webhooktokenauthenticator.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/webhooktokenauthenticator.go deleted file mode 100644 index 24caa55d8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1/webhooktokenauthenticator.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// WebhookTokenAuthenticatorApplyConfiguration represents a declarative configuration of the WebhookTokenAuthenticator type for use -// with apply. -// -// webhookTokenAuthenticator holds the necessary configuration options for a remote token authenticator -type WebhookTokenAuthenticatorApplyConfiguration struct { - // kubeConfig references a secret that contains kube config file data which - // describes how to access the remote webhook service. - // The namespace for the referenced secret is openshift-config. - // - // 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. - KubeConfig *SecretNameReferenceApplyConfiguration `json:"kubeConfig,omitempty"` -} - -// WebhookTokenAuthenticatorApplyConfiguration constructs a declarative configuration of the WebhookTokenAuthenticator type for use with -// apply. -func WebhookTokenAuthenticator() *WebhookTokenAuthenticatorApplyConfiguration { - return &WebhookTokenAuthenticatorApplyConfiguration{} -} - -// WithKubeConfig sets the KubeConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeConfig field is set to the value of the last call. -func (b *WebhookTokenAuthenticatorApplyConfiguration) WithKubeConfig(value *SecretNameReferenceApplyConfiguration) *WebhookTokenAuthenticatorApplyConfiguration { - b.KubeConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/additionalalertmanagerconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/additionalalertmanagerconfig.go deleted file mode 100644 index 6a699cd82..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/additionalalertmanagerconfig.go +++ /dev/null @@ -1,119 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// AdditionalAlertmanagerConfigApplyConfiguration represents a declarative configuration of the AdditionalAlertmanagerConfig type for use -// with apply. -// -// AdditionalAlertmanagerConfig represents configuration for additional Alertmanager instances. -// The `AdditionalAlertmanagerConfig` resource defines settings for how a -// component communicates with additional Alertmanager instances. -type AdditionalAlertmanagerConfigApplyConfiguration struct { - // name is a unique identifier for this Alertmanager configuration entry. - // The name must be a valid DNS subdomain (RFC 1123): lowercase alphanumeric characters, - // hyphens, or periods, and must start and end with an alphanumeric character. - // Minimum length is 1 character (empty string is invalid). - // Maximum length is 253 characters. - Name *string `json:"name,omitempty"` - // authorization configures the authentication method for Alertmanager connections. - // Supports bearer token authentication. When omitted, no authentication is used. - Authorization *AuthorizationConfigApplyConfiguration `json:"authorization,omitempty"` - // pathPrefix defines an optional URL path prefix to prepend to the Alertmanager API endpoints. - // For example, if your Alertmanager is behind a reverse proxy at "/alertmanager/", - // set this to "/alertmanager" so requests go to "/alertmanager/api/v1/alerts" instead of "/api/v1/alerts". - // This is commonly needed when Alertmanager is deployed behind ingress controllers or load balancers. - // When no prefix is needed, omit this field; do not set it to "/" as that would produce paths with double slashes (e.g. "//api/v1/alerts"). - // Must start with "/", must not end with "/", and must not be exactly "/". - // Must not contain query strings ("?") or fragments ("#"). - PathPrefix *string `json:"pathPrefix,omitempty"` - // scheme defines the URL scheme to use when communicating with Alertmanager - // instances. - // Possible values are `HTTP` or `HTTPS`. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `HTTP`. - Scheme *configv1alpha1.AlertmanagerScheme `json:"scheme,omitempty"` - // staticConfigs is a list of statically configured Alertmanager endpoints in the form - // of `:`. Each entry must be a valid hostname, IPv4 address, or IPv6 address - // (in brackets) followed by a colon and a valid port number (1-65535). - // Examples: "alertmanager.example.com:9093", "192.168.1.100:9093", "[::1]:9093" - // At least one endpoint must be specified (minimum 1, maximum 10 endpoints). - // Each entry must be unique and non-empty (empty string is invalid). - StaticConfigs []string `json:"staticConfigs,omitempty"` - // timeoutSeconds defines the timeout in seconds for requests to Alertmanager. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Currently the default is 10 seconds. - // Minimum value is 1 second. - // Maximum value is 600 seconds (10 minutes). - TimeoutSeconds *int32 `json:"timeoutSeconds,omitempty"` - // tlsConfig defines the TLS settings to use for Alertmanager connections. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"` -} - -// AdditionalAlertmanagerConfigApplyConfiguration constructs a declarative configuration of the AdditionalAlertmanagerConfig type for use with -// apply. -func AdditionalAlertmanagerConfig() *AdditionalAlertmanagerConfigApplyConfiguration { - return &AdditionalAlertmanagerConfigApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithName(value string) *AdditionalAlertmanagerConfigApplyConfiguration { - b.Name = &value - return b -} - -// WithAuthorization sets the Authorization field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Authorization field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithAuthorization(value *AuthorizationConfigApplyConfiguration) *AdditionalAlertmanagerConfigApplyConfiguration { - b.Authorization = value - return b -} - -// WithPathPrefix sets the PathPrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PathPrefix field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithPathPrefix(value string) *AdditionalAlertmanagerConfigApplyConfiguration { - b.PathPrefix = &value - return b -} - -// WithScheme sets the Scheme field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scheme field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithScheme(value configv1alpha1.AlertmanagerScheme) *AdditionalAlertmanagerConfigApplyConfiguration { - b.Scheme = &value - return b -} - -// WithStaticConfigs adds the given value to the StaticConfigs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StaticConfigs field. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithStaticConfigs(values ...string) *AdditionalAlertmanagerConfigApplyConfiguration { - for i := range values { - b.StaticConfigs = append(b.StaticConfigs, values[i]) - } - return b -} - -// WithTimeoutSeconds sets the TimeoutSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TimeoutSeconds field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithTimeoutSeconds(value int32) *AdditionalAlertmanagerConfigApplyConfiguration { - b.TimeoutSeconds = &value - return b -} - -// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSConfig field is set to the value of the last call. -func (b *AdditionalAlertmanagerConfigApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *AdditionalAlertmanagerConfigApplyConfiguration { - b.TLSConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagerconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagerconfig.go deleted file mode 100644 index 6ba6270f3..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagerconfig.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// AlertmanagerConfigApplyConfiguration represents a declarative configuration of the AlertmanagerConfig type for use -// with apply. -// -// alertmanagerConfig provides configuration options for the default Alertmanager instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// whether the default Alertmanager is deployed, how it logs, and how its pods are scheduled. -type AlertmanagerConfigApplyConfiguration struct { - // deploymentMode determines whether the default Alertmanager instance should be deployed - // as part of the monitoring stack. - // Allowed values are Disabled, DefaultConfig, and CustomConfig. - // When set to Disabled, the Alertmanager instance will not be deployed. - // When set to DefaultConfig, the platform will deploy Alertmanager with default settings. - // When set to CustomConfig, the Alertmanager will be deployed with custom configuration. - DeploymentMode *configv1alpha1.AlertManagerDeployMode `json:"deploymentMode,omitempty"` - // customConfig must be set when deploymentMode is CustomConfig, and must be unset otherwise. - // When set to CustomConfig, the Alertmanager will be deployed with custom configuration. - CustomConfig *AlertmanagerCustomConfigApplyConfiguration `json:"customConfig,omitempty"` -} - -// AlertmanagerConfigApplyConfiguration constructs a declarative configuration of the AlertmanagerConfig type for use with -// apply. -func AlertmanagerConfig() *AlertmanagerConfigApplyConfiguration { - return &AlertmanagerConfigApplyConfiguration{} -} - -// WithDeploymentMode sets the DeploymentMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeploymentMode field is set to the value of the last call. -func (b *AlertmanagerConfigApplyConfiguration) WithDeploymentMode(value configv1alpha1.AlertManagerDeployMode) *AlertmanagerConfigApplyConfiguration { - b.DeploymentMode = &value - return b -} - -// WithCustomConfig sets the CustomConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomConfig field is set to the value of the last call. -func (b *AlertmanagerConfigApplyConfiguration) WithCustomConfig(value *AlertmanagerCustomConfigApplyConfiguration) *AlertmanagerConfigApplyConfiguration { - b.CustomConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagercustomconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagercustomconfig.go deleted file mode 100644 index 37c93f7e1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/alertmanagercustomconfig.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// AlertmanagerCustomConfigApplyConfiguration represents a declarative configuration of the AlertmanagerCustomConfig type for use -// with apply. -// -// AlertmanagerCustomConfig represents the configuration for a custom Alertmanager deployment. -// alertmanagerCustomConfig provides configuration options for the default Alertmanager instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// whether user-defined namespaces are selected for AlertmanagerConfig lookups, how it logs, -// and how its pods are scheduled. -type AlertmanagerCustomConfigApplyConfiguration struct { - // userAlertmanagerConfigSelection is an optional field that controls whether user-defined - // namespaces can be selected for AlertmanagerConfig lookups on the platform Alertmanager - // instance in the `openshift-monitoring` namespace. - // Valid values are Selectable and None. - // When set to Selectable, the platform Alertmanager discovers AlertmanagerConfig resources - // in user-defined namespaces. This is equivalent to `enableUserAlertmanagerConfig: true` in - // the cluster-monitoring-config ConfigMap. - // When set to None, user-defined namespaces are not selected for AlertmanagerConfig lookups - // on the platform Alertmanager. This is equivalent to `enableUserAlertmanagerConfig: false` - // in the cluster-monitoring-config ConfigMap. - // This setting only applies when the user-workload monitoring Alertmanager is not enabled. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `None`. - UserAlertmanagerConfigSelection *configv1alpha1.UserAlertmanagerConfigSelection `json:"userAlertmanagerConfigSelection,omitempty"` - // logLevel defines the verbosity of logs emitted by Alertmanager. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - LogLevel *configv1alpha1.LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Alertmanager container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // secrets defines a list of secrets that need to be mounted into the Alertmanager. - // The secrets must reside within the same namespace as the Alertmanager object. - // They will be added as volumes named secret- and mounted at - // /etc/alertmanager/secrets/ within the 'alertmanager' container of - // the Alertmanager Pods. - // - // These secrets can be used to authenticate Alertmanager with endpoint receivers. - // For example, you can use secrets to: - // - Provide certificates for TLS authentication with receivers that require private CA certificates - // - Store credentials for Basic HTTP authentication with receivers that require password-based auth - // - Store any other authentication credentials needed by your alert receivers - // - // This field is optional. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries in this list must be unique. - Secrets []configv1alpha1.SecretName `json:"secrets,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Alertmanager Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // volumeClaimTemplate defines persistent storage for Alertmanager. Use this setting to - // configure the persistent volume claim, including storage class and volume size. - // If omitted, the Pod uses ephemeral storage and alert data will not persist - // across restarts. - VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` -} - -// AlertmanagerCustomConfigApplyConfiguration constructs a declarative configuration of the AlertmanagerCustomConfig type for use with -// apply. -func AlertmanagerCustomConfig() *AlertmanagerCustomConfigApplyConfiguration { - return &AlertmanagerCustomConfigApplyConfiguration{} -} - -// WithUserAlertmanagerConfigSelection sets the UserAlertmanagerConfigSelection field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UserAlertmanagerConfigSelection field is set to the value of the last call. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithUserAlertmanagerConfigSelection(value configv1alpha1.UserAlertmanagerConfigSelection) *AlertmanagerCustomConfigApplyConfiguration { - b.UserAlertmanagerConfigSelection = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithLogLevel(value configv1alpha1.LogLevel) *AlertmanagerCustomConfigApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *AlertmanagerCustomConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *AlertmanagerCustomConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithSecrets adds the given value to the Secrets field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Secrets field. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithSecrets(values ...configv1alpha1.SecretName) *AlertmanagerCustomConfigApplyConfiguration { - for i := range values { - b.Secrets = append(b.Secrets, values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *AlertmanagerCustomConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *AlertmanagerCustomConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} - -// WithVolumeClaimTemplate sets the VolumeClaimTemplate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VolumeClaimTemplate field is set to the value of the last call. -func (b *AlertmanagerCustomConfigApplyConfiguration) WithVolumeClaimTemplate(value v1.PersistentVolumeClaim) *AlertmanagerCustomConfigApplyConfiguration { - b.VolumeClaimTemplate = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/audit.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/audit.go deleted file mode 100644 index f58feeb54..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/audit.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// AuditApplyConfiguration represents a declarative configuration of the Audit type for use -// with apply. -// -// Audit profile configurations -type AuditApplyConfiguration struct { - // profile is a required field for configuring the audit log level of the Kubernetes Metrics Server. - // Allowed values are None, Metadata, Request, or RequestResponse. - // When set to None, audit logging is disabled and no audit events are recorded. - // When set to Metadata, only request metadata (such as requesting user, timestamp, resource, verb, etc.) is logged, but not the request or response body. - // When set to Request, event metadata and the request body are logged, but not the response body. - // When set to RequestResponse, event metadata, request body, and response body are all logged, providing the most detailed audit information. - // - // See: https://kubernetes.io/docs/tasks/debug-application-cluster/audit/#audit-policy - // for more information about auditing and log levels. - Profile *configv1alpha1.AuditProfile `json:"profile,omitempty"` -} - -// AuditApplyConfiguration constructs a declarative configuration of the Audit type for use with -// apply. -func Audit() *AuditApplyConfiguration { - return &AuditApplyConfiguration{} -} - -// WithProfile sets the Profile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Profile field is set to the value of the last call. -func (b *AuditApplyConfiguration) WithProfile(value configv1alpha1.AuditProfile) *AuditApplyConfiguration { - b.Profile = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/authorizationconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/authorizationconfig.go deleted file mode 100644 index 87d7c7eef..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/authorizationconfig.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// AuthorizationConfigApplyConfiguration represents a declarative configuration of the AuthorizationConfig type for use -// with apply. -// -// AuthorizationConfig defines the authentication method for Alertmanager connections. -type AuthorizationConfigApplyConfiguration struct { - // type specifies the authentication type to use. - // Valid value is "BearerToken" (bearer token authentication). - // When set to BearerToken, the bearerToken field must be specified. - Type *configv1alpha1.AuthorizationType `json:"type,omitempty"` - // bearerToken defines the secret reference containing the bearer token. - // Required when type is "BearerToken", and forbidden otherwise. - // The secret must exist in the openshift-monitoring namespace. - BearerToken *SecretKeySelectorApplyConfiguration `json:"bearerToken,omitempty"` -} - -// AuthorizationConfigApplyConfiguration constructs a declarative configuration of the AuthorizationConfig type for use with -// apply. -func AuthorizationConfig() *AuthorizationConfigApplyConfiguration { - return &AuthorizationConfigApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *AuthorizationConfigApplyConfiguration) WithType(value configv1alpha1.AuthorizationType) *AuthorizationConfigApplyConfiguration { - b.Type = &value - return b -} - -// WithBearerToken sets the BearerToken field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BearerToken field is set to the value of the last call. -func (b *AuthorizationConfigApplyConfiguration) WithBearerToken(value *SecretKeySelectorApplyConfiguration) *AuthorizationConfigApplyConfiguration { - b.BearerToken = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backup.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backup.go deleted file mode 100644 index f1abc8ab7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backup.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// BackupApplyConfiguration represents a declarative configuration of the Backup type for use -// with apply. -// -// Backup provides configuration for performing backups of the openshift cluster. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type BackupApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *BackupSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1alpha1.BackupStatus `json:"status,omitempty"` -} - -// Backup constructs a declarative configuration of the Backup type for use with -// apply. -func Backup(name string) *BackupApplyConfiguration { - b := &BackupApplyConfiguration{} - b.WithName(name) - b.WithKind("Backup") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b -} - -// ExtractBackupFrom extracts the applied configuration owned by fieldManager from -// backup for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// backup must be a unmodified Backup API object that was retrieved from the Kubernetes API. -// ExtractBackupFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractBackupFrom(backup *configv1alpha1.Backup, fieldManager string, subresource string) (*BackupApplyConfiguration, error) { - b := &BackupApplyConfiguration{} - err := managedfields.ExtractInto(backup, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.Backup"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(backup.Name) - - b.WithKind("Backup") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b, nil -} - -// ExtractBackup extracts the applied configuration owned by fieldManager from -// backup. If no managedFields are found in backup for fieldManager, a -// BackupApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// backup must be a unmodified Backup API object that was retrieved from the Kubernetes API. -// ExtractBackup provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractBackup(backup *configv1alpha1.Backup, fieldManager string) (*BackupApplyConfiguration, error) { - return ExtractBackupFrom(backup, fieldManager, "") -} - -// ExtractBackupStatus extracts the applied configuration owned by fieldManager from -// backup for the status subresource. -func ExtractBackupStatus(backup *configv1alpha1.Backup, fieldManager string) (*BackupApplyConfiguration, error) { - return ExtractBackupFrom(backup, fieldManager, "status") -} - -func (b BackupApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithKind(value string) *BackupApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithAPIVersion(value string) *BackupApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithName(value string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithGenerateName(value string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithNamespace(value string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithUID(value types.UID) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithResourceVersion(value string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithGeneration(value int64) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithCreationTimestamp(value metav1.Time) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *BackupApplyConfiguration) WithLabels(entries map[string]string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *BackupApplyConfiguration) WithAnnotations(entries map[string]string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *BackupApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *BackupApplyConfiguration) WithFinalizers(values ...string) *BackupApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *BackupApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithSpec(value *BackupSpecApplyConfiguration) *BackupApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *BackupApplyConfiguration) WithStatus(value configv1alpha1.BackupStatus) *BackupApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *BackupApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *BackupApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *BackupApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *BackupApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backupspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backupspec.go deleted file mode 100644 index 01ff3f7dc..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/backupspec.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// BackupSpecApplyConfiguration represents a declarative configuration of the BackupSpec type for use -// with apply. -type BackupSpecApplyConfiguration struct { - // etcd specifies the configuration for periodic backups of the etcd cluster - EtcdBackupSpec *EtcdBackupSpecApplyConfiguration `json:"etcd,omitempty"` -} - -// BackupSpecApplyConfiguration constructs a declarative configuration of the BackupSpec type for use with -// apply. -func BackupSpec() *BackupSpecApplyConfiguration { - return &BackupSpecApplyConfiguration{} -} - -// WithEtcdBackupSpec sets the EtcdBackupSpec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EtcdBackupSpec field is set to the value of the last call. -func (b *BackupSpecApplyConfiguration) WithEtcdBackupSpec(value *EtcdBackupSpecApplyConfiguration) *BackupSpecApplyConfiguration { - b.EtcdBackupSpec = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/basicauth.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/basicauth.go deleted file mode 100644 index efad66668..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/basicauth.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// BasicAuthApplyConfiguration represents a declarative configuration of the BasicAuth type for use -// with apply. -// -// BasicAuth defines basic authentication settings for the remote write endpoint URL. -type BasicAuthApplyConfiguration struct { - // username defines the secret reference containing the username for basic authentication. - // The secret must exist in the openshift-monitoring namespace. - Username *SecretKeySelectorApplyConfiguration `json:"username,omitempty"` - // password defines the secret reference containing the password for basic authentication. - // The secret must exist in the openshift-monitoring namespace. - Password *SecretKeySelectorApplyConfiguration `json:"password,omitempty"` -} - -// BasicAuthApplyConfiguration constructs a declarative configuration of the BasicAuth type for use with -// apply. -func BasicAuth() *BasicAuthApplyConfiguration { - return &BasicAuthApplyConfiguration{} -} - -// WithUsername sets the Username field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Username field is set to the value of the last call. -func (b *BasicAuthApplyConfiguration) WithUsername(value *SecretKeySelectorApplyConfiguration) *BasicAuthApplyConfiguration { - b.Username = value - return b -} - -// WithPassword sets the Password field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Password field is set to the value of the last call. -func (b *BasicAuthApplyConfiguration) WithPassword(value *SecretKeySelectorApplyConfiguration) *BasicAuthApplyConfiguration { - b.Password = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/certificateconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/certificateconfig.go deleted file mode 100644 index a4191ccb2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/certificateconfig.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// CertificateConfigApplyConfiguration represents a declarative configuration of the CertificateConfig type for use -// with apply. -// -// CertificateConfig specifies configuration parameters for certificates. -// At least one property must be specified. -type CertificateConfigApplyConfiguration struct { - // key specifies the cryptographic parameters for the certificate's key pair. - // Currently this is the only configurable parameter. When omitted in an - // overrides entry, the key configuration from defaults is used. - Key *KeyConfigApplyConfiguration `json:"key,omitempty"` -} - -// CertificateConfigApplyConfiguration constructs a declarative configuration of the CertificateConfig type for use with -// apply. -func CertificateConfig() *CertificateConfigApplyConfiguration { - return &CertificateConfigApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *CertificateConfigApplyConfiguration) WithKey(value *KeyConfigApplyConfiguration) *CertificateConfigApplyConfiguration { - b.Key = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoring.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoring.go deleted file mode 100644 index 155e5328b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoring.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterMonitoringApplyConfiguration represents a declarative configuration of the ClusterMonitoring type for use -// with apply. -// -// ClusterMonitoring is the Custom Resource object which holds the current status of Cluster Monitoring Operator. CMO is a central component of the monitoring stack. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -// ClusterMonitoring is the Schema for the Cluster Monitoring Operators API -type ClusterMonitoringApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object metadata. - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user configuration for the Cluster Monitoring Operator - Spec *ClusterMonitoringSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1alpha1.ClusterMonitoringStatus `json:"status,omitempty"` -} - -// ClusterMonitoring constructs a declarative configuration of the ClusterMonitoring type for use with -// apply. -func ClusterMonitoring(name string) *ClusterMonitoringApplyConfiguration { - b := &ClusterMonitoringApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterMonitoring") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b -} - -// ExtractClusterMonitoringFrom extracts the applied configuration owned by fieldManager from -// clusterMonitoring for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// clusterMonitoring must be a unmodified ClusterMonitoring API object that was retrieved from the Kubernetes API. -// ExtractClusterMonitoringFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterMonitoringFrom(clusterMonitoring *configv1alpha1.ClusterMonitoring, fieldManager string, subresource string) (*ClusterMonitoringApplyConfiguration, error) { - b := &ClusterMonitoringApplyConfiguration{} - err := managedfields.ExtractInto(clusterMonitoring, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.ClusterMonitoring"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterMonitoring.Name) - - b.WithKind("ClusterMonitoring") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b, nil -} - -// ExtractClusterMonitoring extracts the applied configuration owned by fieldManager from -// clusterMonitoring. If no managedFields are found in clusterMonitoring for fieldManager, a -// ClusterMonitoringApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterMonitoring must be a unmodified ClusterMonitoring API object that was retrieved from the Kubernetes API. -// ExtractClusterMonitoring provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterMonitoring(clusterMonitoring *configv1alpha1.ClusterMonitoring, fieldManager string) (*ClusterMonitoringApplyConfiguration, error) { - return ExtractClusterMonitoringFrom(clusterMonitoring, fieldManager, "") -} - -// ExtractClusterMonitoringStatus extracts the applied configuration owned by fieldManager from -// clusterMonitoring for the status subresource. -func ExtractClusterMonitoringStatus(clusterMonitoring *configv1alpha1.ClusterMonitoring, fieldManager string) (*ClusterMonitoringApplyConfiguration, error) { - return ExtractClusterMonitoringFrom(clusterMonitoring, fieldManager, "status") -} - -func (b ClusterMonitoringApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithKind(value string) *ClusterMonitoringApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithAPIVersion(value string) *ClusterMonitoringApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithName(value string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithGenerateName(value string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithNamespace(value string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithUID(value types.UID) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithResourceVersion(value string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithGeneration(value int64) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithCreationTimestamp(value metav1.Time) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterMonitoringApplyConfiguration) WithLabels(entries map[string]string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterMonitoringApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterMonitoringApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterMonitoringApplyConfiguration) WithFinalizers(values ...string) *ClusterMonitoringApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterMonitoringApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithSpec(value *ClusterMonitoringSpecApplyConfiguration) *ClusterMonitoringApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterMonitoringApplyConfiguration) WithStatus(value configv1alpha1.ClusterMonitoringStatus) *ClusterMonitoringApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ClusterMonitoringApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ClusterMonitoringApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterMonitoringApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ClusterMonitoringApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoringspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoringspec.go deleted file mode 100644 index 288edad61..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/clustermonitoringspec.go +++ /dev/null @@ -1,188 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// ClusterMonitoringSpecApplyConfiguration represents a declarative configuration of the ClusterMonitoringSpec type for use -// with apply. -// -// ClusterMonitoringSpec defines the desired state of Cluster Monitoring Operator -type ClusterMonitoringSpecApplyConfiguration struct { - // userDefined set the deployment mode for user-defined monitoring in addition to the default platform monitoring. - // userDefined is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `Disabled`. - UserDefined *UserDefinedMonitoringApplyConfiguration `json:"userDefined,omitempty"` - // alertmanagerConfig allows users to configure how the default Alertmanager instance - // should be deployed in the `openshift-monitoring` namespace. - // alertmanagerConfig is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `DefaultConfig`. - AlertmanagerConfig *AlertmanagerConfigApplyConfiguration `json:"alertmanagerConfig,omitempty"` - // prometheusConfig provides configuration options for the default platform Prometheus instance - // that runs in the `openshift-monitoring` namespace. This configuration applies only to the - // platform Prometheus instance; user-workload Prometheus instances are configured separately. - // - // This field allows you to customize how the platform Prometheus is deployed and operated, including: - // - Pod scheduling (node selectors, tolerations, topology spread constraints) - // - Resource allocation (CPU, memory requests/limits) - // - Retention policies (how long metrics are stored) - // - External integrations (remote write, additional alertmanagers) - // - // This field is optional. When omitted, the platform chooses reasonable defaults, which may change over time. - PrometheusConfig *PrometheusConfigApplyConfiguration `json:"prometheusConfig,omitempty"` - // metricsServerConfig is an optional field that can be used to configure the Kubernetes Metrics Server that runs in the openshift-monitoring namespace. - // Specifically, it can configure how the Metrics Server instance is deployed, pod scheduling, its audit policy and log verbosity. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - MetricsServerConfig *MetricsServerConfigApplyConfiguration `json:"metricsServerConfig,omitempty"` - // prometheusOperatorConfig is an optional field that can be used to configure the Prometheus Operator component. - // Specifically, it can configure how the Prometheus Operator instance is deployed, pod scheduling, and resource allocation. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - PrometheusOperatorConfig *PrometheusOperatorConfigApplyConfiguration `json:"prometheusOperatorConfig,omitempty"` - // prometheusOperatorAdmissionWebhookConfig is an optional field that can be used to configure the - // admission webhook component of Prometheus Operator that runs in the openshift-monitoring namespace. - // The admission webhook validates PrometheusRule and AlertmanagerConfig objects to ensure they are - // semantically valid, mutates PrometheusRule annotations, and converts AlertmanagerConfig objects - // between API versions. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - PrometheusOperatorAdmissionWebhookConfig *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration `json:"prometheusOperatorAdmissionWebhookConfig,omitempty"` - // openShiftStateMetricsConfig is an optional field that can be used to configure the openshift-state-metrics - // agent that runs in the openshift-monitoring namespace. The openshift-state-metrics agent generates metrics - // about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - OpenShiftStateMetricsConfig *OpenShiftStateMetricsConfigApplyConfiguration `json:"openShiftStateMetricsConfig,omitempty"` - // telemeterClientConfig is an optional field that can be used to configure the Telemeter Client - // component that runs in the openshift-monitoring namespace. The Telemeter Client collects - // selected monitoring metrics and forwards them to Red Hat for telemetry purposes. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // When set, at least one field must be specified within telemeterClientConfig. - TelemeterClientConfig *TelemeterClientConfigApplyConfiguration `json:"telemeterClientConfig,omitempty"` - // thanosQuerierConfig is an optional field that can be used to configure the Thanos Querier - // component that runs in the openshift-monitoring namespace. The Thanos Querier provides - // a global query view by aggregating and deduplicating metrics from multiple Prometheus instances. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default deploys the Thanos Querier on linux nodes with 5m CPU and 12Mi memory - // requests, and no custom tolerations or topology spread constraints. - // When set, at least one field must be specified within thanosQuerierConfig. - ThanosQuerierConfig *ThanosQuerierConfigApplyConfiguration `json:"thanosQuerierConfig,omitempty"` - // nodeExporterConfig is an optional field that can be used to configure the node-exporter agent - // that runs as a DaemonSet in the openshift-monitoring namespace. The node-exporter agent collects - // hardware and OS-level metrics from every node in the cluster. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - NodeExporterConfig *NodeExporterConfigApplyConfiguration `json:"nodeExporterConfig,omitempty"` - // monitoringPluginConfig is an optional field that can be used to configure the monitoring plugin - // that runs as a dynamic plugin of the OpenShift web console. The monitoring plugin provides - // the monitoring UI in the OpenShift web console for visualizing metrics, alerts, and dashboards. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default deploys the monitoring-plugin as a single-replica Deployment - // on linux nodes with 10m CPU and 50Mi memory requests, and no custom tolerations - // or topology spread constraints. - // When set, at least one field must be specified within monitoringPluginConfig. - MonitoringPluginConfig *MonitoringPluginConfigApplyConfiguration `json:"monitoringPluginConfig,omitempty"` - // kubeStateMetricsConfig is an optional field that can be used to configure the kube-state-metrics - // agent that runs in the openshift-monitoring namespace. kube-state-metrics generates metrics about - // the state of Kubernetes objects such as Deployments, Nodes, and Pods. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - KubeStateMetricsConfig *KubeStateMetricsConfigApplyConfiguration `json:"kubeStateMetricsConfig,omitempty"` -} - -// ClusterMonitoringSpecApplyConfiguration constructs a declarative configuration of the ClusterMonitoringSpec type for use with -// apply. -func ClusterMonitoringSpec() *ClusterMonitoringSpecApplyConfiguration { - return &ClusterMonitoringSpecApplyConfiguration{} -} - -// WithUserDefined sets the UserDefined field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UserDefined field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithUserDefined(value *UserDefinedMonitoringApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.UserDefined = value - return b -} - -// WithAlertmanagerConfig sets the AlertmanagerConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AlertmanagerConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithAlertmanagerConfig(value *AlertmanagerConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.AlertmanagerConfig = value - return b -} - -// WithPrometheusConfig sets the PrometheusConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrometheusConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithPrometheusConfig(value *PrometheusConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.PrometheusConfig = value - return b -} - -// WithMetricsServerConfig sets the MetricsServerConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MetricsServerConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithMetricsServerConfig(value *MetricsServerConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.MetricsServerConfig = value - return b -} - -// WithPrometheusOperatorConfig sets the PrometheusOperatorConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrometheusOperatorConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithPrometheusOperatorConfig(value *PrometheusOperatorConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.PrometheusOperatorConfig = value - return b -} - -// WithPrometheusOperatorAdmissionWebhookConfig sets the PrometheusOperatorAdmissionWebhookConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PrometheusOperatorAdmissionWebhookConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithPrometheusOperatorAdmissionWebhookConfig(value *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.PrometheusOperatorAdmissionWebhookConfig = value - return b -} - -// WithOpenShiftStateMetricsConfig sets the OpenShiftStateMetricsConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenShiftStateMetricsConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithOpenShiftStateMetricsConfig(value *OpenShiftStateMetricsConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.OpenShiftStateMetricsConfig = value - return b -} - -// WithTelemeterClientConfig sets the TelemeterClientConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TelemeterClientConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithTelemeterClientConfig(value *TelemeterClientConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.TelemeterClientConfig = value - return b -} - -// WithThanosQuerierConfig sets the ThanosQuerierConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ThanosQuerierConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithThanosQuerierConfig(value *ThanosQuerierConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.ThanosQuerierConfig = value - return b -} - -// WithNodeExporterConfig sets the NodeExporterConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeExporterConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithNodeExporterConfig(value *NodeExporterConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.NodeExporterConfig = value - return b -} - -// WithMonitoringPluginConfig sets the MonitoringPluginConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MonitoringPluginConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithMonitoringPluginConfig(value *MonitoringPluginConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.MonitoringPluginConfig = value - return b -} - -// WithKubeStateMetricsConfig sets the KubeStateMetricsConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeStateMetricsConfig field is set to the value of the last call. -func (b *ClusterMonitoringSpecApplyConfiguration) WithKubeStateMetricsConfig(value *KubeStateMetricsConfigApplyConfiguration) *ClusterMonitoringSpecApplyConfiguration { - b.KubeStateMetricsConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/containerresource.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/containerresource.go deleted file mode 100644 index 2240e1b15..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/containerresource.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - resource "k8s.io/apimachinery/pkg/api/resource" -) - -// ContainerResourceApplyConfiguration represents a declarative configuration of the ContainerResource type for use -// with apply. -// -// MaxItems on []ContainerResource fields is kept at 5 to stay within the -// Kubernetes CRD CEL validation cost budget (StaticEstimatedCRDCostLimit). -// The quantity() CEL function has a high fixed estimated cost per invocation, -// and the limit-vs-request comparison rule is costed per maxItems per location. -// With multiple structs in ClusterMonitoringSpec embedding []ContainerResource, -// maxItems > 5 causes the total estimated rule cost to exceed the budget. -// ContainerResource defines a single resource requirement for a container. -type ContainerResourceApplyConfiguration struct { - // name of the resource (e.g. "cpu", "memory", "hugepages-2Mi"). - // This field is required. - // name must consist only of alphanumeric characters, `-`, `_` and `.` and must start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` - // request is the minimum amount of the resource required (e.g. "2Mi", "1Gi"). - // This field is optional. - // When limit is specified, request cannot be greater than limit. - // The value must be greater than 0 when specified. - Request *resource.Quantity `json:"request,omitempty"` - // limit is the maximum amount of the resource allowed (e.g. "2Mi", "1Gi"). - // This field is optional. - // When request is specified, limit cannot be less than request. - // The value must be greater than 0 when specified. - Limit *resource.Quantity `json:"limit,omitempty"` -} - -// ContainerResourceApplyConfiguration constructs a declarative configuration of the ContainerResource type for use with -// apply. -func ContainerResource() *ContainerResourceApplyConfiguration { - return &ContainerResourceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ContainerResourceApplyConfiguration) WithName(value string) *ContainerResourceApplyConfiguration { - b.Name = &value - return b -} - -// WithRequest sets the Request field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Request field is set to the value of the last call. -func (b *ContainerResourceApplyConfiguration) WithRequest(value resource.Quantity) *ContainerResourceApplyConfiguration { - b.Request = &value - return b -} - -// WithLimit sets the Limit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Limit field is set to the value of the last call. -func (b *ContainerResourceApplyConfiguration) WithLimit(value resource.Quantity) *ContainerResourceApplyConfiguration { - b.Limit = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfig.go deleted file mode 100644 index 61ef90155..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfig.go +++ /dev/null @@ -1,285 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CRIOCredentialProviderConfigApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfig type for use -// with apply. -// -// CRIOCredentialProviderConfig holds cluster-wide singleton resource configurations for CRI-O credential provider, the name of this instance is "cluster". CRI-O credential provider is a binary shipped with CRI-O that provides a way to obtain container image pull credentials from external sources. -// For example, it can be used to fetch mirror registry credentials from secrets resources in the cluster within the same namespace the pod will be running in. -// CRIOCredentialProviderConfig configuration specifies the pod image sources registries that should trigger the CRI-O credential provider execution, which will resolve the CRI-O mirror configurations and obtain the necessary credentials for pod creation. -// Note: Configuration changes will only take effect after the kubelet restarts, which is automatically managed by the cluster during rollout. -// -// The resource is a singleton named "cluster". -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type CRIOCredentialProviderConfigApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec defines the desired configuration of the CRI-O Credential Provider. - // This field is required and must be provided when creating the resource. - Spec *CRIOCredentialProviderConfigSpecApplyConfiguration `json:"spec,omitempty"` - // status represents the current state of the CRIOCredentialProviderConfig. - // When omitted or nil, it indicates that the status has not yet been set by the controller. - // The controller will populate this field with validation conditions and operational state. - Status *CRIOCredentialProviderConfigStatusApplyConfiguration `json:"status,omitempty"` -} - -// CRIOCredentialProviderConfig constructs a declarative configuration of the CRIOCredentialProviderConfig type for use with -// apply. -func CRIOCredentialProviderConfig(name string) *CRIOCredentialProviderConfigApplyConfiguration { - b := &CRIOCredentialProviderConfigApplyConfiguration{} - b.WithName(name) - b.WithKind("CRIOCredentialProviderConfig") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b -} - -// ExtractCRIOCredentialProviderConfigFrom extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// cRIOCredentialProviderConfig must be a unmodified CRIOCredentialProviderConfig API object that was retrieved from the Kubernetes API. -// ExtractCRIOCredentialProviderConfigFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, fieldManager string, subresource string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - b := &CRIOCredentialProviderConfigApplyConfiguration{} - err := managedfields.ExtractInto(cRIOCredentialProviderConfig, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfig"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cRIOCredentialProviderConfig.Name) - - b.WithKind("CRIOCredentialProviderConfig") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b, nil -} - -// ExtractCRIOCredentialProviderConfig extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig. If no managedFields are found in cRIOCredentialProviderConfig for fieldManager, a -// CRIOCredentialProviderConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// cRIOCredentialProviderConfig must be a unmodified CRIOCredentialProviderConfig API object that was retrieved from the Kubernetes API. -// ExtractCRIOCredentialProviderConfig provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCRIOCredentialProviderConfig(cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, fieldManager string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - return ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig, fieldManager, "") -} - -// ExtractCRIOCredentialProviderConfigStatus extracts the applied configuration owned by fieldManager from -// cRIOCredentialProviderConfig for the status subresource. -func ExtractCRIOCredentialProviderConfigStatus(cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, fieldManager string) (*CRIOCredentialProviderConfigApplyConfiguration, error) { - return ExtractCRIOCredentialProviderConfigFrom(cRIOCredentialProviderConfig, fieldManager, "status") -} - -func (b CRIOCredentialProviderConfigApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithKind(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithAPIVersion(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithName(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithGenerateName(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithNamespace(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithUID(value types.UID) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithResourceVersion(value string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithGeneration(value int64) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithLabels(entries map[string]string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithAnnotations(entries map[string]string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithFinalizers(values ...string) *CRIOCredentialProviderConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CRIOCredentialProviderConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithSpec(value *CRIOCredentialProviderConfigSpecApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CRIOCredentialProviderConfigApplyConfiguration) WithStatus(value *CRIOCredentialProviderConfigStatusApplyConfiguration) *CRIOCredentialProviderConfigApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CRIOCredentialProviderConfigApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigspec.go deleted file mode 100644 index 6f37cef51..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigspec.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// CRIOCredentialProviderConfigSpecApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfigSpec type for use -// with apply. -// -// CRIOCredentialProviderConfigSpec defines the desired configuration of the CRI-O Credential Provider. -type CRIOCredentialProviderConfigSpecApplyConfiguration struct { - // matchImages is a list of string patterns used to determine whether - // the CRI-O credential provider should be invoked for a given image. This list is - // passed to the kubelet CredentialProviderConfig, and if any pattern matches - // the requested image, CRI-O credential provider will be invoked to obtain credentials for pulling - // that image or its mirrors. - // Depending on the platform, the CRI-O credential provider may be installed alongside an existing platform specific provider. - // Conflicts between the existing platform specific provider image match configuration and this list will be handled by - // the following precedence rule: credentials from built-in kubelet providers (e.g., ECR, GCR, ACR) take precedence over those - // from the CRIOCredentialProviderConfig when both match the same image. - // To avoid uncertainty, it is recommended to avoid configuring your private image patterns to overlap with - // existing platform specific provider config(e.g., the entries from https://github.com/openshift/machine-config-operator/blob/main/templates/common/aws/files/etc-kubernetes-credential-providers-ecr-credential-provider.yaml). - // You can check the resource's Status conditions - // to see if any entries were ignored due to exact matches with known built-in provider patterns. - // - // This field is optional, the items of the list must contain between 1 and 50 entries. - // The list is treated as a set, so duplicate entries are not allowed. - // - // For more details, see: - // https://kubernetes.io/docs/tasks/administer-cluster/kubelet-credential-provider/ - // https://github.com/cri-o/crio-credential-provider#architecture - // - // Each entry in matchImages is a pattern which can optionally contain a port and a path. Each entry must be no longer than 512 characters. - // Wildcards ('*') are supported for full subdomain labels, such as '*.k8s.io' or 'k8s.*.io', - // and for top-level domains, such as 'k8s.*' (which matches 'k8s.io' or 'k8s.net'). - // A global wildcard '*' (matching any domain) is not allowed. - // Wildcards may replace an entire hostname label (e.g., *.example.com), but they cannot appear within a label (e.g., f*oo.example.com) and are not allowed in the port or path. - // For example, 'example.*.com' is valid, but 'exa*mple.*.com' is not. - // Each wildcard matches only a single domain label, - // so '*.io' does **not** match '*.k8s.io'. - // - // A match exists between an image and a matchImage when all of the below are true: - // Both contain the same number of domain parts and each part matches. - // The URL path of an matchImages must be a prefix of the target image URL path. - // If the matchImages contains a port, then the port must match in the image as well. - // - // Example values of matchImages: - // - 123456789.dkr.ecr.us-east-1.amazonaws.com - // - *.azurecr.io - // - gcr.io - // - *.*.registry.io - // - registry.io:8080/path - MatchImages []configv1alpha1.MatchImage `json:"matchImages,omitempty"` -} - -// CRIOCredentialProviderConfigSpecApplyConfiguration constructs a declarative configuration of the CRIOCredentialProviderConfigSpec type for use with -// apply. -func CRIOCredentialProviderConfigSpec() *CRIOCredentialProviderConfigSpecApplyConfiguration { - return &CRIOCredentialProviderConfigSpecApplyConfiguration{} -} - -// WithMatchImages adds the given value to the MatchImages field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MatchImages field. -func (b *CRIOCredentialProviderConfigSpecApplyConfiguration) WithMatchImages(values ...configv1alpha1.MatchImage) *CRIOCredentialProviderConfigSpecApplyConfiguration { - for i := range values { - b.MatchImages = append(b.MatchImages, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigstatus.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigstatus.go deleted file mode 100644 index 090b044a5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/criocredentialproviderconfigstatus.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CRIOCredentialProviderConfigStatusApplyConfiguration represents a declarative configuration of the CRIOCredentialProviderConfigStatus type for use -// with apply. -// -// CRIOCredentialProviderConfigStatus defines the observed state of CRIOCredentialProviderConfig -type CRIOCredentialProviderConfigStatusApplyConfiguration struct { - // conditions represent the latest available observations of the configuration state. - // When omitted, it indicates that no conditions have been reported yet. - // The maximum number of conditions is 16. - // Conditions are stored as a map keyed by condition type, ensuring uniqueness. - // - // Expected condition types include: - // "Validated": indicates whether the matchImages configuration is valid - Conditions []v1.ConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// CRIOCredentialProviderConfigStatusApplyConfiguration constructs a declarative configuration of the CRIOCredentialProviderConfigStatus type for use with -// apply. -func CRIOCredentialProviderConfigStatus() *CRIOCredentialProviderConfigStatusApplyConfiguration { - return &CRIOCredentialProviderConfigStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CRIOCredentialProviderConfigStatusApplyConfiguration) WithConditions(values ...*v1.ConditionApplyConfiguration) *CRIOCredentialProviderConfigStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/custompkipolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/custompkipolicy.go deleted file mode 100644 index 5f689804e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/custompkipolicy.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// CustomPKIPolicyApplyConfiguration represents a declarative configuration of the CustomPKIPolicy type for use -// with apply. -// -// CustomPKIPolicy contains administrator-specified cryptographic configuration. -// Administrators must specify defaults for all certificates and may optionally -// override specific categories of certificates. -type CustomPKIPolicyApplyConfiguration struct { - PKIProfileApplyConfiguration `json:",inline"` -} - -// CustomPKIPolicyApplyConfiguration constructs a declarative configuration of the CustomPKIPolicy type for use with -// apply. -func CustomPKIPolicy() *CustomPKIPolicyApplyConfiguration { - return &CustomPKIPolicyApplyConfiguration{} -} - -// WithDefaults sets the Defaults field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Defaults field is set to the value of the last call. -func (b *CustomPKIPolicyApplyConfiguration) WithDefaults(value *DefaultCertificateConfigApplyConfiguration) *CustomPKIPolicyApplyConfiguration { - b.PKIProfileApplyConfiguration.Defaults = value - return b -} - -// WithSignerCertificates sets the SignerCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SignerCertificates field is set to the value of the last call. -func (b *CustomPKIPolicyApplyConfiguration) WithSignerCertificates(value *CertificateConfigApplyConfiguration) *CustomPKIPolicyApplyConfiguration { - b.PKIProfileApplyConfiguration.SignerCertificates = value - return b -} - -// WithServingCertificates sets the ServingCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServingCertificates field is set to the value of the last call. -func (b *CustomPKIPolicyApplyConfiguration) WithServingCertificates(value *CertificateConfigApplyConfiguration) *CustomPKIPolicyApplyConfiguration { - b.PKIProfileApplyConfiguration.ServingCertificates = value - return b -} - -// WithClientCertificates sets the ClientCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCertificates field is set to the value of the last call. -func (b *CustomPKIPolicyApplyConfiguration) WithClientCertificates(value *CertificateConfigApplyConfiguration) *CustomPKIPolicyApplyConfiguration { - b.PKIProfileApplyConfiguration.ClientCertificates = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/defaultcertificateconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/defaultcertificateconfig.go deleted file mode 100644 index 3ddd6fb6a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/defaultcertificateconfig.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// DefaultCertificateConfigApplyConfiguration represents a declarative configuration of the DefaultCertificateConfig type for use -// with apply. -// -// DefaultCertificateConfig specifies the default certificate configuration -// parameters. All fields are required to ensure that defaults are fully -// specified for all certificates. -type DefaultCertificateConfigApplyConfiguration struct { - // key specifies the cryptographic parameters for the certificate's key pair. - // This field is required in defaults to ensure all certificates have a - // well-defined key configuration. - Key *KeyConfigApplyConfiguration `json:"key,omitempty"` -} - -// DefaultCertificateConfigApplyConfiguration constructs a declarative configuration of the DefaultCertificateConfig type for use with -// apply. -func DefaultCertificateConfig() *DefaultCertificateConfigApplyConfiguration { - return &DefaultCertificateConfigApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *DefaultCertificateConfigApplyConfiguration) WithKey(value *KeyConfigApplyConfiguration) *DefaultCertificateConfigApplyConfiguration { - b.Key = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/dropequalactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/dropequalactionconfig.go deleted file mode 100644 index 1e0a8e001..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/dropequalactionconfig.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// DropEqualActionConfigApplyConfiguration represents a declarative configuration of the DropEqualActionConfig type for use -// with apply. -// -// DropEqualActionConfig configures the DropEqual action. -// Drops targets for which the concatenated source_labels do match the value of target_label. -// Requires Prometheus >= v2.41.0. -type DropEqualActionConfigApplyConfiguration struct { - // targetLabel is the label name whose value is compared to the concatenated source_labels; targets that match are dropped. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` -} - -// DropEqualActionConfigApplyConfiguration constructs a declarative configuration of the DropEqualActionConfig type for use with -// apply. -func DropEqualActionConfig() *DropEqualActionConfigApplyConfiguration { - return &DropEqualActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *DropEqualActionConfigApplyConfiguration) WithTargetLabel(value string) *DropEqualActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/ecdsakeyconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/ecdsakeyconfig.go deleted file mode 100644 index 96c579a3a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/ecdsakeyconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// ECDSAKeyConfigApplyConfiguration represents a declarative configuration of the ECDSAKeyConfig type for use -// with apply. -// -// ECDSAKeyConfig specifies parameters for ECDSA key generation. -type ECDSAKeyConfigApplyConfiguration struct { - // curve specifies the NIST elliptic curve for ECDSA keys. - // Valid values are "P256", "P384", and "P521". - // - // When set to P256, the NIST P-256 curve (also known as secp256r1) is used, - // providing 128-bit security. - // - // When set to P384, the NIST P-384 curve (also known as secp384r1) is used, - // providing 192-bit security. - // - // When set to P521, the NIST P-521 curve (also known as secp521r1) is used, - // providing 256-bit security. - Curve *configv1alpha1.ECDSACurve `json:"curve,omitempty"` -} - -// ECDSAKeyConfigApplyConfiguration constructs a declarative configuration of the ECDSAKeyConfig type for use with -// apply. -func ECDSAKeyConfig() *ECDSAKeyConfigApplyConfiguration { - return &ECDSAKeyConfigApplyConfiguration{} -} - -// WithCurve sets the Curve field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Curve field is set to the value of the last call. -func (b *ECDSAKeyConfigApplyConfiguration) WithCurve(value configv1alpha1.ECDSACurve) *ECDSAKeyConfigApplyConfiguration { - b.Curve = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/etcdbackupspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/etcdbackupspec.go deleted file mode 100644 index edef778d8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/etcdbackupspec.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// EtcdBackupSpecApplyConfiguration represents a declarative configuration of the EtcdBackupSpec type for use -// with apply. -// -// EtcdBackupSpec provides configuration for automated etcd backups to the cluster-etcd-operator -type EtcdBackupSpecApplyConfiguration struct { - // schedule defines the recurring backup schedule in Cron format - // every 2 hours: 0 */2 * * * - // every day at 3am: 0 3 * * * - // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. - // The current default is "no backups", but will change in the future. - Schedule *string `json:"schedule,omitempty"` - // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. - // If not specified, this will default to the time zone of the kube-controller-manager process. - // See https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones - TimeZone *string `json:"timeZone,omitempty"` - // retentionPolicy defines the retention policy for retaining and deleting existing backups. - RetentionPolicy *RetentionPolicyApplyConfiguration `json:"retentionPolicy,omitempty"` - // pvcName specifies the name of the PersistentVolumeClaim (PVC) which binds a PersistentVolume where the - // etcd backup files would be saved - // The PVC itself must always be created in the "openshift-etcd" namespace - // If the PVC is left unspecified "" then the platform will choose a reasonable default location to save the backup. - // In the future this would be backups saved across the control-plane master nodes. - PVCName *string `json:"pvcName,omitempty"` -} - -// EtcdBackupSpecApplyConfiguration constructs a declarative configuration of the EtcdBackupSpec type for use with -// apply. -func EtcdBackupSpec() *EtcdBackupSpecApplyConfiguration { - return &EtcdBackupSpecApplyConfiguration{} -} - -// WithSchedule sets the Schedule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schedule field is set to the value of the last call. -func (b *EtcdBackupSpecApplyConfiguration) WithSchedule(value string) *EtcdBackupSpecApplyConfiguration { - b.Schedule = &value - return b -} - -// WithTimeZone sets the TimeZone field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TimeZone field is set to the value of the last call. -func (b *EtcdBackupSpecApplyConfiguration) WithTimeZone(value string) *EtcdBackupSpecApplyConfiguration { - b.TimeZone = &value - return b -} - -// WithRetentionPolicy sets the RetentionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RetentionPolicy field is set to the value of the last call. -func (b *EtcdBackupSpecApplyConfiguration) WithRetentionPolicy(value *RetentionPolicyApplyConfiguration) *EtcdBackupSpecApplyConfiguration { - b.RetentionPolicy = value - return b -} - -// WithPVCName sets the PVCName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PVCName field is set to the value of the last call. -func (b *EtcdBackupSpecApplyConfiguration) WithPVCName(value string) *EtcdBackupSpecApplyConfiguration { - b.PVCName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/gatherconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/gatherconfig.go deleted file mode 100644 index c5748c3d7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/gatherconfig.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// GatherConfigApplyConfiguration represents a declarative configuration of the GatherConfig type for use -// with apply. -// -// gatherConfig provides data gathering configuration options. -type GatherConfigApplyConfiguration struct { - // dataPolicy allows user to enable additional global obfuscation of the IP addresses and base domain in the Insights archive data. - // Valid values are "None" and "ObfuscateNetworking". - // When set to None the data is not obfuscated. - // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - DataPolicy *configv1alpha1.DataPolicy `json:"dataPolicy,omitempty"` - // disabledGatherers is a list of gatherers to be excluded from the gathering. All the gatherers can be disabled by providing "all" value. - // If all the gatherers are disabled, the Insights operator does not gather any data. - // The format for the disabledGatherer should be: {gatherer}/{function} where the function is optional. - // Gatherer consists of a lowercase letters only that may include underscores (_). - // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). - // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - // An example of disabling gatherers looks like this: `disabledGatherers: ["clusterconfig/machine_configs", "workloads/workload_info"]` - DisabledGatherers []configv1alpha1.DisabledGatherer `json:"disabledGatherers,omitempty"` - // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. - // If omitted, the gathering job will use ephemeral storage. - StorageSpec *StorageApplyConfiguration `json:"storage,omitempty"` -} - -// GatherConfigApplyConfiguration constructs a declarative configuration of the GatherConfig type for use with -// apply. -func GatherConfig() *GatherConfigApplyConfiguration { - return &GatherConfigApplyConfiguration{} -} - -// WithDataPolicy sets the DataPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DataPolicy field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithDataPolicy(value configv1alpha1.DataPolicy) *GatherConfigApplyConfiguration { - b.DataPolicy = &value - return b -} - -// WithDisabledGatherers adds the given value to the DisabledGatherers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DisabledGatherers field. -func (b *GatherConfigApplyConfiguration) WithDisabledGatherers(values ...configv1alpha1.DisabledGatherer) *GatherConfigApplyConfiguration { - for i := range values { - b.DisabledGatherers = append(b.DisabledGatherers, values[i]) - } - return b -} - -// WithStorageSpec sets the StorageSpec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StorageSpec field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithStorageSpec(value *StorageApplyConfiguration) *GatherConfigApplyConfiguration { - b.StorageSpec = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/hashmodactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/hashmodactionconfig.go deleted file mode 100644 index 453795b42..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/hashmodactionconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// HashModActionConfigApplyConfiguration represents a declarative configuration of the HashModActionConfig type for use -// with apply. -// -// HashModActionConfig configures the HashMod action. -// target_label is set to the modulus of a hash of the concatenated source_labels (target = hash % modulus). -type HashModActionConfigApplyConfiguration struct { - // targetLabel is the label name where the hash modulus result is written. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` - // modulus is the divisor applied to the hash of the concatenated source label values (target = hash % modulus). - // Required when using the HashMod action so the intended behavior is explicit. - // Must be between 1 and 1000000. - Modulus *int64 `json:"modulus,omitempty"` -} - -// HashModActionConfigApplyConfiguration constructs a declarative configuration of the HashModActionConfig type for use with -// apply. -func HashModActionConfig() *HashModActionConfigApplyConfiguration { - return &HashModActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *HashModActionConfigApplyConfiguration) WithTargetLabel(value string) *HashModActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} - -// WithModulus sets the Modulus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Modulus field is set to the value of the last call. -func (b *HashModActionConfigApplyConfiguration) WithModulus(value int64) *HashModActionConfigApplyConfiguration { - b.Modulus = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagather.go deleted file mode 100644 index 5f47a1a71..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagather.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// InsightsDataGatherApplyConfiguration represents a declarative configuration of the InsightsDataGather type for use -// with apply. -// -// InsightsDataGather provides data gather configuration options for the the Insights Operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type InsightsDataGatherApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *InsightsDataGatherSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1alpha1.InsightsDataGatherStatus `json:"status,omitempty"` -} - -// InsightsDataGather constructs a declarative configuration of the InsightsDataGather type for use with -// apply. -func InsightsDataGather(name string) *InsightsDataGatherApplyConfiguration { - b := &InsightsDataGatherApplyConfiguration{} - b.WithName(name) - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b -} - -// ExtractInsightsDataGatherFrom extracts the applied configuration owned by fieldManager from -// insightsDataGather for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGatherFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGatherFrom(insightsDataGather *configv1alpha1.InsightsDataGather, fieldManager string, subresource string) (*InsightsDataGatherApplyConfiguration, error) { - b := &InsightsDataGatherApplyConfiguration{} - err := managedfields.ExtractInto(insightsDataGather, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.InsightsDataGather"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(insightsDataGather.Name) - - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b, nil -} - -// ExtractInsightsDataGather extracts the applied configuration owned by fieldManager from -// insightsDataGather. If no managedFields are found in insightsDataGather for fieldManager, a -// InsightsDataGatherApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGather provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGather(insightsDataGather *configv1alpha1.InsightsDataGather, fieldManager string) (*InsightsDataGatherApplyConfiguration, error) { - return ExtractInsightsDataGatherFrom(insightsDataGather, fieldManager, "") -} - -// ExtractInsightsDataGatherStatus extracts the applied configuration owned by fieldManager from -// insightsDataGather for the status subresource. -func ExtractInsightsDataGatherStatus(insightsDataGather *configv1alpha1.InsightsDataGather, fieldManager string) (*InsightsDataGatherApplyConfiguration, error) { - return ExtractInsightsDataGatherFrom(insightsDataGather, fieldManager, "status") -} - -func (b InsightsDataGatherApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithKind(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithAPIVersion(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGenerateName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithNamespace(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithUID(value types.UID) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithResourceVersion(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGeneration(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithLabels(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InsightsDataGatherApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *InsightsDataGatherApplyConfiguration) WithFinalizers(values ...string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *InsightsDataGatherApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithSpec(value *InsightsDataGatherSpecApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithStatus(value configv1alpha1.InsightsDataGatherStatus) *InsightsDataGatherApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagatherspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagatherspec.go deleted file mode 100644 index b59b9d083..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/insightsdatagatherspec.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// InsightsDataGatherSpecApplyConfiguration represents a declarative configuration of the InsightsDataGatherSpec type for use -// with apply. -type InsightsDataGatherSpecApplyConfiguration struct { - // gatherConfig spec attribute includes all the configuration options related to gathering of the Insights data and its uploading to the ingress. - GatherConfig *GatherConfigApplyConfiguration `json:"gatherConfig,omitempty"` -} - -// InsightsDataGatherSpecApplyConfiguration constructs a declarative configuration of the InsightsDataGatherSpec type for use with -// apply. -func InsightsDataGatherSpec() *InsightsDataGatherSpecApplyConfiguration { - return &InsightsDataGatherSpecApplyConfiguration{} -} - -// WithGatherConfig sets the GatherConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GatherConfig field is set to the value of the last call. -func (b *InsightsDataGatherSpecApplyConfiguration) WithGatherConfig(value *GatherConfigApplyConfiguration) *InsightsDataGatherSpecApplyConfiguration { - b.GatherConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keepequalactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keepequalactionconfig.go deleted file mode 100644 index a560a662a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keepequalactionconfig.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// KeepEqualActionConfigApplyConfiguration represents a declarative configuration of the KeepEqualActionConfig type for use -// with apply. -// -// KeepEqualActionConfig configures the KeepEqual action. -// Drops targets for which the concatenated source_labels do not match the value of target_label. -// Requires Prometheus >= v2.41.0. -type KeepEqualActionConfigApplyConfiguration struct { - // targetLabel is the label name whose value is compared to the concatenated source_labels; targets that do not match are dropped. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` -} - -// KeepEqualActionConfigApplyConfiguration constructs a declarative configuration of the KeepEqualActionConfig type for use with -// apply. -func KeepEqualActionConfig() *KeepEqualActionConfigApplyConfiguration { - return &KeepEqualActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *KeepEqualActionConfigApplyConfiguration) WithTargetLabel(value string) *KeepEqualActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keyconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keyconfig.go deleted file mode 100644 index 340d395ce..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/keyconfig.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// KeyConfigApplyConfiguration represents a declarative configuration of the KeyConfig type for use -// with apply. -// -// KeyConfig specifies cryptographic parameters for key generation. -type KeyConfigApplyConfiguration struct { - // algorithm specifies the key generation algorithm. - // Valid values are "RSA" and "ECDSA". - // - // When set to RSA, the rsa field must be specified and the generated key - // will be an RSA key with the configured key size. - // - // When set to ECDSA, the ecdsa field must be specified and the generated key - // will be an ECDSA key using the configured elliptic curve. - Algorithm *configv1alpha1.KeyAlgorithm `json:"algorithm,omitempty"` - // rsa specifies RSA key parameters. - // Required when algorithm is RSA, and forbidden otherwise. - RSA *RSAKeyConfigApplyConfiguration `json:"rsa,omitempty"` - // ecdsa specifies ECDSA key parameters. - // Required when algorithm is ECDSA, and forbidden otherwise. - ECDSA *ECDSAKeyConfigApplyConfiguration `json:"ecdsa,omitempty"` -} - -// KeyConfigApplyConfiguration constructs a declarative configuration of the KeyConfig type for use with -// apply. -func KeyConfig() *KeyConfigApplyConfiguration { - return &KeyConfigApplyConfiguration{} -} - -// WithAlgorithm sets the Algorithm field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Algorithm field is set to the value of the last call. -func (b *KeyConfigApplyConfiguration) WithAlgorithm(value configv1alpha1.KeyAlgorithm) *KeyConfigApplyConfiguration { - b.Algorithm = &value - return b -} - -// WithRSA sets the RSA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RSA field is set to the value of the last call. -func (b *KeyConfigApplyConfiguration) WithRSA(value *RSAKeyConfigApplyConfiguration) *KeyConfigApplyConfiguration { - b.RSA = value - return b -} - -// WithECDSA sets the ECDSA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ECDSA field is set to the value of the last call. -func (b *KeyConfigApplyConfiguration) WithECDSA(value *ECDSAKeyConfigApplyConfiguration) *KeyConfigApplyConfiguration { - b.ECDSA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsconfig.go deleted file mode 100644 index ed850ef34..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsconfig.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// KubeStateMetricsConfigApplyConfiguration represents a declarative configuration of the KubeStateMetricsConfig type for use -// with apply. -// -// KubeStateMetricsConfig provides configuration options for the kube-state-metrics agent -// that runs in the `openshift-monitoring` namespace. kube-state-metrics generates metrics -// about the state of Kubernetes objects such as Deployments, Nodes, and Pods. -type KubeStateMetricsConfigApplyConfiguration struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the kube-state-metrics container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, no tolerations are applied. This default is subject to change over time. - // When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries. - // Each toleration's operator, when specified, must be either "Exists" or "Equal". - // Each toleration's effect, when specified, must be one of "NoSchedule", "PreferNoSchedule", or "NoExecute". - // An empty or unset effect means match all effects. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how kube-state-metrics Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // When omitted, no topology spread constraints are applied. This default is subject to change over time. - // When specified, topologySpreadConstraints must contain at least 1 entry and must not contain more than 10 entries. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - // Each entry's whenUnsatisfiable must be either "DoNotSchedule" or "ScheduleAnyway". - // Each entry's maxSkew must be at least 1. - // When minDomains is specified, it must be at least 1 and whenUnsatisfiable must be "DoNotSchedule". - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // additionalResourceLabels defines additional Kubernetes resource labels to expose as metrics - // in kube-state-metrics. - // Currently, only "Job" and "CronJob" resources are supported due to cardinality concerns. - // Each entry specifies a resource name and a list of Kubernetes label names to expose. - // Use "*" in the labels list to expose all labels for a given resource. - // additionalResourceLabels is optional. - // When omitted, no additional Kubernetes object labels are exposed as metrics - // by kube-state-metrics beyond its built-in metric labels (e.g. namespace, job_name). - // Use this field to opt in to exposing specific Kubernetes labels as metric labels - // for the supported resource types. - // Minimum length for this list is 1. - // Maximum length for this list is 2. - // Each resource name must be unique within this list. - AdditionalResourceLabels []KubeStateMetricsResourceLabelsApplyConfiguration `json:"additionalResourceLabels,omitempty"` -} - -// KubeStateMetricsConfigApplyConfiguration constructs a declarative configuration of the KubeStateMetricsConfig type for use with -// apply. -func KubeStateMetricsConfig() *KubeStateMetricsConfigApplyConfiguration { - return &KubeStateMetricsConfigApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *KubeStateMetricsConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *KubeStateMetricsConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *KubeStateMetricsConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *KubeStateMetricsConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *KubeStateMetricsConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *KubeStateMetricsConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *KubeStateMetricsConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *KubeStateMetricsConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} - -// WithAdditionalResourceLabels adds the given value to the AdditionalResourceLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalResourceLabels field. -func (b *KubeStateMetricsConfigApplyConfiguration) WithAdditionalResourceLabels(values ...*KubeStateMetricsResourceLabelsApplyConfiguration) *KubeStateMetricsConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalResourceLabels") - } - b.AdditionalResourceLabels = append(b.AdditionalResourceLabels, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsresourcelabels.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsresourcelabels.go deleted file mode 100644 index 8b4de02a9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/kubestatemetricsresourcelabels.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// KubeStateMetricsResourceLabelsApplyConfiguration represents a declarative configuration of the KubeStateMetricsResourceLabels type for use -// with apply. -// -// KubeStateMetricsResourceLabels defines which Kubernetes labels to expose as metrics -// for a given resource type in kube-state-metrics. -type KubeStateMetricsResourceLabelsApplyConfiguration struct { - // resource is the Kubernetes resource name whose labels should be exposed as metrics. - // Currently, only "Job" and "CronJob" are supported due to cardinality concerns. - // Valid values are "Job" and "CronJob". - // This field is required. - Resource *configv1alpha1.KubeStateMetricsResourceName `json:"resource,omitempty"` - // labels is the list of Kubernetes label names to expose as metrics for this resource. - // Use "*" to expose all labels for the specified resource. - // When "*" is specified, it must be the only entry in the list; mixing "*" with - // specific label names is not allowed. - // This field is required. - // Each label name must be unique within this list. - // Minimum length for this list is 1. - // Maximum length for this list is 50. - Labels []configv1alpha1.KubeStateMetricsLabelName `json:"labels,omitempty"` -} - -// KubeStateMetricsResourceLabelsApplyConfiguration constructs a declarative configuration of the KubeStateMetricsResourceLabels type for use with -// apply. -func KubeStateMetricsResourceLabels() *KubeStateMetricsResourceLabelsApplyConfiguration { - return &KubeStateMetricsResourceLabelsApplyConfiguration{} -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *KubeStateMetricsResourceLabelsApplyConfiguration) WithResource(value configv1alpha1.KubeStateMetricsResourceName) *KubeStateMetricsResourceLabelsApplyConfiguration { - b.Resource = &value - return b -} - -// WithLabels adds the given value to the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Labels field. -func (b *KubeStateMetricsResourceLabelsApplyConfiguration) WithLabels(values ...configv1alpha1.KubeStateMetricsLabelName) *KubeStateMetricsResourceLabelsApplyConfiguration { - for i := range values { - b.Labels = append(b.Labels, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/label.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/label.go deleted file mode 100644 index d1710cc9a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/label.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// LabelApplyConfiguration represents a declarative configuration of the Label type for use -// with apply. -// -// Label represents a key/value pair for external labels. -type LabelApplyConfiguration struct { - // key is the name of the label. - // Prometheus supports UTF-8 label names, so any valid UTF-8 string is allowed. - // Must be between 1 and 128 characters in length. - Key *string `json:"key,omitempty"` - // value is the value of the label. - // Must be between 1 and 128 characters in length. - Value *string `json:"value,omitempty"` -} - -// LabelApplyConfiguration constructs a declarative configuration of the Label type for use with -// apply. -func Label() *LabelApplyConfiguration { - return &LabelApplyConfiguration{} -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *LabelApplyConfiguration) WithKey(value string) *LabelApplyConfiguration { - b.Key = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *LabelApplyConfiguration) WithValue(value string) *LabelApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/labelmapactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/labelmapactionconfig.go deleted file mode 100644 index a16bd7877..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/labelmapactionconfig.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// LabelMapActionConfigApplyConfiguration represents a declarative configuration of the LabelMapActionConfig type for use -// with apply. -// -// LabelMapActionConfig configures the LabelMap action. -// Regex is matched against all source label names (not just source_labels). Matching label values are copied to new label names given by replacement, with match group references (${1}, ${2}, ...) substituted. -type LabelMapActionConfigApplyConfiguration struct { - // replacement is the template for new label names; match group references (${1}, ${2}, ...) are substituted from the matched label name. - // Required when using the LabelMap action so the intended behavior is explicit and the platform does not need to apply defaults. - // Use "$1" for the first capture group, "$2" for the second, etc. - // Must be between 1 and 255 characters in length. Empty string is invalid as it would produce invalid label names. - Replacement *string `json:"replacement,omitempty"` -} - -// LabelMapActionConfigApplyConfiguration constructs a declarative configuration of the LabelMapActionConfig type for use with -// apply. -func LabelMapActionConfig() *LabelMapActionConfigApplyConfiguration { - return &LabelMapActionConfigApplyConfiguration{} -} - -// WithReplacement sets the Replacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Replacement field is set to the value of the last call. -func (b *LabelMapActionConfigApplyConfiguration) WithReplacement(value string) *LabelMapActionConfigApplyConfiguration { - b.Replacement = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/lowercaseactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/lowercaseactionconfig.go deleted file mode 100644 index 17fa48139..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/lowercaseactionconfig.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// LowercaseActionConfigApplyConfiguration represents a declarative configuration of the LowercaseActionConfig type for use -// with apply. -// -// LowercaseActionConfig configures the Lowercase action. -// Maps the concatenated source_labels to their lower case and writes to target_label. -// Requires Prometheus >= v2.36.0. -type LowercaseActionConfigApplyConfiguration struct { - // targetLabel is the label name where the lower-cased value is written. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` -} - -// LowercaseActionConfigApplyConfiguration constructs a declarative configuration of the LowercaseActionConfig type for use with -// apply. -func LowercaseActionConfig() *LowercaseActionConfigApplyConfiguration { - return &LowercaseActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *LowercaseActionConfigApplyConfiguration) WithTargetLabel(value string) *LowercaseActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfig.go deleted file mode 100644 index f8e162781..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfig.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// MetadataConfigApplyConfiguration represents a declarative configuration of the MetadataConfig type for use -// with apply. -// -// MetadataConfig defines whether and how to send series metadata to remote write storage. -type MetadataConfigApplyConfiguration struct { - // sendPolicy specifies whether to send metadata and how it is configured. - // Default: send metadata using platform-chosen defaults (e.g. send interval 30 seconds). - // Custom: send metadata using the settings in the custom field. - SendPolicy *configv1alpha1.MetadataConfigSendPolicy `json:"sendPolicy,omitempty"` - // custom defines custom metadata send settings. Required when sendPolicy is Custom (must have at least one property), and forbidden when sendPolicy is Default. - Custom *MetadataConfigCustomApplyConfiguration `json:"custom,omitempty"` -} - -// MetadataConfigApplyConfiguration constructs a declarative configuration of the MetadataConfig type for use with -// apply. -func MetadataConfig() *MetadataConfigApplyConfiguration { - return &MetadataConfigApplyConfiguration{} -} - -// WithSendPolicy sets the SendPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SendPolicy field is set to the value of the last call. -func (b *MetadataConfigApplyConfiguration) WithSendPolicy(value configv1alpha1.MetadataConfigSendPolicy) *MetadataConfigApplyConfiguration { - b.SendPolicy = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *MetadataConfigApplyConfiguration) WithCustom(value *MetadataConfigCustomApplyConfiguration) *MetadataConfigApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfigcustom.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfigcustom.go deleted file mode 100644 index 3f5e05069..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metadataconfigcustom.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// MetadataConfigCustomApplyConfiguration represents a declarative configuration of the MetadataConfigCustom type for use -// with apply. -// -// MetadataConfigCustom defines custom settings for sending series metadata when sendPolicy is Custom. -// At least one property must be set when sendPolicy is Custom (e.g. sendIntervalSeconds). -type MetadataConfigCustomApplyConfiguration struct { - // sendIntervalSeconds is the interval in seconds at which metadata is sent. - // When omitted, the platform chooses a reasonable default (e.g. 30 seconds). - // Minimum value is 1 second. Maximum value is 86400 seconds (24 hours). - SendIntervalSeconds *int32 `json:"sendIntervalSeconds,omitempty"` -} - -// MetadataConfigCustomApplyConfiguration constructs a declarative configuration of the MetadataConfigCustom type for use with -// apply. -func MetadataConfigCustom() *MetadataConfigCustomApplyConfiguration { - return &MetadataConfigCustomApplyConfiguration{} -} - -// WithSendIntervalSeconds sets the SendIntervalSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SendIntervalSeconds field is set to the value of the last call. -func (b *MetadataConfigCustomApplyConfiguration) WithSendIntervalSeconds(value int32) *MetadataConfigCustomApplyConfiguration { - b.SendIntervalSeconds = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metricsserverconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metricsserverconfig.go deleted file mode 100644 index bc77df9d2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/metricsserverconfig.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// MetricsServerConfigApplyConfiguration represents a declarative configuration of the MetricsServerConfig type for use -// with apply. -// -// MetricsServerConfig provides configuration options for the Metrics Server instance -// that runs in the `openshift-monitoring` namespace. Use this configuration to control -// how the Metrics Server instance is deployed, how it logs, and how its pods are scheduled. -type MetricsServerConfigApplyConfiguration struct { - // audit defines the audit configuration used by the Metrics Server instance. - // audit is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default sets audit.profile to Metadata - Audit *AuditApplyConfiguration `json:"audit,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // verbosity defines the verbosity of log messages for Metrics Server. - // Valid values are Errors, Info, Trace, TraceAll and omitted. - // When set to Errors, only critical messages and errors are logged. - // When set to Info, only basic information messages are logged. - // When set to Trace, information useful for general debugging is logged. - // When set to TraceAll, detailed information about metric scraping is logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Errors` - Verbosity *configv1alpha1.VerbosityLevel `json:"verbosity,omitempty"` - // resources defines the compute resource requests and limits for the Metrics Server container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // topologySpreadConstraints defines rules for how Metrics Server Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// MetricsServerConfigApplyConfiguration constructs a declarative configuration of the MetricsServerConfig type for use with -// apply. -func MetricsServerConfig() *MetricsServerConfigApplyConfiguration { - return &MetricsServerConfigApplyConfiguration{} -} - -// WithAudit sets the Audit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Audit field is set to the value of the last call. -func (b *MetricsServerConfigApplyConfiguration) WithAudit(value *AuditApplyConfiguration) *MetricsServerConfigApplyConfiguration { - b.Audit = value - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *MetricsServerConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *MetricsServerConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *MetricsServerConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *MetricsServerConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithVerbosity sets the Verbosity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Verbosity field is set to the value of the last call. -func (b *MetricsServerConfigApplyConfiguration) WithVerbosity(value configv1alpha1.VerbosityLevel) *MetricsServerConfigApplyConfiguration { - b.Verbosity = &value - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *MetricsServerConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *MetricsServerConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *MetricsServerConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *MetricsServerConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/monitoringpluginconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/monitoringpluginconfig.go deleted file mode 100644 index 6f10b30e5..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/monitoringpluginconfig.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// MonitoringPluginConfigApplyConfiguration represents a declarative configuration of the MonitoringPluginConfig type for use -// with apply. -// -// MonitoringPluginConfig provides configuration options for the monitoring plugin -// that runs as a dynamic plugin of the OpenShift web console. -// The monitoring plugin provides the monitoring UI in the OpenShift web console -// for visualizing metrics, alerts, and dashboards. -// At least one field must be specified; an empty monitoringPluginConfig object is not allowed. -type MonitoringPluginConfigApplyConfiguration struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the monitoring-plugin container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 10m - // - name: memory - // request: 50Mi - // - // When specified, resources must contain at least 1 entry and must not exceed 5 entries. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines the tolerations required for the monitoring-plugin Pods. - // This field is optional. - // - // When omitted, the monitoring-plugin Pods will not have any tolerations, which - // means they will only be scheduled on nodes with no taints. - // When specified, tolerations must contain at least 1 entry and must not contain more than 10 entries. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how monitoring-plugin Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // When specified, this list must contain at least 1 entry and must not exceed 10 entries. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// MonitoringPluginConfigApplyConfiguration constructs a declarative configuration of the MonitoringPluginConfig type for use with -// apply. -func MonitoringPluginConfig() *MonitoringPluginConfigApplyConfiguration { - return &MonitoringPluginConfigApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *MonitoringPluginConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *MonitoringPluginConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *MonitoringPluginConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *MonitoringPluginConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *MonitoringPluginConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *MonitoringPluginConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *MonitoringPluginConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *MonitoringPluginConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorbuddyinfoconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorbuddyinfoconfig.go deleted file mode 100644 index ba6cedbf2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorbuddyinfoconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorBuddyInfoConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorBuddyInfoConfig type for use -// with apply. -// -// NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector -// of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation -// from the node_buddyinfo_blocks metric using data from /proc/buddyinfo. -// It is disabled by default. -type NodeExporterCollectorBuddyInfoConfigApplyConfiguration struct { - // collectionPolicy declares whether the buddyinfo collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected. - // When set to "DoNotCollect", the buddyinfo collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorBuddyInfoConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorBuddyInfoConfig type for use with -// apply. -func NodeExporterCollectorBuddyInfoConfig() *NodeExporterCollectorBuddyInfoConfigApplyConfiguration { - return &NodeExporterCollectorBuddyInfoConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorBuddyInfoConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorBuddyInfoConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go deleted file mode 100644 index ce8b83e06..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorconfig.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// NodeExporterCollectorConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorConfig type for use -// with apply. -// -// NodeExporterCollectorConfig defines settings for individual collectors -// of the node-exporter agent. Each collector can be individually set to collect or not collect metrics. -// At least one collector must be specified. -type NodeExporterCollectorConfigApplyConfiguration struct { - // cpuFreq configures the cpufreq collector, which collects CPU frequency statistics. - // cpuFreq is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Consider enabling when you need to observe CPU frequency scaling; expect higher CPU usage on - // many-core nodes when collectionPolicy is Collect. - CpuFreq *NodeExporterCollectorCpufreqConfigApplyConfiguration `json:"cpuFreq,omitempty"` - // tcpStat configures the tcpstat collector, which collects TCP connection statistics. - // tcpStat is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when debugging TCP connection behavior or capacity at the node level. - TcpStat *NodeExporterCollectorTcpStatConfigApplyConfiguration `json:"tcpStat,omitempty"` - // ethtool configures the ethtool collector, which collects ethernet device statistics. - // ethtool is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when you need NIC driver-level ethtool metrics beyond generic netdev counters. - Ethtool *NodeExporterCollectorEthtoolConfigApplyConfiguration `json:"ethtool,omitempty"` - // netDev configures the netdev collector, which collects network device statistics. - // netDev is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is enabled. - // Turn off if you must reduce per-interface metric cardinality on hosts with many virtual interfaces. - NetDev *NodeExporterCollectorNetDevConfigApplyConfiguration `json:"netDev,omitempty"` - // netClass configures the netclass collector, which collects information about network devices. - // netClass is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is enabled with netlink mode active. - // Use statsGatherer when sysfs vs netlink implementation matters or when matching node_exporter tuning. - NetClass *NodeExporterCollectorNetClassConfigApplyConfiguration `json:"netClass,omitempty"` - // buddyInfo configures the buddyinfo collector, which collects statistics about memory - // fragmentation from the node_buddyinfo_blocks metric. This metric collects data from /proc/buddyinfo. - // buddyInfo is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when investigating kernel memory fragmentation; typically for advanced troubleshooting only. - BuddyInfo *NodeExporterCollectorBuddyInfoConfigApplyConfiguration `json:"buddyInfo,omitempty"` - // mountStats configures the mountstats collector, which collects statistics about NFS volume - // I/O activities. - // mountStats is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enabling this collector may produce metrics with high cardinality. If you enable this - // collector, closely monitor the prometheus-k8s deployment for excessive memory usage. - // Enable when you care about per-mount NFS client statistics. - MountStats *NodeExporterCollectorMountStatsConfigApplyConfiguration `json:"mountStats,omitempty"` - // ksmd configures the ksmd collector, which collects statistics from the kernel same-page - // merger daemon. - // ksmd is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable on nodes where KSM is in use and you want visibility into merging activity. - Ksmd *NodeExporterCollectorKSMDConfigApplyConfiguration `json:"ksmd,omitempty"` - // processes configures the processes collector, which collects statistics from processes and - // threads running in the system. - // processes is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable for process/thread-level insight; can be expensive on busy nodes. - Processes *NodeExporterCollectorProcessesConfigApplyConfiguration `json:"processes,omitempty"` - // systemd configures the systemd collector, which collects statistics on the systemd daemon - // and its managed services. - // systemd is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enabling this collector with a long list of selected units may produce metrics with high - // cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment - // for excessive memory usage. - // Enable when you need metrics for specific units; scope units carefully. - Systemd *NodeExporterCollectorSystemdConfigApplyConfiguration `json:"systemd,omitempty"` - // softirqs configures the softirqs collector, which exposes detailed softirq statistics - // from /proc/softirqs. - // softirqs is optional. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is disabled. - // Enable when you need visibility into kernel softirq processing across CPUs. - Softirqs *NodeExporterCollectorSoftirqsConfigApplyConfiguration `json:"softirqs,omitempty"` -} - -// NodeExporterCollectorConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorConfig type for use with -// apply. -func NodeExporterCollectorConfig() *NodeExporterCollectorConfigApplyConfiguration { - return &NodeExporterCollectorConfigApplyConfiguration{} -} - -// WithCpuFreq sets the CpuFreq field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CpuFreq field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithCpuFreq(value *NodeExporterCollectorCpufreqConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.CpuFreq = value - return b -} - -// WithTcpStat sets the TcpStat field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TcpStat field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithTcpStat(value *NodeExporterCollectorTcpStatConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.TcpStat = value - return b -} - -// WithEthtool sets the Ethtool field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ethtool field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithEthtool(value *NodeExporterCollectorEthtoolConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.Ethtool = value - return b -} - -// WithNetDev sets the NetDev field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetDev field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithNetDev(value *NodeExporterCollectorNetDevConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.NetDev = value - return b -} - -// WithNetClass sets the NetClass field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetClass field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithNetClass(value *NodeExporterCollectorNetClassConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.NetClass = value - return b -} - -// WithBuddyInfo sets the BuddyInfo field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BuddyInfo field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithBuddyInfo(value *NodeExporterCollectorBuddyInfoConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.BuddyInfo = value - return b -} - -// WithMountStats sets the MountStats field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MountStats field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithMountStats(value *NodeExporterCollectorMountStatsConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.MountStats = value - return b -} - -// WithKsmd sets the Ksmd field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ksmd field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithKsmd(value *NodeExporterCollectorKSMDConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.Ksmd = value - return b -} - -// WithProcesses sets the Processes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Processes field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithProcesses(value *NodeExporterCollectorProcessesConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.Processes = value - return b -} - -// WithSystemd sets the Systemd field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Systemd field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithSystemd(value *NodeExporterCollectorSystemdConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.Systemd = value - return b -} - -// WithSoftirqs sets the Softirqs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Softirqs field is set to the value of the last call. -func (b *NodeExporterCollectorConfigApplyConfiguration) WithSoftirqs(value *NodeExporterCollectorSoftirqsConfigApplyConfiguration) *NodeExporterCollectorConfigApplyConfiguration { - b.Softirqs = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorcpufreqconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorcpufreqconfig.go deleted file mode 100644 index 65fe3f11f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorcpufreqconfig.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorCpufreqConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorCpufreqConfig type for use -// with apply. -// -// NodeExporterCollectorCpufreqConfig provides configuration for the cpufreq collector -// of the node-exporter agent. The cpufreq collector collects CPU frequency statistics. -// It is disabled by default. -type NodeExporterCollectorCpufreqConfigApplyConfiguration struct { - // collectionPolicy declares whether the cpufreq collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the cpufreq collector is active and CPU frequency statistics are collected. - // When set to "DoNotCollect", the cpufreq collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorCpufreqConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorCpufreqConfig type for use with -// apply. -func NodeExporterCollectorCpufreqConfig() *NodeExporterCollectorCpufreqConfigApplyConfiguration { - return &NodeExporterCollectorCpufreqConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorCpufreqConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorCpufreqConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorethtoolconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorethtoolconfig.go deleted file mode 100644 index 396477c1f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorethtoolconfig.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorEthtoolConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorEthtoolConfig type for use -// with apply. -// -// NodeExporterCollectorEthtoolConfig provides configuration for the ethtool collector -// of the node-exporter agent. The ethtool collector collects ethernet device statistics. -// It is disabled by default. -type NodeExporterCollectorEthtoolConfigApplyConfiguration struct { - // collectionPolicy declares whether the ethtool collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the ethtool collector is active and ethernet device statistics are collected. - // When set to "DoNotCollect", the ethtool collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorEthtoolConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorEthtoolConfig type for use with -// apply. -func NodeExporterCollectorEthtoolConfig() *NodeExporterCollectorEthtoolConfigApplyConfiguration { - return &NodeExporterCollectorEthtoolConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorEthtoolConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorEthtoolConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorksmdconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorksmdconfig.go deleted file mode 100644 index fc0ac015a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorksmdconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorKSMDConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorKSMDConfig type for use -// with apply. -// -// NodeExporterCollectorKSMDConfig provides configuration for the ksmd collector -// of the node-exporter agent. The ksmd collector collects statistics from the kernel -// same-page merger daemon. -// It is disabled by default. -type NodeExporterCollectorKSMDConfigApplyConfiguration struct { - // collectionPolicy declares whether the ksmd collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the ksmd collector is active and kernel same-page merger statistics are collected. - // When set to "DoNotCollect", the ksmd collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorKSMDConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorKSMDConfig type for use with -// apply. -func NodeExporterCollectorKSMDConfig() *NodeExporterCollectorKSMDConfigApplyConfiguration { - return &NodeExporterCollectorKSMDConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorKSMDConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorKSMDConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectormountstatsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectormountstatsconfig.go deleted file mode 100644 index 306bb851a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectormountstatsconfig.go +++ /dev/null @@ -1,38 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorMountStatsConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorMountStatsConfig type for use -// with apply. -// -// NodeExporterCollectorMountStatsConfig provides configuration for the mountstats collector -// of the node-exporter agent. The mountstats collector collects statistics about NFS volume I/O activities. -// It is disabled by default. -// Enabling this collector may produce metrics with high cardinality. If you enable this -// collector, closely monitor the prometheus-k8s deployment for excessive memory usage. -type NodeExporterCollectorMountStatsConfigApplyConfiguration struct { - // collectionPolicy declares whether the mountstats collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the mountstats collector is active and NFS volume I/O statistics are collected. - // When set to "DoNotCollect", the mountstats collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorMountStatsConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorMountStatsConfig type for use with -// apply. -func NodeExporterCollectorMountStatsConfig() *NodeExporterCollectorMountStatsConfigApplyConfiguration { - return &NodeExporterCollectorMountStatsConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorMountStatsConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorMountStatsConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclasscollectconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclasscollectconfig.go deleted file mode 100644 index 321c7c667..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclasscollectconfig.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorNetClassCollectConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorNetClassCollectConfig type for use -// with apply. -// -// NodeExporterCollectorNetClassCollectConfig holds configuration options for the netclass collector -// when it is actively collecting metrics. At least one field must be specified. -type NodeExporterCollectorNetClassCollectConfigApplyConfiguration struct { - // statsGatherer selects which implementation the netclass collector uses to gather statistics (sysfs or netlink). - // statsGatherer is optional. - // Valid values are "Sysfs" and "Netlink". - // When set to "Netlink", the netlink implementation is used; when set to "Sysfs", the sysfs implementation is used. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is Netlink. - StatsGatherer *configv1alpha1.NodeExporterNetclassStatsGatherer `json:"statsGatherer,omitempty"` -} - -// NodeExporterCollectorNetClassCollectConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorNetClassCollectConfig type for use with -// apply. -func NodeExporterCollectorNetClassCollectConfig() *NodeExporterCollectorNetClassCollectConfigApplyConfiguration { - return &NodeExporterCollectorNetClassCollectConfigApplyConfiguration{} -} - -// WithStatsGatherer sets the StatsGatherer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StatsGatherer field is set to the value of the last call. -func (b *NodeExporterCollectorNetClassCollectConfigApplyConfiguration) WithStatsGatherer(value configv1alpha1.NodeExporterNetclassStatsGatherer) *NodeExporterCollectorNetClassCollectConfigApplyConfiguration { - b.StatsGatherer = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclassconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclassconfig.go deleted file mode 100644 index 2fe2a6a5b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetclassconfig.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorNetClassConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorNetClassConfig type for use -// with apply. -// -// NodeExporterCollectorNetClassConfig provides configuration for the netclass collector -// of the node-exporter agent. The netclass collector collects information about network devices -// such as network speed, MTU, and carrier status. -// It is enabled by default. -// When collectionPolicy is DoNotCollect, the collect field must not be set. -type NodeExporterCollectorNetClassConfigApplyConfiguration struct { - // collectionPolicy declares whether the netclass collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the netclass collector is active and network class information is collected. - // When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable. - // When set to "DoNotCollect", the collect field must not be set. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` - // collect contains configuration options that apply only when the netclass collector is actively collecting metrics - // (i.e. when collectionPolicy is Collect). - // collect is optional and may be omitted even when collectionPolicy is Collect. - // collect may only be set when collectionPolicy is Collect. - // When set, at least one field must be specified within collect. - Collect *NodeExporterCollectorNetClassCollectConfigApplyConfiguration `json:"collect,omitempty"` -} - -// NodeExporterCollectorNetClassConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorNetClassConfig type for use with -// apply. -func NodeExporterCollectorNetClassConfig() *NodeExporterCollectorNetClassConfigApplyConfiguration { - return &NodeExporterCollectorNetClassConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorNetClassConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorNetClassConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} - -// WithCollect sets the Collect field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Collect field is set to the value of the last call. -func (b *NodeExporterCollectorNetClassConfigApplyConfiguration) WithCollect(value *NodeExporterCollectorNetClassCollectConfigApplyConfiguration) *NodeExporterCollectorNetClassConfigApplyConfiguration { - b.Collect = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetdevconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetdevconfig.go deleted file mode 100644 index b5bbe4c86..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectornetdevconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorNetDevConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorNetDevConfig type for use -// with apply. -// -// NodeExporterCollectorNetDevConfig provides configuration for the netdev collector -// of the node-exporter agent. The netdev collector collects network device statistics -// such as bytes, packets, errors, and drops per device. -// It is enabled by default. -type NodeExporterCollectorNetDevConfigApplyConfiguration struct { - // collectionPolicy declares whether the netdev collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the netdev collector is active and network device statistics are collected. - // When set to "DoNotCollect", the netdev collector is inactive and the corresponding metrics become unavailable. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorNetDevConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorNetDevConfig type for use with -// apply. -func NodeExporterCollectorNetDevConfig() *NodeExporterCollectorNetDevConfigApplyConfiguration { - return &NodeExporterCollectorNetDevConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorNetDevConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorNetDevConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorprocessesconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorprocessesconfig.go deleted file mode 100644 index 71cf2fb59..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorprocessesconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorProcessesConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorProcessesConfig type for use -// with apply. -// -// NodeExporterCollectorProcessesConfig provides configuration for the processes collector -// of the node-exporter agent. The processes collector collects statistics from processes and threads -// running in the system. -// It is disabled by default. -type NodeExporterCollectorProcessesConfigApplyConfiguration struct { - // collectionPolicy declares whether the processes collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the processes collector is active and process/thread statistics are collected. - // When set to "DoNotCollect", the processes collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorProcessesConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorProcessesConfig type for use with -// apply. -func NodeExporterCollectorProcessesConfig() *NodeExporterCollectorProcessesConfigApplyConfiguration { - return &NodeExporterCollectorProcessesConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorProcessesConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorProcessesConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsoftirqsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsoftirqsconfig.go deleted file mode 100644 index 4f9936bc1..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsoftirqsconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorSoftirqsConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorSoftirqsConfig type for use -// with apply. -// -// NodeExporterCollectorSoftirqsConfig provides configuration for the softirqs collector -// of the node-exporter agent. The softirqs collector exposes detailed softirq statistics -// from /proc/softirqs. -// It is disabled by default. -type NodeExporterCollectorSoftirqsConfigApplyConfiguration struct { - // collectionPolicy declares whether the softirqs collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the softirqs collector is active and softirq statistics are collected. - // When set to "DoNotCollect", the softirqs collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorSoftirqsConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorSoftirqsConfig type for use with -// apply. -func NodeExporterCollectorSoftirqsConfig() *NodeExporterCollectorSoftirqsConfigApplyConfiguration { - return &NodeExporterCollectorSoftirqsConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorSoftirqsConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorSoftirqsConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdcollectconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdcollectconfig.go deleted file mode 100644 index 647f7efc0..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdcollectconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorSystemdCollectConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorSystemdCollectConfig type for use -// with apply. -// -// NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector -// when it is actively collecting metrics. At least one field must be specified. -type NodeExporterCollectorSystemdCollectConfigApplyConfiguration struct { - // units is a list of regular expression patterns that match systemd units to be included - // by the systemd collector. - // units is optional. - // By default, the list is empty, so the collector exposes no metrics for systemd units. - // Each entry is a regular expression pattern and must be at least 1 character and at most 1024 characters. - // Maximum length for this list is 50. - // Minimum length for this list is 1. - // Entries in this list must be unique. - Units []configv1alpha1.NodeExporterSystemdUnit `json:"units,omitempty"` -} - -// NodeExporterCollectorSystemdCollectConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorSystemdCollectConfig type for use with -// apply. -func NodeExporterCollectorSystemdCollectConfig() *NodeExporterCollectorSystemdCollectConfigApplyConfiguration { - return &NodeExporterCollectorSystemdCollectConfigApplyConfiguration{} -} - -// WithUnits adds the given value to the Units field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Units field. -func (b *NodeExporterCollectorSystemdCollectConfigApplyConfiguration) WithUnits(values ...configv1alpha1.NodeExporterSystemdUnit) *NodeExporterCollectorSystemdCollectConfigApplyConfiguration { - for i := range values { - b.Units = append(b.Units, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdconfig.go deleted file mode 100644 index a1422798d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectorsystemdconfig.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorSystemdConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorSystemdConfig type for use -// with apply. -// -// NodeExporterCollectorSystemdConfig provides configuration for the systemd collector -// of the node-exporter agent. The systemd collector collects statistics on the systemd daemon -// and its managed services. -// It is disabled by default. -// Enabling this collector with a long list of selected units may produce metrics with high -// cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment -// for excessive memory usage. -// When collectionPolicy is DoNotCollect, the collect field must not be set. -type NodeExporterCollectorSystemdConfigApplyConfiguration struct { - // collectionPolicy declares whether the systemd collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the systemd collector is active and systemd unit statistics are collected. - // When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` - // collect contains configuration options that apply only when the systemd collector is actively collecting metrics - // (i.e. when collectionPolicy is Collect). - // collect is optional and may be omitted even when collectionPolicy is Collect. - // collect may only be set when collectionPolicy is Collect. - // When set, at least one field must be specified within collect. - Collect *NodeExporterCollectorSystemdCollectConfigApplyConfiguration `json:"collect,omitempty"` -} - -// NodeExporterCollectorSystemdConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorSystemdConfig type for use with -// apply. -func NodeExporterCollectorSystemdConfig() *NodeExporterCollectorSystemdConfigApplyConfiguration { - return &NodeExporterCollectorSystemdConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorSystemdConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorSystemdConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} - -// WithCollect sets the Collect field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Collect field is set to the value of the last call. -func (b *NodeExporterCollectorSystemdConfigApplyConfiguration) WithCollect(value *NodeExporterCollectorSystemdCollectConfigApplyConfiguration) *NodeExporterCollectorSystemdConfigApplyConfiguration { - b.Collect = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectortcpstatconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectortcpstatconfig.go deleted file mode 100644 index 20f77e880..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexportercollectortcpstatconfig.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterCollectorTcpStatConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorTcpStatConfig type for use -// with apply. -// -// NodeExporterCollectorTcpStatConfig provides configuration for the tcpstat collector -// of the node-exporter agent. The tcpstat collector collects TCP connection statistics. -// It is disabled by default. -type NodeExporterCollectorTcpStatConfigApplyConfiguration struct { - // collectionPolicy declares whether the tcpstat collector collects metrics. - // This field is required. - // Valid values are "Collect" and "DoNotCollect". - // When set to "Collect", the tcpstat collector is active and TCP connection statistics are collected. - // When set to "DoNotCollect", the tcpstat collector is inactive. - CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"` -} - -// NodeExporterCollectorTcpStatConfigApplyConfiguration constructs a declarative configuration of the NodeExporterCollectorTcpStatConfig type for use with -// apply. -func NodeExporterCollectorTcpStatConfig() *NodeExporterCollectorTcpStatConfigApplyConfiguration { - return &NodeExporterCollectorTcpStatConfigApplyConfiguration{} -} - -// WithCollectionPolicy sets the CollectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionPolicy field is set to the value of the last call. -func (b *NodeExporterCollectorTcpStatConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorTcpStatConfigApplyConfiguration { - b.CollectionPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexporterconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexporterconfig.go deleted file mode 100644 index a4a250fc2..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/nodeexporterconfig.go +++ /dev/null @@ -1,115 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// NodeExporterConfigApplyConfiguration represents a declarative configuration of the NodeExporterConfig type for use -// with apply. -// -// NodeExporterConfig provides configuration options for the node-exporter agent -// that runs as a DaemonSet in the `openshift-monitoring` namespace. The node-exporter agent collects -// hardware and OS-level metrics from every node in the cluster, including CPU, memory, disk, and -// network statistics. -// At least one field must be specified. -type NodeExporterConfigApplyConfiguration struct { - // resources defines the compute resource requests and limits for the node-exporter container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 8m - // limit: null - // - name: memory - // request: 32Mi - // limit: null - // --- - // maxItems is set to 5 to stay within the Kubernetes CRD CEL validation cost budget. - // See the MaxItems comment near the ContainerResource type definition for details. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // collectors configures which node-exporter metric collectors are enabled. - // collectors is optional. - // Each collector can be individually enabled or disabled. Some collectors may have - // additional configuration options. - // - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. - Collectors *NodeExporterCollectorConfigApplyConfiguration `json:"collectors,omitempty"` - // maxProcs sets the target number of CPUs on which the node-exporter process will run. - // maxProcs is optional. - // Use this setting to override the default value, which is set either to 4 or to the number - // of CPUs on the host, whichever is smaller. - // The default value is computed at runtime and set via the GOMAXPROCS environment variable before - // node-exporter is launched. - // If a kernel deadlock occurs or if performance degrades when reading from sysfs concurrently, - // you can change this value to 1, which limits node-exporter to running on one CPU. - // For nodes with a high CPU count, setting the limit to a low number saves resources by preventing - // Go routines from being scheduled to run on all CPUs. However, I/O performance degrades if the - // maxProcs value is set too low and there are many metrics to collect. - // The minimum value is 1 and the maximum value is 1024. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, - // which is subject to change over time. The current default is min(4, number of host CPUs). - MaxProcs *int32 `json:"maxProcs,omitempty"` - // ignoredNetworkDevices is a list of regular expression patterns that match network devices - // to be excluded from the relevant collector configuration such as netdev, netclass, and ethtool. - // ignoredNetworkDevices is optional. - // - // When omitted, the Cluster Monitoring Operator uses a predefined list of devices to be excluded - // to minimize the impact on memory usage. - // When set as an empty list, no devices are excluded. - // If you modify this setting, monitor the prometheus-k8s deployment closely for excessive memory usage. - // Maximum length for this list is 50. - // Each entry must be at least 1 character and at most 1024 characters long. - IgnoredNetworkDevices *[]configv1alpha1.NodeExporterIgnoredNetworkDevice `json:"ignoredNetworkDevices,omitempty"` -} - -// NodeExporterConfigApplyConfiguration constructs a declarative configuration of the NodeExporterConfig type for use with -// apply. -func NodeExporterConfig() *NodeExporterConfigApplyConfiguration { - return &NodeExporterConfigApplyConfiguration{} -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *NodeExporterConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *NodeExporterConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithCollectors sets the Collectors field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Collectors field is set to the value of the last call. -func (b *NodeExporterConfigApplyConfiguration) WithCollectors(value *NodeExporterCollectorConfigApplyConfiguration) *NodeExporterConfigApplyConfiguration { - b.Collectors = value - return b -} - -// WithMaxProcs sets the MaxProcs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxProcs field is set to the value of the last call. -func (b *NodeExporterConfigApplyConfiguration) WithMaxProcs(value int32) *NodeExporterConfigApplyConfiguration { - b.MaxProcs = &value - return b -} - -// WithIgnoredNetworkDevices sets the IgnoredNetworkDevices field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IgnoredNetworkDevices field is set to the value of the last call. -func (b *NodeExporterConfigApplyConfiguration) WithIgnoredNetworkDevices(value []configv1alpha1.NodeExporterIgnoredNetworkDevice) *NodeExporterConfigApplyConfiguration { - b.IgnoredNetworkDevices = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2.go deleted file mode 100644 index d58cc3e51..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// OAuth2ApplyConfiguration represents a declarative configuration of the OAuth2 type for use -// with apply. -// -// OAuth2 defines OAuth2 authentication settings for the remote write endpoint. -type OAuth2ApplyConfiguration struct { - // clientId defines the secret reference containing the OAuth2 client ID. - // The secret must exist in the openshift-monitoring namespace. - ClientID *SecretKeySelectorApplyConfiguration `json:"clientId,omitempty"` - // clientSecret defines the secret reference containing the OAuth2 client secret. - // The secret must exist in the openshift-monitoring namespace. - ClientSecret *SecretKeySelectorApplyConfiguration `json:"clientSecret,omitempty"` - // tokenUrl is the URL to fetch the token from. - // Must be a valid URL with http or https scheme. - // Must be between 1 and 2048 characters in length. - TokenURL *string `json:"tokenUrl,omitempty"` - // scopes is a list of OAuth2 scopes to request. - // When omitted, no scopes are requested. - // Maximum of 20 scopes can be specified. - // Each scope must be between 1 and 256 characters. - Scopes []string `json:"scopes,omitempty"` - // endpointParams defines additional parameters to append to the token URL. - // When omitted, no additional parameters are sent. - // Maximum of 20 parameters can be specified. Entries must have unique names (name is the list key). - EndpointParams []OAuth2EndpointParamApplyConfiguration `json:"endpointParams,omitempty"` -} - -// OAuth2ApplyConfiguration constructs a declarative configuration of the OAuth2 type for use with -// apply. -func OAuth2() *OAuth2ApplyConfiguration { - return &OAuth2ApplyConfiguration{} -} - -// WithClientID sets the ClientID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientID field is set to the value of the last call. -func (b *OAuth2ApplyConfiguration) WithClientID(value *SecretKeySelectorApplyConfiguration) *OAuth2ApplyConfiguration { - b.ClientID = value - return b -} - -// WithClientSecret sets the ClientSecret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientSecret field is set to the value of the last call. -func (b *OAuth2ApplyConfiguration) WithClientSecret(value *SecretKeySelectorApplyConfiguration) *OAuth2ApplyConfiguration { - b.ClientSecret = value - return b -} - -// WithTokenURL sets the TokenURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TokenURL field is set to the value of the last call. -func (b *OAuth2ApplyConfiguration) WithTokenURL(value string) *OAuth2ApplyConfiguration { - b.TokenURL = &value - return b -} - -// WithScopes adds the given value to the Scopes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Scopes field. -func (b *OAuth2ApplyConfiguration) WithScopes(values ...string) *OAuth2ApplyConfiguration { - for i := range values { - b.Scopes = append(b.Scopes, values[i]) - } - return b -} - -// WithEndpointParams adds the given value to the EndpointParams field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the EndpointParams field. -func (b *OAuth2ApplyConfiguration) WithEndpointParams(values ...*OAuth2EndpointParamApplyConfiguration) *OAuth2ApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithEndpointParams") - } - b.EndpointParams = append(b.EndpointParams, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2endpointparam.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2endpointparam.go deleted file mode 100644 index 8372d30f8..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/oauth2endpointparam.go +++ /dev/null @@ -1,39 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// OAuth2EndpointParamApplyConfiguration represents a declarative configuration of the OAuth2EndpointParam type for use -// with apply. -// -// OAuth2EndpointParam defines a name/value parameter for the OAuth2 token URL. -type OAuth2EndpointParamApplyConfiguration struct { - // name is the parameter name. Must be between 1 and 256 characters. - Name *string `json:"name,omitempty"` - // value is the optional parameter value. When omitted, the query parameter is applied as ?name (no value). - // When set (including to the empty string), it is applied as ?name=value. Empty string may be used when the - // external system expects a parameter with an empty value (e.g. ?parameter=""). - // Must be between 0 and 2048 characters when present (aligned with common URL length recommendations). - Value *string `json:"value,omitempty"` -} - -// OAuth2EndpointParamApplyConfiguration constructs a declarative configuration of the OAuth2EndpointParam type for use with -// apply. -func OAuth2EndpointParam() *OAuth2EndpointParamApplyConfiguration { - return &OAuth2EndpointParamApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OAuth2EndpointParamApplyConfiguration) WithName(value string) *OAuth2EndpointParamApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *OAuth2EndpointParamApplyConfiguration) WithValue(value string) *OAuth2EndpointParamApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/openshiftstatemetricsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/openshiftstatemetricsconfig.go deleted file mode 100644 index daef85c24..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/openshiftstatemetricsconfig.go +++ /dev/null @@ -1,117 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// OpenShiftStateMetricsConfigApplyConfiguration represents a declarative configuration of the OpenShiftStateMetricsConfig type for use -// with apply. -// -// OpenShiftStateMetricsConfig provides configuration options for the openshift-state-metrics agent -// that runs in the `openshift-monitoring` namespace. The openshift-state-metrics agent generates -// metrics about the state of OpenShift-specific Kubernetes objects, such as routes, builds, and deployments. -type OpenShiftStateMetricsConfigApplyConfiguration struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the openshift-state-metrics container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 1m - // limit: null - // - name: memory - // request: 32Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how openshift-state-metrics Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// OpenShiftStateMetricsConfigApplyConfiguration constructs a declarative configuration of the OpenShiftStateMetricsConfig type for use with -// apply. -func OpenShiftStateMetricsConfig() *OpenShiftStateMetricsConfigApplyConfiguration { - return &OpenShiftStateMetricsConfigApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *OpenShiftStateMetricsConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *OpenShiftStateMetricsConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *OpenShiftStateMetricsConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *OpenShiftStateMetricsConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *OpenShiftStateMetricsConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *OpenShiftStateMetricsConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *OpenShiftStateMetricsConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *OpenShiftStateMetricsConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeclaimreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeclaimreference.go deleted file mode 100644 index 093947c7a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeclaimreference.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// PersistentVolumeClaimReferenceApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimReference type for use -// with apply. -// -// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim. -type PersistentVolumeClaimReferenceApplyConfiguration struct { - // name is a string that follows the DNS1123 subdomain format. - // It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// PersistentVolumeClaimReferenceApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimReference type for use with -// apply. -func PersistentVolumeClaimReference() *PersistentVolumeClaimReferenceApplyConfiguration { - return &PersistentVolumeClaimReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PersistentVolumeClaimReferenceApplyConfiguration) WithName(value string) *PersistentVolumeClaimReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeconfig.go deleted file mode 100644 index 0d001e282..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/persistentvolumeconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// PersistentVolumeConfigApplyConfiguration represents a declarative configuration of the PersistentVolumeConfig type for use -// with apply. -// -// persistentVolumeConfig provides configuration options for PersistentVolume storage. -type PersistentVolumeConfigApplyConfiguration struct { - // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. - // The PersistentVolumeClaim must be created in the openshift-insights namespace. - Claim *PersistentVolumeClaimReferenceApplyConfiguration `json:"claim,omitempty"` - // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default mount path is /var/lib/insights-operator - // The path may not exceed 1024 characters and must not contain a colon. - MountPath *string `json:"mountPath,omitempty"` -} - -// PersistentVolumeConfigApplyConfiguration constructs a declarative configuration of the PersistentVolumeConfig type for use with -// apply. -func PersistentVolumeConfig() *PersistentVolumeConfigApplyConfiguration { - return &PersistentVolumeConfigApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithClaim(value *PersistentVolumeClaimReferenceApplyConfiguration) *PersistentVolumeConfigApplyConfiguration { - b.Claim = value - return b -} - -// WithMountPath sets the MountPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MountPath field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithMountPath(value string) *PersistentVolumeConfigApplyConfiguration { - b.MountPath = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pki.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pki.go deleted file mode 100644 index 01a5b3326..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pki.go +++ /dev/null @@ -1,262 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// PKIApplyConfiguration represents a declarative configuration of the PKI type for use -// with apply. -// -// PKI configures cryptographic parameters for certificates generated -// internally by OpenShift components. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type PKIApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *PKISpecApplyConfiguration `json:"spec,omitempty"` -} - -// PKI constructs a declarative configuration of the PKI type for use with -// apply. -func PKI(name string) *PKIApplyConfiguration { - b := &PKIApplyConfiguration{} - b.WithName(name) - b.WithKind("PKI") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b -} - -// ExtractPKIFrom extracts the applied configuration owned by fieldManager from -// pKI for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// pKI must be a unmodified PKI API object that was retrieved from the Kubernetes API. -// ExtractPKIFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractPKIFrom(pKI *configv1alpha1.PKI, fieldManager string, subresource string) (*PKIApplyConfiguration, error) { - b := &PKIApplyConfiguration{} - err := managedfields.ExtractInto(pKI, internal.Parser().Type("com.github.openshift.api.config.v1alpha1.PKI"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(pKI.Name) - - b.WithKind("PKI") - b.WithAPIVersion("config.openshift.io/v1alpha1") - return b, nil -} - -// ExtractPKI extracts the applied configuration owned by fieldManager from -// pKI. If no managedFields are found in pKI for fieldManager, a -// PKIApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// pKI must be a unmodified PKI API object that was retrieved from the Kubernetes API. -// ExtractPKI provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractPKI(pKI *configv1alpha1.PKI, fieldManager string) (*PKIApplyConfiguration, error) { - return ExtractPKIFrom(pKI, fieldManager, "") -} - -func (b PKIApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithKind(value string) *PKIApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithAPIVersion(value string) *PKIApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithName(value string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithGenerateName(value string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithNamespace(value string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithUID(value types.UID) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithResourceVersion(value string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithGeneration(value int64) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithCreationTimestamp(value metav1.Time) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *PKIApplyConfiguration) WithLabels(entries map[string]string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *PKIApplyConfiguration) WithAnnotations(entries map[string]string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *PKIApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *PKIApplyConfiguration) WithFinalizers(values ...string) *PKIApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *PKIApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *PKIApplyConfiguration) WithSpec(value *PKISpecApplyConfiguration) *PKIApplyConfiguration { - b.Spec = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *PKIApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *PKIApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *PKIApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *PKIApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkicertificatemanagement.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkicertificatemanagement.go deleted file mode 100644 index 203b73bb6..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkicertificatemanagement.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// PKICertificateManagementApplyConfiguration represents a declarative configuration of the PKICertificateManagement type for use -// with apply. -// -// PKICertificateManagement determines whether components use hardcoded defaults (Unmanaged), follow -// OpenShift best practices (Default), or use administrator-specified cryptographic parameters (Custom). -// This provides flexibility for organizations with specific compliance requirements or security policies -// while maintaining backwards compatibility for existing clusters. -type PKICertificateManagementApplyConfiguration struct { - // mode determines how PKI configuration is managed. - // Valid values are "Unmanaged", "Default", and "Custom". - // - // When set to Unmanaged, components use their existing hardcoded certificate - // generation behavior, exactly as if this feature did not exist. Each component - // generates certificates using whatever parameters it was using before this - // feature. While most components use RSA 2048, some may use different - // parameters. Use of this mode might prevent upgrading to the next major - // OpenShift release. - // - // When set to Default, OpenShift-recommended best practices for certificate - // generation are applied. The specific parameters may evolve across OpenShift - // releases to adopt improved cryptographic standards. In the initial release, - // this matches Unmanaged behavior for each component. In future releases, this - // may adopt ECDSA or larger RSA keys based on industry best practices. - // Recommended for most customers who want to benefit from security improvements - // automatically. - // - // When set to Custom, the certificate management parameters can be set - // explicitly. Use the custom field to specify certificate generation parameters. - Mode *configv1alpha1.PKICertificateManagementMode `json:"mode,omitempty"` - // custom contains administrator-specified cryptographic configuration. - // Use the defaults and category override fields - // to specify certificate generation parameters. - // Required when mode is Custom, and forbidden otherwise. - Custom *CustomPKIPolicyApplyConfiguration `json:"custom,omitempty"` -} - -// PKICertificateManagementApplyConfiguration constructs a declarative configuration of the PKICertificateManagement type for use with -// apply. -func PKICertificateManagement() *PKICertificateManagementApplyConfiguration { - return &PKICertificateManagementApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *PKICertificateManagementApplyConfiguration) WithMode(value configv1alpha1.PKICertificateManagementMode) *PKICertificateManagementApplyConfiguration { - b.Mode = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *PKICertificateManagementApplyConfiguration) WithCustom(value *CustomPKIPolicyApplyConfiguration) *PKICertificateManagementApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkiprofile.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkiprofile.go deleted file mode 100644 index 735b7ca1d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkiprofile.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// PKIProfileApplyConfiguration represents a declarative configuration of the PKIProfile type for use -// with apply. -// -// PKIProfile defines the certificate generation parameters that OpenShift -// components use to create certificates. Category overrides take precedence -// over defaults. -type PKIProfileApplyConfiguration struct { - // defaults specifies the default certificate configuration that applies - // to all certificates unless overridden by a category override. - Defaults *DefaultCertificateConfigApplyConfiguration `json:"defaults,omitempty"` - // signerCertificates optionally overrides certificate parameters for - // certificate authority (CA) certificates that sign other certificates. - // When set, these parameters take precedence over defaults for all signer certificates. - // When omitted, the defaults are used for signer certificates. - SignerCertificates *CertificateConfigApplyConfiguration `json:"signerCertificates,omitempty"` - // servingCertificates optionally overrides certificate parameters for - // TLS server certificates used to serve HTTPS endpoints. - // When set, these parameters take precedence over defaults for all serving certificates. - // When omitted, the defaults are used for serving certificates. - ServingCertificates *CertificateConfigApplyConfiguration `json:"servingCertificates,omitempty"` - // clientCertificates optionally overrides certificate parameters for - // client authentication certificates used to authenticate to servers. - // When set, these parameters take precedence over defaults for all client certificates. - // When omitted, the defaults are used for client certificates. - ClientCertificates *CertificateConfigApplyConfiguration `json:"clientCertificates,omitempty"` -} - -// PKIProfileApplyConfiguration constructs a declarative configuration of the PKIProfile type for use with -// apply. -func PKIProfile() *PKIProfileApplyConfiguration { - return &PKIProfileApplyConfiguration{} -} - -// WithDefaults sets the Defaults field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Defaults field is set to the value of the last call. -func (b *PKIProfileApplyConfiguration) WithDefaults(value *DefaultCertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration { - b.Defaults = value - return b -} - -// WithSignerCertificates sets the SignerCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SignerCertificates field is set to the value of the last call. -func (b *PKIProfileApplyConfiguration) WithSignerCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration { - b.SignerCertificates = value - return b -} - -// WithServingCertificates sets the ServingCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServingCertificates field is set to the value of the last call. -func (b *PKIProfileApplyConfiguration) WithServingCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration { - b.ServingCertificates = value - return b -} - -// WithClientCertificates sets the ClientCertificates field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCertificates field is set to the value of the last call. -func (b *PKIProfileApplyConfiguration) WithClientCertificates(value *CertificateConfigApplyConfiguration) *PKIProfileApplyConfiguration { - b.ClientCertificates = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkispec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkispec.go deleted file mode 100644 index 3158b96c7..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/pkispec.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// PKISpecApplyConfiguration represents a declarative configuration of the PKISpec type for use -// with apply. -// -// PKISpec holds the specification for PKI configuration. -type PKISpecApplyConfiguration struct { - // certificateManagement specifies how PKI configuration is managed for internally-generated certificates. - // This controls the certificate generation approach for all OpenShift components that create - // certificates internally, including certificate authorities, serving certificates, and client certificates. - CertificateManagement *PKICertificateManagementApplyConfiguration `json:"certificateManagement,omitempty"` -} - -// PKISpecApplyConfiguration constructs a declarative configuration of the PKISpec type for use with -// apply. -func PKISpec() *PKISpecApplyConfiguration { - return &PKISpecApplyConfiguration{} -} - -// WithCertificateManagement sets the CertificateManagement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CertificateManagement field is set to the value of the last call. -func (b *PKISpecApplyConfiguration) WithCertificateManagement(value *PKICertificateManagementApplyConfiguration) *PKISpecApplyConfiguration { - b.CertificateManagement = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusconfig.go deleted file mode 100644 index 2565d5e49..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusconfig.go +++ /dev/null @@ -1,282 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// PrometheusConfigApplyConfiguration represents a declarative configuration of the PrometheusConfig type for use -// with apply. -// -// PrometheusConfig provides configuration options for the Prometheus instance. -// Use this configuration to control -// Prometheus deployment, pod scheduling, resource allocation, retention policies, and external integrations. -type PrometheusConfigApplyConfiguration struct { - // additionalAlertmanagerConfigs configures additional Alertmanager instances that receive alerts from - // the Prometheus component. This is useful for organizations that need to: - // - Send alerts to external monitoring systems (like PagerDuty, Slack, or custom webhooks) - // - Route different types of alerts to different teams or systems - // - Integrate with existing enterprise alerting infrastructure - // - Maintain separate alert routing for compliance or organizational requirements - // When omitted, no additional Alertmanager instances are configured (default behavior). - // When provided, at least one configuration must be specified (minimum 1, maximum 10 items). - // Entries must have unique names (name is the list key). - AdditionalAlertmanagerConfigs []AdditionalAlertmanagerConfigApplyConfiguration `json:"additionalAlertmanagerConfigs,omitempty"` - // enforcedBodySizeLimitBytes enforces a body size limit (in bytes) for Prometheus scraped metrics. - // If a scraped target's body response is larger than the limit, the scrape will fail. - // This helps protect Prometheus from targets that return excessively large responses. - // The value is specified in bytes (e.g., 4194304 for 4MB, 1073741824 for 1GB). - // When omitted, the Cluster Monitoring Operator automatically calculates an appropriate - // limit based on cluster capacity. Set an explicit value to override the automatic calculation. - // Minimum value is 10240 (10kB). - // Maximum value is 1073741824 (1GB). - EnforcedBodySizeLimitBytes *int64 `json:"enforcedBodySizeLimitBytes,omitempty"` - // externalLabels defines labels to be attached to time series and alerts - // when communicating with external systems such as federation, remote storage, - // and Alertmanager. These labels are not stored with metrics on disk; they are - // only added when data leaves Prometheus (e.g., during federation queries, - // remote write, or alert notifications). - // At least 1 label must be specified when set, with a maximum of 50 labels allowed. - // Each label key must be unique within this list. - // When omitted, no external labels are applied. - ExternalLabels []LabelApplyConfiguration `json:"externalLabels,omitempty"` - // logLevel defines the verbosity of logs emitted by Prometheus. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - LogLevel *configv1alpha1.LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least one key-value pair (minimum of 1) - // and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // queryLogFile specifies the file to which PromQL queries are logged. - // This setting can be either a filename, in which - // case the queries are saved to an `emptyDir` volume - // at `/var/log/prometheus`, or a full path to a location where - // an `emptyDir` volume will be mounted and the queries saved. - // Writing to `/dev/stderr`, `/dev/stdout` or `/dev/null` is supported, but - // writing to any other `/dev/` path is not supported. Relative paths are - // also not supported. - // By default, PromQL queries are not logged. - // Must be an absolute path starting with `/` or a simple filename without path separators. - // Must not contain consecutive slashes, end with a slash, or include '..' path traversal. - // Must contain only alphanumeric characters, '.', '_', '-', or '/'. - // Must be between 1 and 255 characters in length. - QueryLogFile *string `json:"queryLogFile,omitempty"` - // remoteWrite defines the remote write configuration, including URL, authentication, and relabeling settings. - // Remote write allows Prometheus to send metrics it collects to external long-term storage systems. - // When omitted, no remote write endpoints are configured. - // When provided, at least one configuration must be specified (minimum 1, maximum 10 items). - // Entries must have unique names (name is the list key). - RemoteWrite []RemoteWriteSpecApplyConfiguration `json:"remoteWrite,omitempty"` - // resources defines the compute resource requests and limits for the Prometheus container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // retention configures how long Prometheus retains metrics data and how much storage it can use. - // When omitted, the platform chooses reasonable defaults (currently 15d retention, no size limit). - Retention *RetentionApplyConfiguration `json:"retention,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10 - // Minimum length for this list is 1 - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Prometheus Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1 - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` - // collectionProfile defines the metrics collection profile that Prometheus uses to collect - // metrics from the platform components. Supported values are `Full` or - // `Minimal`. In the `Full` profile (default), Prometheus collects all - // metrics that are exposed by the platform components. In the `Minimal` - // profile, Prometheus only collects metrics necessary for the default - // platform alerts, recording rules, telemetry and console dashboards. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is `Full`. - CollectionProfile *configv1alpha1.CollectionProfile `json:"collectionProfile,omitempty"` - // volumeClaimTemplate defines persistent storage for Prometheus. Use this setting to - // configure the persistent volume claim, including storage class and volume size. - // If omitted, the Pod uses ephemeral storage and Prometheus data will not persist - // across restarts. - VolumeClaimTemplate *v1.PersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` -} - -// PrometheusConfigApplyConfiguration constructs a declarative configuration of the PrometheusConfig type for use with -// apply. -func PrometheusConfig() *PrometheusConfigApplyConfiguration { - return &PrometheusConfigApplyConfiguration{} -} - -// WithAdditionalAlertmanagerConfigs adds the given value to the AdditionalAlertmanagerConfigs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalAlertmanagerConfigs field. -func (b *PrometheusConfigApplyConfiguration) WithAdditionalAlertmanagerConfigs(values ...*AdditionalAlertmanagerConfigApplyConfiguration) *PrometheusConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalAlertmanagerConfigs") - } - b.AdditionalAlertmanagerConfigs = append(b.AdditionalAlertmanagerConfigs, *values[i]) - } - return b -} - -// WithEnforcedBodySizeLimitBytes sets the EnforcedBodySizeLimitBytes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EnforcedBodySizeLimitBytes field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithEnforcedBodySizeLimitBytes(value int64) *PrometheusConfigApplyConfiguration { - b.EnforcedBodySizeLimitBytes = &value - return b -} - -// WithExternalLabels adds the given value to the ExternalLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ExternalLabels field. -func (b *PrometheusConfigApplyConfiguration) WithExternalLabels(values ...*LabelApplyConfiguration) *PrometheusConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithExternalLabels") - } - b.ExternalLabels = append(b.ExternalLabels, *values[i]) - } - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithLogLevel(value configv1alpha1.LogLevel) *PrometheusConfigApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *PrometheusConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *PrometheusConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithQueryLogFile sets the QueryLogFile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the QueryLogFile field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithQueryLogFile(value string) *PrometheusConfigApplyConfiguration { - b.QueryLogFile = &value - return b -} - -// WithRemoteWrite adds the given value to the RemoteWrite field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the RemoteWrite field. -func (b *PrometheusConfigApplyConfiguration) WithRemoteWrite(values ...*RemoteWriteSpecApplyConfiguration) *PrometheusConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRemoteWrite") - } - b.RemoteWrite = append(b.RemoteWrite, *values[i]) - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *PrometheusConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *PrometheusConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithRetention sets the Retention field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Retention field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithRetention(value *RetentionApplyConfiguration) *PrometheusConfigApplyConfiguration { - b.Retention = value - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *PrometheusConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *PrometheusConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *PrometheusConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *PrometheusConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} - -// WithCollectionProfile sets the CollectionProfile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CollectionProfile field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithCollectionProfile(value configv1alpha1.CollectionProfile) *PrometheusConfigApplyConfiguration { - b.CollectionProfile = &value - return b -} - -// WithVolumeClaimTemplate sets the VolumeClaimTemplate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VolumeClaimTemplate field is set to the value of the last call. -func (b *PrometheusConfigApplyConfiguration) WithVolumeClaimTemplate(value v1.PersistentVolumeClaim) *PrometheusConfigApplyConfiguration { - b.VolumeClaimTemplate = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatoradmissionwebhookconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatoradmissionwebhookconfig.go deleted file mode 100644 index 9eadb023e..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatoradmissionwebhookconfig.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// PrometheusOperatorAdmissionWebhookConfigApplyConfiguration represents a declarative configuration of the PrometheusOperatorAdmissionWebhookConfig type for use -// with apply. -// -// PrometheusOperatorAdmissionWebhookConfig provides configuration options for the admission webhook -// component of Prometheus Operator that runs in the `openshift-monitoring` namespace. The admission -// webhook validates PrometheusRule and AlertmanagerConfig objects, mutates PrometheusRule annotations, -// and converts AlertmanagerConfig objects between API versions. -type PrometheusOperatorAdmissionWebhookConfigApplyConfiguration struct { - // resources defines the compute resource requests and limits for the - // prometheus-operator-admission-webhook container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 5m - // limit: null - // - name: memory - // request: 30Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // topologySpreadConstraints defines rules for how admission webhook Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// PrometheusOperatorAdmissionWebhookConfigApplyConfiguration constructs a declarative configuration of the PrometheusOperatorAdmissionWebhookConfig type for use with -// apply. -func PrometheusOperatorAdmissionWebhookConfig() *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration { - return &PrometheusOperatorAdmissionWebhookConfigApplyConfiguration{} -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *PrometheusOperatorAdmissionWebhookConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatorconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatorconfig.go deleted file mode 100644 index a0bac703d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusoperatorconfig.go +++ /dev/null @@ -1,136 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// PrometheusOperatorConfigApplyConfiguration represents a declarative configuration of the PrometheusOperatorConfig type for use -// with apply. -// -// PrometheusOperatorConfig provides configuration options for the Prometheus Operator instance -// Use this configuration to control how the Prometheus Operator instance is deployed, how it logs, and how its pods are scheduled. -type PrometheusOperatorConfigApplyConfiguration struct { - // logLevel defines the verbosity of logs emitted by Prometheus Operator. - // This field allows users to control the amount and severity of logs generated, which can be useful - // for debugging issues or reducing noise in production environments. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - LogLevel *configv1alpha1.LogLevel `json:"logLevel,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Prometheus Operator container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 4m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Prometheus Operator Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// PrometheusOperatorConfigApplyConfiguration constructs a declarative configuration of the PrometheusOperatorConfig type for use with -// apply. -func PrometheusOperatorConfig() *PrometheusOperatorConfigApplyConfiguration { - return &PrometheusOperatorConfigApplyConfiguration{} -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *PrometheusOperatorConfigApplyConfiguration) WithLogLevel(value configv1alpha1.LogLevel) *PrometheusOperatorConfigApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *PrometheusOperatorConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *PrometheusOperatorConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *PrometheusOperatorConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *PrometheusOperatorConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *PrometheusOperatorConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *PrometheusOperatorConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *PrometheusOperatorConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *PrometheusOperatorConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusremotewriteheader.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusremotewriteheader.go deleted file mode 100644 index 53e21d1f9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/prometheusremotewriteheader.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// PrometheusRemoteWriteHeaderApplyConfiguration represents a declarative configuration of the PrometheusRemoteWriteHeader type for use -// with apply. -// -// PrometheusRemoteWriteHeader defines a custom HTTP header for remote write requests. -// The header name must not be one of the reserved headers set by Prometheus (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate). -// Header names must contain only case-insensitive alphanumeric characters, hyphens (-), and underscores (_); other characters (e.g. emoji) are rejected by validation. -// Validation is enforced on the Headers field in RemoteWriteSpec. -type PrometheusRemoteWriteHeaderApplyConfiguration struct { - // name is the HTTP header name. Must not be a reserved header (see type documentation). - // Must contain only alphanumeric characters, hyphens, and underscores; invalid characters are rejected. Must be between 1 and 256 characters. - Name *string `json:"name,omitempty"` - // value is the HTTP header value. Must be at most 4096 characters. - Value *string `json:"value,omitempty"` -} - -// PrometheusRemoteWriteHeaderApplyConfiguration constructs a declarative configuration of the PrometheusRemoteWriteHeader type for use with -// apply. -func PrometheusRemoteWriteHeader() *PrometheusRemoteWriteHeaderApplyConfiguration { - return &PrometheusRemoteWriteHeaderApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PrometheusRemoteWriteHeaderApplyConfiguration) WithName(value string) *PrometheusRemoteWriteHeaderApplyConfiguration { - b.Name = &value - return b -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *PrometheusRemoteWriteHeaderApplyConfiguration) WithValue(value string) *PrometheusRemoteWriteHeaderApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/queueconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/queueconfig.go deleted file mode 100644 index a24ff44ac..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/queueconfig.go +++ /dev/null @@ -1,129 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// QueueConfigApplyConfiguration represents a declarative configuration of the QueueConfig type for use -// with apply. -// -// QueueConfig allows tuning configuration for remote write queue parameters. -// Configure this when you need to control throughput, backpressure, or retry behavior—for example to avoid overloading the remote endpoint, to reduce memory usage, or to tune for high-cardinality workloads. Consider capacity, maxShards, and batchSendDeadlineSeconds for throughput; minBackoffMilliseconds and maxBackoffMilliseconds for retries; and rateLimitedAction when the remote returns HTTP 429. -type QueueConfigApplyConfiguration struct { - // capacity is the number of samples to buffer per shard before we start dropping them. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 10000. - // Minimum value is 1. - // Maximum value is 1000000. - Capacity *int32 `json:"capacity,omitempty"` - // maxShards is the maximum number of shards, i.e. amount of concurrency. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 200. - // Minimum value is 1. - // Maximum value is 10000. - MaxShards *int32 `json:"maxShards,omitempty"` - // minShards is the minimum number of shards, i.e. amount of concurrency. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 1. - // Minimum value is 1. - // Maximum value is 10000. - MinShards *int32 `json:"minShards,omitempty"` - // maxSamplesPerSend is the maximum number of samples per send. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is 1000. - // Minimum value is 1. - // Maximum value is 100000. - MaxSamplesPerSend *int32 `json:"maxSamplesPerSend,omitempty"` - // batchSendDeadlineSeconds is the maximum time in seconds a sample will wait in buffer before being sent. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 second. - // Maximum value is 3600 seconds (1 hour). - BatchSendDeadlineSeconds *int32 `json:"batchSendDeadlineSeconds,omitempty"` - // minBackoffMilliseconds is the minimum retry delay in milliseconds. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 millisecond. - // Maximum value is 3600000 milliseconds (1 hour). - MinBackoffMilliseconds *int32 `json:"minBackoffMilliseconds,omitempty"` - // maxBackoffMilliseconds is the maximum retry delay in milliseconds. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 millisecond. - // Maximum value is 3600000 milliseconds (1 hour). - MaxBackoffMilliseconds *int32 `json:"maxBackoffMilliseconds,omitempty"` - // rateLimitedAction controls what to do when the remote write endpoint returns HTTP 429 (Too Many Requests). - // When omitted, no retries are performed on rate limit responses. - // When set to "Retry", Prometheus will retry such requests using the backoff settings above. - // Valid value when set is "Retry". - RateLimitedAction *configv1alpha1.RateLimitedAction `json:"rateLimitedAction,omitempty"` -} - -// QueueConfigApplyConfiguration constructs a declarative configuration of the QueueConfig type for use with -// apply. -func QueueConfig() *QueueConfigApplyConfiguration { - return &QueueConfigApplyConfiguration{} -} - -// WithCapacity sets the Capacity field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Capacity field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithCapacity(value int32) *QueueConfigApplyConfiguration { - b.Capacity = &value - return b -} - -// WithMaxShards sets the MaxShards field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxShards field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithMaxShards(value int32) *QueueConfigApplyConfiguration { - b.MaxShards = &value - return b -} - -// WithMinShards sets the MinShards field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinShards field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithMinShards(value int32) *QueueConfigApplyConfiguration { - b.MinShards = &value - return b -} - -// WithMaxSamplesPerSend sets the MaxSamplesPerSend field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxSamplesPerSend field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithMaxSamplesPerSend(value int32) *QueueConfigApplyConfiguration { - b.MaxSamplesPerSend = &value - return b -} - -// WithBatchSendDeadlineSeconds sets the BatchSendDeadlineSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BatchSendDeadlineSeconds field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithBatchSendDeadlineSeconds(value int32) *QueueConfigApplyConfiguration { - b.BatchSendDeadlineSeconds = &value - return b -} - -// WithMinBackoffMilliseconds sets the MinBackoffMilliseconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinBackoffMilliseconds field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithMinBackoffMilliseconds(value int32) *QueueConfigApplyConfiguration { - b.MinBackoffMilliseconds = &value - return b -} - -// WithMaxBackoffMilliseconds sets the MaxBackoffMilliseconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxBackoffMilliseconds field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithMaxBackoffMilliseconds(value int32) *QueueConfigApplyConfiguration { - b.MaxBackoffMilliseconds = &value - return b -} - -// WithRateLimitedAction sets the RateLimitedAction field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RateLimitedAction field is set to the value of the last call. -func (b *QueueConfigApplyConfiguration) WithRateLimitedAction(value configv1alpha1.RateLimitedAction) *QueueConfigApplyConfiguration { - b.RateLimitedAction = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelactionconfig.go deleted file mode 100644 index cfcfc7b5c..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelactionconfig.go +++ /dev/null @@ -1,135 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// RelabelActionConfigApplyConfiguration represents a declarative configuration of the RelabelActionConfig type for use -// with apply. -// -// RelabelActionConfig represents the action to perform and its configuration. -// Exactly one action-specific configuration must be specified based on the action type. -type RelabelActionConfigApplyConfiguration struct { - // type specifies the action to perform on the matched labels. - // Allowed values are Replace, Lowercase, Uppercase, Keep, Drop, KeepEqual, DropEqual, HashMod, LabelMap, LabelDrop, LabelKeep. - // - // When set to Replace, regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. If regex does not match, no replacement takes place. - // - // When set to Lowercase, the concatenated source_labels are mapped to their lower case. Requires Prometheus >= v2.36.0. - // - // When set to Uppercase, the concatenated source_labels are mapped to their upper case. Requires Prometheus >= v2.36.0. - // - // When set to Keep, targets for which regex does not match the concatenated source_labels are dropped. - // - // When set to Drop, targets for which regex matches the concatenated source_labels are dropped. - // - // When set to KeepEqual, targets for which the concatenated source_labels do not match target_label are dropped. Requires Prometheus >= v2.41.0. - // - // When set to DropEqual, targets for which the concatenated source_labels do match target_label are dropped. Requires Prometheus >= v2.41.0. - // - // When set to HashMod, target_label is set to the modulus of a hash of the concatenated source_labels. - // - // When set to LabelMap, regex is matched against all source label names (not just source_labels); matching label values are copied to new names given by replacement with ${1}, ${2}, ... substituted. - // - // When set to LabelDrop, regex is matched against all label names; any label that matches is removed. - // - // When set to LabelKeep, regex is matched against all label names; any label that does not match is removed. - Type *configv1alpha1.RelabelAction `json:"type,omitempty"` - // replace configures the Replace action. - // Required when type is Replace, and forbidden otherwise. - Replace *ReplaceActionConfigApplyConfiguration `json:"replace,omitempty"` - // hashMod configures the HashMod action. - // Required when type is HashMod, and forbidden otherwise. - HashMod *HashModActionConfigApplyConfiguration `json:"hashMod,omitempty"` - // labelMap configures the LabelMap action. - // Required when type is LabelMap, and forbidden otherwise. - LabelMap *LabelMapActionConfigApplyConfiguration `json:"labelMap,omitempty"` - // lowercase configures the Lowercase action. - // Required when type is Lowercase, and forbidden otherwise. - // Requires Prometheus >= v2.36.0. - Lowercase *LowercaseActionConfigApplyConfiguration `json:"lowercase,omitempty"` - // uppercase configures the Uppercase action. - // Required when type is Uppercase, and forbidden otherwise. - // Requires Prometheus >= v2.36.0. - Uppercase *UppercaseActionConfigApplyConfiguration `json:"uppercase,omitempty"` - // keepEqual configures the KeepEqual action. - // Required when type is KeepEqual, and forbidden otherwise. - // Requires Prometheus >= v2.41.0. - KeepEqual *KeepEqualActionConfigApplyConfiguration `json:"keepEqual,omitempty"` - // dropEqual configures the DropEqual action. - // Required when type is DropEqual, and forbidden otherwise. - // Requires Prometheus >= v2.41.0. - DropEqual *DropEqualActionConfigApplyConfiguration `json:"dropEqual,omitempty"` -} - -// RelabelActionConfigApplyConfiguration constructs a declarative configuration of the RelabelActionConfig type for use with -// apply. -func RelabelActionConfig() *RelabelActionConfigApplyConfiguration { - return &RelabelActionConfigApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithType(value configv1alpha1.RelabelAction) *RelabelActionConfigApplyConfiguration { - b.Type = &value - return b -} - -// WithReplace sets the Replace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Replace field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithReplace(value *ReplaceActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.Replace = value - return b -} - -// WithHashMod sets the HashMod field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HashMod field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithHashMod(value *HashModActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.HashMod = value - return b -} - -// WithLabelMap sets the LabelMap field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LabelMap field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithLabelMap(value *LabelMapActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.LabelMap = value - return b -} - -// WithLowercase sets the Lowercase field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Lowercase field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithLowercase(value *LowercaseActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.Lowercase = value - return b -} - -// WithUppercase sets the Uppercase field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Uppercase field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithUppercase(value *UppercaseActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.Uppercase = value - return b -} - -// WithKeepEqual sets the KeepEqual field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KeepEqual field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithKeepEqual(value *KeepEqualActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.KeepEqual = value - return b -} - -// WithDropEqual sets the DropEqual field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DropEqual field is set to the value of the last call. -func (b *RelabelActionConfigApplyConfiguration) WithDropEqual(value *DropEqualActionConfigApplyConfiguration) *RelabelActionConfigApplyConfiguration { - b.DropEqual = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelconfig.go deleted file mode 100644 index efe191727..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/relabelconfig.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RelabelConfigApplyConfiguration represents a declarative configuration of the RelabelConfig type for use -// with apply. -// -// RelabelConfig represents a relabeling rule. -type RelabelConfigApplyConfiguration struct { - // name is a unique identifier for this relabel configuration. - // Must contain only alphanumeric characters, hyphens, and underscores. - // Must be between 1 and 63 characters in length. - Name *string `json:"name,omitempty"` - // sourceLabels specifies which label names to extract from each series for this relabeling rule. - // The values of these labels are joined together using the configured separator, - // and the resulting string is then matched against the regular expression. - // If a referenced label does not exist on a series, Prometheus substitutes an empty string. - // When omitted, the rule operates without extracting source labels (useful for actions like labelmap). - // Minimum of 1 and maximum of 10 source labels can be specified, each between 1 and 128 characters. - // Each entry must be unique. - // Label names beginning with "__" (two underscores) are reserved for internal Prometheus use and are not allowed. - // Label names SHOULD start with a letter (a-z, A-Z) or underscore (_), followed by zero or more letters, digits (0-9), or underscores for best compatibility. - // While Prometheus supports UTF-8 characters in label names (since v3.0.0), using the recommended character set - // ensures better compatibility with the wider ecosystem (tooling, third-party instrumentation, etc.). - SourceLabels []string `json:"sourceLabels,omitempty"` - // separator is the character sequence used to join source label values. - // Common examples: ";", ",", "::", "|||". - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is ";". - // Must be between 1 and 5 characters in length when specified. - Separator *string `json:"separator,omitempty"` - // regex is the regular expression to match against the concatenated source label values. - // Must be a valid RE2 regular expression (https://github.com/google/re2/wiki/Syntax). - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is "(.*)" to match everything. - // Must be between 1 and 1000 characters in length when specified. - Regex *string `json:"regex,omitempty"` - // action defines the action to perform on the matched labels and its configuration. - // Exactly one action-specific configuration must be specified based on the action type. - Action *RelabelActionConfigApplyConfiguration `json:"action,omitempty"` -} - -// RelabelConfigApplyConfiguration constructs a declarative configuration of the RelabelConfig type for use with -// apply. -func RelabelConfig() *RelabelConfigApplyConfiguration { - return &RelabelConfigApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *RelabelConfigApplyConfiguration) WithName(value string) *RelabelConfigApplyConfiguration { - b.Name = &value - return b -} - -// WithSourceLabels adds the given value to the SourceLabels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the SourceLabels field. -func (b *RelabelConfigApplyConfiguration) WithSourceLabels(values ...string) *RelabelConfigApplyConfiguration { - for i := range values { - b.SourceLabels = append(b.SourceLabels, values[i]) - } - return b -} - -// WithSeparator sets the Separator field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Separator field is set to the value of the last call. -func (b *RelabelConfigApplyConfiguration) WithSeparator(value string) *RelabelConfigApplyConfiguration { - b.Separator = &value - return b -} - -// WithRegex sets the Regex field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Regex field is set to the value of the last call. -func (b *RelabelConfigApplyConfiguration) WithRegex(value string) *RelabelConfigApplyConfiguration { - b.Regex = &value - return b -} - -// WithAction sets the Action field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Action field is set to the value of the last call. -func (b *RelabelConfigApplyConfiguration) WithAction(value *RelabelActionConfigApplyConfiguration) *RelabelConfigApplyConfiguration { - b.Action = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go deleted file mode 100644 index e9b07674d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go +++ /dev/null @@ -1,88 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// RemoteWriteAuthorizationApplyConfiguration represents a declarative configuration of the RemoteWriteAuthorization type for use -// with apply. -// -// RemoteWriteAuthorization defines the authorization method for a remote write endpoint. -// Nested config requirements depend on the type discriminator: Authorization requires authorization, -// BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs. -type RemoteWriteAuthorizationApplyConfiguration struct { - // type specifies the authorization method to use. - // Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount. - // - // When set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field. - // - // When set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set. - // - // When set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set. - // - // When set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set. - // - // When set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path. - Type *configv1alpha1.RemoteWriteAuthorizationType `json:"type,omitempty"` - // authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). - // Required when type is "Authorization", and forbidden otherwise. - // The secret must exist in the openshift-monitoring namespace. - Authorization *SecretKeySelectorApplyConfiguration `json:"authorization,omitempty"` - // basicAuth defines HTTP basic authentication credentials. - // Required when type is "BasicAuth", and forbidden otherwise. - BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"` - // oauth2 defines OAuth2 client credentials authentication. - // Required when type is "OAuth2", and forbidden otherwise. - OAuth2 *OAuth2ApplyConfiguration `json:"oauth2,omitempty"` - // sigv4 defines AWS Signature Version 4 authentication. - // Required when type is "SigV4", and forbidden otherwise. - Sigv4 *Sigv4ApplyConfiguration `json:"sigv4,omitempty"` -} - -// RemoteWriteAuthorizationApplyConfiguration constructs a declarative configuration of the RemoteWriteAuthorization type for use with -// apply. -func RemoteWriteAuthorization() *RemoteWriteAuthorizationApplyConfiguration { - return &RemoteWriteAuthorizationApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithType(value configv1alpha1.RemoteWriteAuthorizationType) *RemoteWriteAuthorizationApplyConfiguration { - b.Type = &value - return b -} - -// WithAuthorization sets the Authorization field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Authorization field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithAuthorization(value *SecretKeySelectorApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { - b.Authorization = value - return b -} - -// WithBasicAuth sets the BasicAuth field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BasicAuth field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithBasicAuth(value *BasicAuthApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { - b.BasicAuth = value - return b -} - -// WithOAuth2 sets the OAuth2 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OAuth2 field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithOAuth2(value *OAuth2ApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { - b.OAuth2 = value - return b -} - -// WithSigv4 sets the Sigv4 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Sigv4 field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithSigv4(value *Sigv4ApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { - b.Sigv4 = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go deleted file mode 100644 index 07c4b1e15..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/remotewritespec.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// RemoteWriteSpecApplyConfiguration represents a declarative configuration of the RemoteWriteSpec type for use -// with apply. -// -// RemoteWriteSpec represents configuration for remote write endpoints. -type RemoteWriteSpecApplyConfiguration struct { - // url is the URL of the remote write endpoint. - // Must be a valid URL with http or https scheme and a non-empty hostname. - // Query parameters, fragments, and user information (e.g. user:password@host) are not allowed. - // Empty string is invalid. Must be between 1 and 2048 characters in length. - URL *string `json:"url,omitempty"` - // name is a required identifier for this remote write configuration (name is the list key for the remoteWrite list). - // This name is used in metrics and logging to differentiate remote write queues. - // Must contain only alphanumeric characters, hyphens, and underscores. - // Must be between 1 and 63 characters in length. - Name *string `json:"name,omitempty"` - // authorization defines the authorization method for the remote write endpoint. - // When omitted, no authorization is performed. - // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). - AuthorizationConfig *RemoteWriteAuthorizationApplyConfiguration `json:"authorization,omitempty"` - // headers specifies the custom HTTP headers to be sent along with each remote write request. - // Sending custom headers makes the configuration of a proxy in between optional and helps the - // receiver recognize the given source better. - // Clients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure - // them in such a way as to send reserved headers. Headers set by Prometheus cannot be overwritten. - // When omitted, no custom headers are sent. - // Maximum of 50 headers can be specified. Each header name must be unique. - // Each header name must contain only alphanumeric characters, hyphens, and underscores, and must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate). - Headers []PrometheusRemoteWriteHeaderApplyConfiguration `json:"headers,omitempty"` - // metadataConfig configures the sending of series metadata to remote storage. - // When omitted, no metadata is sent. - // When set to sendPolicy: Default, metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). - // When set to sendPolicy: Custom, metadata is sent using the settings in the custom field (e.g. custom.sendIntervalSeconds). - MetadataConfig *MetadataConfigApplyConfiguration `json:"metadataConfig,omitempty"` - // proxyUrl defines an optional proxy URL. - // If the cluster-wide proxy is enabled, it replaces the proxyUrl setting. - // The cluster-wide proxy supports both HTTP and HTTPS proxies, with HTTPS taking precedence. - // When omitted, no proxy is used. - // Must be a valid URL with http or https scheme. - // Must be between 1 and 2048 characters in length. - ProxyURL *string `json:"proxyUrl,omitempty"` - // queueConfig allows tuning configuration for remote write queue parameters. - // When omitted, default queue configuration is used. - QueueConfig *QueueConfigApplyConfiguration `json:"queueConfig,omitempty"` - // remoteTimeoutSeconds defines the timeout in seconds for requests to the remote write endpoint. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // Minimum value is 1 second. - // Maximum value is 600 seconds (10 minutes). - RemoteTimeoutSeconds *int32 `json:"remoteTimeoutSeconds,omitempty"` - // exemplarsMode controls whether exemplars are sent via remote write. - // Valid values are "Send", "DoNotSend" and omitted. - // When set to "Send", Prometheus is configured to store a maximum of 100,000 exemplars in memory and send them with remote write. - // Note that this setting only applies to user-defined monitoring. It is not applicable to default in-cluster monitoring. - // When omitted or set to "DoNotSend", exemplars are not sent. - ExemplarsMode *configv1alpha1.ExemplarsMode `json:"exemplarsMode,omitempty"` - // tlsConfig defines TLS authentication settings for the remote write endpoint. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - TLSConfig *TLSConfigApplyConfiguration `json:"tlsConfig,omitempty"` - // writeRelabelConfigs is a list of relabeling rules to apply before sending data to the remote endpoint. - // When omitted, no relabeling is performed and all metrics are sent as-is. - // Minimum of 1 and maximum of 10 relabeling rules can be specified. - // Each rule must have a unique name. - WriteRelabelConfigs []RelabelConfigApplyConfiguration `json:"writeRelabelConfigs,omitempty"` -} - -// RemoteWriteSpecApplyConfiguration constructs a declarative configuration of the RemoteWriteSpec type for use with -// apply. -func RemoteWriteSpec() *RemoteWriteSpecApplyConfiguration { - return &RemoteWriteSpecApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithURL(value string) *RemoteWriteSpecApplyConfiguration { - b.URL = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithName(value string) *RemoteWriteSpecApplyConfiguration { - b.Name = &value - return b -} - -// WithAuthorizationConfig sets the AuthorizationConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AuthorizationConfig field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithAuthorizationConfig(value *RemoteWriteAuthorizationApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - b.AuthorizationConfig = value - return b -} - -// WithHeaders adds the given value to the Headers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Headers field. -func (b *RemoteWriteSpecApplyConfiguration) WithHeaders(values ...*PrometheusRemoteWriteHeaderApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHeaders") - } - b.Headers = append(b.Headers, *values[i]) - } - return b -} - -// WithMetadataConfig sets the MetadataConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MetadataConfig field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithMetadataConfig(value *MetadataConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - b.MetadataConfig = value - return b -} - -// WithProxyURL sets the ProxyURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProxyURL field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithProxyURL(value string) *RemoteWriteSpecApplyConfiguration { - b.ProxyURL = &value - return b -} - -// WithQueueConfig sets the QueueConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the QueueConfig field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithQueueConfig(value *QueueConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - b.QueueConfig = value - return b -} - -// WithRemoteTimeoutSeconds sets the RemoteTimeoutSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RemoteTimeoutSeconds field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithRemoteTimeoutSeconds(value int32) *RemoteWriteSpecApplyConfiguration { - b.RemoteTimeoutSeconds = &value - return b -} - -// WithExemplarsMode sets the ExemplarsMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExemplarsMode field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithExemplarsMode(value configv1alpha1.ExemplarsMode) *RemoteWriteSpecApplyConfiguration { - b.ExemplarsMode = &value - return b -} - -// WithTLSConfig sets the TLSConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSConfig field is set to the value of the last call. -func (b *RemoteWriteSpecApplyConfiguration) WithTLSConfig(value *TLSConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - b.TLSConfig = value - return b -} - -// WithWriteRelabelConfigs adds the given value to the WriteRelabelConfigs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the WriteRelabelConfigs field. -func (b *RemoteWriteSpecApplyConfiguration) WithWriteRelabelConfigs(values ...*RelabelConfigApplyConfiguration) *RemoteWriteSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithWriteRelabelConfigs") - } - b.WriteRelabelConfigs = append(b.WriteRelabelConfigs, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/replaceactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/replaceactionconfig.go deleted file mode 100644 index 7b9766c11..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/replaceactionconfig.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// ReplaceActionConfigApplyConfiguration represents a declarative configuration of the ReplaceActionConfig type for use -// with apply. -// -// ReplaceActionConfig configures the Replace action. -// Regex is matched against the concatenated source_labels; target_label is set to replacement with match group references (${1}, ${2}, ...) substituted. No replacement if regex does not match. -type ReplaceActionConfigApplyConfiguration struct { - // targetLabel is the label name where the replacement result is written. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` - // replacement is the value written to target_label when regex matches; match group references (${1}, ${2}, ...) are substituted. - // Required when using the Replace action so the intended behavior is explicit and the platform does not need to apply defaults. - // Use "$1" for the first capture group, "$2" for the second, etc. Use an empty string ("") to explicitly clear the target label value. - // Must be between 0 and 255 characters in length. - Replacement *string `json:"replacement,omitempty"` -} - -// ReplaceActionConfigApplyConfiguration constructs a declarative configuration of the ReplaceActionConfig type for use with -// apply. -func ReplaceActionConfig() *ReplaceActionConfigApplyConfiguration { - return &ReplaceActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *ReplaceActionConfigApplyConfiguration) WithTargetLabel(value string) *ReplaceActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} - -// WithReplacement sets the Replacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Replacement field is set to the value of the last call. -func (b *ReplaceActionConfigApplyConfiguration) WithReplacement(value string) *ReplaceActionConfigApplyConfiguration { - b.Replacement = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retention.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retention.go deleted file mode 100644 index 2c999b21d..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retention.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RetentionApplyConfiguration represents a declarative configuration of the Retention type for use -// with apply. -// -// Retention configures how long Prometheus retains metrics data and how much storage it can use. -type RetentionApplyConfiguration struct { - // duration is an optional field that specifies how long Prometheus retains metrics data. - // Valid values are Prometheus-style duration strings with unit suffixes y, w, d, h, m, s, or ms - // (for example, "15d", "24h", or "5d1h30m"). Each unit value must be a positive integer. - // Composite durations must follow the fixed unit order y, w, d, h, m, s, ms. - // Must be at least 1 character and at most 64 characters. - // When set to "0", time-based retention is disabled. This is the only supported form for disabling - // time-based retention; other zero-duration representations such as "0d", "0h", or "0y" are rejected. - // Prometheus automatically deletes data older than this duration. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is `15d`. - Duration *string `json:"duration,omitempty"` - // size is an optional field that specifies the maximum storage size that Prometheus - // can use for data blocks and the write-ahead log (WAL). - // Valid values are byte-size strings with an optional decimal prefix and a unit suffix B, KB, MB, GB, - // TB, EB, PB, or their binary equivalents KiB, MiB, GiB, TiB, EiB, PiB (for example, "500MiB", "10GiB"). - // The numeric value must be greater than zero. - // Must be at least 1 character and at most 32 characters. - // When set to "0", no size limit is enforced. This is the only supported form for disabling size-based - // retention; other zero-size representations such as "0B" or "0MiB" are rejected. - // When the limit is reached, Prometheus deletes oldest data first. - // When omitted, no size limit is enforced and Prometheus uses available PersistentVolume capacity. - Size *string `json:"size,omitempty"` -} - -// RetentionApplyConfiguration constructs a declarative configuration of the Retention type for use with -// apply. -func Retention() *RetentionApplyConfiguration { - return &RetentionApplyConfiguration{} -} - -// WithDuration sets the Duration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Duration field is set to the value of the last call. -func (b *RetentionApplyConfiguration) WithDuration(value string) *RetentionApplyConfiguration { - b.Duration = &value - return b -} - -// WithSize sets the Size field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Size field is set to the value of the last call. -func (b *RetentionApplyConfiguration) WithSize(value string) *RetentionApplyConfiguration { - b.Size = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionnumberconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionnumberconfig.go deleted file mode 100644 index 9e3994eb9..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionnumberconfig.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RetentionNumberConfigApplyConfiguration represents a declarative configuration of the RetentionNumberConfig type for use -// with apply. -// -// RetentionNumberConfig specifies the configuration of the retention policy on the number of backups -type RetentionNumberConfigApplyConfiguration struct { - // maxNumberOfBackups defines the maximum number of backups to retain. - // If the existing number of backups saved is equal to MaxNumberOfBackups then - // the oldest backup will be removed before a new backup is initiated. - MaxNumberOfBackups *int `json:"maxNumberOfBackups,omitempty"` -} - -// RetentionNumberConfigApplyConfiguration constructs a declarative configuration of the RetentionNumberConfig type for use with -// apply. -func RetentionNumberConfig() *RetentionNumberConfigApplyConfiguration { - return &RetentionNumberConfigApplyConfiguration{} -} - -// WithMaxNumberOfBackups sets the MaxNumberOfBackups field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxNumberOfBackups field is set to the value of the last call. -func (b *RetentionNumberConfigApplyConfiguration) WithMaxNumberOfBackups(value int) *RetentionNumberConfigApplyConfiguration { - b.MaxNumberOfBackups = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionpolicy.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionpolicy.go deleted file mode 100644 index c653590aa..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionpolicy.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// RetentionPolicyApplyConfiguration represents a declarative configuration of the RetentionPolicy type for use -// with apply. -// -// RetentionPolicy defines the retention policy for retaining and deleting existing backups. -// This struct is a discriminated union that allows users to select the type of retention policy from the supported types. -type RetentionPolicyApplyConfiguration struct { - // retentionType sets the type of retention policy. - // Currently, the only valid policies are retention by number of backups (RetentionNumber), by the size of backups (RetentionSize). More policies or types may be added in the future. - // Empty string means no opinion and the platform is left to choose a reasonable default which is subject to change without notice. - // The current default is RetentionNumber with 15 backups kept. - RetentionType *configv1alpha1.RetentionType `json:"retentionType,omitempty"` - // retentionNumber configures the retention policy based on the number of backups - RetentionNumber *RetentionNumberConfigApplyConfiguration `json:"retentionNumber,omitempty"` - // retentionSize configures the retention policy based on the size of backups - RetentionSize *RetentionSizeConfigApplyConfiguration `json:"retentionSize,omitempty"` -} - -// RetentionPolicyApplyConfiguration constructs a declarative configuration of the RetentionPolicy type for use with -// apply. -func RetentionPolicy() *RetentionPolicyApplyConfiguration { - return &RetentionPolicyApplyConfiguration{} -} - -// WithRetentionType sets the RetentionType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RetentionType field is set to the value of the last call. -func (b *RetentionPolicyApplyConfiguration) WithRetentionType(value configv1alpha1.RetentionType) *RetentionPolicyApplyConfiguration { - b.RetentionType = &value - return b -} - -// WithRetentionNumber sets the RetentionNumber field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RetentionNumber field is set to the value of the last call. -func (b *RetentionPolicyApplyConfiguration) WithRetentionNumber(value *RetentionNumberConfigApplyConfiguration) *RetentionPolicyApplyConfiguration { - b.RetentionNumber = value - return b -} - -// WithRetentionSize sets the RetentionSize field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RetentionSize field is set to the value of the last call. -func (b *RetentionPolicyApplyConfiguration) WithRetentionSize(value *RetentionSizeConfigApplyConfiguration) *RetentionPolicyApplyConfiguration { - b.RetentionSize = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionsizeconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionsizeconfig.go deleted file mode 100644 index 45b2eb8ae..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/retentionsizeconfig.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RetentionSizeConfigApplyConfiguration represents a declarative configuration of the RetentionSizeConfig type for use -// with apply. -// -// RetentionSizeConfig specifies the configuration of the retention policy on the total size of backups -type RetentionSizeConfigApplyConfiguration struct { - // maxSizeOfBackupsGb defines the total size in GB of backups to retain. - // If the current total size backups exceeds MaxSizeOfBackupsGb then - // the oldest backup will be removed before a new backup is initiated. - MaxSizeOfBackupsGb *int `json:"maxSizeOfBackupsGb,omitempty"` -} - -// RetentionSizeConfigApplyConfiguration constructs a declarative configuration of the RetentionSizeConfig type for use with -// apply. -func RetentionSizeConfig() *RetentionSizeConfigApplyConfiguration { - return &RetentionSizeConfigApplyConfiguration{} -} - -// WithMaxSizeOfBackupsGb sets the MaxSizeOfBackupsGb field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxSizeOfBackupsGb field is set to the value of the last call. -func (b *RetentionSizeConfigApplyConfiguration) WithMaxSizeOfBackupsGb(value int) *RetentionSizeConfigApplyConfiguration { - b.MaxSizeOfBackupsGb = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/rsakeyconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/rsakeyconfig.go deleted file mode 100644 index 89bccbf4f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/rsakeyconfig.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// RSAKeyConfigApplyConfiguration represents a declarative configuration of the RSAKeyConfig type for use -// with apply. -// -// RSAKeyConfig specifies parameters for RSA key generation. -type RSAKeyConfigApplyConfiguration struct { - // keySize specifies the size of RSA keys in bits. - // Valid values are multiples of 1024 from 2048 to 8192. - KeySize *int32 `json:"keySize,omitempty"` -} - -// RSAKeyConfigApplyConfiguration constructs a declarative configuration of the RSAKeyConfig type for use with -// apply. -func RSAKeyConfig() *RSAKeyConfigApplyConfiguration { - return &RSAKeyConfigApplyConfiguration{} -} - -// WithKeySize sets the KeySize field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KeySize field is set to the value of the last call. -func (b *RSAKeyConfigApplyConfiguration) WithKeySize(value int32) *RSAKeyConfigApplyConfiguration { - b.KeySize = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/secretkeyselector.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/secretkeyselector.go deleted file mode 100644 index a824180ed..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/secretkeyselector.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// SecretKeySelectorApplyConfiguration represents a declarative configuration of the SecretKeySelector type for use -// with apply. -// -// SecretKeySelector selects a key of a Secret in the `openshift-monitoring` namespace. -type SecretKeySelectorApplyConfiguration struct { - // name is the name of the secret in the `openshift-monitoring` namespace to select from. - // Must be a valid Kubernetes secret name (lowercase alphanumeric, '-' or '.', start/end with alphanumeric). - // Must be between 1 and 253 characters in length. - Name *string `json:"name,omitempty"` - // key is the key of the secret to select from. - // Must consist of alphanumeric characters, '-', '_', or '.'. - // Must be between 1 and 253 characters in length. - Key *string `json:"key,omitempty"` -} - -// SecretKeySelectorApplyConfiguration constructs a declarative configuration of the SecretKeySelector type for use with -// apply. -func SecretKeySelector() *SecretKeySelectorApplyConfiguration { - return &SecretKeySelectorApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *SecretKeySelectorApplyConfiguration) WithName(value string) *SecretKeySelectorApplyConfiguration { - b.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *SecretKeySelectorApplyConfiguration) WithKey(value string) *SecretKeySelectorApplyConfiguration { - b.Key = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/sigv4.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/sigv4.go deleted file mode 100644 index e0e37c4fd..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/sigv4.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// Sigv4ApplyConfiguration represents a declarative configuration of the Sigv4 type for use -// with apply. -// -// Sigv4 defines AWS Signature Version 4 authentication settings. -// At least one of region, accessKey/secretKey, profile, or roleArn must be set so the platform can perform authentication. -type Sigv4ApplyConfiguration struct { - // region is the AWS region. - // When omitted, the region is derived from the environment or instance metadata. - // Must be between 1 and 128 characters. - Region *string `json:"region,omitempty"` - // accessKey defines the secret reference containing the AWS access key ID. - // The secret must exist in the openshift-monitoring namespace. - // When omitted, the access key is derived from the environment or instance metadata. - AccessKey *SecretKeySelectorApplyConfiguration `json:"accessKey,omitempty"` - // secretKey defines the secret reference containing the AWS secret access key. - // The secret must exist in the openshift-monitoring namespace. - // When omitted, the secret key is derived from the environment or instance metadata. - SecretKey *SecretKeySelectorApplyConfiguration `json:"secretKey,omitempty"` - // profile is the named AWS profile used to authenticate. - // When omitted, the default profile is used. - // Must be between 1 and 128 characters. - Profile *string `json:"profile,omitempty"` - // roleArn is the AWS Role ARN, an alternative to using AWS API keys. - // When omitted, API keys are used for authentication. - // Must be a valid AWS ARN format (e.g., "arn:aws:iam::123456789012:role/MyRole"). - // Must be between 1 and 512 characters. - RoleArn *string `json:"roleArn,omitempty"` -} - -// Sigv4ApplyConfiguration constructs a declarative configuration of the Sigv4 type for use with -// apply. -func Sigv4() *Sigv4ApplyConfiguration { - return &Sigv4ApplyConfiguration{} -} - -// WithRegion sets the Region field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Region field is set to the value of the last call. -func (b *Sigv4ApplyConfiguration) WithRegion(value string) *Sigv4ApplyConfiguration { - b.Region = &value - return b -} - -// WithAccessKey sets the AccessKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AccessKey field is set to the value of the last call. -func (b *Sigv4ApplyConfiguration) WithAccessKey(value *SecretKeySelectorApplyConfiguration) *Sigv4ApplyConfiguration { - b.AccessKey = value - return b -} - -// WithSecretKey sets the SecretKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SecretKey field is set to the value of the last call. -func (b *Sigv4ApplyConfiguration) WithSecretKey(value *SecretKeySelectorApplyConfiguration) *Sigv4ApplyConfiguration { - b.SecretKey = value - return b -} - -// WithProfile sets the Profile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Profile field is set to the value of the last call. -func (b *Sigv4ApplyConfiguration) WithProfile(value string) *Sigv4ApplyConfiguration { - b.Profile = &value - return b -} - -// WithRoleArn sets the RoleArn field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RoleArn field is set to the value of the last call. -func (b *Sigv4ApplyConfiguration) WithRoleArn(value string) *Sigv4ApplyConfiguration { - b.RoleArn = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/storage.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/storage.go deleted file mode 100644 index 69b743f31..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/storage.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// StorageApplyConfiguration represents a declarative configuration of the Storage type for use -// with apply. -// -// storage provides persistent storage configuration options for gathering jobs. -// If the type is set to PersistentVolume, then the PersistentVolume must be defined. -// If the type is set to Ephemeral, then the PersistentVolume must not be defined. -type StorageApplyConfiguration struct { - // type is a required field that specifies the type of storage that will be used to store the Insights data archive. - // Valid values are "PersistentVolume" and "Ephemeral". - // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. - // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field. - Type *configv1alpha1.StorageType `json:"type,omitempty"` - // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. - // The PersistentVolume must be created in the openshift-insights namespace. - PersistentVolume *PersistentVolumeConfigApplyConfiguration `json:"persistentVolume,omitempty"` -} - -// StorageApplyConfiguration constructs a declarative configuration of the Storage type for use with -// apply. -func Storage() *StorageApplyConfiguration { - return &StorageApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithType(value configv1alpha1.StorageType) *StorageApplyConfiguration { - b.Type = &value - return b -} - -// WithPersistentVolume sets the PersistentVolume field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PersistentVolume field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithPersistentVolume(value *PersistentVolumeConfigApplyConfiguration) *StorageApplyConfiguration { - b.PersistentVolume = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/telemeterclientconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/telemeterclientconfig.go deleted file mode 100644 index 9d4c5cc33..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/telemeterclientconfig.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - v1 "k8s.io/api/core/v1" -) - -// TelemeterClientConfigApplyConfiguration represents a declarative configuration of the TelemeterClientConfig type for use -// with apply. -// -// TelemeterClientConfig provides configuration options for the Telemeter Client component -// that runs in the `openshift-monitoring` namespace. The Telemeter Client collects selected -// monitoring metrics and forwards them to Red Hat for telemetry purposes. -// At least one field must be specified. -type TelemeterClientConfigApplyConfiguration struct { - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Telemeter Client container. - // This includes CPU, memory and HugePages constraints to help control scheduling and resource usage. - // When not specified, defaults are used by the platform. Requests cannot exceed limits. - // This field is optional. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 1m - // limit: null - // - name: memory - // request: 40Mi - // limit: null - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Telemeter Client Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Default is empty list. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// TelemeterClientConfigApplyConfiguration constructs a declarative configuration of the TelemeterClientConfig type for use with -// apply. -func TelemeterClientConfig() *TelemeterClientConfigApplyConfiguration { - return &TelemeterClientConfigApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *TelemeterClientConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *TelemeterClientConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *TelemeterClientConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *TelemeterClientConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *TelemeterClientConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *TelemeterClientConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *TelemeterClientConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *TelemeterClientConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierconfig.go deleted file mode 100644 index 9210a0a30..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierconfig.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" -) - -// ThanosQuerierConfigApplyConfiguration represents a declarative configuration of the ThanosQuerierConfig type for use -// with apply. -// -// ThanosQuerierConfig provides configuration options for the Thanos Querier component -// that runs in the `openshift-monitoring` namespace. -// At least one field must be specified; an empty thanosQuerierConfig object is not allowed. -type ThanosQuerierConfigApplyConfiguration struct { - // logLevel defines the verbosity of logs emitted by Thanos Querier. - // logLevel is optional. - // Allowed values are Error, Warn, Info, and Debug. - // When set to Error, only errors will be logged. - // When set to Warn, both warnings and errors will be logged. - // When set to Info, general information, warnings, and errors will all be logged. - // When set to Debug, detailed debugging information will be logged. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is `Info`. - LogLevel *configv1alpha1.LogLevel `json:"logLevel,omitempty"` - // requestLogging configures request logging for Thanos Querier. - // requestLogging is optional. - // When provided, the policy field within is required. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default behavior is to not log any requests. - RequestLogging *ThanosQuerierRequestLoggingConfigApplyConfiguration `json:"requestLogging,omitempty"` - // crossOriginRequestPolicy configures the CORS (Cross-Origin Resource Sharing) policy - // for Thanos Querier's HTTP endpoints. - // crossOriginRequestPolicy is optional. - // Valid values are "AllowAll" and "DenyAll". - // When set to "AllowAll", CORS headers are added to responses, allowing cross-origin requests from any domain. - // When set to "DenyAll", no CORS headers are added and cross-origin requests are rejected by the browser. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, that is subject to change over time. - // The current default value is "DenyAll". - CrossOriginRequestPolicy *configv1alpha1.CrossOriginRequestPolicy `json:"crossOriginRequestPolicy,omitempty"` - // nodeSelector defines the nodes on which the Pods are scheduled. - // nodeSelector is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // The current default value is `kubernetes.io/os: linux`. - // When specified, nodeSelector must contain at least 1 entry and must not contain more than 10 entries. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // resources defines the compute resource requests and limits for the Thanos Querier container. - // resources is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Requests cannot exceed limits. - // More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - // This is a simplified API that maps to Kubernetes ResourceRequirements. - // The current default values are: - // resources: - // - name: cpu - // request: 5m - // - name: memory - // request: 12Mi - // Maximum length for this list is 5. - // Minimum length for this list is 1. - // Each resource name must be unique within this list. - Resources []ContainerResourceApplyConfiguration `json:"resources,omitempty"` - // tolerations defines tolerations for the pods. - // tolerations is optional. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose reasonable defaults. These defaults are subject to change over time. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - Tolerations []v1.Toleration `json:"tolerations,omitempty"` - // topologySpreadConstraints defines rules for how Thanos Querier Pods should be distributed - // across topology domains such as zones, nodes, or other user-defined labels. - // topologySpreadConstraints is optional. - // This helps improve high availability and resource efficiency by avoiding placing - // too many replicas in the same failure domain. - // - // When omitted, this means no opinion and the platform is left to choose a default, which is subject to change over time. - // This field maps directly to the `topologySpreadConstraints` field in the Pod spec. - // Defaults are empty/unset. - // Maximum length for this list is 10. - // Minimum length for this list is 1. - // Entries must have unique topologyKey and whenUnsatisfiable pairs. - TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` -} - -// ThanosQuerierConfigApplyConfiguration constructs a declarative configuration of the ThanosQuerierConfig type for use with -// apply. -func ThanosQuerierConfig() *ThanosQuerierConfigApplyConfiguration { - return &ThanosQuerierConfigApplyConfiguration{} -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ThanosQuerierConfigApplyConfiguration) WithLogLevel(value configv1alpha1.LogLevel) *ThanosQuerierConfigApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithRequestLogging sets the RequestLogging field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RequestLogging field is set to the value of the last call. -func (b *ThanosQuerierConfigApplyConfiguration) WithRequestLogging(value *ThanosQuerierRequestLoggingConfigApplyConfiguration) *ThanosQuerierConfigApplyConfiguration { - b.RequestLogging = value - return b -} - -// WithCrossOriginRequestPolicy sets the CrossOriginRequestPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CrossOriginRequestPolicy field is set to the value of the last call. -func (b *ThanosQuerierConfigApplyConfiguration) WithCrossOriginRequestPolicy(value configv1alpha1.CrossOriginRequestPolicy) *ThanosQuerierConfigApplyConfiguration { - b.CrossOriginRequestPolicy = &value - return b -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *ThanosQuerierConfigApplyConfiguration) WithNodeSelector(entries map[string]string) *ThanosQuerierConfigApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithResources adds the given value to the Resources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Resources field. -func (b *ThanosQuerierConfigApplyConfiguration) WithResources(values ...*ContainerResourceApplyConfiguration) *ThanosQuerierConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResources") - } - b.Resources = append(b.Resources, *values[i]) - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *ThanosQuerierConfigApplyConfiguration) WithTolerations(values ...v1.Toleration) *ThanosQuerierConfigApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} - -// WithTopologySpreadConstraints adds the given value to the TopologySpreadConstraints field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologySpreadConstraints field. -func (b *ThanosQuerierConfigApplyConfiguration) WithTopologySpreadConstraints(values ...v1.TopologySpreadConstraint) *ThanosQuerierConfigApplyConfiguration { - for i := range values { - b.TopologySpreadConstraints = append(b.TopologySpreadConstraints, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierrequestloggingconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierrequestloggingconfig.go deleted file mode 100644 index d9a626442..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/thanosquerierrequestloggingconfig.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// ThanosQuerierRequestLoggingConfigApplyConfiguration represents a declarative configuration of the ThanosQuerierRequestLoggingConfig type for use -// with apply. -// -// ThanosQuerierRequestLoggingConfig configures request logging for Thanos Querier. -type ThanosQuerierRequestLoggingConfigApplyConfiguration struct { - // policy determines which HTTP and gRPC requests are logged by Thanos Querier. - // Valid values are "AllRequests" and "NoRequests". - // When set to "AllRequests", every request received by Thanos Querier is logged with method, path, and response status. - // The log level for request logs is derived from the logLevel field. - // When set to "NoRequests", request logging is turned off. - Policy *configv1alpha1.RequestLoggingPolicy `json:"policy,omitempty"` -} - -// ThanosQuerierRequestLoggingConfigApplyConfiguration constructs a declarative configuration of the ThanosQuerierRequestLoggingConfig type for use with -// apply. -func ThanosQuerierRequestLoggingConfig() *ThanosQuerierRequestLoggingConfigApplyConfiguration { - return &ThanosQuerierRequestLoggingConfigApplyConfiguration{} -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *ThanosQuerierRequestLoggingConfigApplyConfiguration) WithPolicy(value configv1alpha1.RequestLoggingPolicy) *ThanosQuerierRequestLoggingConfigApplyConfiguration { - b.Policy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/tlsconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/tlsconfig.go deleted file mode 100644 index dc7402661..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/tlsconfig.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// TLSConfigApplyConfiguration represents a declarative configuration of the TLSConfig type for use -// with apply. -// -// TLSConfig represents TLS configuration for Alertmanager connections. -// At least one TLS configuration option must be specified. -// For mutual TLS (mTLS), both cert and key must be specified together, or both omitted. -type TLSConfigApplyConfiguration struct { - // ca is an optional CA certificate to use for TLS connections. - // When omitted, the system's default CA bundle is used. - CA *SecretKeySelectorApplyConfiguration `json:"ca,omitempty"` - // cert is an optional client certificate to use for mutual TLS connections. - // When omitted, no client certificate is presented. - Cert *SecretKeySelectorApplyConfiguration `json:"cert,omitempty"` - // key is an optional client key to use for mutual TLS connections. - // When omitted, no client key is used. - Key *SecretKeySelectorApplyConfiguration `json:"key,omitempty"` - // serverName is an optional server name to use for TLS connections. - // When specified, must be a valid DNS subdomain as per RFC 1123. - // When omitted, the server name is derived from the URL. - // Must be between 1 and 253 characters in length. - ServerName *string `json:"serverName,omitempty"` - // certificateVerification determines the policy for TLS certificate verification. - // Allowed values are "Verify" (performs certificate verification, secure) and "SkipVerify" (skips verification, insecure). - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The default value is "Verify". - CertificateVerification *configv1alpha1.CertificateVerificationType `json:"certificateVerification,omitempty"` -} - -// TLSConfigApplyConfiguration constructs a declarative configuration of the TLSConfig type for use with -// apply. -func TLSConfig() *TLSConfigApplyConfiguration { - return &TLSConfigApplyConfiguration{} -} - -// WithCA sets the CA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CA field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithCA(value *SecretKeySelectorApplyConfiguration) *TLSConfigApplyConfiguration { - b.CA = value - return b -} - -// WithCert sets the Cert field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Cert field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithCert(value *SecretKeySelectorApplyConfiguration) *TLSConfigApplyConfiguration { - b.Cert = value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithKey(value *SecretKeySelectorApplyConfiguration) *TLSConfigApplyConfiguration { - b.Key = value - return b -} - -// WithServerName sets the ServerName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServerName field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithServerName(value string) *TLSConfigApplyConfiguration { - b.ServerName = &value - return b -} - -// WithCertificateVerification sets the CertificateVerification field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CertificateVerification field is set to the value of the last call. -func (b *TLSConfigApplyConfiguration) WithCertificateVerification(value configv1alpha1.CertificateVerificationType) *TLSConfigApplyConfiguration { - b.CertificateVerification = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/uppercaseactionconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/uppercaseactionconfig.go deleted file mode 100644 index 6d3a6a804..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/uppercaseactionconfig.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -// UppercaseActionConfigApplyConfiguration represents a declarative configuration of the UppercaseActionConfig type for use -// with apply. -// -// UppercaseActionConfig configures the Uppercase action. -// Maps the concatenated source_labels to their upper case and writes to target_label. -// Requires Prometheus >= v2.36.0. -type UppercaseActionConfigApplyConfiguration struct { - // targetLabel is the label name where the upper-cased value is written. - // Must be between 1 and 128 characters in length. - TargetLabel *string `json:"targetLabel,omitempty"` -} - -// UppercaseActionConfigApplyConfiguration constructs a declarative configuration of the UppercaseActionConfig type for use with -// apply. -func UppercaseActionConfig() *UppercaseActionConfigApplyConfiguration { - return &UppercaseActionConfigApplyConfiguration{} -} - -// WithTargetLabel sets the TargetLabel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetLabel field is set to the value of the last call. -func (b *UppercaseActionConfigApplyConfiguration) WithTargetLabel(value string) *UppercaseActionConfigApplyConfiguration { - b.TargetLabel = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/userdefinedmonitoring.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/userdefinedmonitoring.go deleted file mode 100644 index a17f0b13f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1/userdefinedmonitoring.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" -) - -// UserDefinedMonitoringApplyConfiguration represents a declarative configuration of the UserDefinedMonitoring type for use -// with apply. -// -// UserDefinedMonitoring config for user-defined projects. -type UserDefinedMonitoringApplyConfiguration struct { - // mode defines the different configurations of UserDefinedMonitoring - // Valid values are Disabled and NamespaceIsolated - // Disabled disables monitoring for user-defined projects. This restricts the default monitoring stack, installed in the openshift-monitoring project, to monitor only platform namespaces, which prevents any custom monitoring configurations or resources from being applied to user-defined namespaces. - // NamespaceIsolated enables monitoring for user-defined projects with namespace-scoped tenancy. This ensures that metrics, alerts, and monitoring data are isolated at the namespace level. - // The current default value is `Disabled`. - Mode *configv1alpha1.UserDefinedMode `json:"mode,omitempty"` -} - -// UserDefinedMonitoringApplyConfiguration constructs a declarative configuration of the UserDefinedMonitoring type for use with -// apply. -func UserDefinedMonitoring() *UserDefinedMonitoringApplyConfiguration { - return &UserDefinedMonitoringApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *UserDefinedMonitoringApplyConfiguration) WithMode(value configv1alpha1.UserDefinedMode) *UserDefinedMonitoringApplyConfiguration { - b.Mode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/custom.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/custom.go deleted file mode 100644 index fba2d19c4..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/custom.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// CustomApplyConfiguration represents a declarative configuration of the Custom type for use -// with apply. -// -// custom provides the custom configuration of gatherers -type CustomApplyConfiguration struct { - // configs is a required list of gatherers configurations that can be used to enable or disable specific gatherers. - // It may not exceed 100 items and each gatherer can be present only once. - // It is possible to disable an entire set of gatherers while allowing a specific function within that set. - // The particular gatherers IDs can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - Configs []GathererConfigApplyConfiguration `json:"configs,omitempty"` -} - -// CustomApplyConfiguration constructs a declarative configuration of the Custom type for use with -// apply. -func Custom() *CustomApplyConfiguration { - return &CustomApplyConfiguration{} -} - -// WithConfigs adds the given value to the Configs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Configs field. -func (b *CustomApplyConfiguration) WithConfigs(values ...*GathererConfigApplyConfiguration) *CustomApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConfigs") - } - b.Configs = append(b.Configs, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherconfig.go deleted file mode 100644 index 41e0b873f..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherconfig.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" -) - -// GatherConfigApplyConfiguration represents a declarative configuration of the GatherConfig type for use -// with apply. -// -// gatherConfig provides data gathering configuration options. -type GatherConfigApplyConfiguration struct { - // dataPolicy is an optional list of DataPolicyOptions that allows user to enable additional obfuscation of the Insights archive data. - // It may not exceed 2 items and must not contain duplicates. - // Valid values are ObfuscateNetworking and WorkloadNames. - // When set to ObfuscateNetworking the IP addresses and the cluster domain name are obfuscated. - // When set to WorkloadNames, the gathered data about cluster resources will not contain the workload names for your deployments. Resources UIDs will be used instead. - // When omitted no obfuscation is applied. - DataPolicy []configv1alpha2.DataPolicyOption `json:"dataPolicy,omitempty"` - // gatherers is a required field that specifies the configuration of the gatherers. - Gatherers *GatherersApplyConfiguration `json:"gatherers,omitempty"` - // storage is an optional field that allows user to define persistent storage for gathering jobs to store the Insights data archive. - // If omitted, the gathering job will use ephemeral storage. - Storage *StorageApplyConfiguration `json:"storage,omitempty"` -} - -// GatherConfigApplyConfiguration constructs a declarative configuration of the GatherConfig type for use with -// apply. -func GatherConfig() *GatherConfigApplyConfiguration { - return &GatherConfigApplyConfiguration{} -} - -// WithDataPolicy adds the given value to the DataPolicy field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DataPolicy field. -func (b *GatherConfigApplyConfiguration) WithDataPolicy(values ...configv1alpha2.DataPolicyOption) *GatherConfigApplyConfiguration { - for i := range values { - b.DataPolicy = append(b.DataPolicy, values[i]) - } - return b -} - -// WithGatherers sets the Gatherers field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Gatherers field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithGatherers(value *GatherersApplyConfiguration) *GatherConfigApplyConfiguration { - b.Gatherers = value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *GatherConfigApplyConfiguration) WithStorage(value *StorageApplyConfiguration) *GatherConfigApplyConfiguration { - b.Storage = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gathererconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gathererconfig.go deleted file mode 100644 index 5e2f62817..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gathererconfig.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" -) - -// GathererConfigApplyConfiguration represents a declarative configuration of the GathererConfig type for use -// with apply. -// -// gathererConfig allows to configure specific gatherers -type GathererConfigApplyConfiguration struct { - // name is the required name of a specific gatherer - // It may not exceed 256 characters. - // The format for a gatherer name is: {gatherer}/{function} where the function is optional. - // Gatherer consists of a lowercase letters only that may include underscores (_). - // Function consists of a lowercase letters only that may include underscores (_) and is separated from the gatherer by a forward slash (/). - // The particular gatherers can be found at https://github.com/openshift/insights-operator/blob/master/docs/gathered-data.md. - // Run the following command to get the names of last active gatherers: - // "oc get insightsoperators.operator.openshift.io cluster -o json | jq '.status.gatherStatus.gatherers[].name'" - Name *string `json:"name,omitempty"` - // state is a required field that allows you to configure specific gatherer. Valid values are "Enabled" and "Disabled". - // When set to Enabled the gatherer will run. - // When set to Disabled the gatherer will not run. - State *configv1alpha2.GathererState `json:"state,omitempty"` -} - -// GathererConfigApplyConfiguration constructs a declarative configuration of the GathererConfig type for use with -// apply. -func GathererConfig() *GathererConfigApplyConfiguration { - return &GathererConfigApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *GathererConfigApplyConfiguration) WithName(value string) *GathererConfigApplyConfiguration { - b.Name = &value - return b -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *GathererConfigApplyConfiguration) WithState(value configv1alpha2.GathererState) *GathererConfigApplyConfiguration { - b.State = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherers.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherers.go deleted file mode 100644 index 68ac2e747..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/gatherers.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" -) - -// GatherersApplyConfiguration represents a declarative configuration of the Gatherers type for use -// with apply. -type GatherersApplyConfiguration struct { - // mode is a required field that specifies the mode for gatherers. Allowed values are All, None, and Custom. - // When set to All, all gatherers wil run and gather data. - // When set to None, all gatherers will be disabled and no data will be gathered. - // When set to Custom, the custom configuration from the custom field will be applied. - Mode *configv1alpha2.GatheringMode `json:"mode,omitempty"` - // custom provides gathering configuration. - // It is required when mode is Custom, and forbidden otherwise. - // Custom configuration allows user to disable only a subset of gatherers. - // Gatherers that are not explicitly disabled in custom configuration will run. - Custom *CustomApplyConfiguration `json:"custom,omitempty"` -} - -// GatherersApplyConfiguration constructs a declarative configuration of the Gatherers type for use with -// apply. -func Gatherers() *GatherersApplyConfiguration { - return &GatherersApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *GatherersApplyConfiguration) WithMode(value configv1alpha2.GatheringMode) *GatherersApplyConfiguration { - b.Mode = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *GatherersApplyConfiguration) WithCustom(value *CustomApplyConfiguration) *GatherersApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagather.go deleted file mode 100644 index 50ee47713..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagather.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" - internal "github.com/openshift/client-go/config/applyconfigurations/internal" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// InsightsDataGatherApplyConfiguration represents a declarative configuration of the InsightsDataGather type for use -// with apply. -// -// InsightsDataGather provides data gather configuration options for the the Insights Operator. -// -// Compatibility level 4: No compatibility is provided, the API can change at any point for any reason. These capabilities should not be used by applications needing long term support. -type InsightsDataGatherApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *InsightsDataGatherSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *configv1alpha2.InsightsDataGatherStatus `json:"status,omitempty"` -} - -// InsightsDataGather constructs a declarative configuration of the InsightsDataGather type for use with -// apply. -func InsightsDataGather(name string) *InsightsDataGatherApplyConfiguration { - b := &InsightsDataGatherApplyConfiguration{} - b.WithName(name) - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1alpha2") - return b -} - -// ExtractInsightsDataGatherFrom extracts the applied configuration owned by fieldManager from -// insightsDataGather for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGatherFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGatherFrom(insightsDataGather *configv1alpha2.InsightsDataGather, fieldManager string, subresource string) (*InsightsDataGatherApplyConfiguration, error) { - b := &InsightsDataGatherApplyConfiguration{} - err := managedfields.ExtractInto(insightsDataGather, internal.Parser().Type("com.github.openshift.api.config.v1alpha2.InsightsDataGather"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(insightsDataGather.Name) - - b.WithKind("InsightsDataGather") - b.WithAPIVersion("config.openshift.io/v1alpha2") - return b, nil -} - -// ExtractInsightsDataGather extracts the applied configuration owned by fieldManager from -// insightsDataGather. If no managedFields are found in insightsDataGather for fieldManager, a -// InsightsDataGatherApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// insightsDataGather must be a unmodified InsightsDataGather API object that was retrieved from the Kubernetes API. -// ExtractInsightsDataGather provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsDataGather(insightsDataGather *configv1alpha2.InsightsDataGather, fieldManager string) (*InsightsDataGatherApplyConfiguration, error) { - return ExtractInsightsDataGatherFrom(insightsDataGather, fieldManager, "") -} - -// ExtractInsightsDataGatherStatus extracts the applied configuration owned by fieldManager from -// insightsDataGather for the status subresource. -func ExtractInsightsDataGatherStatus(insightsDataGather *configv1alpha2.InsightsDataGather, fieldManager string) (*InsightsDataGatherApplyConfiguration, error) { - return ExtractInsightsDataGatherFrom(insightsDataGather, fieldManager, "status") -} - -func (b InsightsDataGatherApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithKind(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithAPIVersion(value string) *InsightsDataGatherApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGenerateName(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithNamespace(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithUID(value types.UID) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithResourceVersion(value string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithGeneration(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithCreationTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithLabels(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *InsightsDataGatherApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InsightsDataGatherApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *InsightsDataGatherApplyConfiguration) WithFinalizers(values ...string) *InsightsDataGatherApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *InsightsDataGatherApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithSpec(value *InsightsDataGatherSpecApplyConfiguration) *InsightsDataGatherApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *InsightsDataGatherApplyConfiguration) WithStatus(value configv1alpha2.InsightsDataGatherStatus) *InsightsDataGatherApplyConfiguration { - b.Status = &value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *InsightsDataGatherApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagatherspec.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagatherspec.go deleted file mode 100644 index e4ca3a437..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/insightsdatagatherspec.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// InsightsDataGatherSpecApplyConfiguration represents a declarative configuration of the InsightsDataGatherSpec type for use -// with apply. -type InsightsDataGatherSpecApplyConfiguration struct { - // gatherConfig is an optional spec attribute that includes all the configuration options related to gathering of the Insights data and its uploading to the ingress. - GatherConfig *GatherConfigApplyConfiguration `json:"gatherConfig,omitempty"` -} - -// InsightsDataGatherSpecApplyConfiguration constructs a declarative configuration of the InsightsDataGatherSpec type for use with -// apply. -func InsightsDataGatherSpec() *InsightsDataGatherSpecApplyConfiguration { - return &InsightsDataGatherSpecApplyConfiguration{} -} - -// WithGatherConfig sets the GatherConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GatherConfig field is set to the value of the last call. -func (b *InsightsDataGatherSpecApplyConfiguration) WithGatherConfig(value *GatherConfigApplyConfiguration) *InsightsDataGatherSpecApplyConfiguration { - b.GatherConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeclaimreference.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeclaimreference.go deleted file mode 100644 index 12ce1687a..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeclaimreference.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// PersistentVolumeClaimReferenceApplyConfiguration represents a declarative configuration of the PersistentVolumeClaimReference type for use -// with apply. -// -// persistentVolumeClaimReference is a reference to a PersistentVolumeClaim. -type PersistentVolumeClaimReferenceApplyConfiguration struct { - // name is a string that follows the DNS1123 subdomain format. - // It must be at most 253 characters in length, and must consist only of lower case alphanumeric characters, '-' and '.', and must start and end with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// PersistentVolumeClaimReferenceApplyConfiguration constructs a declarative configuration of the PersistentVolumeClaimReference type for use with -// apply. -func PersistentVolumeClaimReference() *PersistentVolumeClaimReferenceApplyConfiguration { - return &PersistentVolumeClaimReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *PersistentVolumeClaimReferenceApplyConfiguration) WithName(value string) *PersistentVolumeClaimReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeconfig.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeconfig.go deleted file mode 100644 index 2e3733226..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/persistentvolumeconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -// PersistentVolumeConfigApplyConfiguration represents a declarative configuration of the PersistentVolumeConfig type for use -// with apply. -// -// persistentVolumeConfig provides configuration options for PersistentVolume storage. -type PersistentVolumeConfigApplyConfiguration struct { - // claim is a required field that specifies the configuration of the PersistentVolumeClaim that will be used to store the Insights data archive. - // The PersistentVolumeClaim must be created in the openshift-insights namespace. - Claim *PersistentVolumeClaimReferenceApplyConfiguration `json:"claim,omitempty"` - // mountPath is an optional field specifying the directory where the PVC will be mounted inside the Insights data gathering Pod. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default mount path is /var/lib/insights-operator - // The path may not exceed 1024 characters and must not contain a colon. - MountPath *string `json:"mountPath,omitempty"` -} - -// PersistentVolumeConfigApplyConfiguration constructs a declarative configuration of the PersistentVolumeConfig type for use with -// apply. -func PersistentVolumeConfig() *PersistentVolumeConfigApplyConfiguration { - return &PersistentVolumeConfigApplyConfiguration{} -} - -// WithClaim sets the Claim field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Claim field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithClaim(value *PersistentVolumeClaimReferenceApplyConfiguration) *PersistentVolumeConfigApplyConfiguration { - b.Claim = value - return b -} - -// WithMountPath sets the MountPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MountPath field is set to the value of the last call. -func (b *PersistentVolumeConfigApplyConfiguration) WithMountPath(value string) *PersistentVolumeConfigApplyConfiguration { - b.MountPath = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/storage.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/storage.go deleted file mode 100644 index 41b4d2560..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2/storage.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" -) - -// StorageApplyConfiguration represents a declarative configuration of the Storage type for use -// with apply. -// -// storage provides persistent storage configuration options for gathering jobs. -// If the type is set to PersistentVolume, then the PersistentVolume must be defined. -// If the type is set to Ephemeral, then the PersistentVolume must not be defined. -type StorageApplyConfiguration struct { - // type is a required field that specifies the type of storage that will be used to store the Insights data archive. - // Valid values are "PersistentVolume" and "Ephemeral". - // When set to Ephemeral, the Insights data archive is stored in the ephemeral storage of the gathering job. - // When set to PersistentVolume, the Insights data archive is stored in the PersistentVolume that is defined by the persistentVolume field. - Type *configv1alpha2.StorageType `json:"type,omitempty"` - // persistentVolume is an optional field that specifies the PersistentVolume that will be used to store the Insights data archive. - // The PersistentVolume must be created in the openshift-insights namespace. - PersistentVolume *PersistentVolumeConfigApplyConfiguration `json:"persistentVolume,omitempty"` -} - -// StorageApplyConfiguration constructs a declarative configuration of the Storage type for use with -// apply. -func Storage() *StorageApplyConfiguration { - return &StorageApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithType(value configv1alpha2.StorageType) *StorageApplyConfiguration { - b.Type = &value - return b -} - -// WithPersistentVolume sets the PersistentVolume field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PersistentVolume field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithPersistentVolume(value *PersistentVolumeConfigApplyConfiguration) *StorageApplyConfiguration { - b.PersistentVolume = value - return b -} diff --git a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go deleted file mode 100644 index d71561a0b..000000000 --- a/vendor/github.com/openshift/client-go/config/applyconfigurations/internal/internal.go +++ /dev/null @@ -1,6509 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package internal - -import ( - fmt "fmt" - sync "sync" - - typed "sigs.k8s.io/structured-merge-diff/v6/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: com.github.openshift.api.config.v1.APIServer - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.APIServerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.APIServerStatus - default: {} -- name: com.github.openshift.api.config.v1.APIServerEncryption - map: - fields: - - name: kms - type: - namedType: com.github.openshift.api.config.v1.KMSPluginConfig - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: kms - discriminatorValue: KMS -- name: com.github.openshift.api.config.v1.APIServerNamedServingCert - map: - fields: - - name: names - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: servingCertificate - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1.APIServerServingCerts - map: - fields: - - name: namedCertificates - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.APIServerNamedServingCert - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.APIServerSpec - map: - fields: - - name: additionalCORSAllowedOrigins - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: audit - type: - namedType: com.github.openshift.api.config.v1.Audit - default: {} - - name: clientCA - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: encryption - type: - namedType: com.github.openshift.api.config.v1.APIServerEncryption - default: {} - - name: servingCerts - type: - namedType: com.github.openshift.api.config.v1.APIServerServingCerts - default: {} - - name: tlsAdherence - type: - scalar: string - - name: tlsSecurityProfile - type: - namedType: com.github.openshift.api.config.v1.TLSSecurityProfile -- name: com.github.openshift.api.config.v1.APIServerStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.AWSDNSSpec - map: - fields: - - name: privateZoneIAMRole - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.AWSIngressSpec - map: - fields: - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.AWSPlatformSpec - map: - fields: - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AWSServiceEndpoint - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.AWSPlatformStatus - map: - fields: - - name: cloudLoadBalancerConfig - type: - namedType: com.github.openshift.api.config.v1.CloudLoadBalancerConfig - default: - dnsType: PlatformDefault - - name: ipFamily - type: - scalar: string - default: IPv4 - - name: region - type: - scalar: string - default: "" - - name: resourceTags - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AWSResourceTag - elementRelationship: atomic - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AWSServiceEndpoint - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.AWSResourceTag - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.AWSServiceEndpoint - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.AcceptRisk - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.AlibabaCloudPlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.AlibabaCloudPlatformStatus - map: - fields: - - name: region - type: - scalar: string - default: "" - - name: resourceGroupID - type: - scalar: string - - name: resourceTags - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AlibabaCloudResourceTag - elementRelationship: associative - keys: - - key -- name: com.github.openshift.api.config.v1.AlibabaCloudResourceTag - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Audit - map: - fields: - - name: customRules - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AuditCustomRule - elementRelationship: associative - keys: - - group - - name: profile - type: - scalar: string -- name: com.github.openshift.api.config.v1.AuditCustomRule - map: - fields: - - name: group - type: - scalar: string - default: "" - - name: profile - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Authentication - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.AuthenticationSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.AuthenticationStatus - default: {} -- name: com.github.openshift.api.config.v1.AuthenticationSpec - map: - fields: - - name: oauthMetadata - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: oidcProviders - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.OIDCProvider - elementRelationship: associative - keys: - - name - - name: serviceAccountIssuer - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" - - name: webhookTokenAuthenticator - type: - namedType: com.github.openshift.api.config.v1.WebhookTokenAuthenticator - - name: webhookTokenAuthenticators - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.DeprecatedWebhookTokenAuthenticator - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.AuthenticationStatus - map: - fields: - - name: integratedOAuthMetadata - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: oidcClients - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.OIDCClientStatus - elementRelationship: associative - keys: - - componentNamespace - - componentName -- name: com.github.openshift.api.config.v1.AzurePlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.AzurePlatformStatus - map: - fields: - - name: armEndpoint - type: - scalar: string - - name: cloudLoadBalancerConfig - type: - namedType: com.github.openshift.api.config.v1.CloudLoadBalancerConfig - default: - dnsType: PlatformDefault - - name: cloudName - type: - scalar: string - - name: ipFamily - type: - scalar: string - default: IPv4 - - name: networkResourceGroupName - type: - scalar: string - - name: resourceGroupName - type: - scalar: string - default: "" - - name: resourceTags - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AzureResourceTag - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.AzureResourceTag - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.BareMetalPlatformLoadBalancer - map: - fields: - - name: type - type: - scalar: string - default: OpenShiftManagedDefault - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.BareMetalPlatformSpec - map: - fields: - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.BareMetalPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: dnsRecordsType - type: - scalar: string - - name: ingressIP - type: - scalar: string - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.BareMetalPlatformLoadBalancer - default: - type: OpenShiftManagedDefault - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nodeDNSIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.BasicAuthIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: tlsClientCert - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: tlsClientKey - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Build - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.BuildSpec - default: {} -- name: com.github.openshift.api.config.v1.BuildDefaults - map: - fields: - - name: defaultProxy - type: - namedType: com.github.openshift.api.config.v1.ProxySpec - - name: env - type: - list: - elementType: - namedType: io.k8s.api.core.v1.EnvVar - elementRelationship: atomic - - name: gitProxy - type: - namedType: com.github.openshift.api.config.v1.ProxySpec - - name: imageLabels - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ImageLabel - elementRelationship: atomic - - name: resources - type: - namedType: io.k8s.api.core.v1.ResourceRequirements - default: {} -- name: com.github.openshift.api.config.v1.BuildOverrides - map: - fields: - - name: forcePull - type: - scalar: boolean - - name: imageLabels - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ImageLabel - elementRelationship: atomic - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.BuildSpec - map: - fields: - - name: additionalTrustedCA - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: buildDefaults - type: - namedType: com.github.openshift.api.config.v1.BuildDefaults - default: {} - - name: buildOverrides - type: - namedType: com.github.openshift.api.config.v1.BuildOverrides - default: {} -- name: com.github.openshift.api.config.v1.CRIOCredentialProviderConfig - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.CRIOCredentialProviderConfigSpec - - name: status - type: - namedType: com.github.openshift.api.config.v1.CRIOCredentialProviderConfigStatus - default: {} -- name: com.github.openshift.api.config.v1.CRIOCredentialProviderConfigSpec - map: - fields: - - name: matchImages - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.CRIOCredentialProviderConfigStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.config.v1.ClientCredentialConfig - map: - fields: - - name: clientID - type: - scalar: string - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.ClientSecretSecretReference - default: {} - - name: scopes - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: tls - type: - namedType: com.github.openshift.api.config.v1.ExternalSourceTLS - default: {} - - name: tokenEndpoint - type: - scalar: string -- name: com.github.openshift.api.config.v1.ClientSecretSecretReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.CloudControllerManagerStatus - map: - fields: - - name: state - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.CloudLoadBalancerConfig - map: - fields: - - name: clusterHosted - type: - namedType: com.github.openshift.api.config.v1.CloudLoadBalancerIPs - - name: dnsType - type: - scalar: string - default: PlatformDefault - unions: - - discriminator: dnsType - fields: - - fieldName: clusterHosted - discriminatorValue: ClusterHosted -- name: com.github.openshift.api.config.v1.CloudLoadBalancerIPs - map: - fields: - - name: apiIntLoadBalancerIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: apiLoadBalancerIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: ingressLoadBalancerIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.ClusterCondition - map: - fields: - - name: promql - type: - namedType: com.github.openshift.api.config.v1.PromQLClusterCondition - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ClusterImagePolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ClusterImagePolicySpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ClusterImagePolicyStatus - default: {} -- name: com.github.openshift.api.config.v1.ClusterImagePolicySpec - map: - fields: - - name: policy - type: - namedType: com.github.openshift.api.config.v1.ImageSigstoreVerificationPolicy - default: {} - - name: scopes - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.ClusterImagePolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.config.v1.ClusterNetworkEntry - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: hostPrefix - type: - scalar: numeric -- name: com.github.openshift.api.config.v1.ClusterOperator - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ClusterOperatorSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ClusterOperatorStatus - default: {} -- name: com.github.openshift.api.config.v1.ClusterOperatorSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.ClusterOperatorStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ClusterOperatorStatusCondition - elementRelationship: associative - keys: - - type - - name: extension - type: - namedType: __untyped_atomic_ - - name: relatedObjects - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ObjectReference - elementRelationship: atomic - - name: versions - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.OperandVersion - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ClusterOperatorStatusCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ClusterVersion - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ClusterVersionSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ClusterVersionStatus - default: {} -- name: com.github.openshift.api.config.v1.ClusterVersionCapabilitiesSpec - map: - fields: - - name: additionalEnabledCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: baselineCapabilitySet - type: - scalar: string -- name: com.github.openshift.api.config.v1.ClusterVersionCapabilitiesStatus - map: - fields: - - name: enabledCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: knownCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ClusterVersionSpec - map: - fields: - - name: capabilities - type: - namedType: com.github.openshift.api.config.v1.ClusterVersionCapabilitiesSpec - - name: channel - type: - scalar: string - - name: clusterID - type: - scalar: string - default: "" - - name: desiredUpdate - type: - namedType: com.github.openshift.api.config.v1.Update - - name: overrides - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ComponentOverride - elementRelationship: associative - keys: - - kind - - group - - namespace - - name - - name: signatureStores - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.SignatureStore - elementRelationship: associative - keys: - - url - - name: upstream - type: - scalar: string -- name: com.github.openshift.api.config.v1.ClusterVersionStatus - map: - fields: - - name: availableUpdates - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.Release - elementRelationship: atomic - - name: capabilities - type: - namedType: com.github.openshift.api.config.v1.ClusterVersionCapabilitiesStatus - default: {} - - name: conditionalUpdateRisks - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ConditionalUpdateRisk - elementRelationship: associative - keys: - - name - - name: conditionalUpdates - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ConditionalUpdate - elementRelationship: atomic - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ClusterOperatorStatusCondition - elementRelationship: associative - keys: - - type - - name: desired - type: - namedType: com.github.openshift.api.config.v1.Release - default: {} - - name: history - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.UpdateHistory - elementRelationship: atomic - - name: observedGeneration - type: - scalar: numeric - default: 0 - - name: versionHash - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ComponentOverride - map: - fields: - - name: group - type: - scalar: string - default: "" - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: unmanaged - type: - scalar: boolean - default: false -- name: com.github.openshift.api.config.v1.ComponentRouteSpec - map: - fields: - - name: hostname - type: - scalar: string - default: "" - - name: labels - type: - map: - elementType: - scalar: string - elementRelationship: separable - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: servingCertKeyPairSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1.ComponentRouteStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: consumingUsers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: currentHostnames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultHostname - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: relatedObjects - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ObjectReference - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ConditionalUpdate - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: release - type: - namedType: com.github.openshift.api.config.v1.Release - default: {} - - name: riskNames - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: risks - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ConditionalUpdateRisk - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.ConditionalUpdateRisk - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: matchingRules - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ClusterCondition - elementRelationship: atomic - - name: message - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ConfigMapFileReference - map: - fields: - - name: key - type: - scalar: string - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ConfigMapNameReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Console - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ConsoleSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ConsoleStatus - default: {} -- name: com.github.openshift.api.config.v1.ConsoleAuthentication - map: - fields: - - name: logoutRedirect - type: - scalar: string -- name: com.github.openshift.api.config.v1.ConsoleSpec - map: - fields: - - name: authentication - type: - namedType: com.github.openshift.api.config.v1.ConsoleAuthentication - default: {} -- name: com.github.openshift.api.config.v1.ConsoleStatus - map: - fields: - - name: consoleURL - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Custom - map: - fields: - - name: configs - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.GathererConfig - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.CustomFeatureGates - map: - fields: - - name: disabled - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: enabled - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.CustomTLSProfile - map: - fields: - - name: ciphers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: minTLSVersion - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.DNS - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.DNSSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.DNSStatus - default: {} -- name: com.github.openshift.api.config.v1.DNSPlatformSpec - map: - fields: - - name: aws - type: - namedType: com.github.openshift.api.config.v1.AWSDNSSpec - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: aws - discriminatorValue: AWS -- name: com.github.openshift.api.config.v1.DNSSpec - map: - fields: - - name: baseDomain - type: - scalar: string - default: "" - - name: platform - type: - namedType: com.github.openshift.api.config.v1.DNSPlatformSpec - default: {} - - name: privateZone - type: - namedType: com.github.openshift.api.config.v1.DNSZone - - name: publicZone - type: - namedType: com.github.openshift.api.config.v1.DNSZone -- name: com.github.openshift.api.config.v1.DNSStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.DNSZone - map: - fields: - - name: id - type: - scalar: string - - name: tags - type: - map: - elementType: - scalar: string -- name: com.github.openshift.api.config.v1.DeprecatedWebhookTokenAuthenticator - map: - fields: - - name: kubeConfig - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1.EquinixMetalPlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.EquinixMetalPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: ingressIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.ExternalClaimsSource - map: - fields: - - name: authentication - type: - namedType: com.github.openshift.api.config.v1.ExternalSourceAuthentication - default: {} - - name: mappings - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.SourcedClaimMapping - elementRelationship: associative - keys: - - name - - name: predicates - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ExternalSourcePredicate - elementRelationship: associative - keys: - - expression - - name: tls - type: - namedType: com.github.openshift.api.config.v1.ExternalSourceTLS - default: {} - - name: url - type: - namedType: com.github.openshift.api.config.v1.SourceURL - default: {} -- name: com.github.openshift.api.config.v1.ExternalIPConfig - map: - fields: - - name: autoAssignCIDRs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: policy - type: - namedType: com.github.openshift.api.config.v1.ExternalIPPolicy -- name: com.github.openshift.api.config.v1.ExternalIPPolicy - map: - fields: - - name: allowedCIDRs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: rejectedCIDRs - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ExternalPlatformSpec - map: - fields: - - name: platformName - type: - scalar: string - default: Unknown -- name: com.github.openshift.api.config.v1.ExternalPlatformStatus - map: - fields: - - name: cloudControllerManager - type: - namedType: com.github.openshift.api.config.v1.CloudControllerManagerStatus - default: {} -- name: com.github.openshift.api.config.v1.ExternalSourceAuthentication - map: - fields: - - name: clientCredential - type: - namedType: com.github.openshift.api.config.v1.ClientCredentialConfig - default: {} - - name: type - type: - scalar: string -- name: com.github.openshift.api.config.v1.ExternalSourceCertificateAuthorityConfigMapReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.ExternalSourcePredicate - map: - fields: - - name: expression - type: - scalar: string -- name: com.github.openshift.api.config.v1.ExternalSourceTLS - map: - fields: - - name: certificateAuthority - type: - namedType: com.github.openshift.api.config.v1.ExternalSourceCertificateAuthorityConfigMapReference - default: {} -- name: com.github.openshift.api.config.v1.ExtraMapping - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: valueExpression - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.FeatureGate - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.FeatureGateSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.FeatureGateStatus - default: {} -- name: com.github.openshift.api.config.v1.FeatureGateAttributes - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.FeatureGateDetails - map: - fields: - - name: disabled - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.FeatureGateAttributes - elementRelationship: atomic - - name: enabled - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.FeatureGateAttributes - elementRelationship: atomic - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.FeatureGateSpec - map: - fields: - - name: customNoUpgrade - type: - namedType: com.github.openshift.api.config.v1.CustomFeatureGates - - name: featureSet - type: - scalar: string - unions: - - discriminator: featureSet - fields: - - fieldName: customNoUpgrade - discriminatorValue: CustomNoUpgrade -- name: com.github.openshift.api.config.v1.FeatureGateStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: featureGates - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.FeatureGateDetails - elementRelationship: associative - keys: - - version -- name: com.github.openshift.api.config.v1.GCPPlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.GCPPlatformStatus - map: - fields: - - name: cloudLoadBalancerConfig - type: - namedType: com.github.openshift.api.config.v1.CloudLoadBalancerConfig - default: - dnsType: PlatformDefault - - name: projectID - type: - scalar: string - default: "" - - name: region - type: - scalar: string - default: "" - - name: resourceLabels - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.GCPResourceLabel - elementRelationship: associative - keys: - - key - - name: resourceTags - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.GCPResourceTag - elementRelationship: associative - keys: - - key -- name: com.github.openshift.api.config.v1.GCPResourceLabel - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.GCPResourceTag - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: parentID - type: - scalar: string - default: "" - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.GatherConfig - map: - fields: - - name: dataPolicy - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: gatherers - type: - namedType: com.github.openshift.api.config.v1.Gatherers - default: {} - - name: storage - type: - namedType: com.github.openshift.api.config.v1.Storage - default: {} -- name: com.github.openshift.api.config.v1.GathererConfig - map: - fields: - - name: name - type: - scalar: string - - name: state - type: - scalar: string -- name: com.github.openshift.api.config.v1.Gatherers - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1.Custom - default: {} - - name: mode - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: custom - discriminatorValue: Custom -- name: com.github.openshift.api.config.v1.GitHubIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: clientID - type: - scalar: string - default: "" - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: hostname - type: - scalar: string - default: "" - - name: organizations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: teams - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.GitLabIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: clientID - type: - scalar: string - default: "" - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.GoogleIdentityProvider - map: - fields: - - name: clientID - type: - scalar: string - default: "" - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: hostedDomain - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.HTPasswdIdentityProvider - map: - fields: - - name: fileData - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1.HubSource - map: - fields: - - name: disabled - type: - scalar: boolean - default: false - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.HubSourceStatus - map: - fields: - - name: disabled - type: - scalar: boolean - default: false - - name: message - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: status - type: - scalar: string -- name: com.github.openshift.api.config.v1.IBMCloudPlatformSpec - map: - fields: - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.IBMCloudServiceEndpoint - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.IBMCloudPlatformStatus - map: - fields: - - name: cisInstanceCRN - type: - scalar: string - - name: dnsInstanceCRN - type: - scalar: string - - name: location - type: - scalar: string - - name: providerType - type: - scalar: string - - name: resourceGroupName - type: - scalar: string - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.IBMCloudServiceEndpoint - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.IBMCloudServiceEndpoint - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.IdentityProvider - map: - fields: - - name: basicAuth - type: - namedType: com.github.openshift.api.config.v1.BasicAuthIdentityProvider - - name: github - type: - namedType: com.github.openshift.api.config.v1.GitHubIdentityProvider - - name: gitlab - type: - namedType: com.github.openshift.api.config.v1.GitLabIdentityProvider - - name: google - type: - namedType: com.github.openshift.api.config.v1.GoogleIdentityProvider - - name: htpasswd - type: - namedType: com.github.openshift.api.config.v1.HTPasswdIdentityProvider - - name: keystone - type: - namedType: com.github.openshift.api.config.v1.KeystoneIdentityProvider - - name: ldap - type: - namedType: com.github.openshift.api.config.v1.LDAPIdentityProvider - - name: mappingMethod - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: openID - type: - namedType: com.github.openshift.api.config.v1.OpenIDIdentityProvider - - name: requestHeader - type: - namedType: com.github.openshift.api.config.v1.RequestHeaderIdentityProvider - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Image - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ImageSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ImageStatus - default: {} -- name: com.github.openshift.api.config.v1.ImageContentPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ImageContentPolicySpec - default: {} -- name: com.github.openshift.api.config.v1.ImageContentPolicySpec - map: - fields: - - name: repositoryDigestMirrors - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.RepositoryDigestMirrors - elementRelationship: associative - keys: - - source -- name: com.github.openshift.api.config.v1.ImageDigestMirrorSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ImageDigestMirrorSetSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ImageDigestMirrorSetStatus - default: {} -- name: com.github.openshift.api.config.v1.ImageDigestMirrorSetSpec - map: - fields: - - name: imageDigestMirrors - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ImageDigestMirrors - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ImageDigestMirrorSetStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.ImageDigestMirrors - map: - fields: - - name: mirrorSourcePolicy - type: - scalar: string - - name: mirrors - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: source - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ImageLabel - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: value - type: - scalar: string -- name: com.github.openshift.api.config.v1.ImagePolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ImagePolicySpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ImagePolicyStatus - default: {} -- name: com.github.openshift.api.config.v1.ImagePolicyFulcioCAWithRekorRootOfTrust - map: - fields: - - name: fulcioCAData - type: - scalar: string - - name: fulcioSubject - type: - namedType: com.github.openshift.api.config.v1.PolicyFulcioSubject - default: {} - - name: rekorKeyData - type: - scalar: string -- name: com.github.openshift.api.config.v1.ImagePolicyPKIRootOfTrust - map: - fields: - - name: caIntermediatesData - type: - scalar: string - - name: caRootsData - type: - scalar: string - - name: pkiCertificateSubject - type: - namedType: com.github.openshift.api.config.v1.PKICertificateSubject - default: {} -- name: com.github.openshift.api.config.v1.ImagePolicyPublicKeyRootOfTrust - map: - fields: - - name: keyData - type: - scalar: string - - name: rekorKeyData - type: - scalar: string -- name: com.github.openshift.api.config.v1.ImagePolicySpec - map: - fields: - - name: policy - type: - namedType: com.github.openshift.api.config.v1.ImageSigstoreVerificationPolicy - default: {} - - name: scopes - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.ImagePolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.config.v1.ImageSigstoreVerificationPolicy - map: - fields: - - name: rootOfTrust - type: - namedType: com.github.openshift.api.config.v1.PolicyRootOfTrust - default: {} - - name: signedIdentity - type: - namedType: com.github.openshift.api.config.v1.PolicyIdentity -- name: com.github.openshift.api.config.v1.ImageSpec - map: - fields: - - name: additionalTrustedCA - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: allowedRegistriesForImport - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.RegistryLocation - elementRelationship: atomic - - name: externalRegistryHostnames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: imageStreamImportMode - type: - scalar: string - default: "" - - name: registrySources - type: - namedType: com.github.openshift.api.config.v1.RegistrySources - default: {} -- name: com.github.openshift.api.config.v1.ImageStatus - map: - fields: - - name: externalRegistryHostnames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: imageStreamImportMode - type: - scalar: string - - name: internalRegistryHostname - type: - scalar: string -- name: com.github.openshift.api.config.v1.ImageTagMirrorSet - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ImageTagMirrorSetSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ImageTagMirrorSetStatus - default: {} -- name: com.github.openshift.api.config.v1.ImageTagMirrorSetSpec - map: - fields: - - name: imageTagMirrors - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ImageTagMirrors - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.ImageTagMirrorSetStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.ImageTagMirrors - map: - fields: - - name: mirrorSourcePolicy - type: - scalar: string - - name: mirrors - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: source - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Infrastructure - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.InfrastructureSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.InfrastructureStatus - default: {} -- name: com.github.openshift.api.config.v1.InfrastructureSpec - map: - fields: - - name: cloudConfig - type: - namedType: com.github.openshift.api.config.v1.ConfigMapFileReference - default: {} - - name: controlPlaneTopology - type: - scalar: string - - name: platformSpec - type: - namedType: com.github.openshift.api.config.v1.PlatformSpec - default: {} -- name: com.github.openshift.api.config.v1.InfrastructureStatus - map: - fields: - - name: apiServerInternalURI - type: - scalar: string - default: "" - - name: apiServerURL - type: - scalar: string - default: "" - - name: controlPlaneTopology - type: - scalar: string - default: "" - - name: cpuPartitioning - type: - scalar: string - default: None - - name: etcdDiscoveryDomain - type: - scalar: string - default: "" - - name: infrastructureName - type: - scalar: string - default: "" - - name: infrastructureTopology - type: - scalar: string - - name: platform - type: - scalar: string - - name: platformStatus - type: - namedType: com.github.openshift.api.config.v1.PlatformStatus -- name: com.github.openshift.api.config.v1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.IngressSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.IngressStatus - default: {} -- name: com.github.openshift.api.config.v1.IngressPlatformSpec - map: - fields: - - name: aws - type: - namedType: com.github.openshift.api.config.v1.AWSIngressSpec - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: aws - discriminatorValue: AWS -- name: com.github.openshift.api.config.v1.IngressSpec - map: - fields: - - name: appsDomain - type: - scalar: string - - name: componentRoutes - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ComponentRouteSpec - elementRelationship: associative - keys: - - namespace - - name - - name: domain - type: - scalar: string - default: "" - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.LoadBalancer - default: {} - - name: requiredHSTSPolicies - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.RequiredHSTSPolicy - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.IngressStatus - map: - fields: - - name: componentRoutes - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ComponentRouteStatus - elementRelationship: associative - keys: - - namespace - - name - - name: defaultPlacement - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.InsightsDataGather - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.InsightsDataGatherSpec - default: {} -- name: com.github.openshift.api.config.v1.InsightsDataGatherSpec - map: - fields: - - name: gatherConfig - type: - namedType: com.github.openshift.api.config.v1.GatherConfig - default: {} -- name: com.github.openshift.api.config.v1.IntermediateTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.KMSPluginConfig - map: - fields: - - name: type - type: - scalar: string - default: "" - - name: vault - type: - namedType: com.github.openshift.api.config.v1.VaultKMSPluginConfig - default: {} - unions: - - discriminator: type - fields: - - fieldName: vault - discriminatorValue: Vault -- name: com.github.openshift.api.config.v1.KeystoneIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: domainName - type: - scalar: string - default: "" - - name: tlsClientCert - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: tlsClientKey - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.KubevirtPlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.KubevirtPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: ingressIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.LDAPAttributeMapping - map: - fields: - - name: email - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: id - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: name - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: preferredUsername - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.LDAPIdentityProvider - map: - fields: - - name: attributes - type: - namedType: com.github.openshift.api.config.v1.LDAPAttributeMapping - default: {} - - name: bindDN - type: - scalar: string - default: "" - - name: bindPassword - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: insecure - type: - scalar: boolean - default: false - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.LoadBalancer - map: - fields: - - name: platform - type: - namedType: com.github.openshift.api.config.v1.IngressPlatformSpec - default: {} -- name: com.github.openshift.api.config.v1.MTUMigration - map: - fields: - - name: machine - type: - namedType: com.github.openshift.api.config.v1.MTUMigrationValues - - name: network - type: - namedType: com.github.openshift.api.config.v1.MTUMigrationValues -- name: com.github.openshift.api.config.v1.MTUMigrationValues - map: - fields: - - name: from - type: - scalar: numeric - - name: to - type: - scalar: numeric -- name: com.github.openshift.api.config.v1.MaxAgePolicy - map: - fields: - - name: largestMaxAge - type: - scalar: numeric - - name: smallestMaxAge - type: - scalar: numeric -- name: com.github.openshift.api.config.v1.ModernTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.Network - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.NetworkSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.NetworkStatus - default: {} -- name: com.github.openshift.api.config.v1.NetworkDiagnostics - map: - fields: - - name: mode - type: - scalar: string - default: "" - - name: sourcePlacement - type: - namedType: com.github.openshift.api.config.v1.NetworkDiagnosticsSourcePlacement - default: {} - - name: targetPlacement - type: - namedType: com.github.openshift.api.config.v1.NetworkDiagnosticsTargetPlacement - default: {} -- name: com.github.openshift.api.config.v1.NetworkDiagnosticsSourcePlacement - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.NetworkDiagnosticsTargetPlacement - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.NetworkMigration - map: - fields: - - name: mtu - type: - namedType: com.github.openshift.api.config.v1.MTUMigration - - name: networkType - type: - scalar: string -- name: com.github.openshift.api.config.v1.NetworkObservabilitySpec - map: - fields: - - name: installationPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1.NetworkSpec - map: - fields: - - name: clusterNetwork - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ClusterNetworkEntry - elementRelationship: atomic - - name: externalIP - type: - namedType: com.github.openshift.api.config.v1.ExternalIPConfig - - name: networkDiagnostics - type: - namedType: com.github.openshift.api.config.v1.NetworkDiagnostics - default: {} - - name: networkObservability - type: - namedType: com.github.openshift.api.config.v1.NetworkObservabilitySpec - default: {} - - name: networkType - type: - scalar: string - default: "" - - name: serviceNetwork - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: serviceNodePortRange - type: - scalar: string -- name: com.github.openshift.api.config.v1.NetworkStatus - map: - fields: - - name: clusterNetwork - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ClusterNetworkEntry - elementRelationship: atomic - - name: clusterNetworkMTU - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: migration - type: - namedType: com.github.openshift.api.config.v1.NetworkMigration - - name: networkType - type: - scalar: string - - name: serviceNetwork - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.Node - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.NodeSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.NodeStatus - default: {} -- name: com.github.openshift.api.config.v1.NodeSpec - map: - fields: - - name: cgroupMode - type: - scalar: string - - name: minimumKubeletVersion - type: - scalar: string - default: "" - - name: workerLatencyProfile - type: - scalar: string -- name: com.github.openshift.api.config.v1.NodeStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.config.v1.NutanixFailureDomain - map: - fields: - - name: cluster - type: - namedType: com.github.openshift.api.config.v1.NutanixResourceIdentifier - default: {} - - name: name - type: - scalar: string - default: "" - - name: subnets - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.NutanixResourceIdentifier - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.NutanixPlatformLoadBalancer - map: - fields: - - name: type - type: - scalar: string - default: OpenShiftManagedDefault - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.NutanixPlatformSpec - map: - fields: - - name: failureDomains - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.NutanixFailureDomain - elementRelationship: associative - keys: - - name - - name: prismCentral - type: - namedType: com.github.openshift.api.config.v1.NutanixPrismEndpoint - default: {} - - name: prismElements - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.NutanixPrismElementEndpoint - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.NutanixPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: dnsRecordsType - type: - scalar: string - - name: ingressIP - type: - scalar: string - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.NutanixPlatformLoadBalancer - default: - type: OpenShiftManagedDefault -- name: com.github.openshift.api.config.v1.NutanixPrismElementEndpoint - map: - fields: - - name: endpoint - type: - namedType: com.github.openshift.api.config.v1.NutanixPrismEndpoint - default: {} - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.NutanixPrismEndpoint - map: - fields: - - name: address - type: - scalar: string - default: "" - - name: port - type: - scalar: numeric - default: 0 -- name: com.github.openshift.api.config.v1.NutanixResourceIdentifier - map: - fields: - - name: name - type: - scalar: string - - name: type - type: - scalar: string - default: "" - - name: uuid - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: name - discriminatorValue: Name - - fieldName: uuid - discriminatorValue: UUID -- name: com.github.openshift.api.config.v1.OAuth - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.OAuthSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.OAuthStatus - default: {} -- name: com.github.openshift.api.config.v1.OAuthSpec - map: - fields: - - name: identityProviders - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.IdentityProvider - elementRelationship: atomic - - name: templates - type: - namedType: com.github.openshift.api.config.v1.OAuthTemplates - default: {} - - name: tokenConfig - type: - namedType: com.github.openshift.api.config.v1.TokenConfig - default: {} -- name: com.github.openshift.api.config.v1.OAuthStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.OAuthTemplates - map: - fields: - - name: error - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: login - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: providerSelection - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1.OIDCClientConfig - map: - fields: - - name: clientID - type: - scalar: string - default: "" - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: componentName - type: - scalar: string - default: "" - - name: componentNamespace - type: - scalar: string - default: "" - - name: extraScopes - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.OIDCClientReference - map: - fields: - - name: clientID - type: - scalar: string - default: "" - - name: issuerURL - type: - scalar: string - default: "" - - name: oidcProviderName - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.OIDCClientStatus - map: - fields: - - name: componentName - type: - scalar: string - default: "" - - name: componentNamespace - type: - scalar: string - default: "" - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: consumingUsers - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: currentOIDCClients - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.OIDCClientReference - elementRelationship: associative - keys: - - issuerURL - - clientID -- name: com.github.openshift.api.config.v1.OIDCProvider - map: - fields: - - name: claimMappings - type: - namedType: com.github.openshift.api.config.v1.TokenClaimMappings - default: {} - - name: claimValidationRules - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.TokenClaimValidationRule - elementRelationship: atomic - - name: externalClaimsSources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ExternalClaimsSource - elementRelationship: atomic - - name: issuer - type: - namedType: com.github.openshift.api.config.v1.TokenIssuer - default: {} - - name: name - type: - scalar: string - default: "" - - name: oidcClients - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.OIDCClientConfig - elementRelationship: associative - keys: - - componentNamespace - - componentName - - name: userValidationRules - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.TokenUserValidationRule - elementRelationship: associative - keys: - - expression -- name: com.github.openshift.api.config.v1.ObjectReference - map: - fields: - - name: group - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - - name: resource - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.OldTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.OpenIDClaims - map: - fields: - - name: email - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: name - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: preferredUsername - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.OpenIDIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: claims - type: - namedType: com.github.openshift.api.config.v1.OpenIDClaims - default: {} - - name: clientID - type: - scalar: string - default: "" - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} - - name: extraAuthorizeParameters - type: - map: - elementType: - scalar: string - - name: extraScopes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: issuer - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.OpenStackPlatformLoadBalancer - map: - fields: - - name: type - type: - scalar: string - default: OpenShiftManagedDefault - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.OpenStackPlatformSpec - map: - fields: - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.OpenStackPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: cloudName - type: - scalar: string - - name: dnsRecordsType - type: - scalar: string - - name: ingressIP - type: - scalar: string - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.OpenStackPlatformLoadBalancer - default: - type: OpenShiftManagedDefault - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nodeDNSIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.OperandVersion - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.OperatorHub - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.OperatorHubSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.OperatorHubStatus - default: {} -- name: com.github.openshift.api.config.v1.OperatorHubSpec - map: - fields: - - name: disableAllDefaultSources - type: - scalar: boolean - - name: sources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.HubSource - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.OperatorHubStatus - map: - fields: - - name: sources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.HubSourceStatus - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.OvirtPlatformLoadBalancer - map: - fields: - - name: type - type: - scalar: string - default: OpenShiftManagedDefault - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.OvirtPlatformSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.OvirtPlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: dnsRecordsType - type: - scalar: string - - name: ingressIP - type: - scalar: string - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.OvirtPlatformLoadBalancer - default: - type: OpenShiftManagedDefault - - name: nodeDNSIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.PKICertificateSubject - map: - fields: - - name: email - type: - scalar: string - - name: hostname - type: - scalar: string -- name: com.github.openshift.api.config.v1.PersistentVolumeClaimReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.PersistentVolumeConfig - map: - fields: - - name: claim - type: - namedType: com.github.openshift.api.config.v1.PersistentVolumeClaimReference - default: {} - - name: mountPath - type: - scalar: string -- name: com.github.openshift.api.config.v1.PlatformSpec - map: - fields: - - name: alibabaCloud - type: - namedType: com.github.openshift.api.config.v1.AlibabaCloudPlatformSpec - - name: aws - type: - namedType: com.github.openshift.api.config.v1.AWSPlatformSpec - - name: azure - type: - namedType: com.github.openshift.api.config.v1.AzurePlatformSpec - - name: baremetal - type: - namedType: com.github.openshift.api.config.v1.BareMetalPlatformSpec - - name: equinixMetal - type: - namedType: com.github.openshift.api.config.v1.EquinixMetalPlatformSpec - - name: external - type: - namedType: com.github.openshift.api.config.v1.ExternalPlatformSpec - - name: gcp - type: - namedType: com.github.openshift.api.config.v1.GCPPlatformSpec - - name: ibmcloud - type: - namedType: com.github.openshift.api.config.v1.IBMCloudPlatformSpec - - name: kubevirt - type: - namedType: com.github.openshift.api.config.v1.KubevirtPlatformSpec - - name: nutanix - type: - namedType: com.github.openshift.api.config.v1.NutanixPlatformSpec - - name: openstack - type: - namedType: com.github.openshift.api.config.v1.OpenStackPlatformSpec - - name: ovirt - type: - namedType: com.github.openshift.api.config.v1.OvirtPlatformSpec - - name: powervs - type: - namedType: com.github.openshift.api.config.v1.PowerVSPlatformSpec - - name: type - type: - scalar: string - default: "" - - name: vsphere - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformSpec -- name: com.github.openshift.api.config.v1.PlatformStatus - map: - fields: - - name: alibabaCloud - type: - namedType: com.github.openshift.api.config.v1.AlibabaCloudPlatformStatus - - name: aws - type: - namedType: com.github.openshift.api.config.v1.AWSPlatformStatus - - name: azure - type: - namedType: com.github.openshift.api.config.v1.AzurePlatformStatus - - name: baremetal - type: - namedType: com.github.openshift.api.config.v1.BareMetalPlatformStatus - - name: equinixMetal - type: - namedType: com.github.openshift.api.config.v1.EquinixMetalPlatformStatus - - name: external - type: - namedType: com.github.openshift.api.config.v1.ExternalPlatformStatus - - name: gcp - type: - namedType: com.github.openshift.api.config.v1.GCPPlatformStatus - - name: ibmcloud - type: - namedType: com.github.openshift.api.config.v1.IBMCloudPlatformStatus - - name: kubevirt - type: - namedType: com.github.openshift.api.config.v1.KubevirtPlatformStatus - - name: nutanix - type: - namedType: com.github.openshift.api.config.v1.NutanixPlatformStatus - - name: openstack - type: - namedType: com.github.openshift.api.config.v1.OpenStackPlatformStatus - - name: ovirt - type: - namedType: com.github.openshift.api.config.v1.OvirtPlatformStatus - - name: powervs - type: - namedType: com.github.openshift.api.config.v1.PowerVSPlatformStatus - - name: type - type: - scalar: string - default: "" - - name: vsphere - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformStatus -- name: com.github.openshift.api.config.v1.PolicyFulcioSubject - map: - fields: - - name: oidcIssuer - type: - scalar: string - default: "" - - name: signedEmail - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.PolicyIdentity - map: - fields: - - name: exactRepository - type: - namedType: com.github.openshift.api.config.v1.PolicyMatchExactRepository - - name: matchPolicy - type: - scalar: string - default: "" - - name: remapIdentity - type: - namedType: com.github.openshift.api.config.v1.PolicyMatchRemapIdentity - unions: - - discriminator: matchPolicy - fields: - - fieldName: exactRepository - discriminatorValue: PolicyMatchExactRepository - - fieldName: remapIdentity - discriminatorValue: PolicyMatchRemapIdentity -- name: com.github.openshift.api.config.v1.PolicyMatchExactRepository - map: - fields: - - name: repository - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.PolicyMatchRemapIdentity - map: - fields: - - name: prefix - type: - scalar: string - default: "" - - name: signedPrefix - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.PolicyRootOfTrust - map: - fields: - - name: fulcioCAWithRekor - type: - namedType: com.github.openshift.api.config.v1.ImagePolicyFulcioCAWithRekorRootOfTrust - - name: pki - type: - namedType: com.github.openshift.api.config.v1.ImagePolicyPKIRootOfTrust - - name: policyType - type: - scalar: string - default: "" - - name: publicKey - type: - namedType: com.github.openshift.api.config.v1.ImagePolicyPublicKeyRootOfTrust - unions: - - discriminator: policyType - fields: - - fieldName: fulcioCAWithRekor - discriminatorValue: FulcioCAWithRekor - - fieldName: pki - discriminatorValue: PKI - - fieldName: publicKey - discriminatorValue: PublicKey -- name: com.github.openshift.api.config.v1.PowerVSPlatformSpec - map: - fields: - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.PowerVSServiceEndpoint - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1.PowerVSPlatformStatus - map: - fields: - - name: cisInstanceCRN - type: - scalar: string - - name: dnsInstanceCRN - type: - scalar: string - - name: region - type: - scalar: string - default: "" - - name: resourceGroup - type: - scalar: string - default: "" - - name: serviceEndpoints - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.PowerVSServiceEndpoint - elementRelationship: associative - keys: - - name - - name: zone - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.PowerVSServiceEndpoint - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.PrefixedClaimMapping - map: - fields: - - name: claim - type: - scalar: string - default: "" - - name: expression - type: - scalar: string - - name: prefix - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ProfileCustomizations - map: - fields: - - name: dynamicResourceAllocation - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Project - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ProjectSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ProjectStatus - default: {} -- name: com.github.openshift.api.config.v1.ProjectSpec - map: - fields: - - name: projectRequestMessage - type: - scalar: string - default: "" - - name: projectRequestTemplate - type: - namedType: com.github.openshift.api.config.v1.TemplateReference - default: {} -- name: com.github.openshift.api.config.v1.ProjectStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.PromQLClusterCondition - map: - fields: - - name: promql - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.Proxy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.ProxySpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.ProxyStatus - default: {} -- name: com.github.openshift.api.config.v1.ProxySpec - map: - fields: - - name: httpProxy - type: - scalar: string - - name: httpsProxy - type: - scalar: string - - name: noProxy - type: - scalar: string - - name: readinessEndpoints - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: trustedCA - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} -- name: com.github.openshift.api.config.v1.ProxyStatus - map: - fields: - - name: httpProxy - type: - scalar: string - - name: httpsProxy - type: - scalar: string - - name: noProxy - type: - scalar: string -- name: com.github.openshift.api.config.v1.RegistryLocation - map: - fields: - - name: domainName - type: - scalar: string - default: "" - - name: insecure - type: - scalar: boolean -- name: com.github.openshift.api.config.v1.RegistrySources - map: - fields: - - name: allowedRegistries - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: blockedRegistries - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: containerRuntimeSearchRegistries - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: insecureRegistries - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.Release - map: - fields: - - name: architecture - type: - scalar: string - - name: channels - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: image - type: - scalar: string - default: "" - - name: url - type: - scalar: string - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.RepositoryDigestMirrors - map: - fields: - - name: allowMirrorByTags - type: - scalar: boolean - - name: mirrors - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: source - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.RequestHeaderIdentityProvider - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: challengeURL - type: - scalar: string - default: "" - - name: clientCommonNames - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: emailHeaders - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: headers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: loginURL - type: - scalar: string - default: "" - - name: nameHeaders - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: preferredUsernameHeaders - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.RequiredHSTSPolicy - map: - fields: - - name: domainPatterns - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: includeSubDomainsPolicy - type: - scalar: string - - name: maxAge - type: - namedType: com.github.openshift.api.config.v1.MaxAgePolicy - default: {} - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: preloadPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1.Scheduler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1.SchedulerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1.SchedulerStatus - default: {} -- name: com.github.openshift.api.config.v1.SchedulerSpec - map: - fields: - - name: defaultNodeSelector - type: - scalar: string - - name: mastersSchedulable - type: - scalar: boolean - default: false - - name: policy - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: profile - type: - scalar: string - - name: profileCustomizations - type: - namedType: com.github.openshift.api.config.v1.ProfileCustomizations - default: {} -- name: com.github.openshift.api.config.v1.SchedulerStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.SecretNameReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.SignatureStore - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: url - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.SourceURL - map: - fields: - - name: hostname - type: - scalar: string - - name: pathExpression - type: - scalar: string -- name: com.github.openshift.api.config.v1.SourcedClaimMapping - map: - fields: - - name: expression - type: - scalar: string - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.Storage - map: - fields: - - name: persistentVolume - type: - namedType: com.github.openshift.api.config.v1.PersistentVolumeConfig - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: persistentVolume - discriminatorValue: PersistentVolume -- name: com.github.openshift.api.config.v1.TLSSecurityProfile - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1.CustomTLSProfile - - name: intermediate - type: - namedType: com.github.openshift.api.config.v1.IntermediateTLSProfile - - name: modern - type: - namedType: com.github.openshift.api.config.v1.ModernTLSProfile - - name: old - type: - namedType: com.github.openshift.api.config.v1.OldTLSProfile - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: custom - discriminatorValue: Custom - - fieldName: intermediate - discriminatorValue: Intermediate - - fieldName: modern - discriminatorValue: Modern - - fieldName: old - discriminatorValue: Old -- name: com.github.openshift.api.config.v1.TemplateReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TokenClaimMappings - map: - fields: - - name: extra - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.ExtraMapping - elementRelationship: associative - keys: - - key - - name: groups - type: - namedType: com.github.openshift.api.config.v1.PrefixedClaimMapping - default: {} - - name: uid - type: - namedType: com.github.openshift.api.config.v1.TokenClaimOrExpressionMapping - - name: username - type: - namedType: com.github.openshift.api.config.v1.UsernameClaimMapping - default: {} -- name: com.github.openshift.api.config.v1.TokenClaimOrExpressionMapping - map: - fields: - - name: claim - type: - scalar: string - - name: expression - type: - scalar: string -- name: com.github.openshift.api.config.v1.TokenClaimValidationCELRule - map: - fields: - - name: expression - type: - scalar: string - - name: message - type: - scalar: string -- name: com.github.openshift.api.config.v1.TokenClaimValidationRule - map: - fields: - - name: cel - type: - namedType: com.github.openshift.api.config.v1.TokenClaimValidationCELRule - default: {} - - name: requiredClaim - type: - namedType: com.github.openshift.api.config.v1.TokenRequiredClaim - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TokenConfig - map: - fields: - - name: accessTokenInactivityTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: accessTokenInactivityTimeoutSeconds - type: - scalar: numeric - - name: accessTokenMaxAgeSeconds - type: - scalar: numeric -- name: com.github.openshift.api.config.v1.TokenIssuer - map: - fields: - - name: audiences - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: discoveryURL - type: - scalar: string - - name: issuerCertificateAuthority - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: issuerURL - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TokenRequiredClaim - map: - fields: - - name: claim - type: - scalar: string - default: "" - - name: requiredValue - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TokenUserValidationRule - map: - fields: - - name: expression - type: - scalar: string - - name: message - type: - scalar: string -- name: com.github.openshift.api.config.v1.Update - map: - fields: - - name: acceptRisks - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.AcceptRisk - elementRelationship: associative - keys: - - name - - name: architecture - type: - scalar: string - default: "" - - name: force - type: - scalar: boolean - default: false - - name: image - type: - scalar: string - default: "" - - name: mode - type: - scalar: string - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.UpdateHistory - map: - fields: - - name: acceptedRisks - type: - scalar: string - - name: completionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: image - type: - scalar: string - default: "" - - name: startedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: state - type: - scalar: string - default: "" - - name: verified - type: - scalar: boolean - default: false - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.UsernameClaimMapping - map: - fields: - - name: claim - type: - scalar: string - - name: expression - type: - scalar: string - - name: prefix - type: - namedType: com.github.openshift.api.config.v1.UsernamePrefix - - name: prefixPolicy - type: - scalar: string - default: "" - unions: - - discriminator: prefixPolicy - fields: - - fieldName: claim - discriminatorValue: Claim - - fieldName: expression - discriminatorValue: Expression - - fieldName: prefix - discriminatorValue: Prefix -- name: com.github.openshift.api.config.v1.UsernamePrefix - map: - fields: - - name: prefixString - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.VSphereFailureDomainHostGroup - map: - fields: - - name: hostGroup - type: - scalar: string - default: "" - - name: vmGroup - type: - scalar: string - default: "" - - name: vmHostRule - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.VSphereFailureDomainRegionAffinity - map: - fields: - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.VSphereFailureDomainZoneAffinity - map: - fields: - - name: hostGroup - type: - namedType: com.github.openshift.api.config.v1.VSphereFailureDomainHostGroup - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: hostGroup - discriminatorValue: HostGroup -- name: com.github.openshift.api.config.v1.VSpherePlatformFailureDomainSpec - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: region - type: - scalar: string - default: "" - - name: regionAffinity - type: - namedType: com.github.openshift.api.config.v1.VSphereFailureDomainRegionAffinity - - name: server - type: - scalar: string - default: "" - - name: topology - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformTopology - default: {} - - name: zone - type: - scalar: string - default: "" - - name: zoneAffinity - type: - namedType: com.github.openshift.api.config.v1.VSphereFailureDomainZoneAffinity -- name: com.github.openshift.api.config.v1.VSpherePlatformLoadBalancer - map: - fields: - - name: type - type: - scalar: string - default: OpenShiftManagedDefault - unions: - - discriminator: type -- name: com.github.openshift.api.config.v1.VSpherePlatformNodeNetworking - map: - fields: - - name: external - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformNodeNetworkingSpec - default: {} - - name: internal - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformNodeNetworkingSpec - default: {} -- name: com.github.openshift.api.config.v1.VSpherePlatformNodeNetworkingSpec - map: - fields: - - name: excludeNetworkSubnetCidr - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: network - type: - scalar: string - - name: networkSubnetCidr - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1.VSpherePlatformSpec - map: - fields: - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: failureDomains - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.VSpherePlatformFailureDomainSpec - elementRelationship: associative - keys: - - name - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nodeNetworking - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformNodeNetworking - default: {} - - name: vcenters - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1.VSpherePlatformVCenterSpec - elementRelationship: atomic -- name: com.github.openshift.api.config.v1.VSpherePlatformStatus - map: - fields: - - name: apiServerInternalIP - type: - scalar: string - - name: apiServerInternalIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: dnsRecordsType - type: - scalar: string - - name: ingressIP - type: - scalar: string - - name: ingressIPs - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: loadBalancer - type: - namedType: com.github.openshift.api.config.v1.VSpherePlatformLoadBalancer - default: - type: OpenShiftManagedDefault - - name: machineNetworks - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: nodeDNSIP - type: - scalar: string -- name: com.github.openshift.api.config.v1.VSpherePlatformTopology - map: - fields: - - name: computeCluster - type: - scalar: string - default: "" - - name: datacenter - type: - scalar: string - default: "" - - name: datastore - type: - scalar: string - default: "" - - name: folder - type: - scalar: string - - name: networks - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: resourcePool - type: - scalar: string - - name: template - type: - scalar: string -- name: com.github.openshift.api.config.v1.VSpherePlatformVCenterSpec - map: - fields: - - name: datacenters - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: port - type: - scalar: numeric - - name: server - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.VaultAppRoleAuthentication - map: - fields: - - name: secret - type: - namedType: com.github.openshift.api.config.v1.VaultSecretReference - default: {} -- name: com.github.openshift.api.config.v1.VaultAuthentication - map: - fields: - - name: appRole - type: - namedType: com.github.openshift.api.config.v1.VaultAppRoleAuthentication - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: appRole - discriminatorValue: AppRole -- name: com.github.openshift.api.config.v1.VaultConfigMapReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.VaultKMSPluginConfig - map: - fields: - - name: authentication - type: - namedType: com.github.openshift.api.config.v1.VaultAuthentication - default: {} - - name: kmsPluginImage - type: - scalar: string - - name: tls - type: - namedType: com.github.openshift.api.config.v1.VaultTLSConfig - default: {} - - name: transitKey - type: - scalar: string - - name: transitMount - type: - scalar: string - - name: vaultAddress - type: - scalar: string - - name: vaultNamespace - type: - scalar: string -- name: com.github.openshift.api.config.v1.VaultSecretReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.config.v1.VaultTLSConfig - map: - fields: - - name: caBundle - type: - namedType: com.github.openshift.api.config.v1.VaultConfigMapReference - default: {} - - name: serverName - type: - scalar: string -- name: com.github.openshift.api.config.v1.WebhookTokenAuthenticator - map: - fields: - - name: kubeConfig - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.config.v1alpha1.AdditionalAlertmanagerConfig - map: - fields: - - name: authorization - type: - namedType: com.github.openshift.api.config.v1alpha1.AuthorizationConfig - default: {} - - name: name - type: - scalar: string - - name: pathPrefix - type: - scalar: string - - name: scheme - type: - scalar: string - - name: staticConfigs - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: timeoutSeconds - type: - scalar: numeric - - name: tlsConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.TLSConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.AlertmanagerConfig - map: - fields: - - name: customConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.AlertmanagerCustomConfig - default: {} - - name: deploymentMode - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.AlertmanagerCustomConfig - map: - fields: - - name: logLevel - type: - scalar: string - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: secrets - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable - - name: userAlertmanagerConfigSelection - type: - scalar: string - - name: volumeClaimTemplate - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim -- name: com.github.openshift.api.config.v1alpha1.Audit - map: - fields: - - name: profile - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.AuthorizationConfig - map: - fields: - - name: bearerToken - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: bearerToken - discriminatorValue: BearerToken -- name: com.github.openshift.api.config.v1alpha1.Backup - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha1.BackupSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1alpha1.BackupStatus - default: {} -- name: com.github.openshift.api.config.v1alpha1.BackupSpec - map: - fields: - - name: etcd - type: - namedType: com.github.openshift.api.config.v1alpha1.EtcdBackupSpec - default: {} -- name: com.github.openshift.api.config.v1alpha1.BackupStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1alpha1.BasicAuth - map: - fields: - - name: password - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: username - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} -- name: com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfig - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigSpec - - name: status - type: - namedType: com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigStatus - default: {} -- name: com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigSpec - map: - fields: - - name: matchImages - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1alpha1.CRIOCredentialProviderConfigStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.config.v1alpha1.CertificateConfig - map: - fields: - - name: key - type: - namedType: com.github.openshift.api.config.v1alpha1.KeyConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.ClusterMonitoring - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha1.ClusterMonitoringSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1alpha1.ClusterMonitoringStatus - default: {} -- name: com.github.openshift.api.config.v1alpha1.ClusterMonitoringSpec - map: - fields: - - name: alertmanagerConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.AlertmanagerConfig - default: {} - - name: kubeStateMetricsConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.KubeStateMetricsConfig - default: {} - - name: metricsServerConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.MetricsServerConfig - default: {} - - name: monitoringPluginConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.MonitoringPluginConfig - default: {} - - name: nodeExporterConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterConfig - default: {} - - name: openShiftStateMetricsConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.OpenShiftStateMetricsConfig - default: {} - - name: prometheusConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.PrometheusConfig - default: {} - - name: prometheusOperatorAdmissionWebhookConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.PrometheusOperatorAdmissionWebhookConfig - default: {} - - name: prometheusOperatorConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.PrometheusOperatorConfig - default: {} - - name: telemeterClientConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.TelemeterClientConfig - default: {} - - name: thanosQuerierConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.ThanosQuerierConfig - default: {} - - name: userDefined - type: - namedType: com.github.openshift.api.config.v1alpha1.UserDefinedMonitoring - default: {} -- name: com.github.openshift.api.config.v1alpha1.ClusterMonitoringStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1alpha1.ContainerResource - map: - fields: - - name: limit - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: name - type: - scalar: string - - name: request - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: com.github.openshift.api.config.v1alpha1.CustomPKIPolicy - map: - fields: - - name: clientCertificates - type: - namedType: com.github.openshift.api.config.v1alpha1.CertificateConfig - default: {} - - name: defaults - type: - namedType: com.github.openshift.api.config.v1alpha1.DefaultCertificateConfig - default: {} - - name: servingCertificates - type: - namedType: com.github.openshift.api.config.v1alpha1.CertificateConfig - default: {} - - name: signerCertificates - type: - namedType: com.github.openshift.api.config.v1alpha1.CertificateConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.DefaultCertificateConfig - map: - fields: - - name: key - type: - namedType: com.github.openshift.api.config.v1alpha1.KeyConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.DropEqualActionConfig - map: - fields: - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.ECDSAKeyConfig - map: - fields: - - name: curve - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.EtcdBackupSpec - map: - fields: - - name: pvcName - type: - scalar: string - default: "" - - name: retentionPolicy - type: - namedType: com.github.openshift.api.config.v1alpha1.RetentionPolicy - default: {} - - name: schedule - type: - scalar: string - default: "" - - name: timeZone - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha1.GatherConfig - map: - fields: - - name: dataPolicy - type: - scalar: string - - name: disabledGatherers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: storage - type: - namedType: com.github.openshift.api.config.v1alpha1.Storage -- name: com.github.openshift.api.config.v1alpha1.HashModActionConfig - map: - fields: - - name: modulus - type: - scalar: numeric - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.InsightsDataGather - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha1.InsightsDataGatherSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1alpha1.InsightsDataGatherStatus - default: {} -- name: com.github.openshift.api.config.v1alpha1.InsightsDataGatherSpec - map: - fields: - - name: gatherConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.GatherConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.InsightsDataGatherStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1alpha1.KeepEqualActionConfig - map: - fields: - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.KeyConfig - map: - fields: - - name: algorithm - type: - scalar: string - - name: ecdsa - type: - namedType: com.github.openshift.api.config.v1alpha1.ECDSAKeyConfig - default: {} - - name: rsa - type: - namedType: com.github.openshift.api.config.v1alpha1.RSAKeyConfig - default: {} - unions: - - discriminator: algorithm - fields: - - fieldName: ecdsa - discriminatorValue: ECDSA - - fieldName: rsa - discriminatorValue: RSA -- name: com.github.openshift.api.config.v1alpha1.KubeStateMetricsConfig - map: - fields: - - name: additionalResourceLabels - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.KubeStateMetricsResourceLabels - elementRelationship: associative - keys: - - resource - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.KubeStateMetricsResourceLabels - map: - fields: - - name: labels - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resource - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.Label - map: - fields: - - name: key - type: - scalar: string - - name: value - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.LabelMapActionConfig - map: - fields: - - name: replacement - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.LowercaseActionConfig - map: - fields: - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.MetadataConfig - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1alpha1.MetadataConfigCustom - default: {} - - name: sendPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.MetadataConfigCustom - map: - fields: - - name: sendIntervalSeconds - type: - scalar: numeric -- name: com.github.openshift.api.config.v1alpha1.MetricsServerConfig - map: - fields: - - name: audit - type: - namedType: com.github.openshift.api.config.v1alpha1.Audit - default: {} - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable - - name: verbosity - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.MonitoringPluginConfig - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorBuddyInfoConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorConfig - map: - fields: - - name: buddyInfo - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorBuddyInfoConfig - default: {} - - name: cpuFreq - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig - default: {} - - name: ethtool - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig - default: {} - - name: ksmd - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorKSMDConfig - default: {} - - name: mountStats - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorMountStatsConfig - default: {} - - name: netClass - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassConfig - default: {} - - name: netDev - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetDevConfig - default: {} - - name: processes - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorProcessesConfig - default: {} - - name: softirqs - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSoftirqsConfig - default: {} - - name: systemd - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdConfig - default: {} - - name: tcpStat - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig - default: {} -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorCpufreqConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorEthtoolConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorKSMDConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorMountStatsConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassCollectConfig - map: - fields: - - name: statsGatherer - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassConfig - map: - fields: - - name: collect - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetClassCollectConfig - default: {} - - name: collectionPolicy - type: - scalar: string - unions: - - discriminator: collectionPolicy - fields: - - fieldName: collect - discriminatorValue: Collect -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorNetDevConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorProcessesConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSoftirqsConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdCollectConfig - map: - fields: - - name: units - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdConfig - map: - fields: - - name: collect - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorSystemdCollectConfig - default: {} - - name: collectionPolicy - type: - scalar: string - unions: - - discriminator: collectionPolicy - fields: - - fieldName: collect - discriminatorValue: Collect -- name: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorTcpStatConfig - map: - fields: - - name: collectionPolicy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.NodeExporterConfig - map: - fields: - - name: collectors - type: - namedType: com.github.openshift.api.config.v1alpha1.NodeExporterCollectorConfig - default: {} - - name: ignoredNetworkDevices - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: maxProcs - type: - scalar: numeric - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1alpha1.OAuth2 - map: - fields: - - name: clientId - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: clientSecret - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: endpointParams - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.OAuth2EndpointParam - elementRelationship: associative - keys: - - name - - name: scopes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: tokenUrl - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.OAuth2EndpointParam - map: - fields: - - name: name - type: - scalar: string - - name: value - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.OpenShiftStateMetricsConfig - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.PKI - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha1.PKISpec - default: {} -- name: com.github.openshift.api.config.v1alpha1.PKICertificateManagement - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1alpha1.CustomPKIPolicy - default: {} - - name: mode - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: custom - discriminatorValue: Custom -- name: com.github.openshift.api.config.v1alpha1.PKISpec - map: - fields: - - name: certificateManagement - type: - namedType: com.github.openshift.api.config.v1alpha1.PKICertificateManagement - default: {} -- name: com.github.openshift.api.config.v1alpha1.PersistentVolumeClaimReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha1.PersistentVolumeConfig - map: - fields: - - name: claim - type: - namedType: com.github.openshift.api.config.v1alpha1.PersistentVolumeClaimReference - default: {} - - name: mountPath - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.PrometheusConfig - map: - fields: - - name: additionalAlertmanagerConfigs - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.AdditionalAlertmanagerConfig - elementRelationship: associative - keys: - - name - - name: collectionProfile - type: - scalar: string - - name: enforcedBodySizeLimitBytes - type: - scalar: numeric - - name: externalLabels - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.Label - elementRelationship: associative - keys: - - key - - name: logLevel - type: - scalar: string - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: queryLogFile - type: - scalar: string - - name: remoteWrite - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.RemoteWriteSpec - elementRelationship: associative - keys: - - name - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: retention - type: - namedType: com.github.openshift.api.config.v1alpha1.Retention - default: {} - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable - - name: volumeClaimTemplate - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim -- name: com.github.openshift.api.config.v1alpha1.PrometheusOperatorAdmissionWebhookConfig - map: - fields: - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.PrometheusOperatorConfig - map: - fields: - - name: logLevel - type: - scalar: string - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.PrometheusRemoteWriteHeader - map: - fields: - - name: name - type: - scalar: string - - name: value - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.QueueConfig - map: - fields: - - name: batchSendDeadlineSeconds - type: - scalar: numeric - - name: capacity - type: - scalar: numeric - - name: maxBackoffMilliseconds - type: - scalar: numeric - - name: maxSamplesPerSend - type: - scalar: numeric - - name: maxShards - type: - scalar: numeric - - name: minBackoffMilliseconds - type: - scalar: numeric - - name: minShards - type: - scalar: numeric - - name: rateLimitedAction - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.RSAKeyConfig - map: - fields: - - name: keySize - type: - scalar: numeric -- name: com.github.openshift.api.config.v1alpha1.RelabelActionConfig - map: - fields: - - name: dropEqual - type: - namedType: com.github.openshift.api.config.v1alpha1.DropEqualActionConfig - default: {} - - name: hashMod - type: - namedType: com.github.openshift.api.config.v1alpha1.HashModActionConfig - default: {} - - name: keepEqual - type: - namedType: com.github.openshift.api.config.v1alpha1.KeepEqualActionConfig - default: {} - - name: labelMap - type: - namedType: com.github.openshift.api.config.v1alpha1.LabelMapActionConfig - default: {} - - name: lowercase - type: - namedType: com.github.openshift.api.config.v1alpha1.LowercaseActionConfig - default: {} - - name: replace - type: - namedType: com.github.openshift.api.config.v1alpha1.ReplaceActionConfig - default: {} - - name: type - type: - scalar: string - - name: uppercase - type: - namedType: com.github.openshift.api.config.v1alpha1.UppercaseActionConfig - default: {} - unions: - - discriminator: type - fields: - - fieldName: dropEqual - discriminatorValue: DropEqual - - fieldName: hashMod - discriminatorValue: HashMod - - fieldName: keepEqual - discriminatorValue: KeepEqual - - fieldName: labelMap - discriminatorValue: LabelMap - - fieldName: lowercase - discriminatorValue: Lowercase - - fieldName: replace - discriminatorValue: Replace - - fieldName: uppercase - discriminatorValue: Uppercase -- name: com.github.openshift.api.config.v1alpha1.RelabelConfig - map: - fields: - - name: action - type: - namedType: com.github.openshift.api.config.v1alpha1.RelabelActionConfig - default: {} - - name: name - type: - scalar: string - - name: regex - type: - scalar: string - - name: separator - type: - scalar: string - - name: sourceLabels - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization - map: - fields: - - name: authorization - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: basicAuth - type: - namedType: com.github.openshift.api.config.v1alpha1.BasicAuth - default: {} - - name: oauth2 - type: - namedType: com.github.openshift.api.config.v1alpha1.OAuth2 - default: {} - - name: sigv4 - type: - namedType: com.github.openshift.api.config.v1alpha1.Sigv4 - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: authorization - discriminatorValue: Authorization - - fieldName: basicAuth - discriminatorValue: BasicAuth - - fieldName: oauth2 - discriminatorValue: OAuth2 - - fieldName: sigv4 - discriminatorValue: Sigv4 -- name: com.github.openshift.api.config.v1alpha1.RemoteWriteSpec - map: - fields: - - name: authorization - type: - namedType: com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization - default: {} - - name: exemplarsMode - type: - scalar: string - - name: headers - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.PrometheusRemoteWriteHeader - elementRelationship: associative - keys: - - name - - name: metadataConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.MetadataConfig - default: {} - - name: name - type: - scalar: string - - name: proxyUrl - type: - scalar: string - - name: queueConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.QueueConfig - default: {} - - name: remoteTimeoutSeconds - type: - scalar: numeric - - name: tlsConfig - type: - namedType: com.github.openshift.api.config.v1alpha1.TLSConfig - default: {} - - name: url - type: - scalar: string - - name: writeRelabelConfigs - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.RelabelConfig - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1alpha1.ReplaceActionConfig - map: - fields: - - name: replacement - type: - scalar: string - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.Retention - map: - fields: - - name: duration - type: - scalar: string - - name: size - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.RetentionNumberConfig - map: - fields: - - name: maxNumberOfBackups - type: - scalar: numeric - default: 0 -- name: com.github.openshift.api.config.v1alpha1.RetentionPolicy - map: - fields: - - name: retentionNumber - type: - namedType: com.github.openshift.api.config.v1alpha1.RetentionNumberConfig - - name: retentionSize - type: - namedType: com.github.openshift.api.config.v1alpha1.RetentionSizeConfig - - name: retentionType - type: - scalar: string - default: "" - unions: - - discriminator: retentionType - fields: - - fieldName: retentionNumber - discriminatorValue: RetentionNumber - - fieldName: retentionSize - discriminatorValue: RetentionSize -- name: com.github.openshift.api.config.v1alpha1.RetentionSizeConfig - map: - fields: - - name: maxSizeOfBackupsGb - type: - scalar: numeric - default: 0 -- name: com.github.openshift.api.config.v1alpha1.SecretKeySelector - map: - fields: - - name: key - type: - scalar: string - - name: name - type: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.config.v1alpha1.Sigv4 - map: - fields: - - name: accessKey - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: profile - type: - scalar: string - - name: region - type: - scalar: string - - name: roleArn - type: - scalar: string - - name: secretKey - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} -- name: com.github.openshift.api.config.v1alpha1.Storage - map: - fields: - - name: persistentVolume - type: - namedType: com.github.openshift.api.config.v1alpha1.PersistentVolumeConfig - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha1.TLSConfig - map: - fields: - - name: ca - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: cert - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: certificateVerification - type: - scalar: string - - name: key - type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector - default: {} - - name: serverName - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.TelemeterClientConfig - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.ThanosQuerierConfig - map: - fields: - - name: crossOriginRequestPolicy - type: - scalar: string - - name: logLevel - type: - scalar: string - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: requestLogging - type: - namedType: com.github.openshift.api.config.v1alpha1.ThanosQuerierRequestLoggingConfig - default: {} - - name: resources - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha1.ContainerResource - elementRelationship: associative - keys: - - name - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic - - name: topologySpreadConstraints - type: - list: - elementType: - namedType: io.k8s.api.core.v1.TopologySpreadConstraint - elementRelationship: associative - keys: - - topologyKey - - whenUnsatisfiable -- name: com.github.openshift.api.config.v1alpha1.ThanosQuerierRequestLoggingConfig - map: - fields: - - name: policy - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.UppercaseActionConfig - map: - fields: - - name: targetLabel - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha1.UserDefinedMonitoring - map: - fields: - - name: mode - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha2.Custom - map: - fields: - - name: configs - type: - list: - elementType: - namedType: com.github.openshift.api.config.v1alpha2.GathererConfig - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.config.v1alpha2.GatherConfig - map: - fields: - - name: dataPolicy - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: gatherers - type: - namedType: com.github.openshift.api.config.v1alpha2.Gatherers - default: {} - - name: storage - type: - namedType: com.github.openshift.api.config.v1alpha2.Storage -- name: com.github.openshift.api.config.v1alpha2.GathererConfig - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: state - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha2.Gatherers - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1alpha2.Custom - - name: mode - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha2.InsightsDataGather - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.config.v1alpha2.InsightsDataGatherSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.config.v1alpha2.InsightsDataGatherStatus - default: {} -- name: com.github.openshift.api.config.v1alpha2.InsightsDataGatherSpec - map: - fields: - - name: gatherConfig - type: - namedType: com.github.openshift.api.config.v1alpha2.GatherConfig - default: {} -- name: com.github.openshift.api.config.v1alpha2.InsightsDataGatherStatus - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1alpha2.PersistentVolumeClaimReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1alpha2.PersistentVolumeConfig - map: - fields: - - name: claim - type: - namedType: com.github.openshift.api.config.v1alpha2.PersistentVolumeClaimReference - default: {} - - name: mountPath - type: - scalar: string -- name: com.github.openshift.api.config.v1alpha2.Storage - map: - fields: - - name: persistentVolume - type: - namedType: com.github.openshift.api.config.v1alpha2.PersistentVolumeConfig - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.ConfigMapKeySelector - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean - elementRelationship: atomic -- name: io.k8s.api.core.v1.EnvVar - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: value - type: - scalar: string - - name: valueFrom - type: - namedType: io.k8s.api.core.v1.EnvVarSource -- name: io.k8s.api.core.v1.EnvVarSource - map: - fields: - - name: configMapKeyRef - type: - namedType: io.k8s.api.core.v1.ConfigMapKeySelector - - name: fieldRef - type: - namedType: io.k8s.api.core.v1.ObjectFieldSelector - - name: fileKeyRef - type: - namedType: io.k8s.api.core.v1.FileKeySelector - - name: resourceFieldRef - type: - namedType: io.k8s.api.core.v1.ResourceFieldSelector - - name: secretKeyRef - type: - namedType: io.k8s.api.core.v1.SecretKeySelector -- name: io.k8s.api.core.v1.FileKeySelector - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean - default: false - - name: path - type: - scalar: string - default: "" - - name: volumeName - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.ModifyVolumeStatus - map: - fields: - - name: status - type: - scalar: string - default: "" - - name: targetVolumeAttributesClassName - type: - scalar: string -- name: io.k8s.api.core.v1.ObjectFieldSelector - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldPath - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.PersistentVolumeClaim - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimSpec - default: {} - - name: status - type: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimStatus - default: {} -- name: io.k8s.api.core.v1.PersistentVolumeClaimCondition - map: - fields: - - name: lastProbeTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.PersistentVolumeClaimSpec - map: - fields: - - name: accessModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: dataSource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: dataSourceRef - type: - namedType: io.k8s.api.core.v1.TypedObjectReference - - name: resources - type: - namedType: io.k8s.api.core.v1.VolumeResourceRequirements - default: {} - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: storageClassName - type: - scalar: string - - name: volumeAttributesClassName - type: - scalar: string - - name: volumeMode - type: - scalar: string - - name: volumeName - type: - scalar: string -- name: io.k8s.api.core.v1.PersistentVolumeClaimStatus - map: - fields: - - name: accessModes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allocatedResourceStatuses - type: - map: - elementType: - scalar: string - elementRelationship: separable - - name: allocatedResources - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: capacity - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaimCondition - elementRelationship: associative - keys: - - type - - name: currentVolumeAttributesClassName - type: - scalar: string - - name: modifyVolumeStatus - type: - namedType: io.k8s.api.core.v1.ModifyVolumeStatus - - name: phase - type: - scalar: string -- name: io.k8s.api.core.v1.ResourceClaim - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: request - type: - scalar: string -- name: io.k8s.api.core.v1.ResourceFieldSelector - map: - fields: - - name: containerName - type: - scalar: string - - name: divisor - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: resource - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.ResourceRequirements - map: - fields: - - name: claims - type: - list: - elementType: - namedType: io.k8s.api.core.v1.ResourceClaim - elementRelationship: associative - keys: - - name - - name: limits - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: requests - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.core.v1.SecretKeySelector - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: optional - type: - scalar: boolean - elementRelationship: atomic -- name: io.k8s.api.core.v1.Toleration - map: - fields: - - name: effect - type: - scalar: string - - name: key - type: - scalar: string - - name: operator - type: - scalar: string - - name: tolerationSeconds - type: - scalar: numeric - - name: value - type: - scalar: string -- name: io.k8s.api.core.v1.TopologySpreadConstraint - map: - fields: - - name: labelSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: matchLabelKeys - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: maxSkew - type: - scalar: numeric - default: 0 - - name: minDomains - type: - scalar: numeric - - name: nodeAffinityPolicy - type: - scalar: string - - name: nodeTaintsPolicy - type: - scalar: string - - name: topologyKey - type: - scalar: string - default: "" - - name: whenUnsatisfiable - type: - scalar: string - default: "" -- name: io.k8s.api.core.v1.TypedLocalObjectReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.TypedObjectReference - map: - fields: - - name: apiGroup - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string -- name: io.k8s.api.core.v1.VolumeResourceRequirements - map: - fields: - - name: limits - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: requests - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.apimachinery.pkg.api.resource.Quantity - scalar: untyped -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - default: "" - - name: observedGeneration - type: - scalar: numeric - - name: reason - type: - scalar: string - default: "" - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - map: - fields: - - name: matchExpressions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - elementRelationship: atomic - - name: matchLabels - type: - map: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldsType - type: - scalar: string - - name: fieldsV1 - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - - name: manager - type: - scalar: string - - name: operation - type: - scalar: string - - name: subresource - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - map: - fields: - - name: annotations - type: - map: - elementType: - scalar: string - - name: creationTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deletionGracePeriodSeconds - type: - scalar: numeric - - name: deletionTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: finalizers - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: generateName - type: - scalar: string - - name: generation - type: - scalar: numeric - - name: labels - type: - map: - elementType: - scalar: string - - name: managedFields - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - elementRelationship: atomic - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: ownerReferences - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - elementRelationship: associative - keys: - - uid - - name: resourceVersion - type: - scalar: string - - name: selfLink - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - map: - fields: - - name: apiVersion - type: - scalar: string - default: "" - - name: blockOwnerDeletion - type: - scalar: boolean - - name: controller - type: - scalar: boolean - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time - scalar: untyped -- name: io.k8s.apimachinery.pkg.runtime.RawExtension - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) 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 deleted file mode 100644 index fdb9450b8..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/clientset.go +++ /dev/null @@ -1,130 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - fmt "fmt" - http "net/http" - - configv1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1" - configv1alpha1 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1" - configv1alpha2 "github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2" - 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 - ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface - ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - configV1 *configv1.ConfigV1Client - configV1alpha1 *configv1alpha1.ConfigV1alpha1Client - configV1alpha2 *configv1alpha2.ConfigV1alpha2Client -} - -// ConfigV1 retrieves the ConfigV1Client -func (c *Clientset) ConfigV1() configv1.ConfigV1Interface { - return c.configV1 -} - -// ConfigV1alpha1 retrieves the ConfigV1alpha1Client -func (c *Clientset) ConfigV1alpha1() configv1alpha1.ConfigV1alpha1Interface { - return c.configV1alpha1 -} - -// ConfigV1alpha2 retrieves the ConfigV1alpha2Client -func (c *Clientset) ConfigV1alpha2() configv1alpha2.ConfigV1alpha2Interface { - return c.configV1alpha2 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.configV1, err = configv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.configV1alpha1, err = configv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.configV1alpha2, err = configv1alpha2.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - 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.configV1alpha1 = configv1alpha1.New(c) - cs.configV1alpha2 = configv1alpha2.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} 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 deleted file mode 100644 index 14db57a58..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// 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 deleted file mode 100644 index eb6773921..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - configv1 "github.com/openshift/api/config/v1" - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha2 "github.com/openshift/api/config/v1alpha2" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - configv1.AddToScheme, - configv1alpha1.AddToScheme, - configv1alpha2.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/apiserver.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/apiserver.go deleted file mode 100644 index 20e56733a..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/apiserver.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// APIServersGetter has a method to return a APIServerInterface. -// A group's client should implement this interface. -type APIServersGetter interface { - APIServers() APIServerInterface -} - -// APIServerInterface has methods to work with APIServer resources. -type APIServerInterface interface { - Create(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.CreateOptions) (*configv1.APIServer, error) - Update(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.UpdateOptions) (*configv1.APIServer, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIServer *configv1.APIServer, opts metav1.UpdateOptions) (*configv1.APIServer, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.APIServer, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.APIServerList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.APIServer, err error) - Apply(ctx context.Context, aPIServer *applyconfigurationsconfigv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.APIServer, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIServer *applyconfigurationsconfigv1.APIServerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.APIServer, err error) - APIServerExpansion -} - -// aPIServers implements APIServerInterface -type aPIServers struct { - *gentype.ClientWithListAndApply[*configv1.APIServer, *configv1.APIServerList, *applyconfigurationsconfigv1.APIServerApplyConfiguration] -} - -// newAPIServers returns a APIServers -func newAPIServers(c *ConfigV1Client) *aPIServers { - return &aPIServers{ - gentype.NewClientWithListAndApply[*configv1.APIServer, *configv1.APIServerList, *applyconfigurationsconfigv1.APIServerApplyConfiguration]( - "apiservers", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.APIServer { return &configv1.APIServer{} }, - func() *configv1.APIServerList { return &configv1.APIServerList{} }, - ), - } -} 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 deleted file mode 100644 index f2f9cae61..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/authentication.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, authentication *configv1.Authentication, opts metav1.CreateOptions) (*configv1.Authentication, error) - Update(ctx context.Context, authentication *configv1.Authentication, opts metav1.UpdateOptions) (*configv1.Authentication, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, authentication *configv1.Authentication, opts metav1.UpdateOptions) (*configv1.Authentication, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Authentication, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.AuthenticationList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Authentication, err error) - Apply(ctx context.Context, authentication *applyconfigurationsconfigv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Authentication, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, authentication *applyconfigurationsconfigv1.AuthenticationApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Authentication, err error) - AuthenticationExpansion -} - -// authentications implements AuthenticationInterface -type authentications struct { - *gentype.ClientWithListAndApply[*configv1.Authentication, *configv1.AuthenticationList, *applyconfigurationsconfigv1.AuthenticationApplyConfiguration] -} - -// newAuthentications returns a Authentications -func newAuthentications(c *ConfigV1Client) *authentications { - return &authentications{ - gentype.NewClientWithListAndApply[*configv1.Authentication, *configv1.AuthenticationList, *applyconfigurationsconfigv1.AuthenticationApplyConfiguration]( - "authentications", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Authentication { return &configv1.Authentication{} }, - func() *configv1.AuthenticationList { return &configv1.AuthenticationList{} }, - ), - } -} 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 deleted file mode 100644 index 6e144b1f2..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/build.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, build *configv1.Build, opts metav1.CreateOptions) (*configv1.Build, error) - Update(ctx context.Context, build *configv1.Build, opts metav1.UpdateOptions) (*configv1.Build, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Build, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.BuildList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Build, err error) - Apply(ctx context.Context, build *applyconfigurationsconfigv1.BuildApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Build, err error) - BuildExpansion -} - -// builds implements BuildInterface -type builds struct { - *gentype.ClientWithListAndApply[*configv1.Build, *configv1.BuildList, *applyconfigurationsconfigv1.BuildApplyConfiguration] -} - -// newBuilds returns a Builds -func newBuilds(c *ConfigV1Client) *builds { - return &builds{ - gentype.NewClientWithListAndApply[*configv1.Build, *configv1.BuildList, *applyconfigurationsconfigv1.BuildApplyConfiguration]( - "builds", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Build { return &configv1.Build{} }, - func() *configv1.BuildList { return &configv1.BuildList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterimagepolicy.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterimagepolicy.go deleted file mode 100644 index b0452f611..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterimagepolicy.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ClusterImagePoliciesGetter has a method to return a ClusterImagePolicyInterface. -// A group's client should implement this interface. -type ClusterImagePoliciesGetter interface { - ClusterImagePolicies() ClusterImagePolicyInterface -} - -// ClusterImagePolicyInterface has methods to work with ClusterImagePolicy resources. -type ClusterImagePolicyInterface interface { - Create(ctx context.Context, clusterImagePolicy *configv1.ClusterImagePolicy, opts metav1.CreateOptions) (*configv1.ClusterImagePolicy, error) - Update(ctx context.Context, clusterImagePolicy *configv1.ClusterImagePolicy, opts metav1.UpdateOptions) (*configv1.ClusterImagePolicy, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterImagePolicy *configv1.ClusterImagePolicy, opts metav1.UpdateOptions) (*configv1.ClusterImagePolicy, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ClusterImagePolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ClusterImagePolicyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ClusterImagePolicy, err error) - Apply(ctx context.Context, clusterImagePolicy *applyconfigurationsconfigv1.ClusterImagePolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterImagePolicy, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterImagePolicy *applyconfigurationsconfigv1.ClusterImagePolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterImagePolicy, err error) - ClusterImagePolicyExpansion -} - -// clusterImagePolicies implements ClusterImagePolicyInterface -type clusterImagePolicies struct { - *gentype.ClientWithListAndApply[*configv1.ClusterImagePolicy, *configv1.ClusterImagePolicyList, *applyconfigurationsconfigv1.ClusterImagePolicyApplyConfiguration] -} - -// newClusterImagePolicies returns a ClusterImagePolicies -func newClusterImagePolicies(c *ConfigV1Client) *clusterImagePolicies { - return &clusterImagePolicies{ - gentype.NewClientWithListAndApply[*configv1.ClusterImagePolicy, *configv1.ClusterImagePolicyList, *applyconfigurationsconfigv1.ClusterImagePolicyApplyConfiguration]( - "clusterimagepolicies", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ClusterImagePolicy { return &configv1.ClusterImagePolicy{} }, - func() *configv1.ClusterImagePolicyList { return &configv1.ClusterImagePolicyList{} }, - ), - } -} 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 deleted file mode 100644 index a2f03a502..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusteroperator.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.CreateOptions) (*configv1.ClusterOperator, error) - Update(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.UpdateOptions) (*configv1.ClusterOperator, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterOperator *configv1.ClusterOperator, opts metav1.UpdateOptions) (*configv1.ClusterOperator, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ClusterOperator, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ClusterOperatorList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ClusterOperator, err error) - Apply(ctx context.Context, clusterOperator *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterOperator, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterOperator *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterOperator, err error) - ClusterOperatorExpansion -} - -// clusterOperators implements ClusterOperatorInterface -type clusterOperators struct { - *gentype.ClientWithListAndApply[*configv1.ClusterOperator, *configv1.ClusterOperatorList, *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration] -} - -// newClusterOperators returns a ClusterOperators -func newClusterOperators(c *ConfigV1Client) *clusterOperators { - return &clusterOperators{ - gentype.NewClientWithListAndApply[*configv1.ClusterOperator, *configv1.ClusterOperatorList, *applyconfigurationsconfigv1.ClusterOperatorApplyConfiguration]( - "clusteroperators", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ClusterOperator { return &configv1.ClusterOperator{} }, - func() *configv1.ClusterOperatorList { return &configv1.ClusterOperatorList{} }, - ), - } -} 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 deleted file mode 100644 index cb03327d9..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/clusterversion.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.CreateOptions) (*configv1.ClusterVersion, error) - Update(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.UpdateOptions) (*configv1.ClusterVersion, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterVersion *configv1.ClusterVersion, opts metav1.UpdateOptions) (*configv1.ClusterVersion, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ClusterVersion, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ClusterVersionList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ClusterVersion, err error) - Apply(ctx context.Context, clusterVersion *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterVersion, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterVersion *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ClusterVersion, err error) - ClusterVersionExpansion -} - -// clusterVersions implements ClusterVersionInterface -type clusterVersions struct { - *gentype.ClientWithListAndApply[*configv1.ClusterVersion, *configv1.ClusterVersionList, *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration] -} - -// newClusterVersions returns a ClusterVersions -func newClusterVersions(c *ConfigV1Client) *clusterVersions { - return &clusterVersions{ - gentype.NewClientWithListAndApply[*configv1.ClusterVersion, *configv1.ClusterVersionList, *applyconfigurationsconfigv1.ClusterVersionApplyConfiguration]( - "clusterversions", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ClusterVersion { return &configv1.ClusterVersion{} }, - func() *configv1.ClusterVersionList { return &configv1.ClusterVersionList{} }, - ), - } -} 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 deleted file mode 100644 index 6235cd977..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/config_client.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - http "net/http" - - configv1 "github.com/openshift/api/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type ConfigV1Interface interface { - RESTClient() rest.Interface - APIServersGetter - AuthenticationsGetter - BuildsGetter - CRIOCredentialProviderConfigsGetter - ClusterImagePoliciesGetter - ClusterOperatorsGetter - ClusterVersionsGetter - ConsolesGetter - DNSesGetter - FeatureGatesGetter - ImagesGetter - ImageContentPoliciesGetter - ImageDigestMirrorSetsGetter - ImagePoliciesGetter - ImageTagMirrorSetsGetter - InfrastructuresGetter - IngressesGetter - InsightsDataGathersGetter - NetworksGetter - NodesGetter - OAuthsGetter - OperatorHubsGetter - ProjectsGetter - ProxiesGetter - SchedulersGetter -} - -// ConfigV1Client is used to interact with features provided by the config.openshift.io group. -type ConfigV1Client struct { - restClient rest.Interface -} - -func (c *ConfigV1Client) APIServers() APIServerInterface { - return newAPIServers(c) -} - -func (c *ConfigV1Client) Authentications() AuthenticationInterface { - return newAuthentications(c) -} - -func (c *ConfigV1Client) Builds() BuildInterface { - return newBuilds(c) -} - -func (c *ConfigV1Client) CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInterface { - return newCRIOCredentialProviderConfigs(c) -} - -func (c *ConfigV1Client) ClusterImagePolicies() ClusterImagePolicyInterface { - return newClusterImagePolicies(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) DNSes() DNSInterface { - return newDNSes(c) -} - -func (c *ConfigV1Client) FeatureGates() FeatureGateInterface { - return newFeatureGates(c) -} - -func (c *ConfigV1Client) Images() ImageInterface { - return newImages(c) -} - -func (c *ConfigV1Client) ImageContentPolicies() ImageContentPolicyInterface { - return newImageContentPolicies(c) -} - -func (c *ConfigV1Client) ImageDigestMirrorSets() ImageDigestMirrorSetInterface { - return newImageDigestMirrorSets(c) -} - -func (c *ConfigV1Client) ImagePolicies(namespace string) ImagePolicyInterface { - return newImagePolicies(c, namespace) -} - -func (c *ConfigV1Client) ImageTagMirrorSets() ImageTagMirrorSetInterface { - return newImageTagMirrorSets(c) -} - -func (c *ConfigV1Client) Infrastructures() InfrastructureInterface { - return newInfrastructures(c) -} - -func (c *ConfigV1Client) Ingresses() IngressInterface { - return newIngresses(c) -} - -func (c *ConfigV1Client) InsightsDataGathers() InsightsDataGatherInterface { - return newInsightsDataGathers(c) -} - -func (c *ConfigV1Client) Networks() NetworkInterface { - return newNetworks(c) -} - -func (c *ConfigV1Client) Nodes() NodeInterface { - return newNodes(c) -} - -func (c *ConfigV1Client) OAuths() OAuthInterface { - return newOAuths(c) -} - -func (c *ConfigV1Client) OperatorHubs() OperatorHubInterface { - return newOperatorHubs(c) -} - -func (c *ConfigV1Client) Projects() ProjectInterface { - return newProjects(c) -} - -func (c *ConfigV1Client) Proxies() ProxyInterface { - return newProxies(c) -} - -func (c *ConfigV1Client) Schedulers() SchedulerInterface { - return newSchedulers(c) -} - -// NewForConfig creates a new ConfigV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ConfigV1Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ConfigV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ConfigV1Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - 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) { - gv := configv1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// 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 deleted file mode 100644 index ead87be18..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/console.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, console *configv1.Console, opts metav1.CreateOptions) (*configv1.Console, error) - Update(ctx context.Context, console *configv1.Console, opts metav1.UpdateOptions) (*configv1.Console, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, console *configv1.Console, opts metav1.UpdateOptions) (*configv1.Console, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Console, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ConsoleList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Console, err error) - Apply(ctx context.Context, console *applyconfigurationsconfigv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Console, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, console *applyconfigurationsconfigv1.ConsoleApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Console, err error) - ConsoleExpansion -} - -// consoles implements ConsoleInterface -type consoles struct { - *gentype.ClientWithListAndApply[*configv1.Console, *configv1.ConsoleList, *applyconfigurationsconfigv1.ConsoleApplyConfiguration] -} - -// newConsoles returns a Consoles -func newConsoles(c *ConfigV1Client) *consoles { - return &consoles{ - gentype.NewClientWithListAndApply[*configv1.Console, *configv1.ConsoleList, *applyconfigurationsconfigv1.ConsoleApplyConfiguration]( - "consoles", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Console { return &configv1.Console{} }, - func() *configv1.ConsoleList { return &configv1.ConsoleList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/criocredentialproviderconfig.go deleted file mode 100644 index 69272fac4..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/criocredentialproviderconfig.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// CRIOCredentialProviderConfigsGetter has a method to return a CRIOCredentialProviderConfigInterface. -// A group's client should implement this interface. -type CRIOCredentialProviderConfigsGetter interface { - CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInterface -} - -// CRIOCredentialProviderConfigInterface has methods to work with CRIOCredentialProviderConfig resources. -type CRIOCredentialProviderConfigInterface interface { - Create(ctx context.Context, cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, opts metav1.CreateOptions) (*configv1.CRIOCredentialProviderConfig, error) - Update(ctx context.Context, cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, opts metav1.UpdateOptions) (*configv1.CRIOCredentialProviderConfig, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cRIOCredentialProviderConfig *configv1.CRIOCredentialProviderConfig, opts metav1.UpdateOptions) (*configv1.CRIOCredentialProviderConfig, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.CRIOCredentialProviderConfig, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.CRIOCredentialProviderConfigList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.CRIOCredentialProviderConfig, err error) - Apply(ctx context.Context, cRIOCredentialProviderConfig *applyconfigurationsconfigv1.CRIOCredentialProviderConfigApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.CRIOCredentialProviderConfig, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, cRIOCredentialProviderConfig *applyconfigurationsconfigv1.CRIOCredentialProviderConfigApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.CRIOCredentialProviderConfig, err error) - CRIOCredentialProviderConfigExpansion -} - -// cRIOCredentialProviderConfigs implements CRIOCredentialProviderConfigInterface -type cRIOCredentialProviderConfigs struct { - *gentype.ClientWithListAndApply[*configv1.CRIOCredentialProviderConfig, *configv1.CRIOCredentialProviderConfigList, *applyconfigurationsconfigv1.CRIOCredentialProviderConfigApplyConfiguration] -} - -// newCRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigs -func newCRIOCredentialProviderConfigs(c *ConfigV1Client) *cRIOCredentialProviderConfigs { - return &cRIOCredentialProviderConfigs{ - gentype.NewClientWithListAndApply[*configv1.CRIOCredentialProviderConfig, *configv1.CRIOCredentialProviderConfigList, *applyconfigurationsconfigv1.CRIOCredentialProviderConfigApplyConfiguration]( - "criocredentialproviderconfigs", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.CRIOCredentialProviderConfig { return &configv1.CRIOCredentialProviderConfig{} }, - func() *configv1.CRIOCredentialProviderConfigList { return &configv1.CRIOCredentialProviderConfigList{} }, - ), - } -} 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 deleted file mode 100644 index 76efd8610..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/dns.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// DNSesGetter has a method to return a DNSInterface. -// A group's client should implement this interface. -type DNSesGetter interface { - DNSes() DNSInterface -} - -// DNSInterface has methods to work with DNS resources. -type DNSInterface interface { - Create(ctx context.Context, dNS *configv1.DNS, opts metav1.CreateOptions) (*configv1.DNS, error) - Update(ctx context.Context, dNS *configv1.DNS, opts metav1.UpdateOptions) (*configv1.DNS, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, dNS *configv1.DNS, opts metav1.UpdateOptions) (*configv1.DNS, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.DNS, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.DNSList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.DNS, err error) - Apply(ctx context.Context, dNS *applyconfigurationsconfigv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.DNS, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, dNS *applyconfigurationsconfigv1.DNSApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.DNS, err error) - DNSExpansion -} - -// dNSes implements DNSInterface -type dNSes struct { - *gentype.ClientWithListAndApply[*configv1.DNS, *configv1.DNSList, *applyconfigurationsconfigv1.DNSApplyConfiguration] -} - -// newDNSes returns a DNSes -func newDNSes(c *ConfigV1Client) *dNSes { - return &dNSes{ - gentype.NewClientWithListAndApply[*configv1.DNS, *configv1.DNSList, *applyconfigurationsconfigv1.DNSApplyConfiguration]( - "dnses", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.DNS { return &configv1.DNS{} }, - func() *configv1.DNSList { return &configv1.DNSList{} }, - ), - } -} 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 deleted file mode 100644 index 225e6b2be..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// 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/featuregate.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/featuregate.go deleted file mode 100644 index 2a41c2e73..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/featuregate.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// FeatureGatesGetter has a method to return a FeatureGateInterface. -// A group's client should implement this interface. -type FeatureGatesGetter interface { - FeatureGates() FeatureGateInterface -} - -// FeatureGateInterface has methods to work with FeatureGate resources. -type FeatureGateInterface interface { - Create(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.CreateOptions) (*configv1.FeatureGate, error) - Update(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.UpdateOptions) (*configv1.FeatureGate, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, featureGate *configv1.FeatureGate, opts metav1.UpdateOptions) (*configv1.FeatureGate, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.FeatureGate, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.FeatureGateList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.FeatureGate, err error) - Apply(ctx context.Context, featureGate *applyconfigurationsconfigv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.FeatureGate, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, featureGate *applyconfigurationsconfigv1.FeatureGateApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.FeatureGate, err error) - FeatureGateExpansion -} - -// featureGates implements FeatureGateInterface -type featureGates struct { - *gentype.ClientWithListAndApply[*configv1.FeatureGate, *configv1.FeatureGateList, *applyconfigurationsconfigv1.FeatureGateApplyConfiguration] -} - -// newFeatureGates returns a FeatureGates -func newFeatureGates(c *ConfigV1Client) *featureGates { - return &featureGates{ - gentype.NewClientWithListAndApply[*configv1.FeatureGate, *configv1.FeatureGateList, *applyconfigurationsconfigv1.FeatureGateApplyConfiguration]( - "featuregates", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.FeatureGate { return &configv1.FeatureGate{} }, - func() *configv1.FeatureGateList { return &configv1.FeatureGateList{} }, - ), - } -} 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 deleted file mode 100644 index 0f3e44588..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/generated_expansion.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type APIServerExpansion interface{} - -type AuthenticationExpansion interface{} - -type BuildExpansion interface{} - -type CRIOCredentialProviderConfigExpansion interface{} - -type ClusterImagePolicyExpansion interface{} - -type ClusterOperatorExpansion interface{} - -type ClusterVersionExpansion interface{} - -type ConsoleExpansion interface{} - -type DNSExpansion interface{} - -type FeatureGateExpansion interface{} - -type ImageExpansion interface{} - -type ImageContentPolicyExpansion interface{} - -type ImageDigestMirrorSetExpansion interface{} - -type ImagePolicyExpansion interface{} - -type ImageTagMirrorSetExpansion interface{} - -type InfrastructureExpansion interface{} - -type IngressExpansion interface{} - -type InsightsDataGatherExpansion interface{} - -type NetworkExpansion interface{} - -type NodeExpansion interface{} - -type OAuthExpansion interface{} - -type OperatorHubExpansion interface{} - -type ProjectExpansion interface{} - -type ProxyExpansion interface{} - -type SchedulerExpansion 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 deleted file mode 100644 index 2950a19c6..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/image.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, image *configv1.Image, opts metav1.CreateOptions) (*configv1.Image, error) - Update(ctx context.Context, image *configv1.Image, opts metav1.UpdateOptions) (*configv1.Image, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, image *configv1.Image, opts metav1.UpdateOptions) (*configv1.Image, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Image, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Image, err error) - Apply(ctx context.Context, image *applyconfigurationsconfigv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Image, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, image *applyconfigurationsconfigv1.ImageApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Image, err error) - ImageExpansion -} - -// images implements ImageInterface -type images struct { - *gentype.ClientWithListAndApply[*configv1.Image, *configv1.ImageList, *applyconfigurationsconfigv1.ImageApplyConfiguration] -} - -// newImages returns a Images -func newImages(c *ConfigV1Client) *images { - return &images{ - gentype.NewClientWithListAndApply[*configv1.Image, *configv1.ImageList, *applyconfigurationsconfigv1.ImageApplyConfiguration]( - "images", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Image { return &configv1.Image{} }, - func() *configv1.ImageList { return &configv1.ImageList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go deleted file mode 100644 index ce52d6c81..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagecontentpolicy.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ImageContentPoliciesGetter has a method to return a ImageContentPolicyInterface. -// A group's client should implement this interface. -type ImageContentPoliciesGetter interface { - ImageContentPolicies() ImageContentPolicyInterface -} - -// ImageContentPolicyInterface has methods to work with ImageContentPolicy resources. -type ImageContentPolicyInterface interface { - Create(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicy, opts metav1.CreateOptions) (*configv1.ImageContentPolicy, error) - Update(ctx context.Context, imageContentPolicy *configv1.ImageContentPolicy, opts metav1.UpdateOptions) (*configv1.ImageContentPolicy, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageContentPolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageContentPolicyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageContentPolicy, err error) - Apply(ctx context.Context, imageContentPolicy *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageContentPolicy, err error) - ImageContentPolicyExpansion -} - -// imageContentPolicies implements ImageContentPolicyInterface -type imageContentPolicies struct { - *gentype.ClientWithListAndApply[*configv1.ImageContentPolicy, *configv1.ImageContentPolicyList, *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration] -} - -// newImageContentPolicies returns a ImageContentPolicies -func newImageContentPolicies(c *ConfigV1Client) *imageContentPolicies { - return &imageContentPolicies{ - gentype.NewClientWithListAndApply[*configv1.ImageContentPolicy, *configv1.ImageContentPolicyList, *applyconfigurationsconfigv1.ImageContentPolicyApplyConfiguration]( - "imagecontentpolicies", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ImageContentPolicy { return &configv1.ImageContentPolicy{} }, - func() *configv1.ImageContentPolicyList { return &configv1.ImageContentPolicyList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go deleted file mode 100644 index 70018dd7f..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagedigestmirrorset.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ImageDigestMirrorSetsGetter has a method to return a ImageDigestMirrorSetInterface. -// A group's client should implement this interface. -type ImageDigestMirrorSetsGetter interface { - ImageDigestMirrorSets() ImageDigestMirrorSetInterface -} - -// ImageDigestMirrorSetInterface has methods to work with ImageDigestMirrorSet resources. -type ImageDigestMirrorSetInterface interface { - Create(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.CreateOptions) (*configv1.ImageDigestMirrorSet, error) - Update(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageDigestMirrorSet, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imageDigestMirrorSet *configv1.ImageDigestMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageDigestMirrorSet, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageDigestMirrorSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageDigestMirrorSetList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageDigestMirrorSet, err error) - Apply(ctx context.Context, imageDigestMirrorSet *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageDigestMirrorSet, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imageDigestMirrorSet *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageDigestMirrorSet, err error) - ImageDigestMirrorSetExpansion -} - -// imageDigestMirrorSets implements ImageDigestMirrorSetInterface -type imageDigestMirrorSets struct { - *gentype.ClientWithListAndApply[*configv1.ImageDigestMirrorSet, *configv1.ImageDigestMirrorSetList, *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration] -} - -// newImageDigestMirrorSets returns a ImageDigestMirrorSets -func newImageDigestMirrorSets(c *ConfigV1Client) *imageDigestMirrorSets { - return &imageDigestMirrorSets{ - gentype.NewClientWithListAndApply[*configv1.ImageDigestMirrorSet, *configv1.ImageDigestMirrorSetList, *applyconfigurationsconfigv1.ImageDigestMirrorSetApplyConfiguration]( - "imagedigestmirrorsets", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ImageDigestMirrorSet { return &configv1.ImageDigestMirrorSet{} }, - func() *configv1.ImageDigestMirrorSetList { return &configv1.ImageDigestMirrorSetList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagepolicy.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagepolicy.go deleted file mode 100644 index 4dae12757..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagepolicy.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ImagePoliciesGetter has a method to return a ImagePolicyInterface. -// A group's client should implement this interface. -type ImagePoliciesGetter interface { - ImagePolicies(namespace string) ImagePolicyInterface -} - -// ImagePolicyInterface has methods to work with ImagePolicy resources. -type ImagePolicyInterface interface { - Create(ctx context.Context, imagePolicy *configv1.ImagePolicy, opts metav1.CreateOptions) (*configv1.ImagePolicy, error) - Update(ctx context.Context, imagePolicy *configv1.ImagePolicy, opts metav1.UpdateOptions) (*configv1.ImagePolicy, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imagePolicy *configv1.ImagePolicy, opts metav1.UpdateOptions) (*configv1.ImagePolicy, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImagePolicy, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImagePolicyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImagePolicy, err error) - Apply(ctx context.Context, imagePolicy *applyconfigurationsconfigv1.ImagePolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImagePolicy, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imagePolicy *applyconfigurationsconfigv1.ImagePolicyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImagePolicy, err error) - ImagePolicyExpansion -} - -// imagePolicies implements ImagePolicyInterface -type imagePolicies struct { - *gentype.ClientWithListAndApply[*configv1.ImagePolicy, *configv1.ImagePolicyList, *applyconfigurationsconfigv1.ImagePolicyApplyConfiguration] -} - -// newImagePolicies returns a ImagePolicies -func newImagePolicies(c *ConfigV1Client, namespace string) *imagePolicies { - return &imagePolicies{ - gentype.NewClientWithListAndApply[*configv1.ImagePolicy, *configv1.ImagePolicyList, *applyconfigurationsconfigv1.ImagePolicyApplyConfiguration]( - "imagepolicies", - c.RESTClient(), - scheme.ParameterCodec, - namespace, - func() *configv1.ImagePolicy { return &configv1.ImagePolicy{} }, - func() *configv1.ImagePolicyList { return &configv1.ImagePolicyList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go deleted file mode 100644 index ca3c6e0be..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/imagetagmirrorset.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ImageTagMirrorSetsGetter has a method to return a ImageTagMirrorSetInterface. -// A group's client should implement this interface. -type ImageTagMirrorSetsGetter interface { - ImageTagMirrorSets() ImageTagMirrorSetInterface -} - -// ImageTagMirrorSetInterface has methods to work with ImageTagMirrorSet resources. -type ImageTagMirrorSetInterface interface { - Create(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.CreateOptions) (*configv1.ImageTagMirrorSet, error) - Update(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageTagMirrorSet, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, imageTagMirrorSet *configv1.ImageTagMirrorSet, opts metav1.UpdateOptions) (*configv1.ImageTagMirrorSet, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.ImageTagMirrorSet, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ImageTagMirrorSetList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.ImageTagMirrorSet, err error) - Apply(ctx context.Context, imageTagMirrorSet *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageTagMirrorSet, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, imageTagMirrorSet *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.ImageTagMirrorSet, err error) - ImageTagMirrorSetExpansion -} - -// imageTagMirrorSets implements ImageTagMirrorSetInterface -type imageTagMirrorSets struct { - *gentype.ClientWithListAndApply[*configv1.ImageTagMirrorSet, *configv1.ImageTagMirrorSetList, *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration] -} - -// newImageTagMirrorSets returns a ImageTagMirrorSets -func newImageTagMirrorSets(c *ConfigV1Client) *imageTagMirrorSets { - return &imageTagMirrorSets{ - gentype.NewClientWithListAndApply[*configv1.ImageTagMirrorSet, *configv1.ImageTagMirrorSetList, *applyconfigurationsconfigv1.ImageTagMirrorSetApplyConfiguration]( - "imagetagmirrorsets", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.ImageTagMirrorSet { return &configv1.ImageTagMirrorSet{} }, - func() *configv1.ImageTagMirrorSetList { return &configv1.ImageTagMirrorSetList{} }, - ), - } -} 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 deleted file mode 100644 index eb307026c..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/infrastructure.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.CreateOptions) (*configv1.Infrastructure, error) - Update(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.UpdateOptions) (*configv1.Infrastructure, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, infrastructure *configv1.Infrastructure, opts metav1.UpdateOptions) (*configv1.Infrastructure, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Infrastructure, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.InfrastructureList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Infrastructure, err error) - Apply(ctx context.Context, infrastructure *applyconfigurationsconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Infrastructure, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, infrastructure *applyconfigurationsconfigv1.InfrastructureApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Infrastructure, err error) - InfrastructureExpansion -} - -// infrastructures implements InfrastructureInterface -type infrastructures struct { - *gentype.ClientWithListAndApply[*configv1.Infrastructure, *configv1.InfrastructureList, *applyconfigurationsconfigv1.InfrastructureApplyConfiguration] -} - -// newInfrastructures returns a Infrastructures -func newInfrastructures(c *ConfigV1Client) *infrastructures { - return &infrastructures{ - gentype.NewClientWithListAndApply[*configv1.Infrastructure, *configv1.InfrastructureList, *applyconfigurationsconfigv1.InfrastructureApplyConfiguration]( - "infrastructures", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Infrastructure { return &configv1.Infrastructure{} }, - func() *configv1.InfrastructureList { return &configv1.InfrastructureList{} }, - ), - } -} 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 deleted file mode 100644 index 81057042d..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/ingress.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, ingress *configv1.Ingress, opts metav1.CreateOptions) (*configv1.Ingress, error) - Update(ctx context.Context, ingress *configv1.Ingress, opts metav1.UpdateOptions) (*configv1.Ingress, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, ingress *configv1.Ingress, opts metav1.UpdateOptions) (*configv1.Ingress, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Ingress, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.IngressList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Ingress, err error) - Apply(ctx context.Context, ingress *applyconfigurationsconfigv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Ingress, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, ingress *applyconfigurationsconfigv1.IngressApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Ingress, err error) - IngressExpansion -} - -// ingresses implements IngressInterface -type ingresses struct { - *gentype.ClientWithListAndApply[*configv1.Ingress, *configv1.IngressList, *applyconfigurationsconfigv1.IngressApplyConfiguration] -} - -// newIngresses returns a Ingresses -func newIngresses(c *ConfigV1Client) *ingresses { - return &ingresses{ - gentype.NewClientWithListAndApply[*configv1.Ingress, *configv1.IngressList, *applyconfigurationsconfigv1.IngressApplyConfiguration]( - "ingresses", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Ingress { return &configv1.Ingress{} }, - func() *configv1.IngressList { return &configv1.IngressList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/insightsdatagather.go deleted file mode 100644 index 43f662012..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/insightsdatagather.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// InsightsDataGathersGetter has a method to return a InsightsDataGatherInterface. -// A group's client should implement this interface. -type InsightsDataGathersGetter interface { - InsightsDataGathers() InsightsDataGatherInterface -} - -// InsightsDataGatherInterface has methods to work with InsightsDataGather resources. -type InsightsDataGatherInterface interface { - Create(ctx context.Context, insightsDataGather *configv1.InsightsDataGather, opts metav1.CreateOptions) (*configv1.InsightsDataGather, error) - Update(ctx context.Context, insightsDataGather *configv1.InsightsDataGather, opts metav1.UpdateOptions) (*configv1.InsightsDataGather, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.InsightsDataGather, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.InsightsDataGatherList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.InsightsDataGather, err error) - Apply(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1.InsightsDataGatherApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.InsightsDataGather, err error) - InsightsDataGatherExpansion -} - -// insightsDataGathers implements InsightsDataGatherInterface -type insightsDataGathers struct { - *gentype.ClientWithListAndApply[*configv1.InsightsDataGather, *configv1.InsightsDataGatherList, *applyconfigurationsconfigv1.InsightsDataGatherApplyConfiguration] -} - -// newInsightsDataGathers returns a InsightsDataGathers -func newInsightsDataGathers(c *ConfigV1Client) *insightsDataGathers { - return &insightsDataGathers{ - gentype.NewClientWithListAndApply[*configv1.InsightsDataGather, *configv1.InsightsDataGatherList, *applyconfigurationsconfigv1.InsightsDataGatherApplyConfiguration]( - "insightsdatagathers", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.InsightsDataGather { return &configv1.InsightsDataGather{} }, - func() *configv1.InsightsDataGatherList { return &configv1.InsightsDataGatherList{} }, - ), - } -} 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 deleted file mode 100644 index c58e0f211..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/network.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, network *configv1.Network, opts metav1.CreateOptions) (*configv1.Network, error) - Update(ctx context.Context, network *configv1.Network, opts metav1.UpdateOptions) (*configv1.Network, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, network *configv1.Network, opts metav1.UpdateOptions) (*configv1.Network, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Network, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.NetworkList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Network, err error) - Apply(ctx context.Context, network *applyconfigurationsconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Network, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, network *applyconfigurationsconfigv1.NetworkApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Network, err error) - NetworkExpansion -} - -// networks implements NetworkInterface -type networks struct { - *gentype.ClientWithListAndApply[*configv1.Network, *configv1.NetworkList, *applyconfigurationsconfigv1.NetworkApplyConfiguration] -} - -// newNetworks returns a Networks -func newNetworks(c *ConfigV1Client) *networks { - return &networks{ - gentype.NewClientWithListAndApply[*configv1.Network, *configv1.NetworkList, *applyconfigurationsconfigv1.NetworkApplyConfiguration]( - "networks", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Network { return &configv1.Network{} }, - func() *configv1.NetworkList { return &configv1.NetworkList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/node.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/node.go deleted file mode 100644 index b573b1598..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/node.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// NodesGetter has a method to return a NodeInterface. -// A group's client should implement this interface. -type NodesGetter interface { - Nodes() NodeInterface -} - -// NodeInterface has methods to work with Node resources. -type NodeInterface interface { - Create(ctx context.Context, node *configv1.Node, opts metav1.CreateOptions) (*configv1.Node, error) - Update(ctx context.Context, node *configv1.Node, opts metav1.UpdateOptions) (*configv1.Node, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, node *configv1.Node, opts metav1.UpdateOptions) (*configv1.Node, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Node, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.NodeList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Node, err error) - Apply(ctx context.Context, node *applyconfigurationsconfigv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Node, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, node *applyconfigurationsconfigv1.NodeApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Node, err error) - NodeExpansion -} - -// nodes implements NodeInterface -type nodes struct { - *gentype.ClientWithListAndApply[*configv1.Node, *configv1.NodeList, *applyconfigurationsconfigv1.NodeApplyConfiguration] -} - -// newNodes returns a Nodes -func newNodes(c *ConfigV1Client) *nodes { - return &nodes{ - gentype.NewClientWithListAndApply[*configv1.Node, *configv1.NodeList, *applyconfigurationsconfigv1.NodeApplyConfiguration]( - "nodes", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Node { return &configv1.Node{} }, - func() *configv1.NodeList { return &configv1.NodeList{} }, - ), - } -} 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 deleted file mode 100644 index 755a93873..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/oauth.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, oAuth *configv1.OAuth, opts metav1.CreateOptions) (*configv1.OAuth, error) - Update(ctx context.Context, oAuth *configv1.OAuth, opts metav1.UpdateOptions) (*configv1.OAuth, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, oAuth *configv1.OAuth, opts metav1.UpdateOptions) (*configv1.OAuth, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.OAuth, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.OAuthList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.OAuth, err error) - Apply(ctx context.Context, oAuth *applyconfigurationsconfigv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OAuth, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, oAuth *applyconfigurationsconfigv1.OAuthApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OAuth, err error) - OAuthExpansion -} - -// oAuths implements OAuthInterface -type oAuths struct { - *gentype.ClientWithListAndApply[*configv1.OAuth, *configv1.OAuthList, *applyconfigurationsconfigv1.OAuthApplyConfiguration] -} - -// newOAuths returns a OAuths -func newOAuths(c *ConfigV1Client) *oAuths { - return &oAuths{ - gentype.NewClientWithListAndApply[*configv1.OAuth, *configv1.OAuthList, *applyconfigurationsconfigv1.OAuthApplyConfiguration]( - "oauths", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.OAuth { return &configv1.OAuth{} }, - func() *configv1.OAuthList { return &configv1.OAuthList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/operatorhub.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/operatorhub.go deleted file mode 100644 index e3ba1b8ab..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/operatorhub.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// OperatorHubsGetter has a method to return a OperatorHubInterface. -// A group's client should implement this interface. -type OperatorHubsGetter interface { - OperatorHubs() OperatorHubInterface -} - -// OperatorHubInterface has methods to work with OperatorHub resources. -type OperatorHubInterface interface { - Create(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.CreateOptions) (*configv1.OperatorHub, error) - Update(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.UpdateOptions) (*configv1.OperatorHub, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, operatorHub *configv1.OperatorHub, opts metav1.UpdateOptions) (*configv1.OperatorHub, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.OperatorHub, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.OperatorHubList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.OperatorHub, err error) - Apply(ctx context.Context, operatorHub *applyconfigurationsconfigv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OperatorHub, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, operatorHub *applyconfigurationsconfigv1.OperatorHubApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.OperatorHub, err error) - OperatorHubExpansion -} - -// operatorHubs implements OperatorHubInterface -type operatorHubs struct { - *gentype.ClientWithListAndApply[*configv1.OperatorHub, *configv1.OperatorHubList, *applyconfigurationsconfigv1.OperatorHubApplyConfiguration] -} - -// newOperatorHubs returns a OperatorHubs -func newOperatorHubs(c *ConfigV1Client) *operatorHubs { - return &operatorHubs{ - gentype.NewClientWithListAndApply[*configv1.OperatorHub, *configv1.OperatorHubList, *applyconfigurationsconfigv1.OperatorHubApplyConfiguration]( - "operatorhubs", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.OperatorHub { return &configv1.OperatorHub{} }, - func() *configv1.OperatorHubList { return &configv1.OperatorHubList{} }, - ), - } -} 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 deleted file mode 100644 index 5cde353a6..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/project.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, project *configv1.Project, opts metav1.CreateOptions) (*configv1.Project, error) - Update(ctx context.Context, project *configv1.Project, opts metav1.UpdateOptions) (*configv1.Project, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, project *configv1.Project, opts metav1.UpdateOptions) (*configv1.Project, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Project, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ProjectList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Project, err error) - Apply(ctx context.Context, project *applyconfigurationsconfigv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Project, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, project *applyconfigurationsconfigv1.ProjectApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Project, err error) - ProjectExpansion -} - -// projects implements ProjectInterface -type projects struct { - *gentype.ClientWithListAndApply[*configv1.Project, *configv1.ProjectList, *applyconfigurationsconfigv1.ProjectApplyConfiguration] -} - -// newProjects returns a Projects -func newProjects(c *ConfigV1Client) *projects { - return &projects{ - gentype.NewClientWithListAndApply[*configv1.Project, *configv1.ProjectList, *applyconfigurationsconfigv1.ProjectApplyConfiguration]( - "projects", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Project { return &configv1.Project{} }, - func() *configv1.ProjectList { return &configv1.ProjectList{} }, - ), - } -} 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 deleted file mode 100644 index 55374ecfe..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/proxy.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// 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(ctx context.Context, proxy *configv1.Proxy, opts metav1.CreateOptions) (*configv1.Proxy, error) - Update(ctx context.Context, proxy *configv1.Proxy, opts metav1.UpdateOptions) (*configv1.Proxy, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, proxy *configv1.Proxy, opts metav1.UpdateOptions) (*configv1.Proxy, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Proxy, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.ProxyList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Proxy, err error) - Apply(ctx context.Context, proxy *applyconfigurationsconfigv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Proxy, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, proxy *applyconfigurationsconfigv1.ProxyApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Proxy, err error) - ProxyExpansion -} - -// proxies implements ProxyInterface -type proxies struct { - *gentype.ClientWithListAndApply[*configv1.Proxy, *configv1.ProxyList, *applyconfigurationsconfigv1.ProxyApplyConfiguration] -} - -// newProxies returns a Proxies -func newProxies(c *ConfigV1Client) *proxies { - return &proxies{ - gentype.NewClientWithListAndApply[*configv1.Proxy, *configv1.ProxyList, *applyconfigurationsconfigv1.ProxyApplyConfiguration]( - "proxies", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Proxy { return &configv1.Proxy{} }, - func() *configv1.ProxyList { return &configv1.ProxyList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduler.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduler.go deleted file mode 100644 index 3bdc27dbc..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1/scheduler.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - configv1 "github.com/openshift/api/config/v1" - applyconfigurationsconfigv1 "github.com/openshift/client-go/config/applyconfigurations/config/v1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// SchedulersGetter has a method to return a SchedulerInterface. -// A group's client should implement this interface. -type SchedulersGetter interface { - Schedulers() SchedulerInterface -} - -// SchedulerInterface has methods to work with Scheduler resources. -type SchedulerInterface interface { - Create(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.CreateOptions) (*configv1.Scheduler, error) - Update(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.UpdateOptions) (*configv1.Scheduler, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, scheduler *configv1.Scheduler, opts metav1.UpdateOptions) (*configv1.Scheduler, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*configv1.Scheduler, error) - List(ctx context.Context, opts metav1.ListOptions) (*configv1.SchedulerList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *configv1.Scheduler, err error) - Apply(ctx context.Context, scheduler *applyconfigurationsconfigv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Scheduler, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, scheduler *applyconfigurationsconfigv1.SchedulerApplyConfiguration, opts metav1.ApplyOptions) (result *configv1.Scheduler, err error) - SchedulerExpansion -} - -// schedulers implements SchedulerInterface -type schedulers struct { - *gentype.ClientWithListAndApply[*configv1.Scheduler, *configv1.SchedulerList, *applyconfigurationsconfigv1.SchedulerApplyConfiguration] -} - -// newSchedulers returns a Schedulers -func newSchedulers(c *ConfigV1Client) *schedulers { - return &schedulers{ - gentype.NewClientWithListAndApply[*configv1.Scheduler, *configv1.SchedulerList, *applyconfigurationsconfigv1.SchedulerApplyConfiguration]( - "schedulers", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1.Scheduler { return &configv1.Scheduler{} }, - func() *configv1.SchedulerList { return &configv1.SchedulerList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/backup.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/backup.go deleted file mode 100644 index 89c7b176e..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/backup.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// BackupsGetter has a method to return a BackupInterface. -// A group's client should implement this interface. -type BackupsGetter interface { - Backups() BackupInterface -} - -// BackupInterface has methods to work with Backup resources. -type BackupInterface interface { - Create(ctx context.Context, backup *configv1alpha1.Backup, opts v1.CreateOptions) (*configv1alpha1.Backup, error) - Update(ctx context.Context, backup *configv1alpha1.Backup, opts v1.UpdateOptions) (*configv1alpha1.Backup, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, backup *configv1alpha1.Backup, opts v1.UpdateOptions) (*configv1alpha1.Backup, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.Backup, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.BackupList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.Backup, err error) - Apply(ctx context.Context, backup *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.Backup, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, backup *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.Backup, err error) - BackupExpansion -} - -// backups implements BackupInterface -type backups struct { - *gentype.ClientWithListAndApply[*configv1alpha1.Backup, *configv1alpha1.BackupList, *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration] -} - -// newBackups returns a Backups -func newBackups(c *ConfigV1alpha1Client) *backups { - return &backups{ - gentype.NewClientWithListAndApply[*configv1alpha1.Backup, *configv1alpha1.BackupList, *applyconfigurationsconfigv1alpha1.BackupApplyConfiguration]( - "backups", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha1.Backup { return &configv1alpha1.Backup{} }, - func() *configv1alpha1.BackupList { return &configv1alpha1.BackupList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/clustermonitoring.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/clustermonitoring.go deleted file mode 100644 index 8d02fc6c2..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/clustermonitoring.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// ClusterMonitoringsGetter has a method to return a ClusterMonitoringInterface. -// A group's client should implement this interface. -type ClusterMonitoringsGetter interface { - ClusterMonitorings() ClusterMonitoringInterface -} - -// ClusterMonitoringInterface has methods to work with ClusterMonitoring resources. -type ClusterMonitoringInterface interface { - Create(ctx context.Context, clusterMonitoring *configv1alpha1.ClusterMonitoring, opts v1.CreateOptions) (*configv1alpha1.ClusterMonitoring, error) - Update(ctx context.Context, clusterMonitoring *configv1alpha1.ClusterMonitoring, opts v1.UpdateOptions) (*configv1alpha1.ClusterMonitoring, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, clusterMonitoring *configv1alpha1.ClusterMonitoring, opts v1.UpdateOptions) (*configv1alpha1.ClusterMonitoring, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.ClusterMonitoring, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.ClusterMonitoringList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.ClusterMonitoring, err error) - Apply(ctx context.Context, clusterMonitoring *applyconfigurationsconfigv1alpha1.ClusterMonitoringApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ClusterMonitoring, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, clusterMonitoring *applyconfigurationsconfigv1alpha1.ClusterMonitoringApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.ClusterMonitoring, err error) - ClusterMonitoringExpansion -} - -// clusterMonitorings implements ClusterMonitoringInterface -type clusterMonitorings struct { - *gentype.ClientWithListAndApply[*configv1alpha1.ClusterMonitoring, *configv1alpha1.ClusterMonitoringList, *applyconfigurationsconfigv1alpha1.ClusterMonitoringApplyConfiguration] -} - -// newClusterMonitorings returns a ClusterMonitorings -func newClusterMonitorings(c *ConfigV1alpha1Client) *clusterMonitorings { - return &clusterMonitorings{ - gentype.NewClientWithListAndApply[*configv1alpha1.ClusterMonitoring, *configv1alpha1.ClusterMonitoringList, *applyconfigurationsconfigv1alpha1.ClusterMonitoringApplyConfiguration]( - "clustermonitorings", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha1.ClusterMonitoring { return &configv1alpha1.ClusterMonitoring{} }, - func() *configv1alpha1.ClusterMonitoringList { return &configv1alpha1.ClusterMonitoringList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go deleted file mode 100644 index 23ba9a19c..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/config_client.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - http "net/http" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type ConfigV1alpha1Interface interface { - RESTClient() rest.Interface - BackupsGetter - CRIOCredentialProviderConfigsGetter - ClusterMonitoringsGetter - InsightsDataGathersGetter - PKIsGetter -} - -// ConfigV1alpha1Client is used to interact with features provided by the config.openshift.io group. -type ConfigV1alpha1Client struct { - restClient rest.Interface -} - -func (c *ConfigV1alpha1Client) Backups() BackupInterface { - return newBackups(c) -} - -func (c *ConfigV1alpha1Client) CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInterface { - return newCRIOCredentialProviderConfigs(c) -} - -func (c *ConfigV1alpha1Client) ClusterMonitorings() ClusterMonitoringInterface { - return newClusterMonitorings(c) -} - -func (c *ConfigV1alpha1Client) InsightsDataGathers() InsightsDataGatherInterface { - return newInsightsDataGathers(c) -} - -func (c *ConfigV1alpha1Client) PKIs() PKIInterface { - return newPKIs(c) -} - -// NewForConfig creates a new ConfigV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ConfigV1alpha1Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ConfigV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ConfigV1alpha1Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ConfigV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new ConfigV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ConfigV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ConfigV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *ConfigV1alpha1Client { - return &ConfigV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) { - gv := configv1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ConfigV1alpha1Client) 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/v1alpha1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/criocredentialproviderconfig.go deleted file mode 100644 index 3c4962155..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/criocredentialproviderconfig.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// CRIOCredentialProviderConfigsGetter has a method to return a CRIOCredentialProviderConfigInterface. -// A group's client should implement this interface. -type CRIOCredentialProviderConfigsGetter interface { - CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInterface -} - -// CRIOCredentialProviderConfigInterface has methods to work with CRIOCredentialProviderConfig resources. -type CRIOCredentialProviderConfigInterface interface { - Create(ctx context.Context, cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, opts v1.CreateOptions) (*configv1alpha1.CRIOCredentialProviderConfig, error) - Update(ctx context.Context, cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, opts v1.UpdateOptions) (*configv1alpha1.CRIOCredentialProviderConfig, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, cRIOCredentialProviderConfig *configv1alpha1.CRIOCredentialProviderConfig, opts v1.UpdateOptions) (*configv1alpha1.CRIOCredentialProviderConfig, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.CRIOCredentialProviderConfig, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.CRIOCredentialProviderConfigList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.CRIOCredentialProviderConfig, err error) - Apply(ctx context.Context, cRIOCredentialProviderConfig *applyconfigurationsconfigv1alpha1.CRIOCredentialProviderConfigApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.CRIOCredentialProviderConfig, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, cRIOCredentialProviderConfig *applyconfigurationsconfigv1alpha1.CRIOCredentialProviderConfigApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.CRIOCredentialProviderConfig, err error) - CRIOCredentialProviderConfigExpansion -} - -// cRIOCredentialProviderConfigs implements CRIOCredentialProviderConfigInterface -type cRIOCredentialProviderConfigs struct { - *gentype.ClientWithListAndApply[*configv1alpha1.CRIOCredentialProviderConfig, *configv1alpha1.CRIOCredentialProviderConfigList, *applyconfigurationsconfigv1alpha1.CRIOCredentialProviderConfigApplyConfiguration] -} - -// newCRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigs -func newCRIOCredentialProviderConfigs(c *ConfigV1alpha1Client) *cRIOCredentialProviderConfigs { - return &cRIOCredentialProviderConfigs{ - gentype.NewClientWithListAndApply[*configv1alpha1.CRIOCredentialProviderConfig, *configv1alpha1.CRIOCredentialProviderConfigList, *applyconfigurationsconfigv1alpha1.CRIOCredentialProviderConfigApplyConfiguration]( - "criocredentialproviderconfigs", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha1.CRIOCredentialProviderConfig { - return &configv1alpha1.CRIOCredentialProviderConfig{} - }, - func() *configv1alpha1.CRIOCredentialProviderConfigList { - return &configv1alpha1.CRIOCredentialProviderConfigList{} - }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/doc.go deleted file mode 100644 index 93a7ca4e0..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go deleted file mode 100644 index bc1f60319..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,13 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type BackupExpansion interface{} - -type CRIOCredentialProviderConfigExpansion interface{} - -type ClusterMonitoringExpansion interface{} - -type InsightsDataGatherExpansion interface{} - -type PKIExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go deleted file mode 100644 index cff76db8d..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/insightsdatagather.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// InsightsDataGathersGetter has a method to return a InsightsDataGatherInterface. -// A group's client should implement this interface. -type InsightsDataGathersGetter interface { - InsightsDataGathers() InsightsDataGatherInterface -} - -// InsightsDataGatherInterface has methods to work with InsightsDataGather resources. -type InsightsDataGatherInterface interface { - Create(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.CreateOptions) (*configv1alpha1.InsightsDataGather, error) - Update(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha1.InsightsDataGather, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, insightsDataGather *configv1alpha1.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha1.InsightsDataGather, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.InsightsDataGather, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.InsightsDataGatherList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.InsightsDataGather, err error) - Apply(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.InsightsDataGather, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.InsightsDataGather, err error) - InsightsDataGatherExpansion -} - -// insightsDataGathers implements InsightsDataGatherInterface -type insightsDataGathers struct { - *gentype.ClientWithListAndApply[*configv1alpha1.InsightsDataGather, *configv1alpha1.InsightsDataGatherList, *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration] -} - -// newInsightsDataGathers returns a InsightsDataGathers -func newInsightsDataGathers(c *ConfigV1alpha1Client) *insightsDataGathers { - return &insightsDataGathers{ - gentype.NewClientWithListAndApply[*configv1alpha1.InsightsDataGather, *configv1alpha1.InsightsDataGatherList, *applyconfigurationsconfigv1alpha1.InsightsDataGatherApplyConfiguration]( - "insightsdatagathers", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha1.InsightsDataGather { return &configv1alpha1.InsightsDataGather{} }, - func() *configv1alpha1.InsightsDataGatherList { return &configv1alpha1.InsightsDataGatherList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/pki.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/pki.go deleted file mode 100644 index ba099fcf1..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1/pki.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - applyconfigurationsconfigv1alpha1 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// PKIsGetter has a method to return a PKIInterface. -// A group's client should implement this interface. -type PKIsGetter interface { - PKIs() PKIInterface -} - -// PKIInterface has methods to work with PKI resources. -type PKIInterface interface { - Create(ctx context.Context, pKI *configv1alpha1.PKI, opts v1.CreateOptions) (*configv1alpha1.PKI, error) - Update(ctx context.Context, pKI *configv1alpha1.PKI, opts v1.UpdateOptions) (*configv1alpha1.PKI, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha1.PKI, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha1.PKIList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha1.PKI, err error) - Apply(ctx context.Context, pKI *applyconfigurationsconfigv1alpha1.PKIApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha1.PKI, err error) - PKIExpansion -} - -// pKIs implements PKIInterface -type pKIs struct { - *gentype.ClientWithListAndApply[*configv1alpha1.PKI, *configv1alpha1.PKIList, *applyconfigurationsconfigv1alpha1.PKIApplyConfiguration] -} - -// newPKIs returns a PKIs -func newPKIs(c *ConfigV1alpha1Client) *pKIs { - return &pKIs{ - gentype.NewClientWithListAndApply[*configv1alpha1.PKI, *configv1alpha1.PKIList, *applyconfigurationsconfigv1alpha1.PKIApplyConfiguration]( - "pkis", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha1.PKI { return &configv1alpha1.PKI{} }, - func() *configv1alpha1.PKIList { return &configv1alpha1.PKIList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/config_client.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/config_client.go deleted file mode 100644 index 7c4407c61..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/config_client.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - http "net/http" - - configv1alpha2 "github.com/openshift/api/config/v1alpha2" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type ConfigV1alpha2Interface interface { - RESTClient() rest.Interface - InsightsDataGathersGetter -} - -// ConfigV1alpha2Client is used to interact with features provided by the config.openshift.io group. -type ConfigV1alpha2Client struct { - restClient rest.Interface -} - -func (c *ConfigV1alpha2Client) InsightsDataGathers() InsightsDataGatherInterface { - return newInsightsDataGathers(c) -} - -// NewForConfig creates a new ConfigV1alpha2Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ConfigV1alpha2Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ConfigV1alpha2Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ConfigV1alpha2Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ConfigV1alpha2Client{client}, nil -} - -// NewForConfigOrDie creates a new ConfigV1alpha2Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ConfigV1alpha2Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ConfigV1alpha2Client for the given RESTClient. -func New(c rest.Interface) *ConfigV1alpha2Client { - return &ConfigV1alpha2Client{c} -} - -func setConfigDefaults(config *rest.Config) { - gv := configv1alpha2.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ConfigV1alpha2Client) 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/v1alpha2/doc.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/doc.go deleted file mode 100644 index c11da2682..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/doc.go +++ /dev/null @@ -1,4 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha2 diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/generated_expansion.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/generated_expansion.go deleted file mode 100644 index 6f1f055c7..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/generated_expansion.go +++ /dev/null @@ -1,5 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha2 - -type InsightsDataGatherExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/insightsdatagather.go deleted file mode 100644 index ad5be4b22..000000000 --- a/vendor/github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2/insightsdatagather.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - - configv1alpha2 "github.com/openshift/api/config/v1alpha2" - applyconfigurationsconfigv1alpha2 "github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2" - scheme "github.com/openshift/client-go/config/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// InsightsDataGathersGetter has a method to return a InsightsDataGatherInterface. -// A group's client should implement this interface. -type InsightsDataGathersGetter interface { - InsightsDataGathers() InsightsDataGatherInterface -} - -// InsightsDataGatherInterface has methods to work with InsightsDataGather resources. -type InsightsDataGatherInterface interface { - Create(ctx context.Context, insightsDataGather *configv1alpha2.InsightsDataGather, opts v1.CreateOptions) (*configv1alpha2.InsightsDataGather, error) - Update(ctx context.Context, insightsDataGather *configv1alpha2.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha2.InsightsDataGather, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, insightsDataGather *configv1alpha2.InsightsDataGather, opts v1.UpdateOptions) (*configv1alpha2.InsightsDataGather, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*configv1alpha2.InsightsDataGather, error) - List(ctx context.Context, opts v1.ListOptions) (*configv1alpha2.InsightsDataGatherList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *configv1alpha2.InsightsDataGather, err error) - Apply(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha2.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha2.InsightsDataGather, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, insightsDataGather *applyconfigurationsconfigv1alpha2.InsightsDataGatherApplyConfiguration, opts v1.ApplyOptions) (result *configv1alpha2.InsightsDataGather, err error) - InsightsDataGatherExpansion -} - -// insightsDataGathers implements InsightsDataGatherInterface -type insightsDataGathers struct { - *gentype.ClientWithListAndApply[*configv1alpha2.InsightsDataGather, *configv1alpha2.InsightsDataGatherList, *applyconfigurationsconfigv1alpha2.InsightsDataGatherApplyConfiguration] -} - -// newInsightsDataGathers returns a InsightsDataGathers -func newInsightsDataGathers(c *ConfigV1alpha2Client) *insightsDataGathers { - return &insightsDataGathers{ - gentype.NewClientWithListAndApply[*configv1alpha2.InsightsDataGather, *configv1alpha2.InsightsDataGatherList, *applyconfigurationsconfigv1alpha2.InsightsDataGatherApplyConfiguration]( - "insightsdatagathers", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *configv1alpha2.InsightsDataGather { return &configv1alpha2.InsightsDataGather{} }, - func() *configv1alpha2.InsightsDataGatherList { return &configv1alpha2.InsightsDataGatherList{} }, - ), - } -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/interface.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/interface.go deleted file mode 100644 index 7ffc394de..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/interface.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package config - -import ( - v1 "github.com/openshift/client-go/config/informers/externalversions/config/v1" - v1alpha1 "github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1" - v1alpha2 "github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" -) - -// Interface provides access to each of this group's versions. -type Interface interface { - // V1 provides access to shared informers for resources in V1. - V1() v1.Interface - // V1alpha1 provides access to shared informers for resources in V1alpha1. - V1alpha1() v1alpha1.Interface - // V1alpha2 provides access to shared informers for resources in V1alpha2. - V1alpha2() v1alpha2.Interface -} - -type group struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &group{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// V1 returns a new v1.Interface. -func (g *group) V1() v1.Interface { - return v1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1alpha1 returns a new v1alpha1.Interface. -func (g *group) V1alpha1() v1alpha1.Interface { - return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) -} - -// V1alpha2 returns a new v1alpha2.Interface. -func (g *group) V1alpha2() v1alpha2.Interface { - return v1alpha2.New(g.factory, g.namespace, g.tweakListOptions) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/apiserver.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/apiserver.go deleted file mode 100644 index e7107fe1f..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/apiserver.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// APIServerInformer provides access to a shared informer and lister for -// APIServers. -type APIServerInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.APIServerLister -} - -type aPIServerInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAPIServerInformer constructs a new informer for APIServer type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewAPIServerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewAPIServerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredAPIServerInformer constructs a new informer for APIServer type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredAPIServerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewAPIServerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewAPIServerInformerWithOptions constructs a new informer for APIServer type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewAPIServerInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "apiservers"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().APIServers().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().APIServers().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().APIServers().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().APIServers().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.APIServer{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *aPIServerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewAPIServerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *aPIServerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.APIServer{}, f.defaultInformer) -} - -func (f *aPIServerInformer) Lister() configv1.APIServerLister { - return configv1.NewAPIServerLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/authentication.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/authentication.go deleted file mode 100644 index b3aca8cd2..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/authentication.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// AuthenticationInformer provides access to a shared informer and lister for -// Authentications. -type AuthenticationInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.AuthenticationLister -} - -type authenticationInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewAuthenticationInformer constructs a new informer for Authentication type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewAuthenticationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewAuthenticationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredAuthenticationInformer constructs a new informer for Authentication type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredAuthenticationInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewAuthenticationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewAuthenticationInformerWithOptions constructs a new informer for Authentication type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewAuthenticationInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "authentications"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Authentications().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Authentications().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Authentications().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Authentications().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Authentication{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *authenticationInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewAuthenticationInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *authenticationInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Authentication{}, f.defaultInformer) -} - -func (f *authenticationInformer) Lister() configv1.AuthenticationLister { - return configv1.NewAuthenticationLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/build.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/build.go deleted file mode 100644 index 3cfc51f9a..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/build.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// BuildInformer provides access to a shared informer and lister for -// Builds. -type BuildInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.BuildLister -} - -type buildInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewBuildInformer constructs a new informer for Build type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewBuildInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewBuildInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredBuildInformer constructs a new informer for Build type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredBuildInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewBuildInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewBuildInformerWithOptions constructs a new informer for Build type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewBuildInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "builds"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Builds().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Builds().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Builds().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Builds().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Build{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *buildInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewBuildInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *buildInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Build{}, f.defaultInformer) -} - -func (f *buildInformer) Lister() configv1.BuildLister { - return configv1.NewBuildLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterimagepolicy.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterimagepolicy.go deleted file mode 100644 index 8825c60f1..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterimagepolicy.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterImagePolicyInformer provides access to a shared informer and lister for -// ClusterImagePolicies. -type ClusterImagePolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ClusterImagePolicyLister -} - -type clusterImagePolicyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterImagePolicyInformer constructs a new informer for ClusterImagePolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterImagePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewClusterImagePolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredClusterImagePolicyInformer constructs a new informer for ClusterImagePolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterImagePolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewClusterImagePolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewClusterImagePolicyInformerWithOptions constructs a new informer for ClusterImagePolicy type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterImagePolicyInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "clusterimagepolicys"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterImagePolicies().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterImagePolicies().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterImagePolicies().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterImagePolicies().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ClusterImagePolicy{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *clusterImagePolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewClusterImagePolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *clusterImagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ClusterImagePolicy{}, f.defaultInformer) -} - -func (f *clusterImagePolicyInformer) Lister() configv1.ClusterImagePolicyLister { - return configv1.NewClusterImagePolicyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusteroperator.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusteroperator.go deleted file mode 100644 index a49d4f314..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusteroperator.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterOperatorInformer provides access to a shared informer and lister for -// ClusterOperators. -type ClusterOperatorInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ClusterOperatorLister -} - -type clusterOperatorInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterOperatorInformer constructs a new informer for ClusterOperator type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterOperatorInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewClusterOperatorInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredClusterOperatorInformer constructs a new informer for ClusterOperator type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterOperatorInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewClusterOperatorInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewClusterOperatorInformerWithOptions constructs a new informer for ClusterOperator type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterOperatorInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "clusteroperators"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterOperators().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterOperators().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterOperators().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterOperators().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ClusterOperator{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *clusterOperatorInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewClusterOperatorInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *clusterOperatorInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ClusterOperator{}, f.defaultInformer) -} - -func (f *clusterOperatorInformer) Lister() configv1.ClusterOperatorLister { - return configv1.NewClusterOperatorLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterversion.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterversion.go deleted file mode 100644 index aeb49b279..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/clusterversion.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterVersionInformer provides access to a shared informer and lister for -// ClusterVersions. -type ClusterVersionInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ClusterVersionLister -} - -type clusterVersionInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterVersionInformer constructs a new informer for ClusterVersion type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewClusterVersionInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredClusterVersionInformer constructs a new informer for ClusterVersion type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterVersionInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewClusterVersionInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewClusterVersionInformerWithOptions constructs a new informer for ClusterVersion type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterVersionInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "clusterversions"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterVersions().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterVersions().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterVersions().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ClusterVersions().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ClusterVersion{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *clusterVersionInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewClusterVersionInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *clusterVersionInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ClusterVersion{}, f.defaultInformer) -} - -func (f *clusterVersionInformer) Lister() configv1.ClusterVersionLister { - return configv1.NewClusterVersionLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/console.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/console.go deleted file mode 100644 index 66074549d..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/console.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ConsoleInformer provides access to a shared informer and lister for -// Consoles. -type ConsoleInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ConsoleLister -} - -type consoleInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewConsoleInformer constructs a new informer for Console type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewConsoleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewConsoleInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredConsoleInformer constructs a new informer for Console type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredConsoleInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewConsoleInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewConsoleInformerWithOptions constructs a new informer for Console type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewConsoleInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "consoles"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Consoles().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Consoles().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Consoles().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Consoles().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Console{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *consoleInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewConsoleInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *consoleInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Console{}, f.defaultInformer) -} - -func (f *consoleInformer) Lister() configv1.ConsoleLister { - return configv1.NewConsoleLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/criocredentialproviderconfig.go deleted file mode 100644 index aaae42ac3..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/criocredentialproviderconfig.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CRIOCredentialProviderConfigInformer provides access to a shared informer and lister for -// CRIOCredentialProviderConfigs. -type CRIOCredentialProviderConfigInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.CRIOCredentialProviderConfigLister -} - -type cRIOCredentialProviderConfigInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewCRIOCredentialProviderConfigInformer constructs a new informer for CRIOCredentialProviderConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCRIOCredentialProviderConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredCRIOCredentialProviderConfigInformer constructs a new informer for CRIOCredentialProviderConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCRIOCredentialProviderConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewCRIOCredentialProviderConfigInformerWithOptions constructs a new informer for CRIOCredentialProviderConfig type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCRIOCredentialProviderConfigInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "criocredentialproviderconfigs"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().CRIOCredentialProviderConfigs().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().CRIOCredentialProviderConfigs().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().CRIOCredentialProviderConfigs().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().CRIOCredentialProviderConfigs().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.CRIOCredentialProviderConfig{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *cRIOCredentialProviderConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *cRIOCredentialProviderConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.CRIOCredentialProviderConfig{}, f.defaultInformer) -} - -func (f *cRIOCredentialProviderConfigInformer) Lister() configv1.CRIOCredentialProviderConfigLister { - return configv1.NewCRIOCredentialProviderConfigLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/dns.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/dns.go deleted file mode 100644 index 9a235ad34..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/dns.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// DNSInformer provides access to a shared informer and lister for -// DNSes. -type DNSInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.DNSLister -} - -type dNSInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewDNSInformer constructs a new informer for DNS type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewDNSInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewDNSInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredDNSInformer constructs a new informer for DNS type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredDNSInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewDNSInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewDNSInformerWithOptions constructs a new informer for DNS type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewDNSInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "dnss"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().DNSes().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().DNSes().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().DNSes().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().DNSes().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.DNS{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *dNSInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewDNSInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *dNSInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.DNS{}, f.defaultInformer) -} - -func (f *dNSInformer) Lister() configv1.DNSLister { - return configv1.NewDNSLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/featuregate.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/featuregate.go deleted file mode 100644 index f8956e01e..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/featuregate.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// FeatureGateInformer provides access to a shared informer and lister for -// FeatureGates. -type FeatureGateInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.FeatureGateLister -} - -type featureGateInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewFeatureGateInformer constructs a new informer for FeatureGate type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFeatureGateInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewFeatureGateInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredFeatureGateInformer constructs a new informer for FeatureGate type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredFeatureGateInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewFeatureGateInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewFeatureGateInformerWithOptions constructs a new informer for FeatureGate type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFeatureGateInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "featuregates"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().FeatureGates().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().FeatureGates().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().FeatureGates().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().FeatureGates().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.FeatureGate{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *featureGateInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewFeatureGateInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *featureGateInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.FeatureGate{}, f.defaultInformer) -} - -func (f *featureGateInformer) Lister() configv1.FeatureGateLister { - return configv1.NewFeatureGateLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/image.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/image.go deleted file mode 100644 index 81f93f678..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/image.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ImageInformer provides access to a shared informer and lister for -// Images. -type ImageInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ImageLister -} - -type imageInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewImageInformer constructs a new informer for Image type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewImageInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredImageInformer constructs a new informer for Image type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredImageInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewImageInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewImageInformerWithOptions constructs a new informer for Image type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "images"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Images().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Images().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Images().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Images().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Image{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *imageInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewImageInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *imageInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Image{}, f.defaultInformer) -} - -func (f *imageInformer) Lister() configv1.ImageLister { - return configv1.NewImageLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagecontentpolicy.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagecontentpolicy.go deleted file mode 100644 index 36e7af799..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagecontentpolicy.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ImageContentPolicyInformer provides access to a shared informer and lister for -// ImageContentPolicies. -type ImageContentPolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ImageContentPolicyLister -} - -type imageContentPolicyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewImageContentPolicyInformer constructs a new informer for ImageContentPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageContentPolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewImageContentPolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredImageContentPolicyInformer constructs a new informer for ImageContentPolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredImageContentPolicyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewImageContentPolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewImageContentPolicyInformerWithOptions constructs a new informer for ImageContentPolicy type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageContentPolicyInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "imagecontentpolicys"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageContentPolicies().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageContentPolicies().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageContentPolicies().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageContentPolicies().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ImageContentPolicy{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *imageContentPolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewImageContentPolicyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *imageContentPolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ImageContentPolicy{}, f.defaultInformer) -} - -func (f *imageContentPolicyInformer) Lister() configv1.ImageContentPolicyLister { - return configv1.NewImageContentPolicyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagedigestmirrorset.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagedigestmirrorset.go deleted file mode 100644 index ac43768ac..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagedigestmirrorset.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ImageDigestMirrorSetInformer provides access to a shared informer and lister for -// ImageDigestMirrorSets. -type ImageDigestMirrorSetInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ImageDigestMirrorSetLister -} - -type imageDigestMirrorSetInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewImageDigestMirrorSetInformer constructs a new informer for ImageDigestMirrorSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageDigestMirrorSetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewImageDigestMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredImageDigestMirrorSetInformer constructs a new informer for ImageDigestMirrorSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredImageDigestMirrorSetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewImageDigestMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewImageDigestMirrorSetInformerWithOptions constructs a new informer for ImageDigestMirrorSet type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageDigestMirrorSetInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "imagedigestmirrorsets"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageDigestMirrorSets().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageDigestMirrorSets().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageDigestMirrorSets().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageDigestMirrorSets().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ImageDigestMirrorSet{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *imageDigestMirrorSetInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewImageDigestMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *imageDigestMirrorSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ImageDigestMirrorSet{}, f.defaultInformer) -} - -func (f *imageDigestMirrorSetInformer) Lister() configv1.ImageDigestMirrorSetLister { - return configv1.NewImageDigestMirrorSetLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagepolicy.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagepolicy.go deleted file mode 100644 index 237e5259b..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagepolicy.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ImagePolicyInformer provides access to a shared informer and lister for -// ImagePolicies. -type ImagePolicyInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ImagePolicyLister -} - -type imagePolicyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc - namespace string -} - -// NewImagePolicyInformer constructs a new informer for ImagePolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImagePolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewImagePolicyInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredImagePolicyInformer constructs a new informer for ImagePolicy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredImagePolicyInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewImagePolicyInformerWithOptions(client, namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewImagePolicyInformerWithOptions constructs a new informer for ImagePolicy type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImagePolicyInformerWithOptions(client versioned.Interface, namespace string, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "imagepolicys"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImagePolicies(namespace).List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImagePolicies(namespace).Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImagePolicies(namespace).List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImagePolicies(namespace).Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ImagePolicy{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *imagePolicyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewImagePolicyInformerWithOptions(client, f.namespace, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *imagePolicyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ImagePolicy{}, f.defaultInformer) -} - -func (f *imagePolicyInformer) Lister() configv1.ImagePolicyLister { - return configv1.NewImagePolicyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagetagmirrorset.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagetagmirrorset.go deleted file mode 100644 index 49109c837..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/imagetagmirrorset.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ImageTagMirrorSetInformer provides access to a shared informer and lister for -// ImageTagMirrorSets. -type ImageTagMirrorSetInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ImageTagMirrorSetLister -} - -type imageTagMirrorSetInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewImageTagMirrorSetInformer constructs a new informer for ImageTagMirrorSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageTagMirrorSetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewImageTagMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredImageTagMirrorSetInformer constructs a new informer for ImageTagMirrorSet type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredImageTagMirrorSetInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewImageTagMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewImageTagMirrorSetInformerWithOptions constructs a new informer for ImageTagMirrorSet type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewImageTagMirrorSetInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "imagetagmirrorsets"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageTagMirrorSets().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageTagMirrorSets().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageTagMirrorSets().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().ImageTagMirrorSets().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.ImageTagMirrorSet{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *imageTagMirrorSetInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewImageTagMirrorSetInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *imageTagMirrorSetInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.ImageTagMirrorSet{}, f.defaultInformer) -} - -func (f *imageTagMirrorSetInformer) Lister() configv1.ImageTagMirrorSetLister { - return configv1.NewImageTagMirrorSetLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/infrastructure.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/infrastructure.go deleted file mode 100644 index 1c8d5716c..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/infrastructure.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// InfrastructureInformer provides access to a shared informer and lister for -// Infrastructures. -type InfrastructureInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.InfrastructureLister -} - -type infrastructureInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewInfrastructureInformer constructs a new informer for Infrastructure type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInfrastructureInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewInfrastructureInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredInfrastructureInformer constructs a new informer for Infrastructure type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInfrastructureInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewInfrastructureInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewInfrastructureInformerWithOptions constructs a new informer for Infrastructure type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInfrastructureInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "infrastructures"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Infrastructures().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Infrastructures().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Infrastructures().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Infrastructures().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Infrastructure{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *infrastructureInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewInfrastructureInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *infrastructureInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Infrastructure{}, f.defaultInformer) -} - -func (f *infrastructureInformer) Lister() configv1.InfrastructureLister { - return configv1.NewInfrastructureLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/ingress.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/ingress.go deleted file mode 100644 index fd2a7cbf7..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/ingress.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// IngressInformer provides access to a shared informer and lister for -// Ingresses. -type IngressInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.IngressLister -} - -type ingressInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewIngressInformer constructs a new informer for Ingress type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIngressInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewIngressInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredIngressInformer constructs a new informer for Ingress type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredIngressInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewIngressInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewIngressInformerWithOptions constructs a new informer for Ingress type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewIngressInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "ingresss"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Ingresses().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Ingresses().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Ingresses().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Ingresses().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Ingress{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *ingressInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewIngressInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *ingressInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Ingress{}, f.defaultInformer) -} - -func (f *ingressInformer) Lister() configv1.IngressLister { - return configv1.NewIngressLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/insightsdatagather.go deleted file mode 100644 index afbffdfa0..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/insightsdatagather.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherInformer provides access to a shared informer and lister for -// InsightsDataGathers. -type InsightsDataGatherInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.InsightsDataGatherLister -} - -type insightsDataGatherInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewInsightsDataGatherInformerWithOptions constructs a new informer for InsightsDataGather type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "insightsdatagathers"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().InsightsDataGathers().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().InsightsDataGathers().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().InsightsDataGathers().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().InsightsDataGathers().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.InsightsDataGather{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *insightsDataGatherInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *insightsDataGatherInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.InsightsDataGather{}, f.defaultInformer) -} - -func (f *insightsDataGatherInformer) Lister() configv1.InsightsDataGatherLister { - return configv1.NewInsightsDataGatherLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/interface.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/interface.go deleted file mode 100644 index 2f762ff42..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/interface.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // APIServers returns a APIServerInformer. - APIServers() APIServerInformer - // Authentications returns a AuthenticationInformer. - Authentications() AuthenticationInformer - // Builds returns a BuildInformer. - Builds() BuildInformer - // CRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigInformer. - CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInformer - // ClusterImagePolicies returns a ClusterImagePolicyInformer. - ClusterImagePolicies() ClusterImagePolicyInformer - // ClusterOperators returns a ClusterOperatorInformer. - ClusterOperators() ClusterOperatorInformer - // ClusterVersions returns a ClusterVersionInformer. - ClusterVersions() ClusterVersionInformer - // Consoles returns a ConsoleInformer. - Consoles() ConsoleInformer - // DNSes returns a DNSInformer. - DNSes() DNSInformer - // FeatureGates returns a FeatureGateInformer. - FeatureGates() FeatureGateInformer - // Images returns a ImageInformer. - Images() ImageInformer - // ImageContentPolicies returns a ImageContentPolicyInformer. - ImageContentPolicies() ImageContentPolicyInformer - // ImageDigestMirrorSets returns a ImageDigestMirrorSetInformer. - ImageDigestMirrorSets() ImageDigestMirrorSetInformer - // ImagePolicies returns a ImagePolicyInformer. - ImagePolicies() ImagePolicyInformer - // ImageTagMirrorSets returns a ImageTagMirrorSetInformer. - ImageTagMirrorSets() ImageTagMirrorSetInformer - // Infrastructures returns a InfrastructureInformer. - Infrastructures() InfrastructureInformer - // Ingresses returns a IngressInformer. - Ingresses() IngressInformer - // InsightsDataGathers returns a InsightsDataGatherInformer. - InsightsDataGathers() InsightsDataGatherInformer - // Networks returns a NetworkInformer. - Networks() NetworkInformer - // Nodes returns a NodeInformer. - Nodes() NodeInformer - // OAuths returns a OAuthInformer. - OAuths() OAuthInformer - // OperatorHubs returns a OperatorHubInformer. - OperatorHubs() OperatorHubInformer - // Projects returns a ProjectInformer. - Projects() ProjectInformer - // Proxies returns a ProxyInformer. - Proxies() ProxyInformer - // Schedulers returns a SchedulerInformer. - Schedulers() SchedulerInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// APIServers returns a APIServerInformer. -func (v *version) APIServers() APIServerInformer { - return &aPIServerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Authentications returns a AuthenticationInformer. -func (v *version) Authentications() AuthenticationInformer { - return &authenticationInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Builds returns a BuildInformer. -func (v *version) Builds() BuildInformer { - return &buildInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// CRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigInformer. -func (v *version) CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInformer { - return &cRIOCredentialProviderConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterImagePolicies returns a ClusterImagePolicyInformer. -func (v *version) ClusterImagePolicies() ClusterImagePolicyInformer { - return &clusterImagePolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterOperators returns a ClusterOperatorInformer. -func (v *version) ClusterOperators() ClusterOperatorInformer { - return &clusterOperatorInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterVersions returns a ClusterVersionInformer. -func (v *version) ClusterVersions() ClusterVersionInformer { - return &clusterVersionInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Consoles returns a ConsoleInformer. -func (v *version) Consoles() ConsoleInformer { - return &consoleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// DNSes returns a DNSInformer. -func (v *version) DNSes() DNSInformer { - return &dNSInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// FeatureGates returns a FeatureGateInformer. -func (v *version) FeatureGates() FeatureGateInformer { - return &featureGateInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Images returns a ImageInformer. -func (v *version) Images() ImageInformer { - return &imageInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ImageContentPolicies returns a ImageContentPolicyInformer. -func (v *version) ImageContentPolicies() ImageContentPolicyInformer { - return &imageContentPolicyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ImageDigestMirrorSets returns a ImageDigestMirrorSetInformer. -func (v *version) ImageDigestMirrorSets() ImageDigestMirrorSetInformer { - return &imageDigestMirrorSetInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ImagePolicies returns a ImagePolicyInformer. -func (v *version) ImagePolicies() ImagePolicyInformer { - return &imagePolicyInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} -} - -// ImageTagMirrorSets returns a ImageTagMirrorSetInformer. -func (v *version) ImageTagMirrorSets() ImageTagMirrorSetInformer { - return &imageTagMirrorSetInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Infrastructures returns a InfrastructureInformer. -func (v *version) Infrastructures() InfrastructureInformer { - return &infrastructureInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Ingresses returns a IngressInformer. -func (v *version) Ingresses() IngressInformer { - return &ingressInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// InsightsDataGathers returns a InsightsDataGatherInformer. -func (v *version) InsightsDataGathers() InsightsDataGatherInformer { - return &insightsDataGatherInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Networks returns a NetworkInformer. -func (v *version) Networks() NetworkInformer { - return &networkInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Nodes returns a NodeInformer. -func (v *version) Nodes() NodeInformer { - return &nodeInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// OAuths returns a OAuthInformer. -func (v *version) OAuths() OAuthInformer { - return &oAuthInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// OperatorHubs returns a OperatorHubInformer. -func (v *version) OperatorHubs() OperatorHubInformer { - return &operatorHubInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Projects returns a ProjectInformer. -func (v *version) Projects() ProjectInformer { - return &projectInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Proxies returns a ProxyInformer. -func (v *version) Proxies() ProxyInformer { - return &proxyInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// Schedulers returns a SchedulerInformer. -func (v *version) Schedulers() SchedulerInformer { - return &schedulerInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/network.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/network.go deleted file mode 100644 index 66456bbf6..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/network.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// NetworkInformer provides access to a shared informer and lister for -// Networks. -type NetworkInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.NetworkLister -} - -type networkInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewNetworkInformer constructs a new informer for Network type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewNetworkInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredNetworkInformer constructs a new informer for Network type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredNetworkInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewNetworkInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewNetworkInformerWithOptions constructs a new informer for Network type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNetworkInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "networks"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Networks().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Networks().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Networks().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Networks().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Network{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *networkInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewNetworkInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *networkInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Network{}, f.defaultInformer) -} - -func (f *networkInformer) Lister() configv1.NetworkLister { - return configv1.NewNetworkLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/node.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/node.go deleted file mode 100644 index 4f5f58479..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/node.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// NodeInformer provides access to a shared informer and lister for -// Nodes. -type NodeInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.NodeLister -} - -type nodeInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewNodeInformer constructs a new informer for Node type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNodeInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewNodeInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredNodeInformer constructs a new informer for Node type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredNodeInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewNodeInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewNodeInformerWithOptions constructs a new informer for Node type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewNodeInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "nodes"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Nodes().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Nodes().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Nodes().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Nodes().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Node{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *nodeInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewNodeInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *nodeInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Node{}, f.defaultInformer) -} - -func (f *nodeInformer) Lister() configv1.NodeLister { - return configv1.NewNodeLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/oauth.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/oauth.go deleted file mode 100644 index a0162ac6f..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/oauth.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// OAuthInformer provides access to a shared informer and lister for -// OAuths. -type OAuthInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.OAuthLister -} - -type oAuthInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewOAuthInformer constructs a new informer for OAuth type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOAuthInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewOAuthInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredOAuthInformer constructs a new informer for OAuth type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredOAuthInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewOAuthInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewOAuthInformerWithOptions constructs a new informer for OAuth type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOAuthInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "oauths"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OAuths().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OAuths().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OAuths().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OAuths().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.OAuth{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *oAuthInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewOAuthInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *oAuthInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.OAuth{}, f.defaultInformer) -} - -func (f *oAuthInformer) Lister() configv1.OAuthLister { - return configv1.NewOAuthLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/operatorhub.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/operatorhub.go deleted file mode 100644 index 0633f748e..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/operatorhub.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// OperatorHubInformer provides access to a shared informer and lister for -// OperatorHubs. -type OperatorHubInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.OperatorHubLister -} - -type operatorHubInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewOperatorHubInformer constructs a new informer for OperatorHub type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOperatorHubInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewOperatorHubInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredOperatorHubInformer constructs a new informer for OperatorHub type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredOperatorHubInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewOperatorHubInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewOperatorHubInformerWithOptions constructs a new informer for OperatorHub type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewOperatorHubInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "operatorhubs"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OperatorHubs().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OperatorHubs().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OperatorHubs().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().OperatorHubs().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.OperatorHub{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *operatorHubInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewOperatorHubInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *operatorHubInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.OperatorHub{}, f.defaultInformer) -} - -func (f *operatorHubInformer) Lister() configv1.OperatorHubLister { - return configv1.NewOperatorHubLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/project.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/project.go deleted file mode 100644 index cdc3875a8..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/project.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ProjectInformer provides access to a shared informer and lister for -// Projects. -type ProjectInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ProjectLister -} - -type projectInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewProjectInformer constructs a new informer for Project type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewProjectInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewProjectInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredProjectInformer constructs a new informer for Project type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredProjectInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewProjectInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewProjectInformerWithOptions constructs a new informer for Project type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewProjectInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "projects"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Projects().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Projects().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Projects().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Projects().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Project{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *projectInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewProjectInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *projectInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Project{}, f.defaultInformer) -} - -func (f *projectInformer) Lister() configv1.ProjectLister { - return configv1.NewProjectLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/proxy.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/proxy.go deleted file mode 100644 index be463759c..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/proxy.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ProxyInformer provides access to a shared informer and lister for -// Proxies. -type ProxyInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.ProxyLister -} - -type proxyInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewProxyInformer constructs a new informer for Proxy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewProxyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewProxyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredProxyInformer constructs a new informer for Proxy type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredProxyInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewProxyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewProxyInformerWithOptions constructs a new informer for Proxy type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewProxyInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "proxys"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Proxies().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Proxies().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Proxies().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Proxies().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Proxy{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *proxyInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewProxyInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *proxyInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Proxy{}, f.defaultInformer) -} - -func (f *proxyInformer) Lister() configv1.ProxyLister { - return configv1.NewProxyLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/scheduler.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/scheduler.go deleted file mode 100644 index 6a390cd6c..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1/scheduler.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - time "time" - - apiconfigv1 "github.com/openshift/api/config/v1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1 "github.com/openshift/client-go/config/listers/config/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// SchedulerInformer provides access to a shared informer and lister for -// Schedulers. -type SchedulerInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1.SchedulerLister -} - -type schedulerInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewSchedulerInformer constructs a new informer for Scheduler type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSchedulerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewSchedulerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredSchedulerInformer constructs a new informer for Scheduler type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredSchedulerInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewSchedulerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewSchedulerInformerWithOptions constructs a new informer for Scheduler type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewSchedulerInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1", Resource: "schedulers"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Schedulers().List(context.Background(), opts) - }, - WatchFunc: func(opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Schedulers().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts metav1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Schedulers().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1().Schedulers().Watch(ctx, opts) - }, - }, client), - &apiconfigv1.Scheduler{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *schedulerInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewSchedulerInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *schedulerInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1.Scheduler{}, f.defaultInformer) -} - -func (f *schedulerInformer) Lister() configv1.SchedulerLister { - return configv1.NewSchedulerLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/backup.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/backup.go deleted file mode 100644 index e3ddf964a..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/backup.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// BackupInformer provides access to a shared informer and lister for -// Backups. -type BackupInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha1.BackupLister -} - -type backupInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewBackupInformer constructs a new informer for Backup type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewBackupInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewBackupInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredBackupInformer constructs a new informer for Backup type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredBackupInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewBackupInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewBackupInformerWithOptions constructs a new informer for Backup type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewBackupInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha1", Resource: "backups"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().Backups().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().Backups().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().Backups().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().Backups().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha1.Backup{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *backupInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewBackupInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *backupInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha1.Backup{}, f.defaultInformer) -} - -func (f *backupInformer) Lister() configv1alpha1.BackupLister { - return configv1alpha1.NewBackupLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/clustermonitoring.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/clustermonitoring.go deleted file mode 100644 index 73d70fb33..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/clustermonitoring.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterMonitoringInformer provides access to a shared informer and lister for -// ClusterMonitorings. -type ClusterMonitoringInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha1.ClusterMonitoringLister -} - -type clusterMonitoringInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewClusterMonitoringInformer constructs a new informer for ClusterMonitoring type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterMonitoringInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewClusterMonitoringInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredClusterMonitoringInformer constructs a new informer for ClusterMonitoring type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredClusterMonitoringInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewClusterMonitoringInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewClusterMonitoringInformerWithOptions constructs a new informer for ClusterMonitoring type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewClusterMonitoringInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha1", Resource: "clustermonitorings"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().ClusterMonitorings().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().ClusterMonitorings().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().ClusterMonitorings().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().ClusterMonitorings().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha1.ClusterMonitoring{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *clusterMonitoringInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewClusterMonitoringInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *clusterMonitoringInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha1.ClusterMonitoring{}, f.defaultInformer) -} - -func (f *clusterMonitoringInformer) Lister() configv1alpha1.ClusterMonitoringLister { - return configv1alpha1.NewClusterMonitoringLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/criocredentialproviderconfig.go deleted file mode 100644 index c3c241a38..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/criocredentialproviderconfig.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// CRIOCredentialProviderConfigInformer provides access to a shared informer and lister for -// CRIOCredentialProviderConfigs. -type CRIOCredentialProviderConfigInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha1.CRIOCredentialProviderConfigLister -} - -type cRIOCredentialProviderConfigInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewCRIOCredentialProviderConfigInformer constructs a new informer for CRIOCredentialProviderConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCRIOCredentialProviderConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredCRIOCredentialProviderConfigInformer constructs a new informer for CRIOCredentialProviderConfig type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredCRIOCredentialProviderConfigInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewCRIOCredentialProviderConfigInformerWithOptions constructs a new informer for CRIOCredentialProviderConfig type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewCRIOCredentialProviderConfigInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha1", Resource: "criocredentialproviderconfigs"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().CRIOCredentialProviderConfigs().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().CRIOCredentialProviderConfigs().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().CRIOCredentialProviderConfigs().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().CRIOCredentialProviderConfigs().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha1.CRIOCredentialProviderConfig{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *cRIOCredentialProviderConfigInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewCRIOCredentialProviderConfigInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *cRIOCredentialProviderConfigInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha1.CRIOCredentialProviderConfig{}, f.defaultInformer) -} - -func (f *cRIOCredentialProviderConfigInformer) Lister() configv1alpha1.CRIOCredentialProviderConfigLister { - return configv1alpha1.NewCRIOCredentialProviderConfigLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/insightsdatagather.go deleted file mode 100644 index 44e980ff7..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/insightsdatagather.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherInformer provides access to a shared informer and lister for -// InsightsDataGathers. -type InsightsDataGatherInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha1.InsightsDataGatherLister -} - -type insightsDataGatherInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewInsightsDataGatherInformerWithOptions constructs a new informer for InsightsDataGather type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha1", Resource: "insightsdatagathers"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().InsightsDataGathers().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().InsightsDataGathers().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().InsightsDataGathers().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().InsightsDataGathers().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha1.InsightsDataGather{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *insightsDataGatherInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *insightsDataGatherInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha1.InsightsDataGather{}, f.defaultInformer) -} - -func (f *insightsDataGatherInformer) Lister() configv1alpha1.InsightsDataGatherLister { - return configv1alpha1.NewInsightsDataGatherLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go deleted file mode 100644 index 17b0ebcc0..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/interface.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // Backups returns a BackupInformer. - Backups() BackupInformer - // CRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigInformer. - CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInformer - // ClusterMonitorings returns a ClusterMonitoringInformer. - ClusterMonitorings() ClusterMonitoringInformer - // InsightsDataGathers returns a InsightsDataGatherInformer. - InsightsDataGathers() InsightsDataGatherInformer - // PKIs returns a PKIInformer. - PKIs() PKIInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// Backups returns a BackupInformer. -func (v *version) Backups() BackupInformer { - return &backupInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// CRIOCredentialProviderConfigs returns a CRIOCredentialProviderConfigInformer. -func (v *version) CRIOCredentialProviderConfigs() CRIOCredentialProviderConfigInformer { - return &cRIOCredentialProviderConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// ClusterMonitorings returns a ClusterMonitoringInformer. -func (v *version) ClusterMonitorings() ClusterMonitoringInformer { - return &clusterMonitoringInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// InsightsDataGathers returns a InsightsDataGatherInformer. -func (v *version) InsightsDataGathers() InsightsDataGatherInformer { - return &insightsDataGatherInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} - -// PKIs returns a PKIInformer. -func (v *version) PKIs() PKIInformer { - return &pKIInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/pki.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/pki.go deleted file mode 100644 index 1dce29e56..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1/pki.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - context "context" - time "time" - - apiconfigv1alpha1 "github.com/openshift/api/config/v1alpha1" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha1 "github.com/openshift/client-go/config/listers/config/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// PKIInformer provides access to a shared informer and lister for -// PKIs. -type PKIInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha1.PKILister -} - -type pKIInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewPKIInformer constructs a new informer for PKI type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPKIInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewPKIInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredPKIInformer constructs a new informer for PKI type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredPKIInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewPKIInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewPKIInformerWithOptions constructs a new informer for PKI type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewPKIInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha1", Resource: "pkis"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().PKIs().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().PKIs().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().PKIs().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha1().PKIs().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha1.PKI{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *pKIInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewPKIInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *pKIInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha1.PKI{}, f.defaultInformer) -} - -func (f *pKIInformer) Lister() configv1alpha1.PKILister { - return configv1alpha1.NewPKILister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/insightsdatagather.go deleted file mode 100644 index 1b20501cf..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/insightsdatagather.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - context "context" - time "time" - - apiconfigv1alpha2 "github.com/openshift/api/config/v1alpha2" - versioned "github.com/openshift/client-go/config/clientset/versioned" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - configv1alpha2 "github.com/openshift/client-go/config/listers/config/v1alpha2" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - watch "k8s.io/apimachinery/pkg/watch" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherInformer provides access to a shared informer and lister for -// InsightsDataGathers. -type InsightsDataGatherInformer interface { - Informer() cache.SharedIndexInformer - Lister() configv1alpha2.InsightsDataGatherLister -} - -type insightsDataGatherInformer struct { - factory internalinterfaces.SharedInformerFactory - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// NewInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers}) -} - -// NewFilteredInsightsDataGatherInformer constructs a new informer for InsightsDataGather type. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewFilteredInsightsDataGatherInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: indexers, TweakListOptions: tweakListOptions}) -} - -// NewInsightsDataGatherInformerWithOptions constructs a new informer for InsightsDataGather type with additional options. -// Always prefer using an informer factory to get a shared informer instead of getting an independent -// one. This reduces memory footprint and number of connections to the server. -func NewInsightsDataGatherInformerWithOptions(client versioned.Interface, options internalinterfaces.InformerOptions) cache.SharedIndexInformer { - gvr := schema.GroupVersionResource{Group: "config.openshift.io", Version: "v1alpha2", Resource: "insightsdatagathers"} - identifier := options.InformerName.WithResource(gvr) - tweakListOptions := options.TweakListOptions - return cache.NewSharedIndexInformerWithOptions( - cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ - ListFunc: func(opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha2().InsightsDataGathers().List(context.Background(), opts) - }, - WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha2().InsightsDataGathers().Watch(context.Background(), opts) - }, - ListWithContextFunc: func(ctx context.Context, opts v1.ListOptions) (runtime.Object, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha2().InsightsDataGathers().List(ctx, opts) - }, - WatchFuncWithContext: func(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - if tweakListOptions != nil { - tweakListOptions(&opts) - } - return client.ConfigV1alpha2().InsightsDataGathers().Watch(ctx, opts) - }, - }, client), - &apiconfigv1alpha2.InsightsDataGather{}, - cache.SharedIndexInformerOptions{ - ResyncPeriod: options.ResyncPeriod, - Indexers: options.Indexers, - Identifier: identifier, - }, - ) -} - -func (f *insightsDataGatherInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { - return NewInsightsDataGatherInformerWithOptions(client, internalinterfaces.InformerOptions{ResyncPeriod: resyncPeriod, Indexers: cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, InformerName: f.factory.InformerName(), TweakListOptions: f.tweakListOptions}) -} - -func (f *insightsDataGatherInformer) Informer() cache.SharedIndexInformer { - return f.factory.InformerFor(&apiconfigv1alpha2.InsightsDataGather{}, f.defaultInformer) -} - -func (f *insightsDataGatherInformer) Lister() configv1alpha2.InsightsDataGatherLister { - return configv1alpha2.NewInsightsDataGatherLister(f.Informer().GetIndexer()) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/interface.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/interface.go deleted file mode 100644 index f7d8f276f..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2/interface.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" -) - -// Interface provides access to all the informers in this group version. -type Interface interface { - // InsightsDataGathers returns a InsightsDataGatherInformer. - InsightsDataGathers() InsightsDataGatherInformer -} - -type version struct { - factory internalinterfaces.SharedInformerFactory - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc -} - -// New returns a new Interface. -func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { - return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} -} - -// InsightsDataGathers returns a InsightsDataGatherInformer. -func (v *version) InsightsDataGathers() InsightsDataGatherInformer { - return &insightsDataGatherInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go deleted file mode 100644 index 1e357ea7b..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/factory.go +++ /dev/null @@ -1,317 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - context "context" - reflect "reflect" - sync "sync" - time "time" - - versioned "github.com/openshift/client-go/config/clientset/versioned" - config "github.com/openshift/client-go/config/informers/externalversions/config" - internalinterfaces "github.com/openshift/client-go/config/informers/externalversions/internalinterfaces" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - wait "k8s.io/apimachinery/pkg/util/wait" - cache "k8s.io/client-go/tools/cache" -) - -// SharedInformerOption defines the functional option type for SharedInformerFactory. -type SharedInformerOption func(*sharedInformerFactory) *sharedInformerFactory - -type sharedInformerFactory struct { - client versioned.Interface - namespace string - tweakListOptions internalinterfaces.TweakListOptionsFunc - lock sync.Mutex - defaultResync time.Duration - customResync map[reflect.Type]time.Duration - transform cache.TransformFunc - informerName *cache.InformerName - - informers map[reflect.Type]cache.SharedIndexInformer - // startedInformers is used for tracking which informers have been started. - // This allows Start() to be called multiple times safely. - startedInformers map[reflect.Type]bool - // wg tracks how many goroutines were started. - wg sync.WaitGroup - // shuttingDown is true when Shutdown has been called. It may still be running - // because it needs to wait for goroutines. - shuttingDown bool -} - -// WithCustomResyncConfig sets a custom resync period for the specified informer types. -func WithCustomResyncConfig(resyncConfig map[v1.Object]time.Duration) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - for k, v := range resyncConfig { - factory.customResync[reflect.TypeOf(k)] = v - } - return factory - } -} - -// WithTweakListOptions sets a custom filter on all listers of the configured SharedInformerFactory. -func WithTweakListOptions(tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.tweakListOptions = tweakListOptions - return factory - } -} - -// WithNamespace limits the SharedInformerFactory to the specified namespace. -func WithNamespace(namespace string) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.namespace = namespace - return factory - } -} - -// WithTransform sets a transform on all informers. -func WithTransform(transform cache.TransformFunc) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.transform = transform - return factory - } -} - -// WithInformerName sets the InformerName for informer identity used in metrics. -// The InformerName must be created via cache.NewInformerName() at startup, -// which validates global uniqueness. Each informer type will register its -// GVR under this name. -func WithInformerName(informerName *cache.InformerName) SharedInformerOption { - return func(factory *sharedInformerFactory) *sharedInformerFactory { - factory.informerName = informerName - return factory - } -} - -func (f *sharedInformerFactory) InformerName() *cache.InformerName { - return f.informerName -} - -// NewSharedInformerFactory constructs a new instance of sharedInformerFactory for all namespaces. -func NewSharedInformerFactory(client versioned.Interface, defaultResync time.Duration) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync) -} - -// NewFilteredSharedInformerFactory constructs a new instance of sharedInformerFactory. -// Listers obtained via this SharedInformerFactory will be subject to the same filters -// as specified here. -// -// Deprecated: Please use NewSharedInformerFactoryWithOptions instead -func NewFilteredSharedInformerFactory(client versioned.Interface, defaultResync time.Duration, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) SharedInformerFactory { - return NewSharedInformerFactoryWithOptions(client, defaultResync, WithNamespace(namespace), WithTweakListOptions(tweakListOptions)) -} - -// NewSharedInformerFactoryWithOptions constructs a new instance of a SharedInformerFactory with additional options. -func NewSharedInformerFactoryWithOptions(client versioned.Interface, defaultResync time.Duration, options ...SharedInformerOption) SharedInformerFactory { - factory := &sharedInformerFactory{ - client: client, - namespace: v1.NamespaceAll, - defaultResync: defaultResync, - informers: make(map[reflect.Type]cache.SharedIndexInformer), - startedInformers: make(map[reflect.Type]bool), - customResync: make(map[reflect.Type]time.Duration), - } - - // Apply all options - for _, opt := range options { - factory = opt(factory) - } - - return factory -} - -func (f *sharedInformerFactory) Start(stopCh <-chan struct{}) { - f.StartWithContext(wait.ContextForChannel(stopCh)) -} - -func (f *sharedInformerFactory) StartWithContext(ctx context.Context) { - f.lock.Lock() - defer f.lock.Unlock() - - if f.shuttingDown { - return - } - - for informerType, informer := range f.informers { - if !f.startedInformers[informerType] { - f.wg.Go(func() { - informer.RunWithContext(ctx) - }) - f.startedInformers[informerType] = true - } - } -} - -func (f *sharedInformerFactory) Shutdown() { - f.lock.Lock() - f.shuttingDown = true - f.lock.Unlock() - - // Will return immediately if there is nothing to wait for. - f.wg.Wait() - f.informerName.Release() -} - -func (f *sharedInformerFactory) WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool { - result := f.WaitForCacheSyncWithContext(wait.ContextForChannel(stopCh)) - return result.Synced -} - -func (f *sharedInformerFactory) WaitForCacheSyncWithContext(ctx context.Context) cache.SyncResult { - informers := func() map[reflect.Type]cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informers := map[reflect.Type]cache.SharedIndexInformer{} - for informerType, informer := range f.informers { - if f.startedInformers[informerType] { - informers[informerType] = informer - } - } - return informers - }() - - // Wait for informers to sync, without polling. - cacheSyncs := make([]cache.DoneChecker, 0, len(informers)) - for _, informer := range informers { - cacheSyncs = append(cacheSyncs, informer.HasSyncedChecker()) - } - cache.WaitFor(ctx, "" /* no logging */, cacheSyncs...) - - res := cache.SyncResult{ - Synced: make(map[reflect.Type]bool, len(informers)), - } - failed := false - for informType, informer := range informers { - hasSynced := informer.HasSynced() - if !hasSynced { - failed = true - } - res.Synced[informType] = hasSynced - } - if failed { - // context.Cause is more informative than ctx.Err(). - // This must be non-nil, otherwise WaitFor wouldn't have stopped - // prematurely. - res.Err = context.Cause(ctx) - } - - return res -} - -// InformerFor returns the SharedIndexInformer for obj using an internal -// client. -func (f *sharedInformerFactory) InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer { - f.lock.Lock() - defer f.lock.Unlock() - - informerType := reflect.TypeOf(obj) - informer, exists := f.informers[informerType] - if exists { - return informer - } - - resyncPeriod, exists := f.customResync[informerType] - if !exists { - resyncPeriod = f.defaultResync - } - - informer = newFunc(f.client, resyncPeriod) - if f.transform != nil { - informer.SetTransform(f.transform) - } - f.informers[informerType] = informer - - return informer -} - -// SharedInformerFactory provides shared informers for resources in all known -// API group versions. -// -// It is typically used like this: -// -// ctx, cancel := context.WithCancel(context.Background()) -// defer cancel() -// factory := NewSharedInformerFactory(client, resyncPeriod) -// defer factory.WaitForStop() // Returns immediately if nothing was started. -// genericInformer := factory.ForResource(resource) -// typedInformer := factory.SomeAPIGroup().V1().SomeType() -// handle, err := typeInformer.Informer().AddEventHandler(...) -// if err != nil { -// return fmt.Errorf("register event handler: %v", err) -// } -// defer typeInformer.Informer().RemoveEventHandler(handle) // Avoids leaking goroutines. -// factory.StartWithContext(ctx) // Start processing these informers. -// synced := factory.WaitForCacheSyncWithContext(ctx) -// if err := synced.AsError(); err != nil { -// return err -// } -// for v := range synced { -// // Only if desired log some information similar to this. -// fmt.Fprintf(os.Stdout, "cache synced: %s", v) -// } -// -// // Also make sure that all of the initial cache events have been delivered. -// if !WaitFor(ctx, "event handler sync", handle.HasSyncedChecker()) { -// // Must have failed because of context. -// return fmt.Errorf("sync event handler: %w", context.Cause(ctx)) -// } -// -// // Creating informers can also be created after Start, but then -// // Start must be called again: -// anotherGenericInformer := factory.ForResource(resource) -// factory.StartWithContext(ctx) -type SharedInformerFactory interface { - internalinterfaces.SharedInformerFactory - - // Start initializes all requested informers. They are handled in goroutines - // which run until the stop channel gets closed. - // Warning: Start does not block. When run in a go-routine, it will race with a later WaitForCacheSync. - // - // Contextual logging: StartWithContext should be used instead of Start in code which supports contextual logging. - Start(stopCh <-chan struct{}) - - // StartWithContext initializes all requested informers. They are handled in goroutines - // which run until the context gets canceled. - // Warning: StartWithContext does not block. When run in a go-routine, it will race with a later WaitForCacheSync. - StartWithContext(ctx context.Context) - - // Shutdown marks a factory as shutting down. At that point no new - // informers can be started anymore and Start will return without - // doing anything. - // - // In addition, Shutdown blocks until all goroutines have terminated. For that - // to happen, the close channel(s) that they were started with must be closed, - // either before Shutdown gets called or while it is waiting. - // - // Shutdown may be called multiple times, even concurrently. All such calls will - // block until all goroutines have terminated. - Shutdown() - - // WaitForCacheSync blocks until all started informers' caches were synced - // or the stop channel gets closed. - // - // Contextual logging: WaitForCacheSync should be used instead of WaitForCacheSync in code which supports contextual logging. It also returns a more useful result. - WaitForCacheSync(stopCh <-chan struct{}) map[reflect.Type]bool - - // WaitForCacheSyncWithContext blocks until all started informers' caches were synced - // or the context gets canceled. - WaitForCacheSyncWithContext(ctx context.Context) cache.SyncResult - - // ForResource gives generic access to a shared informer of the matching type. - ForResource(resource schema.GroupVersionResource) (GenericInformer, error) - - // InformerFor returns the SharedIndexInformer for obj using an internal - // client. - InformerFor(obj runtime.Object, newFunc internalinterfaces.NewInformerFunc) cache.SharedIndexInformer - - Config() config.Interface -} - -func (f *sharedInformerFactory) Config() config.Interface { - return config.New(f, f.namespace, f.tweakListOptions) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go deleted file mode 100644 index fbc19aaef..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/generic.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package externalversions - -import ( - fmt "fmt" - - v1 "github.com/openshift/api/config/v1" - v1alpha1 "github.com/openshift/api/config/v1alpha1" - v1alpha2 "github.com/openshift/api/config/v1alpha2" - schema "k8s.io/apimachinery/pkg/runtime/schema" - cache "k8s.io/client-go/tools/cache" -) - -// GenericInformer is type of SharedIndexInformer which will locate and delegate to other -// sharedInformers based on type -type GenericInformer interface { - Informer() cache.SharedIndexInformer - Lister() cache.GenericLister -} - -type genericInformer struct { - informer cache.SharedIndexInformer - resource schema.GroupResource -} - -// Informer returns the SharedIndexInformer. -func (f *genericInformer) Informer() cache.SharedIndexInformer { - return f.informer -} - -// Lister returns the GenericLister. -func (f *genericInformer) Lister() cache.GenericLister { - return cache.NewGenericLister(f.Informer().GetIndexer(), f.resource) -} - -// ForResource gives generic access to a shared informer of the matching type -// TODO extend this to unknown resources with a client pool -func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource) (GenericInformer, error) { - switch resource { - // Group=config.openshift.io, Version=v1 - case v1.SchemeGroupVersion.WithResource("apiservers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().APIServers().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("authentications"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Authentications().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("builds"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Builds().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("criocredentialproviderconfigs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().CRIOCredentialProviderConfigs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("clusterimagepolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ClusterImagePolicies().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("clusteroperators"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ClusterOperators().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("clusterversions"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ClusterVersions().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("consoles"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Consoles().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("dnses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().DNSes().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("featuregates"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().FeatureGates().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("images"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Images().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("imagecontentpolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ImageContentPolicies().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("imagedigestmirrorsets"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ImageDigestMirrorSets().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("imagepolicies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ImagePolicies().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("imagetagmirrorsets"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().ImageTagMirrorSets().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("infrastructures"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Infrastructures().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("ingresses"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Ingresses().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("insightsdatagathers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().InsightsDataGathers().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("networks"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Networks().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("nodes"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Nodes().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("oauths"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().OAuths().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("operatorhubs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().OperatorHubs().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("projects"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Projects().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("proxies"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Proxies().Informer()}, nil - case v1.SchemeGroupVersion.WithResource("schedulers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1().Schedulers().Informer()}, nil - - // Group=config.openshift.io, Version=v1alpha1 - case v1alpha1.SchemeGroupVersion.WithResource("backups"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().Backups().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("criocredentialproviderconfigs"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().CRIOCredentialProviderConfigs().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("clustermonitorings"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().ClusterMonitorings().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("insightsdatagathers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().InsightsDataGathers().Informer()}, nil - case v1alpha1.SchemeGroupVersion.WithResource("pkis"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha1().PKIs().Informer()}, nil - - // Group=config.openshift.io, Version=v1alpha2 - case v1alpha2.SchemeGroupVersion.WithResource("insightsdatagathers"): - return &genericInformer{resource: resource.GroupResource(), informer: f.Config().V1alpha2().InsightsDataGathers().Informer()}, nil - - } - - return nil, fmt.Errorf("no informer found for %v", resource) -} diff --git a/vendor/github.com/openshift/client-go/config/informers/externalversions/internalinterfaces/factory_interfaces.go b/vendor/github.com/openshift/client-go/config/informers/externalversions/internalinterfaces/factory_interfaces.go deleted file mode 100644 index 28d9ec5e5..000000000 --- a/vendor/github.com/openshift/client-go/config/informers/externalversions/internalinterfaces/factory_interfaces.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by informer-gen. DO NOT EDIT. - -package internalinterfaces - -import ( - time "time" - - versioned "github.com/openshift/client-go/config/clientset/versioned" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - cache "k8s.io/client-go/tools/cache" -) - -// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer. -type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer - -// SharedInformerFactory a small interface to allow for adding an informer without an import cycle -type SharedInformerFactory interface { - Start(stopCh <-chan struct{}) - InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer - InformerName() *cache.InformerName -} - -// TweakListOptionsFunc is a function that transforms a v1.ListOptions. -type TweakListOptionsFunc func(*v1.ListOptions) - -// InformerOptions holds the options for creating an informer. -type InformerOptions struct { - // ResyncPeriod is the resync period for this informer. - // If not set, defaults to 0 (no resync). - ResyncPeriod time.Duration - - // Indexers are the indexers for this informer. - Indexers cache.Indexers - - // InformerName is used to uniquely identify this informer for metrics. - // If not set, metrics will not be published for this informer. - // Use cache.NewInformerName() to create an InformerName at startup. - InformerName *cache.InformerName - - // TweakListOptions is an optional function to modify the list options. - TweakListOptions TweakListOptionsFunc -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/apiserver.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/apiserver.go deleted file mode 100644 index 59c5faa8a..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/apiserver.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// APIServerLister helps list APIServers. -// All objects returned here must be treated as read-only. -type APIServerLister interface { - // List lists all APIServers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.APIServer, err error) - // Get retrieves the APIServer from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.APIServer, error) - APIServerListerExpansion -} - -// aPIServerLister implements the APIServerLister interface. -type aPIServerLister struct { - listers.ResourceIndexer[*configv1.APIServer] -} - -// NewAPIServerLister returns a new APIServerLister. -func NewAPIServerLister(indexer cache.Indexer) APIServerLister { - return &aPIServerLister{listers.New[*configv1.APIServer](indexer, configv1.Resource("apiserver"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/authentication.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/authentication.go deleted file mode 100644 index 242930e68..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/authentication.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// AuthenticationLister helps list Authentications. -// All objects returned here must be treated as read-only. -type AuthenticationLister interface { - // List lists all Authentications in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Authentication, err error) - // Get retrieves the Authentication from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Authentication, error) - AuthenticationListerExpansion -} - -// authenticationLister implements the AuthenticationLister interface. -type authenticationLister struct { - listers.ResourceIndexer[*configv1.Authentication] -} - -// NewAuthenticationLister returns a new AuthenticationLister. -func NewAuthenticationLister(indexer cache.Indexer) AuthenticationLister { - return &authenticationLister{listers.New[*configv1.Authentication](indexer, configv1.Resource("authentication"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/build.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/build.go deleted file mode 100644 index b98accfee..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/build.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// BuildLister helps list Builds. -// All objects returned here must be treated as read-only. -type BuildLister interface { - // List lists all Builds in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Build, err error) - // Get retrieves the Build from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Build, error) - BuildListerExpansion -} - -// buildLister implements the BuildLister interface. -type buildLister struct { - listers.ResourceIndexer[*configv1.Build] -} - -// NewBuildLister returns a new BuildLister. -func NewBuildLister(indexer cache.Indexer) BuildLister { - return &buildLister{listers.New[*configv1.Build](indexer, configv1.Resource("build"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterimagepolicy.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterimagepolicy.go deleted file mode 100644 index 693b81593..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterimagepolicy.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterImagePolicyLister helps list ClusterImagePolicies. -// All objects returned here must be treated as read-only. -type ClusterImagePolicyLister interface { - // List lists all ClusterImagePolicies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ClusterImagePolicy, err error) - // Get retrieves the ClusterImagePolicy from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ClusterImagePolicy, error) - ClusterImagePolicyListerExpansion -} - -// clusterImagePolicyLister implements the ClusterImagePolicyLister interface. -type clusterImagePolicyLister struct { - listers.ResourceIndexer[*configv1.ClusterImagePolicy] -} - -// NewClusterImagePolicyLister returns a new ClusterImagePolicyLister. -func NewClusterImagePolicyLister(indexer cache.Indexer) ClusterImagePolicyLister { - return &clusterImagePolicyLister{listers.New[*configv1.ClusterImagePolicy](indexer, configv1.Resource("clusterimagepolicy"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusteroperator.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/clusteroperator.go deleted file mode 100644 index a8eaacf78..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusteroperator.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterOperatorLister helps list ClusterOperators. -// All objects returned here must be treated as read-only. -type ClusterOperatorLister interface { - // List lists all ClusterOperators in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ClusterOperator, err error) - // Get retrieves the ClusterOperator from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ClusterOperator, error) - ClusterOperatorListerExpansion -} - -// clusterOperatorLister implements the ClusterOperatorLister interface. -type clusterOperatorLister struct { - listers.ResourceIndexer[*configv1.ClusterOperator] -} - -// NewClusterOperatorLister returns a new ClusterOperatorLister. -func NewClusterOperatorLister(indexer cache.Indexer) ClusterOperatorLister { - return &clusterOperatorLister{listers.New[*configv1.ClusterOperator](indexer, configv1.Resource("clusteroperator"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterversion.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterversion.go deleted file mode 100644 index 9f466ccb9..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/clusterversion.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterVersionLister helps list ClusterVersions. -// All objects returned here must be treated as read-only. -type ClusterVersionLister interface { - // List lists all ClusterVersions in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ClusterVersion, err error) - // Get retrieves the ClusterVersion from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ClusterVersion, error) - ClusterVersionListerExpansion -} - -// clusterVersionLister implements the ClusterVersionLister interface. -type clusterVersionLister struct { - listers.ResourceIndexer[*configv1.ClusterVersion] -} - -// NewClusterVersionLister returns a new ClusterVersionLister. -func NewClusterVersionLister(indexer cache.Indexer) ClusterVersionLister { - return &clusterVersionLister{listers.New[*configv1.ClusterVersion](indexer, configv1.Resource("clusterversion"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/console.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/console.go deleted file mode 100644 index e9d9558e7..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/console.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ConsoleLister helps list Consoles. -// All objects returned here must be treated as read-only. -type ConsoleLister interface { - // List lists all Consoles in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Console, err error) - // Get retrieves the Console from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Console, error) - ConsoleListerExpansion -} - -// consoleLister implements the ConsoleLister interface. -type consoleLister struct { - listers.ResourceIndexer[*configv1.Console] -} - -// NewConsoleLister returns a new ConsoleLister. -func NewConsoleLister(indexer cache.Indexer) ConsoleLister { - return &consoleLister{listers.New[*configv1.Console](indexer, configv1.Resource("console"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/criocredentialproviderconfig.go deleted file mode 100644 index 7b4c42ade..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/criocredentialproviderconfig.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// CRIOCredentialProviderConfigLister helps list CRIOCredentialProviderConfigs. -// All objects returned here must be treated as read-only. -type CRIOCredentialProviderConfigLister interface { - // List lists all CRIOCredentialProviderConfigs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.CRIOCredentialProviderConfig, err error) - // Get retrieves the CRIOCredentialProviderConfig from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.CRIOCredentialProviderConfig, error) - CRIOCredentialProviderConfigListerExpansion -} - -// cRIOCredentialProviderConfigLister implements the CRIOCredentialProviderConfigLister interface. -type cRIOCredentialProviderConfigLister struct { - listers.ResourceIndexer[*configv1.CRIOCredentialProviderConfig] -} - -// NewCRIOCredentialProviderConfigLister returns a new CRIOCredentialProviderConfigLister. -func NewCRIOCredentialProviderConfigLister(indexer cache.Indexer) CRIOCredentialProviderConfigLister { - return &cRIOCredentialProviderConfigLister{listers.New[*configv1.CRIOCredentialProviderConfig](indexer, configv1.Resource("criocredentialproviderconfig"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/dns.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/dns.go deleted file mode 100644 index 95dbcd082..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/dns.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// DNSLister helps list DNSes. -// All objects returned here must be treated as read-only. -type DNSLister interface { - // List lists all DNSes in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.DNS, err error) - // Get retrieves the DNS from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.DNS, error) - DNSListerExpansion -} - -// dNSLister implements the DNSLister interface. -type dNSLister struct { - listers.ResourceIndexer[*configv1.DNS] -} - -// NewDNSLister returns a new DNSLister. -func NewDNSLister(indexer cache.Indexer) DNSLister { - return &dNSLister{listers.New[*configv1.DNS](indexer, configv1.Resource("dns"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/expansion_generated.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/expansion_generated.go deleted file mode 100644 index f41c1f2fb..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/expansion_generated.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -// APIServerListerExpansion allows custom methods to be added to -// APIServerLister. -type APIServerListerExpansion interface{} - -// AuthenticationListerExpansion allows custom methods to be added to -// AuthenticationLister. -type AuthenticationListerExpansion interface{} - -// BuildListerExpansion allows custom methods to be added to -// BuildLister. -type BuildListerExpansion interface{} - -// CRIOCredentialProviderConfigListerExpansion allows custom methods to be added to -// CRIOCredentialProviderConfigLister. -type CRIOCredentialProviderConfigListerExpansion interface{} - -// ClusterImagePolicyListerExpansion allows custom methods to be added to -// ClusterImagePolicyLister. -type ClusterImagePolicyListerExpansion interface{} - -// ClusterOperatorListerExpansion allows custom methods to be added to -// ClusterOperatorLister. -type ClusterOperatorListerExpansion interface{} - -// ClusterVersionListerExpansion allows custom methods to be added to -// ClusterVersionLister. -type ClusterVersionListerExpansion interface{} - -// ConsoleListerExpansion allows custom methods to be added to -// ConsoleLister. -type ConsoleListerExpansion interface{} - -// DNSListerExpansion allows custom methods to be added to -// DNSLister. -type DNSListerExpansion interface{} - -// FeatureGateListerExpansion allows custom methods to be added to -// FeatureGateLister. -type FeatureGateListerExpansion interface{} - -// ImageListerExpansion allows custom methods to be added to -// ImageLister. -type ImageListerExpansion interface{} - -// ImageContentPolicyListerExpansion allows custom methods to be added to -// ImageContentPolicyLister. -type ImageContentPolicyListerExpansion interface{} - -// ImageDigestMirrorSetListerExpansion allows custom methods to be added to -// ImageDigestMirrorSetLister. -type ImageDigestMirrorSetListerExpansion interface{} - -// ImagePolicyListerExpansion allows custom methods to be added to -// ImagePolicyLister. -type ImagePolicyListerExpansion interface{} - -// ImagePolicyNamespaceListerExpansion allows custom methods to be added to -// ImagePolicyNamespaceLister. -type ImagePolicyNamespaceListerExpansion interface{} - -// ImageTagMirrorSetListerExpansion allows custom methods to be added to -// ImageTagMirrorSetLister. -type ImageTagMirrorSetListerExpansion interface{} - -// InfrastructureListerExpansion allows custom methods to be added to -// InfrastructureLister. -type InfrastructureListerExpansion interface{} - -// IngressListerExpansion allows custom methods to be added to -// IngressLister. -type IngressListerExpansion interface{} - -// InsightsDataGatherListerExpansion allows custom methods to be added to -// InsightsDataGatherLister. -type InsightsDataGatherListerExpansion interface{} - -// NetworkListerExpansion allows custom methods to be added to -// NetworkLister. -type NetworkListerExpansion interface{} - -// NodeListerExpansion allows custom methods to be added to -// NodeLister. -type NodeListerExpansion interface{} - -// OAuthListerExpansion allows custom methods to be added to -// OAuthLister. -type OAuthListerExpansion interface{} - -// OperatorHubListerExpansion allows custom methods to be added to -// OperatorHubLister. -type OperatorHubListerExpansion interface{} - -// ProjectListerExpansion allows custom methods to be added to -// ProjectLister. -type ProjectListerExpansion interface{} - -// ProxyListerExpansion allows custom methods to be added to -// ProxyLister. -type ProxyListerExpansion interface{} - -// SchedulerListerExpansion allows custom methods to be added to -// SchedulerLister. -type SchedulerListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/featuregate.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/featuregate.go deleted file mode 100644 index 7cedf7948..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/featuregate.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// FeatureGateLister helps list FeatureGates. -// All objects returned here must be treated as read-only. -type FeatureGateLister interface { - // List lists all FeatureGates in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.FeatureGate, err error) - // Get retrieves the FeatureGate from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.FeatureGate, error) - FeatureGateListerExpansion -} - -// featureGateLister implements the FeatureGateLister interface. -type featureGateLister struct { - listers.ResourceIndexer[*configv1.FeatureGate] -} - -// NewFeatureGateLister returns a new FeatureGateLister. -func NewFeatureGateLister(indexer cache.Indexer) FeatureGateLister { - return &featureGateLister{listers.New[*configv1.FeatureGate](indexer, configv1.Resource("featuregate"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/image.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/image.go deleted file mode 100644 index 407415393..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/image.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ImageLister helps list Images. -// All objects returned here must be treated as read-only. -type ImageLister interface { - // List lists all Images in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Image, err error) - // Get retrieves the Image from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Image, error) - ImageListerExpansion -} - -// imageLister implements the ImageLister interface. -type imageLister struct { - listers.ResourceIndexer[*configv1.Image] -} - -// NewImageLister returns a new ImageLister. -func NewImageLister(indexer cache.Indexer) ImageLister { - return &imageLister{listers.New[*configv1.Image](indexer, configv1.Resource("image"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagecontentpolicy.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/imagecontentpolicy.go deleted file mode 100644 index 75607f918..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagecontentpolicy.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ImageContentPolicyLister helps list ImageContentPolicies. -// All objects returned here must be treated as read-only. -type ImageContentPolicyLister interface { - // List lists all ImageContentPolicies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ImageContentPolicy, err error) - // Get retrieves the ImageContentPolicy from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ImageContentPolicy, error) - ImageContentPolicyListerExpansion -} - -// imageContentPolicyLister implements the ImageContentPolicyLister interface. -type imageContentPolicyLister struct { - listers.ResourceIndexer[*configv1.ImageContentPolicy] -} - -// NewImageContentPolicyLister returns a new ImageContentPolicyLister. -func NewImageContentPolicyLister(indexer cache.Indexer) ImageContentPolicyLister { - return &imageContentPolicyLister{listers.New[*configv1.ImageContentPolicy](indexer, configv1.Resource("imagecontentpolicy"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagedigestmirrorset.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/imagedigestmirrorset.go deleted file mode 100644 index 027ded8bb..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagedigestmirrorset.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ImageDigestMirrorSetLister helps list ImageDigestMirrorSets. -// All objects returned here must be treated as read-only. -type ImageDigestMirrorSetLister interface { - // List lists all ImageDigestMirrorSets in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ImageDigestMirrorSet, err error) - // Get retrieves the ImageDigestMirrorSet from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ImageDigestMirrorSet, error) - ImageDigestMirrorSetListerExpansion -} - -// imageDigestMirrorSetLister implements the ImageDigestMirrorSetLister interface. -type imageDigestMirrorSetLister struct { - listers.ResourceIndexer[*configv1.ImageDigestMirrorSet] -} - -// NewImageDigestMirrorSetLister returns a new ImageDigestMirrorSetLister. -func NewImageDigestMirrorSetLister(indexer cache.Indexer) ImageDigestMirrorSetLister { - return &imageDigestMirrorSetLister{listers.New[*configv1.ImageDigestMirrorSet](indexer, configv1.Resource("imagedigestmirrorset"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagepolicy.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/imagepolicy.go deleted file mode 100644 index 38f4e20ef..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagepolicy.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ImagePolicyLister helps list ImagePolicies. -// All objects returned here must be treated as read-only. -type ImagePolicyLister interface { - // List lists all ImagePolicies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ImagePolicy, err error) - // ImagePolicies returns an object that can list and get ImagePolicies. - ImagePolicies(namespace string) ImagePolicyNamespaceLister - ImagePolicyListerExpansion -} - -// imagePolicyLister implements the ImagePolicyLister interface. -type imagePolicyLister struct { - listers.ResourceIndexer[*configv1.ImagePolicy] -} - -// NewImagePolicyLister returns a new ImagePolicyLister. -func NewImagePolicyLister(indexer cache.Indexer) ImagePolicyLister { - return &imagePolicyLister{listers.New[*configv1.ImagePolicy](indexer, configv1.Resource("imagepolicy"))} -} - -// ImagePolicies returns an object that can list and get ImagePolicies. -func (s *imagePolicyLister) ImagePolicies(namespace string) ImagePolicyNamespaceLister { - return imagePolicyNamespaceLister{listers.NewNamespaced[*configv1.ImagePolicy](s.ResourceIndexer, namespace)} -} - -// ImagePolicyNamespaceLister helps list and get ImagePolicies. -// All objects returned here must be treated as read-only. -type ImagePolicyNamespaceLister interface { - // List lists all ImagePolicies in the indexer for a given namespace. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ImagePolicy, err error) - // Get retrieves the ImagePolicy from the indexer for a given namespace and name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ImagePolicy, error) - ImagePolicyNamespaceListerExpansion -} - -// imagePolicyNamespaceLister implements the ImagePolicyNamespaceLister -// interface. -type imagePolicyNamespaceLister struct { - listers.ResourceIndexer[*configv1.ImagePolicy] -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagetagmirrorset.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/imagetagmirrorset.go deleted file mode 100644 index d390bc14e..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/imagetagmirrorset.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ImageTagMirrorSetLister helps list ImageTagMirrorSets. -// All objects returned here must be treated as read-only. -type ImageTagMirrorSetLister interface { - // List lists all ImageTagMirrorSets in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.ImageTagMirrorSet, err error) - // Get retrieves the ImageTagMirrorSet from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.ImageTagMirrorSet, error) - ImageTagMirrorSetListerExpansion -} - -// imageTagMirrorSetLister implements the ImageTagMirrorSetLister interface. -type imageTagMirrorSetLister struct { - listers.ResourceIndexer[*configv1.ImageTagMirrorSet] -} - -// NewImageTagMirrorSetLister returns a new ImageTagMirrorSetLister. -func NewImageTagMirrorSetLister(indexer cache.Indexer) ImageTagMirrorSetLister { - return &imageTagMirrorSetLister{listers.New[*configv1.ImageTagMirrorSet](indexer, configv1.Resource("imagetagmirrorset"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/infrastructure.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/infrastructure.go deleted file mode 100644 index 48d592a29..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/infrastructure.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// InfrastructureLister helps list Infrastructures. -// All objects returned here must be treated as read-only. -type InfrastructureLister interface { - // List lists all Infrastructures in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Infrastructure, err error) - // Get retrieves the Infrastructure from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Infrastructure, error) - InfrastructureListerExpansion -} - -// infrastructureLister implements the InfrastructureLister interface. -type infrastructureLister struct { - listers.ResourceIndexer[*configv1.Infrastructure] -} - -// NewInfrastructureLister returns a new InfrastructureLister. -func NewInfrastructureLister(indexer cache.Indexer) InfrastructureLister { - return &infrastructureLister{listers.New[*configv1.Infrastructure](indexer, configv1.Resource("infrastructure"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/ingress.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/ingress.go deleted file mode 100644 index 81538435f..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/ingress.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// IngressLister helps list Ingresses. -// All objects returned here must be treated as read-only. -type IngressLister interface { - // List lists all Ingresses in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Ingress, err error) - // Get retrieves the Ingress from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Ingress, error) - IngressListerExpansion -} - -// ingressLister implements the IngressLister interface. -type ingressLister struct { - listers.ResourceIndexer[*configv1.Ingress] -} - -// NewIngressLister returns a new IngressLister. -func NewIngressLister(indexer cache.Indexer) IngressLister { - return &ingressLister{listers.New[*configv1.Ingress](indexer, configv1.Resource("ingress"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/insightsdatagather.go deleted file mode 100644 index 79da7823f..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/insightsdatagather.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherLister helps list InsightsDataGathers. -// All objects returned here must be treated as read-only. -type InsightsDataGatherLister interface { - // List lists all InsightsDataGathers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.InsightsDataGather, err error) - // Get retrieves the InsightsDataGather from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.InsightsDataGather, error) - InsightsDataGatherListerExpansion -} - -// insightsDataGatherLister implements the InsightsDataGatherLister interface. -type insightsDataGatherLister struct { - listers.ResourceIndexer[*configv1.InsightsDataGather] -} - -// NewInsightsDataGatherLister returns a new InsightsDataGatherLister. -func NewInsightsDataGatherLister(indexer cache.Indexer) InsightsDataGatherLister { - return &insightsDataGatherLister{listers.New[*configv1.InsightsDataGather](indexer, configv1.Resource("insightsdatagather"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/network.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/network.go deleted file mode 100644 index 3376a46b1..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/network.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// NetworkLister helps list Networks. -// All objects returned here must be treated as read-only. -type NetworkLister interface { - // List lists all Networks in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Network, err error) - // Get retrieves the Network from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Network, error) - NetworkListerExpansion -} - -// networkLister implements the NetworkLister interface. -type networkLister struct { - listers.ResourceIndexer[*configv1.Network] -} - -// NewNetworkLister returns a new NetworkLister. -func NewNetworkLister(indexer cache.Indexer) NetworkLister { - return &networkLister{listers.New[*configv1.Network](indexer, configv1.Resource("network"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/node.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/node.go deleted file mode 100644 index 2520016a5..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/node.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// NodeLister helps list Nodes. -// All objects returned here must be treated as read-only. -type NodeLister interface { - // List lists all Nodes in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Node, err error) - // Get retrieves the Node from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Node, error) - NodeListerExpansion -} - -// nodeLister implements the NodeLister interface. -type nodeLister struct { - listers.ResourceIndexer[*configv1.Node] -} - -// NewNodeLister returns a new NodeLister. -func NewNodeLister(indexer cache.Indexer) NodeLister { - return &nodeLister{listers.New[*configv1.Node](indexer, configv1.Resource("node"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/oauth.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/oauth.go deleted file mode 100644 index 5cffcd7bf..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/oauth.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// OAuthLister helps list OAuths. -// All objects returned here must be treated as read-only. -type OAuthLister interface { - // List lists all OAuths in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.OAuth, err error) - // Get retrieves the OAuth from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.OAuth, error) - OAuthListerExpansion -} - -// oAuthLister implements the OAuthLister interface. -type oAuthLister struct { - listers.ResourceIndexer[*configv1.OAuth] -} - -// NewOAuthLister returns a new OAuthLister. -func NewOAuthLister(indexer cache.Indexer) OAuthLister { - return &oAuthLister{listers.New[*configv1.OAuth](indexer, configv1.Resource("oauth"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/operatorhub.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/operatorhub.go deleted file mode 100644 index a28f63f79..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/operatorhub.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// OperatorHubLister helps list OperatorHubs. -// All objects returned here must be treated as read-only. -type OperatorHubLister interface { - // List lists all OperatorHubs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.OperatorHub, err error) - // Get retrieves the OperatorHub from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.OperatorHub, error) - OperatorHubListerExpansion -} - -// operatorHubLister implements the OperatorHubLister interface. -type operatorHubLister struct { - listers.ResourceIndexer[*configv1.OperatorHub] -} - -// NewOperatorHubLister returns a new OperatorHubLister. -func NewOperatorHubLister(indexer cache.Indexer) OperatorHubLister { - return &operatorHubLister{listers.New[*configv1.OperatorHub](indexer, configv1.Resource("operatorhub"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/project.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/project.go deleted file mode 100644 index fbc57217f..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/project.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ProjectLister helps list Projects. -// All objects returned here must be treated as read-only. -type ProjectLister interface { - // List lists all Projects in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Project, err error) - // Get retrieves the Project from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Project, error) - ProjectListerExpansion -} - -// projectLister implements the ProjectLister interface. -type projectLister struct { - listers.ResourceIndexer[*configv1.Project] -} - -// NewProjectLister returns a new ProjectLister. -func NewProjectLister(indexer cache.Indexer) ProjectLister { - return &projectLister{listers.New[*configv1.Project](indexer, configv1.Resource("project"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/proxy.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/proxy.go deleted file mode 100644 index 8edbd0fab..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/proxy.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ProxyLister helps list Proxies. -// All objects returned here must be treated as read-only. -type ProxyLister interface { - // List lists all Proxies in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Proxy, err error) - // Get retrieves the Proxy from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Proxy, error) - ProxyListerExpansion -} - -// proxyLister implements the ProxyLister interface. -type proxyLister struct { - listers.ResourceIndexer[*configv1.Proxy] -} - -// NewProxyLister returns a new ProxyLister. -func NewProxyLister(indexer cache.Indexer) ProxyLister { - return &proxyLister{listers.New[*configv1.Proxy](indexer, configv1.Resource("proxy"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1/scheduler.go b/vendor/github.com/openshift/client-go/config/listers/config/v1/scheduler.go deleted file mode 100644 index a90829c8d..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1/scheduler.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// SchedulerLister helps list Schedulers. -// All objects returned here must be treated as read-only. -type SchedulerLister interface { - // List lists all Schedulers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1.Scheduler, err error) - // Get retrieves the Scheduler from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1.Scheduler, error) - SchedulerListerExpansion -} - -// schedulerLister implements the SchedulerLister interface. -type schedulerLister struct { - listers.ResourceIndexer[*configv1.Scheduler] -} - -// NewSchedulerLister returns a new SchedulerLister. -func NewSchedulerLister(indexer cache.Indexer) SchedulerLister { - return &schedulerLister{listers.New[*configv1.Scheduler](indexer, configv1.Resource("scheduler"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/backup.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/backup.go deleted file mode 100644 index 6b992e0d0..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/backup.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// BackupLister helps list Backups. -// All objects returned here must be treated as read-only. -type BackupLister interface { - // List lists all Backups in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha1.Backup, err error) - // Get retrieves the Backup from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha1.Backup, error) - BackupListerExpansion -} - -// backupLister implements the BackupLister interface. -type backupLister struct { - listers.ResourceIndexer[*configv1alpha1.Backup] -} - -// NewBackupLister returns a new BackupLister. -func NewBackupLister(indexer cache.Indexer) BackupLister { - return &backupLister{listers.New[*configv1alpha1.Backup](indexer, configv1alpha1.Resource("backup"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/clustermonitoring.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/clustermonitoring.go deleted file mode 100644 index 50beb3f98..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/clustermonitoring.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// ClusterMonitoringLister helps list ClusterMonitorings. -// All objects returned here must be treated as read-only. -type ClusterMonitoringLister interface { - // List lists all ClusterMonitorings in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha1.ClusterMonitoring, err error) - // Get retrieves the ClusterMonitoring from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha1.ClusterMonitoring, error) - ClusterMonitoringListerExpansion -} - -// clusterMonitoringLister implements the ClusterMonitoringLister interface. -type clusterMonitoringLister struct { - listers.ResourceIndexer[*configv1alpha1.ClusterMonitoring] -} - -// NewClusterMonitoringLister returns a new ClusterMonitoringLister. -func NewClusterMonitoringLister(indexer cache.Indexer) ClusterMonitoringLister { - return &clusterMonitoringLister{listers.New[*configv1alpha1.ClusterMonitoring](indexer, configv1alpha1.Resource("clustermonitoring"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/criocredentialproviderconfig.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/criocredentialproviderconfig.go deleted file mode 100644 index cc5dfa388..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/criocredentialproviderconfig.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// CRIOCredentialProviderConfigLister helps list CRIOCredentialProviderConfigs. -// All objects returned here must be treated as read-only. -type CRIOCredentialProviderConfigLister interface { - // List lists all CRIOCredentialProviderConfigs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha1.CRIOCredentialProviderConfig, err error) - // Get retrieves the CRIOCredentialProviderConfig from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha1.CRIOCredentialProviderConfig, error) - CRIOCredentialProviderConfigListerExpansion -} - -// cRIOCredentialProviderConfigLister implements the CRIOCredentialProviderConfigLister interface. -type cRIOCredentialProviderConfigLister struct { - listers.ResourceIndexer[*configv1alpha1.CRIOCredentialProviderConfig] -} - -// NewCRIOCredentialProviderConfigLister returns a new CRIOCredentialProviderConfigLister. -func NewCRIOCredentialProviderConfigLister(indexer cache.Indexer) CRIOCredentialProviderConfigLister { - return &cRIOCredentialProviderConfigLister{listers.New[*configv1alpha1.CRIOCredentialProviderConfig](indexer, configv1alpha1.Resource("criocredentialproviderconfig"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go deleted file mode 100644 index 3baf74bc8..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/expansion_generated.go +++ /dev/null @@ -1,23 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -// BackupListerExpansion allows custom methods to be added to -// BackupLister. -type BackupListerExpansion interface{} - -// CRIOCredentialProviderConfigListerExpansion allows custom methods to be added to -// CRIOCredentialProviderConfigLister. -type CRIOCredentialProviderConfigListerExpansion interface{} - -// ClusterMonitoringListerExpansion allows custom methods to be added to -// ClusterMonitoringLister. -type ClusterMonitoringListerExpansion interface{} - -// InsightsDataGatherListerExpansion allows custom methods to be added to -// InsightsDataGatherLister. -type InsightsDataGatherListerExpansion interface{} - -// PKIListerExpansion allows custom methods to be added to -// PKILister. -type PKIListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/insightsdatagather.go deleted file mode 100644 index 9328022a4..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/insightsdatagather.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherLister helps list InsightsDataGathers. -// All objects returned here must be treated as read-only. -type InsightsDataGatherLister interface { - // List lists all InsightsDataGathers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha1.InsightsDataGather, err error) - // Get retrieves the InsightsDataGather from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha1.InsightsDataGather, error) - InsightsDataGatherListerExpansion -} - -// insightsDataGatherLister implements the InsightsDataGatherLister interface. -type insightsDataGatherLister struct { - listers.ResourceIndexer[*configv1alpha1.InsightsDataGather] -} - -// NewInsightsDataGatherLister returns a new InsightsDataGatherLister. -func NewInsightsDataGatherLister(indexer cache.Indexer) InsightsDataGatherLister { - return &insightsDataGatherLister{listers.New[*configv1alpha1.InsightsDataGather](indexer, configv1alpha1.Resource("insightsdatagather"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/pki.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/pki.go deleted file mode 100644 index 8e644cfeb..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha1/pki.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// PKILister helps list PKIs. -// All objects returned here must be treated as read-only. -type PKILister interface { - // List lists all PKIs in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha1.PKI, err error) - // Get retrieves the PKI from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha1.PKI, error) - PKIListerExpansion -} - -// pKILister implements the PKILister interface. -type pKILister struct { - listers.ResourceIndexer[*configv1alpha1.PKI] -} - -// NewPKILister returns a new PKILister. -func NewPKILister(indexer cache.Indexer) PKILister { - return &pKILister{listers.New[*configv1alpha1.PKI](indexer, configv1alpha1.Resource("pki"))} -} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/expansion_generated.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/expansion_generated.go deleted file mode 100644 index edd6ab8c5..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/expansion_generated.go +++ /dev/null @@ -1,7 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha2 - -// InsightsDataGatherListerExpansion allows custom methods to be added to -// InsightsDataGatherLister. -type InsightsDataGatherListerExpansion interface{} diff --git a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/insightsdatagather.go b/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/insightsdatagather.go deleted file mode 100644 index 13f0c3e4d..000000000 --- a/vendor/github.com/openshift/client-go/config/listers/config/v1alpha2/insightsdatagather.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by lister-gen. DO NOT EDIT. - -package v1alpha2 - -import ( - configv1alpha2 "github.com/openshift/api/config/v1alpha2" - labels "k8s.io/apimachinery/pkg/labels" - listers "k8s.io/client-go/listers" - cache "k8s.io/client-go/tools/cache" -) - -// InsightsDataGatherLister helps list InsightsDataGathers. -// All objects returned here must be treated as read-only. -type InsightsDataGatherLister interface { - // List lists all InsightsDataGathers in the indexer. - // Objects returned here must be treated as read-only. - List(selector labels.Selector) (ret []*configv1alpha2.InsightsDataGather, err error) - // Get retrieves the InsightsDataGather from the index for a given name. - // Objects returned here must be treated as read-only. - Get(name string) (*configv1alpha2.InsightsDataGather, error) - InsightsDataGatherListerExpansion -} - -// insightsDataGatherLister implements the InsightsDataGatherLister interface. -type insightsDataGatherLister struct { - listers.ResourceIndexer[*configv1alpha2.InsightsDataGather] -} - -// NewInsightsDataGatherLister returns a new InsightsDataGatherLister. -func NewInsightsDataGatherLister(indexer cache.Indexer) InsightsDataGatherLister { - return &insightsDataGatherLister{listers.New[*configv1alpha2.InsightsDataGather](indexer, configv1alpha2.Resource("insightsdatagather"))} -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go deleted file mode 100644 index 7e41cc30b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/internal/internal.go +++ /dev/null @@ -1,4885 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package internal - -import ( - fmt "fmt" - sync "sync" - - typed "sigs.k8s.io/structured-merge-diff/v6/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: com.github.openshift.api.config.v1.ConfigMapFileReference - map: - fields: - - name: key - type: - scalar: string - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.ConfigMapNameReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.CustomTLSProfile - map: - fields: - - name: ciphers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: minTLSVersion - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.IntermediateTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.ModernTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.OldTLSProfile - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: com.github.openshift.api.config.v1.SecretNameReference - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TLSProfileSpec - map: - fields: - - name: ciphers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: minTLSVersion - type: - scalar: string - default: "" -- name: com.github.openshift.api.config.v1.TLSSecurityProfile - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.config.v1.CustomTLSProfile - - name: intermediate - type: - namedType: com.github.openshift.api.config.v1.IntermediateTLSProfile - - name: modern - type: - namedType: com.github.openshift.api.config.v1.ModernTLSProfile - - name: old - type: - namedType: com.github.openshift.api.config.v1.OldTLSProfile - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: custom - discriminatorValue: Custom - - fieldName: intermediate - discriminatorValue: Intermediate - - fieldName: modern - discriminatorValue: Modern - - fieldName: old - discriminatorValue: Old -- name: com.github.openshift.api.operator.v1.AWSCSIDriverConfigSpec - map: - fields: - - name: efsVolumeMetrics - type: - namedType: com.github.openshift.api.operator.v1.AWSEFSVolumeMetrics - - name: kmsKeyARN - type: - scalar: string -- name: com.github.openshift.api.operator.v1.AWSClassicLoadBalancerParameters - map: - fields: - - name: connectionIdleTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: subnets - type: - namedType: com.github.openshift.api.operator.v1.AWSSubnets -- name: com.github.openshift.api.operator.v1.AWSEFSVolumeMetrics - map: - fields: - - name: recursiveWalk - type: - namedType: com.github.openshift.api.operator.v1.AWSEFSVolumeMetricsRecursiveWalkConfig - - name: state - type: - scalar: string - default: "" - unions: - - discriminator: state - fields: - - fieldName: recursiveWalk - discriminatorValue: RecursiveWalk -- name: com.github.openshift.api.operator.v1.AWSEFSVolumeMetricsRecursiveWalkConfig - map: - fields: - - name: fsRateLimit - type: - scalar: numeric - - name: refreshPeriodMinutes - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.AWSLoadBalancerParameters - map: - fields: - - name: classicLoadBalancer - type: - namedType: com.github.openshift.api.operator.v1.AWSClassicLoadBalancerParameters - - name: networkLoadBalancer - type: - namedType: com.github.openshift.api.operator.v1.AWSNetworkLoadBalancerParameters - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: classicLoadBalancer - discriminatorValue: ClassicLoadBalancerParameters - - fieldName: networkLoadBalancer - discriminatorValue: NetworkLoadBalancerParameters -- name: com.github.openshift.api.operator.v1.AWSNetworkLoadBalancerParameters - map: - fields: - - name: eipAllocations - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: protocol - type: - scalar: string - - name: subnets - type: - namedType: com.github.openshift.api.operator.v1.AWSSubnets -- name: com.github.openshift.api.operator.v1.AWSSubnets - map: - fields: - - name: ids - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: names - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.AccessLogging - map: - fields: - - name: destination - type: - namedType: com.github.openshift.api.operator.v1.LoggingDestination - default: {} - - name: httpCaptureCookies - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPCookie - elementRelationship: atomic - - name: httpCaptureHeaders - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeaders - default: {} - - name: httpLogFormat - type: - scalar: string - - name: logEmptyRequests - type: - scalar: string -- name: com.github.openshift.api.operator.v1.AddPage - map: - fields: - - name: disabledActions - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.AdditionalNetworkDefinition - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - - name: rawCNIConfig - type: - scalar: string - - name: simpleMacvlanConfig - type: - namedType: com.github.openshift.api.operator.v1.SimpleMacvlanConfig - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.AdditionalRoutingCapabilities - map: - fields: - - name: providers - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.Authentication - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.AuthenticationSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.AuthenticationStatus - default: {} -- name: com.github.openshift.api.operator.v1.AuthenticationConfigMapReference - map: - fields: - - name: name - type: - scalar: string -- name: com.github.openshift.api.operator.v1.AuthenticationProxyConfig - map: - fields: - - name: httpProxy - type: - scalar: string - - name: httpsProxy - type: - scalar: string - - name: noProxy - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: trustedCA - type: - namedType: com.github.openshift.api.operator.v1.AuthenticationConfigMapReference - default: {} -- name: com.github.openshift.api.operator.v1.AuthenticationSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: proxy - type: - namedType: com.github.openshift.api.operator.v1.AuthenticationProxyConfig - default: {} - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.AuthenticationStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: oauthAPIServer - type: - namedType: com.github.openshift.api.operator.v1.OAuthAPIServerStatus - default: {} - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.AzureCSIDriverConfigSpec - map: - fields: - - name: diskEncryptionSet - type: - namedType: com.github.openshift.api.operator.v1.AzureDiskEncryptionSet -- name: com.github.openshift.api.operator.v1.AzureDiskEncryptionSet - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: resourceGroup - type: - scalar: string - default: "" - - name: subscriptionID - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.BGPManagedConfig - map: - fields: - - name: asNumber - type: - scalar: numeric - default: 64512 - - name: bgpTopology - type: - scalar: string -- name: com.github.openshift.api.operator.v1.BootImageSkewEnforcementConfig - map: - fields: - - name: manual - type: - namedType: com.github.openshift.api.operator.v1.ClusterBootImageManual - default: {} - - name: mode - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: manual - discriminatorValue: Manual -- name: com.github.openshift.api.operator.v1.BootImageSkewEnforcementStatus - map: - fields: - - name: automatic - type: - namedType: com.github.openshift.api.operator.v1.ClusterBootImageAutomatic - default: {} - - name: manual - type: - namedType: com.github.openshift.api.operator.v1.ClusterBootImageManual - default: {} - - name: mode - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: automatic - discriminatorValue: Automatic - - fieldName: manual - discriminatorValue: Manual -- name: com.github.openshift.api.operator.v1.CSIDriverConfigSpec - map: - fields: - - name: aws - type: - namedType: com.github.openshift.api.operator.v1.AWSCSIDriverConfigSpec - - name: azure - type: - namedType: com.github.openshift.api.operator.v1.AzureCSIDriverConfigSpec - - name: driverType - type: - scalar: string - default: "" - - name: gcp - type: - namedType: com.github.openshift.api.operator.v1.GCPCSIDriverConfigSpec - - name: ibmcloud - type: - namedType: com.github.openshift.api.operator.v1.IBMCloudCSIDriverConfigSpec - - name: secretsStore - type: - namedType: com.github.openshift.api.operator.v1.SecretsStoreCSIDriverConfigSpec - default: {} - - name: vSphere - type: - namedType: com.github.openshift.api.operator.v1.VSphereCSIDriverConfigSpec - unions: - - discriminator: driverType - fields: - - fieldName: aws - discriminatorValue: AWS - - fieldName: azure - discriminatorValue: Azure - - fieldName: gcp - discriminatorValue: GCP - - fieldName: ibmcloud - discriminatorValue: IBMCloud - - fieldName: secretsStore - discriminatorValue: SecretsStore - - fieldName: vSphere - discriminatorValue: VSphere -- name: com.github.openshift.api.operator.v1.CSISnapshotController - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.CSISnapshotControllerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.CSISnapshotControllerStatus - default: {} -- name: com.github.openshift.api.operator.v1.CSISnapshotControllerSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.CSISnapshotControllerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.Capability - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: visibility - type: - namedType: com.github.openshift.api.operator.v1.CapabilityVisibility - default: {} -- name: com.github.openshift.api.operator.v1.CapabilityVisibility - map: - fields: - - name: state - type: - scalar: string - default: "" - unions: - - discriminator: state -- name: com.github.openshift.api.operator.v1.ClientTLS - map: - fields: - - name: allowedSubjectPatterns - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientCA - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: clientCertificatePolicy - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.CloudCredential - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.CloudCredentialSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.CloudCredentialStatus - default: {} -- name: com.github.openshift.api.operator.v1.CloudCredentialSpec - map: - fields: - - name: credentialsMode - type: - scalar: string - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.CloudCredentialStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ClusterBootImageAutomatic - map: - fields: - - name: ocpVersion - type: - scalar: string - - name: rhcosVersion - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ClusterBootImageManual - map: - fields: - - name: mode - type: - scalar: string - - name: ocpVersion - type: - scalar: string - - name: rhcosVersion - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: ocpVersion - discriminatorValue: OCPVersion - - fieldName: rhcosVersion - discriminatorValue: RHCOSVersion -- name: com.github.openshift.api.operator.v1.ClusterCSIDriver - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ClusterCSIDriverSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ClusterCSIDriverStatus - default: {} -- name: com.github.openshift.api.operator.v1.ClusterCSIDriverSpec - map: - fields: - - name: driverConfig - type: - namedType: com.github.openshift.api.operator.v1.CSIDriverConfigSpec - default: {} - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: storageClassState - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ClusterCSIDriverStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ClusterNetworkEntry - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: hostPrefix - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.Config - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ConfigSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ConfigStatus - default: {} -- name: com.github.openshift.api.operator.v1.ConfigMapFileReference - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.ConfigSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ConfigStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.Console - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ConsoleSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ConsoleStatus - default: {} -- name: com.github.openshift.api.operator.v1.ConsoleConfigRoute - map: - fields: - - name: hostname - type: - scalar: string - default: "" - - name: secret - type: - namedType: com.github.openshift.api.config.v1.SecretNameReference - default: {} -- name: com.github.openshift.api.operator.v1.ConsoleCustomization - map: - fields: - - name: addPage - type: - namedType: com.github.openshift.api.operator.v1.AddPage - default: {} - - name: brand - type: - scalar: string - - name: capabilities - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Capability - elementRelationship: associative - keys: - - name - - name: customLogoFile - type: - namedType: com.github.openshift.api.config.v1.ConfigMapFileReference - default: {} - - name: customProductName - type: - scalar: string - - name: developerCatalog - type: - namedType: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCustomization - default: {} - - name: documentationBaseURL - type: - scalar: string - - name: logos - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Logo - elementRelationship: associative - keys: - - type - - name: perspectives - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Perspective - elementRelationship: associative - keys: - - id - - name: projectAccess - type: - namedType: com.github.openshift.api.operator.v1.ProjectAccess - default: {} - - name: quickStarts - type: - namedType: com.github.openshift.api.operator.v1.QuickStarts - default: {} -- name: com.github.openshift.api.operator.v1.ConsoleProviders - map: - fields: - - name: statuspage - type: - namedType: com.github.openshift.api.operator.v1.StatuspageProvider -- name: com.github.openshift.api.operator.v1.ConsoleSpec - map: - fields: - - name: customization - type: - namedType: com.github.openshift.api.operator.v1.ConsoleCustomization - default: {} - - name: ingress - type: - namedType: com.github.openshift.api.operator.v1.Ingress - default: {} - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: plugins - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: providers - type: - namedType: com.github.openshift.api.operator.v1.ConsoleProviders - default: {} - - name: route - type: - namedType: com.github.openshift.api.operator.v1.ConsoleConfigRoute - default: {} - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ConsoleStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ContainerLoggingDestinationParameters - map: - fields: - - name: maxLength - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.CustomSecretRotation - map: - fields: - - name: minimumRefreshAge - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.DNS - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.DNSSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.DNSStatus - default: {} -- name: com.github.openshift.api.operator.v1.DNSCache - map: - fields: - - name: negativeTTL - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: positiveTTL - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration -- name: com.github.openshift.api.operator.v1.DNSNodePlacement - map: - fields: - - name: nodeSelector - type: - map: - elementType: - scalar: string - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.DNSOverTLSConfig - map: - fields: - - name: caBundle - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: serverName - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.DNSSpec - map: - fields: - - name: cache - type: - namedType: com.github.openshift.api.operator.v1.DNSCache - default: {} - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - - name: nodePlacement - type: - namedType: com.github.openshift.api.operator.v1.DNSNodePlacement - default: {} - - name: operatorLogLevel - type: - scalar: string - - name: servers - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Server - elementRelationship: atomic - - name: upstreamResolvers - type: - namedType: com.github.openshift.api.operator.v1.UpstreamResolvers - default: {} -- name: com.github.openshift.api.operator.v1.DNSStatus - map: - fields: - - name: clusterDomain - type: - scalar: string - default: "" - - name: clusterIP - type: - scalar: string - default: "" - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.operator.v1.DNSTransportConfig - map: - fields: - - name: tls - type: - namedType: com.github.openshift.api.operator.v1.DNSOverTLSConfig - - name: transport - type: - scalar: string - unions: - - discriminator: transport - fields: - - fieldName: tls - discriminatorValue: TLS -- name: com.github.openshift.api.operator.v1.DefaultNetworkDefinition - map: - fields: - - name: openshiftSDNConfig - type: - namedType: com.github.openshift.api.operator.v1.OpenShiftSDNConfig - - name: ovnKubernetesConfig - type: - namedType: com.github.openshift.api.operator.v1.OVNKubernetesConfig - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategory - map: - fields: - - name: id - type: - scalar: string - default: "" - - name: label - type: - scalar: string - default: "" - - name: subcategories - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategoryMeta - elementRelationship: atomic - - name: tags - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategoryMeta - map: - fields: - - name: id - type: - scalar: string - default: "" - - name: label - type: - scalar: string - default: "" - - name: tags - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCustomization - map: - fields: - - name: categories - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogCategory - elementRelationship: atomic - - name: types - type: - namedType: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogTypes - default: {} -- name: com.github.openshift.api.operator.v1.DeveloperConsoleCatalogTypes - map: - fields: - - name: disabled - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: enabled - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: state - type: - scalar: string - default: Enabled - unions: - - discriminator: state - fields: - - fieldName: disabled - discriminatorValue: Disabled - - fieldName: enabled - discriminatorValue: Enabled -- name: com.github.openshift.api.operator.v1.EgressIPConfig - map: - fields: - - name: reachabilityTotalTimeoutSeconds - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.EndpointPublishingStrategy - map: - fields: - - name: hostNetwork - type: - namedType: com.github.openshift.api.operator.v1.HostNetworkStrategy - - name: loadBalancer - type: - namedType: com.github.openshift.api.operator.v1.LoadBalancerStrategy - - name: nodePort - type: - namedType: com.github.openshift.api.operator.v1.NodePortStrategy - - name: private - type: - namedType: com.github.openshift.api.operator.v1.PrivateStrategy - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: hostNetwork - discriminatorValue: HostNetwork - - fieldName: loadBalancer - discriminatorValue: LoadBalancer - - fieldName: nodePort - discriminatorValue: NodePort - - fieldName: private - discriminatorValue: Private -- name: com.github.openshift.api.operator.v1.Etcd - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.EtcdSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.EtcdStatus - default: {} -- name: com.github.openshift.api.operator.v1.EtcdSpec - map: - fields: - - name: backendQuotaGiB - type: - scalar: numeric - default: 8 - - name: controlPlaneHardwareSpeed - type: - scalar: string - default: "" - - name: failedRevisionLimit - type: - scalar: numeric - - name: forceRedeploymentReason - type: - scalar: string - default: "" - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: succeededRevisionLimit - type: - scalar: numeric - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.EtcdStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: controlPlaneHardwareSpeed - type: - scalar: string - default: "" - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: latestAvailableRevisionReason - type: - scalar: string - - name: nodeStatuses - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeStatus - elementRelationship: associative - keys: - - nodeName - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ExportNetworkFlows - map: - fields: - - name: ipfix - type: - namedType: com.github.openshift.api.operator.v1.IPFIXConfig - - name: netFlow - type: - namedType: com.github.openshift.api.operator.v1.NetFlowConfig - - name: sFlow - type: - namedType: com.github.openshift.api.operator.v1.SFlowConfig -- name: com.github.openshift.api.operator.v1.FeaturesMigration - map: - fields: - - name: egressFirewall - type: - scalar: boolean - - name: egressIP - type: - scalar: boolean - - name: multicast - type: - scalar: boolean -- name: com.github.openshift.api.operator.v1.FileReferenceSource - map: - fields: - - name: configMap - type: - namedType: com.github.openshift.api.operator.v1.ConfigMapFileReference - - name: from - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.ForwardPlugin - map: - fields: - - name: policy - type: - scalar: string - - name: protocolStrategy - type: - scalar: string - default: "" - - name: transportConfig - type: - namedType: com.github.openshift.api.operator.v1.DNSTransportConfig - default: {} - - name: upstreams - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.GCPCSIDriverConfigSpec - map: - fields: - - name: kmsKey - type: - namedType: com.github.openshift.api.operator.v1.GCPKMSKeyReference -- name: com.github.openshift.api.operator.v1.GCPKMSKeyReference - map: - fields: - - name: keyRing - type: - scalar: string - default: "" - - name: location - type: - scalar: string - - name: name - type: - scalar: string - default: "" - - name: projectID - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.GCPLoadBalancerParameters - map: - fields: - - name: clientAccess - type: - scalar: string -- name: com.github.openshift.api.operator.v1.GatewayConfig - map: - fields: - - name: ipForwarding - type: - scalar: string - - name: ipv4 - type: - namedType: com.github.openshift.api.operator.v1.IPv4GatewayConfig - default: {} - - name: ipv6 - type: - namedType: com.github.openshift.api.operator.v1.IPv6GatewayConfig - default: {} - - name: routingViaHost - type: - scalar: boolean -- name: com.github.openshift.api.operator.v1.GatherStatus - map: - fields: - - name: gatherers - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GathererStatus - elementRelationship: atomic - - name: lastGatherDuration - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: lastGatherTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: com.github.openshift.api.operator.v1.GathererStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: atomic - - name: lastGatherDuration - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.GenerationStatus - map: - fields: - - name: group - type: - scalar: string - default: "" - - name: hash - type: - scalar: string - default: "" - - name: lastGeneration - type: - scalar: numeric - default: 0 - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" - - name: resource - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.HTTPCompressionPolicy - map: - fields: - - name: mimeTypes - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.operator.v1.HealthCheck - map: - fields: - - name: advisorURI - type: - scalar: string - default: "" - - name: description - type: - scalar: string - default: "" - - name: state - type: - scalar: string - default: "" - - name: totalRisk - type: - scalar: numeric - default: 0 -- name: com.github.openshift.api.operator.v1.HostNetworkStrategy - map: - fields: - - name: httpPort - type: - scalar: numeric - - name: httpsPort - type: - scalar: numeric - - name: protocol - type: - scalar: string - - name: statsPort - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.HybridOverlayConfig - map: - fields: - - name: hybridClusterNetwork - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.ClusterNetworkEntry - elementRelationship: atomic - - name: hybridOverlayVXLANPort - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.IBMCloudCSIDriverConfigSpec - map: - fields: - - name: encryptionKeyCRN - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IBMLoadBalancerParameters - map: - fields: - - name: protocol - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IPAMConfig - map: - fields: - - name: staticIPAMConfig - type: - namedType: com.github.openshift.api.operator.v1.StaticIPAMConfig - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IPFIXConfig - map: - fields: - - name: collectors - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.IPsecConfig - map: - fields: - - name: full - type: - namedType: com.github.openshift.api.operator.v1.IPsecFullModeConfig - - name: mode - type: - scalar: string - unions: - - discriminator: mode - fields: - - fieldName: full - discriminatorValue: Full -- name: com.github.openshift.api.operator.v1.IPsecFullModeConfig - map: - fields: - - name: encapsulation - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IPv4GatewayConfig - map: - fields: - - name: internalMasqueradeSubnet - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IPv4OVNKubernetesConfig - map: - fields: - - name: internalJoinSubnet - type: - scalar: string - - name: internalTransitSwitchSubnet - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IPv6GatewayConfig - map: - fields: - - name: internalMasqueradeSubnet - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IPv6OVNKubernetesConfig - map: - fields: - - name: internalJoinSubnet - type: - scalar: string - - name: internalTransitSwitchSubnet - type: - scalar: string -- name: com.github.openshift.api.operator.v1.Ingress - map: - fields: - - name: clientDownloadsURL - type: - scalar: string - default: "" - - name: consoleURL - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IngressController - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerStatus - default: {} -- name: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPCookie - map: - fields: - - name: matchType - type: - scalar: string - default: "" - - name: maxLength - type: - scalar: numeric - default: 0 - - name: name - type: - scalar: string - default: "" - - name: namePrefix - type: - scalar: string - default: "" - unions: - - discriminator: matchType - fields: - - fieldName: name - discriminatorValue: Name - - fieldName: namePrefix - discriminatorValue: NamePrefix -- name: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeader - map: - fields: - - name: maxLength - type: - scalar: numeric - default: 0 - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeaders - map: - fields: - - name: request - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeader - elementRelationship: atomic - - name: response - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.IngressControllerCaptureHTTPHeader - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.IngressControllerHTTPHeader - map: - fields: - - name: action - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActionUnion - default: {} - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActionUnion - map: - fields: - - name: set - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerSetHTTPHeader - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: set - discriminatorValue: Set -- name: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActions - map: - fields: - - name: request - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPHeader - elementRelationship: associative - keys: - - name - - name: response - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPHeader - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaders - map: - fields: - - name: actions - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaderActions - default: {} - - name: forwardedHeaderPolicy - type: - scalar: string - - name: headerNameCaseAdjustments - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: uniqueId - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPUniqueIdHeaderPolicy - default: {} -- name: com.github.openshift.api.operator.v1.IngressControllerHTTPUniqueIdHeaderPolicy - map: - fields: - - name: format - type: - scalar: string - - name: name - type: - scalar: string -- name: com.github.openshift.api.operator.v1.IngressControllerLogging - map: - fields: - - name: access - type: - namedType: com.github.openshift.api.operator.v1.AccessLogging -- name: com.github.openshift.api.operator.v1.IngressControllerSetHTTPHeader - map: - fields: - - name: value - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.IngressControllerSpec - map: - fields: - - name: clientTLS - type: - namedType: com.github.openshift.api.operator.v1.ClientTLS - default: {} - - name: closedClientConnectionPolicy - type: - scalar: string - default: Continue - - name: defaultCertificate - type: - namedType: io.k8s.api.core.v1.LocalObjectReference - - name: domain - type: - scalar: string - - name: endpointPublishingStrategy - type: - namedType: com.github.openshift.api.operator.v1.EndpointPublishingStrategy - - name: haproxyVersion - type: - scalar: string - - name: httpCompression - type: - namedType: com.github.openshift.api.operator.v1.HTTPCompressionPolicy - default: {} - - name: httpEmptyRequestsPolicy - type: - scalar: string - - name: httpErrorCodePages - type: - namedType: com.github.openshift.api.config.v1.ConfigMapNameReference - default: {} - - name: httpHeaders - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerHTTPHeaders - - name: idleConnectionTerminationPolicy - type: - scalar: string - default: Immediate - - name: logging - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerLogging - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: nodePlacement - type: - namedType: com.github.openshift.api.operator.v1.NodePlacement - - name: replicas - type: - scalar: numeric - - name: routeAdmission - type: - namedType: com.github.openshift.api.operator.v1.RouteAdmissionPolicy - - name: routeSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: tlsSecurityProfile - type: - namedType: com.github.openshift.api.config.v1.TLSSecurityProfile - - name: tuningOptions - type: - namedType: com.github.openshift.api.operator.v1.IngressControllerTuningOptions - default: {} - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.IngressControllerStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: domain - type: - scalar: string - default: "" - - name: effectiveHAProxyVersion - type: - scalar: string - - name: endpointPublishingStrategy - type: - namedType: com.github.openshift.api.operator.v1.EndpointPublishingStrategy - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: observedGeneration - type: - scalar: numeric - - name: routeSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: selector - type: - scalar: string - default: "" - - name: tlsProfile - type: - namedType: com.github.openshift.api.config.v1.TLSProfileSpec -- name: com.github.openshift.api.operator.v1.IngressControllerTuningOptions - map: - fields: - - name: clientFinTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: clientTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: configurationManagement - type: - scalar: string - - name: connectTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: headerBufferBytes - type: - scalar: numeric - - name: headerBufferMaxRewriteBytes - type: - scalar: numeric - - name: healthCheckInterval - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: httpKeepAliveTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: maxConnections - type: - scalar: numeric - - name: reloadInterval - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: serverFinTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: serverTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: threadCount - type: - scalar: numeric - - name: tlsInspectDelay - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - - name: tunnelTimeout - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Duration -- name: com.github.openshift.api.operator.v1.InsightsOperator - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.InsightsOperatorSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.InsightsOperatorStatus - default: {} -- name: com.github.openshift.api.operator.v1.InsightsOperatorSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.InsightsOperatorStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: gatherStatus - type: - namedType: com.github.openshift.api.operator.v1.GatherStatus - default: {} - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: insightsReport - type: - namedType: com.github.openshift.api.operator.v1.InsightsReport - default: {} - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.InsightsReport - map: - fields: - - name: downloadedAt - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: healthChecks - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.HealthCheck - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.IrreconcilableValidationOverrides - map: - fields: - - name: storage - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.operator.v1.KMSEncryptionStatus - map: - fields: - - name: healthReports - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.KMSPluginHealthReport - elementRelationship: associative - keys: - - nodeName - - keyId -- name: com.github.openshift.api.operator.v1.KMSPluginHealthReport - map: - fields: - - name: detail - type: - scalar: string - - name: kekId - type: - scalar: string - - name: keyId - type: - scalar: string - - name: lastCheckedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: nodeName - type: - scalar: string - - name: status - type: - scalar: string -- name: com.github.openshift.api.operator.v1.KubeAPIServer - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.KubeAPIServerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.KubeAPIServerStatus - default: {} -- name: com.github.openshift.api.operator.v1.KubeAPIServerSpec - map: - fields: - - name: eventTTLMinutes - type: - scalar: numeric - - name: failedRevisionLimit - type: - scalar: numeric - - name: forceRedeploymentReason - type: - scalar: string - default: "" - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: succeededRevisionLimit - type: - scalar: numeric - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.KubeAPIServerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: encryptionStatus - type: - namedType: com.github.openshift.api.operator.v1.KMSEncryptionStatus - default: {} - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: latestAvailableRevisionReason - type: - scalar: string - - name: nodeStatuses - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeStatus - elementRelationship: associative - keys: - - nodeName - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: serviceAccountIssuers - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.ServiceAccountIssuerStatus - elementRelationship: atomic - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.KubeControllerManager - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.KubeControllerManagerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.KubeControllerManagerStatus - default: {} -- name: com.github.openshift.api.operator.v1.KubeControllerManagerSpec - map: - fields: - - name: failedRevisionLimit - type: - scalar: numeric - - name: forceRedeploymentReason - type: - scalar: string - default: "" - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: succeededRevisionLimit - type: - scalar: numeric - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ - - name: useMoreSecureServiceCA - type: - scalar: boolean - default: false -- name: com.github.openshift.api.operator.v1.KubeControllerManagerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: latestAvailableRevisionReason - type: - scalar: string - - name: nodeStatuses - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeStatus - elementRelationship: associative - keys: - - nodeName - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.KubeScheduler - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.KubeSchedulerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.KubeSchedulerStatus - default: {} -- name: com.github.openshift.api.operator.v1.KubeSchedulerSpec - map: - fields: - - name: failedRevisionLimit - type: - scalar: numeric - - name: forceRedeploymentReason - type: - scalar: string - default: "" - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: succeededRevisionLimit - type: - scalar: numeric - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.KubeSchedulerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: latestAvailableRevisionReason - type: - scalar: string - - name: nodeStatuses - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeStatus - elementRelationship: associative - keys: - - nodeName - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.KubeStorageVersionMigrator - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.KubeStorageVersionMigratorSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.KubeStorageVersionMigratorStatus - default: {} -- name: com.github.openshift.api.operator.v1.KubeStorageVersionMigratorSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.KubeStorageVersionMigratorStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.LoadBalancerStrategy - map: - fields: - - name: allowedSourceRanges - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: dnsManagementPolicy - type: - scalar: string - default: Managed - - name: providerParameters - type: - namedType: com.github.openshift.api.operator.v1.ProviderLoadBalancerParameters - - name: scope - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.LoggingDestination - map: - fields: - - name: container - type: - namedType: com.github.openshift.api.operator.v1.ContainerLoggingDestinationParameters - - name: syslog - type: - namedType: com.github.openshift.api.operator.v1.SyslogLoggingDestinationParameters - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: container - discriminatorValue: Container - - fieldName: syslog - discriminatorValue: Syslog -- name: com.github.openshift.api.operator.v1.Logo - map: - fields: - - name: themes - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Theme - elementRelationship: associative - keys: - - mode - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.MTUMigration - map: - fields: - - name: machine - type: - namedType: com.github.openshift.api.operator.v1.MTUMigrationValues - - name: network - type: - namedType: com.github.openshift.api.operator.v1.MTUMigrationValues -- name: com.github.openshift.api.operator.v1.MTUMigrationValues - map: - fields: - - name: from - type: - scalar: numeric - - name: to - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.MachineConfiguration - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.MachineConfigurationSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.MachineConfigurationStatus - default: {} -- name: com.github.openshift.api.operator.v1.MachineConfigurationSpec - map: - fields: - - name: bootImageSkewEnforcement - type: - namedType: com.github.openshift.api.operator.v1.BootImageSkewEnforcementConfig - default: {} - - name: failedRevisionLimit - type: - scalar: numeric - - name: forceRedeploymentReason - type: - scalar: string - default: "" - - name: irreconcilableValidationOverrides - type: - namedType: com.github.openshift.api.operator.v1.IrreconcilableValidationOverrides - default: {} - - name: logLevel - type: - scalar: string - - name: managedBootImages - type: - namedType: com.github.openshift.api.operator.v1.ManagedBootImages - default: {} - - name: managementState - type: - scalar: string - default: "" - - name: nodeDisruptionPolicy - type: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyConfig - default: {} - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: succeededRevisionLimit - type: - scalar: numeric - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.MachineConfigurationStatus - map: - fields: - - name: bootImageSkewEnforcementStatus - type: - namedType: com.github.openshift.api.operator.v1.BootImageSkewEnforcementStatus - default: {} - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: managedBootImagesStatus - type: - namedType: com.github.openshift.api.operator.v1.ManagedBootImages - default: {} - - name: nodeDisruptionPolicyStatus - type: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus - default: {} - - name: observedGeneration - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.MachineManager - map: - fields: - - name: apiGroup - type: - scalar: string - default: "" - - name: resource - type: - scalar: string - default: "" - - name: selection - type: - namedType: com.github.openshift.api.operator.v1.MachineManagerSelector - default: {} -- name: com.github.openshift.api.operator.v1.MachineManagerSelector - map: - fields: - - name: mode - type: - scalar: string - default: "" - - name: partial - type: - namedType: com.github.openshift.api.operator.v1.PartialSelector - unions: - - discriminator: mode - fields: - - fieldName: partial - discriminatorValue: Partial -- name: com.github.openshift.api.operator.v1.ManagedBootImages - map: - fields: - - name: machineManagers - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.MachineManager - elementRelationship: associative - keys: - - resource - - apiGroup -- name: com.github.openshift.api.operator.v1.ManagedTokenRequests - map: - fields: - - name: audiences - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.SecretsStoreTokenRequest - elementRelationship: associative - keys: - - audience -- name: com.github.openshift.api.operator.v1.NetFlowConfig - map: - fields: - - name: collectors - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.Network - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.NetworkSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.NetworkStatus - default: {} -- name: com.github.openshift.api.operator.v1.NetworkMigration - map: - fields: - - name: features - type: - namedType: com.github.openshift.api.operator.v1.FeaturesMigration - - name: mode - type: - scalar: string - - name: mtu - type: - namedType: com.github.openshift.api.operator.v1.MTUMigration - - name: networkType - type: - scalar: string -- name: com.github.openshift.api.operator.v1.NetworkSpec - map: - fields: - - name: additionalNetworks - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.AdditionalNetworkDefinition - elementRelationship: associative - keys: - - name - - name: additionalRoutingCapabilities - type: - namedType: com.github.openshift.api.operator.v1.AdditionalRoutingCapabilities - - name: clusterNetwork - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.ClusterNetworkEntry - elementRelationship: atomic - - name: defaultNetwork - type: - namedType: com.github.openshift.api.operator.v1.DefaultNetworkDefinition - default: {} - - name: deployKubeProxy - type: - scalar: boolean - - name: disableMultiNetwork - type: - scalar: boolean - - name: disableNetworkDiagnostics - type: - scalar: boolean - default: false - - name: exportNetworkFlows - type: - namedType: com.github.openshift.api.operator.v1.ExportNetworkFlows - - name: kubeProxyConfig - type: - namedType: com.github.openshift.api.operator.v1.ProxyConfig - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: migration - type: - namedType: com.github.openshift.api.operator.v1.NetworkMigration - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: serviceNetwork - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ - - name: useMultiNetworkPolicy - type: - scalar: boolean -- name: com.github.openshift.api.operator.v1.NetworkStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.NoOverlayConfig - map: - fields: - - name: outboundSNAT - type: - scalar: string - - name: routing - type: - scalar: string -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyClusterStatus - map: - fields: - - name: files - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusFile - elementRelationship: associative - keys: - - path - - name: sshkey - type: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusSSHKey - default: {} - - name: units - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusUnit - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyConfig - map: - fields: - - name: files - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecFile - elementRelationship: associative - keys: - - path - - name: sshkey - type: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecSSHKey - default: {} - - name: units - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecUnit - elementRelationship: associative - keys: - - name -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction - map: - fields: - - name: reload - type: - namedType: com.github.openshift.api.operator.v1.ReloadService - - name: restart - type: - namedType: com.github.openshift.api.operator.v1.RestartService - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: reload - discriminatorValue: Reload - - fieldName: restart - discriminatorValue: Restart -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecFile - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction - elementRelationship: atomic - - name: path - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecSSHKey - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecUnit - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicySpecAction - elementRelationship: atomic - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatus - map: - fields: - - name: clusterPolicies - type: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyClusterStatus - default: {} -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction - map: - fields: - - name: reload - type: - namedType: com.github.openshift.api.operator.v1.ReloadService - - name: restart - type: - namedType: com.github.openshift.api.operator.v1.RestartService - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: reload - discriminatorValue: Reload - - fieldName: restart - discriminatorValue: Restart -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusFile - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction - elementRelationship: atomic - - name: path - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusSSHKey - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusUnit - map: - fields: - - name: actions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.NodeDisruptionPolicyStatusAction - elementRelationship: atomic - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.NodePlacement - map: - fields: - - name: nodeSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: tolerations - type: - list: - elementType: - namedType: io.k8s.api.core.v1.Toleration - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.NodePortStrategy - map: - fields: - - name: protocol - type: - scalar: string -- name: com.github.openshift.api.operator.v1.NodeStatus - map: - fields: - - name: currentRevision - type: - scalar: numeric - - name: lastFailedCount - type: - scalar: numeric - - name: lastFailedReason - type: - scalar: string - - name: lastFailedRevision - type: - scalar: numeric - - name: lastFailedRevisionErrors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: lastFailedTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastFallbackCount - type: - scalar: numeric - - name: nodeName - type: - scalar: string - default: "" - - name: targetRevision - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.OAuthAPIServerStatus - map: - fields: - - name: encryptionStatus - type: - namedType: com.github.openshift.api.operator.v1.KMSEncryptionStatus - default: {} - - name: latestAvailableRevision - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.OLM - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.OLMSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.OLMStatus - default: {} -- name: com.github.openshift.api.operator.v1.OLMSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.OLMStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.OVNKubernetesConfig - map: - fields: - - name: bgpManagedConfig - type: - namedType: com.github.openshift.api.operator.v1.BGPManagedConfig - default: {} - - name: egressIPConfig - type: - namedType: com.github.openshift.api.operator.v1.EgressIPConfig - default: {} - - name: gatewayConfig - type: - namedType: com.github.openshift.api.operator.v1.GatewayConfig - - name: genevePort - type: - scalar: numeric - - name: hybridOverlayConfig - type: - namedType: com.github.openshift.api.operator.v1.HybridOverlayConfig - - name: ipsecConfig - type: - namedType: com.github.openshift.api.operator.v1.IPsecConfig - default: - mode: Disabled - - name: ipv4 - type: - namedType: com.github.openshift.api.operator.v1.IPv4OVNKubernetesConfig - - name: ipv6 - type: - namedType: com.github.openshift.api.operator.v1.IPv6OVNKubernetesConfig - - name: mtu - type: - scalar: numeric - - name: noOverlayConfig - type: - namedType: com.github.openshift.api.operator.v1.NoOverlayConfig - default: {} - - name: policyAuditConfig - type: - namedType: com.github.openshift.api.operator.v1.PolicyAuditConfig - - name: routeAdvertisements - type: - scalar: string - - name: transport - type: - scalar: string - - name: v4InternalSubnet - type: - scalar: string - - name: v6InternalSubnet - type: - scalar: string -- name: com.github.openshift.api.operator.v1.OpenShiftAPIServer - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.OpenShiftAPIServerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.OpenShiftAPIServerStatus - default: {} -- name: com.github.openshift.api.operator.v1.OpenShiftAPIServerSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.OpenShiftAPIServerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: encryptionStatus - type: - namedType: com.github.openshift.api.operator.v1.KMSEncryptionStatus - default: {} - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.OpenShiftControllerManager - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.OpenShiftControllerManagerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.OpenShiftControllerManagerStatus - default: {} -- name: com.github.openshift.api.operator.v1.OpenShiftControllerManagerSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.OpenShiftControllerManagerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.OpenShiftSDNConfig - map: - fields: - - name: enableUnidling - type: - scalar: boolean - - name: mode - type: - scalar: string - default: "" - - name: mtu - type: - scalar: numeric - - name: useExternalOpenvswitch - type: - scalar: boolean - - name: vxlanPort - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.OpenStackLoadBalancerParameters - map: - fields: - - name: floatingIP - type: - scalar: string -- name: com.github.openshift.api.operator.v1.OperatorCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.PartialSelector - map: - fields: - - name: machineResourceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: com.github.openshift.api.operator.v1.Perspective - map: - fields: - - name: id - type: - scalar: string - default: "" - - name: pinnedResources - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.PinnedResourceReference - elementRelationship: atomic - - name: visibility - type: - namedType: com.github.openshift.api.operator.v1.PerspectiveVisibility - default: {} -- name: com.github.openshift.api.operator.v1.PerspectiveVisibility - map: - fields: - - name: accessReview - type: - namedType: com.github.openshift.api.operator.v1.ResourceAttributesAccessReview - - name: state - type: - scalar: string - default: "" - unions: - - discriminator: state - fields: - - fieldName: accessReview - discriminatorValue: AccessReview -- name: com.github.openshift.api.operator.v1.PinnedResourceReference - map: - fields: - - name: group - type: - scalar: string - default: "" - - name: resource - type: - scalar: string - default: "" - - name: version - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.PolicyAuditConfig - map: - fields: - - name: destination - type: - scalar: string - - name: maxFileSize - type: - scalar: numeric - - name: maxLogFiles - type: - scalar: numeric - - name: rateLimit - type: - scalar: numeric - - name: syslogFacility - type: - scalar: string -- name: com.github.openshift.api.operator.v1.PrivateStrategy - map: - fields: - - name: protocol - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ProjectAccess - map: - fields: - - name: availableClusterRoles - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.ProviderLoadBalancerParameters - map: - fields: - - name: aws - type: - namedType: com.github.openshift.api.operator.v1.AWSLoadBalancerParameters - - name: gcp - type: - namedType: com.github.openshift.api.operator.v1.GCPLoadBalancerParameters - - name: ibm - type: - namedType: com.github.openshift.api.operator.v1.IBMLoadBalancerParameters - - name: openstack - type: - namedType: com.github.openshift.api.operator.v1.OpenStackLoadBalancerParameters - - name: type - type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: aws - discriminatorValue: AWS - - fieldName: gcp - discriminatorValue: GCP - - fieldName: ibm - discriminatorValue: IBM - - fieldName: openstack - discriminatorValue: OpenStack -- name: com.github.openshift.api.operator.v1.ProxyConfig - map: - fields: - - name: bindAddress - type: - scalar: string - - name: iptablesSyncPeriod - type: - scalar: string - - name: proxyArguments - type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.QuickStarts - map: - fields: - - name: disabled - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.ReloadService - map: - fields: - - name: serviceName - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.ResourceAttributesAccessReview - map: - fields: - - name: missing - type: - list: - elementType: - namedType: io.k8s.api.authorization.v1.ResourceAttributes - elementRelationship: atomic - - name: required - type: - list: - elementType: - namedType: io.k8s.api.authorization.v1.ResourceAttributes - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.RestartService - map: - fields: - - name: serviceName - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.RouteAdmissionPolicy - map: - fields: - - name: namespaceOwnership - type: - scalar: string - - name: wildcardPolicy - type: - scalar: string -- name: com.github.openshift.api.operator.v1.SFlowConfig - map: - fields: - - name: collectors - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.SecretsStoreCSIDriverConfigSpec - map: - fields: - - name: secretRotation - type: - namedType: com.github.openshift.api.operator.v1.SecretsStoreSecretRotation - default: {} - - name: tokenRequests - type: - namedType: com.github.openshift.api.operator.v1.SecretsStoreTokenRequests - default: {} -- name: com.github.openshift.api.operator.v1.SecretsStoreSecretRotation - map: - fields: - - name: custom - type: - namedType: com.github.openshift.api.operator.v1.CustomSecretRotation - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: custom - discriminatorValue: Custom -- name: com.github.openshift.api.operator.v1.SecretsStoreTokenRequest - map: - fields: - - name: audience - type: - scalar: string - - name: expirationSeconds - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.SecretsStoreTokenRequests - map: - fields: - - name: managed - type: - namedType: com.github.openshift.api.operator.v1.ManagedTokenRequests - default: {} - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: managed - discriminatorValue: Managed -- name: com.github.openshift.api.operator.v1.Server - map: - fields: - - name: forwardPlugin - type: - namedType: com.github.openshift.api.operator.v1.ForwardPlugin - default: {} - - name: name - type: - scalar: string - default: "" - - name: zones - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.ServiceAccountIssuerStatus - map: - fields: - - name: expirationTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: name - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.ServiceCA - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ServiceCASpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ServiceCAStatus - default: {} -- name: com.github.openshift.api.operator.v1.ServiceCASpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ServiceCAStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ServiceCatalogAPIServer - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ServiceCatalogAPIServerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ServiceCatalogAPIServerStatus - default: {} -- name: com.github.openshift.api.operator.v1.ServiceCatalogAPIServerSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ServiceCatalogAPIServerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.ServiceCatalogControllerManager - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerStatus - default: {} -- name: com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1.ServiceCatalogControllerManagerStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.SimpleMacvlanConfig - map: - fields: - - name: ipamConfig - type: - namedType: com.github.openshift.api.operator.v1.IPAMConfig - - name: master - type: - scalar: string - - name: mode - type: - scalar: string - - name: mtu - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1.StaticIPAMAddresses - map: - fields: - - name: address - type: - scalar: string - default: "" - - name: gateway - type: - scalar: string -- name: com.github.openshift.api.operator.v1.StaticIPAMConfig - map: - fields: - - name: addresses - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.StaticIPAMAddresses - elementRelationship: atomic - - name: dns - type: - namedType: com.github.openshift.api.operator.v1.StaticIPAMDNS - - name: routes - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.StaticIPAMRoutes - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.StaticIPAMDNS - map: - fields: - - name: domain - type: - scalar: string - - name: nameservers - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: search - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.StaticIPAMRoutes - map: - fields: - - name: destination - type: - scalar: string - default: "" - - name: gateway - type: - scalar: string -- name: com.github.openshift.api.operator.v1.StatuspageProvider - map: - fields: - - name: pageID - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.Storage - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1.StorageSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1.StorageStatus - default: {} -- name: com.github.openshift.api.operator.v1.StorageSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ - - name: vsphereStorageDriver - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.StorageStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1.SyslogLoggingDestinationParameters - map: - fields: - - name: address - type: - scalar: string - default: "" - - name: facility - type: - scalar: string - - name: maxLength - type: - scalar: numeric - - name: port - type: - scalar: numeric - default: 0 -- name: com.github.openshift.api.operator.v1.Theme - map: - fields: - - name: mode - type: - scalar: string - default: "" - - name: source - type: - namedType: com.github.openshift.api.operator.v1.FileReferenceSource - default: {} -- name: com.github.openshift.api.operator.v1.Upstream - map: - fields: - - name: address - type: - scalar: string - - name: port - type: - scalar: numeric - - name: type - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1.UpstreamResolvers - map: - fields: - - name: policy - type: - scalar: string - - name: protocolStrategy - type: - scalar: string - default: "" - - name: transportConfig - type: - namedType: com.github.openshift.api.operator.v1.DNSTransportConfig - default: {} - - name: upstreams - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.Upstream - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1.VSphereCSIDriverConfigSpec - map: - fields: - - name: globalMaxSnapshotsPerBlockVolume - type: - scalar: numeric - - name: granularMaxSnapshotsPerBlockVolumeInVSAN - type: - scalar: numeric - - name: granularMaxSnapshotsPerBlockVolumeInVVOL - type: - scalar: numeric - - name: maxAllowedBlockVolumesPerNode - type: - scalar: numeric - - name: topologyCategories - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1alpha1.BackupJobReference - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: namespace - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPI - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPISpec - - name: status - type: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPIStatus - default: {} -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponent - map: - fields: - - name: image - type: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponentImage - default: {} - - name: name - type: - scalar: string - - name: type - type: - scalar: string - unions: - - discriminator: type - fields: - - fieldName: image - discriminatorValue: Image -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponentImage - map: - fields: - - name: profile - type: - scalar: string - - name: ref - type: - scalar: string -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevision - map: - fields: - - name: components - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerComponent - elementRelationship: atomic - - name: contentID - type: - scalar: string - - name: manifestSubstitutions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevisionManifestSubstitution - elementRelationship: associative - keys: - - key - - name: name - type: - scalar: string - - name: revision - type: - scalar: numeric - - name: unmanagedCustomResourceDefinitions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevisionManifestSubstitution - map: - fields: - - name: key - type: - scalar: string - - name: value - type: - scalar: string -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPISpec - map: - fields: - - name: unmanagedCustomResourceDefinitions - type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: com.github.openshift.api.operator.v1alpha1.ClusterAPIStatus - map: - fields: - - name: currentRevision - type: - scalar: string - - name: desiredRevision - type: - scalar: string - - name: observedRevisionGeneration - type: - scalar: numeric - - name: revisions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterAPIInstallerRevision - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1alpha1.ClusterVersionOperator - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorStatus - default: {} -- name: com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorSpec - map: - fields: - - name: operatorLogLevel - type: - scalar: string -- name: com.github.openshift.api.operator.v1alpha1.ClusterVersionOperatorStatus - map: - fields: - - name: observedGeneration - type: - scalar: numeric -- name: com.github.openshift.api.operator.v1alpha1.EtcdBackup - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1alpha1.EtcdBackupSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1alpha1.EtcdBackupStatus - default: {} -- name: com.github.openshift.api.operator.v1alpha1.EtcdBackupSpec - map: - fields: - - name: pvcName - type: - scalar: string - default: "" -- name: com.github.openshift.api.operator.v1alpha1.EtcdBackupStatus - map: - fields: - - name: backupJob - type: - namedType: com.github.openshift.api.operator.v1alpha1.BackupJobReference - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicySpec - default: {} -- name: com.github.openshift.api.operator.v1alpha1.ImageContentSourcePolicySpec - map: - fields: - - name: repositoryDigestMirrors - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1alpha1.RepositoryDigestMirrors - elementRelationship: atomic -- name: com.github.openshift.api.operator.v1alpha1.OLM - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: com.github.openshift.api.operator.v1alpha1.OLMSpec - default: {} - - name: status - type: - namedType: com.github.openshift.api.operator.v1alpha1.OLMStatus - default: {} -- name: com.github.openshift.api.operator.v1alpha1.OLMSpec - map: - fields: - - name: logLevel - type: - scalar: string - - name: managementState - type: - scalar: string - default: "" - - name: observedConfig - type: - namedType: __untyped_atomic_ - - name: operatorLogLevel - type: - scalar: string - - name: unsupportedConfigOverrides - type: - namedType: __untyped_atomic_ -- name: com.github.openshift.api.operator.v1alpha1.OLMStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.OperatorCondition - elementRelationship: associative - keys: - - type - - name: generations - type: - list: - elementType: - namedType: com.github.openshift.api.operator.v1.GenerationStatus - elementRelationship: associative - keys: - - group - - resource - - namespace - - name - - name: latestAvailableRevision - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - default: 0 - - name: version - type: - scalar: string -- name: com.github.openshift.api.operator.v1alpha1.RepositoryDigestMirrors - map: - fields: - - name: mirrors - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: source - type: - scalar: string - default: "" -- name: io.k8s.api.authorization.v1.FieldSelectorAttributes - map: - fields: - - name: rawSelector - type: - scalar: string - - name: requirements - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement - elementRelationship: atomic -- name: io.k8s.api.authorization.v1.LabelSelectorAttributes - map: - fields: - - name: rawSelector - type: - scalar: string - - name: requirements - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - elementRelationship: atomic -- name: io.k8s.api.authorization.v1.ResourceAttributes - map: - fields: - - name: fieldSelector - type: - namedType: io.k8s.api.authorization.v1.FieldSelectorAttributes - - name: group - type: - scalar: string - - name: labelSelector - type: - namedType: io.k8s.api.authorization.v1.LabelSelectorAttributes - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: resource - type: - scalar: string - - name: subresource - type: - scalar: string - - name: verb - type: - scalar: string - - name: version - type: - scalar: string -- name: io.k8s.api.core.v1.LocalObjectReference - map: - fields: - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.core.v1.Toleration - map: - fields: - - name: effect - type: - scalar: string - - name: key - type: - scalar: string - - name: operator - type: - scalar: string - - name: tolerationSeconds - type: - scalar: numeric - - name: value - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - default: "" - - name: observedGeneration - type: - scalar: numeric - - name: reason - type: - scalar: string - default: "" - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Duration - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldSelectorRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - map: - fields: - - name: matchExpressions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - elementRelationship: atomic - - name: matchLabels - type: - map: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelectorRequirement - map: - fields: - - name: key - type: - scalar: string - default: "" - - name: operator - type: - scalar: string - default: "" - - name: values - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldsType - type: - scalar: string - - name: fieldsV1 - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - - name: manager - type: - scalar: string - - name: operation - type: - scalar: string - - name: subresource - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - map: - fields: - - name: annotations - type: - map: - elementType: - scalar: string - - name: creationTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deletionGracePeriodSeconds - type: - scalar: numeric - - name: deletionTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: finalizers - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: generateName - type: - scalar: string - - name: generation - type: - scalar: numeric - - name: labels - type: - map: - elementType: - scalar: string - - name: managedFields - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - elementRelationship: atomic - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: ownerReferences - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - elementRelationship: associative - keys: - - uid - - name: resourceVersion - type: - scalar: string - - name: selfLink - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - map: - fields: - - name: apiVersion - type: - scalar: string - default: "" - - name: blockOwnerDeletion - type: - scalar: boolean - - name: controller - type: - scalar: boolean - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time - scalar: untyped -- name: io.k8s.apimachinery.pkg.runtime.RawExtension - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/accesslogging.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/accesslogging.go deleted file mode 100644 index 0b03fcfb7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/accesslogging.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AccessLoggingApplyConfiguration represents a declarative configuration of the AccessLogging type for use -// with apply. -// -// AccessLogging describes how client requests should be logged. -type AccessLoggingApplyConfiguration struct { - // destination is where access logs go. - Destination *LoggingDestinationApplyConfiguration `json:"destination,omitempty"` - // httpLogFormat specifies the format of the log message for an HTTP - // request. - // - // If this field is empty, log messages use the implementation's default - // HTTP log format. For HAProxy's default HTTP log format, see the - // HAProxy documentation: - // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3 - // - // Note that this format only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). It does not affect the log format for TLS passthrough - // connections. - HttpLogFormat *string `json:"httpLogFormat,omitempty"` - // httpCaptureHeaders defines HTTP headers that should be captured in - // access logs. If this field is empty, no headers are captured. - // - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be captured for TLS passthrough - // connections. - HTTPCaptureHeaders *IngressControllerCaptureHTTPHeadersApplyConfiguration `json:"httpCaptureHeaders,omitempty"` - // httpCaptureCookies specifies HTTP cookies that should be captured in - // access logs. If this field is empty, no cookies are captured. - HTTPCaptureCookies []IngressControllerCaptureHTTPCookieApplyConfiguration `json:"httpCaptureCookies,omitempty"` - // logEmptyRequests specifies how connections on which no request is - // received should be logged. Typically, these empty requests come from - // load balancers' health probes or Web browsers' speculative - // connections ("preconnect"), in which case logging these requests may - // be undesirable. However, these requests may also be caused by - // network errors, in which case logging empty requests may be useful - // for diagnosing the errors. In addition, these requests may be caused - // by port scans, in which case logging empty requests may aid in - // detecting intrusion attempts. Allowed values for this field are - // "Log" and "Ignore". The default value is "Log". - LogEmptyRequests *operatorv1.LoggingPolicy `json:"logEmptyRequests,omitempty"` -} - -// AccessLoggingApplyConfiguration constructs a declarative configuration of the AccessLogging type for use with -// apply. -func AccessLogging() *AccessLoggingApplyConfiguration { - return &AccessLoggingApplyConfiguration{} -} - -// WithDestination sets the Destination field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Destination field is set to the value of the last call. -func (b *AccessLoggingApplyConfiguration) WithDestination(value *LoggingDestinationApplyConfiguration) *AccessLoggingApplyConfiguration { - b.Destination = value - return b -} - -// WithHttpLogFormat sets the HttpLogFormat field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HttpLogFormat field is set to the value of the last call. -func (b *AccessLoggingApplyConfiguration) WithHttpLogFormat(value string) *AccessLoggingApplyConfiguration { - b.HttpLogFormat = &value - return b -} - -// WithHTTPCaptureHeaders sets the HTTPCaptureHeaders field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPCaptureHeaders field is set to the value of the last call. -func (b *AccessLoggingApplyConfiguration) WithHTTPCaptureHeaders(value *IngressControllerCaptureHTTPHeadersApplyConfiguration) *AccessLoggingApplyConfiguration { - b.HTTPCaptureHeaders = value - return b -} - -// WithHTTPCaptureCookies adds the given value to the HTTPCaptureCookies field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HTTPCaptureCookies field. -func (b *AccessLoggingApplyConfiguration) WithHTTPCaptureCookies(values ...*IngressControllerCaptureHTTPCookieApplyConfiguration) *AccessLoggingApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHTTPCaptureCookies") - } - b.HTTPCaptureCookies = append(b.HTTPCaptureCookies, *values[i]) - } - return b -} - -// WithLogEmptyRequests sets the LogEmptyRequests field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogEmptyRequests field is set to the value of the last call. -func (b *AccessLoggingApplyConfiguration) WithLogEmptyRequests(value operatorv1.LoggingPolicy) *AccessLoggingApplyConfiguration { - b.LogEmptyRequests = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go deleted file mode 100644 index b88c1b3de..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalnetworkdefinition.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AdditionalNetworkDefinitionApplyConfiguration represents a declarative configuration of the AdditionalNetworkDefinition type for use -// with apply. -// -// AdditionalNetworkDefinition configures an extra network that is available but not -// created by default. Instead, pods must request them by name. -// type must be specified, along with exactly one "Config" that matches the type. -type AdditionalNetworkDefinitionApplyConfiguration struct { - // type is the type of network - // The supported values are NetworkTypeRaw, NetworkTypeSimpleMacvlan - Type *operatorv1.NetworkType `json:"type,omitempty"` - // name is the name of the network. This will be populated in the resulting CRD - // This must be unique. - Name *string `json:"name,omitempty"` - // namespace is the namespace of the network. This will be populated in the resulting CRD - // If not given the network will be created in the default namespace. - Namespace *string `json:"namespace,omitempty"` - // rawCNIConfig is the raw CNI configuration json to create in the - // NetworkAttachmentDefinition CRD - RawCNIConfig *string `json:"rawCNIConfig,omitempty"` - // simpleMacvlanConfig configures the macvlan interface in case of type:NetworkTypeSimpleMacvlan - SimpleMacvlanConfig *SimpleMacvlanConfigApplyConfiguration `json:"simpleMacvlanConfig,omitempty"` -} - -// AdditionalNetworkDefinitionApplyConfiguration constructs a declarative configuration of the AdditionalNetworkDefinition type for use with -// apply. -func AdditionalNetworkDefinition() *AdditionalNetworkDefinitionApplyConfiguration { - return &AdditionalNetworkDefinitionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithType(value operatorv1.NetworkType) *AdditionalNetworkDefinitionApplyConfiguration { - b.Type = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithName(value string) *AdditionalNetworkDefinitionApplyConfiguration { - b.Name = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithNamespace(value string) *AdditionalNetworkDefinitionApplyConfiguration { - b.Namespace = &value - return b -} - -// WithRawCNIConfig sets the RawCNIConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RawCNIConfig field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithRawCNIConfig(value string) *AdditionalNetworkDefinitionApplyConfiguration { - b.RawCNIConfig = &value - return b -} - -// WithSimpleMacvlanConfig sets the SimpleMacvlanConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SimpleMacvlanConfig field is set to the value of the last call. -func (b *AdditionalNetworkDefinitionApplyConfiguration) WithSimpleMacvlanConfig(value *SimpleMacvlanConfigApplyConfiguration) *AdditionalNetworkDefinitionApplyConfiguration { - b.SimpleMacvlanConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go deleted file mode 100644 index f10860f57..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/additionalroutingcapabilities.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AdditionalRoutingCapabilitiesApplyConfiguration represents a declarative configuration of the AdditionalRoutingCapabilities type for use -// with apply. -// -// AdditionalRoutingCapabilities describes components and relevant configuration providing -// advanced routing capabilities. -type AdditionalRoutingCapabilitiesApplyConfiguration struct { - // providers is a set of enabled components that provide additional routing - // capabilities. Entries on this list must be unique. The only valid value - // is currrently "FRR" which provides FRR routing capabilities through the - // deployment of FRR. - Providers []operatorv1.RoutingCapabilitiesProvider `json:"providers,omitempty"` -} - -// AdditionalRoutingCapabilitiesApplyConfiguration constructs a declarative configuration of the AdditionalRoutingCapabilities type for use with -// apply. -func AdditionalRoutingCapabilities() *AdditionalRoutingCapabilitiesApplyConfiguration { - return &AdditionalRoutingCapabilitiesApplyConfiguration{} -} - -// WithProviders adds the given value to the Providers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Providers field. -func (b *AdditionalRoutingCapabilitiesApplyConfiguration) WithProviders(values ...operatorv1.RoutingCapabilitiesProvider) *AdditionalRoutingCapabilitiesApplyConfiguration { - for i := range values { - b.Providers = append(b.Providers, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/addpage.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/addpage.go deleted file mode 100644 index 634c559db..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/addpage.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AddPageApplyConfiguration represents a declarative configuration of the AddPage type for use -// with apply. -// -// AddPage allows customizing actions on the Add page in developer perspective. -type AddPageApplyConfiguration struct { - // disabledActions is a list of actions that are not shown to users. - // Each action in the list is represented by its ID. - DisabledActions []string `json:"disabledActions,omitempty"` -} - -// AddPageApplyConfiguration constructs a declarative configuration of the AddPage type for use with -// apply. -func AddPage() *AddPageApplyConfiguration { - return &AddPageApplyConfiguration{} -} - -// WithDisabledActions adds the given value to the DisabledActions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the DisabledActions field. -func (b *AddPageApplyConfiguration) WithDisabledActions(values ...string) *AddPageApplyConfiguration { - for i := range values { - b.DisabledActions = append(b.DisabledActions, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authentication.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authentication.go deleted file mode 100644 index ae66caf97..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authentication.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// AuthenticationApplyConfiguration represents a declarative configuration of the Authentication type for use -// with apply. -// -// Authentication provides information to configure an operator to manage authentication. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type AuthenticationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *AuthenticationSpecApplyConfiguration `json:"spec,omitempty"` - Status *AuthenticationStatusApplyConfiguration `json:"status,omitempty"` -} - -// Authentication constructs a declarative configuration of the Authentication type for use with -// apply. -func Authentication(name string) *AuthenticationApplyConfiguration { - b := &AuthenticationApplyConfiguration{} - b.WithName(name) - b.WithKind("Authentication") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractAuthenticationFrom extracts the applied configuration owned by fieldManager from -// authentication for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// authentication must be a unmodified Authentication API object that was retrieved from the Kubernetes API. -// ExtractAuthenticationFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAuthenticationFrom(authentication *operatorv1.Authentication, fieldManager string, subresource string) (*AuthenticationApplyConfiguration, error) { - b := &AuthenticationApplyConfiguration{} - err := managedfields.ExtractInto(authentication, internal.Parser().Type("com.github.openshift.api.operator.v1.Authentication"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(authentication.Name) - - b.WithKind("Authentication") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractAuthentication extracts the applied configuration owned by fieldManager from -// authentication. If no managedFields are found in authentication for fieldManager, a -// AuthenticationApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// authentication must be a unmodified Authentication API object that was retrieved from the Kubernetes API. -// ExtractAuthentication provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAuthentication(authentication *operatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { - return ExtractAuthenticationFrom(authentication, fieldManager, "") -} - -// ExtractAuthenticationStatus extracts the applied configuration owned by fieldManager from -// authentication for the status subresource. -func ExtractAuthenticationStatus(authentication *operatorv1.Authentication, fieldManager string) (*AuthenticationApplyConfiguration, error) { - return ExtractAuthenticationFrom(authentication, fieldManager, "status") -} - -func (b AuthenticationApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithKind(value string) *AuthenticationApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithAPIVersion(value string) *AuthenticationApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithName(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithGenerateName(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithNamespace(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithUID(value types.UID) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithResourceVersion(value string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithGeneration(value int64) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *AuthenticationApplyConfiguration) WithLabels(entries map[string]string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *AuthenticationApplyConfiguration) WithAnnotations(entries map[string]string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *AuthenticationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *AuthenticationApplyConfiguration) WithFinalizers(values ...string) *AuthenticationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *AuthenticationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithSpec(value *AuthenticationSpecApplyConfiguration) *AuthenticationApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *AuthenticationApplyConfiguration) WithStatus(value *AuthenticationStatusApplyConfiguration) *AuthenticationApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *AuthenticationApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationconfigmapreference.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationconfigmapreference.go deleted file mode 100644 index 074390664..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationconfigmapreference.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AuthenticationConfigMapReferenceApplyConfiguration represents a declarative configuration of the AuthenticationConfigMapReference type for use -// with apply. -// -// AuthenticationConfigMapReference references a ConfigMap in the -// openshift-config namespace. -type AuthenticationConfigMapReferenceApplyConfiguration struct { - // name is the metadata.name of the referenced ConfigMap. - // Must be a valid DNS subdomain name (RFC 1123): at most 253 - // characters, only lowercase alphanumeric characters, '-' or - // '.', starting and ending with an alphanumeric character. - Name *string `json:"name,omitempty"` -} - -// AuthenticationConfigMapReferenceApplyConfiguration constructs a declarative configuration of the AuthenticationConfigMapReference type for use with -// apply. -func AuthenticationConfigMapReference() *AuthenticationConfigMapReferenceApplyConfiguration { - return &AuthenticationConfigMapReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AuthenticationConfigMapReferenceApplyConfiguration) WithName(value string) *AuthenticationConfigMapReferenceApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationproxyconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationproxyconfig.go deleted file mode 100644 index 8b5e29144..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationproxyconfig.go +++ /dev/null @@ -1,79 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AuthenticationProxyConfigApplyConfiguration represents a declarative configuration of the AuthenticationProxyConfig type for use -// with apply. -// -// AuthenticationProxyConfig holds proxy configuration scoped to -// authentication components (the OAuth server and the cluster -// authentication operator). -type AuthenticationProxyConfigApplyConfiguration struct { - // httpProxy is the URL of the proxy for HTTP requests. - // Must be a valid URL with http or https scheme, a non-empty - // hostname, and no path, query parameters, or fragment. - // Userinfo (e.g. user:password@host) is allowed for proxy - // authentication. Maximum length is 2048 characters. - HTTPProxy *string `json:"httpProxy,omitempty"` - // httpsProxy is the URL of the proxy for HTTPS requests. - // Must be a valid URL with http or https scheme, a non-empty - // hostname, and no path, query parameters, or fragment. - // Userinfo (e.g. user:password@host) is allowed for proxy - // authentication. Maximum length is 2048 characters. - HTTPSProxy *string `json:"httpsProxy,omitempty"` - // noProxy is a list of hostnames and/or CIDRs and/or IPs for which - // the proxy should not be used. Must contain at least one entry - // when set. Each entry must be between 1 and 253 characters long - // and at most 64 entries are allowed. Duplicate - // entries are not permitted. Entries that are not valid hostnames, - // CIDRs, or IPs are silently ignored. Cluster-internal defaults - // (.cluster.local, .svc, 127.0.0.1, localhost) are always appended - // automatically and do not need to be included. - NoProxy []string `json:"noProxy,omitempty"` - // trustedCA is a reference to a ConfigMap in the openshift-config - // namespace containing a CA certificate bundle under the key - // "ca-bundle.crt". This bundle is appended to the system trust store - // used by authentication components for proxy TLS connections. - // When omitted, only the system trust store is used. - TrustedCA *AuthenticationConfigMapReferenceApplyConfiguration `json:"trustedCA,omitempty"` -} - -// AuthenticationProxyConfigApplyConfiguration constructs a declarative configuration of the AuthenticationProxyConfig type for use with -// apply. -func AuthenticationProxyConfig() *AuthenticationProxyConfigApplyConfiguration { - return &AuthenticationProxyConfigApplyConfiguration{} -} - -// WithHTTPProxy sets the HTTPProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPProxy field is set to the value of the last call. -func (b *AuthenticationProxyConfigApplyConfiguration) WithHTTPProxy(value string) *AuthenticationProxyConfigApplyConfiguration { - b.HTTPProxy = &value - return b -} - -// WithHTTPSProxy sets the HTTPSProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPSProxy field is set to the value of the last call. -func (b *AuthenticationProxyConfigApplyConfiguration) WithHTTPSProxy(value string) *AuthenticationProxyConfigApplyConfiguration { - b.HTTPSProxy = &value - return b -} - -// WithNoProxy adds the given value to the NoProxy field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NoProxy field. -func (b *AuthenticationProxyConfigApplyConfiguration) WithNoProxy(values ...string) *AuthenticationProxyConfigApplyConfiguration { - for i := range values { - b.NoProxy = append(b.NoProxy, values[i]) - } - return b -} - -// WithTrustedCA sets the TrustedCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TrustedCA field is set to the value of the last call. -func (b *AuthenticationProxyConfigApplyConfiguration) WithTrustedCA(value *AuthenticationConfigMapReferenceApplyConfiguration) *AuthenticationProxyConfigApplyConfiguration { - b.TrustedCA = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationspec.go deleted file mode 100644 index 4d2fb8c7c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationspec.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// AuthenticationSpecApplyConfiguration represents a declarative configuration of the AuthenticationSpec type for use -// with apply. -type AuthenticationSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // proxy configures proxy settings for outbound connections made - // by the authentication stack. When set, it replaces the - // cluster-wide proxy (proxy.config.openshift.io/cluster) - // entirely for authentication — individual fields are not - // inherited from the cluster-wide configuration. When omitted, - // the cluster-wide proxy is used if configured; otherwise no - // proxy is used. - Proxy *AuthenticationProxyConfigApplyConfiguration `json:"proxy,omitempty"` -} - -// AuthenticationSpecApplyConfiguration constructs a declarative configuration of the AuthenticationSpec type for use with -// apply. -func AuthenticationSpec() *AuthenticationSpecApplyConfiguration { - return &AuthenticationSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *AuthenticationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *AuthenticationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *AuthenticationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *AuthenticationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *AuthenticationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithProxy sets the Proxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Proxy field is set to the value of the last call. -func (b *AuthenticationSpecApplyConfiguration) WithProxy(value *AuthenticationProxyConfigApplyConfiguration) *AuthenticationSpecApplyConfiguration { - b.Proxy = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationstatus.go deleted file mode 100644 index 590b2cde5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/authenticationstatus.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AuthenticationStatusApplyConfiguration represents a declarative configuration of the AuthenticationStatus type for use -// with apply. -type AuthenticationStatusApplyConfiguration struct { - // oauthAPIServer holds status specific only to oauth-apiserver - OAuthAPIServer *OAuthAPIServerStatusApplyConfiguration `json:"oauthAPIServer,omitempty"` - OperatorStatusApplyConfiguration `json:",inline"` -} - -// AuthenticationStatusApplyConfiguration constructs a declarative configuration of the AuthenticationStatus type for use with -// apply. -func AuthenticationStatus() *AuthenticationStatusApplyConfiguration { - return &AuthenticationStatusApplyConfiguration{} -} - -// WithOAuthAPIServer sets the OAuthAPIServer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OAuthAPIServer field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithOAuthAPIServer(value *OAuthAPIServerStatusApplyConfiguration) *AuthenticationStatusApplyConfiguration { - b.OAuthAPIServer = value - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithObservedGeneration(value int64) *AuthenticationStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *AuthenticationStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *AuthenticationStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithVersion(value string) *AuthenticationStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithReadyReplicas(value int32) *AuthenticationStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *AuthenticationStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *AuthenticationStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *AuthenticationStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *AuthenticationStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go deleted file mode 100644 index 46985e257..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsclassicloadbalancerparameters.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// AWSClassicLoadBalancerParametersApplyConfiguration represents a declarative configuration of the AWSClassicLoadBalancerParameters type for use -// with apply. -// -// AWSClassicLoadBalancerParameters holds configuration parameters for an -// AWS Classic load balancer. -type AWSClassicLoadBalancerParametersApplyConfiguration struct { - // connectionIdleTimeout specifies the maximum time period that a - // connection may be idle before the load balancer closes the - // connection. The value must be parseable as a time duration value; - // see . A nil or zero value - // means no opinion, in which case a default value is used. The default - // value for this field is 60s. This default is subject to change. - ConnectionIdleTimeout *metav1.Duration `json:"connectionIdleTimeout,omitempty"` - // subnets specifies the subnets to which the load balancer will - // attach. The subnets may be specified by either their - // ID or name. The total number of subnets is limited to 10. - // - // In order for the load balancer to be provisioned with subnets, - // each subnet must exist, each subnet must be from a different - // availability zone, and the load balancer service must be - // recreated to pick up new values. - // - // When omitted from the spec, the subnets will be auto-discovered - // for each availability zone. Auto-discovered subnets are not reported - // in the status of the IngressController object. - Subnets *AWSSubnetsApplyConfiguration `json:"subnets,omitempty"` -} - -// AWSClassicLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the AWSClassicLoadBalancerParameters type for use with -// apply. -func AWSClassicLoadBalancerParameters() *AWSClassicLoadBalancerParametersApplyConfiguration { - return &AWSClassicLoadBalancerParametersApplyConfiguration{} -} - -// WithConnectionIdleTimeout sets the ConnectionIdleTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConnectionIdleTimeout field is set to the value of the last call. -func (b *AWSClassicLoadBalancerParametersApplyConfiguration) WithConnectionIdleTimeout(value metav1.Duration) *AWSClassicLoadBalancerParametersApplyConfiguration { - b.ConnectionIdleTimeout = &value - return b -} - -// WithSubnets sets the Subnets field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subnets field is set to the value of the last call. -func (b *AWSClassicLoadBalancerParametersApplyConfiguration) WithSubnets(value *AWSSubnetsApplyConfiguration) *AWSClassicLoadBalancerParametersApplyConfiguration { - b.Subnets = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awscsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awscsidriverconfigspec.go deleted file mode 100644 index f527a9312..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awscsidriverconfigspec.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the AWSCSIDriverConfigSpec type for use -// with apply. -// -// AWSCSIDriverConfigSpec defines properties that can be configured for the AWS CSI driver. -type AWSCSIDriverConfigSpecApplyConfiguration struct { - // kmsKeyARN sets the cluster default storage class to encrypt volumes with a user-defined KMS key, - // rather than the default KMS key used by AWS. - // The value may be either the ARN or Alias ARN of a KMS key. - // - // The ARN must follow the format: arn::kms:::(key|alias)/, where: - // is the AWS partition (aws, aws-cn, aws-us-gov, aws-iso, aws-iso-b, aws-iso-e, aws-iso-f, or aws-eusc), - // is the AWS region, - // is a 12-digit numeric identifier for the AWS account, - // is the KMS key ID or alias name. - KMSKeyARN *string `json:"kmsKeyARN,omitempty"` - // efsVolumeMetrics sets the configuration for collecting metrics from EFS volumes used by the EFS CSI Driver. - EFSVolumeMetrics *AWSEFSVolumeMetricsApplyConfiguration `json:"efsVolumeMetrics,omitempty"` -} - -// AWSCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the AWSCSIDriverConfigSpec type for use with -// apply. -func AWSCSIDriverConfigSpec() *AWSCSIDriverConfigSpecApplyConfiguration { - return &AWSCSIDriverConfigSpecApplyConfiguration{} -} - -// WithKMSKeyARN sets the KMSKeyARN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KMSKeyARN field is set to the value of the last call. -func (b *AWSCSIDriverConfigSpecApplyConfiguration) WithKMSKeyARN(value string) *AWSCSIDriverConfigSpecApplyConfiguration { - b.KMSKeyARN = &value - return b -} - -// WithEFSVolumeMetrics sets the EFSVolumeMetrics field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EFSVolumeMetrics field is set to the value of the last call. -func (b *AWSCSIDriverConfigSpecApplyConfiguration) WithEFSVolumeMetrics(value *AWSEFSVolumeMetricsApplyConfiguration) *AWSCSIDriverConfigSpecApplyConfiguration { - b.EFSVolumeMetrics = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go deleted file mode 100644 index dc741542a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetrics.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AWSEFSVolumeMetricsApplyConfiguration represents a declarative configuration of the AWSEFSVolumeMetrics type for use -// with apply. -// -// AWSEFSVolumeMetrics defines the configuration for volume metrics in the EFS CSI Driver. -type AWSEFSVolumeMetricsApplyConfiguration struct { - // state defines the state of metric collection in the AWS EFS CSI Driver. - // This field is required and must be set to one of the following values: Disabled or RecursiveWalk. - // Disabled means no metrics collection will be performed. This is the default value. - // RecursiveWalk means the AWS EFS CSI Driver will recursively scan volumes to collect metrics. - // This process may result in high CPU and memory usage, depending on the volume size. - State *operatorv1.AWSEFSVolumeMetricsState `json:"state,omitempty"` - // recursiveWalk provides additional configuration for collecting volume metrics in the AWS EFS CSI Driver - // when the state is set to RecursiveWalk. - RecursiveWalk *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration `json:"recursiveWalk,omitempty"` -} - -// AWSEFSVolumeMetricsApplyConfiguration constructs a declarative configuration of the AWSEFSVolumeMetrics type for use with -// apply. -func AWSEFSVolumeMetrics() *AWSEFSVolumeMetricsApplyConfiguration { - return &AWSEFSVolumeMetricsApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *AWSEFSVolumeMetricsApplyConfiguration) WithState(value operatorv1.AWSEFSVolumeMetricsState) *AWSEFSVolumeMetricsApplyConfiguration { - b.State = &value - return b -} - -// WithRecursiveWalk sets the RecursiveWalk field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RecursiveWalk field is set to the value of the last call. -func (b *AWSEFSVolumeMetricsApplyConfiguration) WithRecursiveWalk(value *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration) *AWSEFSVolumeMetricsApplyConfiguration { - b.RecursiveWalk = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetricsrecursivewalkconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetricsrecursivewalkconfig.go deleted file mode 100644 index 0efa24e3e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsefsvolumemetricsrecursivewalkconfig.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration represents a declarative configuration of the AWSEFSVolumeMetricsRecursiveWalkConfig type for use -// with apply. -// -// AWSEFSVolumeMetricsRecursiveWalkConfig defines options for volume metrics in the EFS CSI Driver. -type AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration struct { - // refreshPeriodMinutes specifies the frequency, in minutes, at which volume metrics are refreshed. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is 240. - // The valid range is from 1 to 43200 minutes (30 days). - RefreshPeriodMinutes *int32 `json:"refreshPeriodMinutes,omitempty"` - // fsRateLimit defines the rate limit, in goroutines per file system, for processing volume metrics. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is 5. - // The valid range is from 1 to 100 goroutines. - FSRateLimit *int32 `json:"fsRateLimit,omitempty"` -} - -// AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration constructs a declarative configuration of the AWSEFSVolumeMetricsRecursiveWalkConfig type for use with -// apply. -func AWSEFSVolumeMetricsRecursiveWalkConfig() *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration { - return &AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration{} -} - -// WithRefreshPeriodMinutes sets the RefreshPeriodMinutes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RefreshPeriodMinutes field is set to the value of the last call. -func (b *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration) WithRefreshPeriodMinutes(value int32) *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration { - b.RefreshPeriodMinutes = &value - return b -} - -// WithFSRateLimit sets the FSRateLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FSRateLimit field is set to the value of the last call. -func (b *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration) WithFSRateLimit(value int32) *AWSEFSVolumeMetricsRecursiveWalkConfigApplyConfiguration { - b.FSRateLimit = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go deleted file mode 100644 index 7b3ece8dd..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsloadbalancerparameters.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AWSLoadBalancerParametersApplyConfiguration represents a declarative configuration of the AWSLoadBalancerParameters type for use -// with apply. -// -// AWSLoadBalancerParameters provides configuration settings that are -// specific to AWS load balancers. -type AWSLoadBalancerParametersApplyConfiguration struct { - // type is the type of AWS load balancer to instantiate for an ingresscontroller. - // - // Valid values are: - // - // * "Classic": A Classic Load Balancer that makes routing decisions at either - // the transport layer (TCP/SSL) or the application layer (HTTP/HTTPS). See - // the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#clb - // - // * "NLB": A Network Load Balancer that makes routing decisions at the - // transport layer (TCP/SSL). See the following for additional details: - // - // https://docs.aws.amazon.com/AmazonECS/latest/developerguide/load-balancer-types.html#nlb - Type *operatorv1.AWSLoadBalancerType `json:"type,omitempty"` - // classicLoadBalancerParameters holds configuration parameters for an AWS - // classic load balancer. Present only if type is Classic. - ClassicLoadBalancerParameters *AWSClassicLoadBalancerParametersApplyConfiguration `json:"classicLoadBalancer,omitempty"` - // networkLoadBalancerParameters holds configuration parameters for an AWS - // network load balancer. Present only if type is NLB. - NetworkLoadBalancerParameters *AWSNetworkLoadBalancerParametersApplyConfiguration `json:"networkLoadBalancer,omitempty"` -} - -// AWSLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the AWSLoadBalancerParameters type for use with -// apply. -func AWSLoadBalancerParameters() *AWSLoadBalancerParametersApplyConfiguration { - return &AWSLoadBalancerParametersApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *AWSLoadBalancerParametersApplyConfiguration) WithType(value operatorv1.AWSLoadBalancerType) *AWSLoadBalancerParametersApplyConfiguration { - b.Type = &value - return b -} - -// WithClassicLoadBalancerParameters sets the ClassicLoadBalancerParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClassicLoadBalancerParameters field is set to the value of the last call. -func (b *AWSLoadBalancerParametersApplyConfiguration) WithClassicLoadBalancerParameters(value *AWSClassicLoadBalancerParametersApplyConfiguration) *AWSLoadBalancerParametersApplyConfiguration { - b.ClassicLoadBalancerParameters = value - return b -} - -// WithNetworkLoadBalancerParameters sets the NetworkLoadBalancerParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkLoadBalancerParameters field is set to the value of the last call. -func (b *AWSLoadBalancerParametersApplyConfiguration) WithNetworkLoadBalancerParameters(value *AWSNetworkLoadBalancerParametersApplyConfiguration) *AWSLoadBalancerParametersApplyConfiguration { - b.NetworkLoadBalancerParameters = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsnetworkloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsnetworkloadbalancerparameters.go deleted file mode 100644 index 40cd5a65b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awsnetworkloadbalancerparameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AWSNetworkLoadBalancerParametersApplyConfiguration represents a declarative configuration of the AWSNetworkLoadBalancerParameters type for use -// with apply. -// -// AWSNetworkLoadBalancerParameters holds configuration parameters for an -// AWS Network load balancer. For Example: Setting AWS EIPs https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html -type AWSNetworkLoadBalancerParametersApplyConfiguration struct { - // subnets specifies the subnets to which the load balancer will - // attach. The subnets may be specified by either their - // ID or name. The total number of subnets is limited to 10. - // - // In order for the load balancer to be provisioned with subnets, - // each subnet must exist, each subnet must be from a different - // availability zone, and the load balancer service must be - // recreated to pick up new values. - // - // When omitted from the spec, the subnets will be auto-discovered - // for each availability zone. Auto-discovered subnets are not reported - // in the status of the IngressController object. - Subnets *AWSSubnetsApplyConfiguration `json:"subnets,omitempty"` - // eipAllocations is a list of IDs for Elastic IP (EIP) addresses that - // are assigned to the Network Load Balancer. - // The following restrictions apply: - // - // eipAllocations can only be used with external scope, not internal. - // An EIP can be allocated to only a single IngressController. - // The number of EIP allocations must match the number of subnets that are used for the load balancer. - // Each EIP allocation must be unique. - // A maximum of 10 EIP allocations are permitted. - // - // See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html for general - // information about configuration, characteristics, and limitations of Elastic IP addresses. - EIPAllocations []operatorv1.EIPAllocation `json:"eipAllocations,omitempty"` - // protocol specifies whether the Network Load Balancer uses PROXY - // protocol to forward connections to the IngressController. - // - // When set to "TCP", the NLB uses AWS's native client IP preservation. - // This may cause hairpin connection failures for internal load - // balancers when connections are made from pods to router pods on - // the same node. - // - // When set to "PROXY", the NLB disables native client IP preservation - // and uses PROXY protocol v2. The IngressController enables PROXY - // protocol on HAProxy so that it can parse PROXY protocol headers to - // obtain the original client IP. This avoids hairpin connection - // failures. - // - // The following values are valid for this field: - // - // * "TCP". - // * "PROXY". - // - // When omitted, this means the user has no opinion and the value is - // left to the platform to choose a reasonable default, which is subject to - // change over time. The current default is "PROXY". - // - // Note that changing this field may cause brief connection failures - // during the transition as the NLB attribute change and router rollout - // occur independently. - Protocol *operatorv1.NLBProtocol `json:"protocol,omitempty"` -} - -// AWSNetworkLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the AWSNetworkLoadBalancerParameters type for use with -// apply. -func AWSNetworkLoadBalancerParameters() *AWSNetworkLoadBalancerParametersApplyConfiguration { - return &AWSNetworkLoadBalancerParametersApplyConfiguration{} -} - -// WithSubnets sets the Subnets field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subnets field is set to the value of the last call. -func (b *AWSNetworkLoadBalancerParametersApplyConfiguration) WithSubnets(value *AWSSubnetsApplyConfiguration) *AWSNetworkLoadBalancerParametersApplyConfiguration { - b.Subnets = value - return b -} - -// WithEIPAllocations adds the given value to the EIPAllocations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the EIPAllocations field. -func (b *AWSNetworkLoadBalancerParametersApplyConfiguration) WithEIPAllocations(values ...operatorv1.EIPAllocation) *AWSNetworkLoadBalancerParametersApplyConfiguration { - for i := range values { - b.EIPAllocations = append(b.EIPAllocations, values[i]) - } - return b -} - -// WithProtocol sets the Protocol field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Protocol field is set to the value of the last call. -func (b *AWSNetworkLoadBalancerParametersApplyConfiguration) WithProtocol(value operatorv1.NLBProtocol) *AWSNetworkLoadBalancerParametersApplyConfiguration { - b.Protocol = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awssubnets.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awssubnets.go deleted file mode 100644 index 6ed82732f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/awssubnets.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// AWSSubnetsApplyConfiguration represents a declarative configuration of the AWSSubnets type for use -// with apply. -// -// AWSSubnets contains a list of references to AWS subnets by -// ID or name. -type AWSSubnetsApplyConfiguration struct { - // ids specifies a list of AWS subnets by subnet ID. - // Subnet IDs must start with "subnet-", consist only - // of alphanumeric characters, must be exactly 24 - // characters long, must be unique, and the total - // number of subnets specified by ids and names - // must not exceed 10. - IDs []operatorv1.AWSSubnetID `json:"ids,omitempty"` - // names specifies a list of AWS subnets by subnet name. - // Subnet names must not start with "subnet-", must not - // include commas, must be under 256 characters in length, - // must be unique, and the total number of subnets - // specified by ids and names must not exceed 10. - Names []operatorv1.AWSSubnetName `json:"names,omitempty"` -} - -// AWSSubnetsApplyConfiguration constructs a declarative configuration of the AWSSubnets type for use with -// apply. -func AWSSubnets() *AWSSubnetsApplyConfiguration { - return &AWSSubnetsApplyConfiguration{} -} - -// WithIDs adds the given value to the IDs field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the IDs field. -func (b *AWSSubnetsApplyConfiguration) WithIDs(values ...operatorv1.AWSSubnetID) *AWSSubnetsApplyConfiguration { - for i := range values { - b.IDs = append(b.IDs, values[i]) - } - return b -} - -// WithNames adds the given value to the Names field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Names field. -func (b *AWSSubnetsApplyConfiguration) WithNames(values ...operatorv1.AWSSubnetName) *AWSSubnetsApplyConfiguration { - for i := range values { - b.Names = append(b.Names, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurecsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurecsidriverconfigspec.go deleted file mode 100644 index c32878f5e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurecsidriverconfigspec.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AzureCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the AzureCSIDriverConfigSpec type for use -// with apply. -// -// AzureCSIDriverConfigSpec defines properties that can be configured for the Azure CSI driver. -type AzureCSIDriverConfigSpecApplyConfiguration struct { - // diskEncryptionSet sets the cluster default storage class to encrypt volumes with a - // customer-managed encryption set, rather than the default platform-managed keys. - DiskEncryptionSet *AzureDiskEncryptionSetApplyConfiguration `json:"diskEncryptionSet,omitempty"` -} - -// AzureCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the AzureCSIDriverConfigSpec type for use with -// apply. -func AzureCSIDriverConfigSpec() *AzureCSIDriverConfigSpecApplyConfiguration { - return &AzureCSIDriverConfigSpecApplyConfiguration{} -} - -// WithDiskEncryptionSet sets the DiskEncryptionSet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DiskEncryptionSet field is set to the value of the last call. -func (b *AzureCSIDriverConfigSpecApplyConfiguration) WithDiskEncryptionSet(value *AzureDiskEncryptionSetApplyConfiguration) *AzureCSIDriverConfigSpecApplyConfiguration { - b.DiskEncryptionSet = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurediskencryptionset.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurediskencryptionset.go deleted file mode 100644 index dc17d4f35..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/azurediskencryptionset.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// AzureDiskEncryptionSetApplyConfiguration represents a declarative configuration of the AzureDiskEncryptionSet type for use -// with apply. -// -// AzureDiskEncryptionSet defines the configuration for a disk encryption set. -type AzureDiskEncryptionSetApplyConfiguration struct { - // subscriptionID defines the Azure subscription that contains the disk encryption set. - // The value should meet the following conditions: - // 1. It should be a 128-bit number. - // 2. It should be 36 characters (32 hexadecimal characters and 4 hyphens) long. - // 3. It should be displayed in five groups separated by hyphens (-). - // 4. The first group should be 8 characters long. - // 5. The second, third, and fourth groups should be 4 characters long. - // 6. The fifth group should be 12 characters long. - // An Example SubscrionID: f2007bbf-f802-4a47-9336-cf7c6b89b378 - SubscriptionID *string `json:"subscriptionID,omitempty"` - // resourceGroup defines the Azure resource group that contains the disk encryption set. - // The value should consist of only alphanumberic characters, - // underscores (_), parentheses, hyphens and periods. - // The value should not end in a period and be at most 90 characters in - // length. - ResourceGroup *string `json:"resourceGroup,omitempty"` - // name is the name of the disk encryption set that will be set on the default storage class. - // The value should consist of only alphanumberic characters, - // underscores (_), hyphens, and be at most 80 characters in length. - Name *string `json:"name,omitempty"` -} - -// AzureDiskEncryptionSetApplyConfiguration constructs a declarative configuration of the AzureDiskEncryptionSet type for use with -// apply. -func AzureDiskEncryptionSet() *AzureDiskEncryptionSetApplyConfiguration { - return &AzureDiskEncryptionSetApplyConfiguration{} -} - -// WithSubscriptionID sets the SubscriptionID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SubscriptionID field is set to the value of the last call. -func (b *AzureDiskEncryptionSetApplyConfiguration) WithSubscriptionID(value string) *AzureDiskEncryptionSetApplyConfiguration { - b.SubscriptionID = &value - return b -} - -// WithResourceGroup sets the ResourceGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceGroup field is set to the value of the last call. -func (b *AzureDiskEncryptionSetApplyConfiguration) WithResourceGroup(value string) *AzureDiskEncryptionSetApplyConfiguration { - b.ResourceGroup = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *AzureDiskEncryptionSetApplyConfiguration) WithName(value string) *AzureDiskEncryptionSetApplyConfiguration { - b.Name = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bgpmanagedconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bgpmanagedconfig.go deleted file mode 100644 index 071ac3fc2..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bgpmanagedconfig.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// BGPManagedConfigApplyConfiguration represents a declarative configuration of the BGPManagedConfig type for use -// with apply. -// -// BGPManagedConfig contains configuration options for BGP when routing is "Managed". -type BGPManagedConfigApplyConfiguration struct { - // asNumber is the 2-byte or 4-byte Autonomous System Number (ASN) - // to be used in the generated FRR configuration. - // Valid values are 1 to 4294967295. - // When omitted, this defaults to 64512. - ASNumber *int64 `json:"asNumber,omitempty"` - // bgpTopology defines the BGP topology to be used. - // Allowed values are "FullMesh". - // When set to "FullMesh", every node peers directly with every other node via BGP. - // This field is required when BGPManagedConfig is specified. - BGPTopology *operatorv1.BGPTopology `json:"bgpTopology,omitempty"` -} - -// BGPManagedConfigApplyConfiguration constructs a declarative configuration of the BGPManagedConfig type for use with -// apply. -func BGPManagedConfig() *BGPManagedConfigApplyConfiguration { - return &BGPManagedConfigApplyConfiguration{} -} - -// WithASNumber sets the ASNumber field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ASNumber field is set to the value of the last call. -func (b *BGPManagedConfigApplyConfiguration) WithASNumber(value int64) *BGPManagedConfigApplyConfiguration { - b.ASNumber = &value - return b -} - -// WithBGPTopology sets the BGPTopology field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BGPTopology field is set to the value of the last call. -func (b *BGPManagedConfigApplyConfiguration) WithBGPTopology(value operatorv1.BGPTopology) *BGPManagedConfigApplyConfiguration { - b.BGPTopology = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementconfig.go deleted file mode 100644 index 1fffa6083..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementconfig.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// BootImageSkewEnforcementConfigApplyConfiguration represents a declarative configuration of the BootImageSkewEnforcementConfig type for use -// with apply. -// -// BootImageSkewEnforcementConfig is used to configure how boot image version skew is enforced on the cluster. -type BootImageSkewEnforcementConfigApplyConfiguration struct { - // mode determines the underlying behavior of skew enforcement mechanism. - // Valid values are Manual and None. - // Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP - // & RHCOS version associated with the last boot image update in the manual field. - // In Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the - // skew limit described by the release image. - // None means that the MCO will no longer monitor the boot image skew. This may affect - // the cluster's ability to scale. - // This field is required. - Mode *operatorv1.BootImageSkewEnforcementConfigMode `json:"mode,omitempty"` - // manual describes the current boot image of the cluster. - // This should be set to the oldest boot image used amongst all machine resources in the cluster. - // This must include either the RHCOS version of the boot image or the OCP release version which shipped with that - // RHCOS boot image. - // Required when mode is set to "Manual" and forbidden otherwise. - Manual *ClusterBootImageManualApplyConfiguration `json:"manual,omitempty"` -} - -// BootImageSkewEnforcementConfigApplyConfiguration constructs a declarative configuration of the BootImageSkewEnforcementConfig type for use with -// apply. -func BootImageSkewEnforcementConfig() *BootImageSkewEnforcementConfigApplyConfiguration { - return &BootImageSkewEnforcementConfigApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *BootImageSkewEnforcementConfigApplyConfiguration) WithMode(value operatorv1.BootImageSkewEnforcementConfigMode) *BootImageSkewEnforcementConfigApplyConfiguration { - b.Mode = &value - return b -} - -// WithManual sets the Manual field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Manual field is set to the value of the last call. -func (b *BootImageSkewEnforcementConfigApplyConfiguration) WithManual(value *ClusterBootImageManualApplyConfiguration) *BootImageSkewEnforcementConfigApplyConfiguration { - b.Manual = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementstatus.go deleted file mode 100644 index bbcab64ec..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/bootimageskewenforcementstatus.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// BootImageSkewEnforcementStatusApplyConfiguration represents a declarative configuration of the BootImageSkewEnforcementStatus type for use -// with apply. -// -// BootImageSkewEnforcementStatus is the type for the status object. It represents the cluster defaults when -// the boot image skew enforcement configuration is undefined and reflects the actual configuration when it is defined. -type BootImageSkewEnforcementStatusApplyConfiguration struct { - // mode determines the underlying behavior of skew enforcement mechanism. - // Valid values are Automatic, Manual and None. - // Automatic means that the MCO will perform boot image updates and store the - // OCP & RHCOS version associated with the last boot image update in the automatic field. - // Manual means that the cluster admin is expected to perform manual boot image updates and store the OCP - // & RHCOS version associated with the last boot image update in the manual field. - // In Automatic and Manual mode, the MCO will prevent upgrades when the boot image skew exceeds the - // skew limit described by the release image. - // None means that the MCO will no longer monitor the boot image skew. This may affect - // the cluster's ability to scale. - // This field is required. - Mode *operatorv1.BootImageSkewEnforcementModeStatus `json:"mode,omitempty"` - // automatic describes the current boot image of the cluster. - // This will be populated by the MCO when performing boot image updates. This value will be compared against - // the cluster's skew limit to determine skew compliance. - // Required when mode is set to "Automatic" and forbidden otherwise. - Automatic *ClusterBootImageAutomaticApplyConfiguration `json:"automatic,omitempty"` - // manual describes the current boot image of the cluster. - // This will be populated by the MCO using the values provided in the spec.bootImageSkewEnforcement.manual field. - // This value will be compared against the cluster's skew limit to determine skew compliance. - // Required when mode is set to "Manual" and forbidden otherwise. - Manual *ClusterBootImageManualApplyConfiguration `json:"manual,omitempty"` -} - -// BootImageSkewEnforcementStatusApplyConfiguration constructs a declarative configuration of the BootImageSkewEnforcementStatus type for use with -// apply. -func BootImageSkewEnforcementStatus() *BootImageSkewEnforcementStatusApplyConfiguration { - return &BootImageSkewEnforcementStatusApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithMode(value operatorv1.BootImageSkewEnforcementModeStatus) *BootImageSkewEnforcementStatusApplyConfiguration { - b.Mode = &value - return b -} - -// WithAutomatic sets the Automatic field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Automatic field is set to the value of the last call. -func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithAutomatic(value *ClusterBootImageAutomaticApplyConfiguration) *BootImageSkewEnforcementStatusApplyConfiguration { - b.Automatic = value - return b -} - -// WithManual sets the Manual field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Manual field is set to the value of the last call. -func (b *BootImageSkewEnforcementStatusApplyConfiguration) WithManual(value *ClusterBootImageManualApplyConfiguration) *BootImageSkewEnforcementStatusApplyConfiguration { - b.Manual = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capability.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capability.go deleted file mode 100644 index 19d511a4c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capability.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// CapabilityApplyConfiguration represents a declarative configuration of the Capability type for use -// with apply. -// -// Capabilities contains set of UI capabilities and their state in the console UI. -type CapabilityApplyConfiguration struct { - // name is the unique name of a capability. - // Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour. - Name *operatorv1.ConsoleCapabilityName `json:"name,omitempty"` - // visibility defines the visibility state of the capability. - Visibility *CapabilityVisibilityApplyConfiguration `json:"visibility,omitempty"` -} - -// CapabilityApplyConfiguration constructs a declarative configuration of the Capability type for use with -// apply. -func Capability() *CapabilityApplyConfiguration { - return &CapabilityApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CapabilityApplyConfiguration) WithName(value operatorv1.ConsoleCapabilityName) *CapabilityApplyConfiguration { - b.Name = &value - return b -} - -// WithVisibility sets the Visibility field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Visibility field is set to the value of the last call. -func (b *CapabilityApplyConfiguration) WithVisibility(value *CapabilityVisibilityApplyConfiguration) *CapabilityApplyConfiguration { - b.Visibility = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capabilityvisibility.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capabilityvisibility.go deleted file mode 100644 index fbe8edc64..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/capabilityvisibility.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// CapabilityVisibilityApplyConfiguration represents a declarative configuration of the CapabilityVisibility type for use -// with apply. -// -// CapabilityVisibility defines the criteria to enable/disable a capability. -type CapabilityVisibilityApplyConfiguration struct { - // state defines if the capability is enabled or disabled in the console UI. - // Enabling the capability in the console UI is represented by the "Enabled" value. - // Disabling the capability in the console UI is represented by the "Disabled" value. - State *operatorv1.CapabilityState `json:"state,omitempty"` -} - -// CapabilityVisibilityApplyConfiguration constructs a declarative configuration of the CapabilityVisibility type for use with -// apply. -func CapabilityVisibility() *CapabilityVisibilityApplyConfiguration { - return &CapabilityVisibilityApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *CapabilityVisibilityApplyConfiguration) WithState(value operatorv1.CapabilityState) *CapabilityVisibilityApplyConfiguration { - b.State = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clienttls.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clienttls.go deleted file mode 100644 index a88768fa9..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clienttls.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ClientTLSApplyConfiguration represents a declarative configuration of the ClientTLS type for use -// with apply. -// -// ClientTLS specifies TLS configuration to enable client-to-server -// authentication, which can be used for mutual TLS. -type ClientTLSApplyConfiguration struct { - // clientCertificatePolicy specifies whether the ingress controller - // requires clients to provide certificates. This field accepts the - // values "Required" or "Optional". - // - // Note that the ingress controller only checks client certificates for - // edge-terminated and reencrypt TLS routes; it cannot check - // certificates for cleartext HTTP or passthrough TLS routes. - ClientCertificatePolicy *operatorv1.ClientCertificatePolicy `json:"clientCertificatePolicy,omitempty"` - // clientCA specifies a configmap containing the PEM-encoded CA - // certificate bundle that should be used to verify a client's - // certificate. The administrator must create this configmap in the - // openshift-config namespace. - ClientCA *configv1.ConfigMapNameReference `json:"clientCA,omitempty"` - // allowedSubjectPatterns specifies a list of regular expressions that - // should be matched against the distinguished name on a valid client - // certificate to filter requests. The regular expressions must use - // PCRE syntax. If this list is empty, no filtering is performed. If - // the list is nonempty, then at least one pattern must match a client - // certificate's distinguished name or else the ingress controller - // rejects the certificate and denies the connection. - AllowedSubjectPatterns []string `json:"allowedSubjectPatterns,omitempty"` -} - -// ClientTLSApplyConfiguration constructs a declarative configuration of the ClientTLS type for use with -// apply. -func ClientTLS() *ClientTLSApplyConfiguration { - return &ClientTLSApplyConfiguration{} -} - -// WithClientCertificatePolicy sets the ClientCertificatePolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCertificatePolicy field is set to the value of the last call. -func (b *ClientTLSApplyConfiguration) WithClientCertificatePolicy(value operatorv1.ClientCertificatePolicy) *ClientTLSApplyConfiguration { - b.ClientCertificatePolicy = &value - return b -} - -// WithClientCA sets the ClientCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientCA field is set to the value of the last call. -func (b *ClientTLSApplyConfiguration) WithClientCA(value configv1.ConfigMapNameReference) *ClientTLSApplyConfiguration { - b.ClientCA = &value - return b -} - -// WithAllowedSubjectPatterns adds the given value to the AllowedSubjectPatterns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllowedSubjectPatterns field. -func (b *ClientTLSApplyConfiguration) WithAllowedSubjectPatterns(values ...string) *ClientTLSApplyConfiguration { - for i := range values { - b.AllowedSubjectPatterns = append(b.AllowedSubjectPatterns, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredential.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredential.go deleted file mode 100644 index c61917b95..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredential.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CloudCredentialApplyConfiguration represents a declarative configuration of the CloudCredential type for use -// with apply. -// -// CloudCredential provides a means to configure an operator to manage CredentialsRequests. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type CloudCredentialApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *CloudCredentialSpecApplyConfiguration `json:"spec,omitempty"` - Status *CloudCredentialStatusApplyConfiguration `json:"status,omitempty"` -} - -// CloudCredential constructs a declarative configuration of the CloudCredential type for use with -// apply. -func CloudCredential(name string) *CloudCredentialApplyConfiguration { - b := &CloudCredentialApplyConfiguration{} - b.WithName(name) - b.WithKind("CloudCredential") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractCloudCredentialFrom extracts the applied configuration owned by fieldManager from -// cloudCredential for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// cloudCredential must be a unmodified CloudCredential API object that was retrieved from the Kubernetes API. -// ExtractCloudCredentialFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCloudCredentialFrom(cloudCredential *operatorv1.CloudCredential, fieldManager string, subresource string) (*CloudCredentialApplyConfiguration, error) { - b := &CloudCredentialApplyConfiguration{} - err := managedfields.ExtractInto(cloudCredential, internal.Parser().Type("com.github.openshift.api.operator.v1.CloudCredential"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cloudCredential.Name) - - b.WithKind("CloudCredential") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractCloudCredential extracts the applied configuration owned by fieldManager from -// cloudCredential. If no managedFields are found in cloudCredential for fieldManager, a -// CloudCredentialApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// cloudCredential must be a unmodified CloudCredential API object that was retrieved from the Kubernetes API. -// ExtractCloudCredential provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCloudCredential(cloudCredential *operatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { - return ExtractCloudCredentialFrom(cloudCredential, fieldManager, "") -} - -// ExtractCloudCredentialStatus extracts the applied configuration owned by fieldManager from -// cloudCredential for the status subresource. -func ExtractCloudCredentialStatus(cloudCredential *operatorv1.CloudCredential, fieldManager string) (*CloudCredentialApplyConfiguration, error) { - return ExtractCloudCredentialFrom(cloudCredential, fieldManager, "status") -} - -func (b CloudCredentialApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithKind(value string) *CloudCredentialApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithAPIVersion(value string) *CloudCredentialApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithName(value string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithGenerateName(value string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithNamespace(value string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithUID(value types.UID) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithResourceVersion(value string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithGeneration(value int64) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CloudCredentialApplyConfiguration) WithLabels(entries map[string]string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CloudCredentialApplyConfiguration) WithAnnotations(entries map[string]string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CloudCredentialApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CloudCredentialApplyConfiguration) WithFinalizers(values ...string) *CloudCredentialApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CloudCredentialApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithSpec(value *CloudCredentialSpecApplyConfiguration) *CloudCredentialApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CloudCredentialApplyConfiguration) WithStatus(value *CloudCredentialStatusApplyConfiguration) *CloudCredentialApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CloudCredentialApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CloudCredentialApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CloudCredentialApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CloudCredentialApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialspec.go deleted file mode 100644 index 91068f1a8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialspec.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// CloudCredentialSpecApplyConfiguration represents a declarative configuration of the CloudCredentialSpec type for use -// with apply. -// -// CloudCredentialSpec is the specification of the desired behavior of the cloud-credential-operator. -type CloudCredentialSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // credentialsMode allows informing CCO that it should not attempt to dynamically - // determine the root cloud credentials capabilities, and it should just run in - // the specified mode. - // It also allows putting the operator into "manual" mode if desired. - // Leaving the field in default mode runs CCO so that the cluster's cloud credentials - // will be dynamically probed for capabilities (on supported clouds/platforms). - // Supported modes: - // AWS/Azure/GCP: "" (Default), "Mint", "Passthrough", "Manual" - // Others: Do not set value as other platforms only support running in "Passthrough" - CredentialsMode *operatorv1.CloudCredentialsMode `json:"credentialsMode,omitempty"` -} - -// CloudCredentialSpecApplyConfiguration constructs a declarative configuration of the CloudCredentialSpec type for use with -// apply. -func CloudCredentialSpec() *CloudCredentialSpecApplyConfiguration { - return &CloudCredentialSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *CloudCredentialSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *CloudCredentialSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *CloudCredentialSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *CloudCredentialSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *CloudCredentialSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithCredentialsMode sets the CredentialsMode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CredentialsMode field is set to the value of the last call. -func (b *CloudCredentialSpecApplyConfiguration) WithCredentialsMode(value operatorv1.CloudCredentialsMode) *CloudCredentialSpecApplyConfiguration { - b.CredentialsMode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go deleted file mode 100644 index 6b4f55684..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/cloudcredentialstatus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CloudCredentialStatusApplyConfiguration represents a declarative configuration of the CloudCredentialStatus type for use -// with apply. -// -// CloudCredentialStatus defines the observed status of the cloud-credential-operator. -type CloudCredentialStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// CloudCredentialStatusApplyConfiguration constructs a declarative configuration of the CloudCredentialStatus type for use with -// apply. -func CloudCredentialStatus() *CloudCredentialStatusApplyConfiguration { - return &CloudCredentialStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CloudCredentialStatusApplyConfiguration) WithObservedGeneration(value int64) *CloudCredentialStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CloudCredentialStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *CloudCredentialStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *CloudCredentialStatusApplyConfiguration) WithVersion(value string) *CloudCredentialStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *CloudCredentialStatusApplyConfiguration) WithReadyReplicas(value int32) *CloudCredentialStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *CloudCredentialStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *CloudCredentialStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *CloudCredentialStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *CloudCredentialStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimageautomatic.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimageautomatic.go deleted file mode 100644 index f8823745e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimageautomatic.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterBootImageAutomaticApplyConfiguration represents a declarative configuration of the ClusterBootImageAutomatic type for use -// with apply. -// -// ClusterBootImageAutomatic is used to describe the cluster boot image in Automatic mode. It stores the RHCOS version of the -// boot image and the OCP release version which shipped with that RHCOS boot image. At least one of these values are required. -// If ocpVersion and rhcosVersion are defined, both values will be used for checking skew compliance. -// If only ocpVersion is defined, only that value will be used for checking skew compliance. -// If only rhcosVersion is defined, only that value will be used for checking skew compliance. -type ClusterBootImageAutomaticApplyConfiguration struct { - // ocpVersion provides a string which represents the OCP version of the boot image. - // This field must match the OCP semver compatible format of x.y.z. This field must be between - // 5 and 10 characters long. - OCPVersion *string `json:"ocpVersion,omitempty"` - // rhcosVersion provides a string which represents the RHCOS version of the boot image - // This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy - // format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between - // 14 and 21 characters long. - RHCOSVersion *string `json:"rhcosVersion,omitempty"` -} - -// ClusterBootImageAutomaticApplyConfiguration constructs a declarative configuration of the ClusterBootImageAutomatic type for use with -// apply. -func ClusterBootImageAutomatic() *ClusterBootImageAutomaticApplyConfiguration { - return &ClusterBootImageAutomaticApplyConfiguration{} -} - -// WithOCPVersion sets the OCPVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OCPVersion field is set to the value of the last call. -func (b *ClusterBootImageAutomaticApplyConfiguration) WithOCPVersion(value string) *ClusterBootImageAutomaticApplyConfiguration { - b.OCPVersion = &value - return b -} - -// WithRHCOSVersion sets the RHCOSVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RHCOSVersion field is set to the value of the last call. -func (b *ClusterBootImageAutomaticApplyConfiguration) WithRHCOSVersion(value string) *ClusterBootImageAutomaticApplyConfiguration { - b.RHCOSVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimagemanual.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimagemanual.go deleted file mode 100644 index 510834a4c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusterbootimagemanual.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ClusterBootImageManualApplyConfiguration represents a declarative configuration of the ClusterBootImageManual type for use -// with apply. -// -// ClusterBootImageManual is used to describe the cluster boot image in Manual mode. -type ClusterBootImageManualApplyConfiguration struct { - // mode is used to configure which boot image field is defined in Manual mode. - // Valid values are OCPVersion and RHCOSVersion. - // OCPVersion means that the cluster admin is expected to set the OCP version associated with the last boot image update - // in the OCPVersion field. - // RHCOSVersion means that the cluster admin is expected to set the RHCOS version associated with the last boot image update - // in the RHCOSVersion field. - // This field is required. - Mode *operatorv1.ClusterBootImageManualMode `json:"mode,omitempty"` - // ocpVersion provides a string which represents the OCP version of the boot image. - // This field must match the OCP semver compatible format of x.y.z. This field must be between - // 5 and 10 characters long. - // Required when mode is set to "OCPVersion" and forbidden otherwise. - OCPVersion *string `json:"ocpVersion,omitempty"` - // rhcosVersion provides a string which represents the RHCOS version of the boot image - // This field must match rhcosVersion formatting of [major].[minor].[datestamp(YYYYMMDD)]-[buildnumber] or the legacy - // format of [major].[minor].[timestamp(YYYYMMDDHHmm)]-[buildnumber]. This field must be between - // 14 and 21 characters long. - // Required when mode is set to "RHCOSVersion" and forbidden otherwise. - RHCOSVersion *string `json:"rhcosVersion,omitempty"` -} - -// ClusterBootImageManualApplyConfiguration constructs a declarative configuration of the ClusterBootImageManual type for use with -// apply. -func ClusterBootImageManual() *ClusterBootImageManualApplyConfiguration { - return &ClusterBootImageManualApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *ClusterBootImageManualApplyConfiguration) WithMode(value operatorv1.ClusterBootImageManualMode) *ClusterBootImageManualApplyConfiguration { - b.Mode = &value - return b -} - -// WithOCPVersion sets the OCPVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OCPVersion field is set to the value of the last call. -func (b *ClusterBootImageManualApplyConfiguration) WithOCPVersion(value string) *ClusterBootImageManualApplyConfiguration { - b.OCPVersion = &value - return b -} - -// WithRHCOSVersion sets the RHCOSVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RHCOSVersion field is set to the value of the last call. -func (b *ClusterBootImageManualApplyConfiguration) WithRHCOSVersion(value string) *ClusterBootImageManualApplyConfiguration { - b.RHCOSVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriver.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriver.go deleted file mode 100644 index 35c8ef47e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriver.go +++ /dev/null @@ -1,279 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ClusterCSIDriverApplyConfiguration represents a declarative configuration of the ClusterCSIDriver type for use -// with apply. -// -// ClusterCSIDriver object allows management and configuration of a CSI driver operator -// installed by default in OpenShift. Name of the object must be name of the CSI driver -// it operates. See CSIDriverName type for list of allowed values. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ClusterCSIDriverApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ClusterCSIDriverSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *ClusterCSIDriverStatusApplyConfiguration `json:"status,omitempty"` -} - -// ClusterCSIDriver constructs a declarative configuration of the ClusterCSIDriver type for use with -// apply. -func ClusterCSIDriver(name string) *ClusterCSIDriverApplyConfiguration { - b := &ClusterCSIDriverApplyConfiguration{} - b.WithName(name) - b.WithKind("ClusterCSIDriver") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractClusterCSIDriverFrom extracts the applied configuration owned by fieldManager from -// clusterCSIDriver for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// clusterCSIDriver must be a unmodified ClusterCSIDriver API object that was retrieved from the Kubernetes API. -// ExtractClusterCSIDriverFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterCSIDriverFrom(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string, subresource string) (*ClusterCSIDriverApplyConfiguration, error) { - b := &ClusterCSIDriverApplyConfiguration{} - err := managedfields.ExtractInto(clusterCSIDriver, internal.Parser().Type("com.github.openshift.api.operator.v1.ClusterCSIDriver"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(clusterCSIDriver.Name) - - b.WithKind("ClusterCSIDriver") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractClusterCSIDriver extracts the applied configuration owned by fieldManager from -// clusterCSIDriver. If no managedFields are found in clusterCSIDriver for fieldManager, a -// ClusterCSIDriverApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// clusterCSIDriver must be a unmodified ClusterCSIDriver API object that was retrieved from the Kubernetes API. -// ExtractClusterCSIDriver provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractClusterCSIDriver(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { - return ExtractClusterCSIDriverFrom(clusterCSIDriver, fieldManager, "") -} - -// ExtractClusterCSIDriverStatus extracts the applied configuration owned by fieldManager from -// clusterCSIDriver for the status subresource. -func ExtractClusterCSIDriverStatus(clusterCSIDriver *operatorv1.ClusterCSIDriver, fieldManager string) (*ClusterCSIDriverApplyConfiguration, error) { - return ExtractClusterCSIDriverFrom(clusterCSIDriver, fieldManager, "status") -} - -func (b ClusterCSIDriverApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithKind(value string) *ClusterCSIDriverApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithAPIVersion(value string) *ClusterCSIDriverApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithName(value string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithGenerateName(value string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithNamespace(value string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithUID(value types.UID) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithResourceVersion(value string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithGeneration(value int64) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ClusterCSIDriverApplyConfiguration) WithLabels(entries map[string]string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ClusterCSIDriverApplyConfiguration) WithAnnotations(entries map[string]string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ClusterCSIDriverApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ClusterCSIDriverApplyConfiguration) WithFinalizers(values ...string) *ClusterCSIDriverApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ClusterCSIDriverApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithSpec(value *ClusterCSIDriverSpecApplyConfiguration) *ClusterCSIDriverApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ClusterCSIDriverApplyConfiguration) WithStatus(value *ClusterCSIDriverStatusApplyConfiguration) *ClusterCSIDriverApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ClusterCSIDriverApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ClusterCSIDriverApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ClusterCSIDriverApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ClusterCSIDriverApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverspec.go deleted file mode 100644 index f2c4e578a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverspec.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ClusterCSIDriverSpecApplyConfiguration represents a declarative configuration of the ClusterCSIDriverSpec type for use -// with apply. -// -// ClusterCSIDriverSpec is the desired behavior of CSI driver operator -type ClusterCSIDriverSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // storageClassState determines if CSI operator should create and manage storage classes. - // If this field value is empty or Managed - CSI operator will continuously reconcile - // storage class and create if necessary. - // If this field value is Unmanaged - CSI operator will not reconcile any previously created - // storage class. - // If this field value is Removed - CSI operator will delete the storage class it created previously. - // When omitted, this means the user has no opinion and the platform chooses a reasonable default, - // which is subject to change over time. - // The current default behaviour is Managed. - StorageClassState *operatorv1.StorageClassStateName `json:"storageClassState,omitempty"` - // driverConfig can be used to specify platform specific driver configuration. - // When omitted, this means no opinion and the platform is left to choose reasonable - // defaults. These defaults are subject to change over time. - DriverConfig *CSIDriverConfigSpecApplyConfiguration `json:"driverConfig,omitempty"` -} - -// ClusterCSIDriverSpecApplyConfiguration constructs a declarative configuration of the ClusterCSIDriverSpec type for use with -// apply. -func ClusterCSIDriverSpec() *ClusterCSIDriverSpecApplyConfiguration { - return &ClusterCSIDriverSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ClusterCSIDriverSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithStorageClassState sets the StorageClassState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StorageClassState field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithStorageClassState(value operatorv1.StorageClassStateName) *ClusterCSIDriverSpecApplyConfiguration { - b.StorageClassState = &value - return b -} - -// WithDriverConfig sets the DriverConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverConfig field is set to the value of the last call. -func (b *ClusterCSIDriverSpecApplyConfiguration) WithDriverConfig(value *CSIDriverConfigSpecApplyConfiguration) *ClusterCSIDriverSpecApplyConfiguration { - b.DriverConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go deleted file mode 100644 index 05951d74a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clustercsidriverstatus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterCSIDriverStatusApplyConfiguration represents a declarative configuration of the ClusterCSIDriverStatus type for use -// with apply. -// -// ClusterCSIDriverStatus is the observed status of CSI driver operator -type ClusterCSIDriverStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ClusterCSIDriverStatusApplyConfiguration constructs a declarative configuration of the ClusterCSIDriverStatus type for use with -// apply. -func ClusterCSIDriverStatus() *ClusterCSIDriverStatusApplyConfiguration { - return &ClusterCSIDriverStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithObservedGeneration(value int64) *ClusterCSIDriverStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ClusterCSIDriverStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithVersion(value string) *ClusterCSIDriverStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithReadyReplicas(value int32) *ClusterCSIDriverStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ClusterCSIDriverStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ClusterCSIDriverStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ClusterCSIDriverStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusternetworkentry.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusternetworkentry.go deleted file mode 100644 index 09e0eec41..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/clusternetworkentry.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ClusterNetworkEntryApplyConfiguration represents a declarative configuration of the ClusterNetworkEntry type for use -// with apply. -// -// ClusterNetworkEntry is a subnet from which to allocate PodIPs. A network of size -// HostPrefix (in CIDR notation) will be allocated when nodes join the cluster. If -// the HostPrefix field is not used by the plugin, it can be left unset. -// Not all network providers support multiple ClusterNetworks -type ClusterNetworkEntryApplyConfiguration struct { - CIDR *string `json:"cidr,omitempty"` - HostPrefix *uint32 `json:"hostPrefix,omitempty"` -} - -// ClusterNetworkEntryApplyConfiguration constructs a declarative configuration of the ClusterNetworkEntry type for use with -// apply. -func ClusterNetworkEntry() *ClusterNetworkEntryApplyConfiguration { - return &ClusterNetworkEntryApplyConfiguration{} -} - -// WithCIDR sets the CIDR field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CIDR field is set to the value of the last call. -func (b *ClusterNetworkEntryApplyConfiguration) WithCIDR(value string) *ClusterNetworkEntryApplyConfiguration { - b.CIDR = &value - return b -} - -// WithHostPrefix sets the HostPrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostPrefix field is set to the value of the last call. -func (b *ClusterNetworkEntryApplyConfiguration) WithHostPrefix(value uint32) *ClusterNetworkEntryApplyConfiguration { - b.HostPrefix = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/config.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/config.go deleted file mode 100644 index c54d0676d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/config.go +++ /dev/null @@ -1,278 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ConfigApplyConfiguration represents a declarative configuration of the Config type for use -// with apply. -// -// Config specifies the behavior of the config operator which is responsible for creating the initial configuration of other components -// on the cluster. The operator also handles installation, migration or synchronization of cloud configurations for AWS and Azure cloud based clusters -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ConfigApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Config Operator. - Spec *ConfigSpecApplyConfiguration `json:"spec,omitempty"` - // status defines the observed status of the Config Operator. - Status *ConfigStatusApplyConfiguration `json:"status,omitempty"` -} - -// Config constructs a declarative configuration of the Config type for use with -// apply. -func Config(name string) *ConfigApplyConfiguration { - b := &ConfigApplyConfiguration{} - b.WithName(name) - b.WithKind("Config") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractConfigFrom extracts the applied configuration owned by fieldManager from -// config for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// config must be a unmodified Config API object that was retrieved from the Kubernetes API. -// ExtractConfigFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConfigFrom(config *operatorv1.Config, fieldManager string, subresource string) (*ConfigApplyConfiguration, error) { - b := &ConfigApplyConfiguration{} - err := managedfields.ExtractInto(config, internal.Parser().Type("com.github.openshift.api.operator.v1.Config"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(config.Name) - - b.WithKind("Config") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractConfig extracts the applied configuration owned by fieldManager from -// config. If no managedFields are found in config for fieldManager, a -// ConfigApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// config must be a unmodified Config API object that was retrieved from the Kubernetes API. -// ExtractConfig provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConfig(config *operatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { - return ExtractConfigFrom(config, fieldManager, "") -} - -// ExtractConfigStatus extracts the applied configuration owned by fieldManager from -// config for the status subresource. -func ExtractConfigStatus(config *operatorv1.Config, fieldManager string) (*ConfigApplyConfiguration, error) { - return ExtractConfigFrom(config, fieldManager, "status") -} - -func (b ConfigApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithKind(value string) *ConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithAPIVersion(value string) *ConfigApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithName(value string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithGenerateName(value string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithNamespace(value string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithUID(value types.UID) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithResourceVersion(value string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithGeneration(value int64) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ConfigApplyConfiguration) WithLabels(entries map[string]string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ConfigApplyConfiguration) WithAnnotations(entries map[string]string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConfigApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ConfigApplyConfiguration) WithFinalizers(values ...string) *ConfigApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ConfigApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithSpec(value *ConfigSpecApplyConfiguration) *ConfigApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ConfigApplyConfiguration) WithStatus(value *ConfigStatusApplyConfiguration) *ConfigApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ConfigApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ConfigApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ConfigApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ConfigApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go deleted file mode 100644 index f65017eaf..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configmapfilereference.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConfigMapFileReferenceApplyConfiguration represents a declarative configuration of the ConfigMapFileReference type for use -// with apply. -// -// ConfigMapFileReference references a specific file within a ConfigMap. -type ConfigMapFileReferenceApplyConfiguration struct { - // name is the name of the ConfigMap. - // name is a required field. - // Must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character. - // Must be at most 253 characters in length. - Name *string `json:"name,omitempty"` - // key is the logo key inside the referenced ConfigMap. - // Must consist only of alphanumeric characters, dashes (-), underscores (_), and periods (.). - // Must be at most 253 characters in length. - // Must end in a valid file extension. - // A valid file extension must consist of a period followed by 2 to 5 alpha characters. - Key *string `json:"key,omitempty"` -} - -// ConfigMapFileReferenceApplyConfiguration constructs a declarative configuration of the ConfigMapFileReference type for use with -// apply. -func ConfigMapFileReference() *ConfigMapFileReferenceApplyConfiguration { - return &ConfigMapFileReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConfigMapFileReferenceApplyConfiguration) WithName(value string) *ConfigMapFileReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithKey sets the Key field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Key field is set to the value of the last call. -func (b *ConfigMapFileReferenceApplyConfiguration) WithKey(value string) *ConfigMapFileReferenceApplyConfiguration { - b.Key = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configspec.go deleted file mode 100644 index c7d3e93c3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ConfigSpecApplyConfiguration represents a declarative configuration of the ConfigSpec type for use -// with apply. -type ConfigSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// ConfigSpecApplyConfiguration constructs a declarative configuration of the ConfigSpec type for use with -// apply. -func ConfigSpec() *ConfigSpecApplyConfiguration { - return &ConfigSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConfigSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ConfigSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ConfigSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ConfigSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ConfigSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ConfigSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configstatus.go deleted file mode 100644 index 38e52420c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/configstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConfigStatusApplyConfiguration represents a declarative configuration of the ConfigStatus type for use -// with apply. -type ConfigStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ConfigStatusApplyConfiguration constructs a declarative configuration of the ConfigStatus type for use with -// apply. -func ConfigStatus() *ConfigStatusApplyConfiguration { - return &ConfigStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ConfigStatusApplyConfiguration) WithObservedGeneration(value int64) *ConfigStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ConfigStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ConfigStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ConfigStatusApplyConfiguration) WithVersion(value string) *ConfigStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ConfigStatusApplyConfiguration) WithReadyReplicas(value int32) *ConfigStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ConfigStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ConfigStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ConfigStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ConfigStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/console.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/console.go deleted file mode 100644 index 0fa9583b3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/console.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ConsoleApplyConfiguration represents a declarative configuration of the Console type for use -// with apply. -// -// Console provides a means to configure an operator to manage the console. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ConsoleApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ConsoleSpecApplyConfiguration `json:"spec,omitempty"` - Status *ConsoleStatusApplyConfiguration `json:"status,omitempty"` -} - -// Console constructs a declarative configuration of the Console type for use with -// apply. -func Console(name string) *ConsoleApplyConfiguration { - b := &ConsoleApplyConfiguration{} - b.WithName(name) - b.WithKind("Console") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractConsoleFrom extracts the applied configuration owned by fieldManager from -// console for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// console must be a unmodified Console API object that was retrieved from the Kubernetes API. -// ExtractConsoleFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConsoleFrom(console *operatorv1.Console, fieldManager string, subresource string) (*ConsoleApplyConfiguration, error) { - b := &ConsoleApplyConfiguration{} - err := managedfields.ExtractInto(console, internal.Parser().Type("com.github.openshift.api.operator.v1.Console"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(console.Name) - - b.WithKind("Console") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractConsole extracts the applied configuration owned by fieldManager from -// console. If no managedFields are found in console for fieldManager, a -// ConsoleApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// console must be a unmodified Console API object that was retrieved from the Kubernetes API. -// ExtractConsole provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractConsole(console *operatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { - return ExtractConsoleFrom(console, fieldManager, "") -} - -// ExtractConsoleStatus extracts the applied configuration owned by fieldManager from -// console for the status subresource. -func ExtractConsoleStatus(console *operatorv1.Console, fieldManager string) (*ConsoleApplyConfiguration, error) { - return ExtractConsoleFrom(console, fieldManager, "status") -} - -func (b ConsoleApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithKind(value string) *ConsoleApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithAPIVersion(value string) *ConsoleApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithName(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithGenerateName(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithNamespace(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithUID(value types.UID) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithResourceVersion(value string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithGeneration(value int64) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ConsoleApplyConfiguration) WithLabels(entries map[string]string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ConsoleApplyConfiguration) WithAnnotations(entries map[string]string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ConsoleApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ConsoleApplyConfiguration) WithFinalizers(values ...string) *ConsoleApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ConsoleApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithSpec(value *ConsoleSpecApplyConfiguration) *ConsoleApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ConsoleApplyConfiguration) WithStatus(value *ConsoleStatusApplyConfiguration) *ConsoleApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ConsoleApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleconfigroute.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleconfigroute.go deleted file mode 100644 index 97418b5c2..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleconfigroute.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ConsoleConfigRouteApplyConfiguration represents a declarative configuration of the ConsoleConfigRoute type for use -// with apply. -// -// ConsoleConfigRoute holds information on external route access to console. -// DEPRECATED -type ConsoleConfigRouteApplyConfiguration struct { - // hostname is the desired custom domain under which console will be available. - Hostname *string `json:"hostname,omitempty"` - // secret points to secret in the openshift-config namespace that contains custom - // certificate and key and needs to be created manually by the cluster admin. - // Referenced Secret is required to contain following key value pairs: - // - "tls.crt" - to specifies custom certificate - // - "tls.key" - to specifies private key of the custom certificate - // If the custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - Secret *configv1.SecretNameReference `json:"secret,omitempty"` -} - -// ConsoleConfigRouteApplyConfiguration constructs a declarative configuration of the ConsoleConfigRoute type for use with -// apply. -func ConsoleConfigRoute() *ConsoleConfigRouteApplyConfiguration { - return &ConsoleConfigRouteApplyConfiguration{} -} - -// WithHostname sets the Hostname field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hostname field is set to the value of the last call. -func (b *ConsoleConfigRouteApplyConfiguration) WithHostname(value string) *ConsoleConfigRouteApplyConfiguration { - b.Hostname = &value - return b -} - -// WithSecret sets the Secret field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Secret field is set to the value of the last call. -func (b *ConsoleConfigRouteApplyConfiguration) WithSecret(value configv1.SecretNameReference) *ConsoleConfigRouteApplyConfiguration { - b.Secret = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go deleted file mode 100644 index 6eb9c62a8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolecustomization.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ConsoleCustomizationApplyConfiguration represents a declarative configuration of the ConsoleCustomization type for use -// with apply. -// -// ConsoleCustomization defines a list of optional configuration for the console UI. -// Ensure that Logos and CustomLogoFile cannot be set at the same time. -type ConsoleCustomizationApplyConfiguration struct { - // logos is used to replace the OpenShift Masthead and Favicon logos in the console UI with custom logos. - // logos is an optional field that allows a list of logos. - // Only one of logos or customLogoFile can be set at a time. - // If logos is set, customLogoFile must be unset. - // When specified, there must be at least one entry and no more than 2 entries. - // Each type must appear only once in the list. - Logos []LogoApplyConfiguration `json:"logos,omitempty"` - // capabilities defines an array of capabilities that can be interacted with in the console UI. - // Each capability defines a visual state that can be interacted with the console to render in the UI. - // Available capabilities are LightspeedButton, GettingStartedBanner, and GuidedTour. - // Each of the available capabilities may appear only once in the list. - Capabilities []CapabilityApplyConfiguration `json:"capabilities,omitempty"` - // brand is the default branding of the web console which can be overridden by - // providing the brand field. There is a limited set of specific brand options. - // This field controls elements of the console such as the logo. - // Invalid value will prevent a console rollout. - Brand *operatorv1.Brand `json:"brand,omitempty"` - // documentationBaseURL links to external documentation are shown in various sections - // of the web console. Providing documentationBaseURL will override the default - // documentation URL. - // Invalid value will prevent a console rollout. - DocumentationBaseURL *string `json:"documentationBaseURL,omitempty"` - // customProductName is the name that will be displayed in page titles, logo alt text, and the about dialog - // instead of the normal OpenShift product name. - CustomProductName *string `json:"customProductName,omitempty"` - // customLogoFile replaces the default OpenShift logo in the masthead and about dialog. It is a reference to a - // Only one of customLogoFile or logos can be set at a time. - // ConfigMap in the openshift-config namespace. This can be created with a command like - // 'oc create configmap custom-logo --from-file=/path/to/file -n openshift-config'. - // Image size must be less than 1 MB due to constraints on the ConfigMap size. - // The ConfigMap key should include a file extension so that the console serves the file - // with the correct MIME type. - // The recommended file format for the logo is SVG, but other file formats are allowed if supported by the browser. - // Deprecated: Use logos instead. - CustomLogoFile *configv1.ConfigMapFileReference `json:"customLogoFile,omitempty"` - // developerCatalog allows to configure the shown developer catalog categories (filters) and types (sub-catalogs). - DeveloperCatalog *DeveloperConsoleCatalogCustomizationApplyConfiguration `json:"developerCatalog,omitempty"` - // projectAccess allows customizing the available list of ClusterRoles in the Developer perspective - // Project access page which can be used by a project admin to specify roles to other users and - // restrict access within the project. If set, the list will replace the default ClusterRole options. - ProjectAccess *ProjectAccessApplyConfiguration `json:"projectAccess,omitempty"` - // quickStarts allows customization of available ConsoleQuickStart resources in console. - QuickStarts *QuickStartsApplyConfiguration `json:"quickStarts,omitempty"` - // addPage allows customizing actions on the Add page in developer perspective. - AddPage *AddPageApplyConfiguration `json:"addPage,omitempty"` - // perspectives allows enabling/disabling of perspective(s) that user can see in the Perspective switcher dropdown. - Perspectives []PerspectiveApplyConfiguration `json:"perspectives,omitempty"` -} - -// ConsoleCustomizationApplyConfiguration constructs a declarative configuration of the ConsoleCustomization type for use with -// apply. -func ConsoleCustomization() *ConsoleCustomizationApplyConfiguration { - return &ConsoleCustomizationApplyConfiguration{} -} - -// WithLogos adds the given value to the Logos field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Logos field. -func (b *ConsoleCustomizationApplyConfiguration) WithLogos(values ...*LogoApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithLogos") - } - b.Logos = append(b.Logos, *values[i]) - } - return b -} - -// WithCapabilities adds the given value to the Capabilities field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Capabilities field. -func (b *ConsoleCustomizationApplyConfiguration) WithCapabilities(values ...*CapabilityApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithCapabilities") - } - b.Capabilities = append(b.Capabilities, *values[i]) - } - return b -} - -// WithBrand sets the Brand field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Brand field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithBrand(value operatorv1.Brand) *ConsoleCustomizationApplyConfiguration { - b.Brand = &value - return b -} - -// WithDocumentationBaseURL sets the DocumentationBaseURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DocumentationBaseURL field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithDocumentationBaseURL(value string) *ConsoleCustomizationApplyConfiguration { - b.DocumentationBaseURL = &value - return b -} - -// WithCustomProductName sets the CustomProductName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomProductName field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithCustomProductName(value string) *ConsoleCustomizationApplyConfiguration { - b.CustomProductName = &value - return b -} - -// WithCustomLogoFile sets the CustomLogoFile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CustomLogoFile field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithCustomLogoFile(value configv1.ConfigMapFileReference) *ConsoleCustomizationApplyConfiguration { - b.CustomLogoFile = &value - return b -} - -// WithDeveloperCatalog sets the DeveloperCatalog field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeveloperCatalog field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithDeveloperCatalog(value *DeveloperConsoleCatalogCustomizationApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - b.DeveloperCatalog = value - return b -} - -// WithProjectAccess sets the ProjectAccess field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProjectAccess field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithProjectAccess(value *ProjectAccessApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - b.ProjectAccess = value - return b -} - -// WithQuickStarts sets the QuickStarts field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the QuickStarts field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithQuickStarts(value *QuickStartsApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - b.QuickStarts = value - return b -} - -// WithAddPage sets the AddPage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AddPage field is set to the value of the last call. -func (b *ConsoleCustomizationApplyConfiguration) WithAddPage(value *AddPageApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - b.AddPage = value - return b -} - -// WithPerspectives adds the given value to the Perspectives field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Perspectives field. -func (b *ConsoleCustomizationApplyConfiguration) WithPerspectives(values ...*PerspectiveApplyConfiguration) *ConsoleCustomizationApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithPerspectives") - } - b.Perspectives = append(b.Perspectives, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleproviders.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleproviders.go deleted file mode 100644 index ef966a678..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consoleproviders.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConsoleProvidersApplyConfiguration represents a declarative configuration of the ConsoleProviders type for use -// with apply. -// -// ConsoleProviders defines a list of optional additional providers of -// functionality to the console. -type ConsoleProvidersApplyConfiguration struct { - // statuspage contains ID for statuspage.io page that provides status info about. - Statuspage *StatuspageProviderApplyConfiguration `json:"statuspage,omitempty"` -} - -// ConsoleProvidersApplyConfiguration constructs a declarative configuration of the ConsoleProviders type for use with -// apply. -func ConsoleProviders() *ConsoleProvidersApplyConfiguration { - return &ConsoleProvidersApplyConfiguration{} -} - -// WithStatuspage sets the Statuspage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Statuspage field is set to the value of the last call. -func (b *ConsoleProvidersApplyConfiguration) WithStatuspage(value *StatuspageProviderApplyConfiguration) *ConsoleProvidersApplyConfiguration { - b.Statuspage = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolespec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolespec.go deleted file mode 100644 index c1fd1391f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolespec.go +++ /dev/null @@ -1,126 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ConsoleSpecApplyConfiguration represents a declarative configuration of the ConsoleSpec type for use -// with apply. -// -// ConsoleSpec is the specification of the desired behavior of the Console. -type ConsoleSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // customization is used to optionally provide a small set of - // customization options to the web console. - Customization *ConsoleCustomizationApplyConfiguration `json:"customization,omitempty"` - // providers contains configuration for using specific service providers. - Providers *ConsoleProvidersApplyConfiguration `json:"providers,omitempty"` - // route contains hostname and secret reference that contains the serving certificate. - // If a custom route is specified, a new route will be created with the - // provided hostname, under which console will be available. - // In case of custom hostname uses the default routing suffix of the cluster, - // the Secret specification for a serving certificate will not be needed. - // In case of custom hostname points to an arbitrary domain, manual DNS configurations steps are necessary. - // The default console route will be maintained to reserve the default hostname - // for console if the custom route is removed. - // If not specified, default route will be used. - // DEPRECATED - Route *ConsoleConfigRouteApplyConfiguration `json:"route,omitempty"` - // plugins defines a list of enabled console plugin names. - Plugins []string `json:"plugins,omitempty"` - // ingress allows to configure the alternative ingress for the console. - // This field is intended for clusters without ingress capability, - // where access to routes is not possible. - Ingress *IngressApplyConfiguration `json:"ingress,omitempty"` -} - -// ConsoleSpecApplyConfiguration constructs a declarative configuration of the ConsoleSpec type for use with -// apply. -func ConsoleSpec() *ConsoleSpecApplyConfiguration { - return &ConsoleSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ConsoleSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ConsoleSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ConsoleSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ConsoleSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ConsoleSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithCustomization sets the Customization field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Customization field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithCustomization(value *ConsoleCustomizationApplyConfiguration) *ConsoleSpecApplyConfiguration { - b.Customization = value - return b -} - -// WithProviders sets the Providers field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Providers field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithProviders(value *ConsoleProvidersApplyConfiguration) *ConsoleSpecApplyConfiguration { - b.Providers = value - return b -} - -// WithRoute sets the Route field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Route field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithRoute(value *ConsoleConfigRouteApplyConfiguration) *ConsoleSpecApplyConfiguration { - b.Route = value - return b -} - -// WithPlugins adds the given value to the Plugins field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Plugins field. -func (b *ConsoleSpecApplyConfiguration) WithPlugins(values ...string) *ConsoleSpecApplyConfiguration { - for i := range values { - b.Plugins = append(b.Plugins, values[i]) - } - return b -} - -// WithIngress sets the Ingress field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ingress field is set to the value of the last call. -func (b *ConsoleSpecApplyConfiguration) WithIngress(value *IngressApplyConfiguration) *ConsoleSpecApplyConfiguration { - b.Ingress = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolestatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolestatus.go deleted file mode 100644 index 579874caf..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/consolestatus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ConsoleStatusApplyConfiguration represents a declarative configuration of the ConsoleStatus type for use -// with apply. -// -// ConsoleStatus defines the observed status of the Console. -type ConsoleStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ConsoleStatusApplyConfiguration constructs a declarative configuration of the ConsoleStatus type for use with -// apply. -func ConsoleStatus() *ConsoleStatusApplyConfiguration { - return &ConsoleStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ConsoleStatusApplyConfiguration) WithObservedGeneration(value int64) *ConsoleStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ConsoleStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ConsoleStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ConsoleStatusApplyConfiguration) WithVersion(value string) *ConsoleStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ConsoleStatusApplyConfiguration) WithReadyReplicas(value int32) *ConsoleStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ConsoleStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ConsoleStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ConsoleStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ConsoleStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/containerloggingdestinationparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/containerloggingdestinationparameters.go deleted file mode 100644 index e4c67d0ec..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/containerloggingdestinationparameters.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ContainerLoggingDestinationParametersApplyConfiguration represents a declarative configuration of the ContainerLoggingDestinationParameters type for use -// with apply. -// -// ContainerLoggingDestinationParameters describes parameters for the Container -// logging destination type. -type ContainerLoggingDestinationParametersApplyConfiguration struct { - // maxLength is the maximum length of the log message. - // - // Valid values are integers in the range 480 to 8192, inclusive. - // - // When omitted, the default value is 1024. - MaxLength *int32 `json:"maxLength,omitempty"` -} - -// ContainerLoggingDestinationParametersApplyConfiguration constructs a declarative configuration of the ContainerLoggingDestinationParameters type for use with -// apply. -func ContainerLoggingDestinationParameters() *ContainerLoggingDestinationParametersApplyConfiguration { - return &ContainerLoggingDestinationParametersApplyConfiguration{} -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *ContainerLoggingDestinationParametersApplyConfiguration) WithMaxLength(value int32) *ContainerLoggingDestinationParametersApplyConfiguration { - b.MaxLength = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csidriverconfigspec.go deleted file mode 100644 index 4ff829f8a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csidriverconfigspec.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// CSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the CSIDriverConfigSpec type for use -// with apply. -// -// CSIDriverConfigSpec defines configuration spec that can be -// used to optionally configure a specific CSI Driver. -type CSIDriverConfigSpecApplyConfiguration struct { - // driverType indicates type of CSI driver for which the - // driverConfig is being applied to. - // Valid values are: AWS, Azure, GCP, IBMCloud, vSphere, SecretsStore and omitted. - // Consumers should treat unknown values as a NO-OP. - DriverType *operatorv1.CSIDriverType `json:"driverType,omitempty"` - // aws is used to configure the AWS CSI driver. - AWS *AWSCSIDriverConfigSpecApplyConfiguration `json:"aws,omitempty"` - // azure is used to configure the Azure CSI driver. - Azure *AzureCSIDriverConfigSpecApplyConfiguration `json:"azure,omitempty"` - // gcp is used to configure the GCP CSI driver. - GCP *GCPCSIDriverConfigSpecApplyConfiguration `json:"gcp,omitempty"` - // ibmcloud is used to configure the IBM Cloud CSI driver. - IBMCloud *IBMCloudCSIDriverConfigSpecApplyConfiguration `json:"ibmcloud,omitempty"` - // vSphere is used to configure the vsphere CSI driver. - VSphere *VSphereCSIDriverConfigSpecApplyConfiguration `json:"vSphere,omitempty"` - // secretsStore is used to configure the Secrets Store CSI driver. - SecretsStore *SecretsStoreCSIDriverConfigSpecApplyConfiguration `json:"secretsStore,omitempty"` -} - -// CSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the CSIDriverConfigSpec type for use with -// apply. -func CSIDriverConfigSpec() *CSIDriverConfigSpecApplyConfiguration { - return &CSIDriverConfigSpecApplyConfiguration{} -} - -// WithDriverType sets the DriverType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DriverType field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithDriverType(value operatorv1.CSIDriverType) *CSIDriverConfigSpecApplyConfiguration { - b.DriverType = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithAWS(value *AWSCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.AWS = value - return b -} - -// WithAzure sets the Azure field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Azure field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithAzure(value *AzureCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.Azure = value - return b -} - -// WithGCP sets the GCP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GCP field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithGCP(value *GCPCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.GCP = value - return b -} - -// WithIBMCloud sets the IBMCloud field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IBMCloud field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithIBMCloud(value *IBMCloudCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.IBMCloud = value - return b -} - -// WithVSphere sets the VSphere field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VSphere field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithVSphere(value *VSphereCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.VSphere = value - return b -} - -// WithSecretsStore sets the SecretsStore field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SecretsStore field is set to the value of the last call. -func (b *CSIDriverConfigSpecApplyConfiguration) WithSecretsStore(value *SecretsStoreCSIDriverConfigSpecApplyConfiguration) *CSIDriverConfigSpecApplyConfiguration { - b.SecretsStore = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go deleted file mode 100644 index 70eaaf92f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontroller.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CSISnapshotControllerApplyConfiguration represents a declarative configuration of the CSISnapshotController type for use -// with apply. -// -// CSISnapshotController provides a means to configure an operator to manage the CSI snapshots. `cluster` is the canonical name. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type CSISnapshotControllerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *CSISnapshotControllerSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *CSISnapshotControllerStatusApplyConfiguration `json:"status,omitempty"` -} - -// CSISnapshotController constructs a declarative configuration of the CSISnapshotController type for use with -// apply. -func CSISnapshotController(name string) *CSISnapshotControllerApplyConfiguration { - b := &CSISnapshotControllerApplyConfiguration{} - b.WithName(name) - b.WithKind("CSISnapshotController") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractCSISnapshotControllerFrom extracts the applied configuration owned by fieldManager from -// cSISnapshotController for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// cSISnapshotController must be a unmodified CSISnapshotController API object that was retrieved from the Kubernetes API. -// ExtractCSISnapshotControllerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCSISnapshotControllerFrom(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string, subresource string) (*CSISnapshotControllerApplyConfiguration, error) { - b := &CSISnapshotControllerApplyConfiguration{} - err := managedfields.ExtractInto(cSISnapshotController, internal.Parser().Type("com.github.openshift.api.operator.v1.CSISnapshotController"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(cSISnapshotController.Name) - - b.WithKind("CSISnapshotController") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractCSISnapshotController extracts the applied configuration owned by fieldManager from -// cSISnapshotController. If no managedFields are found in cSISnapshotController for fieldManager, a -// CSISnapshotControllerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// cSISnapshotController must be a unmodified CSISnapshotController API object that was retrieved from the Kubernetes API. -// ExtractCSISnapshotController provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractCSISnapshotController(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { - return ExtractCSISnapshotControllerFrom(cSISnapshotController, fieldManager, "") -} - -// ExtractCSISnapshotControllerStatus extracts the applied configuration owned by fieldManager from -// cSISnapshotController for the status subresource. -func ExtractCSISnapshotControllerStatus(cSISnapshotController *operatorv1.CSISnapshotController, fieldManager string) (*CSISnapshotControllerApplyConfiguration, error) { - return ExtractCSISnapshotControllerFrom(cSISnapshotController, fieldManager, "status") -} - -func (b CSISnapshotControllerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithKind(value string) *CSISnapshotControllerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithAPIVersion(value string) *CSISnapshotControllerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithName(value string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithGenerateName(value string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithNamespace(value string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithUID(value types.UID) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithResourceVersion(value string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithGeneration(value int64) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CSISnapshotControllerApplyConfiguration) WithLabels(entries map[string]string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CSISnapshotControllerApplyConfiguration) WithAnnotations(entries map[string]string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CSISnapshotControllerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CSISnapshotControllerApplyConfiguration) WithFinalizers(values ...string) *CSISnapshotControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CSISnapshotControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithSpec(value *CSISnapshotControllerSpecApplyConfiguration) *CSISnapshotControllerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CSISnapshotControllerApplyConfiguration) WithStatus(value *CSISnapshotControllerStatusApplyConfiguration) *CSISnapshotControllerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CSISnapshotControllerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CSISnapshotControllerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CSISnapshotControllerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CSISnapshotControllerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go deleted file mode 100644 index 5e405ab63..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerspec.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// CSISnapshotControllerSpecApplyConfiguration represents a declarative configuration of the CSISnapshotControllerSpec type for use -// with apply. -// -// CSISnapshotControllerSpec is the specification of the desired behavior of the CSISnapshotController operator. -type CSISnapshotControllerSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// CSISnapshotControllerSpecApplyConfiguration constructs a declarative configuration of the CSISnapshotControllerSpec type for use with -// apply. -func CSISnapshotControllerSpec() *CSISnapshotControllerSpecApplyConfiguration { - return &CSISnapshotControllerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *CSISnapshotControllerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *CSISnapshotControllerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *CSISnapshotControllerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *CSISnapshotControllerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *CSISnapshotControllerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *CSISnapshotControllerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go deleted file mode 100644 index 9aded433b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/csisnapshotcontrollerstatus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CSISnapshotControllerStatusApplyConfiguration represents a declarative configuration of the CSISnapshotControllerStatus type for use -// with apply. -// -// CSISnapshotControllerStatus defines the observed status of the CSISnapshotController operator. -type CSISnapshotControllerStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// CSISnapshotControllerStatusApplyConfiguration constructs a declarative configuration of the CSISnapshotControllerStatus type for use with -// apply. -func CSISnapshotControllerStatus() *CSISnapshotControllerStatusApplyConfiguration { - return &CSISnapshotControllerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithObservedGeneration(value int64) *CSISnapshotControllerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *CSISnapshotControllerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithVersion(value string) *CSISnapshotControllerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithReadyReplicas(value int32) *CSISnapshotControllerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *CSISnapshotControllerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *CSISnapshotControllerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *CSISnapshotControllerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/customsecretrotation.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/customsecretrotation.go deleted file mode 100644 index 189d31ad7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/customsecretrotation.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomSecretRotationApplyConfiguration represents a declarative configuration of the CustomSecretRotation type for use -// with apply. -// -// CustomSecretRotation holds configuration for custom secret rotation behavior. -type CustomSecretRotationApplyConfiguration struct { - // minimumRefreshAge is the minimum time in seconds between secret - // rotation attempts. Each time kubelet calls NodePublishVolume, the driver - // checks whether this interval has elapsed since the last successful provider - // call. If it has, the driver contacts the secret provider to fetch the latest - // secret values and updates the mounted volume. - // Setting this value below the kubelet syncFrequency (default: 1 minute) - // has no additional effect on the actual rotation cadence. - // Must be at least 1 second and no more than 31560000 seconds (~1 year). - // When omitted, this means no opinion and the platform is left to choose a - // reasonable default, which is subject to change over time. - MinimumRefreshAge *int32 `json:"minimumRefreshAge,omitempty"` -} - -// CustomSecretRotationApplyConfiguration constructs a declarative configuration of the CustomSecretRotation type for use with -// apply. -func CustomSecretRotation() *CustomSecretRotationApplyConfiguration { - return &CustomSecretRotationApplyConfiguration{} -} - -// WithMinimumRefreshAge sets the MinimumRefreshAge field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinimumRefreshAge field is set to the value of the last call. -func (b *CustomSecretRotationApplyConfiguration) WithMinimumRefreshAge(value int32) *CustomSecretRotationApplyConfiguration { - b.MinimumRefreshAge = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go deleted file mode 100644 index f1a25b5f5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/defaultnetworkdefinition.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// DefaultNetworkDefinitionApplyConfiguration represents a declarative configuration of the DefaultNetworkDefinition type for use -// with apply. -// -// DefaultNetworkDefinition represents a single network plugin's configuration. -// type must be specified, along with exactly one "Config" that matches the type. -type DefaultNetworkDefinitionApplyConfiguration struct { - // type is the type of network - // All NetworkTypes are supported except for NetworkTypeRaw - Type *operatorv1.NetworkType `json:"type,omitempty"` - // openshiftSDNConfig was previously used to configure the openshift-sdn plugin. - // DEPRECATED: OpenShift SDN is no longer supported. - OpenShiftSDNConfig *OpenShiftSDNConfigApplyConfiguration `json:"openshiftSDNConfig,omitempty"` - // ovnKubernetesConfig configures the ovn-kubernetes plugin. - OVNKubernetesConfig *OVNKubernetesConfigApplyConfiguration `json:"ovnKubernetesConfig,omitempty"` -} - -// DefaultNetworkDefinitionApplyConfiguration constructs a declarative configuration of the DefaultNetworkDefinition type for use with -// apply. -func DefaultNetworkDefinition() *DefaultNetworkDefinitionApplyConfiguration { - return &DefaultNetworkDefinitionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *DefaultNetworkDefinitionApplyConfiguration) WithType(value operatorv1.NetworkType) *DefaultNetworkDefinitionApplyConfiguration { - b.Type = &value - return b -} - -// WithOpenShiftSDNConfig sets the OpenShiftSDNConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenShiftSDNConfig field is set to the value of the last call. -func (b *DefaultNetworkDefinitionApplyConfiguration) WithOpenShiftSDNConfig(value *OpenShiftSDNConfigApplyConfiguration) *DefaultNetworkDefinitionApplyConfiguration { - b.OpenShiftSDNConfig = value - return b -} - -// WithOVNKubernetesConfig sets the OVNKubernetesConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OVNKubernetesConfig field is set to the value of the last call. -func (b *DefaultNetworkDefinitionApplyConfiguration) WithOVNKubernetesConfig(value *OVNKubernetesConfigApplyConfiguration) *DefaultNetworkDefinitionApplyConfiguration { - b.OVNKubernetesConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go deleted file mode 100644 index 5618211cd..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategory.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DeveloperConsoleCatalogCategoryApplyConfiguration represents a declarative configuration of the DeveloperConsoleCatalogCategory type for use -// with apply. -// -// DeveloperConsoleCatalogCategory for the developer console catalog. -type DeveloperConsoleCatalogCategoryApplyConfiguration struct { - // defines top level category ID, label and filter tags. - DeveloperConsoleCatalogCategoryMetaApplyConfiguration `json:",inline"` - // subcategories defines a list of child categories. - Subcategories []DeveloperConsoleCatalogCategoryMetaApplyConfiguration `json:"subcategories,omitempty"` -} - -// DeveloperConsoleCatalogCategoryApplyConfiguration constructs a declarative configuration of the DeveloperConsoleCatalogCategory type for use with -// apply. -func DeveloperConsoleCatalogCategory() *DeveloperConsoleCatalogCategoryApplyConfiguration { - return &DeveloperConsoleCatalogCategoryApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithID(value string) *DeveloperConsoleCatalogCategoryApplyConfiguration { - b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.ID = &value - return b -} - -// WithLabel sets the Label field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Label field is set to the value of the last call. -func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithLabel(value string) *DeveloperConsoleCatalogCategoryApplyConfiguration { - b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Label = &value - return b -} - -// WithTags adds the given value to the Tags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tags field. -func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithTags(values ...string) *DeveloperConsoleCatalogCategoryApplyConfiguration { - for i := range values { - b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Tags = append(b.DeveloperConsoleCatalogCategoryMetaApplyConfiguration.Tags, values[i]) - } - return b -} - -// WithSubcategories adds the given value to the Subcategories field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Subcategories field. -func (b *DeveloperConsoleCatalogCategoryApplyConfiguration) WithSubcategories(values ...*DeveloperConsoleCatalogCategoryMetaApplyConfiguration) *DeveloperConsoleCatalogCategoryApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSubcategories") - } - b.Subcategories = append(b.Subcategories, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategorymeta.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategorymeta.go deleted file mode 100644 index acbeb8c4d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcategorymeta.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DeveloperConsoleCatalogCategoryMetaApplyConfiguration represents a declarative configuration of the DeveloperConsoleCatalogCategoryMeta type for use -// with apply. -// -// DeveloperConsoleCatalogCategoryMeta are the key identifiers of a developer catalog category. -type DeveloperConsoleCatalogCategoryMetaApplyConfiguration struct { - // id is an identifier used in the URL to enable deep linking in console. - // ID is required and must have 1-32 URL safe (A-Z, a-z, 0-9, - and _) characters. - ID *string `json:"id,omitempty"` - // label defines a category display label. It is required and must have 1-64 characters. - Label *string `json:"label,omitempty"` - // tags is a list of strings that will match the category. A selected category - // show all items which has at least one overlapping tag between category and item. - Tags []string `json:"tags,omitempty"` -} - -// DeveloperConsoleCatalogCategoryMetaApplyConfiguration constructs a declarative configuration of the DeveloperConsoleCatalogCategoryMeta type for use with -// apply. -func DeveloperConsoleCatalogCategoryMeta() *DeveloperConsoleCatalogCategoryMetaApplyConfiguration { - return &DeveloperConsoleCatalogCategoryMetaApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *DeveloperConsoleCatalogCategoryMetaApplyConfiguration) WithID(value string) *DeveloperConsoleCatalogCategoryMetaApplyConfiguration { - b.ID = &value - return b -} - -// WithLabel sets the Label field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Label field is set to the value of the last call. -func (b *DeveloperConsoleCatalogCategoryMetaApplyConfiguration) WithLabel(value string) *DeveloperConsoleCatalogCategoryMetaApplyConfiguration { - b.Label = &value - return b -} - -// WithTags adds the given value to the Tags field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tags field. -func (b *DeveloperConsoleCatalogCategoryMetaApplyConfiguration) WithTags(values ...string) *DeveloperConsoleCatalogCategoryMetaApplyConfiguration { - for i := range values { - b.Tags = append(b.Tags, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcustomization.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcustomization.go deleted file mode 100644 index 08640b31c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogcustomization.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DeveloperConsoleCatalogCustomizationApplyConfiguration represents a declarative configuration of the DeveloperConsoleCatalogCustomization type for use -// with apply. -// -// DeveloperConsoleCatalogCustomization allow cluster admin to configure developer catalog. -type DeveloperConsoleCatalogCustomizationApplyConfiguration struct { - // categories which are shown in the developer catalog. - Categories []DeveloperConsoleCatalogCategoryApplyConfiguration `json:"categories,omitempty"` - // types allows enabling or disabling of sub-catalog types that user can see in the Developer catalog. - // When omitted, all the sub-catalog types will be shown. - Types *DeveloperConsoleCatalogTypesApplyConfiguration `json:"types,omitempty"` -} - -// DeveloperConsoleCatalogCustomizationApplyConfiguration constructs a declarative configuration of the DeveloperConsoleCatalogCustomization type for use with -// apply. -func DeveloperConsoleCatalogCustomization() *DeveloperConsoleCatalogCustomizationApplyConfiguration { - return &DeveloperConsoleCatalogCustomizationApplyConfiguration{} -} - -// WithCategories adds the given value to the Categories field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Categories field. -func (b *DeveloperConsoleCatalogCustomizationApplyConfiguration) WithCategories(values ...*DeveloperConsoleCatalogCategoryApplyConfiguration) *DeveloperConsoleCatalogCustomizationApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithCategories") - } - b.Categories = append(b.Categories, *values[i]) - } - return b -} - -// WithTypes sets the Types field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Types field is set to the value of the last call. -func (b *DeveloperConsoleCatalogCustomizationApplyConfiguration) WithTypes(value *DeveloperConsoleCatalogTypesApplyConfiguration) *DeveloperConsoleCatalogCustomizationApplyConfiguration { - b.Types = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go deleted file mode 100644 index 0ffadb21a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/developerconsolecatalogtypes.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// DeveloperConsoleCatalogTypesApplyConfiguration represents a declarative configuration of the DeveloperConsoleCatalogTypes type for use -// with apply. -// -// DeveloperConsoleCatalogTypes defines the state of the sub-catalog types. -type DeveloperConsoleCatalogTypesApplyConfiguration struct { - // state defines if a list of catalog types should be enabled or disabled. - State *operatorv1.CatalogTypesState `json:"state,omitempty"` - // enabled is a list of developer catalog types (sub-catalogs IDs) that will be shown to users. - // Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available - // in the console on the cluster configuration page, or when editing the YAML in the console. - // Example: "Devfile", "HelmChart", "BuilderImage" - // If the list is non-empty, a new type will not be shown to the user until it is added to list. - // If the list is empty the complete developer catalog will be shown. - Enabled *[]string `json:"enabled,omitempty"` - // disabled is a list of developer catalog types (sub-catalogs IDs) that are not shown to users. - // Types (sub-catalogs) are added via console plugins, the available types (sub-catalog IDs) are available - // in the console on the cluster configuration page, or when editing the YAML in the console. - // Example: "Devfile", "HelmChart", "BuilderImage" - // If the list is empty or all the available sub-catalog types are added, then the complete developer catalog should be hidden. - Disabled *[]string `json:"disabled,omitempty"` -} - -// DeveloperConsoleCatalogTypesApplyConfiguration constructs a declarative configuration of the DeveloperConsoleCatalogTypes type for use with -// apply. -func DeveloperConsoleCatalogTypes() *DeveloperConsoleCatalogTypesApplyConfiguration { - return &DeveloperConsoleCatalogTypesApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *DeveloperConsoleCatalogTypesApplyConfiguration) WithState(value operatorv1.CatalogTypesState) *DeveloperConsoleCatalogTypesApplyConfiguration { - b.State = &value - return b -} - -// WithEnabled sets the Enabled field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Enabled field is set to the value of the last call. -func (b *DeveloperConsoleCatalogTypesApplyConfiguration) WithEnabled(value []string) *DeveloperConsoleCatalogTypesApplyConfiguration { - b.Enabled = &value - return b -} - -// WithDisabled sets the Disabled field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Disabled field is set to the value of the last call. -func (b *DeveloperConsoleCatalogTypesApplyConfiguration) WithDisabled(value []string) *DeveloperConsoleCatalogTypesApplyConfiguration { - b.Disabled = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dns.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dns.go deleted file mode 100644 index 3fc3bfda0..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dns.go +++ /dev/null @@ -1,283 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// DNSApplyConfiguration represents a declarative configuration of the DNS type for use -// with apply. -// -// DNS manages the CoreDNS component to provide a name resolution service -// for pods and services in the cluster. -// -// This supports the DNS-based service discovery specification: -// https://github.com/kubernetes/dns/blob/master/docs/specification.md -// -// More details: https://kubernetes.io/docs/tasks/administer-cluster/coredns -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type DNSApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the DNS. - Spec *DNSSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the DNS. - Status *DNSStatusApplyConfiguration `json:"status,omitempty"` -} - -// DNS constructs a declarative configuration of the DNS type for use with -// apply. -func DNS(name string) *DNSApplyConfiguration { - b := &DNSApplyConfiguration{} - b.WithName(name) - b.WithKind("DNS") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractDNSFrom extracts the applied configuration owned by fieldManager from -// dNS for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// dNS must be a unmodified DNS API object that was retrieved from the Kubernetes API. -// ExtractDNSFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractDNSFrom(dNS *operatorv1.DNS, fieldManager string, subresource string) (*DNSApplyConfiguration, error) { - b := &DNSApplyConfiguration{} - err := managedfields.ExtractInto(dNS, internal.Parser().Type("com.github.openshift.api.operator.v1.DNS"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(dNS.Name) - - b.WithKind("DNS") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractDNS extracts the applied configuration owned by fieldManager from -// dNS. If no managedFields are found in dNS for fieldManager, a -// DNSApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// dNS must be a unmodified DNS API object that was retrieved from the Kubernetes API. -// ExtractDNS provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractDNS(dNS *operatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { - return ExtractDNSFrom(dNS, fieldManager, "") -} - -// ExtractDNSStatus extracts the applied configuration owned by fieldManager from -// dNS for the status subresource. -func ExtractDNSStatus(dNS *operatorv1.DNS, fieldManager string) (*DNSApplyConfiguration, error) { - return ExtractDNSFrom(dNS, fieldManager, "status") -} - -func (b DNSApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithKind(value string) *DNSApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithAPIVersion(value string) *DNSApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithName(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithGenerateName(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithNamespace(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithUID(value types.UID) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithResourceVersion(value string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithGeneration(value int64) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *DNSApplyConfiguration) WithLabels(entries map[string]string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *DNSApplyConfiguration) WithAnnotations(entries map[string]string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *DNSApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *DNSApplyConfiguration) WithFinalizers(values ...string) *DNSApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *DNSApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithSpec(value *DNSSpecApplyConfiguration) *DNSApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *DNSApplyConfiguration) WithStatus(value *DNSStatusApplyConfiguration) *DNSApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *DNSApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *DNSApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *DNSApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *DNSApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnscache.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnscache.go deleted file mode 100644 index 5e6b84c34..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnscache.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// DNSCacheApplyConfiguration represents a declarative configuration of the DNSCache type for use -// with apply. -// -// DNSCache defines the fields for configuring DNS caching. -type DNSCacheApplyConfiguration struct { - // positiveTTL is optional and specifies the amount of time that a positive response should be cached. - // - // If configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This - // field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, - // e.g. "100s", "1m30s", "12h30m10s". Values that are fractions of a second are rounded down to the nearest second. - // If the configured value is less than 1s, the default value will be used. - // If not configured, the value will be 0s and OpenShift will use a default value of 900 seconds unless noted - // otherwise in the respective Corefile for your version of OpenShift. The default value of 900 seconds is subject - // to change. - PositiveTTL *metav1.Duration `json:"positiveTTL,omitempty"` - // negativeTTL is optional and specifies the amount of time that a negative response should be cached. - // - // If configured, it must be a value of 1s (1 second) or greater up to a theoretical maximum of several years. This - // field expects an unsigned duration string of decimal numbers, each with optional fraction and a unit suffix, - // e.g. "100s", "1m30s", "12h30m10s". Values that are fractions of a second are rounded down to the nearest second. - // If the configured value is less than 1s, the default value will be used. - // If not configured, the value will be 0s and OpenShift will use a default value of 30 seconds unless noted - // otherwise in the respective Corefile for your version of OpenShift. The default value of 30 seconds is subject - // to change. - NegativeTTL *metav1.Duration `json:"negativeTTL,omitempty"` -} - -// DNSCacheApplyConfiguration constructs a declarative configuration of the DNSCache type for use with -// apply. -func DNSCache() *DNSCacheApplyConfiguration { - return &DNSCacheApplyConfiguration{} -} - -// WithPositiveTTL sets the PositiveTTL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PositiveTTL field is set to the value of the last call. -func (b *DNSCacheApplyConfiguration) WithPositiveTTL(value metav1.Duration) *DNSCacheApplyConfiguration { - b.PositiveTTL = &value - return b -} - -// WithNegativeTTL sets the NegativeTTL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NegativeTTL field is set to the value of the last call. -func (b *DNSCacheApplyConfiguration) WithNegativeTTL(value metav1.Duration) *DNSCacheApplyConfiguration { - b.NegativeTTL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsnodeplacement.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsnodeplacement.go deleted file mode 100644 index be6610aec..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsnodeplacement.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" -) - -// DNSNodePlacementApplyConfiguration represents a declarative configuration of the DNSNodePlacement type for use -// with apply. -// -// DNSNodePlacement describes the node scheduling configuration for DNS pods. -type DNSNodePlacementApplyConfiguration struct { - // nodeSelector is the node selector applied to DNS pods. - // - // If empty, the default is used, which is currently the following: - // - // kubernetes.io/os: linux - // - // This default is subject to change. - // - // If set, the specified selector is used and replaces the default. - NodeSelector map[string]string `json:"nodeSelector,omitempty"` - // tolerations is a list of tolerations applied to DNS pods. - // - // If empty, the DNS operator sets a toleration for the - // "node-role.kubernetes.io/master" taint. This default is subject to - // change. Specifying tolerations without including a toleration for - // the "node-role.kubernetes.io/master" taint may be risky as it could - // lead to an outage if all worker nodes become unavailable. - // - // Note that the daemon controller adds some tolerations as well. See - // https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/ - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// DNSNodePlacementApplyConfiguration constructs a declarative configuration of the DNSNodePlacement type for use with -// apply. -func DNSNodePlacement() *DNSNodePlacementApplyConfiguration { - return &DNSNodePlacementApplyConfiguration{} -} - -// WithNodeSelector puts the entries into the NodeSelector field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the NodeSelector field, -// overwriting an existing map entries in NodeSelector field with the same key. -func (b *DNSNodePlacementApplyConfiguration) WithNodeSelector(entries map[string]string) *DNSNodePlacementApplyConfiguration { - if b.NodeSelector == nil && len(entries) > 0 { - b.NodeSelector = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.NodeSelector[k] = v - } - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *DNSNodePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *DNSNodePlacementApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go deleted file mode 100644 index 14d0d90dd..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsovertlsconfig.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// DNSOverTLSConfigApplyConfiguration represents a declarative configuration of the DNSOverTLSConfig type for use -// with apply. -// -// DNSOverTLSConfig describes optional DNSTransportConfig fields that should be captured. -type DNSOverTLSConfigApplyConfiguration struct { - // serverName is the upstream server to connect to when forwarding DNS queries. This is required when Transport is - // set to "TLS". ServerName will be validated against the DNS naming conventions in RFC 1123 and should match the - // TLS certificate installed in the upstream resolver(s). - ServerName *string `json:"serverName,omitempty"` - // caBundle references a ConfigMap that must contain either a single - // CA Certificate or a CA Bundle. This allows cluster administrators to provide their - // own CA or CA bundle for validating the certificate of upstream resolvers. - // - // 1. The configmap must contain a `ca-bundle.crt` key. - // 2. The value must be a PEM encoded CA certificate or CA bundle. - // 3. The administrator must create this configmap in the openshift-config namespace. - // 4. The upstream server certificate must contain a Subject Alternative Name (SAN) that matches ServerName. - CABundle *configv1.ConfigMapNameReference `json:"caBundle,omitempty"` -} - -// DNSOverTLSConfigApplyConfiguration constructs a declarative configuration of the DNSOverTLSConfig type for use with -// apply. -func DNSOverTLSConfig() *DNSOverTLSConfigApplyConfiguration { - return &DNSOverTLSConfigApplyConfiguration{} -} - -// WithServerName sets the ServerName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServerName field is set to the value of the last call. -func (b *DNSOverTLSConfigApplyConfiguration) WithServerName(value string) *DNSOverTLSConfigApplyConfiguration { - b.ServerName = &value - return b -} - -// WithCABundle sets the CABundle field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CABundle field is set to the value of the last call. -func (b *DNSOverTLSConfigApplyConfiguration) WithCABundle(value configv1.ConfigMapNameReference) *DNSOverTLSConfigApplyConfiguration { - b.CABundle = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsspec.go deleted file mode 100644 index 6d49b33b8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsspec.go +++ /dev/null @@ -1,138 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// DNSSpecApplyConfiguration represents a declarative configuration of the DNSSpec type for use -// with apply. -// -// DNSSpec is the specification of the desired behavior of the DNS. -type DNSSpecApplyConfiguration struct { - // servers is a list of DNS resolvers that provide name query delegation for one or - // more subdomains outside the scope of the cluster domain. If servers consists of - // more than one Server, longest suffix match will be used to determine the Server. - // - // For example, if there are two Servers, one for "foo.com" and another for "a.foo.com", - // and the name query is for "www.a.foo.com", it will be routed to the Server with Zone - // "a.foo.com". - // - // If this field is nil, no servers are created. - Servers []ServerApplyConfiguration `json:"servers,omitempty"` - // upstreamResolvers defines a schema for configuring CoreDNS - // to proxy DNS messages to upstream resolvers for the case of the - // default (".") server - // - // If this field is not specified, the upstream used will default to - // /etc/resolv.conf, with policy "sequential" - UpstreamResolvers *UpstreamResolversApplyConfiguration `json:"upstreamResolvers,omitempty"` - // nodePlacement provides explicit control over the scheduling of DNS - // pods. - // - // Generally, it is useful to run a DNS pod on every node so that DNS - // queries are always handled by a local DNS pod instead of going over - // the network to a DNS pod on another node. However, security policies - // may require restricting the placement of DNS pods to specific nodes. - // For example, if a security policy prohibits pods on arbitrary nodes - // from communicating with the API, a node selector can be specified to - // restrict DNS pods to nodes that are permitted to communicate with the - // API. Conversely, if running DNS pods on nodes with a particular - // taint is desired, a toleration can be specified for that taint. - // - // If unset, defaults are used. See nodePlacement for more details. - NodePlacement *DNSNodePlacementApplyConfiguration `json:"nodePlacement,omitempty"` - // managementState indicates whether the DNS operator should manage cluster - // DNS - ManagementState *operatorv1.ManagementState `json:"managementState,omitempty"` - // operatorLogLevel controls the logging level of the DNS Operator. - // Valid values are: "Normal", "Debug", "Trace". - // Defaults to "Normal". - // setting operatorLogLevel: Trace will produce extremely verbose logs. - OperatorLogLevel *operatorv1.DNSLogLevel `json:"operatorLogLevel,omitempty"` - // logLevel describes the desired logging verbosity for CoreDNS. - // Any one of the following values may be specified: - // * Normal logs errors from upstream resolvers. - // * Debug logs errors, NXDOMAIN responses, and NODATA responses. - // * Trace logs errors and all responses. - // Setting logLevel: Trace will produce extremely verbose logs. - // Valid values are: "Normal", "Debug", "Trace". - // Defaults to "Normal". - LogLevel *operatorv1.DNSLogLevel `json:"logLevel,omitempty"` - // cache describes the caching configuration that applies to all server blocks listed in the Corefile. - // This field allows a cluster admin to optionally configure: - // * positiveTTL which is a duration for which positive responses should be cached. - // * negativeTTL which is a duration for which negative responses should be cached. - // If this is not configured, OpenShift will configure positive and negative caching with a default value that is - // subject to change. At the time of writing, the default positiveTTL is 900 seconds and the default negativeTTL is - // 30 seconds or as noted in the respective Corefile for your version of OpenShift. - Cache *DNSCacheApplyConfiguration `json:"cache,omitempty"` -} - -// DNSSpecApplyConfiguration constructs a declarative configuration of the DNSSpec type for use with -// apply. -func DNSSpec() *DNSSpecApplyConfiguration { - return &DNSSpecApplyConfiguration{} -} - -// WithServers adds the given value to the Servers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Servers field. -func (b *DNSSpecApplyConfiguration) WithServers(values ...*ServerApplyConfiguration) *DNSSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServers") - } - b.Servers = append(b.Servers, *values[i]) - } - return b -} - -// WithUpstreamResolvers sets the UpstreamResolvers field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UpstreamResolvers field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithUpstreamResolvers(value *UpstreamResolversApplyConfiguration) *DNSSpecApplyConfiguration { - b.UpstreamResolvers = value - return b -} - -// WithNodePlacement sets the NodePlacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodePlacement field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithNodePlacement(value *DNSNodePlacementApplyConfiguration) *DNSSpecApplyConfiguration { - b.NodePlacement = value - return b -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *DNSSpecApplyConfiguration { - b.ManagementState = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.DNSLogLevel) *DNSSpecApplyConfiguration { - b.OperatorLogLevel = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithLogLevel(value operatorv1.DNSLogLevel) *DNSSpecApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithCache sets the Cache field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Cache field is set to the value of the last call. -func (b *DNSSpecApplyConfiguration) WithCache(value *DNSCacheApplyConfiguration) *DNSSpecApplyConfiguration { - b.Cache = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsstatus.go deleted file mode 100644 index 9c99d96b6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnsstatus.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// DNSStatusApplyConfiguration represents a declarative configuration of the DNSStatus type for use -// with apply. -// -// DNSStatus defines the observed status of the DNS. -type DNSStatusApplyConfiguration struct { - // clusterIP is the service IP through which this DNS is made available. - // - // In the case of the default DNS, this will be a well known IP that is used - // as the default nameserver for pods that are using the default ClusterFirst DNS policy. - // - // In general, this IP can be specified in a pod's spec.dnsConfig.nameservers list - // or used explicitly when performing name resolution from within the cluster. - // Example: dig foo.com @ - // - // More info: https://kubernetes.io/docs/concepts/services-networking/service/#virtual-ips-and-service-proxies - ClusterIP *string `json:"clusterIP,omitempty"` - // clusterDomain is the local cluster DNS domain suffix for DNS services. - // This will be a subdomain as defined in RFC 1034, - // section 3.5: https://tools.ietf.org/html/rfc1034#section-3.5 - // Example: "cluster.local" - // - // More info: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service - ClusterDomain *string `json:"clusterDomain,omitempty"` - // conditions provide information about the state of the DNS on the cluster. - // - // These are the supported DNS conditions: - // - // * Available - // - True if the following conditions are met: - // * DNS controller daemonset is available. - // - False if any of those conditions are unsatisfied. - Conditions []OperatorConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// DNSStatusApplyConfiguration constructs a declarative configuration of the DNSStatus type for use with -// apply. -func DNSStatus() *DNSStatusApplyConfiguration { - return &DNSStatusApplyConfiguration{} -} - -// WithClusterIP sets the ClusterIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterIP field is set to the value of the last call. -func (b *DNSStatusApplyConfiguration) WithClusterIP(value string) *DNSStatusApplyConfiguration { - b.ClusterIP = &value - return b -} - -// WithClusterDomain sets the ClusterDomain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterDomain field is set to the value of the last call. -func (b *DNSStatusApplyConfiguration) WithClusterDomain(value string) *DNSStatusApplyConfiguration { - b.ClusterDomain = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *DNSStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *DNSStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnstransportconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnstransportconfig.go deleted file mode 100644 index 12bf7e7b2..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/dnstransportconfig.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// DNSTransportConfigApplyConfiguration represents a declarative configuration of the DNSTransportConfig type for use -// with apply. -// -// DNSTransportConfig groups related configuration parameters used for configuring -// forwarding to upstream resolvers that support DNS-over-TLS. -type DNSTransportConfigApplyConfiguration struct { - // transport allows cluster administrators to opt-in to using a DNS-over-TLS - // connection between cluster DNS and an upstream resolver(s). Configuring - // TLS as the transport at this level without configuring a CABundle will - // result in the system certificates being used to verify the serving - // certificate of the upstream resolver(s). - // - // Possible values: - // "" (empty) - This means no explicit choice has been made and the platform chooses the default which is subject - // to change over time. The current default is "Cleartext". - // "Cleartext" - Cluster admin specified cleartext option. This results in the same functionality - // as an empty value but may be useful when a cluster admin wants to be more explicit about the transport, - // or wants to switch from "TLS" to "Cleartext" explicitly. - // "TLS" - This indicates that DNS queries should be sent over a TLS connection. If Transport is set to TLS, - // you MUST also set ServerName. If a port is not included with the upstream IP, port 853 will be tried by default - // per RFC 7858 section 3.1; https://datatracker.ietf.org/doc/html/rfc7858#section-3.1. - Transport *operatorv1.DNSTransport `json:"transport,omitempty"` - // tls contains the additional configuration options to use when Transport is set to "TLS". - TLS *DNSOverTLSConfigApplyConfiguration `json:"tls,omitempty"` -} - -// DNSTransportConfigApplyConfiguration constructs a declarative configuration of the DNSTransportConfig type for use with -// apply. -func DNSTransportConfig() *DNSTransportConfigApplyConfiguration { - return &DNSTransportConfigApplyConfiguration{} -} - -// WithTransport sets the Transport field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Transport field is set to the value of the last call. -func (b *DNSTransportConfigApplyConfiguration) WithTransport(value operatorv1.DNSTransport) *DNSTransportConfigApplyConfiguration { - b.Transport = &value - return b -} - -// WithTLS sets the TLS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLS field is set to the value of the last call. -func (b *DNSTransportConfigApplyConfiguration) WithTLS(value *DNSOverTLSConfigApplyConfiguration) *DNSTransportConfigApplyConfiguration { - b.TLS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/egressipconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/egressipconfig.go deleted file mode 100644 index 7807e5252..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/egressipconfig.go +++ /dev/null @@ -1,32 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// EgressIPConfigApplyConfiguration represents a declarative configuration of the EgressIPConfig type for use -// with apply. -// -// EgressIPConfig defines the configuration knobs for egressip -type EgressIPConfigApplyConfiguration struct { - // reachabilityTotalTimeout configures the EgressIP node reachability check total timeout in seconds. - // If the EgressIP node cannot be reached within this timeout, the node is declared down. - // Setting a large value may cause the EgressIP feature to react slowly to node changes. - // In particular, it may react slowly for EgressIP nodes that really have a genuine problem and are unreachable. - // When omitted, this means the user has no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default is 1 second. - // A value of 0 disables the EgressIP node's reachability check. - ReachabilityTotalTimeoutSeconds *uint32 `json:"reachabilityTotalTimeoutSeconds,omitempty"` -} - -// EgressIPConfigApplyConfiguration constructs a declarative configuration of the EgressIPConfig type for use with -// apply. -func EgressIPConfig() *EgressIPConfigApplyConfiguration { - return &EgressIPConfigApplyConfiguration{} -} - -// WithReachabilityTotalTimeoutSeconds sets the ReachabilityTotalTimeoutSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReachabilityTotalTimeoutSeconds field is set to the value of the last call. -func (b *EgressIPConfigApplyConfiguration) WithReachabilityTotalTimeoutSeconds(value uint32) *EgressIPConfigApplyConfiguration { - b.ReachabilityTotalTimeoutSeconds = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go deleted file mode 100644 index c12f5483b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/endpointpublishingstrategy.go +++ /dev/null @@ -1,121 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// EndpointPublishingStrategyApplyConfiguration represents a declarative configuration of the EndpointPublishingStrategy type for use -// with apply. -// -// EndpointPublishingStrategy is a way to publish the endpoints of an -// IngressController, and represents the type and any additional configuration -// for a specific type. -type EndpointPublishingStrategyApplyConfiguration struct { - // type is the publishing strategy to use. Valid values are: - // - // * LoadBalancerService - // - // Publishes the ingress controller using a Kubernetes LoadBalancer Service. - // - // In this configuration, the ingress controller deployment uses container - // networking. A LoadBalancer Service is created to publish the deployment. - // - // See: https://kubernetes.io/docs/concepts/services-networking/service/#loadbalancer - // - // If domain is set, a wildcard DNS record will be managed to point at the - // LoadBalancer Service's external name. DNS records are managed only in DNS - // zones defined by dns.config.openshift.io/cluster .spec.publicZone and - // .spec.privateZone. - // - // Wildcard DNS management is currently supported only on the AWS, Azure, - // and GCP platforms. - // - // * HostNetwork - // - // Publishes the ingress controller on node ports where the ingress controller - // is deployed. - // - // In this configuration, the ingress controller deployment uses host - // networking, bound to node ports 80 and 443. The user is responsible for - // configuring an external load balancer to publish the ingress controller via - // the node ports. - // - // * Private - // - // Does not publish the ingress controller. - // - // In this configuration, the ingress controller deployment uses container - // networking, and is not explicitly published. The user must manually publish - // the ingress controller. - // - // * NodePortService - // - // Publishes the ingress controller using a Kubernetes NodePort Service. - // - // In this configuration, the ingress controller deployment uses container - // networking. A NodePort Service is created to publish the deployment. The - // specific node ports are dynamically allocated by OpenShift; however, to - // support static port allocations, user changes to the node port - // field of the managed NodePort Service will preserved. - Type *operatorv1.EndpointPublishingStrategyType `json:"type,omitempty"` - // loadBalancer holds parameters for the load balancer. Present only if - // type is LoadBalancerService. - LoadBalancer *LoadBalancerStrategyApplyConfiguration `json:"loadBalancer,omitempty"` - // hostNetwork holds parameters for the HostNetwork endpoint publishing - // strategy. Present only if type is HostNetwork. - HostNetwork *HostNetworkStrategyApplyConfiguration `json:"hostNetwork,omitempty"` - // private holds parameters for the Private endpoint publishing - // strategy. Present only if type is Private. - Private *PrivateStrategyApplyConfiguration `json:"private,omitempty"` - // nodePort holds parameters for the NodePortService endpoint publishing strategy. - // Present only if type is NodePortService. - NodePort *NodePortStrategyApplyConfiguration `json:"nodePort,omitempty"` -} - -// EndpointPublishingStrategyApplyConfiguration constructs a declarative configuration of the EndpointPublishingStrategy type for use with -// apply. -func EndpointPublishingStrategy() *EndpointPublishingStrategyApplyConfiguration { - return &EndpointPublishingStrategyApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithType(value operatorv1.EndpointPublishingStrategyType) *EndpointPublishingStrategyApplyConfiguration { - b.Type = &value - return b -} - -// WithLoadBalancer sets the LoadBalancer field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LoadBalancer field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithLoadBalancer(value *LoadBalancerStrategyApplyConfiguration) *EndpointPublishingStrategyApplyConfiguration { - b.LoadBalancer = value - return b -} - -// WithHostNetwork sets the HostNetwork field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HostNetwork field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithHostNetwork(value *HostNetworkStrategyApplyConfiguration) *EndpointPublishingStrategyApplyConfiguration { - b.HostNetwork = value - return b -} - -// WithPrivate sets the Private field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Private field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithPrivate(value *PrivateStrategyApplyConfiguration) *EndpointPublishingStrategyApplyConfiguration { - b.Private = value - return b -} - -// WithNodePort sets the NodePort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodePort field is set to the value of the last call. -func (b *EndpointPublishingStrategyApplyConfiguration) WithNodePort(value *NodePortStrategyApplyConfiguration) *EndpointPublishingStrategyApplyConfiguration { - b.NodePort = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcd.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcd.go deleted file mode 100644 index cafb86ed8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcd.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// EtcdApplyConfiguration represents a declarative configuration of the Etcd type for use -// with apply. -// -// Etcd provides information to configure an operator to manage etcd. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type EtcdApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *EtcdSpecApplyConfiguration `json:"spec,omitempty"` - Status *EtcdStatusApplyConfiguration `json:"status,omitempty"` -} - -// Etcd constructs a declarative configuration of the Etcd type for use with -// apply. -func Etcd(name string) *EtcdApplyConfiguration { - b := &EtcdApplyConfiguration{} - b.WithName(name) - b.WithKind("Etcd") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractEtcdFrom extracts the applied configuration owned by fieldManager from -// etcd for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// etcd must be a unmodified Etcd API object that was retrieved from the Kubernetes API. -// ExtractEtcdFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractEtcdFrom(etcd *operatorv1.Etcd, fieldManager string, subresource string) (*EtcdApplyConfiguration, error) { - b := &EtcdApplyConfiguration{} - err := managedfields.ExtractInto(etcd, internal.Parser().Type("com.github.openshift.api.operator.v1.Etcd"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(etcd.Name) - - b.WithKind("Etcd") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractEtcd extracts the applied configuration owned by fieldManager from -// etcd. If no managedFields are found in etcd for fieldManager, a -// EtcdApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// etcd must be a unmodified Etcd API object that was retrieved from the Kubernetes API. -// ExtractEtcd provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractEtcd(etcd *operatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { - return ExtractEtcdFrom(etcd, fieldManager, "") -} - -// ExtractEtcdStatus extracts the applied configuration owned by fieldManager from -// etcd for the status subresource. -func ExtractEtcdStatus(etcd *operatorv1.Etcd, fieldManager string) (*EtcdApplyConfiguration, error) { - return ExtractEtcdFrom(etcd, fieldManager, "status") -} - -func (b EtcdApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithKind(value string) *EtcdApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithAPIVersion(value string) *EtcdApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithName(value string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithGenerateName(value string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithNamespace(value string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithUID(value types.UID) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithResourceVersion(value string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithGeneration(value int64) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *EtcdApplyConfiguration) WithLabels(entries map[string]string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *EtcdApplyConfiguration) WithAnnotations(entries map[string]string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *EtcdApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *EtcdApplyConfiguration) WithFinalizers(values ...string) *EtcdApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *EtcdApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithSpec(value *EtcdSpecApplyConfiguration) *EtcdApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *EtcdApplyConfiguration) WithStatus(value *EtcdStatusApplyConfiguration) *EtcdApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *EtcdApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *EtcdApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *EtcdApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *EtcdApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdspec.go deleted file mode 100644 index 5b685313a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdspec.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// EtcdSpecApplyConfiguration represents a declarative configuration of the EtcdSpec type for use -// with apply. -type EtcdSpecApplyConfiguration struct { - StaticPodOperatorSpecApplyConfiguration `json:",inline"` - // HardwareSpeed allows user to change the etcd tuning profile which configures - // the latency parameters for heartbeat interval and leader election timeouts - // allowing the cluster to tolerate longer round-trip-times between etcd members. - // Valid values are "", "Standard" and "Slower". - // "" means no opinion and the platform is left to choose a reasonable default - // which is subject to change without notice. - HardwareSpeed *operatorv1.ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed,omitempty"` - // backendQuotaGiB sets the etcd backend storage size limit in gibibytes. - // The value should be an integer not less than 8 and not more than 16. - // When not specified, the default value is 8. - BackendQuotaGiB *int32 `json:"backendQuotaGiB,omitempty"` -} - -// EtcdSpecApplyConfiguration constructs a declarative configuration of the EtcdSpec type for use with -// apply. -func EtcdSpec() *EtcdSpecApplyConfiguration { - return &EtcdSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *EtcdSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *EtcdSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *EtcdSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *EtcdSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *EtcdSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithForceRedeploymentReason(value string) *EtcdSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *EtcdSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *EtcdSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value - return b -} - -// WithHardwareSpeed sets the HardwareSpeed field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HardwareSpeed field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithHardwareSpeed(value operatorv1.ControlPlaneHardwareSpeed) *EtcdSpecApplyConfiguration { - b.HardwareSpeed = &value - return b -} - -// WithBackendQuotaGiB sets the BackendQuotaGiB field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BackendQuotaGiB field is set to the value of the last call. -func (b *EtcdSpecApplyConfiguration) WithBackendQuotaGiB(value int32) *EtcdSpecApplyConfiguration { - b.BackendQuotaGiB = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdstatus.go deleted file mode 100644 index a6fa6f07d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/etcdstatus.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// EtcdStatusApplyConfiguration represents a declarative configuration of the EtcdStatus type for use -// with apply. -type EtcdStatusApplyConfiguration struct { - StaticPodOperatorStatusApplyConfiguration `json:",inline"` - HardwareSpeed *operatorv1.ControlPlaneHardwareSpeed `json:"controlPlaneHardwareSpeed,omitempty"` -} - -// EtcdStatusApplyConfiguration constructs a declarative configuration of the EtcdStatus type for use with -// apply. -func EtcdStatus() *EtcdStatusApplyConfiguration { - return &EtcdStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithObservedGeneration(value int64) *EtcdStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *EtcdStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *EtcdStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithVersion(value string) *EtcdStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithReadyReplicas(value int32) *EtcdStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *EtcdStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *EtcdStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *EtcdStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *EtcdStatusApplyConfiguration { - b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value - return b -} - -// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NodeStatuses field. -func (b *EtcdStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *EtcdStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNodeStatuses") - } - b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) - } - return b -} - -// WithHardwareSpeed sets the HardwareSpeed field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HardwareSpeed field is set to the value of the last call. -func (b *EtcdStatusApplyConfiguration) WithHardwareSpeed(value operatorv1.ControlPlaneHardwareSpeed) *EtcdStatusApplyConfiguration { - b.HardwareSpeed = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/exportnetworkflows.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/exportnetworkflows.go deleted file mode 100644 index 763deb4a4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/exportnetworkflows.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExportNetworkFlowsApplyConfiguration represents a declarative configuration of the ExportNetworkFlows type for use -// with apply. -type ExportNetworkFlowsApplyConfiguration struct { - // netFlow defines the NetFlow configuration. - NetFlow *NetFlowConfigApplyConfiguration `json:"netFlow,omitempty"` - // sFlow defines the SFlow configuration. - SFlow *SFlowConfigApplyConfiguration `json:"sFlow,omitempty"` - // ipfix defines IPFIX configuration. - IPFIX *IPFIXConfigApplyConfiguration `json:"ipfix,omitempty"` -} - -// ExportNetworkFlowsApplyConfiguration constructs a declarative configuration of the ExportNetworkFlows type for use with -// apply. -func ExportNetworkFlows() *ExportNetworkFlowsApplyConfiguration { - return &ExportNetworkFlowsApplyConfiguration{} -} - -// WithNetFlow sets the NetFlow field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetFlow field is set to the value of the last call. -func (b *ExportNetworkFlowsApplyConfiguration) WithNetFlow(value *NetFlowConfigApplyConfiguration) *ExportNetworkFlowsApplyConfiguration { - b.NetFlow = value - return b -} - -// WithSFlow sets the SFlow field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SFlow field is set to the value of the last call. -func (b *ExportNetworkFlowsApplyConfiguration) WithSFlow(value *SFlowConfigApplyConfiguration) *ExportNetworkFlowsApplyConfiguration { - b.SFlow = value - return b -} - -// WithIPFIX sets the IPFIX field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPFIX field is set to the value of the last call. -func (b *ExportNetworkFlowsApplyConfiguration) WithIPFIX(value *IPFIXConfigApplyConfiguration) *ExportNetworkFlowsApplyConfiguration { - b.IPFIX = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/featuresmigration.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/featuresmigration.go deleted file mode 100644 index a0ba953f4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/featuresmigration.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// FeaturesMigrationApplyConfiguration represents a declarative configuration of the FeaturesMigration type for use -// with apply. -type FeaturesMigrationApplyConfiguration struct { - // egressIP specified whether or not the Egress IP configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - EgressIP *bool `json:"egressIP,omitempty"` - // egressFirewall specified whether or not the Egress Firewall configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - EgressFirewall *bool `json:"egressFirewall,omitempty"` - // multicast specified whether or not the multicast configuration was migrated. - // DEPRECATED: network type migration is no longer supported. - Multicast *bool `json:"multicast,omitempty"` -} - -// FeaturesMigrationApplyConfiguration constructs a declarative configuration of the FeaturesMigration type for use with -// apply. -func FeaturesMigration() *FeaturesMigrationApplyConfiguration { - return &FeaturesMigrationApplyConfiguration{} -} - -// WithEgressIP sets the EgressIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EgressIP field is set to the value of the last call. -func (b *FeaturesMigrationApplyConfiguration) WithEgressIP(value bool) *FeaturesMigrationApplyConfiguration { - b.EgressIP = &value - return b -} - -// WithEgressFirewall sets the EgressFirewall field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EgressFirewall field is set to the value of the last call. -func (b *FeaturesMigrationApplyConfiguration) WithEgressFirewall(value bool) *FeaturesMigrationApplyConfiguration { - b.EgressFirewall = &value - return b -} - -// WithMulticast sets the Multicast field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Multicast field is set to the value of the last call. -func (b *FeaturesMigrationApplyConfiguration) WithMulticast(value bool) *FeaturesMigrationApplyConfiguration { - b.Multicast = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go deleted file mode 100644 index d0e11f184..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/filereferencesource.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// FileReferenceSourceApplyConfiguration represents a declarative configuration of the FileReferenceSource type for use -// with apply. -// -// FileReferenceSource is used by the console to locate the specified file containing a custom logo. -type FileReferenceSourceApplyConfiguration struct { - // from is a required field to specify the source type of the file reference. - // Allowed values are ConfigMap. - // When set to ConfigMap, the file will be sourced from a ConfigMap in the openshift-config namespace. The configMap field must be set when from is set to ConfigMap. - From *operatorv1.SourceType `json:"from,omitempty"` - // configMap specifies the ConfigMap sourcing details such as the name of the ConfigMap and the key for the file. - // The ConfigMap must exist in the openshift-config namespace. - // Required when from is "ConfigMap", and forbidden otherwise. - ConfigMap *ConfigMapFileReferenceApplyConfiguration `json:"configMap,omitempty"` -} - -// FileReferenceSourceApplyConfiguration constructs a declarative configuration of the FileReferenceSource type for use with -// apply. -func FileReferenceSource() *FileReferenceSourceApplyConfiguration { - return &FileReferenceSourceApplyConfiguration{} -} - -// WithFrom sets the From field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the From field is set to the value of the last call. -func (b *FileReferenceSourceApplyConfiguration) WithFrom(value operatorv1.SourceType) *FileReferenceSourceApplyConfiguration { - b.From = &value - return b -} - -// WithConfigMap sets the ConfigMap field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConfigMap field is set to the value of the last call. -func (b *FileReferenceSourceApplyConfiguration) WithConfigMap(value *ConfigMapFileReferenceApplyConfiguration) *FileReferenceSourceApplyConfiguration { - b.ConfigMap = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/forwardplugin.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/forwardplugin.go deleted file mode 100644 index 83e97719c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/forwardplugin.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ForwardPluginApplyConfiguration represents a declarative configuration of the ForwardPlugin type for use -// with apply. -// -// ForwardPlugin defines a schema for configuring the CoreDNS forward plugin. -type ForwardPluginApplyConfiguration struct { - // upstreams is a list of resolvers to forward name queries for subdomains of Zones. - // Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream - // returns an error during the exchange, another resolver is tried from Upstreams. The - // Upstreams are selected in the order specified in Policy. Each upstream is represented - // by an IP address or IP:port if the upstream listens on a port other than 53. - // - // A maximum of 15 upstreams is allowed per ForwardPlugin. - Upstreams []string `json:"upstreams,omitempty"` - // policy is used to determine the order in which upstream servers are selected for querying. - // Any one of the following values may be specified: - // - // * "Random" picks a random upstream server for each query. - // * "RoundRobin" picks upstream servers in a round-robin order, moving to the next server for each new query. - // * "Sequential" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query. - // - // The default value is "Random" - Policy *operatorv1.ForwardingPolicy `json:"policy,omitempty"` - // transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use - // when forwarding DNS requests to an upstream resolver. - // - // The default value is "" (empty) which results in a standard cleartext connection being used when forwarding DNS - // requests to an upstream resolver. - TransportConfig *DNSTransportConfigApplyConfiguration `json:"transportConfig,omitempty"` - // protocolStrategy specifies the protocol to use for upstream DNS - // requests. - // Valid values for protocolStrategy are "TCP" and omitted. - // When omitted, this means no opinion and the platform is left to choose - // a reasonable default, which is subject to change over time. - // The current default is to use the protocol of the original client request. - // "TCP" specifies that the platform should use TCP for all upstream DNS requests, - // even if the client request uses UDP. - // "TCP" is useful for UDP-specific issues such as those created by - // non-compliant upstream resolvers, but may consume more bandwidth or - // increase DNS response time. Note that protocolStrategy only affects - // the protocol of DNS requests that CoreDNS makes to upstream resolvers. - // It does not affect the protocol of DNS requests between clients and - // CoreDNS. - ProtocolStrategy *operatorv1.ProtocolStrategy `json:"protocolStrategy,omitempty"` -} - -// ForwardPluginApplyConfiguration constructs a declarative configuration of the ForwardPlugin type for use with -// apply. -func ForwardPlugin() *ForwardPluginApplyConfiguration { - return &ForwardPluginApplyConfiguration{} -} - -// WithUpstreams adds the given value to the Upstreams field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Upstreams field. -func (b *ForwardPluginApplyConfiguration) WithUpstreams(values ...string) *ForwardPluginApplyConfiguration { - for i := range values { - b.Upstreams = append(b.Upstreams, values[i]) - } - return b -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *ForwardPluginApplyConfiguration) WithPolicy(value operatorv1.ForwardingPolicy) *ForwardPluginApplyConfiguration { - b.Policy = &value - return b -} - -// WithTransportConfig sets the TransportConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransportConfig field is set to the value of the last call. -func (b *ForwardPluginApplyConfiguration) WithTransportConfig(value *DNSTransportConfigApplyConfiguration) *ForwardPluginApplyConfiguration { - b.TransportConfig = value - return b -} - -// WithProtocolStrategy sets the ProtocolStrategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProtocolStrategy field is set to the value of the last call. -func (b *ForwardPluginApplyConfiguration) WithProtocolStrategy(value operatorv1.ProtocolStrategy) *ForwardPluginApplyConfiguration { - b.ProtocolStrategy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatewayconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatewayconfig.go deleted file mode 100644 index 9cc515637..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatewayconfig.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// GatewayConfigApplyConfiguration represents a declarative configuration of the GatewayConfig type for use -// with apply. -// -// GatewayConfig holds node gateway-related parsed config file parameters and command-line overrides -type GatewayConfigApplyConfiguration struct { - // routingViaHost allows pod egress traffic to exit via the ovn-k8s-mp0 management port - // into the host before sending it out. If this is not set, traffic will always egress directly - // from OVN to outside without touching the host stack. Setting this to true means hardware - // offload will not be supported. Default is false if GatewayConfig is specified. - RoutingViaHost *bool `json:"routingViaHost,omitempty"` - // ipForwarding controls IP forwarding for all traffic on OVN-Kubernetes managed interfaces (such as br-ex). - // By default this is set to Restricted, and Kubernetes related traffic is still forwarded appropriately, but other - // IP traffic will not be routed by the OCP node. If there is a desire to allow the host to forward traffic across - // OVN-Kubernetes managed interfaces, then set this field to "Global". - // The supported values are "Restricted" and "Global". - IPForwarding *operatorv1.IPForwardingMode `json:"ipForwarding,omitempty"` - // ipv4 allows users to configure IP settings for IPv4 connections. When omitted, this means no opinion and the default - // configuration is used. Check individual members fields within ipv4 for details of default values. - IPv4 *IPv4GatewayConfigApplyConfiguration `json:"ipv4,omitempty"` - // ipv6 allows users to configure IP settings for IPv6 connections. When omitted, this means no opinion and the default - // configuration is used. Check individual members fields within ipv6 for details of default values. - IPv6 *IPv6GatewayConfigApplyConfiguration `json:"ipv6,omitempty"` -} - -// GatewayConfigApplyConfiguration constructs a declarative configuration of the GatewayConfig type for use with -// apply. -func GatewayConfig() *GatewayConfigApplyConfiguration { - return &GatewayConfigApplyConfiguration{} -} - -// WithRoutingViaHost sets the RoutingViaHost field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RoutingViaHost field is set to the value of the last call. -func (b *GatewayConfigApplyConfiguration) WithRoutingViaHost(value bool) *GatewayConfigApplyConfiguration { - b.RoutingViaHost = &value - return b -} - -// WithIPForwarding sets the IPForwarding field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPForwarding field is set to the value of the last call. -func (b *GatewayConfigApplyConfiguration) WithIPForwarding(value operatorv1.IPForwardingMode) *GatewayConfigApplyConfiguration { - b.IPForwarding = &value - return b -} - -// WithIPv4 sets the IPv4 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv4 field is set to the value of the last call. -func (b *GatewayConfigApplyConfiguration) WithIPv4(value *IPv4GatewayConfigApplyConfiguration) *GatewayConfigApplyConfiguration { - b.IPv4 = value - return b -} - -// WithIPv6 sets the IPv6 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv6 field is set to the value of the last call. -func (b *GatewayConfigApplyConfiguration) WithIPv6(value *IPv6GatewayConfigApplyConfiguration) *GatewayConfigApplyConfiguration { - b.IPv6 = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gathererstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gathererstatus.go deleted file mode 100644 index 313d088eb..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gathererstatus.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// GathererStatusApplyConfiguration represents a declarative configuration of the GathererStatus type for use -// with apply. -// -// gathererStatus represents information about a particular -// data gatherer. -type GathererStatusApplyConfiguration struct { - // conditions provide details on the status of each gatherer. - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - // name is the name of the gatherer. - Name *string `json:"name,omitempty"` - // lastGatherDuration represents the time spent gathering. - LastGatherDuration *apismetav1.Duration `json:"lastGatherDuration,omitempty"` -} - -// GathererStatusApplyConfiguration constructs a declarative configuration of the GathererStatus type for use with -// apply. -func GathererStatus() *GathererStatusApplyConfiguration { - return &GathererStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *GathererStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *GathererStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *GathererStatusApplyConfiguration) WithName(value string) *GathererStatusApplyConfiguration { - b.Name = &value - return b -} - -// WithLastGatherDuration sets the LastGatherDuration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastGatherDuration field is set to the value of the last call. -func (b *GathererStatusApplyConfiguration) WithLastGatherDuration(value apismetav1.Duration) *GathererStatusApplyConfiguration { - b.LastGatherDuration = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatherstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatherstatus.go deleted file mode 100644 index b74ed514c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gatherstatus.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// GatherStatusApplyConfiguration represents a declarative configuration of the GatherStatus type for use -// with apply. -// -// gatherStatus provides information about the last known gather event. -type GatherStatusApplyConfiguration struct { - // lastGatherTime is the last time when Insights data gathering finished. - // An empty value means that no data has been gathered yet. - LastGatherTime *metav1.Time `json:"lastGatherTime,omitempty"` - // lastGatherDuration is the total time taken to process - // all gatherers during the last gather event. - LastGatherDuration *metav1.Duration `json:"lastGatherDuration,omitempty"` - // gatherers is a list of active gatherers (and their statuses) in the last gathering. - Gatherers []GathererStatusApplyConfiguration `json:"gatherers,omitempty"` -} - -// GatherStatusApplyConfiguration constructs a declarative configuration of the GatherStatus type for use with -// apply. -func GatherStatus() *GatherStatusApplyConfiguration { - return &GatherStatusApplyConfiguration{} -} - -// WithLastGatherTime sets the LastGatherTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastGatherTime field is set to the value of the last call. -func (b *GatherStatusApplyConfiguration) WithLastGatherTime(value metav1.Time) *GatherStatusApplyConfiguration { - b.LastGatherTime = &value - return b -} - -// WithLastGatherDuration sets the LastGatherDuration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastGatherDuration field is set to the value of the last call. -func (b *GatherStatusApplyConfiguration) WithLastGatherDuration(value metav1.Duration) *GatherStatusApplyConfiguration { - b.LastGatherDuration = &value - return b -} - -// WithGatherers adds the given value to the Gatherers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Gatherers field. -func (b *GatherStatusApplyConfiguration) WithGatherers(values ...*GathererStatusApplyConfiguration) *GatherStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGatherers") - } - b.Gatherers = append(b.Gatherers, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpcsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpcsidriverconfigspec.go deleted file mode 100644 index 767d9021b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpcsidriverconfigspec.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GCPCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the GCPCSIDriverConfigSpec type for use -// with apply. -// -// GCPCSIDriverConfigSpec defines properties that can be configured for the GCP CSI driver. -type GCPCSIDriverConfigSpecApplyConfiguration struct { - // kmsKey sets the cluster default storage class to encrypt volumes with customer-supplied - // encryption keys, rather than the default keys managed by GCP. - KMSKey *GCPKMSKeyReferenceApplyConfiguration `json:"kmsKey,omitempty"` -} - -// GCPCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the GCPCSIDriverConfigSpec type for use with -// apply. -func GCPCSIDriverConfigSpec() *GCPCSIDriverConfigSpecApplyConfiguration { - return &GCPCSIDriverConfigSpecApplyConfiguration{} -} - -// WithKMSKey sets the KMSKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KMSKey field is set to the value of the last call. -func (b *GCPCSIDriverConfigSpecApplyConfiguration) WithKMSKey(value *GCPKMSKeyReferenceApplyConfiguration) *GCPCSIDriverConfigSpecApplyConfiguration { - b.KMSKey = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpkmskeyreference.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpkmskeyreference.go deleted file mode 100644 index 7a06266e7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcpkmskeyreference.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GCPKMSKeyReferenceApplyConfiguration represents a declarative configuration of the GCPKMSKeyReference type for use -// with apply. -// -// GCPKMSKeyReference gathers required fields for looking up a GCP KMS Key -type GCPKMSKeyReferenceApplyConfiguration struct { - // name is the name of the customer-managed encryption key to be used for disk encryption. - // The value should correspond to an existing KMS key and should - // consist of only alphanumeric characters, hyphens (-) and underscores (_), - // and be at most 63 characters in length. - Name *string `json:"name,omitempty"` - // keyRing is the name of the KMS Key Ring which the KMS Key belongs to. - // The value should correspond to an existing KMS key ring and should - // consist of only alphanumeric characters, hyphens (-) and underscores (_), - // and be at most 63 characters in length. - KeyRing *string `json:"keyRing,omitempty"` - // projectID is the ID of the Project in which the KMS Key Ring exists. - // It must be 6 to 30 lowercase letters, digits, or hyphens. - // It must start with a letter. Trailing hyphens are prohibited. - ProjectID *string `json:"projectID,omitempty"` - // location is the GCP location in which the Key Ring exists. - // The value must match an existing GCP location, or "global". - // Defaults to global, if not set. - Location *string `json:"location,omitempty"` -} - -// GCPKMSKeyReferenceApplyConfiguration constructs a declarative configuration of the GCPKMSKeyReference type for use with -// apply. -func GCPKMSKeyReference() *GCPKMSKeyReferenceApplyConfiguration { - return &GCPKMSKeyReferenceApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *GCPKMSKeyReferenceApplyConfiguration) WithName(value string) *GCPKMSKeyReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithKeyRing sets the KeyRing field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KeyRing field is set to the value of the last call. -func (b *GCPKMSKeyReferenceApplyConfiguration) WithKeyRing(value string) *GCPKMSKeyReferenceApplyConfiguration { - b.KeyRing = &value - return b -} - -// WithProjectID sets the ProjectID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProjectID field is set to the value of the last call. -func (b *GCPKMSKeyReferenceApplyConfiguration) WithProjectID(value string) *GCPKMSKeyReferenceApplyConfiguration { - b.ProjectID = &value - return b -} - -// WithLocation sets the Location field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Location field is set to the value of the last call. -func (b *GCPKMSKeyReferenceApplyConfiguration) WithLocation(value string) *GCPKMSKeyReferenceApplyConfiguration { - b.Location = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go deleted file mode 100644 index acc2e9199..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/gcploadbalancerparameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// GCPLoadBalancerParametersApplyConfiguration represents a declarative configuration of the GCPLoadBalancerParameters type for use -// with apply. -// -// GCPLoadBalancerParameters provides configuration settings that are -// specific to GCP load balancers. -type GCPLoadBalancerParametersApplyConfiguration struct { - // clientAccess describes how client access is restricted for internal - // load balancers. - // - // Valid values are: - // * "Global": Specifying an internal load balancer with Global client access - // allows clients from any region within the VPC to communicate with the load - // balancer. - // - // https://cloud.google.com/kubernetes-engine/docs/how-to/internal-load-balancing#global_access - // - // * "Local": Specifying an internal load balancer with Local client access - // means only clients within the same region (and VPC) as the GCP load balancer - // can communicate with the load balancer. Note that this is the default behavior. - // - // https://cloud.google.com/load-balancing/docs/internal#client_access - ClientAccess *operatorv1.GCPClientAccess `json:"clientAccess,omitempty"` -} - -// GCPLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the GCPLoadBalancerParameters type for use with -// apply. -func GCPLoadBalancerParameters() *GCPLoadBalancerParametersApplyConfiguration { - return &GCPLoadBalancerParametersApplyConfiguration{} -} - -// WithClientAccess sets the ClientAccess field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientAccess field is set to the value of the last call. -func (b *GCPLoadBalancerParametersApplyConfiguration) WithClientAccess(value operatorv1.GCPClientAccess) *GCPLoadBalancerParametersApplyConfiguration { - b.ClientAccess = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/generationstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/generationstatus.go deleted file mode 100644 index b61f6f530..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/generationstatus.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// GenerationStatusApplyConfiguration represents a declarative configuration of the GenerationStatus type for use -// with apply. -// -// GenerationStatus keeps track of the generation for a given resource so that decisions about forced updates can be made. -type GenerationStatusApplyConfiguration struct { - // group is the group of the thing you're tracking - Group *string `json:"group,omitempty"` - // resource is the resource type of the thing you're tracking - Resource *string `json:"resource,omitempty"` - // namespace is where the thing you're tracking is - Namespace *string `json:"namespace,omitempty"` - // name is the name of the thing you're tracking - Name *string `json:"name,omitempty"` - // lastGeneration is the last generation of the workload controller involved - LastGeneration *int64 `json:"lastGeneration,omitempty"` - // hash is an optional field set for resources without generation that are content sensitive like secrets and configmaps - Hash *string `json:"hash,omitempty"` -} - -// GenerationStatusApplyConfiguration constructs a declarative configuration of the GenerationStatus type for use with -// apply. -func GenerationStatus() *GenerationStatusApplyConfiguration { - return &GenerationStatusApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithGroup(value string) *GenerationStatusApplyConfiguration { - b.Group = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithResource(value string) *GenerationStatusApplyConfiguration { - b.Resource = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithNamespace(value string) *GenerationStatusApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithName(value string) *GenerationStatusApplyConfiguration { - b.Name = &value - return b -} - -// WithLastGeneration sets the LastGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastGeneration field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithLastGeneration(value int64) *GenerationStatusApplyConfiguration { - b.LastGeneration = &value - return b -} - -// WithHash sets the Hash field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Hash field is set to the value of the last call. -func (b *GenerationStatusApplyConfiguration) WithHash(value string) *GenerationStatusApplyConfiguration { - b.Hash = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/healthcheck.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/healthcheck.go deleted file mode 100644 index c669fa871..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/healthcheck.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// HealthCheckApplyConfiguration represents a declarative configuration of the HealthCheck type for use -// with apply. -// -// healthCheck represents an Insights health check attributes. -type HealthCheckApplyConfiguration struct { - // description provides basic description of the healtcheck. - Description *string `json:"description,omitempty"` - // totalRisk of the healthcheck. Indicator of the total risk posed - // by the detected issue; combination of impact and likelihood. The values can be from 1 to 4, - // and the higher the number, the more important the issue. - TotalRisk *int32 `json:"totalRisk,omitempty"` - // advisorURI provides the URL link to the Insights Advisor. - AdvisorURI *string `json:"advisorURI,omitempty"` - // state determines what the current state of the health check is. - // Health check is enabled by default and can be disabled - // by the user in the Insights advisor user interface. - State *operatorv1.HealthCheckState `json:"state,omitempty"` -} - -// HealthCheckApplyConfiguration constructs a declarative configuration of the HealthCheck type for use with -// apply. -func HealthCheck() *HealthCheckApplyConfiguration { - return &HealthCheckApplyConfiguration{} -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithDescription(value string) *HealthCheckApplyConfiguration { - b.Description = &value - return b -} - -// WithTotalRisk sets the TotalRisk field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TotalRisk field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithTotalRisk(value int32) *HealthCheckApplyConfiguration { - b.TotalRisk = &value - return b -} - -// WithAdvisorURI sets the AdvisorURI field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdvisorURI field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithAdvisorURI(value string) *HealthCheckApplyConfiguration { - b.AdvisorURI = &value - return b -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *HealthCheckApplyConfiguration) WithState(value operatorv1.HealthCheckState) *HealthCheckApplyConfiguration { - b.State = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go deleted file mode 100644 index 93b5f5fcb..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hostnetworkstrategy.go +++ /dev/null @@ -1,103 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// HostNetworkStrategyApplyConfiguration represents a declarative configuration of the HostNetworkStrategy type for use -// with apply. -// -// HostNetworkStrategy holds parameters for the HostNetwork endpoint publishing -// strategy. -type HostNetworkStrategyApplyConfiguration struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` - // httpPort is the port on the host which should be used to listen for - // HTTP requests. This field should be set when port 80 is already in use. - // The value should not coincide with the NodePort range of the cluster. - // When the value is 0 or is not specified it defaults to 80. - HTTPPort *int32 `json:"httpPort,omitempty"` - // httpsPort is the port on the host which should be used to listen for - // HTTPS requests. This field should be set when port 443 is already in use. - // The value should not coincide with the NodePort range of the cluster. - // When the value is 0 or is not specified it defaults to 443. - HTTPSPort *int32 `json:"httpsPort,omitempty"` - // statsPort is the port on the host where the stats from the router are - // published. The value should not coincide with the NodePort range of the - // cluster. If an external load balancer is configured to forward connections - // to this IngressController, the load balancer should use this port for - // health checks. The load balancer can send HTTP probes on this port on a - // given node, with the path /healthz/ready to determine if the ingress - // controller is ready to receive traffic on the node. For proper operation - // the load balancer must not forward traffic to a node until the health - // check reports ready. The load balancer should also stop forwarding requests - // within a maximum of 45 seconds after /healthz/ready starts reporting - // not-ready. Probing every 5 to 10 seconds, with a 5-second timeout and with - // a threshold of two successful or failed requests to become healthy or - // unhealthy respectively, are well-tested values. When the value is 0 or - // is not specified it defaults to 1936. - StatsPort *int32 `json:"statsPort,omitempty"` -} - -// HostNetworkStrategyApplyConfiguration constructs a declarative configuration of the HostNetworkStrategy type for use with -// apply. -func HostNetworkStrategy() *HostNetworkStrategyApplyConfiguration { - return &HostNetworkStrategyApplyConfiguration{} -} - -// WithProtocol sets the Protocol field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Protocol field is set to the value of the last call. -func (b *HostNetworkStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *HostNetworkStrategyApplyConfiguration { - b.Protocol = &value - return b -} - -// WithHTTPPort sets the HTTPPort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPPort field is set to the value of the last call. -func (b *HostNetworkStrategyApplyConfiguration) WithHTTPPort(value int32) *HostNetworkStrategyApplyConfiguration { - b.HTTPPort = &value - return b -} - -// WithHTTPSPort sets the HTTPSPort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPSPort field is set to the value of the last call. -func (b *HostNetworkStrategyApplyConfiguration) WithHTTPSPort(value int32) *HostNetworkStrategyApplyConfiguration { - b.HTTPSPort = &value - return b -} - -// WithStatsPort sets the StatsPort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StatsPort field is set to the value of the last call. -func (b *HostNetworkStrategyApplyConfiguration) WithStatsPort(value int32) *HostNetworkStrategyApplyConfiguration { - b.StatsPort = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go deleted file mode 100644 index 979acb735..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/httpcompressionpolicy.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// HTTPCompressionPolicyApplyConfiguration represents a declarative configuration of the HTTPCompressionPolicy type for use -// with apply. -// -// httpCompressionPolicy turns on compression for the specified MIME types. -// -// This field is optional, and its absence implies that compression should not be enabled -// globally in HAProxy. -// -// If httpCompressionPolicy exists, compression should be enabled only for the specified -// MIME types. -type HTTPCompressionPolicyApplyConfiguration struct { - // mimeTypes is a list of MIME types that should have compression applied. - // This list can be empty, in which case the ingress controller does not apply compression. - // - // Note: Not all MIME types benefit from compression, but HAProxy will still use resources - // to try to compress if instructed to. Generally speaking, text (html, css, js, etc.) - // formats benefit from compression, but formats that are already compressed (image, - // audio, video, etc.) benefit little in exchange for the time and cpu spent on compressing - // again. See https://joehonton.medium.com/the-gzip-penalty-d31bd697f1a2 - MimeTypes []operatorv1.CompressionMIMEType `json:"mimeTypes,omitempty"` -} - -// HTTPCompressionPolicyApplyConfiguration constructs a declarative configuration of the HTTPCompressionPolicy type for use with -// apply. -func HTTPCompressionPolicy() *HTTPCompressionPolicyApplyConfiguration { - return &HTTPCompressionPolicyApplyConfiguration{} -} - -// WithMimeTypes adds the given value to the MimeTypes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MimeTypes field. -func (b *HTTPCompressionPolicyApplyConfiguration) WithMimeTypes(values ...operatorv1.CompressionMIMEType) *HTTPCompressionPolicyApplyConfiguration { - for i := range values { - b.MimeTypes = append(b.MimeTypes, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hybridoverlayconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hybridoverlayconfig.go deleted file mode 100644 index 3f6304921..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/hybridoverlayconfig.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// HybridOverlayConfigApplyConfiguration represents a declarative configuration of the HybridOverlayConfig type for use -// with apply. -type HybridOverlayConfigApplyConfiguration struct { - // hybridClusterNetwork defines a network space given to nodes on an additional overlay network. - HybridClusterNetwork []ClusterNetworkEntryApplyConfiguration `json:"hybridClusterNetwork,omitempty"` - // hybridOverlayVXLANPort defines the VXLAN port number to be used by the additional overlay network. - // Default is 4789 - HybridOverlayVXLANPort *uint32 `json:"hybridOverlayVXLANPort,omitempty"` -} - -// HybridOverlayConfigApplyConfiguration constructs a declarative configuration of the HybridOverlayConfig type for use with -// apply. -func HybridOverlayConfig() *HybridOverlayConfigApplyConfiguration { - return &HybridOverlayConfigApplyConfiguration{} -} - -// WithHybridClusterNetwork adds the given value to the HybridClusterNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HybridClusterNetwork field. -func (b *HybridOverlayConfigApplyConfiguration) WithHybridClusterNetwork(values ...*ClusterNetworkEntryApplyConfiguration) *HybridOverlayConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHybridClusterNetwork") - } - b.HybridClusterNetwork = append(b.HybridClusterNetwork, *values[i]) - } - return b -} - -// WithHybridOverlayVXLANPort sets the HybridOverlayVXLANPort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HybridOverlayVXLANPort field is set to the value of the last call. -func (b *HybridOverlayConfigApplyConfiguration) WithHybridOverlayVXLANPort(value uint32) *HybridOverlayConfigApplyConfiguration { - b.HybridOverlayVXLANPort = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmcloudcsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmcloudcsidriverconfigspec.go deleted file mode 100644 index ebafa7794..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmcloudcsidriverconfigspec.go +++ /dev/null @@ -1,27 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IBMCloudCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the IBMCloudCSIDriverConfigSpec type for use -// with apply. -// -// IBMCloudCSIDriverConfigSpec defines the properties that can be configured for the IBM Cloud CSI driver. -type IBMCloudCSIDriverConfigSpecApplyConfiguration struct { - // encryptionKeyCRN is the IBM Cloud CRN of the customer-managed root key to use - // for disk encryption of volumes for the default storage classes. - EncryptionKeyCRN *string `json:"encryptionKeyCRN,omitempty"` -} - -// IBMCloudCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the IBMCloudCSIDriverConfigSpec type for use with -// apply. -func IBMCloudCSIDriverConfigSpec() *IBMCloudCSIDriverConfigSpecApplyConfiguration { - return &IBMCloudCSIDriverConfigSpecApplyConfiguration{} -} - -// WithEncryptionKeyCRN sets the EncryptionKeyCRN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EncryptionKeyCRN field is set to the value of the last call. -func (b *IBMCloudCSIDriverConfigSpecApplyConfiguration) WithEncryptionKeyCRN(value string) *IBMCloudCSIDriverConfigSpecApplyConfiguration { - b.EncryptionKeyCRN = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go deleted file mode 100644 index ed702ee5d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ibmloadbalancerparameters.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IBMLoadBalancerParametersApplyConfiguration represents a declarative configuration of the IBMLoadBalancerParameters type for use -// with apply. -// -// IBMLoadBalancerParameters provides configuration settings that are -// specific to IBM Cloud load balancers. -type IBMLoadBalancerParametersApplyConfiguration struct { - // protocol specifies whether the load balancer uses PROXY protocol to forward connections to - // the IngressController. See "service.kubernetes.io/ibm-load-balancer-cloud-provider-enable-features: - // "proxy-protocol"" at https://cloud.ibm.com/docs/containers?topic=containers-vpc-lbaas" - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // Valid values for protocol are TCP, PROXY and omitted. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default is TCP, without the proxy protocol enabled. - Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` -} - -// IBMLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the IBMLoadBalancerParameters type for use with -// apply. -func IBMLoadBalancerParameters() *IBMLoadBalancerParametersApplyConfiguration { - return &IBMLoadBalancerParametersApplyConfiguration{} -} - -// WithProtocol sets the Protocol field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Protocol field is set to the value of the last call. -func (b *IBMLoadBalancerParametersApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *IBMLoadBalancerParametersApplyConfiguration { - b.Protocol = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingress.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingress.go deleted file mode 100644 index 11cb5a237..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingress.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressApplyConfiguration represents a declarative configuration of the Ingress type for use -// with apply. -// -// Ingress allows cluster admin to configure alternative ingress for the console. -type IngressApplyConfiguration struct { - // consoleURL is a URL to be used as the base console address. - // If not specified, the console route hostname will be used. - // This field is required for clusters without ingress capability, - // where access to routes is not possible. - // Make sure that appropriate ingress is set up at this URL. - // The console operator will monitor the URL and may go degraded - // if it's unreachable for an extended period. - // Must use the HTTPS scheme. - ConsoleURL *string `json:"consoleURL,omitempty"` - // clientDownloadsURL is a URL to be used as the address to download client binaries. - // If not specified, the downloads route hostname will be used. - // This field is required for clusters without ingress capability, - // where access to routes is not possible. - // The console operator will monitor the URL and may go degraded - // if it's unreachable for an extended period. - // Must use the HTTPS scheme. - ClientDownloadsURL *string `json:"clientDownloadsURL,omitempty"` -} - -// IngressApplyConfiguration constructs a declarative configuration of the Ingress type for use with -// apply. -func Ingress() *IngressApplyConfiguration { - return &IngressApplyConfiguration{} -} - -// WithConsoleURL sets the ConsoleURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConsoleURL field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithConsoleURL(value string) *IngressApplyConfiguration { - b.ConsoleURL = &value - return b -} - -// WithClientDownloadsURL sets the ClientDownloadsURL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientDownloadsURL field is set to the value of the last call. -func (b *IngressApplyConfiguration) WithClientDownloadsURL(value string) *IngressApplyConfiguration { - b.ClientDownloadsURL = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontroller.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontroller.go deleted file mode 100644 index 4bd75f7f7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontroller.go +++ /dev/null @@ -1,291 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// IngressControllerApplyConfiguration represents a declarative configuration of the IngressController type for use -// with apply. -// -// IngressController describes a managed ingress controller for the cluster. The -// controller can service OpenShift Route and Kubernetes Ingress resources. -// -// When an IngressController is created, a new ingress controller deployment is -// created to allow external traffic to reach the services that expose Ingress -// or Route resources. Updating this resource may lead to disruption for public -// facing network connections as a new ingress controller revision may be rolled -// out. -// -// https://kubernetes.io/docs/concepts/services-networking/ingress-controllers -// -// Whenever possible, sensible defaults for the platform are used. See each -// field for more details. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type IngressControllerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the IngressController. - Spec *IngressControllerSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the IngressController. - Status *IngressControllerStatusApplyConfiguration `json:"status,omitempty"` -} - -// IngressController constructs a declarative configuration of the IngressController type for use with -// apply. -func IngressController(name, namespace string) *IngressControllerApplyConfiguration { - b := &IngressControllerApplyConfiguration{} - b.WithName(name) - b.WithNamespace(namespace) - b.WithKind("IngressController") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractIngressControllerFrom extracts the applied configuration owned by fieldManager from -// ingressController for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// ingressController must be a unmodified IngressController API object that was retrieved from the Kubernetes API. -// ExtractIngressControllerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractIngressControllerFrom(ingressController *operatorv1.IngressController, fieldManager string, subresource string) (*IngressControllerApplyConfiguration, error) { - b := &IngressControllerApplyConfiguration{} - err := managedfields.ExtractInto(ingressController, internal.Parser().Type("com.github.openshift.api.operator.v1.IngressController"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(ingressController.Name) - b.WithNamespace(ingressController.Namespace) - - b.WithKind("IngressController") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractIngressController extracts the applied configuration owned by fieldManager from -// ingressController. If no managedFields are found in ingressController for fieldManager, a -// IngressControllerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// ingressController must be a unmodified IngressController API object that was retrieved from the Kubernetes API. -// ExtractIngressController provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractIngressController(ingressController *operatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { - return ExtractIngressControllerFrom(ingressController, fieldManager, "") -} - -// ExtractIngressControllerStatus extracts the applied configuration owned by fieldManager from -// ingressController for the status subresource. -func ExtractIngressControllerStatus(ingressController *operatorv1.IngressController, fieldManager string) (*IngressControllerApplyConfiguration, error) { - return ExtractIngressControllerFrom(ingressController, fieldManager, "status") -} - -func (b IngressControllerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithKind(value string) *IngressControllerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithAPIVersion(value string) *IngressControllerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithName(value string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithGenerateName(value string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithNamespace(value string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithUID(value types.UID) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithResourceVersion(value string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithGeneration(value int64) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *IngressControllerApplyConfiguration) WithLabels(entries map[string]string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *IngressControllerApplyConfiguration) WithAnnotations(entries map[string]string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *IngressControllerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *IngressControllerApplyConfiguration) WithFinalizers(values ...string) *IngressControllerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *IngressControllerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithSpec(value *IngressControllerSpecApplyConfiguration) *IngressControllerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *IngressControllerApplyConfiguration) WithStatus(value *IngressControllerStatusApplyConfiguration) *IngressControllerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *IngressControllerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *IngressControllerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *IngressControllerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *IngressControllerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go deleted file mode 100644 index 53283d798..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookie.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IngressControllerCaptureHTTPCookieApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPCookie type for use -// with apply. -// -// IngressControllerCaptureHTTPCookie describes an HTTP cookie that should be -// captured. -type IngressControllerCaptureHTTPCookieApplyConfiguration struct { - IngressControllerCaptureHTTPCookieUnionApplyConfiguration `json:",inline"` - // maxLength specifies a maximum length of the string that will be - // logged, which includes the cookie name, cookie value, and - // one-character delimiter. If the log entry exceeds this length, the - // value will be truncated in the log message. Note that the ingress - // controller may impose a separate bound on the total length of HTTP - // headers in a request. - MaxLength *int `json:"maxLength,omitempty"` -} - -// IngressControllerCaptureHTTPCookieApplyConfiguration constructs a declarative configuration of the IngressControllerCaptureHTTPCookie type for use with -// apply. -func IngressControllerCaptureHTTPCookie() *IngressControllerCaptureHTTPCookieApplyConfiguration { - return &IngressControllerCaptureHTTPCookieApplyConfiguration{} -} - -// WithMatchType sets the MatchType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MatchType field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithMatchType(value operatorv1.CookieMatchType) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.MatchType = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithName(value string) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.Name = &value - return b -} - -// WithNamePrefix sets the NamePrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamePrefix field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithNamePrefix(value string) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.IngressControllerCaptureHTTPCookieUnionApplyConfiguration.NamePrefix = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieApplyConfiguration) WithMaxLength(value int) *IngressControllerCaptureHTTPCookieApplyConfiguration { - b.MaxLength = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go deleted file mode 100644 index 8c5d408b6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpcookieunion.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IngressControllerCaptureHTTPCookieUnionApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPCookieUnion type for use -// with apply. -// -// IngressControllerCaptureHTTPCookieUnion describes optional fields of an HTTP cookie that should be captured. -type IngressControllerCaptureHTTPCookieUnionApplyConfiguration struct { - // matchType specifies the type of match to be performed on the cookie - // name. Allowed values are "Exact" for an exact string match and - // "Prefix" for a string prefix match. If "Exact" is specified, a name - // must be specified in the name field. If "Prefix" is provided, a - // prefix must be specified in the namePrefix field. For example, - // specifying matchType "Prefix" and namePrefix "foo" will capture a - // cookie named "foo" or "foobar" but not one named "bar". The first - // matching cookie is captured. - MatchType *operatorv1.CookieMatchType `json:"matchType,omitempty"` - // name specifies a cookie name. Its value must be a valid HTTP cookie - // name as defined in RFC 6265 section 4.1. - Name *string `json:"name,omitempty"` - // namePrefix specifies a cookie name prefix. Its value must be a valid - // HTTP cookie name as defined in RFC 6265 section 4.1. - NamePrefix *string `json:"namePrefix,omitempty"` -} - -// IngressControllerCaptureHTTPCookieUnionApplyConfiguration constructs a declarative configuration of the IngressControllerCaptureHTTPCookieUnion type for use with -// apply. -func IngressControllerCaptureHTTPCookieUnion() *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { - return &IngressControllerCaptureHTTPCookieUnionApplyConfiguration{} -} - -// WithMatchType sets the MatchType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MatchType field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieUnionApplyConfiguration) WithMatchType(value operatorv1.CookieMatchType) *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { - b.MatchType = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieUnionApplyConfiguration) WithName(value string) *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { - b.Name = &value - return b -} - -// WithNamePrefix sets the NamePrefix field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamePrefix field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPCookieUnionApplyConfiguration) WithNamePrefix(value string) *IngressControllerCaptureHTTPCookieUnionApplyConfiguration { - b.NamePrefix = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheader.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheader.go deleted file mode 100644 index 6ed5a7af8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheader.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerCaptureHTTPHeaderApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPHeader type for use -// with apply. -// -// IngressControllerCaptureHTTPHeader describes an HTTP header that should be -// captured. -type IngressControllerCaptureHTTPHeaderApplyConfiguration struct { - // name specifies a header name. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - Name *string `json:"name,omitempty"` - // maxLength specifies a maximum length for the header value. If a - // header value exceeds this length, the value will be truncated in the - // log message. Note that the ingress controller may impose a separate - // bound on the total length of HTTP headers in a request. - MaxLength *int `json:"maxLength,omitempty"` -} - -// IngressControllerCaptureHTTPHeaderApplyConfiguration constructs a declarative configuration of the IngressControllerCaptureHTTPHeader type for use with -// apply. -func IngressControllerCaptureHTTPHeader() *IngressControllerCaptureHTTPHeaderApplyConfiguration { - return &IngressControllerCaptureHTTPHeaderApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPHeaderApplyConfiguration) WithName(value string) *IngressControllerCaptureHTTPHeaderApplyConfiguration { - b.Name = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *IngressControllerCaptureHTTPHeaderApplyConfiguration) WithMaxLength(value int) *IngressControllerCaptureHTTPHeaderApplyConfiguration { - b.MaxLength = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheaders.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheaders.go deleted file mode 100644 index 8b0569de7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollercapturehttpheaders.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerCaptureHTTPHeadersApplyConfiguration represents a declarative configuration of the IngressControllerCaptureHTTPHeaders type for use -// with apply. -// -// IngressControllerCaptureHTTPHeaders specifies which HTTP headers the -// IngressController captures. -type IngressControllerCaptureHTTPHeadersApplyConfiguration struct { - // request specifies which HTTP request headers to capture. - // - // If this field is empty, no request headers are captured. - Request []IngressControllerCaptureHTTPHeaderApplyConfiguration `json:"request,omitempty"` - // response specifies which HTTP response headers to capture. - // - // If this field is empty, no response headers are captured. - Response []IngressControllerCaptureHTTPHeaderApplyConfiguration `json:"response,omitempty"` -} - -// IngressControllerCaptureHTTPHeadersApplyConfiguration constructs a declarative configuration of the IngressControllerCaptureHTTPHeaders type for use with -// apply. -func IngressControllerCaptureHTTPHeaders() *IngressControllerCaptureHTTPHeadersApplyConfiguration { - return &IngressControllerCaptureHTTPHeadersApplyConfiguration{} -} - -// WithRequest adds the given value to the Request field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Request field. -func (b *IngressControllerCaptureHTTPHeadersApplyConfiguration) WithRequest(values ...*IngressControllerCaptureHTTPHeaderApplyConfiguration) *IngressControllerCaptureHTTPHeadersApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRequest") - } - b.Request = append(b.Request, *values[i]) - } - return b -} - -// WithResponse adds the given value to the Response field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Response field. -func (b *IngressControllerCaptureHTTPHeadersApplyConfiguration) WithResponse(values ...*IngressControllerCaptureHTTPHeaderApplyConfiguration) *IngressControllerCaptureHTTPHeadersApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResponse") - } - b.Response = append(b.Response, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheader.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheader.go deleted file mode 100644 index 33f306b0b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheader.go +++ /dev/null @@ -1,42 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerHTTPHeaderApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeader type for use -// with apply. -// -// IngressControllerHTTPHeader specifies configuration for setting or deleting an HTTP header. -type IngressControllerHTTPHeaderApplyConfiguration struct { - // name specifies the name of a header on which to perform an action. Its value must be a valid HTTP header - // name as defined in RFC 2616 section 4.2. - // The name must consist only of alphanumeric and the following special characters, "-!#$%&'*+.^_`". - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. - // It must be no more than 255 characters in length. - // Header name must be unique. - Name *string `json:"name,omitempty"` - // action specifies actions to perform on headers, such as setting or deleting headers. - Action *IngressControllerHTTPHeaderActionUnionApplyConfiguration `json:"action,omitempty"` -} - -// IngressControllerHTTPHeaderApplyConfiguration constructs a declarative configuration of the IngressControllerHTTPHeader type for use with -// apply. -func IngressControllerHTTPHeader() *IngressControllerHTTPHeaderApplyConfiguration { - return &IngressControllerHTTPHeaderApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerHTTPHeaderApplyConfiguration) WithName(value string) *IngressControllerHTTPHeaderApplyConfiguration { - b.Name = &value - return b -} - -// WithAction sets the Action field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Action field is set to the value of the last call. -func (b *IngressControllerHTTPHeaderApplyConfiguration) WithAction(value *IngressControllerHTTPHeaderActionUnionApplyConfiguration) *IngressControllerHTTPHeaderApplyConfiguration { - b.Action = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactions.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactions.go deleted file mode 100644 index 509599faa..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactions.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerHTTPHeaderActionsApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeaderActions type for use -// with apply. -// -// IngressControllerHTTPHeaderActions defines configuration for actions on HTTP request and response headers. -type IngressControllerHTTPHeaderActionsApplyConfiguration struct { - // response is a list of HTTP response headers to modify. - // Actions defined here will modify the response headers of all requests passing through an ingress controller. - // These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. - // IngressController actions for response headers will be executed after Route actions. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 response header actions may be configured. - // Sample fetchers allowed are "res.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[res.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - Response []IngressControllerHTTPHeaderApplyConfiguration `json:"response,omitempty"` - // request is a list of HTTP request headers to modify. - // Actions defined here will modify the request headers of all requests passing through an ingress controller. - // These actions are applied to all Routes i.e. for all connections handled by the ingress controller defined within a cluster. - // IngressController actions for request headers will be executed before Route actions. - // Currently, actions may define to either `Set` or `Delete` headers values. - // Actions are applied in sequence as defined in this list. - // A maximum of 20 request header actions may be configured. - // Sample fetchers allowed are "req.hdr" and "ssl_c_der". - // Converters allowed are "lower" and "base64". - // Example header values: "%[req.hdr(X-target),lower]", "%{+Q}[ssl_c_der,base64]". - Request []IngressControllerHTTPHeaderApplyConfiguration `json:"request,omitempty"` -} - -// IngressControllerHTTPHeaderActionsApplyConfiguration constructs a declarative configuration of the IngressControllerHTTPHeaderActions type for use with -// apply. -func IngressControllerHTTPHeaderActions() *IngressControllerHTTPHeaderActionsApplyConfiguration { - return &IngressControllerHTTPHeaderActionsApplyConfiguration{} -} - -// WithResponse adds the given value to the Response field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Response field. -func (b *IngressControllerHTTPHeaderActionsApplyConfiguration) WithResponse(values ...*IngressControllerHTTPHeaderApplyConfiguration) *IngressControllerHTTPHeaderActionsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithResponse") - } - b.Response = append(b.Response, *values[i]) - } - return b -} - -// WithRequest adds the given value to the Request field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Request field. -func (b *IngressControllerHTTPHeaderActionsApplyConfiguration) WithRequest(values ...*IngressControllerHTTPHeaderApplyConfiguration) *IngressControllerHTTPHeaderActionsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRequest") - } - b.Request = append(b.Request, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go deleted file mode 100644 index a21c306f6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaderactionunion.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IngressControllerHTTPHeaderActionUnionApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeaderActionUnion type for use -// with apply. -// -// IngressControllerHTTPHeaderActionUnion specifies an action to take on an HTTP header. -type IngressControllerHTTPHeaderActionUnionApplyConfiguration struct { - // type defines the type of the action to be applied on the header. - // Possible values are Set or Delete. - // Set allows you to set HTTP request and response headers. - // Delete allows you to delete HTTP request and response headers. - Type *operatorv1.IngressControllerHTTPHeaderActionType `json:"type,omitempty"` - // set specifies how the HTTP header should be set. - // This field is required when type is Set and forbidden otherwise. - Set *IngressControllerSetHTTPHeaderApplyConfiguration `json:"set,omitempty"` -} - -// IngressControllerHTTPHeaderActionUnionApplyConfiguration constructs a declarative configuration of the IngressControllerHTTPHeaderActionUnion type for use with -// apply. -func IngressControllerHTTPHeaderActionUnion() *IngressControllerHTTPHeaderActionUnionApplyConfiguration { - return &IngressControllerHTTPHeaderActionUnionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *IngressControllerHTTPHeaderActionUnionApplyConfiguration) WithType(value operatorv1.IngressControllerHTTPHeaderActionType) *IngressControllerHTTPHeaderActionUnionApplyConfiguration { - b.Type = &value - return b -} - -// WithSet sets the Set field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Set field is set to the value of the last call. -func (b *IngressControllerHTTPHeaderActionUnionApplyConfiguration) WithSet(value *IngressControllerSetHTTPHeaderApplyConfiguration) *IngressControllerHTTPHeaderActionUnionApplyConfiguration { - b.Set = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go deleted file mode 100644 index ffbceb1be..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpheaders.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IngressControllerHTTPHeadersApplyConfiguration represents a declarative configuration of the IngressControllerHTTPHeaders type for use -// with apply. -// -// IngressControllerHTTPHeaders specifies how the IngressController handles -// certain HTTP headers. -type IngressControllerHTTPHeadersApplyConfiguration struct { - // forwardedHeaderPolicy specifies when and how the IngressController - // sets the Forwarded, X-Forwarded-For, X-Forwarded-Host, - // X-Forwarded-Port, X-Forwarded-Proto, and X-Forwarded-Proto-Version - // HTTP headers. The value may be one of the following: - // - // * "Append", which specifies that the IngressController appends the - // headers, preserving existing headers. - // - // * "Replace", which specifies that the IngressController sets the - // headers, replacing any existing Forwarded or X-Forwarded-* headers. - // - // * "IfNone", which specifies that the IngressController sets the - // headers if they are not already set. - // - // * "Never", which specifies that the IngressController never sets the - // headers, preserving any existing headers. - // - // By default, the policy is "Append". - ForwardedHeaderPolicy *operatorv1.IngressControllerHTTPHeaderPolicy `json:"forwardedHeaderPolicy,omitempty"` - // uniqueId describes configuration for a custom HTTP header that the - // ingress controller should inject into incoming HTTP requests. - // Typically, this header is configured to have a value that is unique - // to the HTTP request. The header can be used by applications or - // included in access logs to facilitate tracing individual HTTP - // requests. - // - // If this field is empty, no such header is injected into requests. - UniqueId *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration `json:"uniqueId,omitempty"` - // headerNameCaseAdjustments specifies case adjustments that can be - // applied to HTTP header names. Each adjustment is specified as an - // HTTP header name with the desired capitalization. For example, - // specifying "X-Forwarded-For" indicates that the "x-forwarded-for" - // HTTP header should be adjusted to have the specified capitalization. - // - // These adjustments are only applied to cleartext, edge-terminated, and - // re-encrypt routes, and only when using HTTP/1. - // - // For request headers, these adjustments are applied only for routes - // that have the haproxy.router.openshift.io/h1-adjust-case=true - // annotation. For response headers, these adjustments are applied to - // all HTTP responses. - // - // If this field is empty, no request headers are adjusted. - HeaderNameCaseAdjustments []operatorv1.IngressControllerHTTPHeaderNameCaseAdjustment `json:"headerNameCaseAdjustments,omitempty"` - // actions specifies options for modifying headers and their values. - // Note that this option only applies to cleartext HTTP connections - // and to secure HTTP connections for which the ingress controller - // terminates encryption (that is, edge-terminated or reencrypt - // connections). Headers cannot be modified for TLS passthrough - // connections. - // Setting the HSTS (`Strict-Transport-Security`) header is not supported via actions. `Strict-Transport-Security` - // may only be configured using the "haproxy.router.openshift.io/hsts_header" route annotation, and only in - // accordance with the policy specified in Ingress.Spec.RequiredHSTSPolicies. - // Any actions defined here are applied after any actions related to the following other fields: - // cache-control, spec.clientTLS, - // spec.httpHeaders.forwardedHeaderPolicy, spec.httpHeaders.uniqueId, - // and spec.httpHeaders.headerNameCaseAdjustments. - // In case of HTTP request headers, the actions specified in spec.httpHeaders.actions on the Route will be executed after - // the actions specified in the IngressController's spec.httpHeaders.actions field. - // In case of HTTP response headers, the actions specified in spec.httpHeaders.actions on the IngressController will be - // executed after the actions specified in the Route's spec.httpHeaders.actions field. - // Headers set using this API cannot be captured for use in access logs. - // The following header names are reserved and may not be modified via this API: - // Strict-Transport-Security, Proxy, Host, Cookie, Set-Cookie. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. Please refer to the documentation - // for that API field for more details. - Actions *IngressControllerHTTPHeaderActionsApplyConfiguration `json:"actions,omitempty"` -} - -// IngressControllerHTTPHeadersApplyConfiguration constructs a declarative configuration of the IngressControllerHTTPHeaders type for use with -// apply. -func IngressControllerHTTPHeaders() *IngressControllerHTTPHeadersApplyConfiguration { - return &IngressControllerHTTPHeadersApplyConfiguration{} -} - -// WithForwardedHeaderPolicy sets the ForwardedHeaderPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForwardedHeaderPolicy field is set to the value of the last call. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithForwardedHeaderPolicy(value operatorv1.IngressControllerHTTPHeaderPolicy) *IngressControllerHTTPHeadersApplyConfiguration { - b.ForwardedHeaderPolicy = &value - return b -} - -// WithUniqueId sets the UniqueId field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UniqueId field is set to the value of the last call. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithUniqueId(value *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration) *IngressControllerHTTPHeadersApplyConfiguration { - b.UniqueId = value - return b -} - -// WithHeaderNameCaseAdjustments adds the given value to the HeaderNameCaseAdjustments field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HeaderNameCaseAdjustments field. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithHeaderNameCaseAdjustments(values ...operatorv1.IngressControllerHTTPHeaderNameCaseAdjustment) *IngressControllerHTTPHeadersApplyConfiguration { - for i := range values { - b.HeaderNameCaseAdjustments = append(b.HeaderNameCaseAdjustments, values[i]) - } - return b -} - -// WithActions sets the Actions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Actions field is set to the value of the last call. -func (b *IngressControllerHTTPHeadersApplyConfiguration) WithActions(value *IngressControllerHTTPHeaderActionsApplyConfiguration) *IngressControllerHTTPHeadersApplyConfiguration { - b.Actions = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpuniqueidheaderpolicy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpuniqueidheaderpolicy.go deleted file mode 100644 index 24a1cf02e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerhttpuniqueidheaderpolicy.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration represents a declarative configuration of the IngressControllerHTTPUniqueIdHeaderPolicy type for use -// with apply. -// -// IngressControllerHTTPUniqueIdHeaderPolicy describes configuration for a -// unique id header. -type IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration struct { - // name specifies the name of the HTTP header (for example, "unique-id") - // that the ingress controller should inject into HTTP requests. The - // field's value must be a valid HTTP header name as defined in RFC 2616 - // section 4.2. If the field is empty, no header is injected. - Name *string `json:"name,omitempty"` - // format specifies the format for the injected HTTP header's value. - // This field has no effect unless name is specified. For the - // HAProxy-based ingress controller implementation, this format uses the - // same syntax as the HTTP log format. If the field is empty, the - // default value is "%{+X}o\\ %ci:%cp_%fi:%fp_%Ts_%rt:%pid"; see the - // corresponding HAProxy documentation: - // http://cbonte.github.io/haproxy-dconv/2.0/configuration.html#8.2.3 - Format *string `json:"format,omitempty"` -} - -// IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration constructs a declarative configuration of the IngressControllerHTTPUniqueIdHeaderPolicy type for use with -// apply. -func IngressControllerHTTPUniqueIdHeaderPolicy() *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration { - return &IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration) WithName(value string) *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration { - b.Name = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration) WithFormat(value string) *IngressControllerHTTPUniqueIdHeaderPolicyApplyConfiguration { - b.Format = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerlogging.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerlogging.go deleted file mode 100644 index 8223b0b66..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerlogging.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerLoggingApplyConfiguration represents a declarative configuration of the IngressControllerLogging type for use -// with apply. -// -// IngressControllerLogging describes what should be logged where. -type IngressControllerLoggingApplyConfiguration struct { - // access describes how the client requests should be logged. - // - // If this field is empty, access logging is disabled. - Access *AccessLoggingApplyConfiguration `json:"access,omitempty"` -} - -// IngressControllerLoggingApplyConfiguration constructs a declarative configuration of the IngressControllerLogging type for use with -// apply. -func IngressControllerLogging() *IngressControllerLoggingApplyConfiguration { - return &IngressControllerLoggingApplyConfiguration{} -} - -// WithAccess sets the Access field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Access field is set to the value of the last call. -func (b *IngressControllerLoggingApplyConfiguration) WithAccess(value *AccessLoggingApplyConfiguration) *IngressControllerLoggingApplyConfiguration { - b.Access = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollersethttpheader.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollersethttpheader.go deleted file mode 100644 index ff3fbd0e3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollersethttpheader.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IngressControllerSetHTTPHeaderApplyConfiguration represents a declarative configuration of the IngressControllerSetHTTPHeader type for use -// with apply. -// -// IngressControllerSetHTTPHeader defines the value which needs to be set on an HTTP header. -type IngressControllerSetHTTPHeaderApplyConfiguration struct { - // value specifies a header value. - // Dynamic values can be added. The value will be interpreted as an HAProxy format string as defined in - // http://cbonte.github.io/haproxy-dconv/2.6/configuration.html#8.2.6 and may use HAProxy's %[] syntax and - // otherwise must be a valid HTTP header value as defined in https://datatracker.ietf.org/doc/html/rfc7230#section-3.2. - // The value of this field must be no more than 16384 characters in length. - // Note that the total size of all net added headers *after* interpolating dynamic values - // must not exceed the value of spec.tuningOptions.headerBufferMaxRewriteBytes on the - // IngressController. - Value *string `json:"value,omitempty"` -} - -// IngressControllerSetHTTPHeaderApplyConfiguration constructs a declarative configuration of the IngressControllerSetHTTPHeader type for use with -// apply. -func IngressControllerSetHTTPHeader() *IngressControllerSetHTTPHeaderApplyConfiguration { - return &IngressControllerSetHTTPHeaderApplyConfiguration{} -} - -// WithValue sets the Value field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Value field is set to the value of the last call. -func (b *IngressControllerSetHTTPHeaderApplyConfiguration) WithValue(value string) *IngressControllerSetHTTPHeaderApplyConfiguration { - b.Value = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go deleted file mode 100644 index b6337158c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerspec.go +++ /dev/null @@ -1,475 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - operatorv1 "github.com/openshift/api/operator/v1" - corev1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// IngressControllerSpecApplyConfiguration represents a declarative configuration of the IngressControllerSpec type for use -// with apply. -// -// IngressControllerSpec is the specification of the desired behavior of the -// IngressController. -type IngressControllerSpecApplyConfiguration struct { - // domain is a DNS name serviced by the ingress controller and is used to - // configure multiple features: - // - // * For the LoadBalancerService endpoint publishing strategy, domain is - // used to configure DNS records. See endpointPublishingStrategy. - // - // * When using a generated default certificate, the certificate will be valid - // for domain and its subdomains. See defaultCertificate. - // - // * The value is published to individual Route statuses so that end-users - // know where to target external DNS records. - // - // domain must be unique among all IngressControllers, and cannot be - // updated. - // - // If empty, defaults to ingress.config.openshift.io/cluster .spec.domain. - // - // The domain value must be a valid DNS name. It must consist of lowercase - // alphanumeric characters, '-' or '.', and each label must start and end - // with an alphanumeric character and not exceed 63 characters. Maximum - // length of a valid DNS domain is 253 characters. - // - // The implementation may add a prefix such as "router-default." to the domain - // when constructing the router canonical hostname. To ensure the resulting - // hostname does not exceed the DNS maximum length of 253 characters, - // the domain length is additionally validated at the IngressController object - // level. For the maximum length of the domain value itself, the shortest - // possible variant of the prefix and the ingress controller name was considered - // for example "router-a." - Domain *string `json:"domain,omitempty"` - // httpErrorCodePages specifies a configmap with custom error pages. - // The administrator must create this configmap in the openshift-config namespace. - // This configmap should have keys in the format "error-page-.http", - // where is an HTTP error code. - // For example, "error-page-503.http" defines an error page for HTTP 503 responses. - // Currently only error pages for 503 and 404 responses can be customized. - // Each value in the configmap should be the full response, including HTTP headers. - // Eg- https://raw.githubusercontent.com/openshift/router/fadab45747a9b30cc3f0a4b41ad2871f95827a93/images/router/haproxy/conf/error-page-503.http - // If this field is empty, the ingress controller uses the default error pages. - HttpErrorCodePages *configv1.ConfigMapNameReference `json:"httpErrorCodePages,omitempty"` - // replicas is the desired number of ingress controller replicas. If unset, - // the default depends on the value of the defaultPlacement field in the - // cluster config.openshift.io/v1/ingresses status. - // - // The value of replicas is set based on the value of a chosen field in the - // Infrastructure CR. If defaultPlacement is set to ControlPlane, the - // chosen field will be controlPlaneTopology. If it is set to Workers the - // chosen field will be infrastructureTopology. Replicas will then be set to 1 - // or 2 based whether the chosen field's value is SingleReplica or - // HighlyAvailable, respectively. - // - // These defaults are subject to change. - Replicas *int32 `json:"replicas,omitempty"` - // endpointPublishingStrategy is used to publish the ingress controller - // endpoints to other networks, enable load balancer integrations, etc. - // - // If unset, the default is based on - // infrastructure.config.openshift.io/cluster .status.platform: - // - // AWS: LoadBalancerService (with External scope) - // Azure: LoadBalancerService (with External scope) - // GCP: LoadBalancerService (with External scope) - // IBMCloud: LoadBalancerService (with External scope) - // AlibabaCloud: LoadBalancerService (with External scope) - // Libvirt: HostNetwork - // - // Any other platform types (including None) default to HostNetwork. - // - // endpointPublishingStrategy cannot be updated. - EndpointPublishingStrategy *EndpointPublishingStrategyApplyConfiguration `json:"endpointPublishingStrategy,omitempty"` - // defaultCertificate is a reference to a secret containing the default - // certificate served by the ingress controller. When Routes don't specify - // their own certificate, defaultCertificate is used. - // - // The secret must contain the following keys and data: - // - // tls.crt: certificate file contents - // tls.key: key file contents - // - // If unset, a wildcard certificate is automatically generated and used. The - // certificate is valid for the ingress controller domain (and subdomains) and - // the generated certificate's CA will be automatically integrated with the - // cluster's trust store. - // - // If a wildcard certificate is used and shared by multiple - // HTTP/2 enabled routes (which implies ALPN) then clients - // (i.e., notably browsers) are at liberty to reuse open - // connections. This means a client can reuse a connection to - // another route and that is likely to fail. This behaviour is - // generally known as connection coalescing. - // - // The in-use certificate (whether generated or user-specified) will be - // automatically integrated with OpenShift's built-in OAuth server. - DefaultCertificate *corev1.LocalObjectReference `json:"defaultCertificate,omitempty"` - // namespaceSelector is used to filter the set of namespaces serviced by the - // ingress controller. This is useful for implementing shards. - // - // If unset, the default is no filtering. - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - // routeSelector is used to filter the set of Routes serviced by the ingress - // controller. This is useful for implementing shards. - // - // If unset, the default is no filtering. - RouteSelector *metav1.LabelSelectorApplyConfiguration `json:"routeSelector,omitempty"` - // nodePlacement enables explicit control over the scheduling of the ingress - // controller. - // - // If unset, defaults are used. See NodePlacement for more details. - NodePlacement *NodePlacementApplyConfiguration `json:"nodePlacement,omitempty"` - // tlsSecurityProfile specifies settings for TLS connections for ingresscontrollers. - // - // If unset, the default is based on the apiservers.config.openshift.io/cluster resource. - // - // Note that when using the Old, Intermediate, and Modern profile types, the effective - // profile configuration is subject to change between releases. For example, given - // a specification to use the Intermediate profile deployed on release X.Y.Z, an upgrade - // to release X.Y.Z+1 may cause a new profile configuration to be applied to the ingress - // controller, resulting in a rollout. - TLSSecurityProfile *configv1.TLSSecurityProfile `json:"tlsSecurityProfile,omitempty"` - // clientTLS specifies settings for requesting and verifying client - // certificates, which can be used to enable mutual TLS for - // edge-terminated and reencrypt routes. - ClientTLS *ClientTLSApplyConfiguration `json:"clientTLS,omitempty"` - // routeAdmission defines a policy for handling new route claims (for example, - // to allow or deny claims across namespaces). - // - // If empty, defaults will be applied. See specific routeAdmission fields - // for details about their defaults. - RouteAdmission *RouteAdmissionPolicyApplyConfiguration `json:"routeAdmission,omitempty"` - // logging defines parameters for what should be logged where. If this - // field is empty, operational logs are enabled but access logs are - // disabled. - Logging *IngressControllerLoggingApplyConfiguration `json:"logging,omitempty"` - // httpHeaders defines policy for HTTP headers. - // - // If this field is empty, the default values are used. - HTTPHeaders *IngressControllerHTTPHeadersApplyConfiguration `json:"httpHeaders,omitempty"` - // httpEmptyRequestsPolicy describes how HTTP connections should be - // handled if the connection times out before a request is received. - // Allowed values for this field are "Respond" and "Ignore". If the - // field is set to "Respond", the ingress controller sends an HTTP 400 - // or 408 response, logs the connection (if access logging is enabled), - // and counts the connection in the appropriate metrics. If the field - // is set to "Ignore", the ingress controller closes the connection - // without sending a response, logging the connection, or incrementing - // metrics. The default value is "Respond". - // - // Typically, these connections come from load balancers' health probes - // or Web browsers' speculative connections ("preconnect") and can be - // safely ignored. However, these requests may also be caused by - // network errors, and so setting this field to "Ignore" may impede - // detection and diagnosis of problems. In addition, these requests may - // be caused by port scans, in which case logging empty requests may aid - // in detecting intrusion attempts. - HTTPEmptyRequestsPolicy *operatorv1.HTTPEmptyRequestsPolicy `json:"httpEmptyRequestsPolicy,omitempty"` - // tuningOptions defines parameters for adjusting the performance of - // ingress controller pods. All fields are optional and will use their - // respective defaults if not set. See specific tuningOptions fields for - // more details. - // - // Setting fields within tuningOptions is generally not recommended. The - // default values are suitable for most configurations. - TuningOptions *IngressControllerTuningOptionsApplyConfiguration `json:"tuningOptions,omitempty"` - // unsupportedConfigOverrides allows specifying unsupported - // configuration options. Its use is unsupported. - UnsupportedConfigOverrides *runtime.RawExtension `json:"unsupportedConfigOverrides,omitempty"` - // httpCompression defines a policy for HTTP traffic compression. - // By default, there is no HTTP compression. - HTTPCompression *HTTPCompressionPolicyApplyConfiguration `json:"httpCompression,omitempty"` - // idleConnectionTerminationPolicy maps directly to HAProxy's - // idle-close-on-response option and controls whether HAProxy - // keeps idle frontend connections open during a soft stop - // (router reload). - // - // Allowed values for this field are "Immediate" and - // "Deferred". The default value is "Immediate". - // - // When set to "Immediate", idle connections are closed - // immediately during router reloads. This ensures immediate - // propagation of route changes but may impact clients - // sensitive to connection resets. - // - // When set to "Deferred", HAProxy will maintain idle - // connections during a soft reload instead of closing them - // immediately. These connections remain open until any of the - // following occurs: - // - // - A new request is received on the connection, in which - // case HAProxy handles it in the old process and closes - // the connection after sending the response. - // - // - HAProxy's `timeout http-keep-alive` duration expires. - // By default this is 300 seconds, but it can be changed - // using httpKeepAliveTimeout tuning option. - // - // - The client's keep-alive timeout expires, causing the - // client to close the connection. - // - // Setting Deferred can help prevent errors in clients or load - // balancers that do not properly handle connection resets. - // Additionally, this option allows you to retain the pre-2.4 - // HAProxy behaviour: in HAProxy version 2.2 (OpenShift - // versions < 4.14), maintaining idle connections during a - // soft reload was the default behaviour, but starting with - // HAProxy 2.4, the default changed to closing idle - // connections immediately. - // - // Important Consideration: - // - // - Using Deferred will result in temporary inconsistencies - // for the first request on each persistent connection - // after a route update and router reload. This request - // will be processed by the old HAProxy process using its - // old configuration. Subsequent requests will use the - // updated configuration. - // - // Operational Considerations: - // - // - Keeping idle connections open during reloads may lead - // to an accumulation of old HAProxy processes if - // connections remain idle for extended periods, - // especially in environments where frequent reloads - // occur. - // - // - Consider monitoring the number of HAProxy processes in - // the router pods when Deferred is set. - // - // - You may need to enable or adjust the - // `ingress.operator.openshift.io/hard-stop-after` - // duration (configured via an annotation on the - // IngressController resource) in environments with - // frequent reloads to prevent resource exhaustion. - IdleConnectionTerminationPolicy *operatorv1.IngressControllerConnectionTerminationPolicy `json:"idleConnectionTerminationPolicy,omitempty"` - // closedClientConnectionPolicy controls how the IngressController - // behaves when the client closes the TCP connection while the TLS - // handshake or HTTP request is in progress. This option maps directly - // to HAProxy’s "abortonclose" option. - // - // Valid values are: "Abort" and "Continue". - // The default value is "Continue". - // - // When set to "Abort", the router will stop processing the TLS handshake - // if it is in progress, and it will not send an HTTP request to the backend server - // if the request has not yet been sent when the client closes the connection. - // - // When set to "Continue", the router will complete the TLS handshake - // if it is in progress, or send an HTTP request to the backend server - // and wait for the backend server's response, regardless of - // whether the client has closed the connection. - // - // Setting "Abort" can help free CPU resources otherwise spent on TLS computation - // for connections the client has already closed, and can reduce request queue - // size, thereby reducing the load on saturated backend servers. - // - // Important Considerations: - // - // - The default policy ("Continue") is HTTP-compliant, and requests - // for aborted client connections will still be served. - // Use the "Continue" policy to allow a client to send a request - // and then immediately close its side of the connection while - // still receiving a response on the half-closed connection. - // - // - When clients use keep-alive connections, the most common case for premature - // closure is when the user wants to cancel the transfer or when a timeout - // occurs. In that case, the "Abort" policy may be used to reduce resource consumption. - // - // - Using RSA keys larger than 2048 bits can significantly slow down - // TLS computations. Consider using the "Abort" policy to reduce CPU usage. - ClosedClientConnectionPolicy *operatorv1.IngressControllerClosedClientConnectionPolicy `json:"closedClientConnectionPolicy,omitempty"` - // haproxyVersion specifies the HAProxy version to use for this - // IngressController. - // - // OpenShift 5.0 introduces HAProxy 3.2 as its default version and supports - // HAProxy 2.8 from OpenShift 4.22 for migration purposes. When an OpenShift - // release introduces a new default HAProxy version, that HAProxy version - // becomes available as a pinnable value in subsequent OpenShift releases, - // providing a smooth migration path for administrators who want to defer - // HAProxy upgrades. - // - // Valid values for OpenShift 5.0: - // - Unset (default): Uses HAProxy 3.2 (the default for OpenShift 5.0) - // - "3.2": Explicitly pins HAProxy 3.2 for preservation during cluster - // upgrades to future OpenShift releases - // - "2.8": Uses HAProxy 2.8 from OpenShift 4.22 (migration support, will - // be dropped in the next OpenShift release) - // - // If a specific HAProxy version is set and would become unsupported in a - // target cluster upgrade, a preflight check will block the cluster upgrade - // until this field is updated to unset or a supported version. - HAProxyVersion *operatorv1.HAProxyVersion `json:"haproxyVersion,omitempty"` -} - -// IngressControllerSpecApplyConfiguration constructs a declarative configuration of the IngressControllerSpec type for use with -// apply. -func IngressControllerSpec() *IngressControllerSpecApplyConfiguration { - return &IngressControllerSpecApplyConfiguration{} -} - -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithDomain(value string) *IngressControllerSpecApplyConfiguration { - b.Domain = &value - return b -} - -// WithHttpErrorCodePages sets the HttpErrorCodePages field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HttpErrorCodePages field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHttpErrorCodePages(value configv1.ConfigMapNameReference) *IngressControllerSpecApplyConfiguration { - b.HttpErrorCodePages = &value - return b -} - -// WithReplicas sets the Replicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Replicas field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithReplicas(value int32) *IngressControllerSpecApplyConfiguration { - b.Replicas = &value - return b -} - -// WithEndpointPublishingStrategy sets the EndpointPublishingStrategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EndpointPublishingStrategy field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithEndpointPublishingStrategy(value *EndpointPublishingStrategyApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.EndpointPublishingStrategy = value - return b -} - -// WithDefaultCertificate sets the DefaultCertificate field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultCertificate field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithDefaultCertificate(value corev1.LocalObjectReference) *IngressControllerSpecApplyConfiguration { - b.DefaultCertificate = &value - return b -} - -// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.NamespaceSelector = value - return b -} - -// WithRouteSelector sets the RouteSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RouteSelector field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithRouteSelector(value *metav1.LabelSelectorApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.RouteSelector = value - return b -} - -// WithNodePlacement sets the NodePlacement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodePlacement field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithNodePlacement(value *NodePlacementApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.NodePlacement = value - return b -} - -// WithTLSSecurityProfile sets the TLSSecurityProfile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSSecurityProfile field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithTLSSecurityProfile(value configv1.TLSSecurityProfile) *IngressControllerSpecApplyConfiguration { - b.TLSSecurityProfile = &value - return b -} - -// WithClientTLS sets the ClientTLS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientTLS field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithClientTLS(value *ClientTLSApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.ClientTLS = value - return b -} - -// WithRouteAdmission sets the RouteAdmission field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RouteAdmission field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithRouteAdmission(value *RouteAdmissionPolicyApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.RouteAdmission = value - return b -} - -// WithLogging sets the Logging field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Logging field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithLogging(value *IngressControllerLoggingApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.Logging = value - return b -} - -// WithHTTPHeaders sets the HTTPHeaders field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPHeaders field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHTTPHeaders(value *IngressControllerHTTPHeadersApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.HTTPHeaders = value - return b -} - -// WithHTTPEmptyRequestsPolicy sets the HTTPEmptyRequestsPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPEmptyRequestsPolicy field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHTTPEmptyRequestsPolicy(value operatorv1.HTTPEmptyRequestsPolicy) *IngressControllerSpecApplyConfiguration { - b.HTTPEmptyRequestsPolicy = &value - return b -} - -// WithTuningOptions sets the TuningOptions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TuningOptions field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithTuningOptions(value *IngressControllerTuningOptionsApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.TuningOptions = value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *IngressControllerSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value - return b -} - -// WithHTTPCompression sets the HTTPCompression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPCompression field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHTTPCompression(value *HTTPCompressionPolicyApplyConfiguration) *IngressControllerSpecApplyConfiguration { - b.HTTPCompression = value - return b -} - -// WithIdleConnectionTerminationPolicy sets the IdleConnectionTerminationPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IdleConnectionTerminationPolicy field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithIdleConnectionTerminationPolicy(value operatorv1.IngressControllerConnectionTerminationPolicy) *IngressControllerSpecApplyConfiguration { - b.IdleConnectionTerminationPolicy = &value - return b -} - -// WithClosedClientConnectionPolicy sets the ClosedClientConnectionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClosedClientConnectionPolicy field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithClosedClientConnectionPolicy(value operatorv1.IngressControllerClosedClientConnectionPolicy) *IngressControllerSpecApplyConfiguration { - b.ClosedClientConnectionPolicy = &value - return b -} - -// WithHAProxyVersion sets the HAProxyVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HAProxyVersion field is set to the value of the last call. -func (b *IngressControllerSpecApplyConfiguration) WithHAProxyVersion(value operatorv1.HAProxyVersion) *IngressControllerSpecApplyConfiguration { - b.HAProxyVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerstatus.go deleted file mode 100644 index 169f158b6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollerstatus.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - configv1 "github.com/openshift/api/config/v1" - operatorv1 "github.com/openshift/api/operator/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// IngressControllerStatusApplyConfiguration represents a declarative configuration of the IngressControllerStatus type for use -// with apply. -// -// IngressControllerStatus defines the observed status of the IngressController. -type IngressControllerStatusApplyConfiguration struct { - // availableReplicas is number of observed available replicas according to the - // ingress controller deployment. - AvailableReplicas *int32 `json:"availableReplicas,omitempty"` - // selector is a label selector, in string format, for ingress controller pods - // corresponding to the IngressController. The number of matching pods should - // equal the value of availableReplicas. - Selector *string `json:"selector,omitempty"` - // domain is the actual domain in use. - Domain *string `json:"domain,omitempty"` - // endpointPublishingStrategy is the actual strategy in use. - EndpointPublishingStrategy *EndpointPublishingStrategyApplyConfiguration `json:"endpointPublishingStrategy,omitempty"` - // conditions is a list of conditions and their status. - // - // Available means the ingress controller deployment is available and - // servicing route and ingress resources (i.e, .status.availableReplicas - // equals .spec.replicas) - // - // There are additional conditions which indicate the status of other - // ingress controller features and capabilities. - // - // * LoadBalancerManaged - // - True if the following conditions are met: - // * The endpoint publishing strategy requires a service load balancer. - // - False if any of those conditions are unsatisfied. - // - // * LoadBalancerReady - // - True if the following conditions are met: - // * A load balancer is managed. - // * The load balancer is ready. - // - False if any of those conditions are unsatisfied. - // - // * DNSManaged - // - True if the following conditions are met: - // * The endpoint publishing strategy and platform support DNS. - // * The ingress controller domain is set. - // * dns.config.openshift.io/cluster configures DNS zones. - // - False if any of those conditions are unsatisfied. - // - // * DNSReady - // - True if the following conditions are met: - // * DNS is managed. - // * DNS records have been successfully created. - // - False if any of those conditions are unsatisfied. - Conditions []OperatorConditionApplyConfiguration `json:"conditions,omitempty"` - // tlsProfile is the TLS connection configuration that is in effect. - TLSProfile *configv1.TLSProfileSpec `json:"tlsProfile,omitempty"` - // observedGeneration is the most recent generation observed. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - // namespaceSelector is the actual namespaceSelector in use. - NamespaceSelector *metav1.LabelSelectorApplyConfiguration `json:"namespaceSelector,omitempty"` - // routeSelector is the actual routeSelector in use. - RouteSelector *metav1.LabelSelectorApplyConfiguration `json:"routeSelector,omitempty"` - // effectiveHAProxyVersion reports the HAProxy version currently in use by - // this IngressController. This reflects the resolved value of the - // spec.haproxyVersion field. When omitted, the effective value has not yet - // been resolved by the operator or the feature is not enabled for this cluster. - // - // Examples for OpenShift 5.0: - // - "3.2": Using HAProxy 3.2 - // - "2.8": Using HAProxy 2.8 - EffectiveHAProxyVersion *operatorv1.HAProxyVersion `json:"effectiveHAProxyVersion,omitempty"` -} - -// IngressControllerStatusApplyConfiguration constructs a declarative configuration of the IngressControllerStatus type for use with -// apply. -func IngressControllerStatus() *IngressControllerStatusApplyConfiguration { - return &IngressControllerStatusApplyConfiguration{} -} - -// WithAvailableReplicas sets the AvailableReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AvailableReplicas field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithAvailableReplicas(value int32) *IngressControllerStatusApplyConfiguration { - b.AvailableReplicas = &value - return b -} - -// WithSelector sets the Selector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Selector field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithSelector(value string) *IngressControllerStatusApplyConfiguration { - b.Selector = &value - return b -} - -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithDomain(value string) *IngressControllerStatusApplyConfiguration { - b.Domain = &value - return b -} - -// WithEndpointPublishingStrategy sets the EndpointPublishingStrategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EndpointPublishingStrategy field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithEndpointPublishingStrategy(value *EndpointPublishingStrategyApplyConfiguration) *IngressControllerStatusApplyConfiguration { - b.EndpointPublishingStrategy = value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *IngressControllerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *IngressControllerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithTLSProfile sets the TLSProfile field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSProfile field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithTLSProfile(value configv1.TLSProfileSpec) *IngressControllerStatusApplyConfiguration { - b.TLSProfile = &value - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithObservedGeneration(value int64) *IngressControllerStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} - -// WithNamespaceSelector sets the NamespaceSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamespaceSelector field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithNamespaceSelector(value *metav1.LabelSelectorApplyConfiguration) *IngressControllerStatusApplyConfiguration { - b.NamespaceSelector = value - return b -} - -// WithRouteSelector sets the RouteSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RouteSelector field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithRouteSelector(value *metav1.LabelSelectorApplyConfiguration) *IngressControllerStatusApplyConfiguration { - b.RouteSelector = value - return b -} - -// WithEffectiveHAProxyVersion sets the EffectiveHAProxyVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EffectiveHAProxyVersion field is set to the value of the last call. -func (b *IngressControllerStatusApplyConfiguration) WithEffectiveHAProxyVersion(value operatorv1.HAProxyVersion) *IngressControllerStatusApplyConfiguration { - b.EffectiveHAProxyVersion = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go deleted file mode 100644 index d62c99282..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ingresscontrollertuningoptions.go +++ /dev/null @@ -1,365 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// IngressControllerTuningOptionsApplyConfiguration represents a declarative configuration of the IngressControllerTuningOptions type for use -// with apply. -// -// IngressControllerTuningOptions specifies options for tuning the performance -// of ingress controller pods -type IngressControllerTuningOptionsApplyConfiguration struct { - // headerBufferBytes describes how much memory should be reserved - // (in bytes) for IngressController connection sessions. - // Note that this value must be at least 16384 if HTTP/2 is - // enabled for the IngressController (https://tools.ietf.org/html/rfc7540). - // If this field is empty, the IngressController will use a default value - // of 32768 bytes. - // - // Setting this field is generally not recommended as headerBufferBytes - // values that are too small may break the IngressController and - // headerBufferBytes values that are too large could cause the - // IngressController to use significantly more memory than necessary. - HeaderBufferBytes *int32 `json:"headerBufferBytes,omitempty"` - // headerBufferMaxRewriteBytes describes how much memory should be reserved - // (in bytes) from headerBufferBytes for HTTP header rewriting - // and appending for IngressController connection sessions. - // Note that incoming HTTP requests will be limited to - // (headerBufferBytes - headerBufferMaxRewriteBytes) bytes, meaning - // headerBufferBytes must be greater than headerBufferMaxRewriteBytes. - // If this field is empty, the IngressController will use a default value - // of 8192 bytes. - // - // Setting this field is generally not recommended as - // headerBufferMaxRewriteBytes values that are too small may break the - // IngressController and headerBufferMaxRewriteBytes values that are too - // large could cause the IngressController to use significantly more memory - // than necessary. - HeaderBufferMaxRewriteBytes *int32 `json:"headerBufferMaxRewriteBytes,omitempty"` - // threadCount defines the number of threads created per HAProxy process. - // Creating more threads allows each ingress controller pod to handle more - // connections, at the cost of more system resources being used. HAProxy - // currently supports up to 64 threads. If this field is empty, the - // IngressController will use the default value. The current default is 4 - // threads, but this may change in future releases. - // - // Setting this field is generally not recommended. Increasing the number - // of HAProxy threads allows ingress controller pods to utilize more CPU - // time under load, potentially starving other pods if set too high. - // Reducing the number of threads may cause the ingress controller to - // perform poorly. - ThreadCount *int32 `json:"threadCount,omitempty"` - // clientTimeout defines how long a connection will be held open while - // waiting for a client response. - // - // If unset, the default timeout is 30s - ClientTimeout *metav1.Duration `json:"clientTimeout,omitempty"` - // clientFinTimeout defines how long a connection will be held open while - // waiting for the client response to the server/backend closing the - // connection. - // - // If unset, the default timeout is 1s - ClientFinTimeout *metav1.Duration `json:"clientFinTimeout,omitempty"` - // serverTimeout defines how long a connection will be held open while - // waiting for a server/backend response. - // - // If unset, the default timeout is 30s - ServerTimeout *metav1.Duration `json:"serverTimeout,omitempty"` - // serverFinTimeout defines how long a connection will be held open while - // waiting for the server/backend response to the client closing the - // connection. - // - // If unset, the default timeout is 1s - ServerFinTimeout *metav1.Duration `json:"serverFinTimeout,omitempty"` - // tunnelTimeout defines how long a tunnel connection (including - // websockets) will be held open while the tunnel is idle. - // - // If unset, the default timeout is 1h - TunnelTimeout *metav1.Duration `json:"tunnelTimeout,omitempty"` - // connectTimeout defines the maximum time to wait for - // a connection attempt to a server/backend to succeed. - // - // This field expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, e.g. "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // When omitted, this means the user has no opinion and the platform is left - // to choose a reasonable default. This default is subject to change over time. - // The current default is 5s. - ConnectTimeout *metav1.Duration `json:"connectTimeout,omitempty"` - // httpKeepAliveTimeout defines the maximum allowed time to wait for - // a new HTTP request to appear on a connection from the client to the router. - // - // This field expects an unsigned duration string of a decimal number, with optional - // fraction and a unit suffix, e.g. "300ms", "1.5s" or "2m45s". - // Valid time units are "ms", "s", "m". - // The allowed range is from 1 millisecond to 15 minutes. - // - // When omitted, this means the user has no opinion and the platform is left - // to choose a reasonable default. This default is subject to change over time. - // The current default is 300s. - // - // Low values (tens of milliseconds or less) can cause clients to close and reopen connections - // for each request, leading to reduced connection sharing. - // For HTTP/2, special care should be taken with low values. - // A few seconds is a reasonable starting point to avoid holding idle connections open - // while still allowing subsequent requests to reuse the connection. - // - // High values (minutes or more) favor connection reuse but may cause idle - // connections to linger longer. - HTTPKeepAliveTimeout *metav1.Duration `json:"httpKeepAliveTimeout,omitempty"` - // tlsInspectDelay defines how long the router can hold data to find a - // matching route. - // - // Setting this too short can cause the router to fall back to the default - // certificate for edge-terminated or reencrypt routes even when a better - // matching certificate could be used. - // - // If unset, the default inspect delay is 5s - TLSInspectDelay *metav1.Duration `json:"tlsInspectDelay,omitempty"` - // healthCheckInterval defines how long the router waits between two consecutive - // health checks on its configured backends. This value is applied globally as - // a default for all routes, but may be overridden per-route by the route annotation - // "router.openshift.io/haproxy.health.check.interval". - // - // Expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, eg "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // Setting this to less than 5s can cause excess traffic due to too frequent - // TCP health checks and accompanying SYN packet storms. Alternatively, setting - // this too high can result in increased latency, due to backend servers that are no - // longer available, but haven't yet been detected as such. - // - // An empty or zero healthCheckInterval means no opinion and IngressController chooses - // a default, which is subject to change over time. - // Currently the default healthCheckInterval value is 5s. - // - // Currently the minimum allowed value is 1s and the maximum allowed value is - // 2147483647ms (24.85 days). Both are subject to change over time. - HealthCheckInterval *metav1.Duration `json:"healthCheckInterval,omitempty"` - // maxConnections defines the maximum number of simultaneous - // connections that can be established per HAProxy process. - // Increasing this value allows each ingress controller pod to - // handle more connections but at the cost of additional - // system resources being consumed. - // - // Permitted values are: empty, 0, -1, and the range - // 2000-2000000. - // - // If this field is empty or 0, the IngressController will use - // the default value of 50000, but the default is subject to - // change in future releases. - // - // If the value is -1 then HAProxy will dynamically compute a - // maximum value based on the available ulimits in the running - // container. Selecting -1 (i.e., auto) will result in a large - // value being computed (~520000 on OpenShift >=4.10 clusters) - // and therefore each HAProxy process will incur significant - // memory usage compared to the current default of 50000. - // - // Setting a value that is greater than the current operating - // system limit will prevent the HAProxy process from - // starting. - // - // If you choose a discrete value (e.g., 750000) and the - // router pod is migrated to a new node, there's no guarantee - // that that new node has identical ulimits configured. In - // such a scenario the pod would fail to start. If you have - // nodes with different ulimits configured (e.g., different - // tuned profiles) and you choose a discrete value then the - // guidance is to use -1 and let the value be computed - // dynamically at runtime. - // - // You can monitor memory usage for router containers with the - // following metric: - // 'container_memory_working_set_bytes{container="router",namespace="openshift-ingress"}'. - // - // You can monitor memory usage of individual HAProxy - // processes in router containers with the following metric: - // 'container_memory_working_set_bytes{container="router",namespace="openshift-ingress"}/container_processes{container="router",namespace="openshift-ingress"}'. - MaxConnections *int32 `json:"maxConnections,omitempty"` - // reloadInterval defines the minimum interval at which the router is allowed to reload - // to accept new changes. Increasing this value can prevent the accumulation of - // HAProxy processes, depending on the scenario. Increasing this interval can - // also lessen load imbalance on a backend's servers when using the roundrobin - // balancing algorithm. Alternatively, decreasing this value may decrease latency - // since updates to HAProxy's configuration can take effect more quickly. - // - // The value must be a time duration value; see . - // Currently, the minimum value allowed is 1s, and the maximum allowed value is - // 120s. Minimum and maximum allowed values may change in future versions of OpenShift. - // Note that if a duration outside of these bounds is provided, the value of reloadInterval - // will be capped/floored and not rejected (e.g. a duration of over 120s will be capped to - // 120s; the IngressController will not reject and replace this disallowed value with - // the default). - // - // A zero value for reloadInterval tells the IngressController to choose the default, - // which is currently 5s and subject to change without notice. - // - // This field expects an unsigned duration string of decimal numbers, each with optional - // fraction and a unit suffix, e.g. "300ms", "1.5h" or "2h45m". - // Valid time units are "ns", "us" (or "µs" U+00B5 or "μs" U+03BC), "ms", "s", "m", "h". - // - // Note: Setting a value significantly larger than the default of 5s can cause latency - // in observing updates to routes and their endpoints. HAProxy's configuration will - // be reloaded less frequently, and newly created routes will not be served until the - // subsequent reload. - ReloadInterval *metav1.Duration `json:"reloadInterval,omitempty"` - // configurationManagement specifies how OpenShift router should update - // the HAProxy configuration. The following values are valid for this - // field: - // - // * "ForkAndReload". - // * "Dynamic". - // - // Omitting this field means that the user has no opinion and the - // platform may choose a reasonable default. This default is subject to - // change over time. The current default is "ForkAndReload". - // - // "ForkAndReload" means that OpenShift router should rewrite the - // HAProxy configuration file and instruct HAProxy to fork and reload. - // This is OpenShift router's traditional approach. - // - // "Dynamic" means that OpenShift router may use HAProxy's control - // socket for some configuration updates and fall back to fork and - // reload for other configuration updates. This is a newer approach, - // which may be less mature than ForkAndReload. This setting can - // improve load-balancing fairness and metrics accuracy and reduce CPU - // and memory usage if HAProxy has frequent configuration updates for - // route and endpoints updates. - // - // Note: The "Dynamic" option is currently experimental and should not - // be enabled on production clusters. - ConfigurationManagement *operatorv1.IngressControllerConfigurationManagement `json:"configurationManagement,omitempty"` -} - -// IngressControllerTuningOptionsApplyConfiguration constructs a declarative configuration of the IngressControllerTuningOptions type for use with -// apply. -func IngressControllerTuningOptions() *IngressControllerTuningOptionsApplyConfiguration { - return &IngressControllerTuningOptionsApplyConfiguration{} -} - -// WithHeaderBufferBytes sets the HeaderBufferBytes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HeaderBufferBytes field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithHeaderBufferBytes(value int32) *IngressControllerTuningOptionsApplyConfiguration { - b.HeaderBufferBytes = &value - return b -} - -// WithHeaderBufferMaxRewriteBytes sets the HeaderBufferMaxRewriteBytes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HeaderBufferMaxRewriteBytes field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithHeaderBufferMaxRewriteBytes(value int32) *IngressControllerTuningOptionsApplyConfiguration { - b.HeaderBufferMaxRewriteBytes = &value - return b -} - -// WithThreadCount sets the ThreadCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ThreadCount field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithThreadCount(value int32) *IngressControllerTuningOptionsApplyConfiguration { - b.ThreadCount = &value - return b -} - -// WithClientTimeout sets the ClientTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ClientTimeout = &value - return b -} - -// WithClientFinTimeout sets the ClientFinTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientFinTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithClientFinTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ClientFinTimeout = &value - return b -} - -// WithServerTimeout sets the ServerTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServerTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ServerTimeout = &value - return b -} - -// WithServerFinTimeout sets the ServerFinTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServerFinTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithServerFinTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ServerFinTimeout = &value - return b -} - -// WithTunnelTimeout sets the TunnelTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TunnelTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithTunnelTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.TunnelTimeout = &value - return b -} - -// WithConnectTimeout sets the ConnectTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConnectTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithConnectTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ConnectTimeout = &value - return b -} - -// WithHTTPKeepAliveTimeout sets the HTTPKeepAliveTimeout field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HTTPKeepAliveTimeout field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithHTTPKeepAliveTimeout(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.HTTPKeepAliveTimeout = &value - return b -} - -// WithTLSInspectDelay sets the TLSInspectDelay field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TLSInspectDelay field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithTLSInspectDelay(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.TLSInspectDelay = &value - return b -} - -// WithHealthCheckInterval sets the HealthCheckInterval field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HealthCheckInterval field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithHealthCheckInterval(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.HealthCheckInterval = &value - return b -} - -// WithMaxConnections sets the MaxConnections field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxConnections field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithMaxConnections(value int32) *IngressControllerTuningOptionsApplyConfiguration { - b.MaxConnections = &value - return b -} - -// WithReloadInterval sets the ReloadInterval field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReloadInterval field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithReloadInterval(value metav1.Duration) *IngressControllerTuningOptionsApplyConfiguration { - b.ReloadInterval = &value - return b -} - -// WithConfigurationManagement sets the ConfigurationManagement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ConfigurationManagement field is set to the value of the last call. -func (b *IngressControllerTuningOptionsApplyConfiguration) WithConfigurationManagement(value operatorv1.IngressControllerConfigurationManagement) *IngressControllerTuningOptionsApplyConfiguration { - b.ConfigurationManagement = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperator.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperator.go deleted file mode 100644 index 6210c9020..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperator.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// InsightsOperatorApplyConfiguration represents a declarative configuration of the InsightsOperator type for use -// with apply. -// -// InsightsOperator holds cluster-wide information about the Insights Operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type InsightsOperatorApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Insights. - Spec *InsightsOperatorSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the Insights operator. - Status *InsightsOperatorStatusApplyConfiguration `json:"status,omitempty"` -} - -// InsightsOperator constructs a declarative configuration of the InsightsOperator type for use with -// apply. -func InsightsOperator(name string) *InsightsOperatorApplyConfiguration { - b := &InsightsOperatorApplyConfiguration{} - b.WithName(name) - b.WithKind("InsightsOperator") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractInsightsOperatorFrom extracts the applied configuration owned by fieldManager from -// insightsOperator for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// insightsOperator must be a unmodified InsightsOperator API object that was retrieved from the Kubernetes API. -// ExtractInsightsOperatorFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsOperatorFrom(insightsOperator *operatorv1.InsightsOperator, fieldManager string, subresource string) (*InsightsOperatorApplyConfiguration, error) { - b := &InsightsOperatorApplyConfiguration{} - err := managedfields.ExtractInto(insightsOperator, internal.Parser().Type("com.github.openshift.api.operator.v1.InsightsOperator"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(insightsOperator.Name) - - b.WithKind("InsightsOperator") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractInsightsOperator extracts the applied configuration owned by fieldManager from -// insightsOperator. If no managedFields are found in insightsOperator for fieldManager, a -// InsightsOperatorApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// insightsOperator must be a unmodified InsightsOperator API object that was retrieved from the Kubernetes API. -// ExtractInsightsOperator provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractInsightsOperator(insightsOperator *operatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { - return ExtractInsightsOperatorFrom(insightsOperator, fieldManager, "") -} - -// ExtractInsightsOperatorStatus extracts the applied configuration owned by fieldManager from -// insightsOperator for the status subresource. -func ExtractInsightsOperatorStatus(insightsOperator *operatorv1.InsightsOperator, fieldManager string) (*InsightsOperatorApplyConfiguration, error) { - return ExtractInsightsOperatorFrom(insightsOperator, fieldManager, "status") -} - -func (b InsightsOperatorApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithKind(value string) *InsightsOperatorApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithAPIVersion(value string) *InsightsOperatorApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithName(value string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithGenerateName(value string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithNamespace(value string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithUID(value types.UID) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithResourceVersion(value string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithGeneration(value int64) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *InsightsOperatorApplyConfiguration) WithLabels(entries map[string]string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *InsightsOperatorApplyConfiguration) WithAnnotations(entries map[string]string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *InsightsOperatorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *InsightsOperatorApplyConfiguration) WithFinalizers(values ...string) *InsightsOperatorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *InsightsOperatorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithSpec(value *InsightsOperatorSpecApplyConfiguration) *InsightsOperatorApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *InsightsOperatorApplyConfiguration) WithStatus(value *InsightsOperatorStatusApplyConfiguration) *InsightsOperatorApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *InsightsOperatorApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *InsightsOperatorApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *InsightsOperatorApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *InsightsOperatorApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorspec.go deleted file mode 100644 index c6085db4a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// InsightsOperatorSpecApplyConfiguration represents a declarative configuration of the InsightsOperatorSpec type for use -// with apply. -type InsightsOperatorSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// InsightsOperatorSpecApplyConfiguration constructs a declarative configuration of the InsightsOperatorSpec type for use with -// apply. -func InsightsOperatorSpec() *InsightsOperatorSpecApplyConfiguration { - return &InsightsOperatorSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *InsightsOperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *InsightsOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *InsightsOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *InsightsOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *InsightsOperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *InsightsOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *InsightsOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *InsightsOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *InsightsOperatorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *InsightsOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go deleted file mode 100644 index 241bd6da6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsoperatorstatus.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// InsightsOperatorStatusApplyConfiguration represents a declarative configuration of the InsightsOperatorStatus type for use -// with apply. -type InsightsOperatorStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` - // gatherStatus provides basic information about the last Insights data gathering. - // When omitted, this means no data gathering has taken place yet. - GatherStatus *GatherStatusApplyConfiguration `json:"gatherStatus,omitempty"` - // insightsReport provides general Insights analysis results. - // When omitted, this means no data gathering has taken place yet. - InsightsReport *InsightsReportApplyConfiguration `json:"insightsReport,omitempty"` -} - -// InsightsOperatorStatusApplyConfiguration constructs a declarative configuration of the InsightsOperatorStatus type for use with -// apply. -func InsightsOperatorStatus() *InsightsOperatorStatusApplyConfiguration { - return &InsightsOperatorStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithObservedGeneration(value int64) *InsightsOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *InsightsOperatorStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *InsightsOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithVersion(value string) *InsightsOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithReadyReplicas(value int32) *InsightsOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *InsightsOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *InsightsOperatorStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *InsightsOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithGatherStatus sets the GatherStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GatherStatus field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithGatherStatus(value *GatherStatusApplyConfiguration) *InsightsOperatorStatusApplyConfiguration { - b.GatherStatus = value - return b -} - -// WithInsightsReport sets the InsightsReport field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InsightsReport field is set to the value of the last call. -func (b *InsightsOperatorStatusApplyConfiguration) WithInsightsReport(value *InsightsReportApplyConfiguration) *InsightsOperatorStatusApplyConfiguration { - b.InsightsReport = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsreport.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsreport.go deleted file mode 100644 index 1c2c0aba4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/insightsreport.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// InsightsReportApplyConfiguration represents a declarative configuration of the InsightsReport type for use -// with apply. -// -// insightsReport provides Insights health check report based on the most -// recently sent Insights data. -type InsightsReportApplyConfiguration struct { - // downloadedAt is the time when the last Insights report was downloaded. - // An empty value means that there has not been any Insights report downloaded yet and - // it usually appears in disconnected clusters (or clusters when the Insights data gathering is disabled). - DownloadedAt *metav1.Time `json:"downloadedAt,omitempty"` - // healthChecks provides basic information about active Insights health checks - // in a cluster. - HealthChecks []HealthCheckApplyConfiguration `json:"healthChecks,omitempty"` -} - -// InsightsReportApplyConfiguration constructs a declarative configuration of the InsightsReport type for use with -// apply. -func InsightsReport() *InsightsReportApplyConfiguration { - return &InsightsReportApplyConfiguration{} -} - -// WithDownloadedAt sets the DownloadedAt field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DownloadedAt field is set to the value of the last call. -func (b *InsightsReportApplyConfiguration) WithDownloadedAt(value metav1.Time) *InsightsReportApplyConfiguration { - b.DownloadedAt = &value - return b -} - -// WithHealthChecks adds the given value to the HealthChecks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HealthChecks field. -func (b *InsightsReportApplyConfiguration) WithHealthChecks(values ...*HealthCheckApplyConfiguration) *InsightsReportApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHealthChecks") - } - b.HealthChecks = append(b.HealthChecks, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipamconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipamconfig.go deleted file mode 100644 index 31baa00a5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipamconfig.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IPAMConfigApplyConfiguration represents a declarative configuration of the IPAMConfig type for use -// with apply. -// -// IPAMConfig contains configurations for IPAM (IP Address Management) -type IPAMConfigApplyConfiguration struct { - // type is the type of IPAM module will be used for IP Address Management(IPAM). - // The supported values are IPAMTypeDHCP, IPAMTypeStatic - Type *operatorv1.IPAMType `json:"type,omitempty"` - // staticIPAMConfig configures the static IP address in case of type:IPAMTypeStatic - StaticIPAMConfig *StaticIPAMConfigApplyConfiguration `json:"staticIPAMConfig,omitempty"` -} - -// IPAMConfigApplyConfiguration constructs a declarative configuration of the IPAMConfig type for use with -// apply. -func IPAMConfig() *IPAMConfigApplyConfiguration { - return &IPAMConfigApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *IPAMConfigApplyConfiguration) WithType(value operatorv1.IPAMType) *IPAMConfigApplyConfiguration { - b.Type = &value - return b -} - -// WithStaticIPAMConfig sets the StaticIPAMConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StaticIPAMConfig field is set to the value of the last call. -func (b *IPAMConfigApplyConfiguration) WithStaticIPAMConfig(value *StaticIPAMConfigApplyConfiguration) *IPAMConfigApplyConfiguration { - b.StaticIPAMConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipfixconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipfixconfig.go deleted file mode 100644 index c398a8367..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipfixconfig.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IPFIXConfigApplyConfiguration represents a declarative configuration of the IPFIXConfig type for use -// with apply. -type IPFIXConfigApplyConfiguration struct { - // ipfixCollectors is list of strings formatted as ip:port with a maximum of ten items - Collectors []operatorv1.IPPort `json:"collectors,omitempty"` -} - -// IPFIXConfigApplyConfiguration constructs a declarative configuration of the IPFIXConfig type for use with -// apply. -func IPFIXConfig() *IPFIXConfigApplyConfiguration { - return &IPFIXConfigApplyConfiguration{} -} - -// WithCollectors adds the given value to the Collectors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *IPFIXConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *IPFIXConfigApplyConfiguration { - for i := range values { - b.Collectors = append(b.Collectors, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecconfig.go deleted file mode 100644 index 31ca08976..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecconfig.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IPsecConfigApplyConfiguration represents a declarative configuration of the IPsecConfig type for use -// with apply. -type IPsecConfigApplyConfiguration struct { - // mode defines the behaviour of the ipsec configuration within the platform. - // Valid values are `Disabled`, `External` and `Full`. - // When 'Disabled', ipsec will not be enabled at the node level. - // When 'External', ipsec is enabled on the node level but requires the user to configure the secure communication parameters. - // This mode is for external secure communications and the configuration can be done using the k8s-nmstate operator. - // When 'Full', ipsec is configured on the node level and inter-pod secure communication within the cluster is configured. - // Note with `Full`, if ipsec is desired for communication with external (to the cluster) entities (such as storage arrays), - // this is left to the user to configure. - Mode *operatorv1.IPsecMode `json:"mode,omitempty"` - // full defines configuration parameters for the IPsec `Full` mode. - // This is permitted only when mode is configured with `Full`, - // and forbidden otherwise. - Full *IPsecFullModeConfigApplyConfiguration `json:"full,omitempty"` -} - -// IPsecConfigApplyConfiguration constructs a declarative configuration of the IPsecConfig type for use with -// apply. -func IPsecConfig() *IPsecConfigApplyConfiguration { - return &IPsecConfigApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *IPsecConfigApplyConfiguration) WithMode(value operatorv1.IPsecMode) *IPsecConfigApplyConfiguration { - b.Mode = &value - return b -} - -// WithFull sets the Full field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Full field is set to the value of the last call. -func (b *IPsecConfigApplyConfiguration) WithFull(value *IPsecFullModeConfigApplyConfiguration) *IPsecConfigApplyConfiguration { - b.Full = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecfullmodeconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecfullmodeconfig.go deleted file mode 100644 index f6ee7b187..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipsecfullmodeconfig.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IPsecFullModeConfigApplyConfiguration represents a declarative configuration of the IPsecFullModeConfig type for use -// with apply. -// -// IPsecFullModeConfig defines configuration parameters for the IPsec `Full` mode. -type IPsecFullModeConfigApplyConfiguration struct { - // encapsulation option to configure libreswan on how inter-pod traffic across nodes - // are encapsulated to handle NAT traversal. When configured it uses UDP port 4500 - // for the encapsulation. - // Valid values are Always, Auto and omitted. - // Always means enable UDP encapsulation regardless of whether NAT is detected. - // Auto means enable UDP encapsulation based on the detection of NAT. - // When omitted, this means no opinion and the platform is left to choose a reasonable - // default, which is subject to change over time. The current default is Auto. - Encapsulation *operatorv1.Encapsulation `json:"encapsulation,omitempty"` -} - -// IPsecFullModeConfigApplyConfiguration constructs a declarative configuration of the IPsecFullModeConfig type for use with -// apply. -func IPsecFullModeConfig() *IPsecFullModeConfigApplyConfiguration { - return &IPsecFullModeConfigApplyConfiguration{} -} - -// WithEncapsulation sets the Encapsulation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Encapsulation field is set to the value of the last call. -func (b *IPsecFullModeConfigApplyConfiguration) WithEncapsulation(value operatorv1.Encapsulation) *IPsecFullModeConfigApplyConfiguration { - b.Encapsulation = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4gatewayconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4gatewayconfig.go deleted file mode 100644 index b4fe6aae8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4gatewayconfig.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IPv4GatewayConfigApplyConfiguration represents a declarative configuration of the IPv4GatewayConfig type for use -// with apply. -// -// IPV4GatewayConfig holds the configuration paramaters for IPV4 connections in the GatewayConfig for OVN-Kubernetes -type IPv4GatewayConfigApplyConfiguration struct { - // internalMasqueradeSubnet contains the masquerade addresses in IPV4 CIDR format used internally by - // ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these - // addresses, as well as the shared gateway bridge interface. The values can be changed after - // installation. The subnet chosen should not overlap with other networks specified for - // OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must - // be large enough to accommodate 6 IPs (maximum prefix length /29). - // When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. - // The current default subnet is 169.254.0.0/17 - // The value must be in proper IPV4 CIDR format - InternalMasqueradeSubnet *string `json:"internalMasqueradeSubnet,omitempty"` -} - -// IPv4GatewayConfigApplyConfiguration constructs a declarative configuration of the IPv4GatewayConfig type for use with -// apply. -func IPv4GatewayConfig() *IPv4GatewayConfigApplyConfiguration { - return &IPv4GatewayConfigApplyConfiguration{} -} - -// WithInternalMasqueradeSubnet sets the InternalMasqueradeSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalMasqueradeSubnet field is set to the value of the last call. -func (b *IPv4GatewayConfigApplyConfiguration) WithInternalMasqueradeSubnet(value string) *IPv4GatewayConfigApplyConfiguration { - b.InternalMasqueradeSubnet = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4ovnkubernetesconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4ovnkubernetesconfig.go deleted file mode 100644 index 8d7b75e82..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv4ovnkubernetesconfig.go +++ /dev/null @@ -1,49 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IPv4OVNKubernetesConfigApplyConfiguration represents a declarative configuration of the IPv4OVNKubernetesConfig type for use -// with apply. -type IPv4OVNKubernetesConfigApplyConfiguration struct { - // internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally - // by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect - // architecture that connects the cluster routers on each node together to enable - // east west traffic. The subnet chosen should not overlap with other networks - // specified for OVN-Kubernetes as well as other networks used on the host. - // When ommitted, this means no opinion and the platform is left to choose a reasonable - // default which is subject to change over time. - // The current default subnet is 100.88.0.0/16 - // The subnet must be large enough to accommodate one IP per node in your cluster - // The value must be in proper IPV4 CIDR format - InternalTransitSwitchSubnet *string `json:"internalTransitSwitchSubnet,omitempty"` - // internalJoinSubnet is a v4 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // The current default value is 100.64.0.0/16 - // The subnet must be large enough to accommodate one IP per node in your cluster - // The value must be in proper IPV4 CIDR format - InternalJoinSubnet *string `json:"internalJoinSubnet,omitempty"` -} - -// IPv4OVNKubernetesConfigApplyConfiguration constructs a declarative configuration of the IPv4OVNKubernetesConfig type for use with -// apply. -func IPv4OVNKubernetesConfig() *IPv4OVNKubernetesConfigApplyConfiguration { - return &IPv4OVNKubernetesConfigApplyConfiguration{} -} - -// WithInternalTransitSwitchSubnet sets the InternalTransitSwitchSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalTransitSwitchSubnet field is set to the value of the last call. -func (b *IPv4OVNKubernetesConfigApplyConfiguration) WithInternalTransitSwitchSubnet(value string) *IPv4OVNKubernetesConfigApplyConfiguration { - b.InternalTransitSwitchSubnet = &value - return b -} - -// WithInternalJoinSubnet sets the InternalJoinSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalJoinSubnet field is set to the value of the last call. -func (b *IPv4OVNKubernetesConfigApplyConfiguration) WithInternalJoinSubnet(value string) *IPv4OVNKubernetesConfigApplyConfiguration { - b.InternalJoinSubnet = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6gatewayconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6gatewayconfig.go deleted file mode 100644 index bf74cf3c1..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6gatewayconfig.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IPv6GatewayConfigApplyConfiguration represents a declarative configuration of the IPv6GatewayConfig type for use -// with apply. -// -// IPV6GatewayConfig holds the configuration paramaters for IPV6 connections in the GatewayConfig for OVN-Kubernetes -type IPv6GatewayConfigApplyConfiguration struct { - // internalMasqueradeSubnet contains the masquerade addresses in IPV6 CIDR format used internally by - // ovn-kubernetes to enable host to service traffic. Each host in the cluster is configured with these - // addresses, as well as the shared gateway bridge interface. The values can be changed after - // installation. The subnet chosen should not overlap with other networks specified for - // OVN-Kubernetes as well as other networks used on the host. Additionally the subnet must - // be large enough to accommodate 6 IPs (maximum prefix length /125). - // When omitted, this means no opinion and the platform is left to choose a reasonable default which is subject to change over time. - // The current default subnet is fd69::/112 - // Note that IPV6 dual addresses are not permitted - InternalMasqueradeSubnet *string `json:"internalMasqueradeSubnet,omitempty"` -} - -// IPv6GatewayConfigApplyConfiguration constructs a declarative configuration of the IPv6GatewayConfig type for use with -// apply. -func IPv6GatewayConfig() *IPv6GatewayConfigApplyConfiguration { - return &IPv6GatewayConfigApplyConfiguration{} -} - -// WithInternalMasqueradeSubnet sets the InternalMasqueradeSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalMasqueradeSubnet field is set to the value of the last call. -func (b *IPv6GatewayConfigApplyConfiguration) WithInternalMasqueradeSubnet(value string) *IPv6GatewayConfigApplyConfiguration { - b.InternalMasqueradeSubnet = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6ovnkubernetesconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6ovnkubernetesconfig.go deleted file mode 100644 index 4cd1745d8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ipv6ovnkubernetesconfig.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// IPv6OVNKubernetesConfigApplyConfiguration represents a declarative configuration of the IPv6OVNKubernetesConfig type for use -// with apply. -type IPv6OVNKubernetesConfigApplyConfiguration struct { - // internalTransitSwitchSubnet is a v4 subnet in IPV4 CIDR format used internally - // by OVN-Kubernetes for the distributed transit switch in the OVN Interconnect - // architecture that connects the cluster routers on each node together to enable - // east west traffic. The subnet chosen should not overlap with other networks - // specified for OVN-Kubernetes as well as other networks used on the host. - // When ommitted, this means no opinion and the platform is left to choose a reasonable - // default which is subject to change over time. - // The subnet must be large enough to accommodate one IP per node in your cluster - // The current default subnet is fd97::/64 - // The value must be in proper IPV6 CIDR format - // Note that IPV6 dual addresses are not permitted - InternalTransitSwitchSubnet *string `json:"internalTransitSwitchSubnet,omitempty"` - // internalJoinSubnet is a v6 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // The subnet must be large enough to accommodate one IP per node in your cluster - // The current default value is fd98::/64 - // The value must be in proper IPV6 CIDR format - // Note that IPV6 dual addresses are not permitted - InternalJoinSubnet *string `json:"internalJoinSubnet,omitempty"` -} - -// IPv6OVNKubernetesConfigApplyConfiguration constructs a declarative configuration of the IPv6OVNKubernetesConfig type for use with -// apply. -func IPv6OVNKubernetesConfig() *IPv6OVNKubernetesConfigApplyConfiguration { - return &IPv6OVNKubernetesConfigApplyConfiguration{} -} - -// WithInternalTransitSwitchSubnet sets the InternalTransitSwitchSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalTransitSwitchSubnet field is set to the value of the last call. -func (b *IPv6OVNKubernetesConfigApplyConfiguration) WithInternalTransitSwitchSubnet(value string) *IPv6OVNKubernetesConfigApplyConfiguration { - b.InternalTransitSwitchSubnet = &value - return b -} - -// WithInternalJoinSubnet sets the InternalJoinSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InternalJoinSubnet field is set to the value of the last call. -func (b *IPv6OVNKubernetesConfigApplyConfiguration) WithInternalJoinSubnet(value string) *IPv6OVNKubernetesConfigApplyConfiguration { - b.InternalJoinSubnet = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/irreconcilablevalidationoverrides.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/irreconcilablevalidationoverrides.go deleted file mode 100644 index 77f3fa315..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/irreconcilablevalidationoverrides.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// IrreconcilableValidationOverridesApplyConfiguration represents a declarative configuration of the IrreconcilableValidationOverrides type for use -// with apply. -// -// IrreconcilableValidationOverrides holds the irreconcilable validations overrides to be applied on each rendered -// MachineConfig generation. -type IrreconcilableValidationOverridesApplyConfiguration struct { - // storage can be used to allow making irreconcilable changes to the selected sections under the - // `spec.config.storage` field of MachineConfig CRs - // It must have at least one item, may not exceed 3 items and must not contain duplicates. - // Allowed element values are "Disks", "FileSystems", "Raid" and omitted. - // When contains "Disks" changes to the `spec.config.storage.disks` section of MachineConfig CRs are allowed. - // When contains "FileSystems" changes to the `spec.config.storage.filesystems` section of MachineConfig CRs are allowed. - // When contains "Raid" changes to the `spec.config.storage.raid` section of MachineConfig CRs are allowed. - // When omitted changes to the `spec.config.storage` section are forbidden. - Storage []operatorv1.IrreconcilableValidationOverridesStorage `json:"storage,omitempty"` -} - -// IrreconcilableValidationOverridesApplyConfiguration constructs a declarative configuration of the IrreconcilableValidationOverrides type for use with -// apply. -func IrreconcilableValidationOverrides() *IrreconcilableValidationOverridesApplyConfiguration { - return &IrreconcilableValidationOverridesApplyConfiguration{} -} - -// WithStorage adds the given value to the Storage field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Storage field. -func (b *IrreconcilableValidationOverridesApplyConfiguration) WithStorage(values ...operatorv1.IrreconcilableValidationOverridesStorage) *IrreconcilableValidationOverridesApplyConfiguration { - for i := range values { - b.Storage = append(b.Storage, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go deleted file mode 100644 index 34297c214..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmsencryptionstatus.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KMSEncryptionStatusApplyConfiguration represents a declarative configuration of the KMSEncryptionStatus type for use -// with apply. -type KMSEncryptionStatusApplyConfiguration struct { - // healthReports contains all KMS plugin health reports. - // When omitted, no health reports are available. - // Each entry must have a unique combination of nodeName and keyId. - HealthReports []KMSPluginHealthReportApplyConfiguration `json:"healthReports,omitempty"` -} - -// KMSEncryptionStatusApplyConfiguration constructs a declarative configuration of the KMSEncryptionStatus type for use with -// apply. -func KMSEncryptionStatus() *KMSEncryptionStatusApplyConfiguration { - return &KMSEncryptionStatusApplyConfiguration{} -} - -// WithHealthReports adds the given value to the HealthReports field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the HealthReports field. -func (b *KMSEncryptionStatusApplyConfiguration) WithHealthReports(values ...*KMSPluginHealthReportApplyConfiguration) *KMSEncryptionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithHealthReports") - } - b.HealthReports = append(b.HealthReports, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go deleted file mode 100644 index 40d8eac77..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kmspluginhealthreport.go +++ /dev/null @@ -1,91 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// KMSPluginHealthReportApplyConfiguration represents a declarative configuration of the KMSPluginHealthReport type for use -// with apply. -type KMSPluginHealthReportApplyConfiguration struct { - // nodeName is the name of the node this instance of the plugin runs on. - // The combination of nodeName and keyId makes this health report unique. - // The value must be a valid Kubernetes node name: a lowercase RFC 1123 subdomain - // consisting of lowercase alphanumeric characters, '-' or '.', starting and ending with - // an alphanumeric character, and be at most 253 characters in length. - NodeName *string `json:"nodeName,omitempty"` - // keyId is the encryption-key-secret id (kms-{keyId}.sock), a unique identifier of the plugin on that node. - // This is not a cryptographic key used to encrypt/decrypt any resources. - // The value must be between 1 and 512 characters. - KeyId *string `json:"keyId,omitempty"` - // status contains a health indicator for the respective KMS plugin - // The field can have three states: healthy, unhealthy, error. - // With error and unhealthy containing additional information in Detail. - Status *operatorv1.KMSPluginHealthStatus `json:"status,omitempty"` - // lastCheckedTime is a timestamp of when the probe was last checked. - LastCheckedTime *metav1.Time `json:"lastCheckedTime,omitempty"` - // kekId refers to the remote KEK id from KMS v2 StatusResponse.key_id. - // This is not a cryptographic key, but a unique representation of the KEK. - // The value must be between 1 and 1024 characters. - KEKId *string `json:"kekId,omitempty"` - // detail contains additional error/health information for the respective KMS plugin. - // When omitted, no additional error or health information is provided. - // When set, the value must be between 1 and 1024 characters. - Detail *string `json:"detail,omitempty"` -} - -// KMSPluginHealthReportApplyConfiguration constructs a declarative configuration of the KMSPluginHealthReport type for use with -// apply. -func KMSPluginHealthReport() *KMSPluginHealthReportApplyConfiguration { - return &KMSPluginHealthReportApplyConfiguration{} -} - -// WithNodeName sets the NodeName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeName field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithNodeName(value string) *KMSPluginHealthReportApplyConfiguration { - b.NodeName = &value - return b -} - -// WithKeyId sets the KeyId field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KeyId field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithKeyId(value string) *KMSPluginHealthReportApplyConfiguration { - b.KeyId = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithStatus(value operatorv1.KMSPluginHealthStatus) *KMSPluginHealthReportApplyConfiguration { - b.Status = &value - return b -} - -// WithLastCheckedTime sets the LastCheckedTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastCheckedTime field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithLastCheckedTime(value metav1.Time) *KMSPluginHealthReportApplyConfiguration { - b.LastCheckedTime = &value - return b -} - -// WithKEKId sets the KEKId field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KEKId field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithKEKId(value string) *KMSPluginHealthReportApplyConfiguration { - b.KEKId = &value - return b -} - -// WithDetail sets the Detail field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Detail field is set to the value of the last call. -func (b *KMSPluginHealthReportApplyConfiguration) WithDetail(value string) *KMSPluginHealthReportApplyConfiguration { - b.Detail = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserver.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserver.go deleted file mode 100644 index 2ca7409da..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserver.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// KubeAPIServerApplyConfiguration represents a declarative configuration of the KubeAPIServer type for use -// with apply. -// -// KubeAPIServer provides information to configure an operator to manage kube-apiserver. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type KubeAPIServerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Kubernetes API Server - Spec *KubeAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the Kubernetes API Server - Status *KubeAPIServerStatusApplyConfiguration `json:"status,omitempty"` -} - -// KubeAPIServer constructs a declarative configuration of the KubeAPIServer type for use with -// apply. -func KubeAPIServer(name string) *KubeAPIServerApplyConfiguration { - b := &KubeAPIServerApplyConfiguration{} - b.WithName(name) - b.WithKind("KubeAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractKubeAPIServerFrom extracts the applied configuration owned by fieldManager from -// kubeAPIServer for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// kubeAPIServer must be a unmodified KubeAPIServer API object that was retrieved from the Kubernetes API. -// ExtractKubeAPIServerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeAPIServerFrom(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string, subresource string) (*KubeAPIServerApplyConfiguration, error) { - b := &KubeAPIServerApplyConfiguration{} - err := managedfields.ExtractInto(kubeAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeAPIServer"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(kubeAPIServer.Name) - - b.WithKind("KubeAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractKubeAPIServer extracts the applied configuration owned by fieldManager from -// kubeAPIServer. If no managedFields are found in kubeAPIServer for fieldManager, a -// KubeAPIServerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// kubeAPIServer must be a unmodified KubeAPIServer API object that was retrieved from the Kubernetes API. -// ExtractKubeAPIServer provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeAPIServer(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { - return ExtractKubeAPIServerFrom(kubeAPIServer, fieldManager, "") -} - -// ExtractKubeAPIServerStatus extracts the applied configuration owned by fieldManager from -// kubeAPIServer for the status subresource. -func ExtractKubeAPIServerStatus(kubeAPIServer *operatorv1.KubeAPIServer, fieldManager string) (*KubeAPIServerApplyConfiguration, error) { - return ExtractKubeAPIServerFrom(kubeAPIServer, fieldManager, "status") -} - -func (b KubeAPIServerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithKind(value string) *KubeAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithAPIVersion(value string) *KubeAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithName(value string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithGenerateName(value string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithNamespace(value string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithUID(value types.UID) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithResourceVersion(value string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithGeneration(value int64) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *KubeAPIServerApplyConfiguration) WithLabels(entries map[string]string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *KubeAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *KubeAPIServerApplyConfiguration) WithFinalizers(values ...string) *KubeAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *KubeAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithSpec(value *KubeAPIServerSpecApplyConfiguration) *KubeAPIServerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *KubeAPIServerApplyConfiguration) WithStatus(value *KubeAPIServerStatusApplyConfiguration) *KubeAPIServerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *KubeAPIServerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *KubeAPIServerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *KubeAPIServerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *KubeAPIServerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverspec.go deleted file mode 100644 index e4d05ac2b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverspec.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// KubeAPIServerSpecApplyConfiguration represents a declarative configuration of the KubeAPIServerSpec type for use -// with apply. -type KubeAPIServerSpecApplyConfiguration struct { - StaticPodOperatorSpecApplyConfiguration `json:",inline"` - // eventTTLMinutes specifies the amount of time that the events are stored before being deleted. - // The TTL is allowed between 5 minutes minimum up to a maximum of 180 minutes (3 hours). - // - // Lowering this value will reduce the storage required in etcd. Note that this setting will only apply - // to new events being created and will not update existing events. - // - // When omitted this means no opinion, and the platform is left to choose a reasonable default, which is subject to change over time. - // The current default value is 3h (180 minutes). - EventTTLMinutes *int32 `json:"eventTTLMinutes,omitempty"` -} - -// KubeAPIServerSpecApplyConfiguration constructs a declarative configuration of the KubeAPIServerSpec type for use with -// apply. -func KubeAPIServerSpec() *KubeAPIServerSpecApplyConfiguration { - return &KubeAPIServerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeAPIServerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeAPIServerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeAPIServerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value - return b -} - -// WithEventTTLMinutes sets the EventTTLMinutes field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EventTTLMinutes field is set to the value of the last call. -func (b *KubeAPIServerSpecApplyConfiguration) WithEventTTLMinutes(value int32) *KubeAPIServerSpecApplyConfiguration { - b.EventTTLMinutes = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go deleted file mode 100644 index c6eec2ce4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeapiserverstatus.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KubeAPIServerStatusApplyConfiguration represents a declarative configuration of the KubeAPIServerStatus type for use -// with apply. -type KubeAPIServerStatusApplyConfiguration struct { - StaticPodOperatorStatusApplyConfiguration `json:",inline"` - // serviceAccountIssuers tracks history of used service account issuers. - // The item without expiration time represents the currently used service account issuer. - // The other items represents service account issuers that were used previously and are still being trusted. - // The default expiration for the items is set by the platform and it defaults to 24h. - // see: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#service-account-token-volume-projection - ServiceAccountIssuers []ServiceAccountIssuerStatusApplyConfiguration `json:"serviceAccountIssuers,omitempty"` - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - EncryptionStatus *KMSEncryptionStatusApplyConfiguration `json:"encryptionStatus,omitempty"` -} - -// KubeAPIServerStatusApplyConfiguration constructs a declarative configuration of the KubeAPIServerStatus type for use with -// apply. -func KubeAPIServerStatus() *KubeAPIServerStatusApplyConfiguration { - return &KubeAPIServerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *KubeAPIServerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *KubeAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithVersion(value string) *KubeAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *KubeAPIServerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *KubeAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeAPIServerStatusApplyConfiguration { - b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value - return b -} - -// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NodeStatuses field. -func (b *KubeAPIServerStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *KubeAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNodeStatuses") - } - b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) - } - return b -} - -// WithServiceAccountIssuers adds the given value to the ServiceAccountIssuers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceAccountIssuers field. -func (b *KubeAPIServerStatusApplyConfiguration) WithServiceAccountIssuers(values ...*ServiceAccountIssuerStatusApplyConfiguration) *KubeAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithServiceAccountIssuers") - } - b.ServiceAccountIssuers = append(b.ServiceAccountIssuers, *values[i]) - } - return b -} - -// WithEncryptionStatus sets the EncryptionStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EncryptionStatus field is set to the value of the last call. -func (b *KubeAPIServerStatusApplyConfiguration) WithEncryptionStatus(value *KMSEncryptionStatusApplyConfiguration) *KubeAPIServerStatusApplyConfiguration { - b.EncryptionStatus = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanager.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanager.go deleted file mode 100644 index 0b2ec9c48..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanager.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// KubeControllerManagerApplyConfiguration represents a declarative configuration of the KubeControllerManager type for use -// with apply. -// -// KubeControllerManager provides information to configure an operator to manage kube-controller-manager. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type KubeControllerManagerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Kubernetes Controller Manager - Spec *KubeControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the Kubernetes Controller Manager - Status *KubeControllerManagerStatusApplyConfiguration `json:"status,omitempty"` -} - -// KubeControllerManager constructs a declarative configuration of the KubeControllerManager type for use with -// apply. -func KubeControllerManager(name string) *KubeControllerManagerApplyConfiguration { - b := &KubeControllerManagerApplyConfiguration{} - b.WithName(name) - b.WithKind("KubeControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractKubeControllerManagerFrom extracts the applied configuration owned by fieldManager from -// kubeControllerManager for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// kubeControllerManager must be a unmodified KubeControllerManager API object that was retrieved from the Kubernetes API. -// ExtractKubeControllerManagerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeControllerManagerFrom(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string, subresource string) (*KubeControllerManagerApplyConfiguration, error) { - b := &KubeControllerManagerApplyConfiguration{} - err := managedfields.ExtractInto(kubeControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeControllerManager"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(kubeControllerManager.Name) - - b.WithKind("KubeControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractKubeControllerManager extracts the applied configuration owned by fieldManager from -// kubeControllerManager. If no managedFields are found in kubeControllerManager for fieldManager, a -// KubeControllerManagerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// kubeControllerManager must be a unmodified KubeControllerManager API object that was retrieved from the Kubernetes API. -// ExtractKubeControllerManager provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeControllerManager(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { - return ExtractKubeControllerManagerFrom(kubeControllerManager, fieldManager, "") -} - -// ExtractKubeControllerManagerStatus extracts the applied configuration owned by fieldManager from -// kubeControllerManager for the status subresource. -func ExtractKubeControllerManagerStatus(kubeControllerManager *operatorv1.KubeControllerManager, fieldManager string) (*KubeControllerManagerApplyConfiguration, error) { - return ExtractKubeControllerManagerFrom(kubeControllerManager, fieldManager, "status") -} - -func (b KubeControllerManagerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithKind(value string) *KubeControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithAPIVersion(value string) *KubeControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithName(value string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithGenerateName(value string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithNamespace(value string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithUID(value types.UID) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithResourceVersion(value string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithGeneration(value int64) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *KubeControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *KubeControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *KubeControllerManagerApplyConfiguration) WithFinalizers(values ...string) *KubeControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *KubeControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithSpec(value *KubeControllerManagerSpecApplyConfiguration) *KubeControllerManagerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *KubeControllerManagerApplyConfiguration) WithStatus(value *KubeControllerManagerStatusApplyConfiguration) *KubeControllerManagerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *KubeControllerManagerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *KubeControllerManagerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *KubeControllerManagerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *KubeControllerManagerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go deleted file mode 100644 index 862ea555e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerspec.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// KubeControllerManagerSpecApplyConfiguration represents a declarative configuration of the KubeControllerManagerSpec type for use -// with apply. -type KubeControllerManagerSpecApplyConfiguration struct { - StaticPodOperatorSpecApplyConfiguration `json:",inline"` - // useMoreSecureServiceCA indicates that the service-ca.crt provided in SA token volumes should include only - // enough certificates to validate service serving certificates. - // Once set to true, it cannot be set to false. - // Even if someone finds a way to set it back to false, the service-ca.crt files that previously existed will - // only have the more secure content. - UseMoreSecureServiceCA *bool `json:"useMoreSecureServiceCA,omitempty"` -} - -// KubeControllerManagerSpecApplyConfiguration constructs a declarative configuration of the KubeControllerManagerSpec type for use with -// apply. -func KubeControllerManagerSpec() *KubeControllerManagerSpecApplyConfiguration { - return &KubeControllerManagerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeControllerManagerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeControllerManagerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeControllerManagerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value - return b -} - -// WithUseMoreSecureServiceCA sets the UseMoreSecureServiceCA field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UseMoreSecureServiceCA field is set to the value of the last call. -func (b *KubeControllerManagerSpecApplyConfiguration) WithUseMoreSecureServiceCA(value bool) *KubeControllerManagerSpecApplyConfiguration { - b.UseMoreSecureServiceCA = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go deleted file mode 100644 index 1c72dff26..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubecontrollermanagerstatus.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KubeControllerManagerStatusApplyConfiguration represents a declarative configuration of the KubeControllerManagerStatus type for use -// with apply. -type KubeControllerManagerStatusApplyConfiguration struct { - StaticPodOperatorStatusApplyConfiguration `json:",inline"` -} - -// KubeControllerManagerStatusApplyConfiguration constructs a declarative configuration of the KubeControllerManagerStatus type for use with -// apply. -func KubeControllerManagerStatus() *KubeControllerManagerStatusApplyConfiguration { - return &KubeControllerManagerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *KubeControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *KubeControllerManagerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *KubeControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *KubeControllerManagerStatusApplyConfiguration) WithVersion(value string) *KubeControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *KubeControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *KubeControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *KubeControllerManagerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *KubeControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. -func (b *KubeControllerManagerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeControllerManagerStatusApplyConfiguration { - b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value - return b -} - -// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NodeStatuses field. -func (b *KubeControllerManagerStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *KubeControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNodeStatuses") - } - b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubescheduler.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubescheduler.go deleted file mode 100644 index 409109f9e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubescheduler.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// KubeSchedulerApplyConfiguration represents a declarative configuration of the KubeScheduler type for use -// with apply. -// -// KubeScheduler provides information to configure an operator to manage scheduler. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type KubeSchedulerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Kubernetes Scheduler - Spec *KubeSchedulerSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the Kubernetes Scheduler - Status *KubeSchedulerStatusApplyConfiguration `json:"status,omitempty"` -} - -// KubeScheduler constructs a declarative configuration of the KubeScheduler type for use with -// apply. -func KubeScheduler(name string) *KubeSchedulerApplyConfiguration { - b := &KubeSchedulerApplyConfiguration{} - b.WithName(name) - b.WithKind("KubeScheduler") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractKubeSchedulerFrom extracts the applied configuration owned by fieldManager from -// kubeScheduler for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// kubeScheduler must be a unmodified KubeScheduler API object that was retrieved from the Kubernetes API. -// ExtractKubeSchedulerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeSchedulerFrom(kubeScheduler *operatorv1.KubeScheduler, fieldManager string, subresource string) (*KubeSchedulerApplyConfiguration, error) { - b := &KubeSchedulerApplyConfiguration{} - err := managedfields.ExtractInto(kubeScheduler, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeScheduler"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(kubeScheduler.Name) - - b.WithKind("KubeScheduler") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractKubeScheduler extracts the applied configuration owned by fieldManager from -// kubeScheduler. If no managedFields are found in kubeScheduler for fieldManager, a -// KubeSchedulerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// kubeScheduler must be a unmodified KubeScheduler API object that was retrieved from the Kubernetes API. -// ExtractKubeScheduler provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeScheduler(kubeScheduler *operatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { - return ExtractKubeSchedulerFrom(kubeScheduler, fieldManager, "") -} - -// ExtractKubeSchedulerStatus extracts the applied configuration owned by fieldManager from -// kubeScheduler for the status subresource. -func ExtractKubeSchedulerStatus(kubeScheduler *operatorv1.KubeScheduler, fieldManager string) (*KubeSchedulerApplyConfiguration, error) { - return ExtractKubeSchedulerFrom(kubeScheduler, fieldManager, "status") -} - -func (b KubeSchedulerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithKind(value string) *KubeSchedulerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithAPIVersion(value string) *KubeSchedulerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithName(value string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithGenerateName(value string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithNamespace(value string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithUID(value types.UID) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithResourceVersion(value string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithGeneration(value int64) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *KubeSchedulerApplyConfiguration) WithLabels(entries map[string]string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *KubeSchedulerApplyConfiguration) WithAnnotations(entries map[string]string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeSchedulerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *KubeSchedulerApplyConfiguration) WithFinalizers(values ...string) *KubeSchedulerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *KubeSchedulerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithSpec(value *KubeSchedulerSpecApplyConfiguration) *KubeSchedulerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *KubeSchedulerApplyConfiguration) WithStatus(value *KubeSchedulerStatusApplyConfiguration) *KubeSchedulerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *KubeSchedulerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *KubeSchedulerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *KubeSchedulerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *KubeSchedulerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerspec.go deleted file mode 100644 index 94bd1d61f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerspec.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// KubeSchedulerSpecApplyConfiguration represents a declarative configuration of the KubeSchedulerSpec type for use -// with apply. -type KubeSchedulerSpecApplyConfiguration struct { - StaticPodOperatorSpecApplyConfiguration `json:",inline"` -} - -// KubeSchedulerSpecApplyConfiguration constructs a declarative configuration of the KubeSchedulerSpec type for use with -// apply. -func KubeSchedulerSpec() *KubeSchedulerSpecApplyConfiguration { - return &KubeSchedulerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeSchedulerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeSchedulerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeSchedulerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeSchedulerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeSchedulerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithForceRedeploymentReason(value string) *KubeSchedulerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *KubeSchedulerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *KubeSchedulerSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *KubeSchedulerSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go deleted file mode 100644 index 821b4c3f9..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubeschedulerstatus.go +++ /dev/null @@ -1,94 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KubeSchedulerStatusApplyConfiguration represents a declarative configuration of the KubeSchedulerStatus type for use -// with apply. -type KubeSchedulerStatusApplyConfiguration struct { - StaticPodOperatorStatusApplyConfiguration `json:",inline"` -} - -// KubeSchedulerStatusApplyConfiguration constructs a declarative configuration of the KubeSchedulerStatus type for use with -// apply. -func KubeSchedulerStatus() *KubeSchedulerStatusApplyConfiguration { - return &KubeSchedulerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *KubeSchedulerStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeSchedulerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *KubeSchedulerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *KubeSchedulerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *KubeSchedulerStatusApplyConfiguration) WithVersion(value string) *KubeSchedulerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *KubeSchedulerStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeSchedulerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *KubeSchedulerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeSchedulerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *KubeSchedulerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *KubeSchedulerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. -func (b *KubeSchedulerStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *KubeSchedulerStatusApplyConfiguration { - b.StaticPodOperatorStatusApplyConfiguration.LatestAvailableRevisionReason = &value - return b -} - -// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NodeStatuses field. -func (b *KubeSchedulerStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *KubeSchedulerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNodeStatuses") - } - b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses = append(b.StaticPodOperatorStatusApplyConfiguration.NodeStatuses, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go deleted file mode 100644 index 892965ea1..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigrator.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// KubeStorageVersionMigratorApplyConfiguration represents a declarative configuration of the KubeStorageVersionMigrator type for use -// with apply. -// -// KubeStorageVersionMigrator provides information to configure an operator to manage kube-storage-version-migrator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type KubeStorageVersionMigratorApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *KubeStorageVersionMigratorSpecApplyConfiguration `json:"spec,omitempty"` - Status *KubeStorageVersionMigratorStatusApplyConfiguration `json:"status,omitempty"` -} - -// KubeStorageVersionMigrator constructs a declarative configuration of the KubeStorageVersionMigrator type for use with -// apply. -func KubeStorageVersionMigrator(name string) *KubeStorageVersionMigratorApplyConfiguration { - b := &KubeStorageVersionMigratorApplyConfiguration{} - b.WithName(name) - b.WithKind("KubeStorageVersionMigrator") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractKubeStorageVersionMigratorFrom extracts the applied configuration owned by fieldManager from -// kubeStorageVersionMigrator for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// kubeStorageVersionMigrator must be a unmodified KubeStorageVersionMigrator API object that was retrieved from the Kubernetes API. -// ExtractKubeStorageVersionMigratorFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeStorageVersionMigratorFrom(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string, subresource string) (*KubeStorageVersionMigratorApplyConfiguration, error) { - b := &KubeStorageVersionMigratorApplyConfiguration{} - err := managedfields.ExtractInto(kubeStorageVersionMigrator, internal.Parser().Type("com.github.openshift.api.operator.v1.KubeStorageVersionMigrator"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(kubeStorageVersionMigrator.Name) - - b.WithKind("KubeStorageVersionMigrator") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractKubeStorageVersionMigrator extracts the applied configuration owned by fieldManager from -// kubeStorageVersionMigrator. If no managedFields are found in kubeStorageVersionMigrator for fieldManager, a -// KubeStorageVersionMigratorApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// kubeStorageVersionMigrator must be a unmodified KubeStorageVersionMigrator API object that was retrieved from the Kubernetes API. -// ExtractKubeStorageVersionMigrator provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractKubeStorageVersionMigrator(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { - return ExtractKubeStorageVersionMigratorFrom(kubeStorageVersionMigrator, fieldManager, "") -} - -// ExtractKubeStorageVersionMigratorStatus extracts the applied configuration owned by fieldManager from -// kubeStorageVersionMigrator for the status subresource. -func ExtractKubeStorageVersionMigratorStatus(kubeStorageVersionMigrator *operatorv1.KubeStorageVersionMigrator, fieldManager string) (*KubeStorageVersionMigratorApplyConfiguration, error) { - return ExtractKubeStorageVersionMigratorFrom(kubeStorageVersionMigrator, fieldManager, "status") -} - -func (b KubeStorageVersionMigratorApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithKind(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithAPIVersion(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithName(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithGenerateName(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithNamespace(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithUID(value types.UID) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithResourceVersion(value string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithGeneration(value int64) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithLabels(entries map[string]string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithAnnotations(entries map[string]string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithFinalizers(values ...string) *KubeStorageVersionMigratorApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *KubeStorageVersionMigratorApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithSpec(value *KubeStorageVersionMigratorSpecApplyConfiguration) *KubeStorageVersionMigratorApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *KubeStorageVersionMigratorApplyConfiguration) WithStatus(value *KubeStorageVersionMigratorStatusApplyConfiguration) *KubeStorageVersionMigratorApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *KubeStorageVersionMigratorApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *KubeStorageVersionMigratorApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *KubeStorageVersionMigratorApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *KubeStorageVersionMigratorApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go deleted file mode 100644 index 6acfcb82b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// KubeStorageVersionMigratorSpecApplyConfiguration represents a declarative configuration of the KubeStorageVersionMigratorSpec type for use -// with apply. -type KubeStorageVersionMigratorSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// KubeStorageVersionMigratorSpecApplyConfiguration constructs a declarative configuration of the KubeStorageVersionMigratorSpec type for use with -// apply. -func KubeStorageVersionMigratorSpec() *KubeStorageVersionMigratorSpecApplyConfiguration { - return &KubeStorageVersionMigratorSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *KubeStorageVersionMigratorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *KubeStorageVersionMigratorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go deleted file mode 100644 index cad8e2f76..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/kubestorageversionmigratorstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// KubeStorageVersionMigratorStatusApplyConfiguration represents a declarative configuration of the KubeStorageVersionMigratorStatus type for use -// with apply. -type KubeStorageVersionMigratorStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// KubeStorageVersionMigratorStatusApplyConfiguration constructs a declarative configuration of the KubeStorageVersionMigratorStatus type for use with -// apply. -func KubeStorageVersionMigratorStatus() *KubeStorageVersionMigratorStatusApplyConfiguration { - return &KubeStorageVersionMigratorStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithObservedGeneration(value int64) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *KubeStorageVersionMigratorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithVersion(value string) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithReadyReplicas(value int32) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *KubeStorageVersionMigratorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *KubeStorageVersionMigratorStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *KubeStorageVersionMigratorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go deleted file mode 100644 index cc579100b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loadbalancerstrategy.go +++ /dev/null @@ -1,81 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// LoadBalancerStrategyApplyConfiguration represents a declarative configuration of the LoadBalancerStrategy type for use -// with apply. -// -// LoadBalancerStrategy holds parameters for a load balancer. -type LoadBalancerStrategyApplyConfiguration struct { - // scope indicates the scope at which the load balancer is exposed. - // Possible values are "External" and "Internal". - Scope *operatorv1.LoadBalancerScope `json:"scope,omitempty"` - // allowedSourceRanges specifies an allowlist of IP address ranges to which - // access to the load balancer should be restricted. Each range must be - // specified using CIDR notation (e.g. "10.0.0.0/8" or "fd00::/8"). If no range is - // specified, "0.0.0.0/0" for IPv4 and "::/0" for IPv6 are used by default, - // which allows all source addresses. - // - // To facilitate migration from earlier versions of OpenShift that did - // not have the allowedSourceRanges field, you may set the - // service.beta.kubernetes.io/load-balancer-source-ranges annotation on - // the "router-" service in the - // "openshift-ingress" namespace, and this annotation will take - // effect if allowedSourceRanges is empty on OpenShift 4.12. - AllowedSourceRanges []operatorv1.CIDR `json:"allowedSourceRanges,omitempty"` - // providerParameters holds desired load balancer information specific to - // the underlying infrastructure provider. - // - // If empty, defaults will be applied. See specific providerParameters - // fields for details about their defaults. - ProviderParameters *ProviderLoadBalancerParametersApplyConfiguration `json:"providerParameters,omitempty"` - // dnsManagementPolicy indicates if the lifecycle of the wildcard DNS record - // associated with the load balancer service will be managed by - // the ingress operator. It defaults to Managed. - // Valid values are: Managed and Unmanaged. - DNSManagementPolicy *operatorv1.LoadBalancerDNSManagementPolicy `json:"dnsManagementPolicy,omitempty"` -} - -// LoadBalancerStrategyApplyConfiguration constructs a declarative configuration of the LoadBalancerStrategy type for use with -// apply. -func LoadBalancerStrategy() *LoadBalancerStrategyApplyConfiguration { - return &LoadBalancerStrategyApplyConfiguration{} -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *LoadBalancerStrategyApplyConfiguration) WithScope(value operatorv1.LoadBalancerScope) *LoadBalancerStrategyApplyConfiguration { - b.Scope = &value - return b -} - -// WithAllowedSourceRanges adds the given value to the AllowedSourceRanges field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllowedSourceRanges field. -func (b *LoadBalancerStrategyApplyConfiguration) WithAllowedSourceRanges(values ...operatorv1.CIDR) *LoadBalancerStrategyApplyConfiguration { - for i := range values { - b.AllowedSourceRanges = append(b.AllowedSourceRanges, values[i]) - } - return b -} - -// WithProviderParameters sets the ProviderParameters field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProviderParameters field is set to the value of the last call. -func (b *LoadBalancerStrategyApplyConfiguration) WithProviderParameters(value *ProviderLoadBalancerParametersApplyConfiguration) *LoadBalancerStrategyApplyConfiguration { - b.ProviderParameters = value - return b -} - -// WithDNSManagementPolicy sets the DNSManagementPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNSManagementPolicy field is set to the value of the last call. -func (b *LoadBalancerStrategyApplyConfiguration) WithDNSManagementPolicy(value operatorv1.LoadBalancerDNSManagementPolicy) *LoadBalancerStrategyApplyConfiguration { - b.DNSManagementPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loggingdestination.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loggingdestination.go deleted file mode 100644 index 3570f7ee5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/loggingdestination.go +++ /dev/null @@ -1,70 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// LoggingDestinationApplyConfiguration represents a declarative configuration of the LoggingDestination type for use -// with apply. -// -// LoggingDestination describes a destination for log messages. -type LoggingDestinationApplyConfiguration struct { - // type is the type of destination for logs. It must be one of the - // following: - // - // * Container - // - // The ingress operator configures the sidecar container named "logs" on - // the ingress controller pod and configures the ingress controller to - // write logs to the sidecar. The logs are then available as container - // logs. The expectation is that the administrator configures a custom - // logging solution that reads logs from this sidecar. Note that using - // container logs means that logs may be dropped if the rate of logs - // exceeds the container runtime's or the custom logging solution's - // capacity. - // - // * Syslog - // - // Logs are sent to a syslog endpoint. The administrator must specify - // an endpoint that can receive syslog messages. The expectation is - // that the administrator has configured a custom syslog instance. - Type *operatorv1.LoggingDestinationType `json:"type,omitempty"` - // syslog holds parameters for a syslog endpoint. Present only if - // type is Syslog. - Syslog *SyslogLoggingDestinationParametersApplyConfiguration `json:"syslog,omitempty"` - // container holds parameters for the Container logging destination. - // Present only if type is Container. - Container *ContainerLoggingDestinationParametersApplyConfiguration `json:"container,omitempty"` -} - -// LoggingDestinationApplyConfiguration constructs a declarative configuration of the LoggingDestination type for use with -// apply. -func LoggingDestination() *LoggingDestinationApplyConfiguration { - return &LoggingDestinationApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *LoggingDestinationApplyConfiguration) WithType(value operatorv1.LoggingDestinationType) *LoggingDestinationApplyConfiguration { - b.Type = &value - return b -} - -// WithSyslog sets the Syslog field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Syslog field is set to the value of the last call. -func (b *LoggingDestinationApplyConfiguration) WithSyslog(value *SyslogLoggingDestinationParametersApplyConfiguration) *LoggingDestinationApplyConfiguration { - b.Syslog = value - return b -} - -// WithContainer sets the Container field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Container field is set to the value of the last call. -func (b *LoggingDestinationApplyConfiguration) WithContainer(value *ContainerLoggingDestinationParametersApplyConfiguration) *LoggingDestinationApplyConfiguration { - b.Container = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go deleted file mode 100644 index 92c24c035..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/logo.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// LogoApplyConfiguration represents a declarative configuration of the Logo type for use -// with apply. -// -// Logo defines a configuration based on theme modes for the console UI logo. -type LogoApplyConfiguration struct { - // type specifies the type of the logo for the console UI. It determines whether the logo is for the masthead or favicon. - // type is a required field that allows values of Masthead and Favicon. - // When set to "Masthead", the logo will be used in the masthead and about modal of the console UI. - // When set to "Favicon", the logo will be used as the favicon of the console UI. - Type *operatorv1.LogoType `json:"type,omitempty"` - // themes specifies the themes for the console UI logo. - // themes is a required field that allows a list of themes. Each item in the themes list must have a unique mode and a source field. - // Each mode determines whether the logo is for the dark or light mode of the console UI. - // If a theme is not specified, the default OpenShift logo will be displayed for that theme. - // There must be at least one entry and no more than 2 entries. - Themes []ThemeApplyConfiguration `json:"themes,omitempty"` -} - -// LogoApplyConfiguration constructs a declarative configuration of the Logo type for use with -// apply. -func Logo() *LogoApplyConfiguration { - return &LogoApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *LogoApplyConfiguration) WithType(value operatorv1.LogoType) *LogoApplyConfiguration { - b.Type = &value - return b -} - -// WithThemes adds the given value to the Themes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Themes field. -func (b *LogoApplyConfiguration) WithThemes(values ...*ThemeApplyConfiguration) *LogoApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithThemes") - } - b.Themes = append(b.Themes, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go deleted file mode 100644 index ae38c31b2..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfiguration.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// MachineConfigurationApplyConfiguration represents a declarative configuration of the MachineConfiguration type for use -// with apply. -// -// MachineConfiguration provides information to configure an operator to manage Machine Configuration. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type MachineConfigurationApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the Machine Config Operator - Spec *MachineConfigurationSpecApplyConfiguration `json:"spec,omitempty"` - // status is the most recently observed status of the Machine Config Operator - Status *MachineConfigurationStatusApplyConfiguration `json:"status,omitempty"` -} - -// MachineConfiguration constructs a declarative configuration of the MachineConfiguration type for use with -// apply. -func MachineConfiguration(name string) *MachineConfigurationApplyConfiguration { - b := &MachineConfigurationApplyConfiguration{} - b.WithName(name) - b.WithKind("MachineConfiguration") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractMachineConfigurationFrom extracts the applied configuration owned by fieldManager from -// machineConfiguration for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// machineConfiguration must be a unmodified MachineConfiguration API object that was retrieved from the Kubernetes API. -// ExtractMachineConfigurationFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractMachineConfigurationFrom(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string, subresource string) (*MachineConfigurationApplyConfiguration, error) { - b := &MachineConfigurationApplyConfiguration{} - err := managedfields.ExtractInto(machineConfiguration, internal.Parser().Type("com.github.openshift.api.operator.v1.MachineConfiguration"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(machineConfiguration.Name) - - b.WithKind("MachineConfiguration") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractMachineConfiguration extracts the applied configuration owned by fieldManager from -// machineConfiguration. If no managedFields are found in machineConfiguration for fieldManager, a -// MachineConfigurationApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// machineConfiguration must be a unmodified MachineConfiguration API object that was retrieved from the Kubernetes API. -// ExtractMachineConfiguration provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractMachineConfiguration(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { - return ExtractMachineConfigurationFrom(machineConfiguration, fieldManager, "") -} - -// ExtractMachineConfigurationStatus extracts the applied configuration owned by fieldManager from -// machineConfiguration for the status subresource. -func ExtractMachineConfigurationStatus(machineConfiguration *operatorv1.MachineConfiguration, fieldManager string) (*MachineConfigurationApplyConfiguration, error) { - return ExtractMachineConfigurationFrom(machineConfiguration, fieldManager, "status") -} - -func (b MachineConfigurationApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithKind(value string) *MachineConfigurationApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithAPIVersion(value string) *MachineConfigurationApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithName(value string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithGenerateName(value string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithNamespace(value string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithUID(value types.UID) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithResourceVersion(value string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithGeneration(value int64) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *MachineConfigurationApplyConfiguration) WithLabels(entries map[string]string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *MachineConfigurationApplyConfiguration) WithAnnotations(entries map[string]string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *MachineConfigurationApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *MachineConfigurationApplyConfiguration) WithFinalizers(values ...string) *MachineConfigurationApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *MachineConfigurationApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithSpec(value *MachineConfigurationSpecApplyConfiguration) *MachineConfigurationApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *MachineConfigurationApplyConfiguration) WithStatus(value *MachineConfigurationStatusApplyConfiguration) *MachineConfigurationApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *MachineConfigurationApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *MachineConfigurationApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *MachineConfigurationApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *MachineConfigurationApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go deleted file mode 100644 index 8afc374fa..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationspec.go +++ /dev/null @@ -1,144 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// MachineConfigurationSpecApplyConfiguration represents a declarative configuration of the MachineConfigurationSpec type for use -// with apply. -type MachineConfigurationSpecApplyConfiguration struct { - StaticPodOperatorSpecApplyConfiguration `json:",inline"` - // managedBootImages allows configuration for the management of boot images for machine - // resources within the cluster. This configuration allows users to select resources that should - // be updated to the latest boot images during cluster upgrades, ensuring that new machines - // always boot with the current cluster version's boot image. When omitted, this means no opinion - // and the platform is left to choose a reasonable default, which is subject to change over time. - // The default for each machine manager mode is All for GCP and AWS platforms, and None for all - // other platforms. - ManagedBootImages *ManagedBootImagesApplyConfiguration `json:"managedBootImages,omitempty"` - // nodeDisruptionPolicy allows an admin to set granular node disruption actions for - // MachineConfig-based updates, such as drains, service reloads, etc. Specifying this will allow - // for less downtime when doing small configuration updates to the cluster. This configuration - // has no effect on cluster upgrades which will still incur node disruption where required. - NodeDisruptionPolicy *NodeDisruptionPolicyConfigApplyConfiguration `json:"nodeDisruptionPolicy,omitempty"` - // irreconcilableValidationOverrides is an optional field that can used to make changes to a MachineConfig that - // cannot be applied to existing nodes. - // When specified, the fields configured with validation overrides will no longer reject changes to those - // respective fields due to them not being able to be applied to existing nodes. - // Only newly provisioned nodes will have these configurations applied. - // Existing nodes will report observed configuration differences in their MachineConfigNode status. - IrreconcilableValidationOverrides *IrreconcilableValidationOverridesApplyConfiguration `json:"irreconcilableValidationOverrides,omitempty"` - // bootImageSkewEnforcement allows an admin to configure how boot image version skew is - // enforced on the cluster. - // When omitted, this will default to Automatic for clusters that support automatic boot image updates. - // For clusters that do not support automatic boot image updates, cluster upgrades will be disabled until - // a skew enforcement mode has been specified. - // When version skew is being enforced, cluster upgrades will be disabled until the version skew is deemed - // acceptable for the current release payload. - BootImageSkewEnforcement *BootImageSkewEnforcementConfigApplyConfiguration `json:"bootImageSkewEnforcement,omitempty"` -} - -// MachineConfigurationSpecApplyConfiguration constructs a declarative configuration of the MachineConfigurationSpec type for use with -// apply. -func MachineConfigurationSpec() *MachineConfigurationSpecApplyConfiguration { - return &MachineConfigurationSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *MachineConfigurationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *MachineConfigurationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *MachineConfigurationSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithForceRedeploymentReason(value string) *MachineConfigurationSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *MachineConfigurationSpecApplyConfiguration { - b.StaticPodOperatorSpecApplyConfiguration.SucceededRevisionLimit = &value - return b -} - -// WithManagedBootImages sets the ManagedBootImages field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagedBootImages field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithManagedBootImages(value *ManagedBootImagesApplyConfiguration) *MachineConfigurationSpecApplyConfiguration { - b.ManagedBootImages = value - return b -} - -// WithNodeDisruptionPolicy sets the NodeDisruptionPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDisruptionPolicy field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithNodeDisruptionPolicy(value *NodeDisruptionPolicyConfigApplyConfiguration) *MachineConfigurationSpecApplyConfiguration { - b.NodeDisruptionPolicy = value - return b -} - -// WithIrreconcilableValidationOverrides sets the IrreconcilableValidationOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IrreconcilableValidationOverrides field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithIrreconcilableValidationOverrides(value *IrreconcilableValidationOverridesApplyConfiguration) *MachineConfigurationSpecApplyConfiguration { - b.IrreconcilableValidationOverrides = value - return b -} - -// WithBootImageSkewEnforcement sets the BootImageSkewEnforcement field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BootImageSkewEnforcement field is set to the value of the last call. -func (b *MachineConfigurationSpecApplyConfiguration) WithBootImageSkewEnforcement(value *BootImageSkewEnforcementConfigApplyConfiguration) *MachineConfigurationSpecApplyConfiguration { - b.BootImageSkewEnforcement = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go deleted file mode 100644 index fbb420a87..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machineconfigurationstatus.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// MachineConfigurationStatusApplyConfiguration represents a declarative configuration of the MachineConfigurationStatus type for use -// with apply. -type MachineConfigurationStatusApplyConfiguration struct { - // observedGeneration is the last generation change you've dealt with - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - // conditions is a list of conditions and their status - Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` - // nodeDisruptionPolicyStatus status reflects what the latest cluster-validated policies are, - // and will be used by the Machine Config Daemon during future node updates. - NodeDisruptionPolicyStatus *NodeDisruptionPolicyStatusApplyConfiguration `json:"nodeDisruptionPolicyStatus,omitempty"` - // managedBootImagesStatus reflects what the latest cluster-validated boot image configuration is - // and will be used by Machine Config Controller while performing boot image updates. - ManagedBootImagesStatus *ManagedBootImagesApplyConfiguration `json:"managedBootImagesStatus,omitempty"` - // bootImageSkewEnforcementStatus reflects what the latest cluster-validated boot image skew enforcement - // configuration is and will be used by Machine Config Controller while performing boot image skew enforcement. - // When omitted, the MCO has no knowledge of how to enforce boot image skew. When the MCO does not know how - // boot image skew should be enforced, cluster upgrades will be blocked until it can either automatically - // determine skew enforcement or there is an explicit skew enforcement configuration provided in the - // spec.bootImageSkewEnforcement field. - BootImageSkewEnforcementStatus *BootImageSkewEnforcementStatusApplyConfiguration `json:"bootImageSkewEnforcementStatus,omitempty"` -} - -// MachineConfigurationStatusApplyConfiguration constructs a declarative configuration of the MachineConfigurationStatus type for use with -// apply. -func MachineConfigurationStatus() *MachineConfigurationStatusApplyConfiguration { - return &MachineConfigurationStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *MachineConfigurationStatusApplyConfiguration) WithObservedGeneration(value int64) *MachineConfigurationStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *MachineConfigurationStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithNodeDisruptionPolicyStatus sets the NodeDisruptionPolicyStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeDisruptionPolicyStatus field is set to the value of the last call. -func (b *MachineConfigurationStatusApplyConfiguration) WithNodeDisruptionPolicyStatus(value *NodeDisruptionPolicyStatusApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { - b.NodeDisruptionPolicyStatus = value - return b -} - -// WithManagedBootImagesStatus sets the ManagedBootImagesStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagedBootImagesStatus field is set to the value of the last call. -func (b *MachineConfigurationStatusApplyConfiguration) WithManagedBootImagesStatus(value *ManagedBootImagesApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { - b.ManagedBootImagesStatus = value - return b -} - -// WithBootImageSkewEnforcementStatus sets the BootImageSkewEnforcementStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BootImageSkewEnforcementStatus field is set to the value of the last call. -func (b *MachineConfigurationStatusApplyConfiguration) WithBootImageSkewEnforcementStatus(value *BootImageSkewEnforcementStatusApplyConfiguration) *MachineConfigurationStatusApplyConfiguration { - b.BootImageSkewEnforcementStatus = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanager.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanager.go deleted file mode 100644 index ce7a998fe..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanager.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// MachineManagerApplyConfiguration represents a declarative configuration of the MachineManager type for use -// with apply. -// -// MachineManager describes a target machine resource that is registered for boot image updates. It stores identifying information -// such as the resource type and the API Group of the resource. It also provides granular control via the selection field. -type MachineManagerApplyConfiguration struct { - // resource is the machine management resource's type. - // Valid values are machinesets and controlplanemachinesets. - // machinesets means that the machine manager will only register resources of the kind MachineSet. - // controlplanemachinesets means that the machine manager will only register resources of the kind ControlPlaneMachineSet. - Resource *operatorv1.MachineManagerMachineSetsResourceType `json:"resource,omitempty"` - // apiGroup is name of the APIGroup that the machine management resource belongs to. - // The only current valid value is machine.openshift.io. - // machine.openshift.io means that the machine manager will only register resources that belong to OpenShift machine API group. - APIGroup *operatorv1.MachineManagerMachineSetsAPIGroupType `json:"apiGroup,omitempty"` - // selection allows granular control of the machine management resources that will be registered for boot image updates. - Selection *MachineManagerSelectorApplyConfiguration `json:"selection,omitempty"` -} - -// MachineManagerApplyConfiguration constructs a declarative configuration of the MachineManager type for use with -// apply. -func MachineManager() *MachineManagerApplyConfiguration { - return &MachineManagerApplyConfiguration{} -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *MachineManagerApplyConfiguration) WithResource(value operatorv1.MachineManagerMachineSetsResourceType) *MachineManagerApplyConfiguration { - b.Resource = &value - return b -} - -// WithAPIGroup sets the APIGroup field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIGroup field is set to the value of the last call. -func (b *MachineManagerApplyConfiguration) WithAPIGroup(value operatorv1.MachineManagerMachineSetsAPIGroupType) *MachineManagerApplyConfiguration { - b.APIGroup = &value - return b -} - -// WithSelection sets the Selection field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Selection field is set to the value of the last call. -func (b *MachineManagerApplyConfiguration) WithSelection(value *MachineManagerSelectorApplyConfiguration) *MachineManagerApplyConfiguration { - b.Selection = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanagerselector.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanagerselector.go deleted file mode 100644 index 6bee0b9ab..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/machinemanagerselector.go +++ /dev/null @@ -1,44 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// MachineManagerSelectorApplyConfiguration represents a declarative configuration of the MachineManagerSelector type for use -// with apply. -type MachineManagerSelectorApplyConfiguration struct { - // mode determines how machine managers will be selected for updates. - // Valid values are All, Partial and None. - // All means that every resource matched by the machine manager will be updated. - // Partial requires specified selector(s) and allows customisation of which resources matched by the machine manager will be updated. - // Partial is not permitted for the controlplanemachinesets resource type as they are a singleton within the cluster. - // None means that every resource matched by the machine manager will not be updated. - Mode *operatorv1.MachineManagerSelectorMode `json:"mode,omitempty"` - // partial provides label selector(s) that can be used to match machine management resources. - // Only permitted when mode is set to "Partial". - Partial *PartialSelectorApplyConfiguration `json:"partial,omitempty"` -} - -// MachineManagerSelectorApplyConfiguration constructs a declarative configuration of the MachineManagerSelector type for use with -// apply. -func MachineManagerSelector() *MachineManagerSelectorApplyConfiguration { - return &MachineManagerSelectorApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *MachineManagerSelectorApplyConfiguration) WithMode(value operatorv1.MachineManagerSelectorMode) *MachineManagerSelectorApplyConfiguration { - b.Mode = &value - return b -} - -// WithPartial sets the Partial field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Partial field is set to the value of the last call. -func (b *MachineManagerSelectorApplyConfiguration) WithPartial(value *PartialSelectorApplyConfiguration) *MachineManagerSelectorApplyConfiguration { - b.Partial = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedbootimages.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedbootimages.go deleted file mode 100644 index 608faef27..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedbootimages.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ManagedBootImagesApplyConfiguration represents a declarative configuration of the ManagedBootImages type for use -// with apply. -type ManagedBootImagesApplyConfiguration struct { - // machineManagers can be used to register machine management resources for boot image updates. The Machine Config Operator - // will watch for changes to this list. Only one entry is permitted per type of machine management resource. - MachineManagers []MachineManagerApplyConfiguration `json:"machineManagers,omitempty"` -} - -// ManagedBootImagesApplyConfiguration constructs a declarative configuration of the ManagedBootImages type for use with -// apply. -func ManagedBootImages() *ManagedBootImagesApplyConfiguration { - return &ManagedBootImagesApplyConfiguration{} -} - -// WithMachineManagers adds the given value to the MachineManagers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the MachineManagers field. -func (b *ManagedBootImagesApplyConfiguration) WithMachineManagers(values ...*MachineManagerApplyConfiguration) *ManagedBootImagesApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithMachineManagers") - } - b.MachineManagers = append(b.MachineManagers, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedtokenrequests.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedtokenrequests.go deleted file mode 100644 index 5b65a6628..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/managedtokenrequests.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ManagedTokenRequestsApplyConfiguration represents a declarative configuration of the ManagedTokenRequests type for use -// with apply. -// -// ManagedTokenRequests holds the configuration for operator-managed -// service account token requests. -type ManagedTokenRequestsApplyConfiguration struct { - // audiences specifies service account token audiences that kubelet will - // provide to the CSI driver during NodePublishVolume calls. These tokens - // enable workload identity federation (WIF) with cloud providers such as - // AWS, Azure, and GCP. - // When empty, the operator clears all tokenRequests from the CSIDriver object. - Audiences *[]SecretsStoreTokenRequestApplyConfiguration `json:"audiences,omitempty"` -} - -// ManagedTokenRequestsApplyConfiguration constructs a declarative configuration of the ManagedTokenRequests type for use with -// apply. -func ManagedTokenRequests() *ManagedTokenRequestsApplyConfiguration { - return &ManagedTokenRequestsApplyConfiguration{} -} - -func (b *ManagedTokenRequestsApplyConfiguration) ensureSecretsStoreTokenRequestApplyConfigurationExists() { - if b.Audiences == nil { - b.Audiences = &[]SecretsStoreTokenRequestApplyConfiguration{} - } -} - -// WithAudiences adds the given value to the Audiences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Audiences field. -func (b *ManagedTokenRequestsApplyConfiguration) WithAudiences(values ...*SecretsStoreTokenRequestApplyConfiguration) *ManagedTokenRequestsApplyConfiguration { - b.ensureSecretsStoreTokenRequestApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAudiences") - } - *b.Audiences = append(*b.Audiences, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigration.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigration.go deleted file mode 100644 index dc6a68e20..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigration.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// MTUMigrationApplyConfiguration represents a declarative configuration of the MTUMigration type for use -// with apply. -// -// MTUMigration contains infomation about MTU migration. -type MTUMigrationApplyConfiguration struct { - // network contains information about MTU migration for the default network. - // Migrations are only allowed to MTU values lower than the machine's uplink - // MTU by the minimum appropriate offset. - Network *MTUMigrationValuesApplyConfiguration `json:"network,omitempty"` - // machine contains MTU migration configuration for the machine's uplink. - // Needs to be migrated along with the default network MTU unless the - // current uplink MTU already accommodates the default network MTU. - Machine *MTUMigrationValuesApplyConfiguration `json:"machine,omitempty"` -} - -// MTUMigrationApplyConfiguration constructs a declarative configuration of the MTUMigration type for use with -// apply. -func MTUMigration() *MTUMigrationApplyConfiguration { - return &MTUMigrationApplyConfiguration{} -} - -// WithNetwork sets the Network field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Network field is set to the value of the last call. -func (b *MTUMigrationApplyConfiguration) WithNetwork(value *MTUMigrationValuesApplyConfiguration) *MTUMigrationApplyConfiguration { - b.Network = value - return b -} - -// WithMachine sets the Machine field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Machine field is set to the value of the last call. -func (b *MTUMigrationApplyConfiguration) WithMachine(value *MTUMigrationValuesApplyConfiguration) *MTUMigrationApplyConfiguration { - b.Machine = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigrationvalues.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigrationvalues.go deleted file mode 100644 index f9c51c216..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/mtumigrationvalues.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// MTUMigrationValuesApplyConfiguration represents a declarative configuration of the MTUMigrationValues type for use -// with apply. -// -// MTUMigrationValues contains the values for a MTU migration. -type MTUMigrationValuesApplyConfiguration struct { - // to is the MTU to migrate to. - To *uint32 `json:"to,omitempty"` - // from is the MTU to migrate from. - From *uint32 `json:"from,omitempty"` -} - -// MTUMigrationValuesApplyConfiguration constructs a declarative configuration of the MTUMigrationValues type for use with -// apply. -func MTUMigrationValues() *MTUMigrationValuesApplyConfiguration { - return &MTUMigrationValuesApplyConfiguration{} -} - -// WithTo sets the To field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the To field is set to the value of the last call. -func (b *MTUMigrationValuesApplyConfiguration) WithTo(value uint32) *MTUMigrationValuesApplyConfiguration { - b.To = &value - return b -} - -// WithFrom sets the From field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the From field is set to the value of the last call. -func (b *MTUMigrationValuesApplyConfiguration) WithFrom(value uint32) *MTUMigrationValuesApplyConfiguration { - b.From = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/netflowconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/netflowconfig.go deleted file mode 100644 index b0669096c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/netflowconfig.go +++ /dev/null @@ -1,31 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NetFlowConfigApplyConfiguration represents a declarative configuration of the NetFlowConfig type for use -// with apply. -type NetFlowConfigApplyConfiguration struct { - // netFlow defines the NetFlow collectors that will consume the flow data exported from OVS. - // It is a list of strings formatted as ip:port with a maximum of ten items - Collectors []operatorv1.IPPort `json:"collectors,omitempty"` -} - -// NetFlowConfigApplyConfiguration constructs a declarative configuration of the NetFlowConfig type for use with -// apply. -func NetFlowConfig() *NetFlowConfigApplyConfiguration { - return &NetFlowConfigApplyConfiguration{} -} - -// WithCollectors adds the given value to the Collectors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *NetFlowConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *NetFlowConfigApplyConfiguration { - for i := range values { - b.Collectors = append(b.Collectors, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/network.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/network.go deleted file mode 100644 index 6e5afa7b2..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/network.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NetworkApplyConfiguration represents a declarative configuration of the Network type for use -// with apply. -// -// Network describes the cluster's desired network configuration. It is -// consumed by the cluster-network-operator. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type NetworkApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *NetworkSpecApplyConfiguration `json:"spec,omitempty"` - Status *NetworkStatusApplyConfiguration `json:"status,omitempty"` -} - -// Network constructs a declarative configuration of the Network type for use with -// apply. -func Network(name string) *NetworkApplyConfiguration { - b := &NetworkApplyConfiguration{} - b.WithName(name) - b.WithKind("Network") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractNetworkFrom extracts the applied configuration owned by fieldManager from -// network for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// network must be a unmodified Network API object that was retrieved from the Kubernetes API. -// ExtractNetworkFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNetworkFrom(network *operatorv1.Network, fieldManager string, subresource string) (*NetworkApplyConfiguration, error) { - b := &NetworkApplyConfiguration{} - err := managedfields.ExtractInto(network, internal.Parser().Type("com.github.openshift.api.operator.v1.Network"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(network.Name) - - b.WithKind("Network") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractNetwork extracts the applied configuration owned by fieldManager from -// network. If no managedFields are found in network for fieldManager, a -// NetworkApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// network must be a unmodified Network API object that was retrieved from the Kubernetes API. -// ExtractNetwork provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractNetwork(network *operatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { - return ExtractNetworkFrom(network, fieldManager, "") -} - -// ExtractNetworkStatus extracts the applied configuration owned by fieldManager from -// network for the status subresource. -func ExtractNetworkStatus(network *operatorv1.Network, fieldManager string) (*NetworkApplyConfiguration, error) { - return ExtractNetworkFrom(network, fieldManager, "status") -} - -func (b NetworkApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithKind(value string) *NetworkApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithAPIVersion(value string) *NetworkApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithName(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithGenerateName(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithNamespace(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithUID(value types.UID) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithResourceVersion(value string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithGeneration(value int64) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *NetworkApplyConfiguration) WithLabels(entries map[string]string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *NetworkApplyConfiguration) WithAnnotations(entries map[string]string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *NetworkApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *NetworkApplyConfiguration) WithFinalizers(values ...string) *NetworkApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *NetworkApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithSpec(value *NetworkSpecApplyConfiguration) *NetworkApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *NetworkApplyConfiguration) WithStatus(value *NetworkStatusApplyConfiguration) *NetworkApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *NetworkApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkmigration.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkmigration.go deleted file mode 100644 index 02bab38e5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkmigration.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NetworkMigrationApplyConfiguration represents a declarative configuration of the NetworkMigration type for use -// with apply. -// -// NetworkMigration represents the cluster network migration configuration. -type NetworkMigrationApplyConfiguration struct { - // mtu contains the MTU migration configuration. Set this to allow changing - // the MTU values for the default network. If unset, the operation of - // changing the MTU for the default network will be rejected. - MTU *MTUMigrationApplyConfiguration `json:"mtu,omitempty"` - // networkType was previously used when changing the default network type. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - NetworkType *string `json:"networkType,omitempty"` - // features was previously used to configure which network plugin features - // would be migrated in a network type migration. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - Features *FeaturesMigrationApplyConfiguration `json:"features,omitempty"` - // mode indicates the mode of network type migration. - // DEPRECATED: network type migration is no longer supported, and setting - // this to a non-empty value will result in the network operator rejecting - // the configuration. - Mode *operatorv1.NetworkMigrationMode `json:"mode,omitempty"` -} - -// NetworkMigrationApplyConfiguration constructs a declarative configuration of the NetworkMigration type for use with -// apply. -func NetworkMigration() *NetworkMigrationApplyConfiguration { - return &NetworkMigrationApplyConfiguration{} -} - -// WithMTU sets the MTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MTU field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithMTU(value *MTUMigrationApplyConfiguration) *NetworkMigrationApplyConfiguration { - b.MTU = value - return b -} - -// WithNetworkType sets the NetworkType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NetworkType field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithNetworkType(value string) *NetworkMigrationApplyConfiguration { - b.NetworkType = &value - return b -} - -// WithFeatures sets the Features field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Features field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithFeatures(value *FeaturesMigrationApplyConfiguration) *NetworkMigrationApplyConfiguration { - b.Features = value - return b -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *NetworkMigrationApplyConfiguration) WithMode(value operatorv1.NetworkMigrationMode) *NetworkMigrationApplyConfiguration { - b.Mode = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkspec.go deleted file mode 100644 index be4f44b6c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkspec.go +++ /dev/null @@ -1,229 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// NetworkSpecApplyConfiguration represents a declarative configuration of the NetworkSpec type for use -// with apply. -// -// NetworkSpec is the top-level network configuration object. -type NetworkSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // clusterNetwork is the IP address pool to use for pod IPs. - // Some network providers support multiple ClusterNetworks. - // Others only support one. This is equivalent to the cluster-cidr. - ClusterNetwork []ClusterNetworkEntryApplyConfiguration `json:"clusterNetwork,omitempty"` - // serviceNetwork is the ip address pool to use for Service IPs - // Currently, all existing network providers only support a single value - // here, but this is an array to allow for growth. - ServiceNetwork []string `json:"serviceNetwork,omitempty"` - // defaultNetwork is the "default" network that all pods will receive - DefaultNetwork *DefaultNetworkDefinitionApplyConfiguration `json:"defaultNetwork,omitempty"` - // additionalNetworks is a list of extra networks to make available to pods - // when multiple networks are enabled. - AdditionalNetworks []AdditionalNetworkDefinitionApplyConfiguration `json:"additionalNetworks,omitempty"` - // disableMultiNetwork defaults to 'false' and this setting enables the pod multi-networking capability. - // disableMultiNetwork when set to 'true' at cluster install time does not install the components, typically the Multus CNI and the network-attachment-definition CRD, - // that enable the pod multi-networking capability. Setting the parameter to 'true' might be useful when you need install third-party CNI plugins, - // but these plugins are not supported by Red Hat. Changing the parameter value as a postinstallation cluster task has no effect. - DisableMultiNetwork *bool `json:"disableMultiNetwork,omitempty"` - // useMultiNetworkPolicy enables a controller which allows for - // MultiNetworkPolicy objects to be used on additional networks as - // created by Multus CNI. MultiNetworkPolicy are similar to NetworkPolicy - // objects, but NetworkPolicy objects only apply to the primary interface. - // With MultiNetworkPolicy, you can control the traffic that a pod can receive - // over the secondary interfaces. If unset, this property defaults to 'false' - // and MultiNetworkPolicy objects are ignored. If 'disableMultiNetwork' is - // 'true' then the value of this field is ignored. - UseMultiNetworkPolicy *bool `json:"useMultiNetworkPolicy,omitempty"` - // deployKubeProxy specifies whether or not a standalone kube-proxy should - // be deployed by the operator. Some network providers include kube-proxy - // or similar functionality. If unset, the plugin will attempt to select - // the correct value, which is false when ovn-kubernetes is used and true - // otherwise. - DeployKubeProxy *bool `json:"deployKubeProxy,omitempty"` - // disableNetworkDiagnostics specifies whether or not PodNetworkConnectivityCheck - // CRs from a test pod to every node, apiserver and LB should be disabled or not. - // If unset, this property defaults to 'false' and network diagnostics is enabled. - // Setting this to 'true' would reduce the additional load of the pods performing the checks. - DisableNetworkDiagnostics *bool `json:"disableNetworkDiagnostics,omitempty"` - // kubeProxyConfig lets us configure desired proxy configuration, if - // deployKubeProxy is true. If not specified, sensible defaults will be chosen by - // OpenShift directly. - KubeProxyConfig *ProxyConfigApplyConfiguration `json:"kubeProxyConfig,omitempty"` - // exportNetworkFlows enables and configures the export of network flow metadata from the pod network - // by using protocols NetFlow, SFlow or IPFIX. Currently only supported on OVN-Kubernetes plugin. - // If unset, flows will not be exported to any collector. - ExportNetworkFlows *ExportNetworkFlowsApplyConfiguration `json:"exportNetworkFlows,omitempty"` - // migration enables and configures cluster network migration, for network changes - // that cannot be made instantly. - Migration *NetworkMigrationApplyConfiguration `json:"migration,omitempty"` - // additionalRoutingCapabilities describes components and relevant - // configuration providing additional routing capabilities. When set, it - // enables such components and the usage of the routing capabilities they - // provide for the machine network. Upstream operators, like MetalLB - // operator, requiring these capabilities may rely on, or automatically set - // this attribute. Network plugins may leverage advanced routing - // capabilities acquired through the enablement of these components but may - // require specific configuration on their side to do so; refer to their - // respective documentation and configuration options. - AdditionalRoutingCapabilities *AdditionalRoutingCapabilitiesApplyConfiguration `json:"additionalRoutingCapabilities,omitempty"` -} - -// NetworkSpecApplyConfiguration constructs a declarative configuration of the NetworkSpec type for use with -// apply. -func NetworkSpec() *NetworkSpecApplyConfiguration { - return &NetworkSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *NetworkSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *NetworkSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *NetworkSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *NetworkSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *NetworkSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithClusterNetwork adds the given value to the ClusterNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ClusterNetwork field. -func (b *NetworkSpecApplyConfiguration) WithClusterNetwork(values ...*ClusterNetworkEntryApplyConfiguration) *NetworkSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithClusterNetwork") - } - b.ClusterNetwork = append(b.ClusterNetwork, *values[i]) - } - return b -} - -// WithServiceNetwork adds the given value to the ServiceNetwork field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ServiceNetwork field. -func (b *NetworkSpecApplyConfiguration) WithServiceNetwork(values ...string) *NetworkSpecApplyConfiguration { - for i := range values { - b.ServiceNetwork = append(b.ServiceNetwork, values[i]) - } - return b -} - -// WithDefaultNetwork sets the DefaultNetwork field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DefaultNetwork field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithDefaultNetwork(value *DefaultNetworkDefinitionApplyConfiguration) *NetworkSpecApplyConfiguration { - b.DefaultNetwork = value - return b -} - -// WithAdditionalNetworks adds the given value to the AdditionalNetworks field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalNetworks field. -func (b *NetworkSpecApplyConfiguration) WithAdditionalNetworks(values ...*AdditionalNetworkDefinitionApplyConfiguration) *NetworkSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalNetworks") - } - b.AdditionalNetworks = append(b.AdditionalNetworks, *values[i]) - } - return b -} - -// WithDisableMultiNetwork sets the DisableMultiNetwork field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DisableMultiNetwork field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithDisableMultiNetwork(value bool) *NetworkSpecApplyConfiguration { - b.DisableMultiNetwork = &value - return b -} - -// WithUseMultiNetworkPolicy sets the UseMultiNetworkPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UseMultiNetworkPolicy field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithUseMultiNetworkPolicy(value bool) *NetworkSpecApplyConfiguration { - b.UseMultiNetworkPolicy = &value - return b -} - -// WithDeployKubeProxy sets the DeployKubeProxy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeployKubeProxy field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithDeployKubeProxy(value bool) *NetworkSpecApplyConfiguration { - b.DeployKubeProxy = &value - return b -} - -// WithDisableNetworkDiagnostics sets the DisableNetworkDiagnostics field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DisableNetworkDiagnostics field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithDisableNetworkDiagnostics(value bool) *NetworkSpecApplyConfiguration { - b.DisableNetworkDiagnostics = &value - return b -} - -// WithKubeProxyConfig sets the KubeProxyConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the KubeProxyConfig field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithKubeProxyConfig(value *ProxyConfigApplyConfiguration) *NetworkSpecApplyConfiguration { - b.KubeProxyConfig = value - return b -} - -// WithExportNetworkFlows sets the ExportNetworkFlows field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExportNetworkFlows field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithExportNetworkFlows(value *ExportNetworkFlowsApplyConfiguration) *NetworkSpecApplyConfiguration { - b.ExportNetworkFlows = value - return b -} - -// WithMigration sets the Migration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Migration field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithMigration(value *NetworkMigrationApplyConfiguration) *NetworkSpecApplyConfiguration { - b.Migration = value - return b -} - -// WithAdditionalRoutingCapabilities sets the AdditionalRoutingCapabilities field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalRoutingCapabilities field is set to the value of the last call. -func (b *NetworkSpecApplyConfiguration) WithAdditionalRoutingCapabilities(value *AdditionalRoutingCapabilitiesApplyConfiguration) *NetworkSpecApplyConfiguration { - b.AdditionalRoutingCapabilities = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkstatus.go deleted file mode 100644 index 76b62670a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/networkstatus.go +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NetworkStatusApplyConfiguration represents a declarative configuration of the NetworkStatus type for use -// with apply. -// -// NetworkStatus is detailed operator status, which is distilled -// up to the Network clusteroperator object. -type NetworkStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// NetworkStatusApplyConfiguration constructs a declarative configuration of the NetworkStatus type for use with -// apply. -func NetworkStatus() *NetworkStatusApplyConfiguration { - return &NetworkStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithObservedGeneration(value int64) *NetworkStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *NetworkStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *NetworkStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithVersion(value string) *NetworkStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithReadyReplicas(value int32) *NetworkStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *NetworkStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *NetworkStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *NetworkStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *NetworkStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyclusterstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyclusterstatus.go deleted file mode 100644 index 7b025ef7b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyclusterstatus.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicyClusterStatusApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyClusterStatus type for use -// with apply. -// -// NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a -// merge of cluster defaults and user provided policies -type NodeDisruptionPolicyClusterStatusApplyConfiguration struct { - // files is a list of MachineConfig file definitions and actions to take to changes on those paths - Files []NodeDisruptionPolicyStatusFileApplyConfiguration `json:"files,omitempty"` - // units is a list MachineConfig unit definitions and actions to take on changes to those services - Units []NodeDisruptionPolicyStatusUnitApplyConfiguration `json:"units,omitempty"` - // sshkey is the overall sshkey MachineConfig definition - SSHKey *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration `json:"sshkey,omitempty"` -} - -// NodeDisruptionPolicyClusterStatusApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyClusterStatus type for use with -// apply. -func NodeDisruptionPolicyClusterStatus() *NodeDisruptionPolicyClusterStatusApplyConfiguration { - return &NodeDisruptionPolicyClusterStatusApplyConfiguration{} -} - -// WithFiles adds the given value to the Files field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Files field. -func (b *NodeDisruptionPolicyClusterStatusApplyConfiguration) WithFiles(values ...*NodeDisruptionPolicyStatusFileApplyConfiguration) *NodeDisruptionPolicyClusterStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFiles") - } - b.Files = append(b.Files, *values[i]) - } - return b -} - -// WithUnits adds the given value to the Units field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Units field. -func (b *NodeDisruptionPolicyClusterStatusApplyConfiguration) WithUnits(values ...*NodeDisruptionPolicyStatusUnitApplyConfiguration) *NodeDisruptionPolicyClusterStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithUnits") - } - b.Units = append(b.Units, *values[i]) - } - return b -} - -// WithSSHKey sets the SSHKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SSHKey field is set to the value of the last call. -func (b *NodeDisruptionPolicyClusterStatusApplyConfiguration) WithSSHKey(value *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration) *NodeDisruptionPolicyClusterStatusApplyConfiguration { - b.SSHKey = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyconfig.go deleted file mode 100644 index 4784ec623..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyconfig.go +++ /dev/null @@ -1,59 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicyConfigApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyConfig type for use -// with apply. -// -// NodeDisruptionPolicyConfig is the overall spec definition for files/units/sshkeys -type NodeDisruptionPolicyConfigApplyConfiguration struct { - // files is a list of MachineConfig file definitions and actions to take to changes on those paths - // This list supports a maximum of 50 entries. - Files []NodeDisruptionPolicySpecFileApplyConfiguration `json:"files,omitempty"` - // units is a list MachineConfig unit definitions and actions to take on changes to those services - // This list supports a maximum of 50 entries. - Units []NodeDisruptionPolicySpecUnitApplyConfiguration `json:"units,omitempty"` - // sshkey maps to the ignition.sshkeys field in the MachineConfig object, definition an action for this - // will apply to all sshkey changes in the cluster - SSHKey *NodeDisruptionPolicySpecSSHKeyApplyConfiguration `json:"sshkey,omitempty"` -} - -// NodeDisruptionPolicyConfigApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyConfig type for use with -// apply. -func NodeDisruptionPolicyConfig() *NodeDisruptionPolicyConfigApplyConfiguration { - return &NodeDisruptionPolicyConfigApplyConfiguration{} -} - -// WithFiles adds the given value to the Files field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Files field. -func (b *NodeDisruptionPolicyConfigApplyConfiguration) WithFiles(values ...*NodeDisruptionPolicySpecFileApplyConfiguration) *NodeDisruptionPolicyConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithFiles") - } - b.Files = append(b.Files, *values[i]) - } - return b -} - -// WithUnits adds the given value to the Units field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Units field. -func (b *NodeDisruptionPolicyConfigApplyConfiguration) WithUnits(values ...*NodeDisruptionPolicySpecUnitApplyConfiguration) *NodeDisruptionPolicyConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithUnits") - } - b.Units = append(b.Units, *values[i]) - } - return b -} - -// WithSSHKey sets the SSHKey field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SSHKey field is set to the value of the last call. -func (b *NodeDisruptionPolicyConfigApplyConfiguration) WithSSHKey(value *NodeDisruptionPolicySpecSSHKeyApplyConfiguration) *NodeDisruptionPolicyConfigApplyConfiguration { - b.SSHKey = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go deleted file mode 100644 index 20998df31..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecaction.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NodeDisruptionPolicySpecActionApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecAction type for use -// with apply. -type NodeDisruptionPolicySpecActionApplyConfiguration struct { - // type represents the commands that will be carried out if this NodeDisruptionPolicySpecActionType is executed - // Valid values are Reboot, Drain, Reload, Restart, DaemonReload and None. - // reload/restart requires a corresponding service target specified in the reload/restart field. - // Other values require no further configuration - Type *operatorv1.NodeDisruptionPolicySpecActionType `json:"type,omitempty"` - // reload specifies the service to reload, only valid if type is reload - Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` - // restart specifies the service to restart, only valid if type is restart - Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` -} - -// NodeDisruptionPolicySpecActionApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicySpecAction type for use with -// apply. -func NodeDisruptionPolicySpecAction() *NodeDisruptionPolicySpecActionApplyConfiguration { - return &NodeDisruptionPolicySpecActionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecActionApplyConfiguration) WithType(value operatorv1.NodeDisruptionPolicySpecActionType) *NodeDisruptionPolicySpecActionApplyConfiguration { - b.Type = &value - return b -} - -// WithReload sets the Reload field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reload field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecActionApplyConfiguration) WithReload(value *ReloadServiceApplyConfiguration) *NodeDisruptionPolicySpecActionApplyConfiguration { - b.Reload = value - return b -} - -// WithRestart sets the Restart field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Restart field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecActionApplyConfiguration) WithRestart(value *RestartServiceApplyConfiguration) *NodeDisruptionPolicySpecActionApplyConfiguration { - b.Restart = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecfile.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecfile.go deleted file mode 100644 index c46014817..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecfile.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicySpecFileApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecFile type for use -// with apply. -// -// NodeDisruptionPolicySpecFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecFileApplyConfiguration struct { - // path is the location of a file being managed through a MachineConfig. - // The Actions in the policy will apply to changes to the file at this path. - Path *string `json:"path,omitempty"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicySpecActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicySpecFileApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicySpecFile type for use with -// apply. -func NodeDisruptionPolicySpecFile() *NodeDisruptionPolicySpecFileApplyConfiguration { - return &NodeDisruptionPolicySpecFileApplyConfiguration{} -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecFileApplyConfiguration) WithPath(value string) *NodeDisruptionPolicySpecFileApplyConfiguration { - b.Path = &value - return b -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicySpecFileApplyConfiguration) WithActions(values ...*NodeDisruptionPolicySpecActionApplyConfiguration) *NodeDisruptionPolicySpecFileApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecsshkey.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecsshkey.go deleted file mode 100644 index 88edfa075..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecsshkey.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicySpecSSHKeyApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecSSHKey type for use -// with apply. -// -// NodeDisruptionPolicySpecSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecSSHKeyApplyConfiguration struct { - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicySpecActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicySpecSSHKeyApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicySpecSSHKey type for use with -// apply. -func NodeDisruptionPolicySpecSSHKey() *NodeDisruptionPolicySpecSSHKeyApplyConfiguration { - return &NodeDisruptionPolicySpecSSHKeyApplyConfiguration{} -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicySpecSSHKeyApplyConfiguration) WithActions(values ...*NodeDisruptionPolicySpecActionApplyConfiguration) *NodeDisruptionPolicySpecSSHKeyApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go deleted file mode 100644 index de3cbba3e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicyspecunit.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NodeDisruptionPolicySpecUnitApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicySpecUnit type for use -// with apply. -// -// NodeDisruptionPolicySpecUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyConfig object -type NodeDisruptionPolicySpecUnitApplyConfiguration struct { - // name represents the service name of a systemd service managed through a MachineConfig - // Actions specified will be applied for changes to the named service. - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - Name *operatorv1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicySpecActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicySpecUnitApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicySpecUnit type for use with -// apply. -func NodeDisruptionPolicySpecUnit() *NodeDisruptionPolicySpecUnitApplyConfiguration { - return &NodeDisruptionPolicySpecUnitApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NodeDisruptionPolicySpecUnitApplyConfiguration) WithName(value operatorv1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicySpecUnitApplyConfiguration { - b.Name = &value - return b -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicySpecUnitApplyConfiguration) WithActions(values ...*NodeDisruptionPolicySpecActionApplyConfiguration) *NodeDisruptionPolicySpecUnitApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatus.go deleted file mode 100644 index 75a2f800c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatus.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicyStatusApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatus type for use -// with apply. -type NodeDisruptionPolicyStatusApplyConfiguration struct { - // clusterPolicies is a merge of cluster default and user provided node disruption policies. - ClusterPolicies *NodeDisruptionPolicyClusterStatusApplyConfiguration `json:"clusterPolicies,omitempty"` -} - -// NodeDisruptionPolicyStatusApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatus type for use with -// apply. -func NodeDisruptionPolicyStatus() *NodeDisruptionPolicyStatusApplyConfiguration { - return &NodeDisruptionPolicyStatusApplyConfiguration{} -} - -// WithClusterPolicies sets the ClusterPolicies field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClusterPolicies field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusApplyConfiguration) WithClusterPolicies(value *NodeDisruptionPolicyClusterStatusApplyConfiguration) *NodeDisruptionPolicyStatusApplyConfiguration { - b.ClusterPolicies = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go deleted file mode 100644 index 17585f8f3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusaction.go +++ /dev/null @@ -1,51 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NodeDisruptionPolicyStatusActionApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusAction type for use -// with apply. -type NodeDisruptionPolicyStatusActionApplyConfiguration struct { - // type represents the commands that will be carried out if this NodeDisruptionPolicyStatusActionType is executed - // Valid values are Reboot, Drain, Reload, Restart, DaemonReload, None and Special. - // reload/restart requires a corresponding service target specified in the reload/restart field. - // Other values require no further configuration - Type *operatorv1.NodeDisruptionPolicyStatusActionType `json:"type,omitempty"` - // reload specifies the service to reload, only valid if type is reload - Reload *ReloadServiceApplyConfiguration `json:"reload,omitempty"` - // restart specifies the service to restart, only valid if type is restart - Restart *RestartServiceApplyConfiguration `json:"restart,omitempty"` -} - -// NodeDisruptionPolicyStatusActionApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatusAction type for use with -// apply. -func NodeDisruptionPolicyStatusAction() *NodeDisruptionPolicyStatusActionApplyConfiguration { - return &NodeDisruptionPolicyStatusActionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusActionApplyConfiguration) WithType(value operatorv1.NodeDisruptionPolicyStatusActionType) *NodeDisruptionPolicyStatusActionApplyConfiguration { - b.Type = &value - return b -} - -// WithReload sets the Reload field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reload field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusActionApplyConfiguration) WithReload(value *ReloadServiceApplyConfiguration) *NodeDisruptionPolicyStatusActionApplyConfiguration { - b.Reload = value - return b -} - -// WithRestart sets the Restart field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Restart field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusActionApplyConfiguration) WithRestart(value *RestartServiceApplyConfiguration) *NodeDisruptionPolicyStatusActionApplyConfiguration { - b.Restart = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusfile.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusfile.go deleted file mode 100644 index c4b8e85b1..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusfile.go +++ /dev/null @@ -1,48 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicyStatusFileApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusFile type for use -// with apply. -// -// NodeDisruptionPolicyStatusFile is a file entry and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusFileApplyConfiguration struct { - // path is the location of a file being managed through a MachineConfig. - // The Actions in the policy will apply to changes to the file at this path. - Path *string `json:"path,omitempty"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicyStatusActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicyStatusFileApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatusFile type for use with -// apply. -func NodeDisruptionPolicyStatusFile() *NodeDisruptionPolicyStatusFileApplyConfiguration { - return &NodeDisruptionPolicyStatusFileApplyConfiguration{} -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusFileApplyConfiguration) WithPath(value string) *NodeDisruptionPolicyStatusFileApplyConfiguration { - b.Path = &value - return b -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicyStatusFileApplyConfiguration) WithActions(values ...*NodeDisruptionPolicyStatusActionApplyConfiguration) *NodeDisruptionPolicyStatusFileApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatussshkey.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatussshkey.go deleted file mode 100644 index 60d537c5e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatussshkey.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// NodeDisruptionPolicyStatusSSHKeyApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusSSHKey type for use -// with apply. -// -// NodeDisruptionPolicyStatusSSHKey is actions to take for any SSHKey change and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusSSHKeyApplyConfiguration struct { - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicyStatusActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicyStatusSSHKeyApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatusSSHKey type for use with -// apply. -func NodeDisruptionPolicyStatusSSHKey() *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration { - return &NodeDisruptionPolicyStatusSSHKeyApplyConfiguration{} -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration) WithActions(values ...*NodeDisruptionPolicyStatusActionApplyConfiguration) *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go deleted file mode 100644 index d9b235e8d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodedisruptionpolicystatusunit.go +++ /dev/null @@ -1,55 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NodeDisruptionPolicyStatusUnitApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusUnit type for use -// with apply. -// -// NodeDisruptionPolicyStatusUnit is a systemd unit name and corresponding actions to take and is used in the NodeDisruptionPolicyClusterStatus object -type NodeDisruptionPolicyStatusUnitApplyConfiguration struct { - // name represents the service name of a systemd service managed through a MachineConfig - // Actions specified will be applied for changes to the named service. - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - Name *operatorv1.NodeDisruptionPolicyServiceName `json:"name,omitempty"` - // actions represents the series of commands to be executed on changes to the file at - // the corresponding file path. Actions will be applied in the order that - // they are set in this list. If there are other incoming changes to other MachineConfig - // entries in the same update that require a reboot, the reboot will supercede these actions. - // Valid actions are Reboot, Drain, Reload, DaemonReload and None. - // The Reboot action and the None action cannot be used in conjunction with any of the other actions. - // This list supports a maximum of 10 entries. - Actions []NodeDisruptionPolicyStatusActionApplyConfiguration `json:"actions,omitempty"` -} - -// NodeDisruptionPolicyStatusUnitApplyConfiguration constructs a declarative configuration of the NodeDisruptionPolicyStatusUnit type for use with -// apply. -func NodeDisruptionPolicyStatusUnit() *NodeDisruptionPolicyStatusUnitApplyConfiguration { - return &NodeDisruptionPolicyStatusUnitApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithName(value operatorv1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicyStatusUnitApplyConfiguration { - b.Name = &value - return b -} - -// WithActions adds the given value to the Actions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Actions field. -func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithActions(values ...*NodeDisruptionPolicyStatusActionApplyConfiguration) *NodeDisruptionPolicyStatusUnitApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithActions") - } - b.Actions = append(b.Actions, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeplacement.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeplacement.go deleted file mode 100644 index a8a866e31..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeplacement.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// NodePlacementApplyConfiguration represents a declarative configuration of the NodePlacement type for use -// with apply. -// -// NodePlacement describes node scheduling configuration for an ingress -// controller. -type NodePlacementApplyConfiguration struct { - // nodeSelector is the node selector applied to ingress controller - // deployments. - // - // If set, the specified selector is used and replaces the default. - // - // If unset, the default depends on the value of the defaultPlacement - // field in the cluster config.openshift.io/v1/ingresses status. - // - // When defaultPlacement is Workers, the default is: - // - // kubernetes.io/os: linux - // node-role.kubernetes.io/worker: ” - // - // When defaultPlacement is ControlPlane, the default is: - // - // kubernetes.io/os: linux - // node-role.kubernetes.io/master: ” - // - // These defaults are subject to change. - // - // Note that using nodeSelector.matchExpressions is not supported. Only - // nodeSelector.matchLabels may be used. This is a limitation of the - // Kubernetes API: the pod spec does not allow complex expressions for - // node selectors. - NodeSelector *metav1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"` - // tolerations is a list of tolerations applied to ingress controller - // deployments. - // - // The default is an empty list. - // - // See https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ - Tolerations []corev1.Toleration `json:"tolerations,omitempty"` -} - -// NodePlacementApplyConfiguration constructs a declarative configuration of the NodePlacement type for use with -// apply. -func NodePlacement() *NodePlacementApplyConfiguration { - return &NodePlacementApplyConfiguration{} -} - -// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeSelector field is set to the value of the last call. -func (b *NodePlacementApplyConfiguration) WithNodeSelector(value *metav1.LabelSelectorApplyConfiguration) *NodePlacementApplyConfiguration { - b.NodeSelector = value - return b -} - -// WithTolerations adds the given value to the Tolerations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Tolerations field. -func (b *NodePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NodePlacementApplyConfiguration { - for i := range values { - b.Tolerations = append(b.Tolerations, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeportstrategy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeportstrategy.go deleted file mode 100644 index 38752d230..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodeportstrategy.go +++ /dev/null @@ -1,53 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NodePortStrategyApplyConfiguration represents a declarative configuration of the NodePortStrategy type for use -// with apply. -// -// NodePortStrategy holds parameters for the NodePortService endpoint publishing strategy. -type NodePortStrategyApplyConfiguration struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` -} - -// NodePortStrategyApplyConfiguration constructs a declarative configuration of the NodePortStrategy type for use with -// apply. -func NodePortStrategy() *NodePortStrategyApplyConfiguration { - return &NodePortStrategyApplyConfiguration{} -} - -// WithProtocol sets the Protocol field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Protocol field is set to the value of the last call. -func (b *NodePortStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *NodePortStrategyApplyConfiguration { - b.Protocol = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go deleted file mode 100644 index f107c370d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nodestatus.go +++ /dev/null @@ -1,114 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// NodeStatusApplyConfiguration represents a declarative configuration of the NodeStatus type for use -// with apply. -// -// NodeStatus provides information about the current state of a particular node managed by this operator. -type NodeStatusApplyConfiguration struct { - // nodeName is the name of the node - NodeName *string `json:"nodeName,omitempty"` - // currentRevision is the generation of the most recently successful deployment. - // Can not be set on creation of a nodeStatus. Updates must only increase the value. - CurrentRevision *int32 `json:"currentRevision,omitempty"` - // targetRevision is the generation of the deployment we're trying to apply. - // Can not be set on creation of a nodeStatus. - TargetRevision *int32 `json:"targetRevision,omitempty"` - // lastFailedRevision is the generation of the deployment we tried and failed to deploy. - LastFailedRevision *int32 `json:"lastFailedRevision,omitempty"` - // lastFailedTime is the time the last failed revision failed the last time. - LastFailedTime *metav1.Time `json:"lastFailedTime,omitempty"` - // lastFailedReason is a machine readable failure reason string. - LastFailedReason *string `json:"lastFailedReason,omitempty"` - // lastFailedCount is how often the installer pod of the last failed revision failed. - LastFailedCount *int `json:"lastFailedCount,omitempty"` - // lastFallbackCount is how often a fallback to a previous revision happened. - LastFallbackCount *int `json:"lastFallbackCount,omitempty"` - // lastFailedRevisionErrors is a list of human readable errors during the failed deployment referenced in lastFailedRevision. - LastFailedRevisionErrors []string `json:"lastFailedRevisionErrors,omitempty"` -} - -// NodeStatusApplyConfiguration constructs a declarative configuration of the NodeStatus type for use with -// apply. -func NodeStatus() *NodeStatusApplyConfiguration { - return &NodeStatusApplyConfiguration{} -} - -// WithNodeName sets the NodeName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NodeName field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithNodeName(value string) *NodeStatusApplyConfiguration { - b.NodeName = &value - return b -} - -// WithCurrentRevision sets the CurrentRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CurrentRevision field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithCurrentRevision(value int32) *NodeStatusApplyConfiguration { - b.CurrentRevision = &value - return b -} - -// WithTargetRevision sets the TargetRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TargetRevision field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithTargetRevision(value int32) *NodeStatusApplyConfiguration { - b.TargetRevision = &value - return b -} - -// WithLastFailedRevision sets the LastFailedRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastFailedRevision field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFailedRevision(value int32) *NodeStatusApplyConfiguration { - b.LastFailedRevision = &value - return b -} - -// WithLastFailedTime sets the LastFailedTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastFailedTime field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFailedTime(value metav1.Time) *NodeStatusApplyConfiguration { - b.LastFailedTime = &value - return b -} - -// WithLastFailedReason sets the LastFailedReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastFailedReason field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFailedReason(value string) *NodeStatusApplyConfiguration { - b.LastFailedReason = &value - return b -} - -// WithLastFailedCount sets the LastFailedCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastFailedCount field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFailedCount(value int) *NodeStatusApplyConfiguration { - b.LastFailedCount = &value - return b -} - -// WithLastFallbackCount sets the LastFallbackCount field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastFallbackCount field is set to the value of the last call. -func (b *NodeStatusApplyConfiguration) WithLastFallbackCount(value int) *NodeStatusApplyConfiguration { - b.LastFallbackCount = &value - return b -} - -// WithLastFailedRevisionErrors adds the given value to the LastFailedRevisionErrors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the LastFailedRevisionErrors field. -func (b *NodeStatusApplyConfiguration) WithLastFailedRevisionErrors(values ...string) *NodeStatusApplyConfiguration { - for i := range values { - b.LastFailedRevisionErrors = append(b.LastFailedRevisionErrors, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nooverlayconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nooverlayconfig.go deleted file mode 100644 index 0feb3009e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/nooverlayconfig.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// NoOverlayConfigApplyConfiguration represents a declarative configuration of the NoOverlayConfig type for use -// with apply. -// -// NoOverlayConfig contains configuration options for networks operating in no-overlay mode. -type NoOverlayConfigApplyConfiguration struct { - // outboundSNAT defines the SNAT behavior for outbound traffic from pods. - // Allowed values are "Enabled" and "Disabled". - // When set to "Enabled", SNAT is performed on outbound traffic from pods. - // When set to "Disabled", SNAT is not performed and pod IPs are preserved in outbound traffic. - // This field is required when the network operates in no-overlay mode. - // This field can be set to any value at installation time and can be changed afterwards. - OutboundSNAT *operatorv1.SNATOption `json:"outboundSNAT,omitempty"` - // routing specifies whether the pod network routing is managed by OVN-Kubernetes or users. - // Allowed values are "Managed" and "Unmanaged". - // When set to "Managed", OVN-Kubernetes manages the pod network routing configuration through BGP. - // When set to "Unmanaged", users are responsible for configuring the pod network routing. - // This field is required when the network operates in no-overlay mode. - // This field is immutable once set. - Routing *operatorv1.RoutingOption `json:"routing,omitempty"` -} - -// NoOverlayConfigApplyConfiguration constructs a declarative configuration of the NoOverlayConfig type for use with -// apply. -func NoOverlayConfig() *NoOverlayConfigApplyConfiguration { - return &NoOverlayConfigApplyConfiguration{} -} - -// WithOutboundSNAT sets the OutboundSNAT field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OutboundSNAT field is set to the value of the last call. -func (b *NoOverlayConfigApplyConfiguration) WithOutboundSNAT(value operatorv1.SNATOption) *NoOverlayConfigApplyConfiguration { - b.OutboundSNAT = &value - return b -} - -// WithRouting sets the Routing field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Routing field is set to the value of the last call. -func (b *NoOverlayConfigApplyConfiguration) WithRouting(value operatorv1.RoutingOption) *NoOverlayConfigApplyConfiguration { - b.Routing = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/oauthapiserverstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/oauthapiserverstatus.go deleted file mode 100644 index 1ccbf802f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/oauthapiserverstatus.go +++ /dev/null @@ -1,35 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OAuthAPIServerStatusApplyConfiguration represents a declarative configuration of the OAuthAPIServerStatus type for use -// with apply. -type OAuthAPIServerStatusApplyConfiguration struct { - // latestAvailableRevision is the latest revision used as suffix of revisioned - // secrets like encryption-config. A new revision causes a new deployment of pods. - LatestAvailableRevision *int32 `json:"latestAvailableRevision,omitempty"` - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - EncryptionStatus *KMSEncryptionStatusApplyConfiguration `json:"encryptionStatus,omitempty"` -} - -// OAuthAPIServerStatusApplyConfiguration constructs a declarative configuration of the OAuthAPIServerStatus type for use with -// apply. -func OAuthAPIServerStatus() *OAuthAPIServerStatusApplyConfiguration { - return &OAuthAPIServerStatusApplyConfiguration{} -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *OAuthAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OAuthAPIServerStatusApplyConfiguration { - b.LatestAvailableRevision = &value - return b -} - -// WithEncryptionStatus sets the EncryptionStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EncryptionStatus field is set to the value of the last call. -func (b *OAuthAPIServerStatusApplyConfiguration) WithEncryptionStatus(value *KMSEncryptionStatusApplyConfiguration) *OAuthAPIServerStatusApplyConfiguration { - b.EncryptionStatus = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olm.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olm.go deleted file mode 100644 index 72e686893..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olm.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OLMApplyConfiguration represents a declarative configuration of the OLM type for use -// with apply. -// -// # OLM provides information to configure an operator to manage the OLM controllers -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type OLMApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *OLMSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *OLMStatusApplyConfiguration `json:"status,omitempty"` -} - -// OLM constructs a declarative configuration of the OLM type for use with -// apply. -func OLM(name string) *OLMApplyConfiguration { - b := &OLMApplyConfiguration{} - b.WithName(name) - b.WithKind("OLM") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractOLMFrom extracts the applied configuration owned by fieldManager from -// oLM for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// oLM must be a unmodified OLM API object that was retrieved from the Kubernetes API. -// ExtractOLMFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOLMFrom(oLM *operatorv1.OLM, fieldManager string, subresource string) (*OLMApplyConfiguration, error) { - b := &OLMApplyConfiguration{} - err := managedfields.ExtractInto(oLM, internal.Parser().Type("com.github.openshift.api.operator.v1.OLM"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(oLM.Name) - - b.WithKind("OLM") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractOLM extracts the applied configuration owned by fieldManager from -// oLM. If no managedFields are found in oLM for fieldManager, a -// OLMApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// oLM must be a unmodified OLM API object that was retrieved from the Kubernetes API. -// ExtractOLM provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOLM(oLM *operatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { - return ExtractOLMFrom(oLM, fieldManager, "") -} - -// ExtractOLMStatus extracts the applied configuration owned by fieldManager from -// oLM for the status subresource. -func ExtractOLMStatus(oLM *operatorv1.OLM, fieldManager string) (*OLMApplyConfiguration, error) { - return ExtractOLMFrom(oLM, fieldManager, "status") -} - -func (b OLMApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithKind(value string) *OLMApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithAPIVersion(value string) *OLMApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithName(value string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithGenerateName(value string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithNamespace(value string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithUID(value types.UID) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithResourceVersion(value string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithGeneration(value int64) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *OLMApplyConfiguration) WithLabels(entries map[string]string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *OLMApplyConfiguration) WithAnnotations(entries map[string]string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OLMApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *OLMApplyConfiguration) WithFinalizers(values ...string) *OLMApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *OLMApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithSpec(value *OLMSpecApplyConfiguration) *OLMApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OLMApplyConfiguration) WithStatus(value *OLMStatusApplyConfiguration) *OLMApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *OLMApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *OLMApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *OLMApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *OLMApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmspec.go deleted file mode 100644 index 69309aa49..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// OLMSpecApplyConfiguration represents a declarative configuration of the OLMSpec type for use -// with apply. -type OLMSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// OLMSpecApplyConfiguration constructs a declarative configuration of the OLMSpec type for use with -// apply. -func OLMSpec() *OLMSpecApplyConfiguration { - return &OLMSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *OLMSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OLMSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *OLMSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *OLMSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OLMSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *OLMSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *OLMSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OLMSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmstatus.go deleted file mode 100644 index 3c2d4a184..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/olmstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OLMStatusApplyConfiguration represents a declarative configuration of the OLMStatus type for use -// with apply. -type OLMStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// OLMStatusApplyConfiguration constructs a declarative configuration of the OLMStatus type for use with -// apply. -func OLMStatus() *OLMStatusApplyConfiguration { - return &OLMStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *OLMStatusApplyConfiguration) WithObservedGeneration(value int64) *OLMStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *OLMStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *OLMStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *OLMStatusApplyConfiguration) WithVersion(value string) *OLMStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *OLMStatusApplyConfiguration) WithReadyReplicas(value int32) *OLMStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *OLMStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OLMStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *OLMStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *OLMStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserver.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserver.go deleted file mode 100644 index 7130a308f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserver.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OpenShiftAPIServerApplyConfiguration represents a declarative configuration of the OpenShiftAPIServer type for use -// with apply. -// -// OpenShiftAPIServer provides information to configure an operator to manage openshift-apiserver. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type OpenShiftAPIServerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec is the specification of the desired behavior of the OpenShift API Server. - Spec *OpenShiftAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - // status defines the observed status of the OpenShift API Server. - Status *OpenShiftAPIServerStatusApplyConfiguration `json:"status,omitempty"` -} - -// OpenShiftAPIServer constructs a declarative configuration of the OpenShiftAPIServer type for use with -// apply. -func OpenShiftAPIServer(name string) *OpenShiftAPIServerApplyConfiguration { - b := &OpenShiftAPIServerApplyConfiguration{} - b.WithName(name) - b.WithKind("OpenShiftAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractOpenShiftAPIServerFrom extracts the applied configuration owned by fieldManager from -// openShiftAPIServer for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// openShiftAPIServer must be a unmodified OpenShiftAPIServer API object that was retrieved from the Kubernetes API. -// ExtractOpenShiftAPIServerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOpenShiftAPIServerFrom(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string, subresource string) (*OpenShiftAPIServerApplyConfiguration, error) { - b := &OpenShiftAPIServerApplyConfiguration{} - err := managedfields.ExtractInto(openShiftAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.OpenShiftAPIServer"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openShiftAPIServer.Name) - - b.WithKind("OpenShiftAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractOpenShiftAPIServer extracts the applied configuration owned by fieldManager from -// openShiftAPIServer. If no managedFields are found in openShiftAPIServer for fieldManager, a -// OpenShiftAPIServerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// openShiftAPIServer must be a unmodified OpenShiftAPIServer API object that was retrieved from the Kubernetes API. -// ExtractOpenShiftAPIServer provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOpenShiftAPIServer(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { - return ExtractOpenShiftAPIServerFrom(openShiftAPIServer, fieldManager, "") -} - -// ExtractOpenShiftAPIServerStatus extracts the applied configuration owned by fieldManager from -// openShiftAPIServer for the status subresource. -func ExtractOpenShiftAPIServerStatus(openShiftAPIServer *operatorv1.OpenShiftAPIServer, fieldManager string) (*OpenShiftAPIServerApplyConfiguration, error) { - return ExtractOpenShiftAPIServerFrom(openShiftAPIServer, fieldManager, "status") -} - -func (b OpenShiftAPIServerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithKind(value string) *OpenShiftAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithAPIVersion(value string) *OpenShiftAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithName(value string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithGenerateName(value string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithNamespace(value string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithUID(value types.UID) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithResourceVersion(value string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithGeneration(value int64) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *OpenShiftAPIServerApplyConfiguration) WithLabels(entries map[string]string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *OpenShiftAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OpenShiftAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *OpenShiftAPIServerApplyConfiguration) WithFinalizers(values ...string) *OpenShiftAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *OpenShiftAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithSpec(value *OpenShiftAPIServerSpecApplyConfiguration) *OpenShiftAPIServerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OpenShiftAPIServerApplyConfiguration) WithStatus(value *OpenShiftAPIServerStatusApplyConfiguration) *OpenShiftAPIServerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *OpenShiftAPIServerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *OpenShiftAPIServerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *OpenShiftAPIServerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *OpenShiftAPIServerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go deleted file mode 100644 index 562b43032..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// OpenShiftAPIServerSpecApplyConfiguration represents a declarative configuration of the OpenShiftAPIServerSpec type for use -// with apply. -type OpenShiftAPIServerSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// OpenShiftAPIServerSpecApplyConfiguration constructs a declarative configuration of the OpenShiftAPIServerSpec type for use with -// apply. -func OpenShiftAPIServerSpec() *OpenShiftAPIServerSpecApplyConfiguration { - return &OpenShiftAPIServerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *OpenShiftAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *OpenShiftAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *OpenShiftAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *OpenShiftAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *OpenShiftAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OpenShiftAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go deleted file mode 100644 index 3a68909d5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftapiserverstatus.go +++ /dev/null @@ -1,83 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OpenShiftAPIServerStatusApplyConfiguration represents a declarative configuration of the OpenShiftAPIServerStatus type for use -// with apply. -type OpenShiftAPIServerStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` - // encryptionStatus contains status reports for the KMS plugin health and its key rotation. - EncryptionStatus *KMSEncryptionStatusApplyConfiguration `json:"encryptionStatus,omitempty"` -} - -// OpenShiftAPIServerStatusApplyConfiguration constructs a declarative configuration of the OpenShiftAPIServerStatus type for use with -// apply. -func OpenShiftAPIServerStatus() *OpenShiftAPIServerStatusApplyConfiguration { - return &OpenShiftAPIServerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *OpenShiftAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *OpenShiftAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithVersion(value string) *OpenShiftAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *OpenShiftAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OpenShiftAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *OpenShiftAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithEncryptionStatus sets the EncryptionStatus field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EncryptionStatus field is set to the value of the last call. -func (b *OpenShiftAPIServerStatusApplyConfiguration) WithEncryptionStatus(value *KMSEncryptionStatusApplyConfiguration) *OpenShiftAPIServerStatusApplyConfiguration { - b.EncryptionStatus = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go deleted file mode 100644 index 4a70c185f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanager.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// OpenShiftControllerManagerApplyConfiguration represents a declarative configuration of the OpenShiftControllerManager type for use -// with apply. -// -// OpenShiftControllerManager provides information to configure an operator to manage openshift-controller-manager. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type OpenShiftControllerManagerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *OpenShiftControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - Status *OpenShiftControllerManagerStatusApplyConfiguration `json:"status,omitempty"` -} - -// OpenShiftControllerManager constructs a declarative configuration of the OpenShiftControllerManager type for use with -// apply. -func OpenShiftControllerManager(name string) *OpenShiftControllerManagerApplyConfiguration { - b := &OpenShiftControllerManagerApplyConfiguration{} - b.WithName(name) - b.WithKind("OpenShiftControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractOpenShiftControllerManagerFrom extracts the applied configuration owned by fieldManager from -// openShiftControllerManager for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// openShiftControllerManager must be a unmodified OpenShiftControllerManager API object that was retrieved from the Kubernetes API. -// ExtractOpenShiftControllerManagerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOpenShiftControllerManagerFrom(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string, subresource string) (*OpenShiftControllerManagerApplyConfiguration, error) { - b := &OpenShiftControllerManagerApplyConfiguration{} - err := managedfields.ExtractInto(openShiftControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.OpenShiftControllerManager"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(openShiftControllerManager.Name) - - b.WithKind("OpenShiftControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractOpenShiftControllerManager extracts the applied configuration owned by fieldManager from -// openShiftControllerManager. If no managedFields are found in openShiftControllerManager for fieldManager, a -// OpenShiftControllerManagerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// openShiftControllerManager must be a unmodified OpenShiftControllerManager API object that was retrieved from the Kubernetes API. -// ExtractOpenShiftControllerManager provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractOpenShiftControllerManager(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { - return ExtractOpenShiftControllerManagerFrom(openShiftControllerManager, fieldManager, "") -} - -// ExtractOpenShiftControllerManagerStatus extracts the applied configuration owned by fieldManager from -// openShiftControllerManager for the status subresource. -func ExtractOpenShiftControllerManagerStatus(openShiftControllerManager *operatorv1.OpenShiftControllerManager, fieldManager string) (*OpenShiftControllerManagerApplyConfiguration, error) { - return ExtractOpenShiftControllerManagerFrom(openShiftControllerManager, fieldManager, "status") -} - -func (b OpenShiftControllerManagerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithKind(value string) *OpenShiftControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithAPIVersion(value string) *OpenShiftControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithName(value string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithGenerateName(value string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithNamespace(value string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithUID(value types.UID) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithResourceVersion(value string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithGeneration(value int64) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *OpenShiftControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *OpenShiftControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *OpenShiftControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *OpenShiftControllerManagerApplyConfiguration) WithFinalizers(values ...string) *OpenShiftControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *OpenShiftControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithSpec(value *OpenShiftControllerManagerSpecApplyConfiguration) *OpenShiftControllerManagerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OpenShiftControllerManagerApplyConfiguration) WithStatus(value *OpenShiftControllerManagerStatusApplyConfiguration) *OpenShiftControllerManagerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *OpenShiftControllerManagerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *OpenShiftControllerManagerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *OpenShiftControllerManagerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *OpenShiftControllerManagerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go deleted file mode 100644 index 5c6a0ff50..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// OpenShiftControllerManagerSpecApplyConfiguration represents a declarative configuration of the OpenShiftControllerManagerSpec type for use -// with apply. -type OpenShiftControllerManagerSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// OpenShiftControllerManagerSpecApplyConfiguration constructs a declarative configuration of the OpenShiftControllerManagerSpec type for use with -// apply. -func OpenShiftControllerManagerSpec() *OpenShiftControllerManagerSpecApplyConfiguration { - return &OpenShiftControllerManagerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *OpenShiftControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OpenShiftControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go deleted file mode 100644 index c5b960e23..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftcontrollermanagerstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OpenShiftControllerManagerStatusApplyConfiguration represents a declarative configuration of the OpenShiftControllerManagerStatus type for use -// with apply. -type OpenShiftControllerManagerStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// OpenShiftControllerManagerStatusApplyConfiguration constructs a declarative configuration of the OpenShiftControllerManagerStatus type for use with -// apply. -func OpenShiftControllerManagerStatus() *OpenShiftControllerManagerStatusApplyConfiguration { - return &OpenShiftControllerManagerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *OpenShiftControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *OpenShiftControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithVersion(value string) *OpenShiftControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *OpenShiftControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OpenShiftControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *OpenShiftControllerManagerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *OpenShiftControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go deleted file mode 100644 index 1019a67c7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openshiftsdnconfig.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// OpenShiftSDNConfigApplyConfiguration represents a declarative configuration of the OpenShiftSDNConfig type for use -// with apply. -// -// OpenShiftSDNConfig was used to configure the OpenShift SDN plugin. It is no longer used. -type OpenShiftSDNConfigApplyConfiguration struct { - // mode is one of "Multitenant", "Subnet", or "NetworkPolicy" - Mode *operatorv1.SDNMode `json:"mode,omitempty"` - // vxlanPort is the port to use for all vxlan packets. The default is 4789. - VXLANPort *uint32 `json:"vxlanPort,omitempty"` - // mtu is the mtu to use for the tunnel interface. Defaults to 1450 if unset. - // This must be 50 bytes smaller than the machine's uplink. - MTU *uint32 `json:"mtu,omitempty"` - // useExternalOpenvswitch used to control whether the operator would deploy an OVS - // DaemonSet itself or expect someone else to start OVS. As of 4.6, OVS is always - // run as a system service, and this flag is ignored. - UseExternalOpenvswitch *bool `json:"useExternalOpenvswitch,omitempty"` - // enableUnidling controls whether or not the service proxy will support idling - // and unidling of services. By default, unidling is enabled. - EnableUnidling *bool `json:"enableUnidling,omitempty"` -} - -// OpenShiftSDNConfigApplyConfiguration constructs a declarative configuration of the OpenShiftSDNConfig type for use with -// apply. -func OpenShiftSDNConfig() *OpenShiftSDNConfigApplyConfiguration { - return &OpenShiftSDNConfigApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithMode(value operatorv1.SDNMode) *OpenShiftSDNConfigApplyConfiguration { - b.Mode = &value - return b -} - -// WithVXLANPort sets the VXLANPort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VXLANPort field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithVXLANPort(value uint32) *OpenShiftSDNConfigApplyConfiguration { - b.VXLANPort = &value - return b -} - -// WithMTU sets the MTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MTU field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithMTU(value uint32) *OpenShiftSDNConfigApplyConfiguration { - b.MTU = &value - return b -} - -// WithUseExternalOpenvswitch sets the UseExternalOpenvswitch field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UseExternalOpenvswitch field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithUseExternalOpenvswitch(value bool) *OpenShiftSDNConfigApplyConfiguration { - b.UseExternalOpenvswitch = &value - return b -} - -// WithEnableUnidling sets the EnableUnidling field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EnableUnidling field is set to the value of the last call. -func (b *OpenShiftSDNConfigApplyConfiguration) WithEnableUnidling(value bool) *OpenShiftSDNConfigApplyConfiguration { - b.EnableUnidling = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openstackloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openstackloadbalancerparameters.go deleted file mode 100644 index c89cd8c12..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/openstackloadbalancerparameters.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OpenStackLoadBalancerParametersApplyConfiguration represents a declarative configuration of the OpenStackLoadBalancerParameters type for use -// with apply. -// -// OpenStackLoadBalancerParameters provides configuration settings that are -// specific to OpenStack load balancers. -type OpenStackLoadBalancerParametersApplyConfiguration struct { - // floatingIP specifies the IP address that the load balancer will use. - // When not specified, an IP address will be assigned randomly by the OpenStack cloud provider. - // When specified, the floating IP has to be pre-created. If the - // specified value is not a floating IP or is already claimed, the - // OpenStack cloud provider won't be able to provision the load - // balancer. - // This field may only be used if the IngressController has External scope. - // This value must be a valid IPv4 or IPv6 address. - FloatingIP *string `json:"floatingIP,omitempty"` -} - -// OpenStackLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the OpenStackLoadBalancerParameters type for use with -// apply. -func OpenStackLoadBalancerParameters() *OpenStackLoadBalancerParametersApplyConfiguration { - return &OpenStackLoadBalancerParametersApplyConfiguration{} -} - -// WithFloatingIP sets the FloatingIP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FloatingIP field is set to the value of the last call. -func (b *OpenStackLoadBalancerParametersApplyConfiguration) WithFloatingIP(value string) *OpenStackLoadBalancerParametersApplyConfiguration { - b.FloatingIP = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorcondition.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorcondition.go deleted file mode 100644 index 02855a9a4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorcondition.go +++ /dev/null @@ -1,74 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// OperatorConditionApplyConfiguration represents a declarative configuration of the OperatorCondition type for use -// with apply. -// -// OperatorCondition is just the standard condition fields. -type OperatorConditionApplyConfiguration struct { - // type of condition in CamelCase or in foo.example.com/CamelCase. - // --- - // Many .condition.type values are consistent across resources like Available, but because arbitrary conditions can be - // useful (see .node.status.conditions), the ability to deconflict is important. - // The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) - Type *string `json:"type,omitempty"` - // status of the condition, one of True, False, Unknown. - Status *operatorv1.ConditionStatus `json:"status,omitempty"` - // lastTransitionTime is the last time the condition transitioned from one status to another. - // This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - Reason *string `json:"reason,omitempty"` - Message *string `json:"message,omitempty"` -} - -// OperatorConditionApplyConfiguration constructs a declarative configuration of the OperatorCondition type for use with -// apply. -func OperatorCondition() *OperatorConditionApplyConfiguration { - return &OperatorConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithType(value string) *OperatorConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithStatus(value operatorv1.ConditionStatus) *OperatorConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *OperatorConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithReason(value string) *OperatorConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *OperatorConditionApplyConfiguration) WithMessage(value string) *OperatorConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorspec.go deleted file mode 100644 index 43d03ca59..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorspec.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// OperatorSpecApplyConfiguration represents a declarative configuration of the OperatorSpec type for use -// with apply. -// -// OperatorSpec contains common fields operators need. It is intended to be anonymous included -// inside of the Spec struct for your particular operator. -type OperatorSpecApplyConfiguration struct { - // managementState indicates whether and how the operator should manage the component - ManagementState *operatorv1.ManagementState `json:"managementState,omitempty"` - // logLevel is an intent based logging for an overall component. It does not give fine grained control, but it is a - // simple way to manage coarse grained logging choices that operators have to interpret for their operands. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - LogLevel *operatorv1.LogLevel `json:"logLevel,omitempty"` - // operatorLogLevel is an intent based logging for the operator itself. It does not give fine grained control, but it is a - // simple way to manage coarse grained logging choices that operators have to interpret for themselves. - // - // Valid values are: "Normal", "Debug", "Trace", "TraceAll". - // Defaults to "Normal". - OperatorLogLevel *operatorv1.LogLevel `json:"operatorLogLevel,omitempty"` - // unsupportedConfigOverrides overrides the final configuration that was computed by the operator. - // Red Hat does not support the use of this field. - // Misuse of this field could lead to unexpected behavior or conflict with other configuration options. - // Seek guidance from the Red Hat support before using this field. - // Use of this property blocks cluster upgrades, it must be removed before upgrading your cluster. - UnsupportedConfigOverrides *runtime.RawExtension `json:"unsupportedConfigOverrides,omitempty"` - // observedConfig holds a sparse config that controller has observed from the cluster state. It exists in spec because - // it is an input to the level for the operator - ObservedConfig *runtime.RawExtension `json:"observedConfig,omitempty"` -} - -// OperatorSpecApplyConfiguration constructs a declarative configuration of the OperatorSpec type for use with -// apply. -func OperatorSpec() *OperatorSpecApplyConfiguration { - return &OperatorSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *OperatorSpecApplyConfiguration { - b.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *OperatorSpecApplyConfiguration { - b.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *OperatorSpecApplyConfiguration { - b.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *OperatorSpecApplyConfiguration { - b.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *OperatorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *OperatorSpecApplyConfiguration { - b.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorstatus.go deleted file mode 100644 index dbb94e7f6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/operatorstatus.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// OperatorStatusApplyConfiguration represents a declarative configuration of the OperatorStatus type for use -// with apply. -type OperatorStatusApplyConfiguration struct { - // observedGeneration is the last generation change you've dealt with - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` - // conditions is a list of conditions and their status - Conditions []OperatorConditionApplyConfiguration `json:"conditions,omitempty"` - // version is the level this availability applies to - Version *string `json:"version,omitempty"` - // readyReplicas indicates how many replicas are ready and at the desired state - ReadyReplicas *int32 `json:"readyReplicas,omitempty"` - // latestAvailableRevision is the deploymentID of the most recent deployment - LatestAvailableRevision *int32 `json:"latestAvailableRevision,omitempty"` - // generations are used to determine when an item needs to be reconciled or has changed in a way that needs a reaction. - Generations []GenerationStatusApplyConfiguration `json:"generations,omitempty"` -} - -// OperatorStatusApplyConfiguration constructs a declarative configuration of the OperatorStatus type for use with -// apply. -func OperatorStatus() *OperatorStatusApplyConfiguration { - return &OperatorStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *OperatorStatusApplyConfiguration) WithObservedGeneration(value int64) *OperatorStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *OperatorStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *OperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *OperatorStatusApplyConfiguration) WithVersion(value string) *OperatorStatusApplyConfiguration { - b.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *OperatorStatusApplyConfiguration) WithReadyReplicas(value int32) *OperatorStatusApplyConfiguration { - b.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *OperatorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *OperatorStatusApplyConfiguration { - b.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *OperatorStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *OperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.Generations = append(b.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ovnkubernetesconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ovnkubernetesconfig.go deleted file mode 100644 index ead45f83b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/ovnkubernetesconfig.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// OVNKubernetesConfigApplyConfiguration represents a declarative configuration of the OVNKubernetesConfig type for use -// with apply. -// -// ovnKubernetesConfig contains the configuration parameters for networks -// using the ovn-kubernetes network project -type OVNKubernetesConfigApplyConfiguration struct { - // mtu is the MTU to use for the tunnel interface. This must be 100 - // bytes smaller than the uplink mtu. - // Default is 1400 - MTU *uint32 `json:"mtu,omitempty"` - // geneve port is the UDP port to be used by geneve encapulation. - // Default is 6081 - GenevePort *uint32 `json:"genevePort,omitempty"` - // hybridOverlayConfig configures an additional overlay network for peers that are - // not using OVN. - HybridOverlayConfig *HybridOverlayConfigApplyConfiguration `json:"hybridOverlayConfig,omitempty"` - // ipsecConfig enables and configures IPsec for pods on the pod network within the - // cluster. - IPsecConfig *IPsecConfigApplyConfiguration `json:"ipsecConfig,omitempty"` - // policyAuditConfig is the configuration for network policy audit events. If unset, - // reported defaults are used. - PolicyAuditConfig *PolicyAuditConfigApplyConfiguration `json:"policyAuditConfig,omitempty"` - // gatewayConfig holds the configuration for node gateway options. - GatewayConfig *GatewayConfigApplyConfiguration `json:"gatewayConfig,omitempty"` - // v4InternalSubnet is a v4 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // Default is 100.64.0.0/16 - V4InternalSubnet *string `json:"v4InternalSubnet,omitempty"` - // v6InternalSubnet is a v6 subnet used internally by ovn-kubernetes in case the - // default one is being already used by something else. It must not overlap with - // any other subnet being used by OpenShift or by the node network. The size of the - // subnet must be larger than the number of nodes. - // Default is fd98::/64 - V6InternalSubnet *string `json:"v6InternalSubnet,omitempty"` - // egressIPConfig holds the configuration for EgressIP options. - EgressIPConfig *EgressIPConfigApplyConfiguration `json:"egressIPConfig,omitempty"` - // ipv4 allows users to configure IP settings for IPv4 connections. When ommitted, - // this means no opinions and the default configuration is used. Check individual - // fields within ipv4 for details of default values. - IPv4 *IPv4OVNKubernetesConfigApplyConfiguration `json:"ipv4,omitempty"` - // ipv6 allows users to configure IP settings for IPv6 connections. When ommitted, - // this means no opinions and the default configuration is used. Check individual - // fields within ipv4 for details of default values. - IPv6 *IPv6OVNKubernetesConfigApplyConfiguration `json:"ipv6,omitempty"` - // routeAdvertisements determines if the functionality to advertise cluster - // network routes through a dynamic routing protocol, such as BGP, is - // enabled or not. This functionality is configured through the - // ovn-kubernetes RouteAdvertisements CRD. Requires the 'FRR' routing - // capability provider to be enabled as an additional routing capability. - // Allowed values are "Enabled", "Disabled" and ommited. When omitted, this - // means the user has no opinion and the platform is left to choose - // reasonable defaults. These defaults are subject to change over time. The - // current default is "Disabled". - RouteAdvertisements *operatorv1.RouteAdvertisementsEnablement `json:"routeAdvertisements,omitempty"` - // transport sets the transport mode for pods on the default network. - // Allowed values are "NoOverlay" and "Geneve". - // "NoOverlay" avoids tunnel encapsulation, routing pod traffic directly between nodes. - // "Geneve" encapsulates pod traffic using Geneve tunnels between nodes. - // When omitted, this means the user has no opinion and the platform chooses - // a reasonable default which is subject to change over time. - // The current default is "Geneve". - // "NoOverlay" can only be set at installation time and cannot be changed afterwards. - // "Geneve" may be set explicitly at any time to lock in the current default. - Transport *operatorv1.TransportOption `json:"transport,omitempty"` - // noOverlayConfig contains configuration for no-overlay mode. - // This configuration applies to the default network only. - // It is required when transport is "NoOverlay". - // When omitted, this means the user does not configure no-overlay mode options. - NoOverlayConfig *NoOverlayConfigApplyConfiguration `json:"noOverlayConfig,omitempty"` - // bgpManagedConfig configures the BGP properties for networks (default network or CUDNs) - // in no-overlay mode that specify routing="Managed" in their noOverlayConfig. - // It is required when noOverlayConfig.routing is set to "Managed". - // When omitted, this means the user does not configure BGP for managed routing. - // This field can be set at installation time or on day 2, and can be modified at any time. - BGPManagedConfig *BGPManagedConfigApplyConfiguration `json:"bgpManagedConfig,omitempty"` -} - -// OVNKubernetesConfigApplyConfiguration constructs a declarative configuration of the OVNKubernetesConfig type for use with -// apply. -func OVNKubernetesConfig() *OVNKubernetesConfigApplyConfiguration { - return &OVNKubernetesConfigApplyConfiguration{} -} - -// WithMTU sets the MTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MTU field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithMTU(value uint32) *OVNKubernetesConfigApplyConfiguration { - b.MTU = &value - return b -} - -// WithGenevePort sets the GenevePort field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenevePort field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithGenevePort(value uint32) *OVNKubernetesConfigApplyConfiguration { - b.GenevePort = &value - return b -} - -// WithHybridOverlayConfig sets the HybridOverlayConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the HybridOverlayConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithHybridOverlayConfig(value *HybridOverlayConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.HybridOverlayConfig = value - return b -} - -// WithIPsecConfig sets the IPsecConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPsecConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithIPsecConfig(value *IPsecConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.IPsecConfig = value - return b -} - -// WithPolicyAuditConfig sets the PolicyAuditConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PolicyAuditConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithPolicyAuditConfig(value *PolicyAuditConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.PolicyAuditConfig = value - return b -} - -// WithGatewayConfig sets the GatewayConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GatewayConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithGatewayConfig(value *GatewayConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.GatewayConfig = value - return b -} - -// WithV4InternalSubnet sets the V4InternalSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the V4InternalSubnet field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithV4InternalSubnet(value string) *OVNKubernetesConfigApplyConfiguration { - b.V4InternalSubnet = &value - return b -} - -// WithV6InternalSubnet sets the V6InternalSubnet field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the V6InternalSubnet field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithV6InternalSubnet(value string) *OVNKubernetesConfigApplyConfiguration { - b.V6InternalSubnet = &value - return b -} - -// WithEgressIPConfig sets the EgressIPConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the EgressIPConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithEgressIPConfig(value *EgressIPConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.EgressIPConfig = value - return b -} - -// WithIPv4 sets the IPv4 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv4 field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithIPv4(value *IPv4OVNKubernetesConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.IPv4 = value - return b -} - -// WithIPv6 sets the IPv6 field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPv6 field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithIPv6(value *IPv6OVNKubernetesConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.IPv6 = value - return b -} - -// WithRouteAdvertisements sets the RouteAdvertisements field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RouteAdvertisements field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithRouteAdvertisements(value operatorv1.RouteAdvertisementsEnablement) *OVNKubernetesConfigApplyConfiguration { - b.RouteAdvertisements = &value - return b -} - -// WithTransport sets the Transport field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Transport field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithTransport(value operatorv1.TransportOption) *OVNKubernetesConfigApplyConfiguration { - b.Transport = &value - return b -} - -// WithNoOverlayConfig sets the NoOverlayConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NoOverlayConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithNoOverlayConfig(value *NoOverlayConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.NoOverlayConfig = value - return b -} - -// WithBGPManagedConfig sets the BGPManagedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BGPManagedConfig field is set to the value of the last call. -func (b *OVNKubernetesConfigApplyConfiguration) WithBGPManagedConfig(value *BGPManagedConfigApplyConfiguration) *OVNKubernetesConfigApplyConfiguration { - b.BGPManagedConfig = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/partialselector.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/partialselector.go deleted file mode 100644 index 85b57c91a..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/partialselector.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// PartialSelectorApplyConfiguration represents a declarative configuration of the PartialSelector type for use -// with apply. -// -// PartialSelector provides label selector(s) that can be used to match machine management resources. -type PartialSelectorApplyConfiguration struct { - // machineResourceSelector is a label selector that can be used to select machine resources like MachineSets. - MachineResourceSelector *metav1.LabelSelectorApplyConfiguration `json:"machineResourceSelector,omitempty"` -} - -// PartialSelectorApplyConfiguration constructs a declarative configuration of the PartialSelector type for use with -// apply. -func PartialSelector() *PartialSelectorApplyConfiguration { - return &PartialSelectorApplyConfiguration{} -} - -// WithMachineResourceSelector sets the MachineResourceSelector field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MachineResourceSelector field is set to the value of the last call. -func (b *PartialSelectorApplyConfiguration) WithMachineResourceSelector(value *metav1.LabelSelectorApplyConfiguration) *PartialSelectorApplyConfiguration { - b.MachineResourceSelector = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspective.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspective.go deleted file mode 100644 index 481e37189..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspective.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PerspectiveApplyConfiguration represents a declarative configuration of the Perspective type for use -// with apply. -// -// Perspective defines a perspective that cluster admins want to show/hide in the perspective switcher dropdown -type PerspectiveApplyConfiguration struct { - // id defines the id of the perspective. - // Example: "dev", "admin". - // The available perspective ids can be found in the code snippet section next to the yaml editor. - // Incorrect or unknown ids will be ignored. - ID *string `json:"id,omitempty"` - // visibility defines the state of perspective along with access review checks if needed for that perspective. - Visibility *PerspectiveVisibilityApplyConfiguration `json:"visibility,omitempty"` - // pinnedResources defines the list of default pinned resources that users will see on the perspective navigation if they have not customized these pinned resources themselves. - // The list of available Kubernetes resources could be read via `kubectl api-resources`. - // The console will also provide a configuration UI and a YAML snippet that will list the available resources that can be pinned to the navigation. - // Incorrect or unknown resources will be ignored. - PinnedResources *[]PinnedResourceReferenceApplyConfiguration `json:"pinnedResources,omitempty"` -} - -// PerspectiveApplyConfiguration constructs a declarative configuration of the Perspective type for use with -// apply. -func Perspective() *PerspectiveApplyConfiguration { - return &PerspectiveApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *PerspectiveApplyConfiguration) WithID(value string) *PerspectiveApplyConfiguration { - b.ID = &value - return b -} - -// WithVisibility sets the Visibility field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Visibility field is set to the value of the last call. -func (b *PerspectiveApplyConfiguration) WithVisibility(value *PerspectiveVisibilityApplyConfiguration) *PerspectiveApplyConfiguration { - b.Visibility = value - return b -} - -func (b *PerspectiveApplyConfiguration) ensurePinnedResourceReferenceApplyConfigurationExists() { - if b.PinnedResources == nil { - b.PinnedResources = &[]PinnedResourceReferenceApplyConfiguration{} - } -} - -// WithPinnedResources adds the given value to the PinnedResources field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the PinnedResources field. -func (b *PerspectiveApplyConfiguration) WithPinnedResources(values ...*PinnedResourceReferenceApplyConfiguration) *PerspectiveApplyConfiguration { - b.ensurePinnedResourceReferenceApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithPinnedResources") - } - *b.PinnedResources = append(*b.PinnedResources, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspectivevisibility.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspectivevisibility.go deleted file mode 100644 index bfffd0a48..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/perspectivevisibility.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// PerspectiveVisibilityApplyConfiguration represents a declarative configuration of the PerspectiveVisibility type for use -// with apply. -// -// PerspectiveVisibility defines the criteria to show/hide a perspective -type PerspectiveVisibilityApplyConfiguration struct { - // state defines the perspective is enabled or disabled or access review check is required. - State *operatorv1.PerspectiveState `json:"state,omitempty"` - // accessReview defines required and missing access review checks. - AccessReview *ResourceAttributesAccessReviewApplyConfiguration `json:"accessReview,omitempty"` -} - -// PerspectiveVisibilityApplyConfiguration constructs a declarative configuration of the PerspectiveVisibility type for use with -// apply. -func PerspectiveVisibility() *PerspectiveVisibilityApplyConfiguration { - return &PerspectiveVisibilityApplyConfiguration{} -} - -// WithState sets the State field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the State field is set to the value of the last call. -func (b *PerspectiveVisibilityApplyConfiguration) WithState(value operatorv1.PerspectiveState) *PerspectiveVisibilityApplyConfiguration { - b.State = &value - return b -} - -// WithAccessReview sets the AccessReview field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AccessReview field is set to the value of the last call. -func (b *PerspectiveVisibilityApplyConfiguration) WithAccessReview(value *ResourceAttributesAccessReviewApplyConfiguration) *PerspectiveVisibilityApplyConfiguration { - b.AccessReview = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/pinnedresourcereference.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/pinnedresourcereference.go deleted file mode 100644 index bf297b42d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/pinnedresourcereference.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PinnedResourceReferenceApplyConfiguration represents a declarative configuration of the PinnedResourceReference type for use -// with apply. -// -// PinnedResourceReference includes the group, version and type of resource -type PinnedResourceReferenceApplyConfiguration struct { - // group is the API Group of the Resource. - // Enter empty string for the core group. - // This value should consist of only lowercase alphanumeric characters, hyphens and periods. - // Example: "", "apps", "build.openshift.io", etc. - Group *string `json:"group,omitempty"` - // version is the API Version of the Resource. - // This value should consist of only lowercase alphanumeric characters. - // Example: "v1", "v1beta1", etc. - Version *string `json:"version,omitempty"` - // resource is the type that is being referenced. - // It is normally the plural form of the resource kind in lowercase. - // This value should consist of only lowercase alphanumeric characters and hyphens. - // Example: "deployments", "deploymentconfigs", "pods", etc. - Resource *string `json:"resource,omitempty"` -} - -// PinnedResourceReferenceApplyConfiguration constructs a declarative configuration of the PinnedResourceReference type for use with -// apply. -func PinnedResourceReference() *PinnedResourceReferenceApplyConfiguration { - return &PinnedResourceReferenceApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *PinnedResourceReferenceApplyConfiguration) WithGroup(value string) *PinnedResourceReferenceApplyConfiguration { - b.Group = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *PinnedResourceReferenceApplyConfiguration) WithVersion(value string) *PinnedResourceReferenceApplyConfiguration { - b.Version = &value - return b -} - -// WithResource sets the Resource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Resource field is set to the value of the last call. -func (b *PinnedResourceReferenceApplyConfiguration) WithResource(value string) *PinnedResourceReferenceApplyConfiguration { - b.Resource = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/policyauditconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/policyauditconfig.go deleted file mode 100644 index dc56c6901..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/policyauditconfig.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// PolicyAuditConfigApplyConfiguration represents a declarative configuration of the PolicyAuditConfig type for use -// with apply. -type PolicyAuditConfigApplyConfiguration struct { - // rateLimit is the approximate maximum number of messages to generate per-second per-node. If - // unset the default of 20 msg/sec is used. - RateLimit *uint32 `json:"rateLimit,omitempty"` - // maxFilesSize is the max size an ACL_audit log file is allowed to reach before rotation occurs - // Units are in MB and the Default is 50MB - MaxFileSize *uint32 `json:"maxFileSize,omitempty"` - // maxLogFiles specifies the maximum number of ACL_audit log files that can be present. - MaxLogFiles *int32 `json:"maxLogFiles,omitempty"` - // destination is the location for policy log messages. - // Regardless of this config, persistent logs will always be dumped to the host - // at /var/log/ovn/ however - // Additionally syslog output may be configured as follows. - // Valid values are: - // - "libc" -> to use the libc syslog() function of the host node's journdald process - // - "udp:host:port" -> for sending syslog over UDP - // - "unix:file" -> for using the UNIX domain socket directly - // - "null" -> to discard all messages logged to syslog - // The default is "null" - Destination *string `json:"destination,omitempty"` - // syslogFacility the RFC5424 facility for generated messages, e.g. "kern". Default is "local0" - SyslogFacility *string `json:"syslogFacility,omitempty"` -} - -// PolicyAuditConfigApplyConfiguration constructs a declarative configuration of the PolicyAuditConfig type for use with -// apply. -func PolicyAuditConfig() *PolicyAuditConfigApplyConfiguration { - return &PolicyAuditConfigApplyConfiguration{} -} - -// WithRateLimit sets the RateLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the RateLimit field is set to the value of the last call. -func (b *PolicyAuditConfigApplyConfiguration) WithRateLimit(value uint32) *PolicyAuditConfigApplyConfiguration { - b.RateLimit = &value - return b -} - -// WithMaxFileSize sets the MaxFileSize field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxFileSize field is set to the value of the last call. -func (b *PolicyAuditConfigApplyConfiguration) WithMaxFileSize(value uint32) *PolicyAuditConfigApplyConfiguration { - b.MaxFileSize = &value - return b -} - -// WithMaxLogFiles sets the MaxLogFiles field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLogFiles field is set to the value of the last call. -func (b *PolicyAuditConfigApplyConfiguration) WithMaxLogFiles(value int32) *PolicyAuditConfigApplyConfiguration { - b.MaxLogFiles = &value - return b -} - -// WithDestination sets the Destination field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Destination field is set to the value of the last call. -func (b *PolicyAuditConfigApplyConfiguration) WithDestination(value string) *PolicyAuditConfigApplyConfiguration { - b.Destination = &value - return b -} - -// WithSyslogFacility sets the SyslogFacility field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SyslogFacility field is set to the value of the last call. -func (b *PolicyAuditConfigApplyConfiguration) WithSyslogFacility(value string) *PolicyAuditConfigApplyConfiguration { - b.SyslogFacility = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/privatestrategy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/privatestrategy.go deleted file mode 100644 index 67b8dc1f7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/privatestrategy.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// PrivateStrategyApplyConfiguration represents a declarative configuration of the PrivateStrategy type for use -// with apply. -// -// PrivateStrategy holds parameters for the Private endpoint publishing -// strategy. -type PrivateStrategyApplyConfiguration struct { - // protocol specifies whether the IngressController expects incoming - // connections to use plain TCP or whether the IngressController expects - // PROXY protocol. - // - // PROXY protocol can be used with load balancers that support it to - // communicate the source addresses of client connections when - // forwarding those connections to the IngressController. Using PROXY - // protocol enables the IngressController to report those source - // addresses instead of reporting the load balancer's address in HTTP - // headers and logs. Note that enabling PROXY protocol on the - // IngressController will cause connections to fail if you are not using - // a load balancer that uses PROXY protocol to forward connections to - // the IngressController. See - // http://www.haproxy.org/download/2.2/doc/proxy-protocol.txt for - // information about PROXY protocol. - // - // The following values are valid for this field: - // - // * The empty string. - // * "TCP". - // * "PROXY". - // - // The empty string specifies the default, which is TCP without PROXY - // protocol. Note that the default is subject to change. - Protocol *operatorv1.IngressControllerProtocol `json:"protocol,omitempty"` -} - -// PrivateStrategyApplyConfiguration constructs a declarative configuration of the PrivateStrategy type for use with -// apply. -func PrivateStrategy() *PrivateStrategyApplyConfiguration { - return &PrivateStrategyApplyConfiguration{} -} - -// WithProtocol sets the Protocol field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Protocol field is set to the value of the last call. -func (b *PrivateStrategyApplyConfiguration) WithProtocol(value operatorv1.IngressControllerProtocol) *PrivateStrategyApplyConfiguration { - b.Protocol = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/projectaccess.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/projectaccess.go deleted file mode 100644 index 7c612b811..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/projectaccess.go +++ /dev/null @@ -1,29 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ProjectAccessApplyConfiguration represents a declarative configuration of the ProjectAccess type for use -// with apply. -// -// ProjectAccess contains options for project access roles -type ProjectAccessApplyConfiguration struct { - // availableClusterRoles is the list of ClusterRole names that are assignable to users - // through the project access tab. - AvailableClusterRoles []string `json:"availableClusterRoles,omitempty"` -} - -// ProjectAccessApplyConfiguration constructs a declarative configuration of the ProjectAccess type for use with -// apply. -func ProjectAccess() *ProjectAccessApplyConfiguration { - return &ProjectAccessApplyConfiguration{} -} - -// WithAvailableClusterRoles adds the given value to the AvailableClusterRoles field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AvailableClusterRoles field. -func (b *ProjectAccessApplyConfiguration) WithAvailableClusterRoles(values ...string) *ProjectAccessApplyConfiguration { - for i := range values { - b.AvailableClusterRoles = append(b.AvailableClusterRoles, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go deleted file mode 100644 index 7abf6d00e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/providerloadbalancerparameters.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ProviderLoadBalancerParametersApplyConfiguration represents a declarative configuration of the ProviderLoadBalancerParameters type for use -// with apply. -// -// ProviderLoadBalancerParameters holds desired load balancer information -// specific to the underlying infrastructure provider. -type ProviderLoadBalancerParametersApplyConfiguration struct { - // type is the underlying infrastructure provider for the load balancer. - // Allowed values are "AWS", "Azure", "BareMetal", "GCP", "IBM", "Nutanix", - // "OpenStack", and "VSphere". - Type *operatorv1.LoadBalancerProviderType `json:"type,omitempty"` - // aws provides configuration settings that are specific to AWS - // load balancers. - // - // If empty, defaults will be applied. See specific aws fields for - // details about their defaults. - AWS *AWSLoadBalancerParametersApplyConfiguration `json:"aws,omitempty"` - // gcp provides configuration settings that are specific to GCP - // load balancers. - // - // If empty, defaults will be applied. See specific gcp fields for - // details about their defaults. - GCP *GCPLoadBalancerParametersApplyConfiguration `json:"gcp,omitempty"` - // ibm provides configuration settings that are specific to IBM Cloud - // load balancers. - // - // If empty, defaults will be applied. See specific ibm fields for - // details about their defaults. - IBM *IBMLoadBalancerParametersApplyConfiguration `json:"ibm,omitempty"` - // openstack provides configuration settings that are specific to OpenStack - // load balancers. - // - // If empty, defaults will be applied. See specific openstack fields for - // details about their defaults. - OpenStack *OpenStackLoadBalancerParametersApplyConfiguration `json:"openstack,omitempty"` -} - -// ProviderLoadBalancerParametersApplyConfiguration constructs a declarative configuration of the ProviderLoadBalancerParameters type for use with -// apply. -func ProviderLoadBalancerParameters() *ProviderLoadBalancerParametersApplyConfiguration { - return &ProviderLoadBalancerParametersApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithType(value operatorv1.LoadBalancerProviderType) *ProviderLoadBalancerParametersApplyConfiguration { - b.Type = &value - return b -} - -// WithAWS sets the AWS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AWS field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithAWS(value *AWSLoadBalancerParametersApplyConfiguration) *ProviderLoadBalancerParametersApplyConfiguration { - b.AWS = value - return b -} - -// WithGCP sets the GCP field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GCP field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithGCP(value *GCPLoadBalancerParametersApplyConfiguration) *ProviderLoadBalancerParametersApplyConfiguration { - b.GCP = value - return b -} - -// WithIBM sets the IBM field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IBM field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithIBM(value *IBMLoadBalancerParametersApplyConfiguration) *ProviderLoadBalancerParametersApplyConfiguration { - b.IBM = value - return b -} - -// WithOpenStack sets the OpenStack field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenStack field is set to the value of the last call. -func (b *ProviderLoadBalancerParametersApplyConfiguration) WithOpenStack(value *OpenStackLoadBalancerParametersApplyConfiguration) *ProviderLoadBalancerParametersApplyConfiguration { - b.OpenStack = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/proxyconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/proxyconfig.go deleted file mode 100644 index 3c2b7645e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/proxyconfig.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ProxyConfigApplyConfiguration represents a declarative configuration of the ProxyConfig type for use -// with apply. -// -// ProxyConfig defines the configuration knobs for kubeproxy -// All of these are optional and have sensible defaults -type ProxyConfigApplyConfiguration struct { - // An internal kube-proxy parameter. In older releases of OCP, this sometimes needed to be adjusted - // in large clusters for performance reasons, but this is no longer necessary, and there is no reason - // to change this from the default value. - // Default: 30s - IptablesSyncPeriod *string `json:"iptablesSyncPeriod,omitempty"` - // The address to "bind" on - // Defaults to 0.0.0.0 - BindAddress *string `json:"bindAddress,omitempty"` - // Any additional arguments to pass to the kubeproxy process - ProxyArguments map[string]operatorv1.ProxyArgumentList `json:"proxyArguments,omitempty"` -} - -// ProxyConfigApplyConfiguration constructs a declarative configuration of the ProxyConfig type for use with -// apply. -func ProxyConfig() *ProxyConfigApplyConfiguration { - return &ProxyConfigApplyConfiguration{} -} - -// WithIptablesSyncPeriod sets the IptablesSyncPeriod field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IptablesSyncPeriod field is set to the value of the last call. -func (b *ProxyConfigApplyConfiguration) WithIptablesSyncPeriod(value string) *ProxyConfigApplyConfiguration { - b.IptablesSyncPeriod = &value - return b -} - -// WithBindAddress sets the BindAddress field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BindAddress field is set to the value of the last call. -func (b *ProxyConfigApplyConfiguration) WithBindAddress(value string) *ProxyConfigApplyConfiguration { - b.BindAddress = &value - return b -} - -// WithProxyArguments puts the entries into the ProxyArguments field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the ProxyArguments field, -// overwriting an existing map entries in ProxyArguments field with the same key. -func (b *ProxyConfigApplyConfiguration) WithProxyArguments(entries map[string]operatorv1.ProxyArgumentList) *ProxyConfigApplyConfiguration { - if b.ProxyArguments == nil && len(entries) > 0 { - b.ProxyArguments = make(map[string]operatorv1.ProxyArgumentList, len(entries)) - } - for k, v := range entries { - b.ProxyArguments[k] = v - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/quickstarts.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/quickstarts.go deleted file mode 100644 index 8c8431dd4..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/quickstarts.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// QuickStartsApplyConfiguration represents a declarative configuration of the QuickStarts type for use -// with apply. -// -// QuickStarts allow cluster admins to customize available ConsoleQuickStart resources. -type QuickStartsApplyConfiguration struct { - // disabled is a list of ConsoleQuickStart resource names that are not shown to users. - Disabled []string `json:"disabled,omitempty"` -} - -// QuickStartsApplyConfiguration constructs a declarative configuration of the QuickStarts type for use with -// apply. -func QuickStarts() *QuickStartsApplyConfiguration { - return &QuickStartsApplyConfiguration{} -} - -// WithDisabled adds the given value to the Disabled field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Disabled field. -func (b *QuickStartsApplyConfiguration) WithDisabled(values ...string) *QuickStartsApplyConfiguration { - for i := range values { - b.Disabled = append(b.Disabled, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/reloadservice.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/reloadservice.go deleted file mode 100644 index 9fee5ee90..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/reloadservice.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ReloadServiceApplyConfiguration represents a declarative configuration of the ReloadService type for use -// with apply. -// -// ReloadService allows the user to specify the services to be reloaded -type ReloadServiceApplyConfiguration struct { - // serviceName is the full name (e.g. crio.service) of the service to be reloaded - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - ServiceName *operatorv1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` -} - -// ReloadServiceApplyConfiguration constructs a declarative configuration of the ReloadService type for use with -// apply. -func ReloadService() *ReloadServiceApplyConfiguration { - return &ReloadServiceApplyConfiguration{} -} - -// WithServiceName sets the ServiceName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceName field is set to the value of the last call. -func (b *ReloadServiceApplyConfiguration) WithServiceName(value operatorv1.NodeDisruptionPolicyServiceName) *ReloadServiceApplyConfiguration { - b.ServiceName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go deleted file mode 100644 index 2f9db0549..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/resourceattributesaccessreview.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - authorizationv1 "k8s.io/api/authorization/v1" -) - -// ResourceAttributesAccessReviewApplyConfiguration represents a declarative configuration of the ResourceAttributesAccessReview type for use -// with apply. -// -// ResourceAttributesAccessReview defines the visibility of the perspective depending on the access review checks. -// `required` and `missing` can work together esp. in the case where the cluster admin -// wants to show another perspective to users without specific permissions. Out of `required` and `missing` atleast one property should be non-empty. -type ResourceAttributesAccessReviewApplyConfiguration struct { - // required defines a list of permission checks. The perspective will only be shown when all checks are successful. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the missing access review list. - Required []authorizationv1.ResourceAttributes `json:"required,omitempty"` - // missing defines a list of permission checks. The perspective will only be shown when at least one check fails. When omitted, the access review is skipped and the perspective will not be shown unless it is required to do so based on the configuration of the required access review list. - Missing []authorizationv1.ResourceAttributes `json:"missing,omitempty"` -} - -// ResourceAttributesAccessReviewApplyConfiguration constructs a declarative configuration of the ResourceAttributesAccessReview type for use with -// apply. -func ResourceAttributesAccessReview() *ResourceAttributesAccessReviewApplyConfiguration { - return &ResourceAttributesAccessReviewApplyConfiguration{} -} - -// WithRequired adds the given value to the Required field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Required field. -func (b *ResourceAttributesAccessReviewApplyConfiguration) WithRequired(values ...authorizationv1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { - for i := range values { - b.Required = append(b.Required, values[i]) - } - return b -} - -// WithMissing adds the given value to the Missing field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Missing field. -func (b *ResourceAttributesAccessReviewApplyConfiguration) WithMissing(values ...authorizationv1.ResourceAttributes) *ResourceAttributesAccessReviewApplyConfiguration { - for i := range values { - b.Missing = append(b.Missing, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/restartservice.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/restartservice.go deleted file mode 100644 index cbc5cce6f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/restartservice.go +++ /dev/null @@ -1,33 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// RestartServiceApplyConfiguration represents a declarative configuration of the RestartService type for use -// with apply. -// -// RestartService allows the user to specify the services to be restarted -type RestartServiceApplyConfiguration struct { - // serviceName is the full name (e.g. crio.service) of the service to be restarted - // Service names should be of the format ${NAME}${SERVICETYPE} and can up to 255 characters long. - // ${NAME} must be atleast 1 character long and can only consist of alphabets, digits, ":", "-", "_", ".", and "\". - // ${SERVICETYPE} must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".snapshot", ".slice" or ".scope". - ServiceName *operatorv1.NodeDisruptionPolicyServiceName `json:"serviceName,omitempty"` -} - -// RestartServiceApplyConfiguration constructs a declarative configuration of the RestartService type for use with -// apply. -func RestartService() *RestartServiceApplyConfiguration { - return &RestartServiceApplyConfiguration{} -} - -// WithServiceName sets the ServiceName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ServiceName field is set to the value of the last call. -func (b *RestartServiceApplyConfiguration) WithServiceName(value operatorv1.NodeDisruptionPolicyServiceName) *RestartServiceApplyConfiguration { - b.ServiceName = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go deleted file mode 100644 index 28814563c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/routeadmissionpolicy.go +++ /dev/null @@ -1,64 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// RouteAdmissionPolicyApplyConfiguration represents a declarative configuration of the RouteAdmissionPolicy type for use -// with apply. -// -// RouteAdmissionPolicy is an admission policy for allowing new route claims. -type RouteAdmissionPolicyApplyConfiguration struct { - // namespaceOwnership describes how host name claims across namespaces should - // be handled. - // - // Value must be one of: - // - // - Strict: Do not allow routes in different namespaces to claim the same host. - // - // - InterNamespaceAllowed: Allow routes to claim different paths of the same - // host name across namespaces. - // - // If empty, the default is Strict. - NamespaceOwnership *operatorv1.NamespaceOwnershipCheck `json:"namespaceOwnership,omitempty"` - // wildcardPolicy describes how routes with wildcard policies should - // be handled for the ingress controller. WildcardPolicy controls use - // of routes [1] exposed by the ingress controller based on the route's - // wildcard policy. - // - // [1] https://github.com/openshift/api/blob/master/route/v1/types.go - // - // Note: Updating WildcardPolicy from WildcardsAllowed to WildcardsDisallowed - // will cause admitted routes with a wildcard policy of Subdomain to stop - // working. These routes must be updated to a wildcard policy of None to be - // readmitted by the ingress controller. - // - // WildcardPolicy supports WildcardsAllowed and WildcardsDisallowed values. - // - // If empty, defaults to "WildcardsDisallowed". - WildcardPolicy *operatorv1.WildcardPolicy `json:"wildcardPolicy,omitempty"` -} - -// RouteAdmissionPolicyApplyConfiguration constructs a declarative configuration of the RouteAdmissionPolicy type for use with -// apply. -func RouteAdmissionPolicy() *RouteAdmissionPolicyApplyConfiguration { - return &RouteAdmissionPolicyApplyConfiguration{} -} - -// WithNamespaceOwnership sets the NamespaceOwnership field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the NamespaceOwnership field is set to the value of the last call. -func (b *RouteAdmissionPolicyApplyConfiguration) WithNamespaceOwnership(value operatorv1.NamespaceOwnershipCheck) *RouteAdmissionPolicyApplyConfiguration { - b.NamespaceOwnership = &value - return b -} - -// WithWildcardPolicy sets the WildcardPolicy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the WildcardPolicy field is set to the value of the last call. -func (b *RouteAdmissionPolicyApplyConfiguration) WithWildcardPolicy(value operatorv1.WildcardPolicy) *RouteAdmissionPolicyApplyConfiguration { - b.WildcardPolicy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstorecsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstorecsidriverconfigspec.go deleted file mode 100644 index 145aa9070..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstorecsidriverconfigspec.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SecretsStoreCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the SecretsStoreCSIDriverConfigSpec type for use -// with apply. -// -// SecretsStoreCSIDriverConfigSpec defines properties that can be configured for the Secrets Store CSI driver. -type SecretsStoreCSIDriverConfigSpecApplyConfiguration struct { - // secretRotation controls automatic secret rotation behavior. - // When omitted, secret rotation is enabled with a default poll interval of 2 minutes. - SecretRotation *SecretsStoreSecretRotationApplyConfiguration `json:"secretRotation,omitempty"` - // tokenRequests controls service account token configuration for - // workload identity federation (WIF) with cloud providers. - // When omitted, the operator preserves any existing tokenRequests - // already configured on the CSIDriver object without modification. - TokenRequests *SecretsStoreTokenRequestsApplyConfiguration `json:"tokenRequests,omitempty"` -} - -// SecretsStoreCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the SecretsStoreCSIDriverConfigSpec type for use with -// apply. -func SecretsStoreCSIDriverConfigSpec() *SecretsStoreCSIDriverConfigSpecApplyConfiguration { - return &SecretsStoreCSIDriverConfigSpecApplyConfiguration{} -} - -// WithSecretRotation sets the SecretRotation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SecretRotation field is set to the value of the last call. -func (b *SecretsStoreCSIDriverConfigSpecApplyConfiguration) WithSecretRotation(value *SecretsStoreSecretRotationApplyConfiguration) *SecretsStoreCSIDriverConfigSpecApplyConfiguration { - b.SecretRotation = value - return b -} - -// WithTokenRequests sets the TokenRequests field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TokenRequests field is set to the value of the last call. -func (b *SecretsStoreCSIDriverConfigSpecApplyConfiguration) WithTokenRequests(value *SecretsStoreTokenRequestsApplyConfiguration) *SecretsStoreCSIDriverConfigSpecApplyConfiguration { - b.TokenRequests = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoresecretrotation.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoresecretrotation.go deleted file mode 100644 index 0624fe9c6..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoresecretrotation.go +++ /dev/null @@ -1,46 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// SecretsStoreSecretRotationApplyConfiguration represents a declarative configuration of the SecretsStoreSecretRotation type for use -// with apply. -// -// SecretsStoreSecretRotation configures the automatic secret rotation behavior -// for the Secrets Store CSI driver. -type SecretsStoreSecretRotationApplyConfiguration struct { - // type determines the secret rotation behavior. - // When "None", secret rotation is disabled and secrets are only fetched at - // initial pod mount time. - // When "Custom", secret rotation is enabled with the configuration specified - // in the custom field. - Type *operatorv1.SecretRotationType `json:"type,omitempty"` - // custom holds the custom rotation configuration. - // Only valid when type is "Custom". - Custom *CustomSecretRotationApplyConfiguration `json:"custom,omitempty"` -} - -// SecretsStoreSecretRotationApplyConfiguration constructs a declarative configuration of the SecretsStoreSecretRotation type for use with -// apply. -func SecretsStoreSecretRotation() *SecretsStoreSecretRotationApplyConfiguration { - return &SecretsStoreSecretRotationApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *SecretsStoreSecretRotationApplyConfiguration) WithType(value operatorv1.SecretRotationType) *SecretsStoreSecretRotationApplyConfiguration { - b.Type = &value - return b -} - -// WithCustom sets the Custom field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Custom field is set to the value of the last call. -func (b *SecretsStoreSecretRotationApplyConfiguration) WithCustom(value *CustomSecretRotationApplyConfiguration) *SecretsStoreSecretRotationApplyConfiguration { - b.Custom = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequest.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequest.go deleted file mode 100644 index b8eb7597f..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequest.go +++ /dev/null @@ -1,41 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SecretsStoreTokenRequestApplyConfiguration represents a declarative configuration of the SecretsStoreTokenRequest type for use -// with apply. -// -// SecretsStoreTokenRequest specifies a service account token audience configuration -// for workload identity federation (WIF) with the Secrets Store CSI driver. -type SecretsStoreTokenRequestApplyConfiguration struct { - // audience is the intended audience of the service account token. - // An empty string means the issued token will use the kube-apiserver's default APIAudiences. - Audience *string `json:"audience,omitempty"` - // expirationSeconds is the requested duration of validity of the service account token. - // The token issuer may return a token with a different validity duration. - // When omitted, the token expiration is determined by the kube-apiserver. - // Must be at least 600 seconds (10 minutes) and no more than 315360000 seconds (~10 years). - ExpirationSeconds *int32 `json:"expirationSeconds,omitempty"` -} - -// SecretsStoreTokenRequestApplyConfiguration constructs a declarative configuration of the SecretsStoreTokenRequest type for use with -// apply. -func SecretsStoreTokenRequest() *SecretsStoreTokenRequestApplyConfiguration { - return &SecretsStoreTokenRequestApplyConfiguration{} -} - -// WithAudience sets the Audience field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Audience field is set to the value of the last call. -func (b *SecretsStoreTokenRequestApplyConfiguration) WithAudience(value string) *SecretsStoreTokenRequestApplyConfiguration { - b.Audience = &value - return b -} - -// WithExpirationSeconds sets the ExpirationSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExpirationSeconds field is set to the value of the last call. -func (b *SecretsStoreTokenRequestApplyConfiguration) WithExpirationSeconds(value int32) *SecretsStoreTokenRequestApplyConfiguration { - b.ExpirationSeconds = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequests.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequests.go deleted file mode 100644 index ea9ac415d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/secretsstoretokenrequests.go +++ /dev/null @@ -1,47 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// SecretsStoreTokenRequestsApplyConfiguration represents a declarative configuration of the SecretsStoreTokenRequests type for use -// with apply. -// -// SecretsStoreTokenRequests configures how service account tokens are -// provided to the Secrets Store CSI driver for workload identity federation. -type SecretsStoreTokenRequestsApplyConfiguration struct { - // type determines how the operator manages tokenRequests on the CSIDriver object. - // When "Unmanaged", existing tokenRequests on the CSIDriver are preserved - // and the managed field is not used. - // When "Managed", the operator sets tokenRequests from the audiences - // specified in the managed field, replacing any previously configured values. - // Once set to "Managed", type cannot be reverted back to "Unmanaged". - Type *operatorv1.TokenRequestsType `json:"type,omitempty"` - // managed holds configuration for operator-managed tokenRequests. - // Only valid when type is "Managed". - Managed *ManagedTokenRequestsApplyConfiguration `json:"managed,omitempty"` -} - -// SecretsStoreTokenRequestsApplyConfiguration constructs a declarative configuration of the SecretsStoreTokenRequests type for use with -// apply. -func SecretsStoreTokenRequests() *SecretsStoreTokenRequestsApplyConfiguration { - return &SecretsStoreTokenRequestsApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *SecretsStoreTokenRequestsApplyConfiguration) WithType(value operatorv1.TokenRequestsType) *SecretsStoreTokenRequestsApplyConfiguration { - b.Type = &value - return b -} - -// WithManaged sets the Managed field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Managed field is set to the value of the last call. -func (b *SecretsStoreTokenRequestsApplyConfiguration) WithManaged(value *ManagedTokenRequestsApplyConfiguration) *SecretsStoreTokenRequestsApplyConfiguration { - b.Managed = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/server.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/server.go deleted file mode 100644 index 090be4b70..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/server.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServerApplyConfiguration represents a declarative configuration of the Server type for use -// with apply. -// -// Server defines the schema for a server that runs per instance of CoreDNS. -type ServerApplyConfiguration struct { - // name is required and specifies a unique name for the server. Name must comply - // with the Service Name Syntax of rfc6335. - Name *string `json:"name,omitempty"` - // zones is required and specifies the subdomains that Server is authoritative for. - // Zones must conform to the rfc1123 definition of a subdomain. Specifying the - // cluster domain (i.e., "cluster.local") is invalid. - Zones []string `json:"zones,omitempty"` - // forwardPlugin defines a schema for configuring CoreDNS to proxy DNS messages - // to upstream resolvers. - ForwardPlugin *ForwardPluginApplyConfiguration `json:"forwardPlugin,omitempty"` -} - -// ServerApplyConfiguration constructs a declarative configuration of the Server type for use with -// apply. -func Server() *ServerApplyConfiguration { - return &ServerApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServerApplyConfiguration) WithName(value string) *ServerApplyConfiguration { - b.Name = &value - return b -} - -// WithZones adds the given value to the Zones field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Zones field. -func (b *ServerApplyConfiguration) WithZones(values ...string) *ServerApplyConfiguration { - for i := range values { - b.Zones = append(b.Zones, values[i]) - } - return b -} - -// WithForwardPlugin sets the ForwardPlugin field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForwardPlugin field is set to the value of the last call. -func (b *ServerApplyConfiguration) WithForwardPlugin(value *ForwardPluginApplyConfiguration) *ServerApplyConfiguration { - b.ForwardPlugin = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go deleted file mode 100644 index 63e0806bb..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceaccountissuerstatus.go +++ /dev/null @@ -1,40 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ServiceAccountIssuerStatusApplyConfiguration represents a declarative configuration of the ServiceAccountIssuerStatus type for use -// with apply. -type ServiceAccountIssuerStatusApplyConfiguration struct { - // name is the name of the service account issuer - // --- - Name *string `json:"name,omitempty"` - // expirationTime is the time after which this service account issuer will be pruned and removed from the trusted list - // of service account issuers. - ExpirationTime *metav1.Time `json:"expirationTime,omitempty"` -} - -// ServiceAccountIssuerStatusApplyConfiguration constructs a declarative configuration of the ServiceAccountIssuerStatus type for use with -// apply. -func ServiceAccountIssuerStatus() *ServiceAccountIssuerStatusApplyConfiguration { - return &ServiceAccountIssuerStatusApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceAccountIssuerStatusApplyConfiguration) WithName(value string) *ServiceAccountIssuerStatusApplyConfiguration { - b.Name = &value - return b -} - -// WithExpirationTime sets the ExpirationTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExpirationTime field is set to the value of the last call. -func (b *ServiceAccountIssuerStatusApplyConfiguration) WithExpirationTime(value metav1.Time) *ServiceAccountIssuerStatusApplyConfiguration { - b.ExpirationTime = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceca.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceca.go deleted file mode 100644 index 5f64cbf7c..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/serviceca.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ServiceCAApplyConfiguration represents a declarative configuration of the ServiceCA type for use -// with apply. -// -// # ServiceCA provides information to configure an operator to manage the service cert controllers -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ServiceCAApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *ServiceCASpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *ServiceCAStatusApplyConfiguration `json:"status,omitempty"` -} - -// ServiceCA constructs a declarative configuration of the ServiceCA type for use with -// apply. -func ServiceCA(name string) *ServiceCAApplyConfiguration { - b := &ServiceCAApplyConfiguration{} - b.WithName(name) - b.WithKind("ServiceCA") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractServiceCAFrom extracts the applied configuration owned by fieldManager from -// serviceCA for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// serviceCA must be a unmodified ServiceCA API object that was retrieved from the Kubernetes API. -// ExtractServiceCAFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCAFrom(serviceCA *operatorv1.ServiceCA, fieldManager string, subresource string) (*ServiceCAApplyConfiguration, error) { - b := &ServiceCAApplyConfiguration{} - err := managedfields.ExtractInto(serviceCA, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCA"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(serviceCA.Name) - - b.WithKind("ServiceCA") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractServiceCA extracts the applied configuration owned by fieldManager from -// serviceCA. If no managedFields are found in serviceCA for fieldManager, a -// ServiceCAApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// serviceCA must be a unmodified ServiceCA API object that was retrieved from the Kubernetes API. -// ExtractServiceCA provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCA(serviceCA *operatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { - return ExtractServiceCAFrom(serviceCA, fieldManager, "") -} - -// ExtractServiceCAStatus extracts the applied configuration owned by fieldManager from -// serviceCA for the status subresource. -func ExtractServiceCAStatus(serviceCA *operatorv1.ServiceCA, fieldManager string) (*ServiceCAApplyConfiguration, error) { - return ExtractServiceCAFrom(serviceCA, fieldManager, "status") -} - -func (b ServiceCAApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithKind(value string) *ServiceCAApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithAPIVersion(value string) *ServiceCAApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithName(value string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithGenerateName(value string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithNamespace(value string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithUID(value types.UID) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithResourceVersion(value string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithGeneration(value int64) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ServiceCAApplyConfiguration) WithLabels(entries map[string]string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ServiceCAApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCAApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ServiceCAApplyConfiguration) WithFinalizers(values ...string) *ServiceCAApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ServiceCAApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithSpec(value *ServiceCASpecApplyConfiguration) *ServiceCAApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ServiceCAApplyConfiguration) WithStatus(value *ServiceCAStatusApplyConfiguration) *ServiceCAApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ServiceCAApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ServiceCAApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ServiceCAApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ServiceCAApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecaspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecaspec.go deleted file mode 100644 index 844041ef3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecaspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ServiceCASpecApplyConfiguration represents a declarative configuration of the ServiceCASpec type for use -// with apply. -type ServiceCASpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// ServiceCASpecApplyConfiguration constructs a declarative configuration of the ServiceCASpec type for use with -// apply. -func ServiceCASpec() *ServiceCASpecApplyConfiguration { - return &ServiceCASpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ServiceCASpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCASpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ServiceCASpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCASpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ServiceCASpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCASpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ServiceCASpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCASpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ServiceCASpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCASpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecastatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecastatus.go deleted file mode 100644 index 957190e8b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecastatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceCAStatusApplyConfiguration represents a declarative configuration of the ServiceCAStatus type for use -// with apply. -type ServiceCAStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ServiceCAStatusApplyConfiguration constructs a declarative configuration of the ServiceCAStatus type for use with -// apply. -func ServiceCAStatus() *ServiceCAStatusApplyConfiguration { - return &ServiceCAStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ServiceCAStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCAStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ServiceCAStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ServiceCAStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ServiceCAStatusApplyConfiguration) WithVersion(value string) *ServiceCAStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ServiceCAStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCAStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ServiceCAStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCAStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ServiceCAStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ServiceCAStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go deleted file mode 100644 index 576decc38..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserver.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ServiceCatalogAPIServerApplyConfiguration represents a declarative configuration of the ServiceCatalogAPIServer type for use -// with apply. -// -// ServiceCatalogAPIServer provides information to configure an operator to manage Service Catalog API Server -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ServiceCatalogAPIServerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCatalogAPIServerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCatalogAPIServerStatusApplyConfiguration `json:"status,omitempty"` -} - -// ServiceCatalogAPIServer constructs a declarative configuration of the ServiceCatalogAPIServer type for use with -// apply. -func ServiceCatalogAPIServer(name string) *ServiceCatalogAPIServerApplyConfiguration { - b := &ServiceCatalogAPIServerApplyConfiguration{} - b.WithName(name) - b.WithKind("ServiceCatalogAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractServiceCatalogAPIServerFrom extracts the applied configuration owned by fieldManager from -// serviceCatalogAPIServer for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// serviceCatalogAPIServer must be a unmodified ServiceCatalogAPIServer API object that was retrieved from the Kubernetes API. -// ExtractServiceCatalogAPIServerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCatalogAPIServerFrom(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string, subresource string) (*ServiceCatalogAPIServerApplyConfiguration, error) { - b := &ServiceCatalogAPIServerApplyConfiguration{} - err := managedfields.ExtractInto(serviceCatalogAPIServer, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCatalogAPIServer"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(serviceCatalogAPIServer.Name) - - b.WithKind("ServiceCatalogAPIServer") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractServiceCatalogAPIServer extracts the applied configuration owned by fieldManager from -// serviceCatalogAPIServer. If no managedFields are found in serviceCatalogAPIServer for fieldManager, a -// ServiceCatalogAPIServerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// serviceCatalogAPIServer must be a unmodified ServiceCatalogAPIServer API object that was retrieved from the Kubernetes API. -// ExtractServiceCatalogAPIServer provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCatalogAPIServer(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { - return ExtractServiceCatalogAPIServerFrom(serviceCatalogAPIServer, fieldManager, "") -} - -// ExtractServiceCatalogAPIServerStatus extracts the applied configuration owned by fieldManager from -// serviceCatalogAPIServer for the status subresource. -func ExtractServiceCatalogAPIServerStatus(serviceCatalogAPIServer *operatorv1.ServiceCatalogAPIServer, fieldManager string) (*ServiceCatalogAPIServerApplyConfiguration, error) { - return ExtractServiceCatalogAPIServerFrom(serviceCatalogAPIServer, fieldManager, "status") -} - -func (b ServiceCatalogAPIServerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithKind(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithAPIVersion(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithName(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithGenerateName(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithNamespace(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithUID(value types.UID) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithResourceVersion(value string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithGeneration(value int64) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithLabels(entries map[string]string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithFinalizers(values ...string) *ServiceCatalogAPIServerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ServiceCatalogAPIServerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithSpec(value *ServiceCatalogAPIServerSpecApplyConfiguration) *ServiceCatalogAPIServerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ServiceCatalogAPIServerApplyConfiguration) WithStatus(value *ServiceCatalogAPIServerStatusApplyConfiguration) *ServiceCatalogAPIServerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ServiceCatalogAPIServerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ServiceCatalogAPIServerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ServiceCatalogAPIServerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ServiceCatalogAPIServerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go deleted file mode 100644 index b5271a409..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ServiceCatalogAPIServerSpecApplyConfiguration represents a declarative configuration of the ServiceCatalogAPIServerSpec type for use -// with apply. -type ServiceCatalogAPIServerSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// ServiceCatalogAPIServerSpecApplyConfiguration constructs a declarative configuration of the ServiceCatalogAPIServerSpec type for use with -// apply. -func ServiceCatalogAPIServerSpec() *ServiceCatalogAPIServerSpecApplyConfiguration { - return &ServiceCatalogAPIServerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ServiceCatalogAPIServerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCatalogAPIServerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go deleted file mode 100644 index a82e4e5f0..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogapiserverstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceCatalogAPIServerStatusApplyConfiguration represents a declarative configuration of the ServiceCatalogAPIServerStatus type for use -// with apply. -type ServiceCatalogAPIServerStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ServiceCatalogAPIServerStatusApplyConfiguration constructs a declarative configuration of the ServiceCatalogAPIServerStatus type for use with -// apply. -func ServiceCatalogAPIServerStatus() *ServiceCatalogAPIServerStatusApplyConfiguration { - return &ServiceCatalogAPIServerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ServiceCatalogAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithVersion(value string) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCatalogAPIServerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ServiceCatalogAPIServerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ServiceCatalogAPIServerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go deleted file mode 100644 index 8088d69b8..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanager.go +++ /dev/null @@ -1,276 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// ServiceCatalogControllerManagerApplyConfiguration represents a declarative configuration of the ServiceCatalogControllerManager type for use -// with apply. -// -// ServiceCatalogControllerManager provides information to configure an operator to manage Service Catalog Controller Manager -// DEPRECATED: will be removed in 4.6 -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type ServiceCatalogControllerManagerApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - Spec *ServiceCatalogControllerManagerSpecApplyConfiguration `json:"spec,omitempty"` - Status *ServiceCatalogControllerManagerStatusApplyConfiguration `json:"status,omitempty"` -} - -// ServiceCatalogControllerManager constructs a declarative configuration of the ServiceCatalogControllerManager type for use with -// apply. -func ServiceCatalogControllerManager(name string) *ServiceCatalogControllerManagerApplyConfiguration { - b := &ServiceCatalogControllerManagerApplyConfiguration{} - b.WithName(name) - b.WithKind("ServiceCatalogControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractServiceCatalogControllerManagerFrom extracts the applied configuration owned by fieldManager from -// serviceCatalogControllerManager for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// serviceCatalogControllerManager must be a unmodified ServiceCatalogControllerManager API object that was retrieved from the Kubernetes API. -// ExtractServiceCatalogControllerManagerFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCatalogControllerManagerFrom(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string, subresource string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { - b := &ServiceCatalogControllerManagerApplyConfiguration{} - err := managedfields.ExtractInto(serviceCatalogControllerManager, internal.Parser().Type("com.github.openshift.api.operator.v1.ServiceCatalogControllerManager"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(serviceCatalogControllerManager.Name) - - b.WithKind("ServiceCatalogControllerManager") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractServiceCatalogControllerManager extracts the applied configuration owned by fieldManager from -// serviceCatalogControllerManager. If no managedFields are found in serviceCatalogControllerManager for fieldManager, a -// ServiceCatalogControllerManagerApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// serviceCatalogControllerManager must be a unmodified ServiceCatalogControllerManager API object that was retrieved from the Kubernetes API. -// ExtractServiceCatalogControllerManager provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractServiceCatalogControllerManager(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { - return ExtractServiceCatalogControllerManagerFrom(serviceCatalogControllerManager, fieldManager, "") -} - -// ExtractServiceCatalogControllerManagerStatus extracts the applied configuration owned by fieldManager from -// serviceCatalogControllerManager for the status subresource. -func ExtractServiceCatalogControllerManagerStatus(serviceCatalogControllerManager *operatorv1.ServiceCatalogControllerManager, fieldManager string) (*ServiceCatalogControllerManagerApplyConfiguration, error) { - return ExtractServiceCatalogControllerManagerFrom(serviceCatalogControllerManager, fieldManager, "status") -} - -func (b ServiceCatalogControllerManagerApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithKind(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAPIVersion(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithName(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithGenerateName(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithNamespace(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithUID(value types.UID) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithResourceVersion(value string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithGeneration(value int64) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithLabels(entries map[string]string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithAnnotations(entries map[string]string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithFinalizers(values ...string) *ServiceCatalogControllerManagerApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *ServiceCatalogControllerManagerApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithSpec(value *ServiceCatalogControllerManagerSpecApplyConfiguration) *ServiceCatalogControllerManagerApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerApplyConfiguration) WithStatus(value *ServiceCatalogControllerManagerStatusApplyConfiguration) *ServiceCatalogControllerManagerApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *ServiceCatalogControllerManagerApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *ServiceCatalogControllerManagerApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *ServiceCatalogControllerManagerApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *ServiceCatalogControllerManagerApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go deleted file mode 100644 index 83df00b3b..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerspec.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// ServiceCatalogControllerManagerSpecApplyConfiguration represents a declarative configuration of the ServiceCatalogControllerManagerSpec type for use -// with apply. -type ServiceCatalogControllerManagerSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` -} - -// ServiceCatalogControllerManagerSpecApplyConfiguration constructs a declarative configuration of the ServiceCatalogControllerManagerSpec type for use with -// apply. -func ServiceCatalogControllerManagerSpec() *ServiceCatalogControllerManagerSpecApplyConfiguration { - return &ServiceCatalogControllerManagerSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *ServiceCatalogControllerManagerSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go deleted file mode 100644 index d15370217..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/servicecatalogcontrollermanagerstatus.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceCatalogControllerManagerStatusApplyConfiguration represents a declarative configuration of the ServiceCatalogControllerManagerStatus type for use -// with apply. -type ServiceCatalogControllerManagerStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// ServiceCatalogControllerManagerStatusApplyConfiguration constructs a declarative configuration of the ServiceCatalogControllerManagerStatus type for use with -// apply. -func ServiceCatalogControllerManagerStatus() *ServiceCatalogControllerManagerStatusApplyConfiguration { - return &ServiceCatalogControllerManagerStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithObservedGeneration(value int64) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *ServiceCatalogControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithVersion(value string) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithReadyReplicas(value int32) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *ServiceCatalogControllerManagerStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *ServiceCatalogControllerManagerStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *ServiceCatalogControllerManagerStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/sflowconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/sflowconfig.go deleted file mode 100644 index aa1853c64..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/sflowconfig.go +++ /dev/null @@ -1,30 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// SFlowConfigApplyConfiguration represents a declarative configuration of the SFlowConfig type for use -// with apply. -type SFlowConfigApplyConfiguration struct { - // sFlowCollectors is list of strings formatted as ip:port with a maximum of ten items - Collectors []operatorv1.IPPort `json:"collectors,omitempty"` -} - -// SFlowConfigApplyConfiguration constructs a declarative configuration of the SFlowConfig type for use with -// apply. -func SFlowConfig() *SFlowConfigApplyConfiguration { - return &SFlowConfigApplyConfiguration{} -} - -// WithCollectors adds the given value to the Collectors field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Collectors field. -func (b *SFlowConfigApplyConfiguration) WithCollectors(values ...operatorv1.IPPort) *SFlowConfigApplyConfiguration { - for i := range values { - b.Collectors = append(b.Collectors, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/simplemacvlanconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/simplemacvlanconfig.go deleted file mode 100644 index 89577d130..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/simplemacvlanconfig.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// SimpleMacvlanConfigApplyConfiguration represents a declarative configuration of the SimpleMacvlanConfig type for use -// with apply. -// -// SimpleMacvlanConfig contains configurations for macvlan interface. -type SimpleMacvlanConfigApplyConfiguration struct { - // master is the host interface to create the macvlan interface from. - // If not specified, it will be default route interface - Master *string `json:"master,omitempty"` - // ipamConfig configures IPAM module will be used for IP Address Management (IPAM). - IPAMConfig *IPAMConfigApplyConfiguration `json:"ipamConfig,omitempty"` - // mode is the macvlan mode: bridge, private, vepa, passthru. The default is bridge - Mode *operatorv1.MacvlanMode `json:"mode,omitempty"` - // mtu is the mtu to use for the macvlan interface. if unset, host's - // kernel will select the value. - MTU *uint32 `json:"mtu,omitempty"` -} - -// SimpleMacvlanConfigApplyConfiguration constructs a declarative configuration of the SimpleMacvlanConfig type for use with -// apply. -func SimpleMacvlanConfig() *SimpleMacvlanConfigApplyConfiguration { - return &SimpleMacvlanConfigApplyConfiguration{} -} - -// WithMaster sets the Master field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Master field is set to the value of the last call. -func (b *SimpleMacvlanConfigApplyConfiguration) WithMaster(value string) *SimpleMacvlanConfigApplyConfiguration { - b.Master = &value - return b -} - -// WithIPAMConfig sets the IPAMConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the IPAMConfig field is set to the value of the last call. -func (b *SimpleMacvlanConfigApplyConfiguration) WithIPAMConfig(value *IPAMConfigApplyConfiguration) *SimpleMacvlanConfigApplyConfiguration { - b.IPAMConfig = value - return b -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *SimpleMacvlanConfigApplyConfiguration) WithMode(value operatorv1.MacvlanMode) *SimpleMacvlanConfigApplyConfiguration { - b.Mode = &value - return b -} - -// WithMTU sets the MTU field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MTU field is set to the value of the last call. -func (b *SimpleMacvlanConfigApplyConfiguration) WithMTU(value uint32) *SimpleMacvlanConfigApplyConfiguration { - b.MTU = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamaddresses.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamaddresses.go deleted file mode 100644 index ccc0cdea5..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamaddresses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StaticIPAMAddressesApplyConfiguration represents a declarative configuration of the StaticIPAMAddresses type for use -// with apply. -// -// StaticIPAMAddresses provides IP address and Gateway for static IPAM addresses -type StaticIPAMAddressesApplyConfiguration struct { - // address is the IP address in CIDR format - Address *string `json:"address,omitempty"` - // gateway is IP inside of subnet to designate as the gateway - Gateway *string `json:"gateway,omitempty"` -} - -// StaticIPAMAddressesApplyConfiguration constructs a declarative configuration of the StaticIPAMAddresses type for use with -// apply. -func StaticIPAMAddresses() *StaticIPAMAddressesApplyConfiguration { - return &StaticIPAMAddressesApplyConfiguration{} -} - -// WithAddress sets the Address field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Address field is set to the value of the last call. -func (b *StaticIPAMAddressesApplyConfiguration) WithAddress(value string) *StaticIPAMAddressesApplyConfiguration { - b.Address = &value - return b -} - -// WithGateway sets the Gateway field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Gateway field is set to the value of the last call. -func (b *StaticIPAMAddressesApplyConfiguration) WithGateway(value string) *StaticIPAMAddressesApplyConfiguration { - b.Gateway = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamconfig.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamconfig.go deleted file mode 100644 index c8c7ca7ca..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamconfig.go +++ /dev/null @@ -1,56 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StaticIPAMConfigApplyConfiguration represents a declarative configuration of the StaticIPAMConfig type for use -// with apply. -// -// StaticIPAMConfig contains configurations for static IPAM (IP Address Management) -type StaticIPAMConfigApplyConfiguration struct { - // addresses configures IP address for the interface - Addresses []StaticIPAMAddressesApplyConfiguration `json:"addresses,omitempty"` - // routes configures IP routes for the interface - Routes []StaticIPAMRoutesApplyConfiguration `json:"routes,omitempty"` - // dns configures DNS for the interface - DNS *StaticIPAMDNSApplyConfiguration `json:"dns,omitempty"` -} - -// StaticIPAMConfigApplyConfiguration constructs a declarative configuration of the StaticIPAMConfig type for use with -// apply. -func StaticIPAMConfig() *StaticIPAMConfigApplyConfiguration { - return &StaticIPAMConfigApplyConfiguration{} -} - -// WithAddresses adds the given value to the Addresses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Addresses field. -func (b *StaticIPAMConfigApplyConfiguration) WithAddresses(values ...*StaticIPAMAddressesApplyConfiguration) *StaticIPAMConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAddresses") - } - b.Addresses = append(b.Addresses, *values[i]) - } - return b -} - -// WithRoutes adds the given value to the Routes field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Routes field. -func (b *StaticIPAMConfigApplyConfiguration) WithRoutes(values ...*StaticIPAMRoutesApplyConfiguration) *StaticIPAMConfigApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithRoutes") - } - b.Routes = append(b.Routes, *values[i]) - } - return b -} - -// WithDNS sets the DNS field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DNS field is set to the value of the last call. -func (b *StaticIPAMConfigApplyConfiguration) WithDNS(value *StaticIPAMDNSApplyConfiguration) *StaticIPAMConfigApplyConfiguration { - b.DNS = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamdns.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamdns.go deleted file mode 100644 index 3de403e72..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamdns.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StaticIPAMDNSApplyConfiguration represents a declarative configuration of the StaticIPAMDNS type for use -// with apply. -// -// StaticIPAMDNS provides DNS related information for static IPAM -type StaticIPAMDNSApplyConfiguration struct { - // nameservers points DNS servers for IP lookup - Nameservers []string `json:"nameservers,omitempty"` - // domain configures the domainname the local domain used for short hostname lookups - Domain *string `json:"domain,omitempty"` - // search configures priority ordered search domains for short hostname lookups - Search []string `json:"search,omitempty"` -} - -// StaticIPAMDNSApplyConfiguration constructs a declarative configuration of the StaticIPAMDNS type for use with -// apply. -func StaticIPAMDNS() *StaticIPAMDNSApplyConfiguration { - return &StaticIPAMDNSApplyConfiguration{} -} - -// WithNameservers adds the given value to the Nameservers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Nameservers field. -func (b *StaticIPAMDNSApplyConfiguration) WithNameservers(values ...string) *StaticIPAMDNSApplyConfiguration { - for i := range values { - b.Nameservers = append(b.Nameservers, values[i]) - } - return b -} - -// WithDomain sets the Domain field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Domain field is set to the value of the last call. -func (b *StaticIPAMDNSApplyConfiguration) WithDomain(value string) *StaticIPAMDNSApplyConfiguration { - b.Domain = &value - return b -} - -// WithSearch adds the given value to the Search field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Search field. -func (b *StaticIPAMDNSApplyConfiguration) WithSearch(values ...string) *StaticIPAMDNSApplyConfiguration { - for i := range values { - b.Search = append(b.Search, values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamroutes.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamroutes.go deleted file mode 100644 index b3e750b58..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticipamroutes.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StaticIPAMRoutesApplyConfiguration represents a declarative configuration of the StaticIPAMRoutes type for use -// with apply. -// -// StaticIPAMRoutes provides Destination/Gateway pairs for static IPAM routes -type StaticIPAMRoutesApplyConfiguration struct { - // destination points the IP route destination - Destination *string `json:"destination,omitempty"` - // gateway is the route's next-hop IP address - // If unset, a default gateway is assumed (as determined by the CNI plugin). - Gateway *string `json:"gateway,omitempty"` -} - -// StaticIPAMRoutesApplyConfiguration constructs a declarative configuration of the StaticIPAMRoutes type for use with -// apply. -func StaticIPAMRoutes() *StaticIPAMRoutesApplyConfiguration { - return &StaticIPAMRoutesApplyConfiguration{} -} - -// WithDestination sets the Destination field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Destination field is set to the value of the last call. -func (b *StaticIPAMRoutesApplyConfiguration) WithDestination(value string) *StaticIPAMRoutesApplyConfiguration { - b.Destination = &value - return b -} - -// WithGateway sets the Gateway field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Gateway field is set to the value of the last call. -func (b *StaticIPAMRoutesApplyConfiguration) WithGateway(value string) *StaticIPAMRoutesApplyConfiguration { - b.Gateway = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go deleted file mode 100644 index 82d9a3815..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorspec.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// StaticPodOperatorSpecApplyConfiguration represents a declarative configuration of the StaticPodOperatorSpec type for use -// with apply. -// -// StaticPodOperatorSpec is spec for controllers that manage static pods. -type StaticPodOperatorSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // forceRedeploymentReason can be used to force the redeployment of the operand by providing a unique string. - // This provides a mechanism to kick a previously failed deployment and provide a reason why you think it will work - // this time instead of failing again on the same config. - ForceRedeploymentReason *string `json:"forceRedeploymentReason,omitempty"` - // failedRevisionLimit is the number of failed static pod installer revisions to keep on disk and in the api - // -1 = unlimited, 0 or unset = 5 (default) - FailedRevisionLimit *int32 `json:"failedRevisionLimit,omitempty"` - // succeededRevisionLimit is the number of successful static pod installer revisions to keep on disk and in the api - // -1 = unlimited, 0 or unset = 5 (default) - SucceededRevisionLimit *int32 `json:"succeededRevisionLimit,omitempty"` -} - -// StaticPodOperatorSpecApplyConfiguration constructs a declarative configuration of the StaticPodOperatorSpec type for use with -// apply. -func StaticPodOperatorSpec() *StaticPodOperatorSpecApplyConfiguration { - return &StaticPodOperatorSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *StaticPodOperatorSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithForceRedeploymentReason sets the ForceRedeploymentReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ForceRedeploymentReason field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithForceRedeploymentReason(value string) *StaticPodOperatorSpecApplyConfiguration { - b.ForceRedeploymentReason = &value - return b -} - -// WithFailedRevisionLimit sets the FailedRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FailedRevisionLimit field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithFailedRevisionLimit(value int32) *StaticPodOperatorSpecApplyConfiguration { - b.FailedRevisionLimit = &value - return b -} - -// WithSucceededRevisionLimit sets the SucceededRevisionLimit field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SucceededRevisionLimit field is set to the value of the last call. -func (b *StaticPodOperatorSpecApplyConfiguration) WithSucceededRevisionLimit(value int32) *StaticPodOperatorSpecApplyConfiguration { - b.SucceededRevisionLimit = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go deleted file mode 100644 index 16dbde5a3..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/staticpodoperatorstatus.go +++ /dev/null @@ -1,101 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StaticPodOperatorStatusApplyConfiguration represents a declarative configuration of the StaticPodOperatorStatus type for use -// with apply. -// -// StaticPodOperatorStatus is status for controllers that manage static pods. There are different needs because individual -// node status must be tracked. -type StaticPodOperatorStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` - // latestAvailableRevisionReason describe the detailed reason for the most recent deployment - LatestAvailableRevisionReason *string `json:"latestAvailableRevisionReason,omitempty"` - // nodeStatuses track the deployment values and errors across individual nodes - NodeStatuses []NodeStatusApplyConfiguration `json:"nodeStatuses,omitempty"` -} - -// StaticPodOperatorStatusApplyConfiguration constructs a declarative configuration of the StaticPodOperatorStatus type for use with -// apply. -func StaticPodOperatorStatus() *StaticPodOperatorStatusApplyConfiguration { - return &StaticPodOperatorStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *StaticPodOperatorStatusApplyConfiguration) WithObservedGeneration(value int64) *StaticPodOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *StaticPodOperatorStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *StaticPodOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *StaticPodOperatorStatusApplyConfiguration) WithVersion(value string) *StaticPodOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *StaticPodOperatorStatusApplyConfiguration) WithReadyReplicas(value int32) *StaticPodOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *StaticPodOperatorStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *StaticPodOperatorStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *StaticPodOperatorStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *StaticPodOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} - -// WithLatestAvailableRevisionReason sets the LatestAvailableRevisionReason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevisionReason field is set to the value of the last call. -func (b *StaticPodOperatorStatusApplyConfiguration) WithLatestAvailableRevisionReason(value string) *StaticPodOperatorStatusApplyConfiguration { - b.LatestAvailableRevisionReason = &value - return b -} - -// WithNodeStatuses adds the given value to the NodeStatuses field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the NodeStatuses field. -func (b *StaticPodOperatorStatusApplyConfiguration) WithNodeStatuses(values ...*NodeStatusApplyConfiguration) *StaticPodOperatorStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithNodeStatuses") - } - b.NodeStatuses = append(b.NodeStatuses, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/statuspageprovider.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/statuspageprovider.go deleted file mode 100644 index 4a3f6a899..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/statuspageprovider.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StatuspageProviderApplyConfiguration represents a declarative configuration of the StatuspageProvider type for use -// with apply. -// -// StatuspageProvider provides identity for statuspage account. -type StatuspageProviderApplyConfiguration struct { - // pageID is the unique ID assigned by Statuspage for your page. This must be a public page. - PageID *string `json:"pageID,omitempty"` -} - -// StatuspageProviderApplyConfiguration constructs a declarative configuration of the StatuspageProvider type for use with -// apply. -func StatuspageProvider() *StatuspageProviderApplyConfiguration { - return &StatuspageProviderApplyConfiguration{} -} - -// WithPageID sets the PageID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PageID field is set to the value of the last call. -func (b *StatuspageProviderApplyConfiguration) WithPageID(value string) *StatuspageProviderApplyConfiguration { - b.PageID = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storage.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storage.go deleted file mode 100644 index 3352367c7..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storage.go +++ /dev/null @@ -1,277 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - internal "github.com/openshift/client-go/operator/applyconfigurations/internal" - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// StorageApplyConfiguration represents a declarative configuration of the Storage type for use -// with apply. -// -// Storage provides a means to configure an operator to manage the cluster storage operator. `cluster` is the canonical name. -// -// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). -type StorageApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // metadata is the standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec holds user settable values for configuration - Spec *StorageSpecApplyConfiguration `json:"spec,omitempty"` - // status holds observed values from the cluster. They may not be overridden. - Status *StorageStatusApplyConfiguration `json:"status,omitempty"` -} - -// Storage constructs a declarative configuration of the Storage type for use with -// apply. -func Storage(name string) *StorageApplyConfiguration { - b := &StorageApplyConfiguration{} - b.WithName(name) - b.WithKind("Storage") - b.WithAPIVersion("operator.openshift.io/v1") - return b -} - -// ExtractStorageFrom extracts the applied configuration owned by fieldManager from -// storage for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// storage must be a unmodified Storage API object that was retrieved from the Kubernetes API. -// ExtractStorageFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractStorageFrom(storage *operatorv1.Storage, fieldManager string, subresource string) (*StorageApplyConfiguration, error) { - b := &StorageApplyConfiguration{} - err := managedfields.ExtractInto(storage, internal.Parser().Type("com.github.openshift.api.operator.v1.Storage"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(storage.Name) - - b.WithKind("Storage") - b.WithAPIVersion("operator.openshift.io/v1") - return b, nil -} - -// ExtractStorage extracts the applied configuration owned by fieldManager from -// storage. If no managedFields are found in storage for fieldManager, a -// StorageApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// storage must be a unmodified Storage API object that was retrieved from the Kubernetes API. -// ExtractStorage provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractStorage(storage *operatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { - return ExtractStorageFrom(storage, fieldManager, "") -} - -// ExtractStorageStatus extracts the applied configuration owned by fieldManager from -// storage for the status subresource. -func ExtractStorageStatus(storage *operatorv1.Storage, fieldManager string) (*StorageApplyConfiguration, error) { - return ExtractStorageFrom(storage, fieldManager, "status") -} - -func (b StorageApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithKind(value string) *StorageApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithAPIVersion(value string) *StorageApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithName(value string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithGenerateName(value string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithNamespace(value string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithUID(value types.UID) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithResourceVersion(value string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithGeneration(value int64) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *StorageApplyConfiguration) WithLabels(entries map[string]string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *StorageApplyConfiguration) WithAnnotations(entries map[string]string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *StorageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *StorageApplyConfiguration) WithFinalizers(values ...string) *StorageApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *StorageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithSpec(value *StorageSpecApplyConfiguration) *StorageApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *StorageApplyConfiguration) WithStatus(value *StorageStatusApplyConfiguration) *StorageApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *StorageApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *StorageApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *StorageApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *StorageApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagespec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagespec.go deleted file mode 100644 index 4c81e1a0e..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagespec.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// StorageSpecApplyConfiguration represents a declarative configuration of the StorageSpec type for use -// with apply. -// -// StorageSpec is the specification of the desired behavior of the cluster storage operator. -type StorageSpecApplyConfiguration struct { - OperatorSpecApplyConfiguration `json:",inline"` - // vsphereStorageDriver indicates the storage driver to use on VSphere clusters. - // Once this field is set to CSIWithMigrationDriver, it can not be changed. - // If this is empty, the platform will choose a good default, - // which may change over time without notice. - // The current default is CSIWithMigrationDriver and may not be changed. - // DEPRECATED: This field will be removed in a future release. - VSphereStorageDriver *operatorv1.StorageDriverType `json:"vsphereStorageDriver,omitempty"` -} - -// StorageSpecApplyConfiguration constructs a declarative configuration of the StorageSpec type for use with -// apply. -func StorageSpec() *StorageSpecApplyConfiguration { - return &StorageSpecApplyConfiguration{} -} - -// WithManagementState sets the ManagementState field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ManagementState field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithManagementState(value operatorv1.ManagementState) *StorageSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ManagementState = &value - return b -} - -// WithLogLevel sets the LogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LogLevel field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithLogLevel(value operatorv1.LogLevel) *StorageSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.LogLevel = &value - return b -} - -// WithOperatorLogLevel sets the OperatorLogLevel field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OperatorLogLevel field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithOperatorLogLevel(value operatorv1.LogLevel) *StorageSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.OperatorLogLevel = &value - return b -} - -// WithUnsupportedConfigOverrides sets the UnsupportedConfigOverrides field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UnsupportedConfigOverrides field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithUnsupportedConfigOverrides(value runtime.RawExtension) *StorageSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.UnsupportedConfigOverrides = &value - return b -} - -// WithObservedConfig sets the ObservedConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedConfig field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithObservedConfig(value runtime.RawExtension) *StorageSpecApplyConfiguration { - b.OperatorSpecApplyConfiguration.ObservedConfig = &value - return b -} - -// WithVSphereStorageDriver sets the VSphereStorageDriver field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VSphereStorageDriver field is set to the value of the last call. -func (b *StorageSpecApplyConfiguration) WithVSphereStorageDriver(value operatorv1.StorageDriverType) *StorageSpecApplyConfiguration { - b.VSphereStorageDriver = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagestatus.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagestatus.go deleted file mode 100644 index 3c0c59336..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/storagestatus.go +++ /dev/null @@ -1,75 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// StorageStatusApplyConfiguration represents a declarative configuration of the StorageStatus type for use -// with apply. -// -// StorageStatus defines the observed status of the cluster storage operator. -type StorageStatusApplyConfiguration struct { - OperatorStatusApplyConfiguration `json:",inline"` -} - -// StorageStatusApplyConfiguration constructs a declarative configuration of the StorageStatus type for use with -// apply. -func StorageStatus() *StorageStatusApplyConfiguration { - return &StorageStatusApplyConfiguration{} -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *StorageStatusApplyConfiguration) WithObservedGeneration(value int64) *StorageStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ObservedGeneration = &value - return b -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *StorageStatusApplyConfiguration) WithConditions(values ...*OperatorConditionApplyConfiguration) *StorageStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.OperatorStatusApplyConfiguration.Conditions = append(b.OperatorStatusApplyConfiguration.Conditions, *values[i]) - } - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *StorageStatusApplyConfiguration) WithVersion(value string) *StorageStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.Version = &value - return b -} - -// WithReadyReplicas sets the ReadyReplicas field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ReadyReplicas field is set to the value of the last call. -func (b *StorageStatusApplyConfiguration) WithReadyReplicas(value int32) *StorageStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.ReadyReplicas = &value - return b -} - -// WithLatestAvailableRevision sets the LatestAvailableRevision field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LatestAvailableRevision field is set to the value of the last call. -func (b *StorageStatusApplyConfiguration) WithLatestAvailableRevision(value int32) *StorageStatusApplyConfiguration { - b.OperatorStatusApplyConfiguration.LatestAvailableRevision = &value - return b -} - -// WithGenerations adds the given value to the Generations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Generations field. -func (b *StorageStatusApplyConfiguration) WithGenerations(values ...*GenerationStatusApplyConfiguration) *StorageStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithGenerations") - } - b.OperatorStatusApplyConfiguration.Generations = append(b.OperatorStatusApplyConfiguration.Generations, *values[i]) - } - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/syslogloggingdestinationparameters.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/syslogloggingdestinationparameters.go deleted file mode 100644 index 789300925..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/syslogloggingdestinationparameters.go +++ /dev/null @@ -1,65 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SyslogLoggingDestinationParametersApplyConfiguration represents a declarative configuration of the SyslogLoggingDestinationParameters type for use -// with apply. -// -// SyslogLoggingDestinationParameters describes parameters for the Syslog -// logging destination type. -type SyslogLoggingDestinationParametersApplyConfiguration struct { - // address is the IP address of the syslog endpoint that receives log - // messages. - Address *string `json:"address,omitempty"` - // port is the UDP port number of the syslog endpoint that receives log - // messages. - Port *uint32 `json:"port,omitempty"` - // facility specifies the syslog facility of log messages. - // - // If this field is empty, the facility is "local1". - Facility *string `json:"facility,omitempty"` - // maxLength is the maximum length of the log message. - // - // Valid values are integers in the range 480 to 4096, inclusive. - // - // When omitted, the default value is 1024. - MaxLength *uint32 `json:"maxLength,omitempty"` -} - -// SyslogLoggingDestinationParametersApplyConfiguration constructs a declarative configuration of the SyslogLoggingDestinationParameters type for use with -// apply. -func SyslogLoggingDestinationParameters() *SyslogLoggingDestinationParametersApplyConfiguration { - return &SyslogLoggingDestinationParametersApplyConfiguration{} -} - -// WithAddress sets the Address field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Address field is set to the value of the last call. -func (b *SyslogLoggingDestinationParametersApplyConfiguration) WithAddress(value string) *SyslogLoggingDestinationParametersApplyConfiguration { - b.Address = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *SyslogLoggingDestinationParametersApplyConfiguration) WithPort(value uint32) *SyslogLoggingDestinationParametersApplyConfiguration { - b.Port = &value - return b -} - -// WithFacility sets the Facility field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Facility field is set to the value of the last call. -func (b *SyslogLoggingDestinationParametersApplyConfiguration) WithFacility(value string) *SyslogLoggingDestinationParametersApplyConfiguration { - b.Facility = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *SyslogLoggingDestinationParametersApplyConfiguration) WithMaxLength(value uint32) *SyslogLoggingDestinationParametersApplyConfiguration { - b.MaxLength = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go deleted file mode 100644 index 14170dd08..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/theme.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// ThemeApplyConfiguration represents a declarative configuration of the Theme type for use -// with apply. -// -// Theme defines a theme mode for the console UI. -type ThemeApplyConfiguration struct { - // mode is used to specify what theme mode a logo will apply to in the console UI. - // mode is a required field that allows values of Dark and Light. - // When set to Dark, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Dark mode. - // When set to Light, the logo file referenced in the 'file' field will be used when an end-user of the console UI enables the Light mode. - Mode *operatorv1.ThemeMode `json:"mode,omitempty"` - // source is used by the console to locate the specified file containing a custom logo. - // source is a required field that references a ConfigMap name and key that contains the custom logo file in the openshift-config namespace. - // You can create it with a command like: - // - 'oc create configmap custom-logos-config --namespace=openshift-config --from-file=/path/to/file' - // The ConfigMap key must include the file extension so that the console serves the file with the correct MIME type. - // The recommended file format for the Masthead and Favicon logos is SVG, but other file formats are allowed if supported by the browser. - // The logo image size must be less than 1 MB due to constraints on the ConfigMap size. - // For more information, see the documentation: https://docs.redhat.com/en/documentation/openshift_container_platform/4.19/html/web_console/customizing-web-console#customizing-web-console - Source *FileReferenceSourceApplyConfiguration `json:"source,omitempty"` -} - -// ThemeApplyConfiguration constructs a declarative configuration of the Theme type for use with -// apply. -func Theme() *ThemeApplyConfiguration { - return &ThemeApplyConfiguration{} -} - -// WithMode sets the Mode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Mode field is set to the value of the last call. -func (b *ThemeApplyConfiguration) WithMode(value operatorv1.ThemeMode) *ThemeApplyConfiguration { - b.Mode = &value - return b -} - -// WithSource sets the Source field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Source field is set to the value of the last call. -func (b *ThemeApplyConfiguration) WithSource(value *FileReferenceSourceApplyConfiguration) *ThemeApplyConfiguration { - b.Source = value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstream.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstream.go deleted file mode 100644 index 7aefaae95..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstream.go +++ /dev/null @@ -1,62 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// UpstreamApplyConfiguration represents a declarative configuration of the Upstream type for use -// with apply. -// -// Upstream can either be of type SystemResolvConf, or of type Network. -// -// - For an Upstream of type SystemResolvConf, no further fields are necessary: -// The upstream will be configured to use /etc/resolv.conf. -// - For an Upstream of type Network, a NetworkResolver field needs to be defined -// with an IP address or IP:port if the upstream listens on a port other than 53. -type UpstreamApplyConfiguration struct { - // type defines whether this upstream contains an IP/IP:port resolver or the local /etc/resolv.conf. - // Type accepts 2 possible values: SystemResolvConf or Network. - // - // * When SystemResolvConf is used, the Upstream structure does not require any further fields to be defined: - // /etc/resolv.conf will be used - // * When Network is used, the Upstream structure must contain at least an Address - Type *operatorv1.UpstreamType `json:"type,omitempty"` - // address must be defined when Type is set to Network. It will be ignored otherwise. - // It must be a valid ipv4 or ipv6 address. - Address *string `json:"address,omitempty"` - // port may be defined when Type is set to Network. It will be ignored otherwise. - // Port must be between 65535 - Port *uint32 `json:"port,omitempty"` -} - -// UpstreamApplyConfiguration constructs a declarative configuration of the Upstream type for use with -// apply. -func Upstream() *UpstreamApplyConfiguration { - return &UpstreamApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *UpstreamApplyConfiguration) WithType(value operatorv1.UpstreamType) *UpstreamApplyConfiguration { - b.Type = &value - return b -} - -// WithAddress sets the Address field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Address field is set to the value of the last call. -func (b *UpstreamApplyConfiguration) WithAddress(value string) *UpstreamApplyConfiguration { - b.Address = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *UpstreamApplyConfiguration) WithPort(value uint32) *UpstreamApplyConfiguration { - b.Port = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstreamresolvers.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstreamresolvers.go deleted file mode 100644 index ba1cec788..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/upstreamresolvers.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - operatorv1 "github.com/openshift/api/operator/v1" -) - -// UpstreamResolversApplyConfiguration represents a declarative configuration of the UpstreamResolvers type for use -// with apply. -// -// UpstreamResolvers defines a schema for configuring the CoreDNS forward plugin in the -// specific case of the default (".") server. -// It defers from ForwardPlugin in the default values it accepts: -// * At least one upstream should be specified. -// * the default policy is Sequential -type UpstreamResolversApplyConfiguration struct { - // upstreams is a list of resolvers to forward name queries for the "." domain. - // Each instance of CoreDNS performs health checking of Upstreams. When a healthy upstream - // returns an error during the exchange, another resolver is tried from Upstreams. The - // Upstreams are selected in the order specified in Policy. - // - // A maximum of 15 upstreams is allowed per ForwardPlugin. - // If no Upstreams are specified, /etc/resolv.conf is used by default - Upstreams []UpstreamApplyConfiguration `json:"upstreams,omitempty"` - // policy is used to determine the order in which upstream servers are selected for querying. - // Any one of the following values may be specified: - // - // * "Random" picks a random upstream server for each query. - // * "RoundRobin" picks upstream servers in a round-robin order, moving to the next server for each new query. - // * "Sequential" tries querying upstream servers in a sequential order until one responds, starting with the first server for each new query. - // - // The default value is "Sequential" - Policy *operatorv1.ForwardingPolicy `json:"policy,omitempty"` - // transportConfig is used to configure the transport type, server name, and optional custom CA or CA bundle to use - // when forwarding DNS requests to an upstream resolver. - // - // The default value is "" (empty) which results in a standard cleartext connection being used when forwarding DNS - // requests to an upstream resolver. - TransportConfig *DNSTransportConfigApplyConfiguration `json:"transportConfig,omitempty"` - // protocolStrategy specifies the protocol to use for upstream DNS - // requests. - // Valid values for protocolStrategy are "TCP" and omitted. - // When omitted, this means no opinion and the platform is left to choose - // a reasonable default, which is subject to change over time. - // The current default is to use the protocol of the original client request. - // "TCP" specifies that the platform should use TCP for all upstream DNS requests, - // even if the client request uses UDP. - // "TCP" is useful for UDP-specific issues such as those created by - // non-compliant upstream resolvers, but may consume more bandwidth or - // increase DNS response time. Note that protocolStrategy only affects - // the protocol of DNS requests that CoreDNS makes to upstream resolvers. - // It does not affect the protocol of DNS requests between clients and - // CoreDNS. - ProtocolStrategy *operatorv1.ProtocolStrategy `json:"protocolStrategy,omitempty"` -} - -// UpstreamResolversApplyConfiguration constructs a declarative configuration of the UpstreamResolvers type for use with -// apply. -func UpstreamResolvers() *UpstreamResolversApplyConfiguration { - return &UpstreamResolversApplyConfiguration{} -} - -// WithUpstreams adds the given value to the Upstreams field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Upstreams field. -func (b *UpstreamResolversApplyConfiguration) WithUpstreams(values ...*UpstreamApplyConfiguration) *UpstreamResolversApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithUpstreams") - } - b.Upstreams = append(b.Upstreams, *values[i]) - } - return b -} - -// WithPolicy sets the Policy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Policy field is set to the value of the last call. -func (b *UpstreamResolversApplyConfiguration) WithPolicy(value operatorv1.ForwardingPolicy) *UpstreamResolversApplyConfiguration { - b.Policy = &value - return b -} - -// WithTransportConfig sets the TransportConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the TransportConfig field is set to the value of the last call. -func (b *UpstreamResolversApplyConfiguration) WithTransportConfig(value *DNSTransportConfigApplyConfiguration) *UpstreamResolversApplyConfiguration { - b.TransportConfig = value - return b -} - -// WithProtocolStrategy sets the ProtocolStrategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ProtocolStrategy field is set to the value of the last call. -func (b *UpstreamResolversApplyConfiguration) WithProtocolStrategy(value operatorv1.ProtocolStrategy) *UpstreamResolversApplyConfiguration { - b.ProtocolStrategy = &value - return b -} diff --git a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/vspherecsidriverconfigspec.go b/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/vspherecsidriverconfigspec.go deleted file mode 100644 index 99976559d..000000000 --- a/vendor/github.com/openshift/client-go/operator/applyconfigurations/operator/v1/vspherecsidriverconfigspec.go +++ /dev/null @@ -1,89 +0,0 @@ -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// VSphereCSIDriverConfigSpecApplyConfiguration represents a declarative configuration of the VSphereCSIDriverConfigSpec type for use -// with apply. -// -// VSphereCSIDriverConfigSpec defines properties that -// can be configured for vsphere CSI driver. -type VSphereCSIDriverConfigSpecApplyConfiguration struct { - // topologyCategories indicates tag categories with which - // vcenter resources such as hostcluster or datacenter were tagged with. - // If cluster Infrastructure object has a topology, values specified in - // Infrastructure object will be used and modifications to topologyCategories - // will be rejected. - TopologyCategories []string `json:"topologyCategories,omitempty"` - // globalMaxSnapshotsPerBlockVolume is a global configuration parameter that applies to volumes on all kinds of - // datastores. If omitted, the platform chooses a default, which is subject to change over time, currently that default is 3. - // Snapshots can not be disabled using this parameter. - // Increasing number of snapshots above 3 can have negative impact on performance, for more details see: https://kb.vmware.com/s/article/1025279 - // Volume snapshot documentation: https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/3.0/vmware-vsphere-csp-getting-started/GUID-E0B41C69-7EEB-450F-A73D-5FD2FF39E891.html - GlobalMaxSnapshotsPerBlockVolume *uint32 `json:"globalMaxSnapshotsPerBlockVolume,omitempty"` - // granularMaxSnapshotsPerBlockVolumeInVSAN is a granular configuration parameter on vSAN datastore only. It - // overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. - // Snapshots for VSAN can not be disabled using this parameter. - GranularMaxSnapshotsPerBlockVolumeInVSAN *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVSAN,omitempty"` - // granularMaxSnapshotsPerBlockVolumeInVVOL is a granular configuration parameter on Virtual Volumes datastore only. - // It overrides GlobalMaxSnapshotsPerBlockVolume if set, while it falls back to the global constraint if unset. - // Snapshots for VVOL can not be disabled using this parameter. - GranularMaxSnapshotsPerBlockVolumeInVVOL *uint32 `json:"granularMaxSnapshotsPerBlockVolumeInVVOL,omitempty"` - // maxAllowedBlockVolumesPerNode is an optional configuration parameter that allows setting a custom value for the - // limit of the number of PersistentVolumes attached to a node. In vSphere version 7 this limit was set to 59 by - // default, however in vSphere version 8 this limit was increased to 255. - // Before increasing this value above 59 the cluster administrator needs to ensure that every node forming the - // cluster is updated to ESXi version 8 or higher and that all nodes are running the same version. - // The limit must be between 1 and 255, which matches the vSphere version 8 maximum. - // When omitted, this means no opinion and the platform is left to choose a reasonable default, which is subject to - // change over time. - // The current default is 59, which matches the limit for vSphere version 7. - MaxAllowedBlockVolumesPerNode *int32 `json:"maxAllowedBlockVolumesPerNode,omitempty"` -} - -// VSphereCSIDriverConfigSpecApplyConfiguration constructs a declarative configuration of the VSphereCSIDriverConfigSpec type for use with -// apply. -func VSphereCSIDriverConfigSpec() *VSphereCSIDriverConfigSpecApplyConfiguration { - return &VSphereCSIDriverConfigSpecApplyConfiguration{} -} - -// WithTopologyCategories adds the given value to the TopologyCategories field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the TopologyCategories field. -func (b *VSphereCSIDriverConfigSpecApplyConfiguration) WithTopologyCategories(values ...string) *VSphereCSIDriverConfigSpecApplyConfiguration { - for i := range values { - b.TopologyCategories = append(b.TopologyCategories, values[i]) - } - return b -} - -// WithGlobalMaxSnapshotsPerBlockVolume sets the GlobalMaxSnapshotsPerBlockVolume field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GlobalMaxSnapshotsPerBlockVolume field is set to the value of the last call. -func (b *VSphereCSIDriverConfigSpecApplyConfiguration) WithGlobalMaxSnapshotsPerBlockVolume(value uint32) *VSphereCSIDriverConfigSpecApplyConfiguration { - b.GlobalMaxSnapshotsPerBlockVolume = &value - return b -} - -// WithGranularMaxSnapshotsPerBlockVolumeInVSAN sets the GranularMaxSnapshotsPerBlockVolumeInVSAN field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GranularMaxSnapshotsPerBlockVolumeInVSAN field is set to the value of the last call. -func (b *VSphereCSIDriverConfigSpecApplyConfiguration) WithGranularMaxSnapshotsPerBlockVolumeInVSAN(value uint32) *VSphereCSIDriverConfigSpecApplyConfiguration { - b.GranularMaxSnapshotsPerBlockVolumeInVSAN = &value - return b -} - -// WithGranularMaxSnapshotsPerBlockVolumeInVVOL sets the GranularMaxSnapshotsPerBlockVolumeInVVOL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GranularMaxSnapshotsPerBlockVolumeInVVOL field is set to the value of the last call. -func (b *VSphereCSIDriverConfigSpecApplyConfiguration) WithGranularMaxSnapshotsPerBlockVolumeInVVOL(value uint32) *VSphereCSIDriverConfigSpecApplyConfiguration { - b.GranularMaxSnapshotsPerBlockVolumeInVVOL = &value - return b -} - -// WithMaxAllowedBlockVolumesPerNode sets the MaxAllowedBlockVolumesPerNode field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxAllowedBlockVolumesPerNode field is set to the value of the last call. -func (b *VSphereCSIDriverConfigSpecApplyConfiguration) WithMaxAllowedBlockVolumesPerNode(value int32) *VSphereCSIDriverConfigSpecApplyConfiguration { - b.MaxAllowedBlockVolumesPerNode = &value - return b -} diff --git a/vendor/github.com/openshift/library-go/LICENSE b/vendor/github.com/openshift/library-go/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/openshift/library-go/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/apiserver/jsonpatch/jsonpatch.go b/vendor/github.com/openshift/library-go/pkg/apiserver/jsonpatch/jsonpatch.go deleted file mode 100644 index a718832b1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/apiserver/jsonpatch/jsonpatch.go +++ /dev/null @@ -1,87 +0,0 @@ -package jsonpatch - -import ( - "encoding/json" - "fmt" - - utilerrors "k8s.io/apimachinery/pkg/util/errors" -) - -type PatchOperation struct { - Op string `json:"op,omitempty"` - Path string `json:"path,omitempty"` - Value interface{} `json:"value,omitempty"` -} - -const ( - patchTestOperation = "test" - patchRemoveOperation = "remove" -) - -type PatchSet struct { - patches []PatchOperation -} - -func New() *PatchSet { - return &PatchSet{} -} - -func (p *PatchSet) WithRemove(path string, test TestCondition) *PatchSet { - p.WithTest(test.path, test.value) - p.addOperation(patchRemoveOperation, path, nil) - return p -} - -func (p *PatchSet) WithTest(path string, value interface{}) *PatchSet { - p.addOperation(patchTestOperation, path, value) - return p -} - -func (p *PatchSet) IsEmpty() bool { - return len(p.patches) == 0 -} - -func (p *PatchSet) Marshal() ([]byte, error) { - if err := p.validate(); err != nil { - return nil, err - } - jsonBytes, err := json.Marshal(p.patches) - if err != nil { - return nil, err - } - return jsonBytes, nil -} - -func (p *PatchSet) addOperation(op, path string, value interface{}) { - patch := PatchOperation{ - Op: op, - Path: path, - Value: value, - } - p.patches = append(p.patches, patch) -} - -func (p *PatchSet) validate() error { - var errs []error - for i, patch := range p.patches { - if patch.Op == patchTestOperation { - // testing resourceVersion is fragile - // because it is likely to change frequently - // instead, test against a different field - // should be written. - if patch.Path == "/metadata/resourceVersion" { - errs = append(errs, fmt.Errorf("test operation at index: %d contains forbidden path: %q", i, patch.Path)) - } - } - } - return utilerrors.NewAggregate(errs) -} - -type TestCondition struct { - path string - value interface{} -} - -func NewTestCondition(path string, value interface{}) TestCondition { - return TestCondition{path, value} -} diff --git a/vendor/github.com/openshift/library-go/pkg/certs/pem.go b/vendor/github.com/openshift/library-go/pkg/certs/pem.go deleted file mode 100644 index 50e8a28a5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/certs/pem.go +++ /dev/null @@ -1,56 +0,0 @@ -package certs - -import ( - "bytes" - "encoding/pem" - "os" - "path/filepath" -) - -const ( - // StringSourceEncryptedBlockType is the PEM block type used to store an encrypted string - StringSourceEncryptedBlockType = "ENCRYPTED STRING" - // StringSourceKeyBlockType is the PEM block type used to store an encrypting key - StringSourceKeyBlockType = "ENCRYPTING KEY" -) - -func BlockFromFile(path string, blockType string) (*pem.Block, bool, error) { - data, err := os.ReadFile(path) - if err != nil { - return nil, false, err - } - block, ok := BlockFromBytes(data, blockType) - return block, ok, nil -} - -func BlockFromBytes(data []byte, blockType string) (*pem.Block, bool) { - for { - block, remaining := pem.Decode(data) - if block == nil { - return nil, false - } - if block.Type == blockType { - return block, true - } - data = remaining - } -} - -func BlockToFile(path string, block *pem.Block, mode os.FileMode) error { - b, err := BlockToBytes(block) - if err != nil { - return err - } - if err := os.MkdirAll(filepath.Dir(path), os.FileMode(0755)); err != nil { - return err - } - return os.WriteFile(path, b, mode) -} - -func BlockToBytes(block *pem.Block) ([]byte, error) { - b := bytes.Buffer{} - if err := pem.Encode(&b, block); err != nil { - return nil, err - } - return b.Bytes(), nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/certs/util.go b/vendor/github.com/openshift/library-go/pkg/certs/util.go deleted file mode 100644 index 5ec6354a5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/certs/util.go +++ /dev/null @@ -1,70 +0,0 @@ -package certs - -import ( - "crypto/x509" - "fmt" - "strings" - "time" -) - -const defaultOutputTimeFormat = "Jan 2 15:04:05 2006" - -// nowFn is used in unit test to freeze time. -var nowFn = time.Now().UTC - -// CertificateToString converts a certificate into a human readable string. -// This function should guarantee consistent output format for must-gather tooling and any code -// that prints the certificate details. -func CertificateToString(certificate *x509.Certificate) string { - humanName := certificate.Subject.CommonName - signerHumanName := certificate.Issuer.CommonName - - if certificate.Subject.CommonName == certificate.Issuer.CommonName { - signerHumanName = "" - } - - usages := []string{} - for _, curr := range certificate.ExtKeyUsage { - if curr == x509.ExtKeyUsageClientAuth { - usages = append(usages, "client") - continue - } - if curr == x509.ExtKeyUsageServerAuth { - usages = append(usages, "serving") - continue - } - - usages = append(usages, fmt.Sprintf("%d", curr)) - } - - validServingNames := []string{} - for _, ip := range certificate.IPAddresses { - validServingNames = append(validServingNames, ip.String()) - } - for _, dnsName := range certificate.DNSNames { - validServingNames = append(validServingNames, dnsName) - } - - servingString := "" - if len(validServingNames) > 0 { - servingString = fmt.Sprintf(" validServingFor=[%s]", strings.Join(validServingNames, ",")) - } - - groupString := "" - if len(certificate.Subject.Organization) > 0 { - groupString = fmt.Sprintf(" groups=[%s]", strings.Join(certificate.Subject.Organization, ",")) - } - - return fmt.Sprintf("%q [%s]%s%s issuer=%q (%v to %v (now=%v))", humanName, strings.Join(usages, ","), groupString, - servingString, signerHumanName, certificate.NotBefore.UTC().Format(defaultOutputTimeFormat), - certificate.NotAfter.UTC().Format(defaultOutputTimeFormat), nowFn().Format(defaultOutputTimeFormat)) -} - -// CertificateBundleToString converts a certificate bundle into a human readable string. -func CertificateBundleToString(bundle []*x509.Certificate) string { - output := []string{} - for i, cert := range bundle { - output = append(output, fmt.Sprintf("[#%d]: %s", i, CertificateToString(cert))) - } - return strings.Join(output, "\n") -} diff --git a/vendor/github.com/openshift/library-go/pkg/controller/factory/base_controller.go b/vendor/github.com/openshift/library-go/pkg/controller/factory/base_controller.go deleted file mode 100644 index bf5b1f373..000000000 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/base_controller.go +++ /dev/null @@ -1,287 +0,0 @@ -package factory - -import ( - "context" - "errors" - "fmt" - "sync" - "time" - - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - - "github.com/robfig/cron" - apierrors "k8s.io/apimachinery/pkg/api/errors" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog/v2" - - operatorv1 "github.com/openshift/api/operator/v1" - "github.com/openshift/library-go/pkg/operator/management" - operatorv1helpers "github.com/openshift/library-go/pkg/operator/v1helpers" -) - -// SyntheticRequeueError can be returned from sync() in case of forcing a sync() retry artificially. -// This can be also done by re-adding the key to queue, but this is cheaper and more convenient. -var SyntheticRequeueError = errors.New("synthetic requeue request") - -var defaultCacheSyncTimeout = 10 * time.Minute - -// baseController represents generic Kubernetes controller boiler-plate -type baseController struct { - name string - controllerInstanceName string - cachesToSync []cache.InformerSynced - sync func(ctx context.Context, controllerContext SyncContext) error - syncContext SyncContext - syncDegradedClient operatorv1helpers.OperatorClient - resyncEvery time.Duration - resyncSchedules []cron.Schedule - postStartHooks []PostStartHook - cacheSyncTimeout time.Duration -} - -var _ Controller = &baseController{} - -// Name returns a controller name. -func (c baseController) Name() string { - return c.name -} - -// ControllerInstanceName specifies the controller instance. -// Useful when the same controller is used multiple times. -func (c baseController) ControllerInstanceName() string { - return c.controllerInstanceName -} - -type scheduledJob struct { - queue workqueue.RateLimitingInterface - name string -} - -func newScheduledJob(name string, queue workqueue.RateLimitingInterface) cron.Job { - return &scheduledJob{ - queue: queue, - name: name, - } -} - -func (s *scheduledJob) Run() { - klog.V(4).Infof("Triggering scheduled %q controller run", s.name) - s.queue.Add(DefaultQueueKey) -} - -func waitForNamedCacheSync(controllerName string, stopCh <-chan struct{}, cacheSyncs ...cache.InformerSynced) error { - klog.Infof("Waiting for caches to sync for %s", controllerName) - - if !cache.WaitForCacheSync(stopCh, cacheSyncs...) { - return fmt.Errorf("unable to sync caches for %s", controllerName) - } - - klog.Infof("Caches are synced for %s ", controllerName) - - return nil -} - -func (c *baseController) Run(ctx context.Context, workers int) { - // HandleCrash recovers panics - defer utilruntime.HandleCrash(c.degradedPanicHandler) - - // give caches 10 minutes to sync - cacheSyncCtx, cacheSyncCancel := context.WithTimeout(ctx, c.cacheSyncTimeout) - defer cacheSyncCancel() - err := waitForNamedCacheSync(c.name, cacheSyncCtx.Done(), c.cachesToSync...) - if err != nil { - select { - case <-ctx.Done(): - // Exit gracefully because the controller was requested to stop. - return - default: - // If caches did not sync after 10 minutes, it has taken oddly long and - // we should provide feedback. Since the control loops will never start, - // it is safer to exit with a good message than to continue with a dead loop. - // TODO: Consider making this behavior configurable. - klog.Exit(err) - } - } - - var workerWg sync.WaitGroup - defer func() { - defer klog.Infof("All %s workers have been terminated", c.name) - workerWg.Wait() - }() - - // queueContext is used to track and initiate queue shutdown - queueContext, queueContextCancel := context.WithCancel(context.TODO()) - - for i := 1; i <= workers; i++ { - klog.Infof("Starting #%d worker of %s controller ...", i, c.name) - workerWg.Add(1) - go func() { - defer func() { - klog.Infof("Shutting down worker of %s controller ...", c.name) - workerWg.Done() - }() - c.runWorker(queueContext) - }() - } - - // if scheduled run is requested, run the cron scheduler - if c.resyncSchedules != nil { - scheduler := cron.New() - for _, s := range c.resyncSchedules { - scheduler.Schedule(s, newScheduledJob(c.name, c.syncContext.Queue())) - } - scheduler.Start() - defer scheduler.Stop() - } - - // runPeriodicalResync is independent from queue - if c.resyncEvery > 0 { - workerWg.Add(1) - if c.resyncEvery < 60*time.Second { - // Warn about too fast resyncs as they might drain the operators QPS. - // This event is cheap as it is only emitted on operator startup. - c.syncContext.Recorder().Warningf("FastControllerResync", "Controller %q resync interval is set to %s which might lead to client request throttling", c.name, c.resyncEvery) - } - go func() { - defer workerWg.Done() - wait.UntilWithContext(ctx, func(ctx context.Context) { c.syncContext.Queue().Add(DefaultQueueKey) }, c.resyncEvery) - }() - } - - // run post-start hooks (custom triggers, etc.) - if len(c.postStartHooks) > 0 { - var hookWg sync.WaitGroup - defer func() { - hookWg.Wait() // wait for the post-start hooks - klog.Infof("All %s post start hooks have been terminated", c.name) - }() - for i := range c.postStartHooks { - hookWg.Add(1) - go func(index int) { - defer hookWg.Done() - if err := c.postStartHooks[index](ctx, c.syncContext); err != nil { - klog.Warningf("%s controller post start hook error: %v", c.name, err) - } - }(i) - } - } - - // Handle controller shutdown - - <-ctx.Done() // wait for controller context to be cancelled - c.syncContext.Queue().ShutDown() // shutdown the controller queue first - queueContextCancel() // cancel the queue context, which tell workers to initiate shutdown - - // Wait for all workers to finish their job. - // at this point the Run() can hang and caller have to implement the logic that will kill - // this controller (SIGKILL). - klog.Infof("Shutting down %s ...", c.name) -} - -func (c *baseController) Sync(ctx context.Context, syncCtx SyncContext) error { - return c.sync(ctx, syncCtx) -} - -// runWorker runs a single worker -// The worker is asked to terminate when the passed context is cancelled and is given terminationGraceDuration time -// to complete its shutdown. -func (c *baseController) runWorker(queueCtx context.Context) { - wait.UntilWithContext( - queueCtx, - func(queueCtx context.Context) { - defer utilruntime.HandleCrash(c.degradedPanicHandler) - for { - select { - case <-queueCtx.Done(): - return - default: - c.processNextWorkItem(queueCtx) - } - } - }, - 1*time.Second) -} - -// reconcile wraps the sync() call and if operator client is set, it handle the degraded condition if sync() returns an error. -func (c *baseController) reconcile(ctx context.Context, syncCtx SyncContext) error { - err := c.sync(ctx, syncCtx) - degradedErr := c.reportDegraded(ctx, err) - if apierrors.IsNotFound(degradedErr) && management.IsOperatorRemovable() { - // The operator tolerates missing CR, therefore don't report it up. - return err - } - return degradedErr -} - -// degradedPanicHandler will go degraded on failures, then we should catch potential panics and covert them into bad status. -func (c *baseController) degradedPanicHandler(panicVal interface{}) { - if c.syncDegradedClient == nil { - // if we don't have a client for reporting degraded condition, then let the existing panic handler do the work - return - } - _ = c.reportDegraded(context.TODO(), fmt.Errorf("panic caught:\n%v", panicVal)) -} - -// reportDegraded updates status with an indication of degraded-ness -func (c *baseController) reportDegraded(ctx context.Context, reportedError error) error { - if c.syncDegradedClient == nil { - return reportedError - } - if reportedError != nil { - condition := applyoperatorv1.OperatorStatus(). - WithConditions(applyoperatorv1.OperatorCondition(). - WithType(c.name + "Degraded"). - WithStatus(operatorv1.ConditionTrue). - WithReason("SyncError"). - WithMessage(reportedError.Error())) - updateErr := c.syncDegradedClient.ApplyOperatorStatus(ctx, ControllerFieldManager(c.name, "reportDegraded"), condition) - if updateErr != nil { - klog.Warningf("Updating status of %q failed: %v", c.Name(), updateErr) - } - return reportedError - } - - condition := applyoperatorv1.OperatorStatus(). - WithConditions(applyoperatorv1.OperatorCondition(). - WithType(c.name + "Degraded"). - WithStatus(operatorv1.ConditionFalse). - WithReason("AsExpected")) - updateErr := c.syncDegradedClient.ApplyOperatorStatus(ctx, ControllerFieldManager(c.name, "reportDegraded"), condition) - return updateErr -} - -func (c *baseController) processNextWorkItem(queueCtx context.Context) { - key, quit := c.syncContext.Queue().Get() - if quit { - return - } - defer c.syncContext.Queue().Done(key) - - syncCtx := c.syncContext.(syncContext) - var ok bool - syncCtx.queueKey, ok = key.(string) - if !ok { - utilruntime.HandleError(fmt.Errorf("%q controller failed to process key %q (not a string)", c.name, key)) - return - } - - if err := c.reconcile(queueCtx, syncCtx); err != nil { - if err == SyntheticRequeueError { - // logging this helps detecting wedged controllers with missing pre-requirements - klog.V(5).Infof("%q controller requested synthetic requeue with key %q", c.name, key) - } else { - if klog.V(4).Enabled() || key != "key" { - utilruntime.HandleError(fmt.Errorf("%q controller failed to sync %q, err: %w", c.name, key, err)) - } else { - utilruntime.HandleError(fmt.Errorf("%s reconciliation failed: %w", c.name, err)) - } - } - c.syncContext.Queue().AddRateLimited(key) - return - } - - c.syncContext.Queue().Forget(key) -} diff --git a/vendor/github.com/openshift/library-go/pkg/controller/factory/controller_context.go b/vendor/github.com/openshift/library-go/pkg/controller/factory/controller_context.go deleted file mode 100644 index 88436c9f1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/controller_context.go +++ /dev/null @@ -1,117 +0,0 @@ -package factory - -import ( - "fmt" - "strings" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - - "github.com/openshift/library-go/pkg/operator/events" -) - -// syncContext implements SyncContext and provide user access to queue and object that caused -// the sync to be triggered. -type syncContext struct { - eventRecorder events.Recorder - queue workqueue.RateLimitingInterface - queueKey string -} - -var _ SyncContext = syncContext{} - -// NewSyncContext gives new sync context. -func NewSyncContext(name string, recorder events.Recorder) SyncContext { - return syncContext{ - queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), name), - eventRecorder: recorder.WithComponentSuffix(strings.ToLower(name)), - } -} - -func (c syncContext) Queue() workqueue.RateLimitingInterface { - return c.queue -} - -func (c syncContext) QueueKey() string { - return c.queueKey -} - -func (c syncContext) Recorder() events.Recorder { - return c.eventRecorder -} - -// eventHandler provides default event handler that is added to an informers passed to controller factory. -func (c syncContext) eventHandler(queueKeysFunc ObjectQueueKeysFunc, filter EventFilterFunc) cache.ResourceEventHandler { - resourceEventHandler := cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - runtimeObj, ok := obj.(runtime.Object) - if !ok { - utilruntime.HandleError(fmt.Errorf("added object %+v is not runtime Object", obj)) - return - } - c.enqueueKeys(queueKeysFunc(runtimeObj)...) - }, - UpdateFunc: func(old, new interface{}) { - runtimeObj, ok := new.(runtime.Object) - if !ok { - utilruntime.HandleError(fmt.Errorf("updated object %+v is not runtime Object", runtimeObj)) - return - } - c.enqueueKeys(queueKeysFunc(runtimeObj)...) - }, - DeleteFunc: func(obj interface{}) { - runtimeObj, ok := obj.(runtime.Object) - if !ok { - if tombstone, ok := obj.(cache.DeletedFinalStateUnknown); ok { - c.enqueueKeys(queueKeysFunc(tombstone.Obj.(runtime.Object))...) - - return - } - utilruntime.HandleError(fmt.Errorf("updated object %+v is not runtime Object", runtimeObj)) - return - } - c.enqueueKeys(queueKeysFunc(runtimeObj)...) - }, - } - if filter == nil { - return resourceEventHandler - } - return cache.FilteringResourceEventHandler{ - FilterFunc: filter, - Handler: resourceEventHandler, - } -} - -func (c syncContext) enqueueKeys(keys ...string) { - for _, qKey := range keys { - c.queue.Add(qKey) - } -} - -// namespaceChecker returns a function which returns true if an inpuut obj -// (or its tombstone) is a namespace and it matches a name of any namespaces -// that we are interested in -func namespaceChecker(interestingNamespaces []string) func(obj interface{}) bool { - // This is used for quick lookups in informers - interestingNamespacesSet := sets.New(interestingNamespaces...) - - return func(obj interface{}) bool { - ns, ok := obj.(*corev1.Namespace) - if ok { - return interestingNamespacesSet.Has(ns.Name) - } - - // the object might be getting deleted - tombstone, ok := obj.(cache.DeletedFinalStateUnknown) - if ok { - if ns, ok := tombstone.Obj.(*corev1.Namespace); ok { - return interestingNamespacesSet.Has(ns.Name) - } - } - return false - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/controller/factory/eventfilters.go b/vendor/github.com/openshift/library-go/pkg/controller/factory/eventfilters.go deleted file mode 100644 index 62af3c271..000000000 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/eventfilters.go +++ /dev/null @@ -1,26 +0,0 @@ -package factory - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/sets" -) - -func ObjectNameToKey(obj runtime.Object) string { - metaObj, ok := obj.(metav1.ObjectMetaAccessor) - if !ok { - return "" - } - return metaObj.GetObjectMeta().GetName() -} - -func NamesFilter(names ...string) EventFilterFunc { - nameSet := sets.New(names...) - return func(obj interface{}) bool { - metaObj, ok := obj.(metav1.ObjectMetaAccessor) - if !ok { - return false - } - return nameSet.Has(metaObj.GetObjectMeta().GetName()) - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/controller/factory/factory.go b/vendor/github.com/openshift/library-go/pkg/controller/factory/factory.go deleted file mode 100644 index 8b693784f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/factory.go +++ /dev/null @@ -1,341 +0,0 @@ -package factory - -import ( - "context" - "fmt" - "reflect" - "time" - - "github.com/robfig/cron" - "k8s.io/apimachinery/pkg/runtime" - errorutil "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/tools/cache" - - "github.com/openshift/library-go/pkg/operator/events" - operatorv1helpers "github.com/openshift/library-go/pkg/operator/v1helpers" -) - -// DefaultQueueKey is the queue key used for string trigger based controllers. -const DefaultQueueKey = "key" - -// DefaultQueueKeysFunc returns a slice with a single element - the DefaultQueueKey -func DefaultQueueKeysFunc(_ runtime.Object) []string { - return []string{DefaultQueueKey} -} - -// Factory is generator that generate standard Kubernetes controllers. -// Factory is really generic and should be only used for simple controllers that does not require special stuff.. -type Factory struct { - sync SyncFunc - syncContext SyncContext - syncDegradedClient operatorv1helpers.OperatorClient - resyncInterval time.Duration - resyncSchedules []string - informers []filteredInformers - informerQueueKeys []informersWithQueueKey - bareInformers []Informer - postStartHooks []PostStartHook - namespaceInformers []*namespaceInformer - cachesToSync []cache.InformerSynced - controllerInstanceName string -} - -// Informer represents any structure that allow to register event handlers and informs if caches are synced. -// Any SharedInformer will comply. -type Informer interface { - AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) - HasSynced() bool -} - -type namespaceInformer struct { - informer Informer - nsFilter EventFilterFunc -} - -type informersWithQueueKey struct { - informers []Informer - filter EventFilterFunc - queueKeyFn ObjectQueueKeysFunc -} - -type filteredInformers struct { - informers []Informer - filter EventFilterFunc -} - -// PostStartHook specify a function that will run after controller is started. -// The context is cancelled when the controller is asked to shutdown and the post start hook should terminate as well. -// The syncContext allow access to controller queue and event recorder. -type PostStartHook func(ctx context.Context, syncContext SyncContext) error - -// ObjectQueueKeyFunc is used to make a string work queue key out of the runtime object that is passed to it. -// This can extract the "namespace/name" if you need to or just return "key" if you building controller that only use string -// triggers. -// DEPRECATED: use ObjectQueueKeysFunc instead -type ObjectQueueKeyFunc func(runtime.Object) string - -// ObjectQueueKeysFunc is used to make a string work queue keys out of the runtime object that is passed to it. -// This can extract the "namespace/name" if you need to or just return "key" if you building controller that only use string -// triggers. -type ObjectQueueKeysFunc func(runtime.Object) []string - -// EventFilterFunc is used to filter informer events to prevent Sync() from being called -type EventFilterFunc func(obj interface{}) bool - -// New return new factory instance. -func New() *Factory { - return &Factory{} -} - -// Sync is used to set the controller synchronization function. This function is the core of the controller and is -// usually hold the main controller logic. -func (f *Factory) WithSync(syncFn SyncFunc) *Factory { - f.sync = syncFn - return f -} - -// WithInformers is used to register event handlers and get the caches synchronized functions. -// Pass informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -func (f *Factory) WithInformers(informers ...Informer) *Factory { - f.WithFilteredEventsInformers(nil, informers...) - return f -} - -// WithFilteredEventsInformers is used to register event handlers and get the caches synchronized functions. -// Pass the informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -// Pass filter to filter out events that should not trigger Sync() call. -func (f *Factory) WithFilteredEventsInformers(filter EventFilterFunc, informers ...Informer) *Factory { - f.informers = append(f.informers, filteredInformers{ - informers: informers, - filter: filter, - }) - return f -} - -// WithBareInformers allow to register informer that already has custom event handlers registered and no additional -// event handlers will be added to this informer. -// The controller will wait for the cache of this informer to be synced. -// The existing event handlers will have to respect the queue key function or the sync() implementation will have to -// count with custom queue keys. -func (f *Factory) WithBareInformers(informers ...Informer) *Factory { - f.bareInformers = append(f.bareInformers, informers...) - return f -} - -// WithInformersQueueKeyFunc is used to register event handlers and get the caches synchronized functions. -// Pass informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -// Pass the queueKeyFn you want to use to transform the informer runtime.Object into string key used by work queue. -func (f *Factory) WithInformersQueueKeyFunc(queueKeyFn ObjectQueueKeyFunc, informers ...Informer) *Factory { - f.informerQueueKeys = append(f.informerQueueKeys, informersWithQueueKey{ - informers: informers, - queueKeyFn: func(o runtime.Object) []string { - return []string{queueKeyFn(o)} - }, - }) - return f -} - -// WithFilteredEventsInformersQueueKeyFunc is used to register event handlers and get the caches synchronized functions. -// Pass informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -// Pass the queueKeyFn you want to use to transform the informer runtime.Object into string key used by work queue. -// Pass filter to filter out events that should not trigger Sync() call. -func (f *Factory) WithFilteredEventsInformersQueueKeyFunc(queueKeyFn ObjectQueueKeyFunc, filter EventFilterFunc, informers ...Informer) *Factory { - f.informerQueueKeys = append(f.informerQueueKeys, informersWithQueueKey{ - informers: informers, - filter: filter, - queueKeyFn: func(o runtime.Object) []string { - return []string{queueKeyFn(o)} - }, - }) - return f -} - -// WithInformersQueueKeysFunc is used to register event handlers and get the caches synchronized functions. -// Pass informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -// Pass the queueKeyFn you want to use to transform the informer runtime.Object into string key used by work queue. -func (f *Factory) WithInformersQueueKeysFunc(queueKeyFn ObjectQueueKeysFunc, informers ...Informer) *Factory { - f.informerQueueKeys = append(f.informerQueueKeys, informersWithQueueKey{ - informers: informers, - queueKeyFn: queueKeyFn, - }) - return f -} - -// WithFilteredEventsInformersQueueKeysFunc is used to register event handlers and get the caches synchronized functions. -// Pass informers you want to use to react to changes on resources. If informer event is observed, then the Sync() function -// is called. -// Pass the queueKeyFn you want to use to transform the informer runtime.Object into string key used by work queue. -// Pass filter to filter out events that should not trigger Sync() call. -func (f *Factory) WithFilteredEventsInformersQueueKeysFunc(queueKeyFn ObjectQueueKeysFunc, filter EventFilterFunc, informers ...Informer) *Factory { - f.informerQueueKeys = append(f.informerQueueKeys, informersWithQueueKey{ - informers: informers, - filter: filter, - queueKeyFn: queueKeyFn, - }) - return f -} - -// WithPostStartHooks allows to register functions that will run asynchronously after the controller is started via Run command. -func (f *Factory) WithPostStartHooks(hooks ...PostStartHook) *Factory { - f.postStartHooks = append(f.postStartHooks, hooks...) - return f -} - -// WithNamespaceInformer is used to register event handlers and get the caches synchronized functions. -// The sync function will only trigger when the object observed by this informer is a namespace and its name matches the interestingNamespaces. -// Do not use this to register non-namespace informers. -func (f *Factory) WithNamespaceInformer(informer Informer, interestingNamespaces ...string) *Factory { - f.namespaceInformers = append(f.namespaceInformers, &namespaceInformer{ - informer: informer, - nsFilter: namespaceChecker(interestingNamespaces), - }) - return f -} - -// ResyncEvery will cause the Sync() function to be called periodically, regardless of informers. -// This is useful when you want to refresh every N minutes or you fear that your informers can be stucked. -// If this is not called, no periodical resync will happen. -// Note: The controller context passed to Sync() function in this case does not contain the object metadata or object itself. -// -// This can be used to detect periodical resyncs, but normal Sync() have to be cautious about `nil` objects. -func (f *Factory) ResyncEvery(interval time.Duration) *Factory { - f.resyncInterval = interval - return f -} - -// ResyncSchedule allows to supply a Cron syntax schedule that will be used to schedule the sync() call runs. -// This allows more fine-tuned controller scheduling than ResyncEvery. -// Examples: -// -// factory.New().ResyncSchedule("@every 1s").ToController() // Every second -// factory.New().ResyncSchedule("@hourly").ToController() // Every hour -// factory.New().ResyncSchedule("30 * * * *").ToController() // Every hour on the half hour -// -// Note: The controller context passed to Sync() function in this case does not contain the object metadata or object itself. -// -// This can be used to detect periodical resyncs, but normal Sync() have to be cautious about `nil` objects. -func (f *Factory) ResyncSchedule(schedules ...string) *Factory { - f.resyncSchedules = append(f.resyncSchedules, schedules...) - return f -} - -// WithSyncContext allows to specify custom, existing sync context for this factory. -// This is useful during unit testing where you can override the default event recorder or mock the runtime objects. -// If this function not called, a SyncContext is created by the factory automatically. -func (f *Factory) WithSyncContext(ctx SyncContext) *Factory { - f.syncContext = ctx - return f -} - -// WithSyncDegradedOnError encapsulate the controller sync() function, so when this function return an error, the operator client -// is used to set the degraded condition to (eg. "ControllerFooDegraded"). The degraded condition name is set based on the controller name. -func (f *Factory) WithSyncDegradedOnError(operatorClient operatorv1helpers.OperatorClient) *Factory { - f.syncDegradedClient = operatorClient - return f -} - -// WithControllerInstanceName specifies the controller instance. -// Useful when the same controller is used multiple times. -func (f *Factory) WithControllerInstanceName(controllerInstanceName string) *Factory { - f.controllerInstanceName = controllerInstanceName - return f -} - -type informerHandleTuple struct { - informer Informer - filter uintptr -} - -// Controller produce a runnable controller. -func (f *Factory) ToController(name string, eventRecorder events.Recorder) Controller { - if f.sync == nil { - panic(fmt.Errorf("WithSync() must be used before calling ToController() in %q", name)) - } - - var ctx SyncContext - if f.syncContext != nil { - ctx = f.syncContext - } else { - ctx = NewSyncContext(name, eventRecorder) - } - - var cronSchedules []cron.Schedule - if len(f.resyncSchedules) > 0 { - var errors []error - for _, schedule := range f.resyncSchedules { - if s, err := cron.ParseStandard(schedule); err != nil { - errors = append(errors, err) - } else { - cronSchedules = append(cronSchedules, s) - } - } - if err := errorutil.NewAggregate(errors); err != nil { - panic(fmt.Errorf("failed to parse controller schedules for %q: %v", name, err)) - } - } - - c := &baseController{ - name: name, - controllerInstanceName: f.controllerInstanceName, - syncDegradedClient: f.syncDegradedClient, - sync: f.sync, - resyncEvery: f.resyncInterval, - resyncSchedules: cronSchedules, - cachesToSync: append([]cache.InformerSynced{}, f.cachesToSync...), - syncContext: ctx, - postStartHooks: f.postStartHooks, - cacheSyncTimeout: defaultCacheSyncTimeout, - } - - // avoid adding an informer more than once - informerQueueKeySet := sets.New[informerHandleTuple]() - for i := range f.informerQueueKeys { - for d := range f.informerQueueKeys[i].informers { - informer := f.informerQueueKeys[i].informers[d] - queueKeyFn := f.informerQueueKeys[i].queueKeyFn - tuple := informerHandleTuple{ - informer: informer, - filter: reflect.ValueOf(f.informerQueueKeys[i].filter).Pointer(), - } - if !informerQueueKeySet.Has(tuple) { - sets.Insert(informerQueueKeySet, tuple) - informer.AddEventHandler(c.syncContext.(syncContext).eventHandler(queueKeyFn, f.informerQueueKeys[i].filter)) - } - c.cachesToSync = append(c.cachesToSync, informer.HasSynced) - } - } - - // avoid adding an informer more than once - informerSet := sets.New[informerHandleTuple]() - for i := range f.informers { - for d := range f.informers[i].informers { - informer := f.informers[i].informers[d] - tuple := informerHandleTuple{ - informer: informer, - filter: reflect.ValueOf(f.informers[i].filter).Pointer(), - } - if !informerSet.Has(tuple) { - sets.Insert(informerSet, tuple) - informer.AddEventHandler(c.syncContext.(syncContext).eventHandler(DefaultQueueKeysFunc, f.informers[i].filter)) - } - c.cachesToSync = append(c.cachesToSync, informer.HasSynced) - } - } - - for i := range f.bareInformers { - c.cachesToSync = append(c.cachesToSync, f.bareInformers[i].HasSynced) - } - - for i := range f.namespaceInformers { - f.namespaceInformers[i].informer.AddEventHandler(c.syncContext.(syncContext).eventHandler(DefaultQueueKeysFunc, f.namespaceInformers[i].nsFilter)) - c.cachesToSync = append(c.cachesToSync, f.namespaceInformers[i].informer.HasSynced) - } - - return c -} diff --git a/vendor/github.com/openshift/library-go/pkg/controller/factory/interfaces.go b/vendor/github.com/openshift/library-go/pkg/controller/factory/interfaces.go deleted file mode 100644 index f0cbfd0c8..000000000 --- a/vendor/github.com/openshift/library-go/pkg/controller/factory/interfaces.go +++ /dev/null @@ -1,56 +0,0 @@ -package factory - -import ( - "context" - "fmt" - - "k8s.io/client-go/util/workqueue" - - "github.com/openshift/library-go/pkg/operator/events" -) - -// Controller interface represents a runnable Kubernetes controller. -// Cancelling the syncContext passed will cause the controller to shutdown. -// Number of workers determine how much parallel the job processing should be. -type Controller interface { - // Run runs the controller and blocks until the controller is finished. - // Number of workers can be specified via workers parameter. - // This function will return when all internal loops are finished. - // Note that having more than one worker usually means handing parallelization of Sync(). - Run(ctx context.Context, workers int) - - // Sync contain the main controller logic. - // This should not be called directly, but can be used in unit tests to exercise the sync. - Sync(ctx context.Context, controllerContext SyncContext) error - - // Name returns the controller name string. - Name() string -} - -// SyncContext interface represents a context given to the Sync() function where the main controller logic happen. -// SyncContext exposes controller name and give user access to the queue (for manual requeue). -// SyncContext also provides metadata about object that informers observed as changed. -type SyncContext interface { - // Queue gives access to controller queue. This can be used for manual requeue, although if a Sync() function return - // an error, the object is automatically re-queued. Use with caution. - Queue() workqueue.RateLimitingInterface - - // QueueKey represents the queue key passed to the Sync function. - QueueKey() string - - // Recorder provide access to event recorder. - Recorder() events.Recorder -} - -// SyncFunc is a function that contain main controller logic. -// The syncContext.syncContext passed is the main controller syncContext, when cancelled it means the controller is being shut down. -// The syncContext provides access to controller name, queue and event recorder. -type SyncFunc func(ctx context.Context, controllerContext SyncContext) error - -func ControllerFieldManager(controllerName, usageName string) string { - return fmt.Sprintf("%s-%s", controllerName, usageName) -} - -func ControllerInstanceName(instanceName, controllerName string) string { - return fmt.Sprintf("%s-%s", instanceName, controllerName) -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/OWNERS b/vendor/github.com/openshift/library-go/pkg/crypto/OWNERS deleted file mode 100644 index 4d4ce5ab9..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: - - stlaz -approvers: - - stlaz diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/cert_config.go b/vendor/github.com/openshift/library-go/pkg/crypto/cert_config.go deleted file mode 100644 index 76d71da2a..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/cert_config.go +++ /dev/null @@ -1,225 +0,0 @@ -package crypto - -import ( - "crypto" - "crypto/x509" - "crypto/x509/pkix" - "fmt" - "time" - - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/authentication/user" -) - -// KeyPairGenerator generates a cryptographic key pair. -type KeyPairGenerator interface { - GenerateKeyPair() (crypto.PublicKey, crypto.PrivateKey, error) -} - -// NewSigningCertificate creates a CA certificate. -// By default it creates a self-signed root CA. Use WithSigner to create an -// intermediate CA signed by a parent CA. -// The name parameter is used as the CommonName unless overridden with WithSubject. -// Optional: WithSigner, WithSubject, WithLifetime (defaults to DefaultCACertificateLifetimeDuration). -func NewSigningCertificate(name string, keyGen KeyPairGenerator, opts ...CertificateOption) (*TLSCertificateConfig, error) { - o := &CertificateOptions{ - lifetime: DefaultCACertificateLifetimeDuration, - } - for _, opt := range opts { - opt(o) - } - - subject := pkix.Name{CommonName: name} - if o.subject != nil { - subject = *o.subject - } - - publicKey, privateKey, err := keyGen.GenerateKeyPair() - if err != nil { - return nil, fmt.Errorf("failed to generate key pair: %w", err) - } - subjectKeyId, err := SubjectKeyIDFromPublicKey(publicKey) - if err != nil { - return nil, fmt.Errorf("failed to compute subject key ID: %w", err) - } - - if o.signer != nil { - // Intermediate CA signed by the provided signer. - authorityKeyId := o.signer.Config.Certs[0].SubjectKeyId - template := newSigningCertificateTemplateForDuration(subject, o.lifetime, time.Now, authorityKeyId, subjectKeyId) - template.SignatureAlgorithm = 0 - template.KeyUsage = KeyUsageForPublicKey(publicKey) | x509.KeyUsageCertSign - - cert, err := o.signer.SignCertificate(template, publicKey) - if err != nil { - return nil, fmt.Errorf("failed to sign certificate: %w", err) - } - - return &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{cert}, o.signer.Config.Certs...), - Key: privateKey, - }, nil - } - - // Self-signed root CA. AuthorityKeyId and SubjectKeyId match. - template := newSigningCertificateTemplateForDuration(subject, o.lifetime, time.Now, subjectKeyId, subjectKeyId) - template.SignatureAlgorithm = 0 - template.KeyUsage = KeyUsageForPublicKey(publicKey) | x509.KeyUsageCertSign - - cert, err := signCertificate(template, publicKey, template, privateKey) - if err != nil { - return nil, fmt.Errorf("failed to sign certificate: %w", err) - } - - return &TLSCertificateConfig{ - Certs: []*x509.Certificate{cert}, - Key: privateKey, - }, nil -} - -// NewServerCertificate creates a server/serving certificate signed by this CA. -// Optional: WithLifetime (defaults to DefaultCertificateLifetimeDuration), WithExtensions. -func (ca *CA) NewServerCertificate(hostnames sets.Set[string], keyGen KeyPairGenerator, opts ...CertificateOption) (*TLSCertificateConfig, error) { - o := &CertificateOptions{ - lifetime: DefaultCertificateLifetimeDuration, - } - for _, opt := range opts { - opt(o) - } - - publicKey, privateKey, err := keyGen.GenerateKeyPair() - if err != nil { - return nil, fmt.Errorf("failed to generate key pair: %w", err) - } - subjectKeyId, err := SubjectKeyIDFromPublicKey(publicKey) - if err != nil { - return nil, fmt.Errorf("failed to compute subject key ID: %w", err) - } - - sortedHostnames := sets.List(hostnames) - authorityKeyId := ca.Config.Certs[0].SubjectKeyId - template := newServerCertificateTemplateForDuration( - pkix.Name{CommonName: sortedHostnames[0]}, - sortedHostnames, - o.lifetime, - time.Now, - authorityKeyId, - subjectKeyId, - ) - // Let x509.CreateCertificate auto-detect the signature algorithm from the CA's key. - template.SignatureAlgorithm = 0 - template.KeyUsage = KeyUsageForPublicKey(publicKey) - - for _, fn := range o.extensionFns { - if err := fn(template); err != nil { - return nil, fmt.Errorf("failed to apply certificate extension: %w", err) - } - } - - cert, err := ca.SignCertificate(template, publicKey) - if err != nil { - return nil, fmt.Errorf("failed to sign certificate: %w", err) - } - - return &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{cert}, ca.Config.Certs...), - Key: privateKey, - }, nil -} - -// NewClientCertificate creates a client certificate signed by this CA. -// Optional: WithLifetime (defaults to DefaultCertificateLifetimeDuration). -func (ca *CA) NewClientCertificate(u user.Info, keyGen KeyPairGenerator, opts ...CertificateOption) (*TLSCertificateConfig, error) { - o := &CertificateOptions{ - lifetime: DefaultCertificateLifetimeDuration, - } - for _, opt := range opts { - opt(o) - } - - publicKey, privateKey, err := keyGen.GenerateKeyPair() - if err != nil { - return nil, fmt.Errorf("failed to generate key pair: %w", err) - } - subjectKeyId, err := SubjectKeyIDFromPublicKey(publicKey) - if err != nil { - return nil, fmt.Errorf("failed to compute subject key ID: %w", err) - } - - authorityKeyId := ca.Config.Certs[0].SubjectKeyId - template := NewClientCertificateTemplateForDuration(UserToSubject(u), o.lifetime, time.Now) - template.AuthorityKeyId = authorityKeyId - template.SubjectKeyId = subjectKeyId - // Let x509.CreateCertificate auto-detect the signature algorithm from the CA's key. - template.SignatureAlgorithm = 0 - template.KeyUsage = KeyUsageForPublicKey(publicKey) - - cert, err := ca.SignCertificate(template, publicKey) - if err != nil { - return nil, fmt.Errorf("failed to sign certificate: %w", err) - } - - return &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{cert}, ca.Config.Certs...), - Key: privateKey, - }, nil -} - -// NewPeerCertificate creates a peer certificate (both server and client auth) -// signed by this CA. -// Optional: WithLifetime (defaults to DefaultCertificateLifetimeDuration), WithExtensions. -func (ca *CA) NewPeerCertificate(hostnames sets.Set[string], u user.Info, keyGen KeyPairGenerator, opts ...CertificateOption) (*TLSCertificateConfig, error) { - o := &CertificateOptions{ - lifetime: DefaultCertificateLifetimeDuration, - } - for _, opt := range opts { - opt(o) - } - - publicKey, privateKey, err := keyGen.GenerateKeyPair() - if err != nil { - return nil, fmt.Errorf("failed to generate key pair: %w", err) - } - subjectKeyId, err := SubjectKeyIDFromPublicKey(publicKey) - if err != nil { - return nil, fmt.Errorf("failed to compute subject key ID: %w", err) - } - - sortedHostnames := sets.List(hostnames) - authorityKeyId := ca.Config.Certs[0].SubjectKeyId - - // Start from a server certificate template for the hostnames. - template := newServerCertificateTemplateForDuration( - pkix.Name{CommonName: sortedHostnames[0]}, - sortedHostnames, - o.lifetime, - time.Now, - authorityKeyId, - subjectKeyId, - ) - // Let x509.CreateCertificate auto-detect the signature algorithm from the CA's key. - template.SignatureAlgorithm = 0 - template.KeyUsage = KeyUsageForPublicKey(publicKey) - - // Set subject from user info for client authentication. - template.Subject = UserToSubject(u) - - // Enable both server and client authentication. - template.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth, x509.ExtKeyUsageClientAuth} - - for _, fn := range o.extensionFns { - if err := fn(template); err != nil { - return nil, fmt.Errorf("failed to apply certificate extension: %w", err) - } - } - - cert, err := ca.SignCertificate(template, publicKey) - if err != nil { - return nil, fmt.Errorf("failed to sign certificate: %w", err) - } - - return &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{cert}, ca.Config.Certs...), - Key: privateKey, - }, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/crypto.go b/vendor/github.com/openshift/library-go/pkg/crypto/crypto.go deleted file mode 100644 index c5ab62e6b..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/crypto.go +++ /dev/null @@ -1,1258 +0,0 @@ -package crypto - -import ( - "bytes" - "crypto" - "crypto/ecdsa" - "crypto/rand" - "crypto/rsa" - "crypto/sha1" - "crypto/tls" - "crypto/x509" - "crypto/x509/pkix" - "encoding/pem" - "errors" - "fmt" - "io" - "math/big" - mathrand "math/rand" - "net" - "os" - "path/filepath" - "reflect" - "sort" - "strconv" - "sync" - "time" - - "k8s.io/klog/v2" - - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/client-go/util/cert" - - configv1 "github.com/openshift/api/config/v1" -) - -// TLS configuration -// -// The OpenShift API defines TLS profiles using OpenSSL cipher suite names. -// Go's crypto/tls uses IANA-standard cipher suite names (which happen to -// match the Go constant names). This package bridges the two naming schemes: -// OpenSSLToIANACipherSuites translates API-level OpenSSL names into the IANA -// names that Go understands, silently dropping any cipher that Go's crypto/tls -// cannot negotiate. This silent narrowing is by design: Go literally cannot -// serve those ciphers, so listing them would be misleading. - -// goTLSVersions lists all TLS versions that Go's crypto/tls can negotiate. -// Kept in sync with the crypto/tls package by TestConstantMaps. -var goTLSVersions = map[string]uint16{ - "VersionTLS10": tls.VersionTLS10, - "VersionTLS11": tls.VersionTLS11, - "VersionTLS12": tls.VersionTLS12, - "VersionTLS13": tls.VersionTLS13, -} - -// enabledTLSVersions is the subset of goTLSVersions that OpenShift allows -// in TLS configurations. Remove an entry here (not from goTLSVersions) to -// phase out a version while still being able to parse legacy references. -var enabledTLSVersions = map[string]uint16{ - "VersionTLS10": tls.VersionTLS10, - "VersionTLS11": tls.VersionTLS11, - "VersionTLS12": tls.VersionTLS12, - "VersionTLS13": tls.VersionTLS13, -} - -// TLSVersionToNameOrDie given a tls version as an int, return its readable name -func TLSVersionToNameOrDie(intVal uint16) string { - matches := []string{} - for key, version := range goTLSVersions { - if version == intVal { - matches = append(matches, key) - } - } - - if len(matches) == 0 { - panic(fmt.Sprintf("no name found for %d", intVal)) - } - if len(matches) > 1 { - panic(fmt.Sprintf("multiple names found for %d: %v", intVal, matches)) - } - return matches[0] -} - -func TLSVersion(versionName string) (uint16, error) { - if len(versionName) == 0 { - return DefaultTLSVersion(), nil - } - if version, ok := goTLSVersions[versionName]; ok { - return version, nil - } - return 0, fmt.Errorf("unknown tls version %q", versionName) -} -func TLSVersionOrDie(versionName string) uint16 { - version, err := TLSVersion(versionName) - if err != nil { - panic(err) - } - return version -} - -// GolangTLSVersions returns all TLS versions known to this Go build. -// -// Deprecated: Use ValidTLSVersions instead. -func GolangTLSVersions() []string { - supported := []string{} - for k := range goTLSVersions { - supported = append(supported, k) - } - sort.Strings(supported) - return supported -} - -// ValidTLSVersions returns the TLS versions that OpenShift allows in configurations. -func ValidTLSVersions() []string { - validVersions := []string{} - for k := range enabledTLSVersions { - validVersions = append(validVersions, k) - } - sort.Strings(validVersions) - return validVersions -} -func DefaultTLSVersion() uint16 { - // Can't use SSLv3 because of POODLE and BEAST - // Can't use TLSv1.0 because of POODLE and BEAST using CBC cipher - // Can't use TLSv1.1 because of RC4 cipher usage - return tls.VersionTLS12 -} - -// goCipherSuites lists all cipher suites recognized by Go's crypto/tls, keyed -// by IANA name. Kept in sync with the crypto/tls package by TestConstantMaps. -var goCipherSuites = map[string]uint16{ - "TLS_RSA_WITH_RC4_128_SHA": tls.TLS_RSA_WITH_RC4_128_SHA, - "TLS_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA, - "TLS_RSA_WITH_AES_128_CBC_SHA": tls.TLS_RSA_WITH_AES_128_CBC_SHA, - "TLS_RSA_WITH_AES_256_CBC_SHA": tls.TLS_RSA_WITH_AES_256_CBC_SHA, - "TLS_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_RSA_WITH_AES_128_CBC_SHA256, - "TLS_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_RSA_WITH_AES_128_GCM_SHA256, - "TLS_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_RSA_WITH_AES_256_GCM_SHA384, - "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA, - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, - "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, - "TLS_ECDHE_RSA_WITH_RC4_128_SHA": tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA, - "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, - "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA, - "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, - "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, - "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384": tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, - "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256": tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, - "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256": tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, - "TLS_AES_128_GCM_SHA256": tls.TLS_AES_128_GCM_SHA256, - "TLS_AES_256_GCM_SHA384": tls.TLS_AES_256_GCM_SHA384, - "TLS_CHACHA20_POLY1305_SHA256": tls.TLS_CHACHA20_POLY1305_SHA256, -} - -// openSSLToIANACiphers maps OpenSSL cipher suite names to IANA names for -// every cipher that Go's crypto/tls can negotiate. -// Ref: https://www.iana.org/assignments/tls-parameters/tls-parameters.xml -// Ciphers defined in the API but absent from Go are tracked in -// ciphersUnsupportedByGo (below) so tests detect when Go gains support. -var openSSLToIANACiphers = map[string]string{ - // TLS 1.3 ciphers - always negotiated by Go; not individually configurable. - "TLS_AES_128_GCM_SHA256": "TLS_AES_128_GCM_SHA256", // 0x13,0x01 - "TLS_AES_256_GCM_SHA384": "TLS_AES_256_GCM_SHA384", // 0x13,0x02 - "TLS_CHACHA20_POLY1305_SHA256": "TLS_CHACHA20_POLY1305_SHA256", // 0x13,0x03 - - // TLS 1.2 - "ECDHE-ECDSA-AES128-GCM-SHA256": "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", // 0xC0,0x2B - "ECDHE-RSA-AES128-GCM-SHA256": "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", // 0xC0,0x2F - "ECDHE-ECDSA-AES256-GCM-SHA384": "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", // 0xC0,0x2C - "ECDHE-RSA-AES256-GCM-SHA384": "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", // 0xC0,0x30 - "ECDHE-ECDSA-CHACHA20-POLY1305": "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", // 0xCC,0xA9 - "ECDHE-RSA-CHACHA20-POLY1305": "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256", // 0xCC,0xA8 - "ECDHE-ECDSA-AES128-SHA256": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", // 0xC0,0x23 - "ECDHE-RSA-AES128-SHA256": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", // 0xC0,0x27 - "AES128-GCM-SHA256": "TLS_RSA_WITH_AES_128_GCM_SHA256", // 0x00,0x9C - "AES256-GCM-SHA384": "TLS_RSA_WITH_AES_256_GCM_SHA384", // 0x00,0x9D - "AES128-SHA256": "TLS_RSA_WITH_AES_128_CBC_SHA256", // 0x00,0x3C - - // Ciphers defined in the API but not supported by Go are listed in - // ciphersUnsupportedByGo below. - - // TLS 1 - "ECDHE-ECDSA-AES128-SHA": "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA", // 0xC0,0x09 - "ECDHE-RSA-AES128-SHA": "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", // 0xC0,0x13 - "ECDHE-ECDSA-AES256-SHA": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA", // 0xC0,0x0A - "ECDHE-RSA-AES256-SHA": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", // 0xC0,0x14 - - // SSL 3 - "AES128-SHA": "TLS_RSA_WITH_AES_128_CBC_SHA", // 0x00,0x2F - "AES256-SHA": "TLS_RSA_WITH_AES_256_CBC_SHA", // 0x00,0x35 - "DES-CBC3-SHA": "TLS_RSA_WITH_3DES_EDE_CBC_SHA", // 0x00,0x0A - "ECDHE-RSA-DES-CBC3-SHA": "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA", // 0xC0,0x12 -} - -// ciphersUnsupportedByGo lists cipher suites that are defined in the OpenShift API -// TLS profiles (from the Mozilla guidelines) but are not supported by Go's crypto/tls. -// These are intentionally excluded from openSSLToIANACiphers and silently filtered -// out during profile translation. The IANA names come from the IANA TLS Cipher Suite -// Registry (https://www.iana.org/assignments/tls-parameters/) and are retained so -// TestCiphersUnsupportedByGoAreActuallyUnsupported can detect if a future Go -// release adds support. -var ciphersUnsupportedByGo = map[string]string{ - "ECDHE-ECDSA-AES256-SHA384": "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384", - "ECDHE-RSA-AES256-SHA384": "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", - "AES256-SHA256": "TLS_RSA_WITH_AES_256_CBC_SHA256", -} - -// CipherSuitesToNamesOrDie given a list of cipher suites as ints, return their readable names -func CipherSuitesToNamesOrDie(intVals []uint16) []string { - ret := []string{} - for _, intVal := range intVals { - ret = append(ret, CipherSuiteToNameOrDie(intVal)) - } - - return ret -} - -// CipherSuiteToNameOrDie given a cipher suite as an int, return its readable name -func CipherSuiteToNameOrDie(intVal uint16) string { - // The following suite ids appear twice in the cipher map (with - // and without the _SHA256 suffix) for the purposes of backwards - // compatibility. Always return the current rather than the legacy - // name. - switch intVal { - case tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: - return "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256" - case tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: - return "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256" - } - - matches := []string{} - for key, version := range goCipherSuites { - if version == intVal { - matches = append(matches, key) - } - } - - if len(matches) == 0 { - panic(fmt.Sprintf("no name found for %d", intVal)) - } - if len(matches) > 1 { - panic(fmt.Sprintf("multiple names found for %d: %v", intVal, matches)) - } - return matches[0] -} - -func CipherSuite(cipherName string) (uint16, error) { - if cipher, ok := goCipherSuites[cipherName]; ok { - return cipher, nil - } - - return 0, fmt.Errorf("unknown cipher name %q", cipherName) -} - -func CipherSuitesOrDie(cipherNames []string) []uint16 { - if len(cipherNames) == 0 { - return DefaultCiphers() - } - cipherValues := []uint16{} - for _, cipherName := range cipherNames { - cipher, err := CipherSuite(cipherName) - if err != nil { - panic(err) - } - cipherValues = append(cipherValues, cipher) - } - return cipherValues -} -func ValidCipherSuites() []string { - validCipherSuites := []string{} - for k := range goCipherSuites { - validCipherSuites = append(validCipherSuites, k) - } - sort.Strings(validCipherSuites) - return validCipherSuites -} - -// DefaultTLSProfileType is the intermediate profile type. -const DefaultTLSProfileType = configv1.TLSProfileIntermediateType - -// DefaultCiphers returns the default cipher suites for TLS connections. -// -// RECOMMENDATION: Instead of relying on this function directly, consumers should respect -// TLSSecurityProfile settings from one of the OpenShift API configuration resources: -// - For API servers: Use apiserver.config.openshift.io/cluster Spec.TLSSecurityProfile -// - For ingress controllers: Use operator.openshift.io/v1 IngressController Spec.TLSSecurityProfile -// - For kubelet: Use machineconfiguration.openshift.io/v1 KubeletConfig Spec.TLSSecurityProfile -// -// These API resources allow cluster administrators to choose between Old, Intermediate, -// Modern, or Custom TLS profiles. Components should observe these settings. -func DefaultCiphers() []uint16 { - // Aligned with intermediate profile of the 5.7 version of the Mozilla Server - // Side TLS guidelines found at: https://ssl-config.mozilla.org/guidelines/5.7.json - // - // Latest guidelines: https://ssl-config.mozilla.org/guidelines/latest.json - // - // This profile provides strong security with wide compatibility. - // It requires TLS 1.2+ and uses only AEAD cipher suites (GCM, ChaCha20-Poly1305) - // with ECDHE key exchange for perfect forward secrecy. - // - // All CBC-mode ciphers have been removed due to padding oracle vulnerabilities. - // All RSA key exchange ciphers have been removed due to lack of perfect forward secrecy. - // - // HTTP/2 compliance: All ciphers are compliant with RFC7540, section 9.2. - return []uint16{ - // TLS 1.2 cipher suites with ECDHE + AEAD - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256, - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, // required by HTTP/2 - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - - // TLS 1.3 cipher suites (negotiated automatically, not configurable) - tls.TLS_AES_128_GCM_SHA256, - tls.TLS_AES_256_GCM_SHA384, - tls.TLS_CHACHA20_POLY1305_SHA256, - } -} - -// SecureTLSConfig enforces the default minimum security settings for the cluster. -func SecureTLSConfig(config *tls.Config) *tls.Config { - if config.MinVersion == 0 { - config.MinVersion = DefaultTLSVersion() - } - - config.PreferServerCipherSuites = true - if len(config.CipherSuites) == 0 { - config.CipherSuites = DefaultCiphers() - } - return config -} - -// OpenSSLToIANACipherSuites maps input OpenSSL Cipher Suite names to their -// IANA counterparts. -// Ciphers that Go's crypto/tls cannot negotiate are silently dropped and -// logged at V(4). -func OpenSSLToIANACipherSuites(ciphers []string) []string { - ianaCiphers := make([]string, 0, len(ciphers)) - - for _, c := range ciphers { - ianaCipher, found := openSSLToIANACiphers[c] - if found { - ianaCiphers = append(ianaCiphers, ianaCipher) - } else { - klog.V(4).Infof("Dropping cipher %q: not supported by Go's crypto/tls", c) - } - } - - return ianaCiphers -} - -type TLSCertificateConfig struct { - Certs []*x509.Certificate - Key crypto.PrivateKey -} - -type TLSCARoots struct { - Roots []*x509.Certificate -} - -func (c *TLSCertificateConfig) WriteCertConfigFile(certFile, keyFile string) error { - // ensure parent dir - if err := os.MkdirAll(filepath.Dir(certFile), os.FileMode(0755)); err != nil { - return err - } - certFileWriter, err := os.OpenFile(certFile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - if err != nil { - return err - } - if err := os.MkdirAll(filepath.Dir(keyFile), os.FileMode(0755)); err != nil { - return err - } - keyFileWriter, err := os.OpenFile(keyFile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) - if err != nil { - return err - } - - if err := writeCertificates(certFileWriter, c.Certs...); err != nil { - return err - } - if err := writeKeyFile(keyFileWriter, c.Key); err != nil { - return err - } - - if err := certFileWriter.Close(); err != nil { - return err - } - if err := keyFileWriter.Close(); err != nil { - return err - } - - return nil -} - -func (c *TLSCertificateConfig) WriteCertConfig(certFile, keyFile io.Writer) error { - if err := writeCertificates(certFile, c.Certs...); err != nil { - return err - } - if err := writeKeyFile(keyFile, c.Key); err != nil { - return err - } - return nil -} - -func (c *TLSCertificateConfig) GetPEMBytes() ([]byte, []byte, error) { - certBytes, err := EncodeCertificates(c.Certs...) - if err != nil { - return nil, nil, err - } - keyBytes, err := EncodeKey(c.Key) - if err != nil { - return nil, nil, err - } - - return certBytes, keyBytes, nil -} - -func GetTLSCertificateConfig(certFile, keyFile string) (*TLSCertificateConfig, error) { - if len(certFile) == 0 { - return nil, errors.New("certFile missing") - } - if len(keyFile) == 0 { - return nil, errors.New("keyFile missing") - } - - certPEMBlock, err := os.ReadFile(certFile) - if err != nil { - return nil, err - } - certs, err := cert.ParseCertsPEM(certPEMBlock) - if err != nil { - return nil, fmt.Errorf("error reading %s: %s", certFile, err) - } - - keyPEMBlock, err := os.ReadFile(keyFile) - if err != nil { - return nil, err - } - keyPairCert, err := tls.X509KeyPair(certPEMBlock, keyPEMBlock) - if err != nil { - return nil, err - } - key := keyPairCert.PrivateKey - - return &TLSCertificateConfig{certs, key}, nil -} - -func GetTLSCertificateConfigFromBytes(certBytes, keyBytes []byte) (*TLSCertificateConfig, error) { - if len(certBytes) == 0 { - return nil, errors.New("certFile missing") - } - if len(keyBytes) == 0 { - return nil, errors.New("keyFile missing") - } - - certs, err := cert.ParseCertsPEM(certBytes) - if err != nil { - return nil, fmt.Errorf("error reading cert: %s", err) - } - - keyPairCert, err := tls.X509KeyPair(certBytes, keyBytes) - if err != nil { - return nil, err - } - key := keyPairCert.PrivateKey - - return &TLSCertificateConfig{certs, key}, nil -} - -const ( - DefaultCertificateLifetimeDuration = time.Hour * 24 * 365 * 2 // 2 years - DefaultCACertificateLifetimeDuration = time.Hour * 24 * 365 * 5 // 5 years - - // Default keys are 2048 bits - keyBits = 2048 -) - -type CA struct { - Config *TLSCertificateConfig - - SerialGenerator SerialGenerator -} - -// SerialGenerator is an interface for getting a serial number for the cert. It MUST be thread-safe. -type SerialGenerator interface { - Next(template *x509.Certificate) (int64, error) -} - -// SerialFileGenerator returns a unique, monotonically increasing serial number and ensures the CA on disk records that value. -type SerialFileGenerator struct { - SerialFile string - - // lock guards access to the Serial field - lock sync.Mutex - Serial int64 -} - -func NewSerialFileGenerator(serialFile string) (*SerialFileGenerator, error) { - // read serial file, it must already exist - serial, err := fileToSerial(serialFile) - if err != nil { - return nil, err - } - - generator := &SerialFileGenerator{ - Serial: serial, - SerialFile: serialFile, - } - - // 0 is unused and 1 is reserved for the CA itself - // Thus we need to guarantee that the first external call to SerialFileGenerator.Next returns 2+ - // meaning that SerialFileGenerator.Serial must not be less than 1 (it is guaranteed to be non-negative) - if generator.Serial < 1 { - // fake a call to Next so the file stays in sync and Serial is incremented - if _, err := generator.Next(&x509.Certificate{}); err != nil { - return nil, err - } - } - - return generator, nil -} - -// Next returns a unique, monotonically increasing serial number and ensures the CA on disk records that value. -func (s *SerialFileGenerator) Next(template *x509.Certificate) (int64, error) { - s.lock.Lock() - defer s.lock.Unlock() - - // do a best effort check to make sure concurrent external writes are not occurring to the underlying serial file - serial, err := fileToSerial(s.SerialFile) - if err != nil { - return 0, err - } - if serial != s.Serial { - return 0, fmt.Errorf("serial file %s out of sync ram=%d disk=%d", s.SerialFile, s.Serial, serial) - } - - next := s.Serial + 1 - s.Serial = next - - // Output in hex, padded to multiples of two characters for OpenSSL's sake - serialText := fmt.Sprintf("%X", next) - if len(serialText)%2 == 1 { - serialText = "0" + serialText - } - // always add a newline at the end to have a valid file - serialText += "\n" - - if err := os.WriteFile(s.SerialFile, []byte(serialText), os.FileMode(0640)); err != nil { - return 0, err - } - return next, nil -} - -func fileToSerial(serialFile string) (int64, error) { - serialData, err := os.ReadFile(serialFile) - if err != nil { - return 0, err - } - - // read the file as a single hex number after stripping any whitespace - serial, err := strconv.ParseInt(string(bytes.TrimSpace(serialData)), 16, 64) - if err != nil { - return 0, err - } - - if serial < 0 { - return 0, fmt.Errorf("invalid negative serial %d in serial file %s", serial, serialFile) - } - - return serial, nil -} - -// RandomSerialGenerator returns a serial based on time.Now and the subject -type RandomSerialGenerator struct { -} - -func (s *RandomSerialGenerator) Next(template *x509.Certificate) (int64, error) { - return randomSerialNumber(), nil -} - -// randomSerialNumber returns a random int64 serial number based on -// time.Now. It is defined separately from the generator interface so -// that the caller doesn't have to worry about an input template or -// error - these are unnecessary when creating a random serial. -func randomSerialNumber() int64 { - r := mathrand.New(mathrand.NewSource(time.Now().UTC().UnixNano())) - return r.Int63() -} - -// EnsureCA returns a CA, whether it was created (as opposed to pre-existing), and any error -// if serialFile is empty, a RandomSerialGenerator will be used -func EnsureCA(certFile, keyFile, serialFile, name string, lifetime time.Duration) (*CA, bool, error) { - if ca, err := GetCA(certFile, keyFile, serialFile); err == nil { - return ca, false, err - } - ca, err := MakeSelfSignedCA(certFile, keyFile, serialFile, name, lifetime) - return ca, true, err -} - -// if serialFile is empty, a RandomSerialGenerator will be used -func GetCA(certFile, keyFile, serialFile string) (*CA, error) { - caConfig, err := GetTLSCertificateConfig(certFile, keyFile) - if err != nil { - return nil, err - } - - var serialGenerator SerialGenerator - if len(serialFile) > 0 { - serialGenerator, err = NewSerialFileGenerator(serialFile) - if err != nil { - return nil, err - } - } else { - serialGenerator = &RandomSerialGenerator{} - } - - return &CA{ - SerialGenerator: serialGenerator, - Config: caConfig, - }, nil -} - -func GetCAFromBytes(certBytes, keyBytes []byte) (*CA, error) { - caConfig, err := GetTLSCertificateConfigFromBytes(certBytes, keyBytes) - if err != nil { - return nil, err - } - - return &CA{ - SerialGenerator: &RandomSerialGenerator{}, - Config: caConfig, - }, nil -} - -// if serialFile is empty, a RandomSerialGenerator will be used -func MakeSelfSignedCA(certFile, keyFile, serialFile, name string, lifetime time.Duration) (*CA, error) { - klog.V(2).Infof("Generating new CA for %s cert, and key in %s, %s", name, certFile, keyFile) - - caConfig, err := MakeSelfSignedCAConfig(name, lifetime) - if err != nil { - return nil, err - } - if err := caConfig.WriteCertConfigFile(certFile, keyFile); err != nil { - return nil, err - } - - var serialGenerator SerialGenerator - if len(serialFile) > 0 { - // create / overwrite the serial file with a zero padded hex value (ending in a newline to have a valid file) - if err := os.WriteFile(serialFile, []byte("00\n"), 0644); err != nil { - return nil, err - } - serialGenerator, err = NewSerialFileGenerator(serialFile) - if err != nil { - return nil, err - } - } else { - serialGenerator = &RandomSerialGenerator{} - } - - return &CA{ - SerialGenerator: serialGenerator, - Config: caConfig, - }, nil -} - -func MakeSelfSignedCAConfig(name string, lifetime time.Duration) (*TLSCertificateConfig, error) { - subject := pkix.Name{CommonName: name} - return MakeSelfSignedCAConfigForSubject(subject, lifetime) -} - -func MakeSelfSignedCAConfigForSubject(subject pkix.Name, lifetime time.Duration) (*TLSCertificateConfig, error) { - if lifetime <= 0 { - lifetime = DefaultCACertificateLifetimeDuration - fmt.Fprintf(os.Stderr, "Validity period of the certificate for %q is unset, resetting to %s!\n", subject.CommonName, lifetime.String()) - } - - if lifetime > DefaultCACertificateLifetimeDuration { - warnAboutCertificateLifeTime(subject.CommonName, DefaultCACertificateLifetimeDuration) - } - return makeSelfSignedCAConfigForSubjectAndDuration(subject, time.Now, lifetime) -} - -func MakeSelfSignedCAConfigForDuration(name string, caLifetime time.Duration) (*TLSCertificateConfig, error) { - subject := pkix.Name{CommonName: name} - return makeSelfSignedCAConfigForSubjectAndDuration(subject, time.Now, caLifetime) -} - -func UnsafeMakeSelfSignedCAConfigForDurationAtTime(name string, currentTime func() time.Time, caLifetime time.Duration) (*TLSCertificateConfig, error) { - subject := pkix.Name{CommonName: name} - return makeSelfSignedCAConfigForSubjectAndDuration(subject, currentTime, caLifetime) -} - -func makeSelfSignedCAConfigForSubjectAndDuration(subject pkix.Name, currentTime func() time.Time, caLifetime time.Duration) (*TLSCertificateConfig, error) { - // Create CA cert - rootcaPublicKey, rootcaPrivateKey, publicKeyHash, err := newKeyPairWithHash() - if err != nil { - return nil, err - } - // AuthorityKeyId and SubjectKeyId should match for a self-signed CA - authorityKeyId := publicKeyHash - subjectKeyId := publicKeyHash - rootcaTemplate := newSigningCertificateTemplateForDuration(subject, caLifetime, currentTime, authorityKeyId, subjectKeyId) - rootcaCert, err := signCertificate(rootcaTemplate, rootcaPublicKey, rootcaTemplate, rootcaPrivateKey) - if err != nil { - return nil, err - } - caConfig := &TLSCertificateConfig{ - Certs: []*x509.Certificate{rootcaCert}, - Key: rootcaPrivateKey, - } - return caConfig, nil -} - -func MakeCAConfigForDuration(name string, caLifetime time.Duration, issuer *CA) (*TLSCertificateConfig, error) { - // Create CA cert - signerPublicKey, signerPrivateKey, publicKeyHash, err := newKeyPairWithHash() - if err != nil { - return nil, err - } - authorityKeyId := issuer.Config.Certs[0].SubjectKeyId - subjectKeyId := publicKeyHash - signerTemplate := newSigningCertificateTemplateForDuration(pkix.Name{CommonName: name}, caLifetime, time.Now, authorityKeyId, subjectKeyId) - signerCert, err := issuer.SignCertificate(signerTemplate, signerPublicKey) - if err != nil { - return nil, err - } - signerConfig := &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{signerCert}, issuer.Config.Certs...), - Key: signerPrivateKey, - } - return signerConfig, nil -} - -// EnsureSubCA returns a subCA signed by the `ca`, whether it was created -// (as opposed to pre-existing), and any error that might occur during the subCA -// creation. -// If serialFile is an empty string, a RandomSerialGenerator will be used. -func (ca *CA) EnsureSubCA(certFile, keyFile, serialFile, name string, lifetime time.Duration) (*CA, bool, error) { - if subCA, err := GetCA(certFile, keyFile, serialFile); err == nil { - return subCA, false, err - } - subCA, err := ca.MakeAndWriteSubCA(certFile, keyFile, serialFile, name, lifetime) - return subCA, true, err -} - -// MakeAndWriteSubCA returns a new sub-CA configuration. New cert/key pair is generated -// while using this function. -// If serialFile is an empty string, a RandomSerialGenerator will be used. -func (ca *CA) MakeAndWriteSubCA(certFile, keyFile, serialFile, name string, lifetime time.Duration) (*CA, error) { - klog.V(4).Infof("Generating sub-CA certificate in %s, key in %s, serial in %s", certFile, keyFile, serialFile) - - subCAConfig, err := MakeCAConfigForDuration(name, lifetime, ca) - if err != nil { - return nil, err - } - - if err := subCAConfig.WriteCertConfigFile(certFile, keyFile); err != nil { - return nil, err - } - - var serialGenerator SerialGenerator - if len(serialFile) > 0 { - // create / overwrite the serial file with a zero padded hex value (ending in a newline to have a valid file) - if err := os.WriteFile(serialFile, []byte("00\n"), 0644); err != nil { - return nil, err - } - - serialGenerator, err = NewSerialFileGenerator(serialFile) - if err != nil { - return nil, err - } - } else { - serialGenerator = &RandomSerialGenerator{} - } - - return &CA{ - Config: subCAConfig, - SerialGenerator: serialGenerator, - }, nil -} - -func (ca *CA) EnsureServerCert(certFile, keyFile string, hostnames sets.Set[string], lifetime time.Duration) (*TLSCertificateConfig, bool, error) { - certConfig, err := GetServerCert(certFile, keyFile, hostnames) - if err != nil { - certConfig, err = ca.MakeAndWriteServerCert(certFile, keyFile, hostnames, lifetime) - return certConfig, true, err - } - - return certConfig, false, nil -} - -func GetServerCert(certFile, keyFile string, hostnames sets.Set[string]) (*TLSCertificateConfig, error) { - server, err := GetTLSCertificateConfig(certFile, keyFile) - if err != nil { - return nil, err - } - - cert := server.Certs[0] - certNames := sets.New[string]() - for _, ip := range cert.IPAddresses { - certNames.Insert(ip.String()) - } - certNames.Insert(cert.DNSNames...) - if hostnames.Equal(certNames) { - klog.V(4).Infof("Found existing server certificate in %s", certFile) - return server, nil - } - - return nil, fmt.Errorf("existing server certificate in %s does not match required hostnames", certFile) -} - -func (ca *CA) MakeAndWriteServerCert(certFile, keyFile string, hostnames sets.Set[string], lifetime time.Duration) (*TLSCertificateConfig, error) { - klog.V(4).Infof("Generating server certificate in %s, key in %s", certFile, keyFile) - - server, err := ca.MakeServerCert(hostnames, lifetime) - if err != nil { - return nil, err - } - if err := server.WriteCertConfigFile(certFile, keyFile); err != nil { - return server, err - } - return server, nil -} - -// CertificateExtensionFunc is passed a certificate that it may extend, or return an error -// if the extension attempt failed. -type CertificateExtensionFunc func(*x509.Certificate) error - -func (ca *CA) MakeServerCert(hostnames sets.Set[string], lifetime time.Duration, fns ...CertificateExtensionFunc) (*TLSCertificateConfig, error) { - serverPublicKey, serverPrivateKey, publicKeyHash, _ := newKeyPairWithHash() - authorityKeyId := ca.Config.Certs[0].SubjectKeyId - subjectKeyId := publicKeyHash - serverTemplate := newServerCertificateTemplate(pkix.Name{CommonName: sets.List(hostnames)[0]}, sets.List(hostnames), lifetime, time.Now, authorityKeyId, subjectKeyId) - for _, fn := range fns { - if err := fn(serverTemplate); err != nil { - return nil, err - } - } - serverCrt, err := ca.SignCertificate(serverTemplate, serverPublicKey) - if err != nil { - return nil, err - } - server := &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{serverCrt}, ca.Config.Certs...), - Key: serverPrivateKey, - } - return server, nil -} - -func (ca *CA) MakeServerCertForDuration(hostnames sets.Set[string], lifetime time.Duration, fns ...CertificateExtensionFunc) (*TLSCertificateConfig, error) { - serverPublicKey, serverPrivateKey, publicKeyHash, _ := newKeyPairWithHash() - authorityKeyId := ca.Config.Certs[0].SubjectKeyId - subjectKeyId := publicKeyHash - serverTemplate := newServerCertificateTemplateForDuration(pkix.Name{CommonName: sets.List(hostnames)[0]}, sets.List(hostnames), lifetime, time.Now, authorityKeyId, subjectKeyId) - for _, fn := range fns { - if err := fn(serverTemplate); err != nil { - return nil, err - } - } - serverCrt, err := ca.SignCertificate(serverTemplate, serverPublicKey) - if err != nil { - return nil, err - } - server := &TLSCertificateConfig{ - Certs: append([]*x509.Certificate{serverCrt}, ca.Config.Certs...), - Key: serverPrivateKey, - } - return server, nil -} - -func (ca *CA) EnsureClientCertificate(certFile, keyFile string, u user.Info, lifetime time.Duration) (*TLSCertificateConfig, bool, error) { - certConfig, err := GetClientCertificate(certFile, keyFile, u) - if err != nil { - certConfig, err = ca.MakeClientCertificate(certFile, keyFile, u, lifetime) - return certConfig, true, err // true indicates we wrote the files. - } - return certConfig, false, nil -} - -func GetClientCertificate(certFile, keyFile string, u user.Info) (*TLSCertificateConfig, error) { - certConfig, err := GetTLSCertificateConfig(certFile, keyFile) - if err != nil { - return nil, err - } - - if subject := certConfig.Certs[0].Subject; subjectChanged(subject, UserToSubject(u)) { - return nil, fmt.Errorf("existing client certificate in %s was issued for a different Subject (%s)", - certFile, subject) - } - - return certConfig, nil -} - -func subjectChanged(existing, expected pkix.Name) bool { - sort.Strings(existing.Organization) - sort.Strings(expected.Organization) - - return existing.CommonName != expected.CommonName || - existing.SerialNumber != expected.SerialNumber || - !reflect.DeepEqual(existing.Organization, expected.Organization) -} - -func (ca *CA) MakeClientCertificate(certFile, keyFile string, u user.Info, lifetime time.Duration) (*TLSCertificateConfig, error) { - klog.V(4).Infof("Generating client cert in %s and key in %s", certFile, keyFile) - // ensure parent dirs - if err := os.MkdirAll(filepath.Dir(certFile), os.FileMode(0755)); err != nil { - return nil, err - } - if err := os.MkdirAll(filepath.Dir(keyFile), os.FileMode(0755)); err != nil { - return nil, err - } - - clientPublicKey, clientPrivateKey, _ := NewKeyPair() - clientTemplate := NewClientCertificateTemplate(UserToSubject(u), lifetime, time.Now) - clientCrt, err := ca.SignCertificate(clientTemplate, clientPublicKey) - if err != nil { - return nil, err - } - - certData, err := EncodeCertificates(clientCrt) - if err != nil { - return nil, err - } - keyData, err := EncodeKey(clientPrivateKey) - if err != nil { - return nil, err - } - - if err = os.WriteFile(certFile, certData, os.FileMode(0644)); err != nil { - return nil, err - } - if err = os.WriteFile(keyFile, keyData, os.FileMode(0600)); err != nil { - return nil, err - } - - return GetTLSCertificateConfig(certFile, keyFile) -} - -func (ca *CA) MakeClientCertificateForDuration(u user.Info, lifetime time.Duration) (*TLSCertificateConfig, error) { - clientPublicKey, clientPrivateKey, _ := NewKeyPair() - clientTemplate := NewClientCertificateTemplateForDuration(UserToSubject(u), lifetime, time.Now) - clientCrt, err := ca.SignCertificate(clientTemplate, clientPublicKey) - if err != nil { - return nil, err - } - - certData, err := EncodeCertificates(clientCrt) - if err != nil { - return nil, err - } - keyData, err := EncodeKey(clientPrivateKey) - if err != nil { - return nil, err - } - - return GetTLSCertificateConfigFromBytes(certData, keyData) -} - -type sortedForDER []string - -func (s sortedForDER) Len() int { - return len(s) -} -func (s sortedForDER) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} -func (s sortedForDER) Less(i, j int) bool { - l1 := len(s[i]) - l2 := len(s[j]) - if l1 == l2 { - return s[i] < s[j] - } - return l1 < l2 -} - -func UserToSubject(u user.Info) pkix.Name { - // Ok we are going to order groups in a peculiar way here to workaround a - // 2 bugs, 1 in golang (https://github.com/golang/go/issues/24254) which - // incorrectly encodes Multivalued RDNs and another in GNUTLS clients - // which are too picky (https://gitlab.com/gnutls/gnutls/issues/403) - // and try to "correct" this issue when reading client certs. - // - // This workaround should be killed once Golang's pkix module is fixed to - // generate a correct DER encoding. - // - // The workaround relies on the fact that the first octect that differs - // between the encoding of two group RDNs will end up being the encoded - // length which is directly related to the group name's length. So we'll - // sort such that shortest names come first. - ugroups := u.GetGroups() - groups := make([]string, len(ugroups)) - copy(groups, ugroups) - sort.Sort(sortedForDER(groups)) - - return pkix.Name{ - CommonName: u.GetName(), - SerialNumber: u.GetUID(), - Organization: groups, - } -} - -func (ca *CA) SignCertificate(template *x509.Certificate, requestKey crypto.PublicKey) (*x509.Certificate, error) { - // Increment and persist serial - serial, err := ca.SerialGenerator.Next(template) - if err != nil { - return nil, err - } - template.SerialNumber = big.NewInt(serial) - return signCertificate(template, requestKey, ca.Config.Certs[0], ca.Config.Key) -} - -func NewKeyPair() (crypto.PublicKey, crypto.PrivateKey, error) { - return newRSAKeyPair() -} - -func newKeyPairWithHash() (crypto.PublicKey, crypto.PrivateKey, []byte, error) { - publicKey, privateKey, err := newRSAKeyPair() - var publicKeyHash []byte - if err == nil { - hash := sha1.New() - hash.Write(publicKey.N.Bytes()) - publicKeyHash = hash.Sum(nil) - } - return publicKey, privateKey, publicKeyHash, err -} - -func newRSAKeyPair() (*rsa.PublicKey, *rsa.PrivateKey, error) { - privateKey, err := rsa.GenerateKey(rand.Reader, keyBits) - if err != nil { - return nil, nil, err - } - return &privateKey.PublicKey, privateKey, nil -} - -// Can be used for CA or intermediate signing certs -func newSigningCertificateTemplateForDuration(subject pkix.Name, caLifetime time.Duration, currentTime func() time.Time, authorityKeyId, subjectKeyId []byte) *x509.Certificate { - return &x509.Certificate{ - Subject: subject, - - SignatureAlgorithm: x509.SHA256WithRSA, - - NotBefore: currentTime().Add(-1 * time.Second), - NotAfter: currentTime().Add(caLifetime), - - // Specify a random serial number to avoid the same issuer+serial - // number referring to different certs in a chain of trust if the - // signing certificate is ever rotated. - SerialNumber: big.NewInt(randomSerialNumber()), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature | x509.KeyUsageCertSign, - BasicConstraintsValid: true, - IsCA: true, - - AuthorityKeyId: authorityKeyId, - SubjectKeyId: subjectKeyId, - } -} - -// Can be used for ListenAndServeTLS -func newServerCertificateTemplate(subject pkix.Name, hosts []string, lifetime time.Duration, currentTime func() time.Time, authorityKeyId, subjectKeyId []byte) *x509.Certificate { - if lifetime <= 0 { - lifetime = DefaultCertificateLifetimeDuration - fmt.Fprintf(os.Stderr, "Validity period of the certificate for %q is unset, resetting to %s!\n", subject.CommonName, lifetime.String()) - } - - if lifetime > DefaultCertificateLifetimeDuration { - warnAboutCertificateLifeTime(subject.CommonName, DefaultCertificateLifetimeDuration) - } - - return newServerCertificateTemplateForDuration(subject, hosts, lifetime, currentTime, authorityKeyId, subjectKeyId) -} - -// Can be used for ListenAndServeTLS -func newServerCertificateTemplateForDuration(subject pkix.Name, hosts []string, lifetime time.Duration, currentTime func() time.Time, authorityKeyId, subjectKeyId []byte) *x509.Certificate { - template := &x509.Certificate{ - Subject: subject, - - SignatureAlgorithm: x509.SHA256WithRSA, - - NotBefore: currentTime().Add(-1 * time.Second), - NotAfter: currentTime().Add(lifetime), - SerialNumber: big.NewInt(1), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageServerAuth}, - BasicConstraintsValid: true, - - AuthorityKeyId: authorityKeyId, - SubjectKeyId: subjectKeyId, - } - - template.IPAddresses, template.DNSNames = IPAddressesDNSNames(hosts) - - return template -} - -func IPAddressesDNSNames(hosts []string) ([]net.IP, []string) { - ips := []net.IP{} - dns := []string{} - for _, host := range hosts { - if ip := net.ParseIP(host); ip != nil { - ips = append(ips, ip) - } else { - dns = append(dns, host) - } - } - - // Include IP addresses as DNS subjectAltNames in the cert as well, for the sake of Python, Windows (< 10), and unnamed other libraries - // Ensure these technically invalid DNS subjectAltNames occur after the valid ones, to avoid triggering cert errors in Firefox - // See https://bugzilla.mozilla.org/show_bug.cgi?id=1148766 - for _, ip := range ips { - dns = append(dns, ip.String()) - } - - return ips, dns -} - -func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error) { - ok := false - certs := []*x509.Certificate{} - for len(pemCerts) > 0 { - var block *pem.Block - block, pemCerts = pem.Decode(pemCerts) - if block == nil { - break - } - if block.Type != "CERTIFICATE" || len(block.Headers) != 0 { - continue - } - - cert, err := x509.ParseCertificate(block.Bytes) - if err != nil { - return certs, err - } - - certs = append(certs, cert) - ok = true - } - - if !ok { - return certs, errors.New("could not read any certificates") - } - return certs, nil -} - -// Can be used as a certificate in http.Transport TLSClientConfig -func NewClientCertificateTemplate(subject pkix.Name, lifetime time.Duration, currentTime func() time.Time) *x509.Certificate { - if lifetime <= 0 { - lifetime = DefaultCertificateLifetimeDuration - fmt.Fprintf(os.Stderr, "Validity period of the certificate for %q is unset, resetting to %s!\n", subject.CommonName, lifetime.String()) - } - - if lifetime > DefaultCertificateLifetimeDuration { - warnAboutCertificateLifeTime(subject.CommonName, DefaultCertificateLifetimeDuration) - } - - return NewClientCertificateTemplateForDuration(subject, lifetime, currentTime) -} - -// Can be used as a certificate in http.Transport TLSClientConfig -func NewClientCertificateTemplateForDuration(subject pkix.Name, lifetime time.Duration, currentTime func() time.Time) *x509.Certificate { - return &x509.Certificate{ - Subject: subject, - - SignatureAlgorithm: x509.SHA256WithRSA, - - NotBefore: currentTime().Add(-1 * time.Second), - NotAfter: currentTime().Add(lifetime), - SerialNumber: big.NewInt(1), - - KeyUsage: x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature, - ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth}, - BasicConstraintsValid: true, - } -} - -func warnAboutCertificateLifeTime(name string, defaultLifetimeDuration time.Duration) { - defaultLifetimeInYears := defaultLifetimeDuration / 365 / 24 - fmt.Fprintf(os.Stderr, "WARNING: Validity period of the certificate for %q is greater than %d years!\n", name, defaultLifetimeInYears) - fmt.Fprintln(os.Stderr, "WARNING: By security reasons it is strongly recommended to change this period and make it smaller!") -} - -func signCertificate(template *x509.Certificate, requestKey crypto.PublicKey, issuer *x509.Certificate, issuerKey crypto.PrivateKey) (*x509.Certificate, error) { - derBytes, err := x509.CreateCertificate(rand.Reader, template, issuer, requestKey, issuerKey) - if err != nil { - return nil, err - } - certs, err := x509.ParseCertificates(derBytes) - if err != nil { - return nil, err - } - if len(certs) != 1 { - return nil, errors.New("expected a single certificate") - } - return certs[0], nil -} - -func EncodeCertificates(certs ...*x509.Certificate) ([]byte, error) { - b := bytes.Buffer{} - for _, cert := range certs { - if err := pem.Encode(&b, &pem.Block{Type: "CERTIFICATE", Bytes: cert.Raw}); err != nil { - return []byte{}, err - } - } - return b.Bytes(), nil -} -func EncodeKey(key crypto.PrivateKey) ([]byte, error) { - b := bytes.Buffer{} - switch key := key.(type) { - case *ecdsa.PrivateKey: - keyBytes, err := x509.MarshalECPrivateKey(key) - if err != nil { - return []byte{}, err - } - if err := pem.Encode(&b, &pem.Block{Type: "EC PRIVATE KEY", Bytes: keyBytes}); err != nil { - return b.Bytes(), err - } - case *rsa.PrivateKey: - if err := pem.Encode(&b, &pem.Block{Type: "RSA PRIVATE KEY", Bytes: x509.MarshalPKCS1PrivateKey(key)}); err != nil { - return []byte{}, err - } - default: - return []byte{}, errors.New("unrecognized key type") - - } - return b.Bytes(), nil -} - -func writeCertificates(f io.Writer, certs ...*x509.Certificate) error { - bytes, err := EncodeCertificates(certs...) - if err != nil { - return err - } - if _, err := f.Write(bytes); err != nil { - return err - } - - return nil -} -func writeKeyFile(f io.Writer, key crypto.PrivateKey) error { - bytes, err := EncodeKey(key) - if err != nil { - return err - } - if _, err := f.Write(bytes); err != nil { - return err - } - - return nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/keygen.go b/vendor/github.com/openshift/library-go/pkg/crypto/keygen.go deleted file mode 100644 index 96b755946..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/keygen.go +++ /dev/null @@ -1,118 +0,0 @@ -package crypto - -import ( - "crypto" - "crypto/ecdsa" - "crypto/elliptic" - "crypto/rand" - "crypto/rsa" - "crypto/sha256" - "crypto/x509" - "fmt" -) - -// KeyAlgorithm identifies the key generation algorithm. -type KeyAlgorithm string - -const ( - // RSAKeyAlgorithm specifies RSA key generation. - RSAKeyAlgorithm KeyAlgorithm = "RSA" - // ECDSAKeyAlgorithm specifies ECDSA key generation. - ECDSAKeyAlgorithm KeyAlgorithm = "ECDSA" -) - -// ECDSACurve identifies a named ECDSA curve. -type ECDSACurve string - -const ( - // P256 specifies the NIST P-256 curve (secp256r1), providing 128-bit security. - P256 ECDSACurve = "P256" - // P384 specifies the NIST P-384 curve (secp384r1), providing 192-bit security. - P384 ECDSACurve = "P384" - // P521 specifies the NIST P-521 curve (secp521r1), providing 256-bit security. - P521 ECDSACurve = "P521" -) - -// RSAKeyPairGenerator generates RSA key pairs. -type RSAKeyPairGenerator struct { - // Bits is the RSA key size in bits. Must be >= 2048. - Bits int -} - -func (g RSAKeyPairGenerator) GenerateKeyPair() (crypto.PublicKey, crypto.PrivateKey, error) { - bits := g.Bits - if bits == 0 { - bits = keyBits - } - privateKey, err := rsa.GenerateKey(rand.Reader, bits) - if err != nil { - return nil, nil, err - } - return &privateKey.PublicKey, privateKey, nil -} - -// ECDSAKeyPairGenerator generates ECDSA key pairs. -type ECDSAKeyPairGenerator struct { - // Curve is the named ECDSA curve. - Curve ECDSACurve -} - -func (g ECDSAKeyPairGenerator) GenerateKeyPair() (crypto.PublicKey, crypto.PrivateKey, error) { - curve, err := g.ellipticCurve() - if err != nil { - return nil, nil, err - } - privateKey, err := ecdsa.GenerateKey(curve, rand.Reader) - if err != nil { - return nil, nil, err - } - return &privateKey.PublicKey, privateKey, nil -} - -func (g ECDSAKeyPairGenerator) ellipticCurve() (elliptic.Curve, error) { - switch g.Curve { - case P256: - return elliptic.P256(), nil - case P384: - return elliptic.P384(), nil - case P521: - return elliptic.P521(), nil - default: - return nil, fmt.Errorf("unsupported ECDSA curve: %q", g.Curve) - } -} - -// KeyUsageForPublicKey returns the x509.KeyUsage flags appropriate for the -// given public key type. ECDSA keys use DigitalSignature only; RSA keys also -// include KeyEncipherment. -func KeyUsageForPublicKey(pub crypto.PublicKey) x509.KeyUsage { - switch pub.(type) { - case *ecdsa.PublicKey: - return x509.KeyUsageDigitalSignature - default: - return x509.KeyUsageKeyEncipherment | x509.KeyUsageDigitalSignature - } -} - -// SubjectKeyIDFromPublicKey computes a truncated SHA-256 hash suitable for -// use as a certificate SubjectKeyId from any supported public key type. -// This uses the first 160 bits of the SHA-256 hash per RFC 7093, consistent -// with the Go standard library since Go 1.25 (go.dev/issue/71746) and -// Let's Encrypt. Prior Go versions used SHA-1 which is not FIPS-compatible. -func SubjectKeyIDFromPublicKey(pub crypto.PublicKey) ([]byte, error) { - var rawBytes []byte - switch pub := pub.(type) { - case *rsa.PublicKey: - rawBytes = pub.N.Bytes() - case *ecdsa.PublicKey: - ecdhKey, err := pub.ECDH() - if err != nil { - return nil, fmt.Errorf("failed to convert ECDSA public key: %w", err) - } - rawBytes = ecdhKey.Bytes() - default: - return nil, fmt.Errorf("unsupported public key type: %T", pub) - } - hash := sha256.Sum256(rawBytes) - return hash[:20], nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/options.go b/vendor/github.com/openshift/library-go/pkg/crypto/options.go deleted file mode 100644 index 983b115d2..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/options.go +++ /dev/null @@ -1,49 +0,0 @@ -package crypto - -import ( - "crypto/x509/pkix" - "time" -) - -// CertificateOptions holds optional configuration collected from functional options. -type CertificateOptions struct { - lifetime time.Duration - subject *pkix.Name - extensionFns []CertificateExtensionFunc - signer *CA -} - -// CertificateOption is a functional option for certificate creation. -type CertificateOption func(*CertificateOptions) - -// WithLifetime sets the certificate lifetime duration. -func WithLifetime(d time.Duration) CertificateOption { - return func(o *CertificateOptions) { - o.lifetime = d - } -} - -// WithSubject overrides the certificate subject. For signing certificates, -// this overrides the default subject derived from the name parameter. -func WithSubject(s pkix.Name) CertificateOption { - return func(o *CertificateOptions) { - o.subject = &s - } -} - -// WithSigner specifies a CA to sign the certificate. When used with -// NewSigningCertificate, this creates an intermediate CA signed by the -// given CA instead of a self-signed root CA. -func WithSigner(ca *CA) CertificateOption { - return func(o *CertificateOptions) { - o.signer = ca - } -} - -// WithExtensions adds certificate extension functions that are called -// to modify the certificate template before signing. -func WithExtensions(fns ...CertificateExtensionFunc) CertificateOption { - return func(o *CertificateOptions) { - o.extensionFns = append(o.extensionFns, fns...) - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/rotation.go b/vendor/github.com/openshift/library-go/pkg/crypto/rotation.go deleted file mode 100644 index 0aa127037..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/rotation.go +++ /dev/null @@ -1,20 +0,0 @@ -package crypto - -import ( - "crypto/x509" - "time" -) - -// FilterExpiredCerts checks are all certificates in the bundle valid, i.e. they have not expired. -// The function returns new bundle with only valid certificates or error if no valid certificate is found. -func FilterExpiredCerts(certs ...*x509.Certificate) []*x509.Certificate { - currentTime := time.Now() - var validCerts []*x509.Certificate - for _, c := range certs { - if c.NotAfter.After(currentTime) { - validCerts = append(validCerts, c) - } - } - - return validCerts -} diff --git a/vendor/github.com/openshift/library-go/pkg/crypto/tls_adherence.go b/vendor/github.com/openshift/library-go/pkg/crypto/tls_adherence.go deleted file mode 100644 index ef0e1af51..000000000 --- a/vendor/github.com/openshift/library-go/pkg/crypto/tls_adherence.go +++ /dev/null @@ -1,23 +0,0 @@ -package crypto - -import ( - configv1 "github.com/openshift/api/config/v1" -) - -// ShouldHonorClusterTLSProfile returns true if the component should honor the -// cluster-wide TLS security profile settings from apiserver.config.openshift.io/cluster. -// -// When this returns true (StrictAllComponents mode), components must honor the -// cluster-wide TLS profile unless they have a component-specific TLS configuration -// that overrides it. -// -// Unknown enum values are treated as StrictAllComponents for forward compatibility -// and to default to the more secure behavior. -func ShouldHonorClusterTLSProfile(tlsAdherence configv1.TLSAdherencePolicy) bool { - switch tlsAdherence { - case configv1.TLSAdherencePolicyNoOpinion, configv1.TLSAdherencePolicyLegacyAdheringComponentsOnly: - return false - default: - return true - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/OWNERS b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/OWNERS deleted file mode 100644 index 4d4ce5ab9..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: - - stlaz -approvers: - - stlaz diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/annotations.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/annotations.go deleted file mode 100644 index 3c051c88e..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/annotations.go +++ /dev/null @@ -1,102 +0,0 @@ -package certrotation - -import ( - "github.com/google/go-cmp/cmp" - "github.com/openshift/api/annotations" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog/v2" -) - -const ( - // CertificateNotBeforeAnnotation contains the certificate expiration date in RFC3339 format. - CertificateNotBeforeAnnotation = "auth.openshift.io/certificate-not-before" - // CertificateNotAfterAnnotation contains the certificate expiration date in RFC3339 format. - CertificateNotAfterAnnotation = "auth.openshift.io/certificate-not-after" - // CertificateIssuer contains the common name of the certificate that signed another certificate. - CertificateIssuer = "auth.openshift.io/certificate-issuer" - // CertificateHostnames contains the hostnames used by a signer. - CertificateHostnames = "auth.openshift.io/certificate-hostnames" - // CertificateTestNameAnnotation is an e2e test name which verifies that TLS artifact is created and used correctly - CertificateTestNameAnnotation string = "certificates.openshift.io/test-name" - // CertificateAutoRegenerateAfterOfflineExpiryAnnotation contains a link to PR adding this annotation which verifies - // that TLS artifact is correctly regenerated after it has expired - CertificateAutoRegenerateAfterOfflineExpiryAnnotation string = "certificates.openshift.io/auto-regenerate-after-offline-expiry" - // CertificateRefreshPeriodAnnotation is the interval at which the certificate should be refreshed. - CertificateRefreshPeriodAnnotation string = "certificates.openshift.io/refresh-period" -) - -type AdditionalAnnotations struct { - // JiraComponent annotates tls artifacts so that owner could be easily found - JiraComponent string - // Description is a human-readable one sentence description of certificate purpose - Description string - // TestName is an e2e test name which verifies that TLS artifact is created and used correctly - TestName string - // AutoRegenerateAfterOfflineExpiry contains a link to PR which adds this annotation on the TLS artifact - AutoRegenerateAfterOfflineExpiry string - // NotBefore contains certificate the certificate creation date in RFC3339 format. - NotBefore string - // NotAfter contains certificate the certificate validity date in RFC3339 format. - NotAfter string - // RefreshPeriod contains the interval at which the certificate should be refreshed. - RefreshPeriod string -} - -func (a AdditionalAnnotations) EnsureTLSMetadataUpdate(meta *metav1.ObjectMeta) bool { - modified := false - if meta.Annotations == nil { - meta.Annotations = make(map[string]string) - } - if len(a.JiraComponent) > 0 && meta.Annotations[annotations.OpenShiftComponent] != a.JiraComponent { - diff := cmp.Diff(meta.Annotations[annotations.OpenShiftComponent], a.JiraComponent) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", annotations.OpenShiftComponent, meta.Namespace, meta.Name, diff) - meta.Annotations[annotations.OpenShiftComponent] = a.JiraComponent - modified = true - } - if len(a.Description) > 0 && meta.Annotations[annotations.OpenShiftDescription] != a.Description { - diff := cmp.Diff(meta.Annotations[annotations.OpenShiftDescription], a.Description) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", annotations.OpenShiftDescription, meta.Namespace, meta.Name, diff) - meta.Annotations[annotations.OpenShiftDescription] = a.Description - modified = true - } - if len(a.TestName) > 0 && meta.Annotations[CertificateTestNameAnnotation] != a.TestName { - diff := cmp.Diff(meta.Annotations[CertificateTestNameAnnotation], a.TestName) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", CertificateTestNameAnnotation, meta.Name, meta.Namespace, diff) - meta.Annotations[CertificateTestNameAnnotation] = a.TestName - modified = true - } - if len(a.AutoRegenerateAfterOfflineExpiry) > 0 && meta.Annotations[CertificateAutoRegenerateAfterOfflineExpiryAnnotation] != a.AutoRegenerateAfterOfflineExpiry { - diff := cmp.Diff(meta.Annotations[CertificateAutoRegenerateAfterOfflineExpiryAnnotation], a.AutoRegenerateAfterOfflineExpiry) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", CertificateAutoRegenerateAfterOfflineExpiryAnnotation, meta.Namespace, meta.Name, diff) - meta.Annotations[CertificateAutoRegenerateAfterOfflineExpiryAnnotation] = a.AutoRegenerateAfterOfflineExpiry - modified = true - } - if len(a.NotBefore) > 0 && meta.Annotations[CertificateNotBeforeAnnotation] != a.NotBefore { - diff := cmp.Diff(meta.Annotations[CertificateNotBeforeAnnotation], a.NotBefore) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", CertificateNotBeforeAnnotation, meta.Name, meta.Namespace, diff) - meta.Annotations[CertificateNotBeforeAnnotation] = a.NotBefore - modified = true - } - if len(a.NotAfter) > 0 && meta.Annotations[CertificateNotAfterAnnotation] != a.NotAfter { - diff := cmp.Diff(meta.Annotations[CertificateNotAfterAnnotation], a.NotAfter) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", CertificateNotAfterAnnotation, meta.Name, meta.Namespace, diff) - meta.Annotations[CertificateNotAfterAnnotation] = a.NotAfter - modified = true - } - if len(a.RefreshPeriod) > 0 && meta.Annotations[CertificateRefreshPeriodAnnotation] != a.RefreshPeriod { - diff := cmp.Diff(meta.Annotations[CertificateRefreshPeriodAnnotation], a.RefreshPeriod) - klog.V(2).Infof("Updating %q annotation for %s/%s, diff: %s", CertificateRefreshPeriodAnnotation, meta.Name, meta.Namespace, diff) - meta.Annotations[CertificateRefreshPeriodAnnotation] = a.RefreshPeriod - modified = true - } - return modified -} - -func NewTLSArtifactObjectMeta(name, namespace string, annotations AdditionalAnnotations) metav1.ObjectMeta { - meta := metav1.ObjectMeta{ - Namespace: namespace, - Name: name, - } - _ = annotations.EnsureTLSMetadataUpdate(&meta) - return meta -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/cabundle.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/cabundle.go deleted file mode 100644 index 447b1e0e3..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/cabundle.go +++ /dev/null @@ -1,178 +0,0 @@ -package certrotation - -import ( - "bytes" - "context" - "crypto/x509" - "fmt" - "reflect" - "sort" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1informers "k8s.io/client-go/informers/core/v1" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - corev1listers "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/util/cert" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/certs" - "github.com/openshift/library-go/pkg/crypto" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" -) - -// CABundleConfigMap maintains a CA bundle config map, by adding new CA certs coming from RotatedSigningCASecret, and by removing expired old ones. -type CABundleConfigMap struct { - // Namespace is the namespace of the ConfigMap to maintain. - Namespace string - // Name is the name of the ConfigMap to maintain. - Name string - // RefreshOnlyWhenExpired set to true means to ignore 80% of validity and the Refresh duration for rotation, - // but only rotate when the certificate expires. This is useful for auto-recovery when we want to enforce - // rotation on expiration only, but not interfere with the ordinary rotation controller. - RefreshOnlyWhenExpired bool - // Owner is an optional reference to add to the secret that this rotator creates. - Owner *metav1.OwnerReference - // AdditionalAnnotations is a collection of annotations set for the secret - AdditionalAnnotations AdditionalAnnotations - // Plumbing: - Informer corev1informers.ConfigMapInformer - Lister corev1listers.ConfigMapLister - Client corev1client.ConfigMapsGetter - EventRecorder events.Recorder -} - -func (c CABundleConfigMap) EnsureConfigMapCABundle(ctx context.Context, signingCertKeyPair *crypto.CA, signingCertKeyPairLocation string) ([]*x509.Certificate, error) { - // by this point we have current signing cert/key pair. We now need to make sure that the ca-bundle configmap has this cert and - // doesn't have any expired certs - updateRequired := false - creationRequired := false - - originalCABundleConfigMap, err := c.Lister.ConfigMaps(c.Namespace).Get(c.Name) - if err != nil && !apierrors.IsNotFound(err) { - return nil, err - } - caBundleConfigMap := originalCABundleConfigMap.DeepCopy() - if apierrors.IsNotFound(err) { - // create an empty one - caBundleConfigMap = &corev1.ConfigMap{ObjectMeta: NewTLSArtifactObjectMeta( - c.Name, - c.Namespace, - c.AdditionalAnnotations, - )} - creationRequired = true - } - - // run Update if metadata needs changing unless running in RefreshOnlyWhenExpired mode - if !c.RefreshOnlyWhenExpired { - needsOwnerUpdate := false - if c.Owner != nil { - needsOwnerUpdate = ensureOwnerReference(&caBundleConfigMap.ObjectMeta, c.Owner) - } - needsMetadataUpdate := c.AdditionalAnnotations.EnsureTLSMetadataUpdate(&caBundleConfigMap.ObjectMeta) - updateRequired = needsOwnerUpdate || needsMetadataUpdate - } - - updatedCerts, err := manageCABundleConfigMap(caBundleConfigMap, signingCertKeyPair.Config.Certs[0]) - if err != nil { - return nil, err - } - if originalCABundleConfigMap == nil || originalCABundleConfigMap.Data == nil || !equality.Semantic.DeepEqual(originalCABundleConfigMap.Data, caBundleConfigMap.Data) { - reason := "" - if creationRequired { - reason = "configmap doesn't exist" - } else if originalCABundleConfigMap.Data == nil { - reason = "configmap is empty" - } else if !equality.Semantic.DeepEqual(originalCABundleConfigMap.Data, caBundleConfigMap.Data) { - reason = fmt.Sprintf("signer update %s", signingCertKeyPairLocation) - } - c.EventRecorder.Eventf("CABundleUpdateRequired", "%q in %q requires a new cert: %s", c.Name, c.Namespace, reason) - LabelAsManagedConfigMap(caBundleConfigMap, CertificateTypeCABundle) - - updateRequired = true - } - - if creationRequired { - actualCABundleConfigMap, err := c.Client.ConfigMaps(c.Namespace).Create(ctx, caBundleConfigMap, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(c.EventRecorder, actualCABundleConfigMap, err) - if err != nil { - return nil, err - } - klog.V(2).Infof("Created ca-bundle.crt configmap %s/%s with:\n%s", certs.CertificateBundleToString(updatedCerts), caBundleConfigMap.Namespace, caBundleConfigMap.Name) - caBundleConfigMap = actualCABundleConfigMap - } else if updateRequired { - actualCABundleConfigMap, err := c.Client.ConfigMaps(c.Namespace).Update(ctx, caBundleConfigMap, metav1.UpdateOptions{}) - if apierrors.IsConflict(err) { - // ignore error if its attempting to update outdated version of the configmap - return nil, nil - } - resourcehelper.ReportUpdateEvent(c.EventRecorder, actualCABundleConfigMap, err) - if err != nil { - return nil, err - } - klog.V(2).Infof("Updated ca-bundle.crt configmap %s/%s with:\n%s", certs.CertificateBundleToString(updatedCerts), caBundleConfigMap.Namespace, caBundleConfigMap.Name) - caBundleConfigMap = actualCABundleConfigMap - } - - caBundle := caBundleConfigMap.Data["ca-bundle.crt"] - if len(caBundle) == 0 { - return nil, fmt.Errorf("configmap/%s -n%s missing ca-bundle.crt", caBundleConfigMap.Name, caBundleConfigMap.Namespace) - } - certificates, err := cert.ParseCertsPEM([]byte(caBundle)) - if err != nil { - return nil, err - } - - return certificates, nil -} - -// manageCABundleConfigMap adds the new certificate to the list of cabundles, eliminates duplicates, and prunes the list of expired -// certs to trust as signers -func manageCABundleConfigMap(caBundleConfigMap *corev1.ConfigMap, currentSigner *x509.Certificate) ([]*x509.Certificate, error) { - if caBundleConfigMap.Data == nil { - caBundleConfigMap.Data = map[string]string{} - } - - certificates := []*x509.Certificate{} - caBundle := caBundleConfigMap.Data["ca-bundle.crt"] - if len(caBundle) > 0 { - var err error - certificates, err = cert.ParseCertsPEM([]byte(caBundle)) - if err != nil { - return nil, err - } - } - certificates = append([]*x509.Certificate{currentSigner}, certificates...) - certificates = crypto.FilterExpiredCerts(certificates...) - - finalCertificates := []*x509.Certificate{} - // now check for duplicates. n^2, but super simple - for i := range certificates { - found := false - for j := range finalCertificates { - if reflect.DeepEqual(certificates[i].Raw, finalCertificates[j].Raw) { - found = true - break - } - } - if !found { - finalCertificates = append(finalCertificates, certificates[i]) - } - } - - // sorting ensures we don't continuously swap the certificates in the bundle, which might cause revision rollouts - sort.SliceStable(finalCertificates, func(i, j int) bool { - return bytes.Compare(finalCertificates[i].Raw, finalCertificates[j].Raw) < 0 - }) - caBytes, err := crypto.EncodeCertificates(finalCertificates...) - if err != nil { - return nil, err - } - - caBundleConfigMap.Data["ca-bundle.crt"] = string(caBytes) - - return finalCertificates, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/client_cert_rotation_controller.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/client_cert_rotation_controller.go deleted file mode 100644 index efb4d3c95..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/client_cert_rotation_controller.go +++ /dev/null @@ -1,185 +0,0 @@ -package certrotation - -import ( - "context" - "fmt" - "time" - - operatorv1 "github.com/openshift/api/operator/v1" - "github.com/openshift/library-go/pkg/controller/factory" - "github.com/openshift/library-go/pkg/operator/condition" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/v1helpers" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/util/wait" -) - -const ( - // RunOnceContextKey is a context value key that can be used to call the controller Sync() and make it only run the syncWorker once and report error. - RunOnceContextKey = "cert-rotation-controller.openshift.io/run-once" -) - -// StatusReporter knows how to report the status of cert rotation -type StatusReporter interface { - Report(ctx context.Context, controllerName string, syncErr error) (updated bool, updateErr error) -} - -var _ StatusReporter = (*StaticPodConditionStatusReporter)(nil) - -type StaticPodConditionStatusReporter struct { - // Plumbing: - OperatorClient v1helpers.StaticPodOperatorClient -} - -func (s *StaticPodConditionStatusReporter) Report(ctx context.Context, controllerName string, syncErr error) (bool, error) { - newCondition := operatorv1.OperatorCondition{ - Type: fmt.Sprintf(condition.CertRotationDegradedConditionTypeFmt, controllerName), - Status: operatorv1.ConditionFalse, - } - if syncErr != nil { - newCondition.Status = operatorv1.ConditionTrue - newCondition.Reason = "RotationError" - newCondition.Message = syncErr.Error() - } - _, updated, updateErr := v1helpers.UpdateStaticPodStatus(ctx, s.OperatorClient, v1helpers.UpdateStaticPodConditionFn(newCondition)) - return updated, updateErr -} - -// CertRotationController does: -// -// 1) continuously create a self-signed signing CA (via RotatedSigningCASecret) and store it in a secret. -// 2) maintain a CA bundle ConfigMap with all not yet expired CA certs. -// 3) continuously create a target cert and key signed by the latest signing CA and store it in a secret. -type CertRotationController struct { - // controller name - Name string - // RotatedSigningCASecret rotates a self-signed signing CA stored in a secret. - RotatedSigningCASecret RotatedSigningCASecret - // CABundleConfigMap maintains a CA bundle config map, by adding new CA certs coming from rotatedSigningCASecret, and by removing expired old ones. - CABundleConfigMap CABundleConfigMap - // RotatedSelfSignedCertKeySecret rotates a key and cert signed by a signing CA and stores it in a secret. - RotatedSelfSignedCertKeySecret RotatedSelfSignedCertKeySecret - - // Plumbing: - StatusReporter StatusReporter -} - -func NewCertRotationController( - name string, - rotatedSigningCASecret RotatedSigningCASecret, - caBundleConfigMap CABundleConfigMap, - rotatedSelfSignedCertKeySecret RotatedSelfSignedCertKeySecret, - recorder events.Recorder, - reporter StatusReporter, -) factory.Controller { - c := &CertRotationController{ - Name: name, - RotatedSigningCASecret: rotatedSigningCASecret, - CABundleConfigMap: caBundleConfigMap, - RotatedSelfSignedCertKeySecret: rotatedSelfSignedCertKeySecret, - StatusReporter: reporter, - } - - return factory.New(). - ResyncEvery(time.Minute). - WithSync(c.Sync). - WithFilteredEventsInformers( - func(obj interface{}) bool { - if cm, ok := obj.(*corev1.ConfigMap); ok { - return cm.Namespace == caBundleConfigMap.Namespace && cm.Name == caBundleConfigMap.Name - } - if secret, ok := obj.(*corev1.Secret); ok { - if secret.Namespace == rotatedSigningCASecret.Namespace && secret.Name == rotatedSigningCASecret.Name { - return true - } - if secret.Namespace == rotatedSelfSignedCertKeySecret.Namespace && secret.Name == rotatedSelfSignedCertKeySecret.Name { - return true - } - return false - } - return true - }, - rotatedSigningCASecret.Informer.Informer(), - caBundleConfigMap.Informer.Informer(), - rotatedSelfSignedCertKeySecret.Informer.Informer(), - ). - WithPostStartHooks( - c.targetCertRecheckerPostRunHook, - ). - ToController( - "CertRotationController", // don't change what is passed here unless you also remove the old FooDegraded condition - recorder.WithComponentSuffix("cert-rotation-controller").WithComponentSuffix(name), - ) -} - -func (c CertRotationController) Sync(ctx context.Context, syncCtx factory.SyncContext) error { - syncErr := c.SyncWorker(ctx) - - // running this function with RunOnceContextKey value context will make this "run-once" without updating status. - isRunOnce, ok := ctx.Value(RunOnceContextKey).(bool) - if ok && isRunOnce { - return syncErr - } - - updated, updateErr := c.StatusReporter.Report(ctx, c.Name, syncErr) - if updateErr != nil { - return updateErr - } - if updated && syncErr != nil { - syncCtx.Recorder().Warningf("RotationError", "%s", syncErr.Error()) - } - - return syncErr -} - -func (c CertRotationController) getSigningCertKeyPairLocation() string { - return fmt.Sprintf("%s/%s", c.RotatedSelfSignedCertKeySecret.Namespace, c.RotatedSelfSignedCertKeySecret.Name) -} - -func (c CertRotationController) SyncWorker(ctx context.Context) error { - signingCertKeyPair, _, err := c.RotatedSigningCASecret.EnsureSigningCertKeyPair(ctx) - if err != nil { - return err - } - // If no signingCertKeyPair returned due to update conflict or otherwise, return an error - if signingCertKeyPair == nil { - return fmt.Errorf("signingCertKeyPair is nil") - } - - cabundleCerts, err := c.CABundleConfigMap.EnsureConfigMapCABundle(ctx, signingCertKeyPair, c.getSigningCertKeyPairLocation()) - if err != nil { - return err - } - // If no ca bundle returned due to update conflict or otherwise, return an error - if cabundleCerts == nil { - return fmt.Errorf("cabundleCerts is nil") - } - - if _, err := c.RotatedSelfSignedCertKeySecret.EnsureTargetCertKeyPair(ctx, signingCertKeyPair, cabundleCerts); err != nil { - return err - } - - return nil -} - -func (c CertRotationController) targetCertRecheckerPostRunHook(ctx context.Context, syncCtx factory.SyncContext) error { - // If we have a need to force rechecking the cert, use this channel to do it. - refresher, ok := c.RotatedSelfSignedCertKeySecret.CertCreator.(TargetCertRechecker) - if !ok { - return nil - } - targetRefresh := refresher.RecheckChannel() - go wait.Until(func() { - for { - select { - case <-targetRefresh: - syncCtx.Queue().Add(factory.DefaultQueueKey) - case <-ctx.Done(): - return - } - } - }, time.Minute, ctx.Done()) - - <-ctx.Done() - return nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/config.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/config.go deleted file mode 100644 index af005ce85..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/config.go +++ /dev/null @@ -1,41 +0,0 @@ -package certrotation - -import ( - "context" - "fmt" - "time" - - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/kubernetes" -) - -// GetCertRotationScale The normal scale is based on a day. The value returned by this function -// is used to scale rotation durations instead of a day, so you can set it shorter. -func GetCertRotationScale(ctx context.Context, client kubernetes.Interface, namespace string) (time.Duration, error) { - certRotationScale := time.Duration(0) - err := wait.PollImmediate(time.Second, 1*time.Minute, func() (bool, error) { - certRotationConfig, err := client.CoreV1().ConfigMaps(namespace).Get(ctx, "unsupported-cert-rotation-config", metav1.GetOptions{}) - if err != nil { - if errors.IsNotFound(err) { - return true, nil - } - return false, err - } - if value, ok := certRotationConfig.Data["base"]; ok { - certRotationScale, err = time.ParseDuration(value) - if err != nil { - return false, err - } - } - return true, nil - }) - if err != nil { - return 0, err - } - if certRotationScale > 24*time.Hour { - return 0, fmt.Errorf("scale longer than 24h is not allowed: %v", certRotationScale) - } - return certRotationScale, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/label.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/label.go deleted file mode 100644 index 9c0df4ce5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/label.go +++ /dev/null @@ -1,61 +0,0 @@ -package certrotation - -import ( - "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" -) - -const ( - // ManagedCertificateTypeLabelName marks config map or secret as object that contains managed certificates. - // This groups all objects that store certs and allow easy query to get them all. - // The value of this label should be set to "true". - ManagedCertificateTypeLabelName = "auth.openshift.io/managed-certificate-type" -) - -type CertificateType string - -var ( - CertificateTypeCABundle CertificateType = "ca-bundle" - CertificateTypeSigner CertificateType = "signer" - CertificateTypeTarget CertificateType = "target" - CertificateTypeUnknown CertificateType = "unknown" -) - -// LabelAsManagedConfigMap add label indicating the given config map contains certificates -// that are managed. -func LabelAsManagedConfigMap(config *v1.ConfigMap, certificateType CertificateType) { - if config.Labels == nil { - config.Labels = map[string]string{} - } - config.Labels[ManagedCertificateTypeLabelName] = string(certificateType) -} - -// LabelAsManagedConfigMap add label indicating the given secret contains certificates -// that are managed. -func LabelAsManagedSecret(secret *v1.Secret, certificateType CertificateType) { - if secret.Labels == nil { - secret.Labels = map[string]string{} - } - secret.Labels[ManagedCertificateTypeLabelName] = string(certificateType) -} - -// CertificateTypeFromObject returns the CertificateType based on the annotations of the object. -func CertificateTypeFromObject(obj runtime.Object) (CertificateType, error) { - accesor, err := meta.Accessor(obj) - if err != nil { - return "", err - } - actualLabels := accesor.GetLabels() - if actualLabels == nil { - return CertificateTypeUnknown, nil - } - - t := CertificateType(actualLabels[ManagedCertificateTypeLabelName]) - switch t { - case CertificateTypeCABundle, CertificateTypeSigner, CertificateTypeTarget: - return t, nil - default: - return CertificateTypeUnknown, nil - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/metadata.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/metadata.go deleted file mode 100644 index 1764a6355..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/metadata.go +++ /dev/null @@ -1,36 +0,0 @@ -package certrotation - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -func ensureOwnerRefAndTLSAnnotations(secret *corev1.Secret, owner *metav1.OwnerReference, additionalAnnotations AdditionalAnnotations) bool { - needsMetadataUpdate := false - // no ownerReference set - if owner != nil { - needsMetadataUpdate = ensureOwnerReference(&secret.ObjectMeta, owner) - } - // ownership annotations not set - return additionalAnnotations.EnsureTLSMetadataUpdate(&secret.ObjectMeta) || needsMetadataUpdate -} - -func ensureSecretTLSTypeSet(secret *corev1.Secret) bool { - // Existing secret not found - no need to update metadata (will be done by needNewSigningCertKeyPair / NeedNewTargetCertKeyPair) - if len(secret.ResourceVersion) == 0 { - return false - } - - // convert outdated secret type (created by pre 4.7 installer) - if secret.Type != corev1.SecretTypeTLS { - secret.Type = corev1.SecretTypeTLS - // wipe secret contents if tls.crt and tls.key are missing - _, certExists := secret.Data[corev1.TLSCertKey] - _, keyExists := secret.Data[corev1.TLSPrivateKeyKey] - if !certExists || !keyExists { - secret.Data = map[string][]byte{} - } - return true - } - return false -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/signer.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/signer.go deleted file mode 100644 index 019cce7d5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/signer.go +++ /dev/null @@ -1,307 +0,0 @@ -package certrotation - -import ( - "bytes" - "context" - "fmt" - "time" - - "github.com/openshift/library-go/pkg/crypto" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/pki" - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1informers "k8s.io/client-go/informers/core/v1" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - corev1listers "k8s.io/client-go/listers/core/v1" - "k8s.io/klog/v2" -) - -// RotatedSigningCASecret rotates a self-signed signing CA stored in a secret. It creates a new one when -// - refresh duration is over -// - or 80% of validity is over (if RefreshOnlyWhenExpired is false) -// - or the CA is expired. -type RotatedSigningCASecret struct { - // Namespace is the namespace of the Secret. - Namespace string - // Name is the name of the Secret. - Name string - // Validity is the duration from time.Now() until the signing CA expires. If RefreshOnlyWhenExpired - // is false, the signing cert is rotated when 80% of validity is reached. - Validity time.Duration - // Refresh is the duration after signing CA creation when it is rotated at the latest. It is ignored - // if RefreshOnlyWhenExpired is true, or if Refresh > Validity. - Refresh time.Duration - // RefreshOnlyWhenExpired set to true means to ignore 80% of validity and the Refresh duration for rotation, - // but only rotate when the signing CA expires. This is useful for auto-recovery when we want to enforce - // rotation on expiration only, but not interfere with the ordinary rotation controller. - RefreshOnlyWhenExpired bool - - // Owner is an optional reference to add to the secret that this rotator creates. Use this when downstream - // consumers of the signer CA need to be aware of changes to the object. - // WARNING: be careful when using this option, as deletion of the owning object will cascade into deletion - // of the signer. If the lifetime of the owning object is not a superset of the lifetime in which the signer - // is used, early deletion will be catastrophic. - Owner *metav1.OwnerReference - - // AdditionalAnnotations is a collection of annotations set for the secret - AdditionalAnnotations AdditionalAnnotations - - // CertificateName is the logical name of this certificate for PKI profile resolution. - CertificateName string - - // PKIProfileProvider, when non-nil, enables ConfigurablePKI certificate - // key algorithm resolution. When nil, legacy certificate generation is used. - PKIProfileProvider pki.PKIProfileProvider - - // Plumbing: - Informer corev1informers.SecretInformer - Lister corev1listers.SecretLister - Client corev1client.SecretsGetter - EventRecorder events.Recorder -} - -// EnsureSigningCertKeyPair manages the entire lifecycle of a signer cert as a secret, from creation to continued rotation. -// It always returns the currently used CA pair, a bool indicating whether it was created/updated within this function call and an error. -func (c RotatedSigningCASecret) EnsureSigningCertKeyPair(ctx context.Context) (*crypto.CA, bool, error) { - creationRequired := false - updateRequired := false - originalSigningCertKeyPairSecret, err := c.Lister.Secrets(c.Namespace).Get(c.Name) - if err != nil && !apierrors.IsNotFound(err) { - return nil, false, err - } - signingCertKeyPairSecret := originalSigningCertKeyPairSecret.DeepCopy() - if apierrors.IsNotFound(err) { - // create an empty one - signingCertKeyPairSecret = &corev1.Secret{ - ObjectMeta: NewTLSArtifactObjectMeta( - c.Name, - c.Namespace, - c.AdditionalAnnotations, - ), - Type: corev1.SecretTypeTLS, - } - creationRequired = true - } - - // run Update if metadata needs changing unless we're in RefreshOnlyWhenExpired mode - if !c.RefreshOnlyWhenExpired { - needsMetadataUpdate := ensureOwnerRefAndTLSAnnotations(signingCertKeyPairSecret, c.Owner, c.AdditionalAnnotations) - needsTypeChange := ensureSecretTLSTypeSet(signingCertKeyPairSecret) - updateRequired = needsMetadataUpdate || needsTypeChange - } - - // run Update if signer content needs changing - signerUpdated := false - if needed, reason := c.needNewSigningCertKeyPair(signingCertKeyPairSecret); needed || creationRequired { - if creationRequired { - reason = "secret doesn't exist" - } - c.EventRecorder.Eventf("SignerUpdateRequired", "%q in %q requires a new signing cert/key pair: %v", c.Name, c.Namespace, reason) - if err = c.setSigningCertKeyPairSecretAndTLSAnnotations(signingCertKeyPairSecret); err != nil { - return nil, false, err - } - - LabelAsManagedSecret(signingCertKeyPairSecret, CertificateTypeSigner) - - updateRequired = true - signerUpdated = true - } - - if creationRequired { - actualSigningCertKeyPairSecret, err := c.Client.Secrets(c.Namespace).Create(ctx, signingCertKeyPairSecret, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(c.EventRecorder, actualSigningCertKeyPairSecret, err) - if err != nil { - return nil, false, err - } - klog.V(2).Infof("Created secret %s/%s", actualSigningCertKeyPairSecret.Namespace, actualSigningCertKeyPairSecret.Name) - signingCertKeyPairSecret = actualSigningCertKeyPairSecret - } else if updateRequired { - actualSigningCertKeyPairSecret, err := c.Client.Secrets(c.Namespace).Update(ctx, signingCertKeyPairSecret, metav1.UpdateOptions{}) - if apierrors.IsConflict(err) { - // ignore error if its attempting to update outdated version of the secret - return nil, false, nil - } - resourcehelper.ReportUpdateEvent(c.EventRecorder, actualSigningCertKeyPairSecret, err) - if err != nil { - return nil, false, err - } - klog.V(2).Infof("Updated secret %s/%s", actualSigningCertKeyPairSecret.Namespace, actualSigningCertKeyPairSecret.Name) - signingCertKeyPairSecret = actualSigningCertKeyPairSecret - } - - // at this point, the secret has the correct signer, so we should read that signer to be able to sign - signingCertKeyPair, err := crypto.GetCAFromBytes(signingCertKeyPairSecret.Data["tls.crt"], signingCertKeyPairSecret.Data["tls.key"]) - if err != nil { - return nil, signerUpdated, err - } - - return signingCertKeyPair, signerUpdated, nil -} - -// ensureOwnerReference adds the owner to the list of owner references in meta, if necessary -func ensureOwnerReference(meta *metav1.ObjectMeta, owner *metav1.OwnerReference) bool { - var found bool - for _, ref := range meta.OwnerReferences { - if ref == *owner { - found = true - break - } - } - if !found { - meta.OwnerReferences = append(meta.OwnerReferences, *owner) - return true - } - return false -} - -func (c RotatedSigningCASecret) needNewSigningCertKeyPair(secret *corev1.Secret) (bool, string) { - annotations := secret.Annotations - notBefore, notAfter, reason := getValidityFromAnnotations(annotations) - if len(reason) > 0 { - return true, reason - } - - if time.Now().After(notAfter) { - return true, "already expired" - } - - if c.RefreshOnlyWhenExpired { - return false, "" - } - - validity := notAfter.Sub(notBefore) - at80Percent := notAfter.Add(-validity / 5) - if time.Now().After(at80Percent) { - return true, fmt.Sprintf("past refresh time (80%% of validity): %v", at80Percent) - } - - developerSpecifiedRefresh := notBefore.Add(c.Refresh) - if time.Now().After(developerSpecifiedRefresh) { - return true, fmt.Sprintf("past its refresh time %v", developerSpecifiedRefresh) - } - - return false, "" -} - -func getValidityFromAnnotations(annotations map[string]string) (notBefore time.Time, notAfter time.Time, reason string) { - notAfterString := annotations[CertificateNotAfterAnnotation] - if len(notAfterString) == 0 { - return notBefore, notAfter, "missing notAfter" - } - notAfter, err := time.Parse(time.RFC3339, notAfterString) - if err != nil { - return notBefore, notAfter, fmt.Sprintf("bad expiry: %q", notAfterString) - } - notBeforeString := annotations[CertificateNotBeforeAnnotation] - if len(notBeforeString) == 0 { - return notBefore, notAfter, "missing notBefore" - } - notBefore, err = time.Parse(time.RFC3339, notBeforeString) - if err != nil { - return notBefore, notAfter, fmt.Sprintf("bad expiry: %q", notBeforeString) - } - - return notBefore, notAfter, "" -} - -func (c RotatedSigningCASecret) resolveKeyPairGenerator() (crypto.KeyPairGenerator, error) { - return resolveKeyPairGeneratorWithFallback(c.PKIProfileProvider, pki.CertificateTypeSigner, c.CertificateName) -} - -// resolveKeyPairGeneratorWithFallback resolves the key pair generator from the -// PKI profile provider. Returns nil for Unmanaged mode (no key override). -// -// TODO(sanchezl): Remove the fallback to DefaultPKIProfile() once installer -// support for the PKI resource is in place. Until then, the PKI resource may -// not exist in TechPreview clusters. Once removed, callers can use -// pki.ResolveCertificateConfig directly. -func resolveKeyPairGeneratorWithFallback(provider pki.PKIProfileProvider, certType pki.CertificateType, name string) (crypto.KeyPairGenerator, error) { - cfg, err := pki.ResolveCertificateConfig(provider, certType, name) - if err != nil { - klog.Warningf("Failed to resolve PKI config for %s %q, falling back to default profile: %v", certType, name, err) - defaultProfile := pki.DefaultPKIProfile() - cfg, err = pki.ResolveCertificateConfig(pki.NewStaticPKIProfileProvider(&defaultProfile), certType, name) - if err != nil { - return nil, err - } - } - if cfg == nil { - return nil, nil - } - return cfg.Key, nil -} - -// setSigningCertKeyPairSecretAndTLSAnnotations generates a new signing certificate and key pair, -// stores them in the specified secret, and adds predefined TLS annotations to that secret. -func (c RotatedSigningCASecret) setSigningCertKeyPairSecretAndTLSAnnotations(signingCertKeyPairSecret *corev1.Secret) error { - ca, err := c.setSigningCertKeyPairSecret(signingCertKeyPairSecret) - if err != nil { - return err - } - - c.setTLSAnnotationsOnSigningCertKeyPairSecret(signingCertKeyPairSecret, ca) - return nil -} - -// setSigningCertKeyPairSecret creates a new signing cert/key pair and sets them in the secret. -func (c RotatedSigningCASecret) setSigningCertKeyPairSecret(signingCertKeyPairSecret *corev1.Secret) (*crypto.TLSCertificateConfig, error) { - signerName := fmt.Sprintf("%s_%s@%d", signingCertKeyPairSecret.Namespace, signingCertKeyPairSecret.Name, time.Now().Unix()) - - var ca *crypto.TLSCertificateConfig - var err error - if c.PKIProfileProvider != nil { - keyGen, err := c.resolveKeyPairGenerator() - if err != nil { - return nil, err - } - if keyGen != nil { - ca, err = crypto.NewSigningCertificate(signerName, keyGen, crypto.WithLifetime(c.Validity)) - if err != nil { - return nil, err - } - } - // nil keyGen means Unmanaged: fall through to legacy cert generation - } - if ca == nil { - ca, err = crypto.MakeSelfSignedCAConfigForDuration(signerName, c.Validity) - } - if err != nil { - return nil, err - } - - certBytes := &bytes.Buffer{} - keyBytes := &bytes.Buffer{} - if err = ca.WriteCertConfig(certBytes, keyBytes); err != nil { - return nil, err - } - - if signingCertKeyPairSecret.Annotations == nil { - signingCertKeyPairSecret.Annotations = map[string]string{} - } - if signingCertKeyPairSecret.Data == nil { - signingCertKeyPairSecret.Data = map[string][]byte{} - } - signingCertKeyPairSecret.Data["tls.crt"] = certBytes.Bytes() - signingCertKeyPairSecret.Data["tls.key"] = keyBytes.Bytes() - return ca, nil -} - -// setTLSAnnotationsOnSigningCertKeyPairSecret applies predefined TLS annotations to the given secret. -// -// This function does not perform nil checks on its parameters and assumes that the -// secret's Annotations field has already been initialized. -// -// These assumptions are safe because this function is only called after the secret -// has been initialized in setSigningCertKeyPairSecret. -func (c RotatedSigningCASecret) setTLSAnnotationsOnSigningCertKeyPairSecret(signingCertKeyPairSecret *corev1.Secret, ca *crypto.TLSCertificateConfig) { - signingCertKeyPairSecret.Annotations[CertificateIssuer] = ca.Certs[0].Issuer.CommonName - - tlsAnnotations := c.AdditionalAnnotations - tlsAnnotations.NotBefore = ca.Certs[0].NotBefore.Format(time.RFC3339) - tlsAnnotations.NotAfter = ca.Certs[0].NotAfter.Format(time.RFC3339) - tlsAnnotations.RefreshPeriod = c.Refresh.String() - _ = tlsAnnotations.EnsureTLSMetadataUpdate(&signingCertKeyPairSecret.ObjectMeta) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/target.go b/vendor/github.com/openshift/library-go/pkg/operator/certrotation/target.go deleted file mode 100644 index d1c0a59ee..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/certrotation/target.go +++ /dev/null @@ -1,506 +0,0 @@ -package certrotation - -import ( - "context" - "crypto/x509" - "fmt" - "strings" - "time" - - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/authentication/user" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/certs" - "github.com/openshift/library-go/pkg/crypto" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/pki" - corev1informers "k8s.io/client-go/informers/core/v1" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - corev1listers "k8s.io/client-go/listers/core/v1" -) - -// RotatedSelfSignedCertKeySecret rotates a key and cert signed by a signing CA and stores it in a secret. -// -// It creates a new one when -// - refresh duration is over -// - or 80% of validity is over (if RefreshOnlyWhenExpired is false) -// - or the cert is expired. -// - or the signing CA changes. -type RotatedSelfSignedCertKeySecret struct { - // Namespace is the namespace of the Secret. - Namespace string - // Name is the name of the Secret. - Name string - // Validity is the duration from time.Now() until the certificate expires. If RefreshOnlyWhenExpired - // is false, the key and certificate is rotated when 80% of validity is reached. - Validity time.Duration - // Refresh is the duration after certificate creation when it is rotated at the latest. It is ignored - // if RefreshOnlyWhenExpired is true, or if Refresh > Validity. - // Refresh is ignored until the signing CA at least 10% in its life-time to ensure it is deployed - // through-out the cluster. - Refresh time.Duration - // RefreshOnlyWhenExpired allows rotating only certs that are already expired. (for autorecovery) - // If false (regular flow) it rotates at the refresh interval but no later then 4/5 of the cert lifetime. - - // RefreshOnlyWhenExpired set to true means to ignore 80% of validity and the Refresh duration for rotation, - // but only rotate when the certificate expires. This is useful for auto-recovery when we want to enforce - // rotation on expiration only, but not interfere with the ordinary rotation controller. - RefreshOnlyWhenExpired bool - - // Owner is an optional reference to add to the secret that this rotator creates. Use this when downstream - // consumers of the certificate need to be aware of changes to the object. - // WARNING: be careful when using this option, as deletion of the owning object will cascade into deletion - // of the certificate. If the lifetime of the owning object is not a superset of the lifetime in which the - // certificate is used, early deletion will be catastrophic. - Owner *metav1.OwnerReference - - // AdditionalAnnotations is a collection of annotations set for the secret - AdditionalAnnotations AdditionalAnnotations - - // CertCreator does the actual cert generation. - CertCreator TargetCertCreator - - // CertificateName is the logical name of this certificate for PKI profile resolution. - CertificateName string - - // PKIProfileProvider, when non-nil, enables ConfigurablePKI certificate - // key algorithm resolution. When nil, legacy certificate generation is used. - PKIProfileProvider pki.PKIProfileProvider - - // Plumbing: - Informer corev1informers.SecretInformer - Lister corev1listers.SecretLister - Client corev1client.SecretsGetter - EventRecorder events.Recorder -} - -type TargetCertCreator interface { - // NewCertificate creates a new key-cert pair with the given signer. If keyGen - // is non-nil, it is used to generate the key pair; otherwise legacy defaults are used. - NewCertificate(signer *crypto.CA, validity time.Duration, keyGen crypto.KeyPairGenerator) (*crypto.TLSCertificateConfig, error) - // NeedNewTargetCertKeyPair decides whether a new cert-key pair is needed. It returns a non-empty reason if it is the case. - NeedNewTargetCertKeyPair(currentCertSecret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, creationRequired bool) string - // SetAnnotations gives an option to override or set additional annotations - SetAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string - // CertificateType returns the category of certificate this creator produces. - CertificateType() pki.CertificateType -} - -// TargetCertRechecker is an optional interface to be implemented by the TargetCertCreator to enforce -// a controller run. -type TargetCertRechecker interface { - RecheckChannel() <-chan struct{} -} - -func (c RotatedSelfSignedCertKeySecret) EnsureTargetCertKeyPair(ctx context.Context, signingCertKeyPair *crypto.CA, caBundleCerts []*x509.Certificate) (*corev1.Secret, error) { - // at this point our trust bundle has been updated. We don't know for sure that consumers have updated, but that's why we have a second - // validity percentage. We always check to see if we need to sign. Often we are signing with an old key or we have no target - // and need to mint one - // TODO do the cross signing thing, but this shows the API consumers want and a very simple impl. - - creationRequired := false - updateRequired := false - originalTargetCertKeyPairSecret, err := c.Lister.Secrets(c.Namespace).Get(c.Name) - if err != nil && !apierrors.IsNotFound(err) { - return nil, err - } - targetCertKeyPairSecret := originalTargetCertKeyPairSecret.DeepCopy() - if apierrors.IsNotFound(err) { - // create an empty one - targetCertKeyPairSecret = &corev1.Secret{ - ObjectMeta: NewTLSArtifactObjectMeta( - c.Name, - c.Namespace, - c.AdditionalAnnotations, - ), - Type: corev1.SecretTypeTLS, - } - creationRequired = true - } - - // run Update if metadata needs changing unless we're in RefreshOnlyWhenExpired mode - if !c.RefreshOnlyWhenExpired { - needsMetadataUpdate := ensureOwnerRefAndTLSAnnotations(targetCertKeyPairSecret, c.Owner, c.AdditionalAnnotations) - needsTypeChange := ensureSecretTLSTypeSet(targetCertKeyPairSecret) - updateRequired = needsMetadataUpdate || needsTypeChange - } - - if reason := c.CertCreator.NeedNewTargetCertKeyPair(targetCertKeyPairSecret, signingCertKeyPair, caBundleCerts, c.Refresh, c.RefreshOnlyWhenExpired, creationRequired); len(reason) > 0 { - c.EventRecorder.Eventf("TargetUpdateRequired", "%q in %q requires a new target cert/key pair: %v", c.Name, c.Namespace, reason) - if err = c.setTargetCertKeyPairSecretAndTLSAnnotations(targetCertKeyPairSecret, signingCertKeyPair); err != nil { - return nil, err - } - - LabelAsManagedSecret(targetCertKeyPairSecret, CertificateTypeTarget) - - updateRequired = true - } - if creationRequired { - actualTargetCertKeyPairSecret, err := c.Client.Secrets(c.Namespace).Create(ctx, targetCertKeyPairSecret, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(c.EventRecorder, actualTargetCertKeyPairSecret, err) - if err != nil { - return nil, err - } - klog.V(2).Infof("Created secret %s/%s", actualTargetCertKeyPairSecret.Namespace, actualTargetCertKeyPairSecret.Name) - targetCertKeyPairSecret = actualTargetCertKeyPairSecret - } else if updateRequired { - actualTargetCertKeyPairSecret, err := c.Client.Secrets(c.Namespace).Update(ctx, targetCertKeyPairSecret, metav1.UpdateOptions{}) - if apierrors.IsConflict(err) { - // ignore error if its attempting to update outdated version of the secret - return nil, nil - } - resourcehelper.ReportUpdateEvent(c.EventRecorder, actualTargetCertKeyPairSecret, err) - if err != nil { - return nil, err - } - klog.V(2).Infof("Updated secret %s/%s", actualTargetCertKeyPairSecret.Namespace, actualTargetCertKeyPairSecret.Name) - targetCertKeyPairSecret = actualTargetCertKeyPairSecret - } - - return targetCertKeyPairSecret, nil -} - -func needNewTargetCertKeyPair(secret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, creationRequired bool) string { - if creationRequired { - return "secret doesn't exist" - } - - annotations := secret.Annotations - if reason := needNewTargetCertKeyPairForTime(annotations, signer, refresh, refreshOnlyWhenExpired); len(reason) > 0 { - return reason - } - - // Exit early if we're only refreshing when expired and the certificate does not need an update - if refreshOnlyWhenExpired { - return "" - } - - // check the signer common name against all the common names in our ca bundle so we don't refresh early - signerCommonName := annotations[CertificateIssuer] - if len(signerCommonName) == 0 { - return "missing issuer name" - } - for _, caCert := range caBundleCerts { - if signerCommonName == caCert.Subject.CommonName { - return "" - } - } - - return fmt.Sprintf("issuer %q, not in ca bundle:\n%s", signerCommonName, certs.CertificateBundleToString(caBundleCerts)) -} - -// needNewTargetCertKeyPairForTime returns true when -// 1. when notAfter or notBefore is missing in the annotation -// 2. when notAfter or notBefore is malformed -// 3. when now is after the notAfter -// 4. when now is after notAfter+refresh AND the signer has been valid -// for more than 5% of the "extra" time we renew the target -// -// in other words, we rotate if -// -// our old CA is gone from the bundle (then we are pretty late to the renewal party) -// or the cert expired (then we are also pretty late) -// or we are over the renewal percentage of the validity, but only if the new CA at least 10% into its age. -// Maybe worth a go doc. -// -// So in general we need to see a signing CA at least aged 10% within 1-percentage of the cert validity. -// -// Hence, if the CAs are rotated too fast (like CA percentage around 10% or smaller), we will not hit the time to make use of the CA. Or if the cert renewal percentage is at 90%, there is not much time either. -// -// So with a cert percentage of 75% and equally long CA and cert validities at the worst case we start at 85% of the cert to renew, trying again every minute. -func needNewTargetCertKeyPairForTime(annotations map[string]string, signer *crypto.CA, refresh time.Duration, refreshOnlyWhenExpired bool) string { - notBefore, notAfter, reason := getValidityFromAnnotations(annotations) - if len(reason) > 0 { - return reason - } - - // Is cert expired? - if time.Now().After(notAfter) { - return "already expired" - } - - if refreshOnlyWhenExpired { - return "" - } - - // Are we at 80% of validity? - validity := notAfter.Sub(notBefore) - at80Percent := notAfter.Add(-validity / 5) - if time.Now().After(at80Percent) { - return fmt.Sprintf("past refresh time (80%% of validity): %v", at80Percent) - } - - // If Certificate is past its refresh time, we may have action to take. We only do this if the signer is old enough. - refreshTime := notBefore.Add(refresh) - if time.Now().After(refreshTime) { - // make sure the signer has been valid for more than 10% of the target's refresh time. - timeToWaitForTrustRotation := refresh / 10 - if time.Now().After(signer.Config.Certs[0].NotBefore.Add(time.Duration(timeToWaitForTrustRotation))) { - return fmt.Sprintf("past its refresh time %v", refreshTime) - } - } - - return "" -} - -// setTargetCertKeyPairSecretAndTLSAnnotations generates a new cert/key pair, -// stores them in the specified secret, and adds predefined TLS annotations to that secret. -func (c RotatedSelfSignedCertKeySecret) setTargetCertKeyPairSecretAndTLSAnnotations(targetCertKeyPairSecret *corev1.Secret, signer *crypto.CA) error { - certKeyPair, err := c.setTargetCertKeyPairSecret(targetCertKeyPairSecret, signer) - if err != nil { - return err - } - - c.setTLSAnnotationsOnTargetCertKeyPairSecret(targetCertKeyPairSecret, certKeyPair) - return nil -} - -// setTargetCertKeyPairSecret creates a new cert/key pair and sets them in the secret. Only one of client, serving, or signer rotation may be specified. -// TODO refactor with an interface for actually signing and move the one-of check higher in the stack. -func (c RotatedSelfSignedCertKeySecret) setTargetCertKeyPairSecret(targetCertKeyPairSecret *corev1.Secret, signer *crypto.CA) (*crypto.TLSCertificateConfig, error) { - if targetCertKeyPairSecret.Annotations == nil { - targetCertKeyPairSecret.Annotations = map[string]string{} - } - if targetCertKeyPairSecret.Data == nil { - targetCertKeyPairSecret.Data = map[string][]byte{} - } - - // our annotation is based on our cert validity, so we want to make sure that we don't specify something past our signer - targetValidity := c.Validity - remainingSignerValidity := signer.Config.Certs[0].NotAfter.Sub(time.Now()) - if remainingSignerValidity < targetValidity { - targetValidity = remainingSignerValidity - } - - var keyGen crypto.KeyPairGenerator - if c.PKIProfileProvider != nil { - var err error - keyGen, err = c.resolveKeyPairGenerator() - if err != nil { - return nil, err - } - } - - certKeyPair, err := c.CertCreator.NewCertificate(signer, targetValidity, keyGen) - if err != nil { - return nil, err - } - - targetCertKeyPairSecret.Data["tls.crt"], targetCertKeyPairSecret.Data["tls.key"], err = certKeyPair.GetPEMBytes() - return certKeyPair, err -} - -// setTLSAnnotationsOnTargetCertKeyPairSecret applies predefined TLS annotations to the given secret. -// -// This function does not perform nil checks on its parameters and assumes that the -// secret's Annotations field has already been initialized. -// -// These assumptions are safe because this function is only called after the secret -// has been initialized in setTargetCertKeyPairSecret. -func (c RotatedSelfSignedCertKeySecret) setTLSAnnotationsOnTargetCertKeyPairSecret(targetCertKeyPairSecret *corev1.Secret, certKeyPair *crypto.TLSCertificateConfig) { - targetCertKeyPairSecret.Annotations[CertificateIssuer] = certKeyPair.Certs[0].Issuer.CommonName - - tlsAnnotations := c.AdditionalAnnotations - tlsAnnotations.NotBefore = certKeyPair.Certs[0].NotBefore.Format(time.RFC3339) - tlsAnnotations.NotAfter = certKeyPair.Certs[0].NotAfter.Format(time.RFC3339) - tlsAnnotations.RefreshPeriod = c.Refresh.String() - _ = tlsAnnotations.EnsureTLSMetadataUpdate(&targetCertKeyPairSecret.ObjectMeta) - - c.CertCreator.SetAnnotations(certKeyPair, targetCertKeyPairSecret.Annotations) -} - -func (c RotatedSelfSignedCertKeySecret) resolveKeyPairGenerator() (crypto.KeyPairGenerator, error) { - return resolveKeyPairGeneratorWithFallback(c.PKIProfileProvider, c.CertCreator.CertificateType(), c.CertificateName) -} - -type ClientRotation struct { - UserInfo user.Info -} - -func (r *ClientRotation) CertificateType() pki.CertificateType { - return pki.CertificateTypeClient -} - -func (r *ClientRotation) NewCertificate(signer *crypto.CA, validity time.Duration, keyGen crypto.KeyPairGenerator) (*crypto.TLSCertificateConfig, error) { - if keyGen == nil { - return signer.MakeClientCertificateForDuration(r.UserInfo, validity) - } - return signer.NewClientCertificate(r.UserInfo, keyGen, crypto.WithLifetime(validity)) -} - -func (r *ClientRotation) NeedNewTargetCertKeyPair(currentCertSecret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, exists bool) string { - return needNewTargetCertKeyPair(currentCertSecret, signer, caBundleCerts, refresh, refreshOnlyWhenExpired, exists) -} - -func (r *ClientRotation) SetAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string { - return annotations -} - -type ServingRotation struct { - Hostnames ServingHostnameFunc - CertificateExtensionFn []crypto.CertificateExtensionFunc - HostnamesChanged <-chan struct{} -} - -func (r *ServingRotation) CertificateType() pki.CertificateType { - return pki.CertificateTypeServing -} - -func (r *ServingRotation) NewCertificate(signer *crypto.CA, validity time.Duration, keyGen crypto.KeyPairGenerator) (*crypto.TLSCertificateConfig, error) { - hostnames := r.Hostnames() - if len(hostnames) == 0 { - return nil, fmt.Errorf("no hostnames set") - } - if keyGen == nil { - return signer.MakeServerCertForDuration(sets.New(hostnames...), validity, r.CertificateExtensionFn...) - } - return signer.NewServerCertificate(sets.New(hostnames...), keyGen, - crypto.WithLifetime(validity), - crypto.WithExtensions(r.CertificateExtensionFn...), - ) -} - -func (r *ServingRotation) RecheckChannel() <-chan struct{} { - return r.HostnamesChanged -} - -func (r *ServingRotation) NeedNewTargetCertKeyPair(currentCertSecret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, creationRequired bool) string { - reason := needNewTargetCertKeyPair(currentCertSecret, signer, caBundleCerts, refresh, refreshOnlyWhenExpired, creationRequired) - if len(reason) > 0 { - return reason - } - - return r.missingHostnames(currentCertSecret.Annotations) -} - -func (r *ServingRotation) missingHostnames(annotations map[string]string) string { - return missingHostnames(annotations, r.Hostnames()) -} - -func (r *ServingRotation) SetAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string { - return setHostnameAnnotations(cert, annotations) -} - -func missingHostnames(annotations map[string]string, hostnames []string) string { - existingHostnames := sets.New(strings.Split(annotations[CertificateHostnames], ",")...) - requiredHostnames := sets.New(hostnames...) - if !existingHostnames.Equal(requiredHostnames) { - existingNotRequired := existingHostnames.Difference(requiredHostnames) - requiredNotExisting := requiredHostnames.Difference(existingHostnames) - return fmt.Sprintf("%q are existing and not required, %q are required and not existing", strings.Join(sets.List(existingNotRequired), ","), strings.Join(sets.List(requiredNotExisting), ",")) - } - return "" -} - -func setHostnameAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string { - hostnames := sets.Set[string]{} - for _, ip := range cert.Certs[0].IPAddresses { - hostnames.Insert(ip.String()) - } - for _, dnsName := range cert.Certs[0].DNSNames { - hostnames.Insert(dnsName) - } - // List does a sort so that we have a consistent representation - annotations[CertificateHostnames] = strings.Join(sets.List(hostnames), ",") - return annotations -} - -type ServingHostnameFunc func() []string - -type SignerRotation struct { - SignerName string -} - -func (r *SignerRotation) CertificateType() pki.CertificateType { - return pki.CertificateTypeSigner -} - -func (r *SignerRotation) NewCertificate(signer *crypto.CA, validity time.Duration, keyGen crypto.KeyPairGenerator) (*crypto.TLSCertificateConfig, error) { - signerName := fmt.Sprintf("%s_@%d", r.SignerName, time.Now().Unix()) - if keyGen == nil { - return crypto.MakeCAConfigForDuration(signerName, validity, signer) - } - return crypto.NewSigningCertificate(signerName, keyGen, - crypto.WithSigner(signer), - crypto.WithLifetime(validity), - ) -} - -// PeerRotation creates certificates used for both server and client authentication -// (e.g., etcd peer certificates). It uses CertificateTypePeer for PKI profile -// resolution, which selects the stronger of the serving and client key configurations. -// -// UserInfo is always required. When keyGen is non-nil (ConfigurablePKI enabled), -// NewPeerCertificate encodes UserInfo as the client identity in the certificate -// subject. When keyGen is nil (legacy), UserInfo.Name must match the sorted first -// hostname (used as CN by MakeServerCertForDuration), and the certificate falls -// back to MakeServerCertForDuration with an extension function that sets both -// ClientAuth and ServerAuth ExtKeyUsages. -type PeerRotation struct { - Hostnames ServingHostnameFunc - UserInfo user.Info - CertificateExtensionFn []crypto.CertificateExtensionFunc - HostnamesChanged <-chan struct{} -} - -func (r *PeerRotation) CertificateType() pki.CertificateType { - return pki.CertificateTypePeer -} - -func (r *PeerRotation) NewCertificate(signer *crypto.CA, validity time.Duration, keyGen crypto.KeyPairGenerator) (*crypto.TLSCertificateConfig, error) { - hostnames := r.Hostnames() - if len(hostnames) == 0 { - return nil, fmt.Errorf("no hostnames set") - } - if r.UserInfo == nil { - return nil, fmt.Errorf("PeerRotation requires UserInfo") - } - if keyGen == nil { - // Legacy path: use server cert template with extension fn to add both ExtKeyUsages. - // MakeServerCertForDuration sorts hostnames and uses the first sorted value as CN. - sortedHostnames := sets.List(sets.New(hostnames...)) - if cn := sortedHostnames[0]; r.UserInfo.GetName() != cn { - return nil, fmt.Errorf("PeerRotation legacy path uses sorted first hostname %q as CN; UserInfo.Name %q conflicts — set UserInfo.Name to match or enable ConfigurablePKI", cn, r.UserInfo.GetName()) - } - peerExtFn := func(cert *x509.Certificate) error { - cert.ExtKeyUsage = []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth} - return nil - } - extensions := append(append([]crypto.CertificateExtensionFunc{}, r.CertificateExtensionFn...), peerExtFn) - return signer.MakeServerCertForDuration(sets.New(hostnames...), validity, extensions...) - } - return signer.NewPeerCertificate( - sets.New(hostnames...), r.UserInfo, keyGen, - crypto.WithLifetime(validity), - crypto.WithExtensions(r.CertificateExtensionFn...), - ) -} - -func (r *PeerRotation) RecheckChannel() <-chan struct{} { - return r.HostnamesChanged -} - -func (r *PeerRotation) NeedNewTargetCertKeyPair(currentCertSecret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, creationRequired bool) string { - reason := needNewTargetCertKeyPair(currentCertSecret, signer, caBundleCerts, refresh, refreshOnlyWhenExpired, creationRequired) - if len(reason) > 0 { - return reason - } - return missingHostnames(currentCertSecret.Annotations, r.Hostnames()) -} - -func (r *PeerRotation) SetAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string { - return setHostnameAnnotations(cert, annotations) -} - -func (r *SignerRotation) NeedNewTargetCertKeyPair(currentCertSecret *corev1.Secret, signer *crypto.CA, caBundleCerts []*x509.Certificate, refresh time.Duration, refreshOnlyWhenExpired, exists bool) string { - return needNewTargetCertKeyPair(currentCertSecret, signer, caBundleCerts, refresh, refreshOnlyWhenExpired, exists) -} - -func (r *SignerRotation) SetAnnotations(cert *crypto.TLSCertificateConfig, annotations map[string]string) map[string]string { - return annotations -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/condition/condition.go b/vendor/github.com/openshift/library-go/pkg/operator/condition/condition.go deleted file mode 100644 index 1a522609a..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/condition/condition.go +++ /dev/null @@ -1,72 +0,0 @@ -package condition - -const ( - // ManagementStateDegradedConditionType is true when the operator ManagementState is not "Managed".. - // Possible reasons are Unmanaged, Removed or Unknown. Any of these cases means the operator is not actively managing the operand. - // This condition is set to false when the ManagementState is set to back to "Managed". - ManagementStateDegradedConditionType = "ManagementStateDegraded" - - // UnsupportedConfigOverridesUpgradeableConditionType is true when operator unsupported config overrides is changed. - // When NoUnsupportedConfigOverrides reason is given it means there are no unsupported config overrides. - // When UnsupportedConfigOverridesSet reason is given it means the unsupported config overrides are set, which might impact the ability - // of operator to successfully upgrade its operand. - UnsupportedConfigOverridesUpgradeableConditionType = "UnsupportedConfigOverridesUpgradeable" - - // MonitoringResourceControllerDegradedConditionType is true when the operator is unable to create or reconcile the ServiceMonitor - // CR resource, which is required by monitoring operator to collect Prometheus data from the operator. When this condition is true and the ServiceMonitor - // is already created, it won't have impact on collecting metrics. However, if the ServiceMonitor was not created, the metrics won't be available for - // collection until this condition is set to false. - // The condition is set to false automatically when the operator successfully synchronize the ServiceMonitor resource. - MonitoringResourceControllerDegradedConditionType = "MonitoringResourceControllerDegraded" - - // BackingResourceControllerDegradedConditionType is true when the operator is unable to create or reconcile the resources needed - // to successfully run the installer pods (installer CRB and SA). If these were already created, this condition is not fatal, however if the resources - // were not created it means the installer pod creation will fail. - // This condition is set to false when the operator can successfully synchronize installer SA and CRB. - BackingResourceControllerDegradedConditionType = "BackingResourceControllerDegraded" - - // StaticPodsDegradedConditionType is true when the operator observe errors when installing the new revision static pods. - // This condition report Error reason when the pods are terminated or not ready or waiting during which the operand quality of service is degraded. - // This condition is set to False when the pods change state to running and are observed ready. - StaticPodsDegradedConditionType = "StaticPodsDegraded" - - // StaticPodsAvailableConditionType is true when the static pod is available on at least one node. - StaticPodsAvailableConditionType = "StaticPodsAvailable" - - // ConfigObservationDegradedConditionType is true when the operator failed to observe or process configuration change. - // This is not transient condition and normally a correction or manual intervention is required on the config custom resource. - ConfigObservationDegradedConditionType = "ConfigObservationDegraded" - - // ResourceSyncControllerDegradedConditionType is true when the operator failed to synchronize one or more secrets or config maps required - // to run the operand. Operand ability to provide service might be affected by this condition. - // This condition is set to false when the operator is able to create secrets and config maps. - ResourceSyncControllerDegradedConditionType = "ResourceSyncControllerDegraded" - - // CertRotationDegradedConditionTypeFmt is true when the operator failed to properly rotate one or more certificates required by the operand. - // The RotationError reason is given with message describing details of this failure. This condition can be fatal when ignored as the existing certificate(s) - // validity can expire and without rotating/renewing them manual recovery might be required to fix the cluster. - CertRotationDegradedConditionTypeFmt = "CertRotation_%s_Degraded" - - // InstallerControllerDegradedConditionType is true when the operator is not able to create new installer pods so the new revisions - // cannot be rolled out. This might happen when one or more required secrets or config maps does not exists. - // In case the missing secret or config map is available, this condition is automatically set to false. - InstallerControllerDegradedConditionType = "InstallerControllerDegraded" - - // NodeInstallerDegradedConditionType is true when the operator is not able to create new installer pods because there are no schedulable nodes - // available to run the installer pods. - // The AllNodesAtLatestRevision reason is set when all master nodes are updated to the latest revision. It is false when some masters are pending revision. - // ZeroNodesActive reason is set to True when no active master nodes are observed. Is set to False when there is at least one active master node. - NodeInstallerDegradedConditionType = "NodeInstallerDegraded" - - // NodeInstallerProgressingConditionType is true when the operator is moving nodes to a new revision. - NodeInstallerProgressingConditionType = "NodeInstallerProgressing" - - // RevisionControllerDegradedConditionType is true when the operator is not able to create new desired revision because an error occurred when - // the operator attempted to created required resource(s) (secrets, configmaps, ...). - // This condition mean no new revision will be created. - RevisionControllerDegradedConditionType = "RevisionControllerDegraded" - - // NodeControllerDegradedConditionType is true when the operator observed a master node that is not ready. - // Note that a node is not ready when its Condition.NodeReady wasn't set to true - NodeControllerDegradedConditionType = "NodeControllerDegraded" -) diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/OWNERS b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/OWNERS deleted file mode 100644 index 8cd5c0bca..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -reviewers: -- benluddy -approvers: -- benluddy diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/config_observer_controller.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/config_observer_controller.go deleted file mode 100644 index 68123d0e8..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/config_observer_controller.go +++ /dev/null @@ -1,302 +0,0 @@ -package configobserver - -import ( - "bytes" - "context" - "encoding/json" - "errors" - "fmt" - "strings" - "time" - - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - - "github.com/imdario/mergo" - "k8s.io/klog/v2" - - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/util/diff" - "k8s.io/apimachinery/pkg/util/rand" - "k8s.io/client-go/tools/cache" - - operatorv1 "github.com/openshift/api/operator/v1" - - "github.com/openshift/library-go/pkg/controller/factory" - "github.com/openshift/library-go/pkg/operator/condition" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/management" - "github.com/openshift/library-go/pkg/operator/resourcesynccontroller" - "github.com/openshift/library-go/pkg/operator/v1helpers" -) - -// Listers is an interface which will be passed to the config observer funcs. It is expected to be hard-cast to the "correct" type -type Listers interface { - // ResourceSyncer can be used to copy content from one namespace to another - ResourceSyncer() resourcesynccontroller.ResourceSyncer - PreRunHasSynced() []cache.InformerSynced -} - -// ObserveConfigFunc observes configuration and returns the observedConfig. This function should not return an -// observedConfig that would cause the service being managed by the operator to crash. For example, if a required -// configuration key cannot be observed, consider reusing the configuration key's previous value. Errors that occur -// while attempting to generate the observedConfig should be returned in the errs slice. -type ObserveConfigFunc func(listers Listers, recorder events.Recorder, existingConfig map[string]interface{}) (observedConfig map[string]interface{}, errs []error) - -type ConfigObserver struct { - controllerInstanceName string - - // observers are called in an undefined order and their results are merged to - // determine the observed configuration. - observers []ObserveConfigFunc - - operatorClient v1helpers.OperatorClient - - // listers are used by config observers to retrieve necessary resources - listers Listers - - nestedConfigPath []string - degradedConditionType string -} - -func NewConfigObserver( - name string, - operatorClient v1helpers.OperatorClient, - eventRecorder events.Recorder, - listers Listers, - informers []factory.Informer, - observers ...ObserveConfigFunc, -) factory.Controller { - return NewNestedConfigObserver( - name, - operatorClient, - eventRecorder, - listers, - informers, - nil, - "", - observers..., - ) -} - -// NewNestedConfigObserver creates a config observer that watches changes to a nested field (nestedConfigPath) in the config. -// Useful when the config is shared across multiple controllers in the same process. -// -// Example: -// -// Given the following configuration, you could run two separate controllers and point each to its own section. -// The first controller would be responsible for "oauthAPIServer" and the second for "oauthServer" section. -// -// "observedConfig": { -// "oauthAPIServer": { -// "apiServerArguments": {"tls-min-version": "VersionTLS12"} -// }, -// "oauthServer": { -// "corsAllowedOrigins": [ "//127\\.0\\.0\\.1(:|$)","//localhost(:|$)"] -// } -// } -// -// oauthAPIController := NewNestedConfigObserver(..., []string{"oauthAPIServer"} -// oauthServerController := NewNestedConfigObserver(..., []string{"oauthServer"} -func NewNestedConfigObserver( - name string, - operatorClient v1helpers.OperatorClient, - eventRecorder events.Recorder, - listers Listers, - informers []factory.Informer, - nestedConfigPath []string, - degradedConditionPrefix string, - observers ...ObserveConfigFunc, -) factory.Controller { - c := &ConfigObserver{ - controllerInstanceName: factory.ControllerInstanceName(name, "ConfigObserver"), - operatorClient: operatorClient, - observers: observers, - listers: listers, - nestedConfigPath: nestedConfigPath, - degradedConditionType: degradedConditionPrefix + condition.ConfigObservationDegradedConditionType, - } - - return factory.New(). - ResyncEvery(time.Minute). - WithSync(c.sync). - WithControllerInstanceName(c.controllerInstanceName). - WithInformers(append(informers, listersToInformer(listers)...)...). - ToController( - "ConfigObserver", // don't change what is passed here unless you also remove the old FooDegraded condition - eventRecorder.WithComponentSuffix("config-observer"), - ) -} - -// sync reacts to a change in prereqs by finding information that is required to match another value in the cluster. This -// must be information that is logically "owned" by another component. -func (c ConfigObserver) sync(ctx context.Context, syncCtx factory.SyncContext) error { - originalSpec, _, _, err := c.operatorClient.GetOperatorState() - if management.IsOperatorRemovable() && apierrors.IsNotFound(err) { - return nil - } - if err != nil { - return err - } - spec := originalSpec.DeepCopy() - - // don't worry about errors. If we can't decode, we'll simply stomp over the field. - existingConfig := map[string]interface{}{} - if err := json.NewDecoder(bytes.NewBuffer(spec.ObservedConfig.Raw)).Decode(&existingConfig); err != nil { - klog.V(4).Infof("decode of existing config failed with error: %v", err) - } - - var errs []error - var observedConfigs []map[string]interface{} - for _, i := range rand.Perm(len(c.observers)) { - var currErrs []error - observedConfig, currErrs := c.observers[i](c.listers, syncCtx.Recorder(), existingConfig) - observedConfigs = append(observedConfigs, observedConfig) - errs = append(errs, currErrs...) - } - - mergedObservedConfig := map[string]interface{}{} - for _, observedConfig := range observedConfigs { - if err := mergo.Merge(&mergedObservedConfig, observedConfig); err != nil { - klog.Warningf("merging observed config failed: %v", err) - } - } - - reverseMergedObservedConfig := map[string]interface{}{} - for i := len(observedConfigs) - 1; i >= 0; i-- { - if err := mergo.Merge(&reverseMergedObservedConfig, observedConfigs[i]); err != nil { - klog.Warningf("merging observed config failed: %v", err) - } - } - - if !equality.Semantic.DeepEqual(mergedObservedConfig, reverseMergedObservedConfig) { - errs = append(errs, errors.New("non-deterministic config observation detected")) - } - - if err := c.updateObservedConfig(ctx, syncCtx, existingConfig, mergedObservedConfig); err != nil { - errs = []error{err} - } - configError := v1helpers.NewMultiLineAggregate(errs) - - // update failing condition - condition := applyoperatorv1.OperatorCondition(). - WithType(c.degradedConditionType). - WithStatus(operatorv1.ConditionFalse) - if configError != nil { - condition = condition. - WithStatus(operatorv1.ConditionTrue). - WithReason("Error"). - WithMessage(configError.Error()) - } - status := applyoperatorv1.OperatorStatus().WithConditions(condition) - updateError := c.operatorClient.ApplyOperatorStatus(ctx, c.controllerInstanceName, status) - if updateError != nil { - return updateError - } - - return configError -} - -func (c ConfigObserver) updateObservedConfig(ctx context.Context, syncCtx factory.SyncContext, existingConfig map[string]interface{}, mergedObservedConfig map[string]interface{}) error { - if len(c.nestedConfigPath) == 0 { - if !equality.Semantic.DeepEqual(existingConfig, mergedObservedConfig) { - syncCtx.Recorder().Eventf("ObservedConfigChanged", "Writing updated observed config: %v", diff.Diff(existingConfig, mergedObservedConfig)) - return c.updateConfig(ctx, syncCtx, mergedObservedConfig, v1helpers.UpdateObservedConfigFn) - } - return nil - } - - existingConfigNested, _, err := unstructured.NestedMap(existingConfig, c.nestedConfigPath...) - if err != nil { - return fmt.Errorf("unable to extract the config under %v key, err %v", c.nestedConfigPath, err) - } - mergedObservedConfigNested, _, err := unstructured.NestedMap(mergedObservedConfig, c.nestedConfigPath...) - if err != nil { - return fmt.Errorf("unable to extract the merged config under %v, err %v", c.nestedConfigPath, err) - } - if !equality.Semantic.DeepEqual(existingConfigNested, mergedObservedConfigNested) { - syncCtx.Recorder().Eventf("ObservedConfigChanged", "Writing updated section (%q) of observed config: %q", strings.Join(c.nestedConfigPath, "/"), diff.Diff(existingConfigNested, mergedObservedConfigNested)) - return c.updateConfig(ctx, syncCtx, mergedObservedConfigNested, c.updateNestedConfigHelper) - } - return nil -} - -type updateObservedConfigFn func(config map[string]interface{}) v1helpers.UpdateOperatorSpecFunc - -func (c ConfigObserver) updateConfig(ctx context.Context, syncCtx factory.SyncContext, updatedMaybeNestedConfig map[string]interface{}, updateConfigHelper updateObservedConfigFn) error { - if _, _, err := v1helpers.UpdateSpec(ctx, c.operatorClient, updateConfigHelper(updatedMaybeNestedConfig)); err != nil { - // At this point we failed to write the updated config. If we are permanently broken, do not pile the errors from observers - // but instead reset the errors and only report single error condition. - syncCtx.Recorder().Warningf("ObservedConfigWriteError", "Failed to write observed config: %v", err) - return fmt.Errorf("error writing updated observed config: %v", err) - } - return nil -} - -// updateNestedConfigHelper returns a helper function for updating the nested config. -func (c ConfigObserver) updateNestedConfigHelper(updatedNestedConfig map[string]interface{}) v1helpers.UpdateOperatorSpecFunc { - return func(currentSpec *operatorv1.OperatorSpec) error { - existingConfig := map[string]interface{}{} - if err := json.NewDecoder(bytes.NewBuffer(currentSpec.ObservedConfig.Raw)).Decode(&existingConfig); err != nil { - klog.V(4).Infof("decode of existing config failed with error: %v", err) - } - if err := unstructured.SetNestedField(existingConfig, updatedNestedConfig, c.nestedConfigPath...); err != nil { - return fmt.Errorf("unable to set the nested (%q) observed config: %v", strings.Join(c.nestedConfigPath, "/"), err) - } - currentSpec.ObservedConfig = runtime.RawExtension{Object: &unstructured.Unstructured{Object: existingConfig}} - return nil - } -} - -// listersToInformer converts the Listers interface to informer with empty AddEventHandler as we only care about synced caches in the Run. -func listersToInformer(l Listers) []factory.Informer { - result := make([]factory.Informer, len(l.PreRunHasSynced())) - for i := range l.PreRunHasSynced() { - result[i] = &listerInformer{cacheSynced: l.PreRunHasSynced()[i]} - } - return result -} - -type listerInformer struct { - cacheSynced cache.InformerSynced -} - -func (l *listerInformer) AddEventHandler(cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil -} - -func (l *listerInformer) HasSynced() bool { - return l.cacheSynced() -} - -// WithPrefix adds a prefix to the path the input observer would otherwise observe into -func WithPrefix(observer ObserveConfigFunc, prefix ...string) ObserveConfigFunc { - if len(prefix) == 0 { - return observer - } - - return func(listers Listers, recorder events.Recorder, existingConfig map[string]interface{}) (map[string]interface{}, []error) { - errs := []error{} - - nestedExistingConfig, _, err := unstructured.NestedMap(existingConfig, prefix...) - if err != nil { - errs = append(errs, err) - } - - orig, observerErrs := observer(listers, recorder, nestedExistingConfig) - errs = append(errs, observerErrs...) - - if orig == nil { - return nil, errs - } - - ret := map[string]interface{}{} - if err := unstructured.SetNestedField(ret, orig, prefix...); err != nil { - errs = append(errs, err) - } - return ret, errs - - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/featuregate.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/featuregate.go deleted file mode 100644 index 5792ada3a..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/featuregate.go +++ /dev/null @@ -1,48 +0,0 @@ -package featuregates - -import ( - "fmt" - "slices" - - configv1 "github.com/openshift/api/config/v1" -) - -// FeatureGate indicates whether a given feature is enabled or not -// This interface is heavily influenced by k8s.io/component-base, but not exactly compatible. -type FeatureGate interface { - // Enabled returns true if the key is enabled. - Enabled(key configv1.FeatureGateName) bool - // KnownFeatures returns a slice of strings describing the FeatureGate's known features. - KnownFeatures() []configv1.FeatureGateName -} - -type featureGate struct { - enabled []configv1.FeatureGateName - disabled []configv1.FeatureGateName -} - -func NewFeatureGate(enabled, disabled []configv1.FeatureGateName) FeatureGate { - return &featureGate{ - enabled: enabled, - disabled: disabled, - } -} - -func (f *featureGate) Enabled(key configv1.FeatureGateName) bool { - if slices.Contains(f.enabled, key) { - return true - } - if slices.Contains(f.disabled, key) { - return false - } - - panic(fmt.Errorf("feature %q is not registered in FeatureGates %v", key, f.KnownFeatures())) -} - -func (f *featureGate) KnownFeatures() []configv1.FeatureGateName { - allKnown := make([]configv1.FeatureGateName, 0, len(f.enabled)+len(f.disabled)) - allKnown = append(allKnown, f.enabled...) - allKnown = append(allKnown, f.disabled...) - - return allKnown -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/hardcoded_featuregate_reader.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/hardcoded_featuregate_reader.go deleted file mode 100644 index 58ae71763..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/hardcoded_featuregate_reader.go +++ /dev/null @@ -1,78 +0,0 @@ -package featuregates - -import ( - "context" - "fmt" - - configv1 "github.com/openshift/api/config/v1" -) - -type hardcodedFeatureGateAccess struct { - enabled []configv1.FeatureGateName - disabled []configv1.FeatureGateName - readErr error - - initialFeatureGatesObserved chan struct{} -} - -// NewHardcodedFeatureGateAccess returns a FeatureGateAccess that is always initialized and always -// returns the provided feature gates. -func NewHardcodedFeatureGateAccess(enabled, disabled []configv1.FeatureGateName) FeatureGateAccess { - initialFeatureGatesObserved := make(chan struct{}) - close(initialFeatureGatesObserved) - c := &hardcodedFeatureGateAccess{ - enabled: enabled, - disabled: disabled, - initialFeatureGatesObserved: initialFeatureGatesObserved, - } - - return c -} - -// NewHardcodedFeatureGateAccessForTesting returns a FeatureGateAccess that returns stub responses -// using caller-supplied values. -func NewHardcodedFeatureGateAccessForTesting(enabled, disabled []configv1.FeatureGateName, initialFeatureGatesObserved chan struct{}, readErr error) FeatureGateAccess { - return &hardcodedFeatureGateAccess{ - enabled: enabled, - disabled: disabled, - initialFeatureGatesObserved: initialFeatureGatesObserved, - readErr: readErr, - } -} - -func (c *hardcodedFeatureGateAccess) SetChangeHandler(featureGateChangeHandlerFn FeatureGateChangeHandlerFunc) { - // ignore -} - -func (c *hardcodedFeatureGateAccess) Run(ctx context.Context) { - // ignore -} - -func (c *hardcodedFeatureGateAccess) InitialFeatureGatesObserved() <-chan struct{} { - return c.initialFeatureGatesObserved -} - -func (c *hardcodedFeatureGateAccess) AreInitialFeatureGatesObserved() bool { - select { - case <-c.InitialFeatureGatesObserved(): - return true - default: - return false - } -} - -func (c *hardcodedFeatureGateAccess) CurrentFeatureGates() (FeatureGate, error) { - return NewFeatureGate(c.enabled, c.disabled), c.readErr -} - -// NewHardcodedFeatureGateAccessFromFeatureGate returns a FeatureGateAccess that is static and initialised from -// a populated FeatureGate status. -// If the desired version is missing, this will return an error. -func NewHardcodedFeatureGateAccessFromFeatureGate(featureGate *configv1.FeatureGate, desiredVersion string) (FeatureGateAccess, error) { - features, err := featuresFromFeatureGate(featureGate, desiredVersion) - if err != nil { - return nil, fmt.Errorf("unable to determine features: %w", err) - } - - return NewHardcodedFeatureGateAccess(features.Enabled, features.Disabled), nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/observe_featuregates.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/observe_featuregates.go deleted file mode 100644 index 0f2cb85fd..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/observe_featuregates.go +++ /dev/null @@ -1,118 +0,0 @@ -package featuregates - -import ( - "fmt" - "reflect" - "strings" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/util/sets" - - configv1 "github.com/openshift/api/config/v1" - "github.com/openshift/library-go/pkg/operator/configobserver" - "github.com/openshift/library-go/pkg/operator/events" -) - -// NewObserveFeatureFlagsFunc produces a configobserver for feature gates. If non-nil, the featureWhitelist filters -// feature gates to a known subset (instead of everything). The featureBlacklist will stop certain features from making -// it through the list. The featureBlacklist should be empty, but for a brief time, some featuregates may need to skipped. -// @smarterclayton will live forever in shame for being the first to require this for "IPv6DualStack". -func NewObserveFeatureFlagsFunc(featureWhitelist sets.Set[configv1.FeatureGateName], featureBlacklist sets.Set[configv1.FeatureGateName], configPath []string, featureGateAccess FeatureGateAccess) configobserver.ObserveConfigFunc { - return (&featureFlags{ - allowAll: len(featureWhitelist) == 0, - featureWhitelist: featureWhitelist, - featureBlacklist: featureBlacklist, - configPath: configPath, - featureGateAccess: featureGateAccess, - }).ObserveFeatureFlags -} - -type featureFlags struct { - allowAll bool - featureWhitelist sets.Set[configv1.FeatureGateName] - // we add a forceDisableFeature list because we've now had bad featuregates break individual operators. Awesome. - featureBlacklist sets.Set[configv1.FeatureGateName] - configPath []string - featureGateAccess FeatureGateAccess -} - -// ObserveFeatureFlags fills in --feature-flags for the kube-apiserver -func (f *featureFlags) ObserveFeatureFlags(genericListers configobserver.Listers, recorder events.Recorder, existingConfig map[string]interface{}) (map[string]interface{}, []error) { - prunedExistingConfig := configobserver.Pruned(existingConfig, f.configPath) - - errs := []error{} - - if !f.featureGateAccess.AreInitialFeatureGatesObserved() { - // if we haven't observed featuregates yet, return the existing - return prunedExistingConfig, nil - } - - featureGates, err := f.featureGateAccess.CurrentFeatureGates() - if err != nil { - return prunedExistingConfig, append(errs, err) - } - observedConfig := map[string]interface{}{} - newConfigValue := f.getWhitelistedFeatureNames(featureGates) - - currentConfigValue, _, err := unstructured.NestedStringSlice(existingConfig, f.configPath...) - if err != nil { - errs = append(errs, err) - // keep going on read error from existing config - } - if !reflect.DeepEqual(currentConfigValue, newConfigValue) { - recorder.Eventf("ObserveFeatureFlagsUpdated", "Updated %v to %s", strings.Join(f.configPath, "."), strings.Join(newConfigValue, ",")) - } - - if err := unstructured.SetNestedStringSlice(observedConfig, newConfigValue, f.configPath...); err != nil { - recorder.Warningf("ObserveFeatureFlags", "Failed setting %v: %v", strings.Join(f.configPath, "."), err) - return prunedExistingConfig, append(errs, err) - } - - return configobserver.Pruned(observedConfig, f.configPath), errs -} - -func (f *featureFlags) getWhitelistedFeatureNames(featureGates FeatureGate) []string { - newConfigValue := []string{} - formatEnabledFunc := func(fs configv1.FeatureGateName) string { - return fmt.Sprintf("%v=true", fs) - } - formatDisabledFunc := func(fs configv1.FeatureGateName) string { - return fmt.Sprintf("%v=false", fs) - } - - for _, knownFeatureGate := range featureGates.KnownFeatures() { - if f.featureBlacklist.Has(knownFeatureGate) { - continue - } - // only add whitelisted feature flags - if !f.allowAll && !f.featureWhitelist.Has(knownFeatureGate) { - continue - } - - if featureGates.Enabled(knownFeatureGate) { - newConfigValue = append(newConfigValue, formatEnabledFunc(knownFeatureGate)) - } else { - newConfigValue = append(newConfigValue, formatDisabledFunc(knownFeatureGate)) - } - } - - return newConfigValue -} - -func StringsToFeatureGateNames(in []string) []configv1.FeatureGateName { - out := []configv1.FeatureGateName{} - for _, curr := range in { - out = append(out, configv1.FeatureGateName(curr)) - } - - return out -} - -func FeatureGateNamesToStrings(in []configv1.FeatureGateName) []string { - out := []string{} - for _, curr := range in { - out = append(out, string(curr)) - } - - return out -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/simple_featuregate_reader.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/simple_featuregate_reader.go deleted file mode 100644 index 4b2caccd6..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/featuregates/simple_featuregate_reader.go +++ /dev/null @@ -1,318 +0,0 @@ -package featuregates - -import ( - "context" - "fmt" - "os" - "reflect" - "sync" - "time" - - configv1 "github.com/openshift/api/config/v1" - - v1 "github.com/openshift/client-go/config/informers/externalversions/config/v1" - configlistersv1 "github.com/openshift/client-go/config/listers/config/v1" - "github.com/openshift/library-go/pkg/operator/events" - apierrors "k8s.io/apimachinery/pkg/api/errors" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/util/wait" - "k8s.io/client-go/tools/cache" - "k8s.io/client-go/util/workqueue" - "k8s.io/klog/v2" -) - -type FeatureGateChangeHandlerFunc func(featureChange FeatureChange) - -// FeatureGateAccess is used to get a list of enabled and disabled featuregates. -// Create a new instance using NewFeatureGateAccess. -// To create one for unit testing, use NewHardcodedFeatureGateAccess. -type FeatureGateAccess interface { - // SetChangeHandler can only be called before Run. - // The default change handler will exit 0 when the set of featuregates changes. - // That is usually the easiest and simplest thing for an *operator* to do. - // This also discourages direct operand reading since all operands restarting simultaneously is bad. - // This function allows changing that default behavior to something else (perhaps a channel notification for - // all impacted controllers in an operator. - // I doubt this will be worth the effort in the majority of cases. - SetChangeHandler(featureGateChangeHandlerFn FeatureGateChangeHandlerFunc) - - // Run starts a go func that continously watches the set of featuregates enabled in the cluster. - Run(ctx context.Context) - // InitialFeatureGatesObserved returns a channel that is closed once the featuregates have - // been observed. Once closed, the CurrentFeatureGates method will return the current set of - // featuregates and will never return a non-nil error. - InitialFeatureGatesObserved() <-chan struct{} - // CurrentFeatureGates returns the list of enabled and disabled featuregates. - // It returns an error if the current set of featuregates is not known. - CurrentFeatureGates() (FeatureGate, error) - // AreInitialFeatureGatesObserved returns true if the initial featuregates have been observed. - AreInitialFeatureGatesObserved() bool -} - -type Features struct { - Enabled []configv1.FeatureGateName - Disabled []configv1.FeatureGateName -} - -type FeatureChange struct { - Previous *Features - New Features -} - -type defaultFeatureGateAccess struct { - desiredVersion string - missingVersionMarker string - clusterVersionLister configlistersv1.ClusterVersionLister - featureGateLister configlistersv1.FeatureGateLister - initialFeatureGatesObserved chan struct{} - - featureGateChangeHandlerFn FeatureGateChangeHandlerFunc - - lock sync.Mutex - started bool - initialFeatures Features - currentFeatures Features - - queue workqueue.RateLimitingInterface - eventRecorder events.Recorder -} - -// NewFeatureGateAccess returns a controller that keeps the list of enabled/disabled featuregates up to date. -// desiredVersion is the version of this operator that would be set on the clusteroperator.status.versions. -// missingVersionMarker is the stub version provided by the operator. If that is also the desired version, -// then the most either the desired clusterVersion or most recent version will be used. -// clusterVersionInformer is used when desiredVersion and missingVersionMarker are the same to derive the "best" version -// of featuregates to use. -// featureGateInformer is used to track changes to the featureGates once they are initially set. -// By default, when the enabled/disabled list of featuregates changes, os.Exit is called. This behavior can be -// overridden by calling SetChangeHandler to whatever you wish the behavior to be. -// A common construct is: -/* go -featureGateAccessor := NewFeatureGateAccess(args) -go featureGateAccessor.Run(ctx) - -select{ -case <- featureGateAccessor.InitialFeatureGatesObserved(): - featureGates, _ := featureGateAccessor.CurrentFeatureGates() - klog.Infof("FeatureGates initialized: knownFeatureGates=%v", featureGates.KnownFeatures()) -case <- time.After(1*time.Minute): - klog.Errorf("timed out waiting for FeatureGate detection") - return fmt.Errorf("timed out waiting for FeatureGate detection") -} - -// whatever other initialization you have to do, at this point you have FeatureGates to drive your behavior. -*/ -// That construct is easy. It is better to use the .spec.observedConfiguration construct common in library-go operators -// to avoid gating your general startup on FeatureGate determination, but if you haven't already got that mechanism -// this construct is easy. -func NewFeatureGateAccess( - desiredVersion, missingVersionMarker string, - clusterVersionInformer v1.ClusterVersionInformer, - featureGateInformer v1.FeatureGateInformer, - eventRecorder events.Recorder) FeatureGateAccess { - c := &defaultFeatureGateAccess{ - desiredVersion: desiredVersion, - missingVersionMarker: missingVersionMarker, - clusterVersionLister: clusterVersionInformer.Lister(), - featureGateLister: featureGateInformer.Lister(), - initialFeatureGatesObserved: make(chan struct{}), - queue: workqueue.NewNamedRateLimitingQueue(workqueue.DefaultControllerRateLimiter(), "feature-gate-detector"), - eventRecorder: eventRecorder, - } - c.SetChangeHandler(ForceExit) - - // we aren't expecting many - clusterVersionInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - c.queue.Add("cluster") - }, - UpdateFunc: func(old, cur interface{}) { - c.queue.Add("cluster") - }, - DeleteFunc: func(uncast interface{}) { - c.queue.Add("cluster") - }, - }) - featureGateInformer.Informer().AddEventHandler(cache.ResourceEventHandlerFuncs{ - AddFunc: func(obj interface{}) { - c.queue.Add("cluster") - }, - UpdateFunc: func(old, cur interface{}) { - c.queue.Add("cluster") - }, - DeleteFunc: func(uncast interface{}) { - c.queue.Add("cluster") - }, - }) - - return c -} - -func ForceExit(featureChange FeatureChange) { - if featureChange.Previous != nil { - os.Exit(0) - } -} - -func (c *defaultFeatureGateAccess) SetChangeHandler(featureGateChangeHandlerFn FeatureGateChangeHandlerFunc) { - c.lock.Lock() - defer c.lock.Unlock() - - if c.started { - panic("programmer error, cannot update the change handler after starting") - } - c.featureGateChangeHandlerFn = featureGateChangeHandlerFn -} - -func (c *defaultFeatureGateAccess) Run(ctx context.Context) { - defer utilruntime.HandleCrash() - defer c.queue.ShutDown() - - klog.Infof("Starting feature-gate-detector") - defer klog.Infof("Shutting down feature-gate-detector") - - go wait.UntilWithContext(ctx, c.runWorker, time.Second) - - <-ctx.Done() -} - -func (c *defaultFeatureGateAccess) syncHandler(ctx context.Context) error { - desiredVersion := c.desiredVersion - if c.missingVersionMarker == c.desiredVersion { - clusterVersion, err := c.clusterVersionLister.Get("version") - if apierrors.IsNotFound(err) { - return nil // we will be re-triggered when it is created - } - if err != nil { - return err - } - - desiredVersion = clusterVersion.Status.Desired.Version - if len(desiredVersion) == 0 && len(clusterVersion.Status.History) > 0 { - desiredVersion = clusterVersion.Status.History[0].Version - } - } - - featureGate, err := c.featureGateLister.Get("cluster") - if apierrors.IsNotFound(err) { - return nil // we will be re-triggered when it is created - } - if err != nil { - return err - } - - features, err := featuresFromFeatureGate(featureGate, desiredVersion) - if err != nil { - return fmt.Errorf("unable to determine features: %w", err) - } - - c.setFeatureGates(features) - - return nil -} - -func (c *defaultFeatureGateAccess) setFeatureGates(features Features) { - c.lock.Lock() - defer c.lock.Unlock() - - var previousFeatures *Features - if c.AreInitialFeatureGatesObserved() { - t := c.currentFeatures - previousFeatures = &t - } - - c.currentFeatures = features - - if !c.AreInitialFeatureGatesObserved() { - c.initialFeatures = features - close(c.initialFeatureGatesObserved) - c.eventRecorder.Eventf("FeatureGatesInitialized", "FeatureGates updated to %#v", c.currentFeatures) - } - - if previousFeatures == nil || !reflect.DeepEqual(*previousFeatures, c.currentFeatures) { - if previousFeatures != nil { - c.eventRecorder.Eventf("FeatureGatesModified", "FeatureGates updated to %#v", c.currentFeatures) - } - - c.featureGateChangeHandlerFn(FeatureChange{ - Previous: previousFeatures, - New: c.currentFeatures, - }) - } -} - -func (c *defaultFeatureGateAccess) InitialFeatureGatesObserved() <-chan struct{} { - return c.initialFeatureGatesObserved -} - -func (c *defaultFeatureGateAccess) AreInitialFeatureGatesObserved() bool { - select { - case <-c.InitialFeatureGatesObserved(): - return true - default: - return false - } -} - -func (c *defaultFeatureGateAccess) CurrentFeatureGates() (FeatureGate, error) { - c.lock.Lock() - defer c.lock.Unlock() - - if !c.AreInitialFeatureGatesObserved() { - return nil, fmt.Errorf("featureGates not yet observed") - } - retEnabled := make([]configv1.FeatureGateName, len(c.currentFeatures.Enabled)) - retDisabled := make([]configv1.FeatureGateName, len(c.currentFeatures.Disabled)) - copy(retEnabled, c.currentFeatures.Enabled) - copy(retDisabled, c.currentFeatures.Disabled) - - return NewFeatureGate(retEnabled, retDisabled), nil -} - -func (c *defaultFeatureGateAccess) runWorker(ctx context.Context) { - for c.processNextWorkItem(ctx) { - } -} - -func (c *defaultFeatureGateAccess) processNextWorkItem(ctx context.Context) bool { - dsKey, quit := c.queue.Get() - if quit { - return false - } - defer c.queue.Done(dsKey) - - err := c.syncHandler(ctx) - if err == nil { - c.queue.Forget(dsKey) - return true - } - - utilruntime.HandleError(fmt.Errorf("%v failed with : %v", dsKey, err)) - c.queue.AddRateLimited(dsKey) - - return true -} - -func featuresFromFeatureGate(featureGate *configv1.FeatureGate, desiredVersion string) (Features, error) { - found := false - features := Features{} - for _, featureGateValues := range featureGate.Status.FeatureGates { - if featureGateValues.Version != desiredVersion { - continue - } - found = true - for _, enabled := range featureGateValues.Enabled { - features.Enabled = append(features.Enabled, enabled.Name) - } - for _, disabled := range featureGateValues.Disabled { - features.Disabled = append(features.Disabled, disabled.Name) - } - break - } - - if !found { - return Features{}, fmt.Errorf("missing desired version %q in featuregates.config.openshift.io/cluster", desiredVersion) - } - - return features, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/unstructured.go b/vendor/github.com/openshift/library-go/pkg/operator/configobserver/unstructured.go deleted file mode 100644 index 27b92d0fa..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/configobserver/unstructured.go +++ /dev/null @@ -1,45 +0,0 @@ -package configobserver - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" -) - -// Pruned returns the unstructured filtered by the given paths, i.e. everything -// outside of them will be dropped. The returned data structure might overlap -// with the input, but the input is not mutated. In case of error for a path, -// that path is dropped. -func Pruned(obj map[string]interface{}, pths ...[]string) map[string]interface{} { - if obj == nil || len(pths) == 0 { - return obj - } - - ret := map[string]interface{}{} - if len(pths) == 1 { - x, found, err := unstructured.NestedFieldCopy(obj, pths[0]...) - if err != nil || !found { - return ret - } - unstructured.SetNestedField(ret, x, pths[0]...) - return ret - } - - for i, p := range pths { - x, found, err := unstructured.NestedFieldCopy(obj, p...) - if err != nil { - continue - } - if !found { - continue - } - if i < len(pths)-1 { - // this might be overwritten by a later path - x = runtime.DeepCopyJSONValue(x) - } - if err := unstructured.SetNestedField(ret, x, p...); err != nil { - continue - } - } - - return ret -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/events/OWNERS b/vendor/github.com/openshift/library-go/pkg/operator/events/OWNERS deleted file mode 100644 index 4f189b708..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/events/OWNERS +++ /dev/null @@ -1,8 +0,0 @@ -reviewers: - - mfojtik - - deads2k - - sttts -approvers: - - mfojtik - - deads2k - - sttts diff --git a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder.go b/vendor/github.com/openshift/library-go/pkg/operator/events/recorder.go deleted file mode 100644 index 2918012ff..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder.go +++ /dev/null @@ -1,258 +0,0 @@ -package events - -import ( - "context" - "crypto/sha256" - "errors" - "fmt" - "k8s.io/client-go/kubernetes" - "k8s.io/klog/v2" - "k8s.io/utils/clock" - "os" - - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" -) - -// Recorder is a simple event recording interface. -type Recorder interface { - Event(reason, message string) - Eventf(reason, messageFmt string, args ...interface{}) - Warning(reason, message string) - Warningf(reason, messageFmt string, args ...interface{}) - - // ForComponent allows to fiddle the component name before sending the event to sink. - // Making more unique components will prevent the spam filter in upstream event sink from dropping - // events. - ForComponent(componentName string) Recorder - - // WithComponentSuffix is similar to ForComponent except it just suffix the current component name instead of overriding. - WithComponentSuffix(componentNameSuffix string) Recorder - - // WithContext allows to set a context for event create API calls. - WithContext(ctx context.Context) Recorder - - // ComponentName returns the current source component name for the event. - // This allows to suffix the original component name with 'sub-component'. - ComponentName() string - - Shutdown() -} - -// podNameEnv is a name of environment variable inside container that specifies the name of the current replica set. -// This replica set name is then used as a source/involved object for operator events. -const podNameEnv = "POD_NAME" - -// podNameEnvFunc allows to override the way we get the environment variable value (for unit tests). -var podNameEnvFunc = func() string { - return os.Getenv(podNameEnv) -} - -// GetControllerReferenceForCurrentPod provides an object reference to a controller managing the pod/container where this process runs. -// The pod name must be provided via the POD_NAME name. -// Even if this method returns an error, it always return valid reference to the namespace. It allows the callers to control the logging -// and decide to fail or accept the namespace. -func GetControllerReferenceForCurrentPod(ctx context.Context, client kubernetes.Interface, targetNamespace string, reference *corev1.ObjectReference) (*corev1.ObjectReference, error) { - if reference == nil { - // Try to get the pod name via POD_NAME environment variable - reference := &corev1.ObjectReference{Kind: "Pod", Name: podNameEnvFunc(), Namespace: targetNamespace} - if len(reference.Name) != 0 { - return GetControllerReferenceForCurrentPod(ctx, client, targetNamespace, reference) - } - // If that fails, lets try to guess the pod by listing all pods in namespaces and using the first pod in the list - reference, err := guessControllerReferenceForNamespace(ctx, client.CoreV1().Pods(targetNamespace)) - if err != nil { - // If this fails, do not give up with error but instead use the namespace as controller reference for the pod - // NOTE: This is last resort, if we see this often it might indicate something is wrong in the cluster. - // In some cases this might help with flakes. - return getControllerReferenceForNamespace(targetNamespace), err - } - return GetControllerReferenceForCurrentPod(ctx, client, targetNamespace, reference) - } - - switch reference.Kind { - case "Pod": - pod, err := client.CoreV1().Pods(reference.Namespace).Get(ctx, reference.Name, metav1.GetOptions{}) - if err != nil { - return getControllerReferenceForNamespace(reference.Namespace), err - } - if podController := metav1.GetControllerOf(pod); podController != nil { - return GetControllerReferenceForCurrentPod(ctx, client, targetNamespace, makeObjectReference(podController, targetNamespace)) - } - // This is a bare pod without any ownerReference - return makeObjectReference(&metav1.OwnerReference{Kind: "Pod", Name: pod.Name, UID: pod.UID, APIVersion: "v1"}, pod.Namespace), nil - case "ReplicaSet": - rs, err := client.AppsV1().ReplicaSets(reference.Namespace).Get(ctx, reference.Name, metav1.GetOptions{}) - if err != nil { - return getControllerReferenceForNamespace(reference.Namespace), err - } - if rsController := metav1.GetControllerOf(rs); rsController != nil { - return GetControllerReferenceForCurrentPod(ctx, client, targetNamespace, makeObjectReference(rsController, targetNamespace)) - } - // This is a replicaSet without any ownerReference - return reference, nil - default: - return reference, nil - } -} - -// getControllerReferenceForNamespace returns an object reference to the given namespace. -func getControllerReferenceForNamespace(targetNamespace string) *corev1.ObjectReference { - return &corev1.ObjectReference{ - Kind: "Namespace", - Namespace: targetNamespace, - Name: targetNamespace, - APIVersion: "v1", - } -} - -// makeObjectReference makes object reference from ownerReference and target namespace -func makeObjectReference(owner *metav1.OwnerReference, targetNamespace string) *corev1.ObjectReference { - return &corev1.ObjectReference{ - Kind: owner.Kind, - Namespace: targetNamespace, - Name: owner.Name, - UID: owner.UID, - APIVersion: owner.APIVersion, - } -} - -// guessControllerReferenceForNamespace tries to guess what resource to reference. -func guessControllerReferenceForNamespace(ctx context.Context, client corev1client.PodInterface) (*corev1.ObjectReference, error) { - pods, err := client.List(ctx, metav1.ListOptions{}) - if err != nil { - return nil, err - } - if len(pods.Items) == 0 { - return nil, fmt.Errorf("unable to setup event recorder as %q env variable is not set and there are no pods", podNameEnv) - } - - for _, pod := range pods.Items { - ownerRef := metav1.GetControllerOf(&pod) - if ownerRef == nil { - continue - } - return &corev1.ObjectReference{ - Kind: ownerRef.Kind, - Namespace: pod.Namespace, - Name: ownerRef.Name, - UID: ownerRef.UID, - APIVersion: ownerRef.APIVersion, - }, nil - } - return nil, errors.New("can't guess controller ref") -} - -// NewRecorder returns new event recorder. -func NewRecorder(client corev1client.EventInterface, sourceComponentName string, involvedObjectRef *corev1.ObjectReference, clock clock.PassiveClock) Recorder { - return &recorder{ - eventClient: client, - involvedObjectRef: involvedObjectRef, - sourceComponent: sourceComponentName, - clock: clock, - } -} - -// recorder is an implementation of Recorder interface. -type recorder struct { - eventClient corev1client.EventInterface - involvedObjectRef *corev1.ObjectReference - sourceComponent string - clock clock.PassiveClock - - // TODO: This is not the right way to pass the context, but there is no other way without breaking event interface - ctx context.Context -} - -func (r *recorder) ComponentName() string { - return r.sourceComponent -} - -func (r *recorder) Shutdown() {} - -func (r *recorder) ForComponent(componentName string) Recorder { - newRecorderForComponent := *r - newRecorderForComponent.sourceComponent = componentName - return &newRecorderForComponent -} - -func (r *recorder) WithContext(ctx context.Context) Recorder { - r.ctx = ctx - return r -} - -func (r *recorder) WithComponentSuffix(suffix string) Recorder { - return r.ForComponent(fmt.Sprintf("%s-%s", r.ComponentName(), suffix)) -} - -// Event emits the normal type event and allow formatting of message. -func (r *recorder) Eventf(reason, messageFmt string, args ...interface{}) { - r.Event(reason, fmt.Sprintf(messageFmt, args...)) -} - -// Warning emits the warning type event and allow formatting of message. -func (r *recorder) Warningf(reason, messageFmt string, args ...interface{}) { - r.Warning(reason, fmt.Sprintf(messageFmt, args...)) -} - -// Event emits the normal type event. -func (r *recorder) Event(reason, message string) { - event := makeEvent(r.clock, r.involvedObjectRef, r.sourceComponent, corev1.EventTypeNormal, reason, message) - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - if _, err := r.eventClient.Create(ctx, event, metav1.CreateOptions{}); err != nil { - klog.Warningf("Error creating event %+v: %v", event, err) - } -} - -// Warning emits the warning type event. -func (r *recorder) Warning(reason, message string) { - event := makeEvent(r.clock, r.involvedObjectRef, r.sourceComponent, corev1.EventTypeWarning, reason, message) - ctx := context.Background() - if r.ctx != nil { - ctx = r.ctx - } - if _, err := r.eventClient.Create(ctx, event, metav1.CreateOptions{}); err != nil { - klog.Warningf("Error creating event %+v: %v", event, err) - } -} - -func makeEvent(clock clock.PassiveClock, involvedObjRef *corev1.ObjectReference, sourceComponent string, eventType, reason, message string) *corev1.Event { - currentTime := metav1.Time{Time: clock.Now()} - event := &corev1.Event{ - ObjectMeta: metav1.ObjectMeta{ - // TODO this is always used to create a unique event. Perhaps we should hash the message to be unique enough for apply-configuration - Name: fmt.Sprintf("%v.%x.%s", involvedObjRef.Name, currentTime.UnixNano(), hashForEventNameSuffix(eventType, reason, message)), - Namespace: involvedObjRef.Namespace, - }, - InvolvedObject: *involvedObjRef, - Reason: reason, - Message: message, - Type: eventType, - Count: 1, - FirstTimestamp: currentTime, - LastTimestamp: currentTime, - } - event.Source.Component = sourceComponent - return event -} - -func hashForEventNameSuffix(in ...string) string { - data := []byte{} - for _, curr := range in { - data = append(data, []byte(curr)...) - } - if len(data) == 0 { - return "MISSING" - } - - hash := sha256.New() - hash.Write(data) - hashBytes := hash.Sum(nil) - - // we're looking to deconflict names, not protect the crown jewels - return fmt.Sprintf("%x", hashBytes[len(hashBytes)-4:]) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_in_memory.go b/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_in_memory.go deleted file mode 100644 index bbddd9829..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_in_memory.go +++ /dev/null @@ -1,98 +0,0 @@ -package events - -import ( - "context" - "fmt" - "k8s.io/utils/clock" - "sync" - - corev1 "k8s.io/api/core/v1" - "k8s.io/klog/v2" -) - -type inMemoryEventRecorder struct { - events []*corev1.Event - source string - clock clock.PassiveClock - ctx context.Context - sync.Mutex -} - -// inMemoryDummyObjectReference is used for fake events. -var inMemoryDummyObjectReference = corev1.ObjectReference{ - Kind: "Pod", - Namespace: "dummy", - Name: "dummy", - APIVersion: "v1", -} - -type InMemoryRecorder interface { - Events() []*corev1.Event - Recorder -} - -// NewInMemoryRecorder provides event recorder that stores all events recorded in memory and allow to replay them using the Events() method. -// This recorder should be only used in unit tests. -func NewInMemoryRecorder(sourceComponent string, clock clock.PassiveClock) InMemoryRecorder { - return &inMemoryEventRecorder{ - events: []*corev1.Event{}, - source: sourceComponent, - clock: clock, - } -} - -func (r *inMemoryEventRecorder) ComponentName() string { - r.Lock() - defer r.Unlock() - return r.source -} - -func (r *inMemoryEventRecorder) Shutdown() {} - -func (r *inMemoryEventRecorder) ForComponent(component string) Recorder { - r.Lock() - defer r.Unlock() - r.source = component - return r -} - -func (r *inMemoryEventRecorder) WithContext(ctx context.Context) Recorder { - r.Lock() - defer r.Unlock() - r.ctx = ctx - return r -} - -func (r *inMemoryEventRecorder) WithComponentSuffix(suffix string) Recorder { - return r.ForComponent(fmt.Sprintf("%s-%s", r.ComponentName(), suffix)) -} - -// Events returns list of recorded events -func (r *inMemoryEventRecorder) Events() []*corev1.Event { - r.Lock() - defer r.Unlock() - return append([]*corev1.Event(nil), r.events...) -} - -func (r *inMemoryEventRecorder) Event(reason, message string) { - r.Lock() - defer r.Unlock() - event := makeEvent(r.clock, &inMemoryDummyObjectReference, r.source, corev1.EventTypeNormal, reason, message) - r.events = append(r.events, event) -} - -func (r *inMemoryEventRecorder) Eventf(reason, messageFmt string, args ...interface{}) { - r.Event(reason, fmt.Sprintf(messageFmt, args...)) -} - -func (r *inMemoryEventRecorder) Warning(reason, message string) { - r.Lock() - defer r.Unlock() - event := makeEvent(r.clock, &inMemoryDummyObjectReference, r.source, corev1.EventTypeWarning, reason, message) - klog.Info(event.String()) - r.events = append(r.events, event) -} - -func (r *inMemoryEventRecorder) Warningf(reason, messageFmt string, args ...interface{}) { - r.Warning(reason, fmt.Sprintf(messageFmt, args...)) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_logging.go b/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_logging.go deleted file mode 100644 index 1906454a9..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_logging.go +++ /dev/null @@ -1,63 +0,0 @@ -package events - -import ( - "context" - "fmt" - "k8s.io/utils/clock" - - corev1 "k8s.io/api/core/v1" - "k8s.io/klog/v2" -) - -type LoggingEventRecorder struct { - component string - clock clock.PassiveClock - ctx context.Context -} - -func (r *LoggingEventRecorder) WithContext(ctx context.Context) Recorder { - r.ctx = ctx - return r -} - -// NewLoggingEventRecorder provides event recorder that will log all recorded events via klog. -func NewLoggingEventRecorder(component string, clock clock.PassiveClock) Recorder { - return &LoggingEventRecorder{ - component: component, - clock: clock, - } -} - -func (r *LoggingEventRecorder) ComponentName() string { - return r.component -} - -func (r *LoggingEventRecorder) ForComponent(component string) Recorder { - newRecorder := *r - newRecorder.component = component - return &newRecorder -} - -func (r *LoggingEventRecorder) Shutdown() {} - -func (r *LoggingEventRecorder) WithComponentSuffix(suffix string) Recorder { - return r.ForComponent(fmt.Sprintf("%s-%s", r.ComponentName(), suffix)) -} - -func (r *LoggingEventRecorder) Event(reason, message string) { - event := makeEvent(r.clock, &inMemoryDummyObjectReference, "", corev1.EventTypeNormal, reason, message) - klog.Info(event.String()) -} - -func (r *LoggingEventRecorder) Eventf(reason, messageFmt string, args ...interface{}) { - r.Event(reason, fmt.Sprintf(messageFmt, args...)) -} - -func (r *LoggingEventRecorder) Warning(reason, message string) { - event := makeEvent(r.clock, &inMemoryDummyObjectReference, "", corev1.EventTypeWarning, reason, message) - klog.Warning(event.String()) -} - -func (r *LoggingEventRecorder) Warningf(reason, messageFmt string, args ...interface{}) { - r.Warning(reason, fmt.Sprintf(messageFmt, args...)) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_upstream.go b/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_upstream.go deleted file mode 100644 index 282a9033d..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/events/recorder_upstream.go +++ /dev/null @@ -1,174 +0,0 @@ -package events - -import ( - "context" - "fmt" - "k8s.io/utils/clock" - "strings" - "sync" - - corev1 "k8s.io/api/core/v1" - "k8s.io/client-go/kubernetes/scheme" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/client-go/tools/record" - "k8s.io/component-base/metrics" - "k8s.io/component-base/metrics/legacyregistry" - "k8s.io/klog/v2" -) - -// NewKubeRecorder returns new event recorder with tweaked correlator options. -func NewKubeRecorderWithOptions(client corev1client.EventInterface, options record.CorrelatorOptions, sourceComponentName string, involvedObjectRef *corev1.ObjectReference, clock clock.PassiveClock) Recorder { - return (&upstreamRecorder{ - client: client, - component: sourceComponentName, - involvedObjectRef: involvedObjectRef, - options: options, - fallbackRecorder: NewRecorder(client, sourceComponentName, involvedObjectRef, clock), - }).ForComponent(sourceComponentName) -} - -// NewKubeRecorder returns new event recorder with default correlator options. -func NewKubeRecorder(client corev1client.EventInterface, sourceComponentName string, involvedObjectRef *corev1.ObjectReference, clock clock.PassiveClock) Recorder { - return NewKubeRecorderWithOptions(client, record.CorrelatorOptions{}, sourceComponentName, involvedObjectRef, clock) -} - -// upstreamRecorder is an implementation of Recorder interface. -type upstreamRecorder struct { - client corev1client.EventInterface - clientCtx context.Context - component string - broadcaster record.EventBroadcaster - eventRecorder record.EventRecorder - involvedObjectRef *corev1.ObjectReference - options record.CorrelatorOptions - - // shuttingDown indicates that the broadcaster for this recorder is being shut down - shuttingDown bool - shutdownMutex sync.RWMutex - - // fallbackRecorder is used when the kube recorder is shutting down - // in that case we create the events directly. - fallbackRecorder Recorder -} - -func (r *upstreamRecorder) WithContext(ctx context.Context) Recorder { - r.clientCtx = ctx - return r -} - -// RecommendedClusterSingletonCorrelatorOptions provides recommended event correlator options for components that produce -// many events (like operators). -func RecommendedClusterSingletonCorrelatorOptions() record.CorrelatorOptions { - return record.CorrelatorOptions{ - BurstSize: 60, // default: 25 (change allows a single source to send 50 events about object per minute) - QPS: 1. / 1., // default: 1/300 (change allows refill rate to 1 new event every 1s) - KeyFunc: func(event *corev1.Event) (aggregateKey string, localKey string) { - return strings.Join([]string{ - event.Source.Component, - event.Source.Host, - event.InvolvedObject.Kind, - event.InvolvedObject.Namespace, - event.InvolvedObject.Name, - string(event.InvolvedObject.UID), - event.InvolvedObject.APIVersion, - event.Type, - event.Reason, - // By default, KeyFunc don't use message for aggregation, this cause events with different message, but same reason not be lost as "similar events". - event.Message, - }, ""), event.Message - }, - } -} - -var eventsCounterMetric = metrics.NewCounterVec(&metrics.CounterOpts{ - Subsystem: "event_recorder", - Name: "total_events_count", - Help: "Total count of events processed by this event recorder per involved object", - StabilityLevel: metrics.ALPHA, -}, []string{"severity"}) - -func init() { - (&sync.Once{}).Do(func() { - legacyregistry.MustRegister(eventsCounterMetric) - }) -} - -func (r *upstreamRecorder) ForComponent(componentName string) Recorder { - newRecorderForComponent := upstreamRecorder{ - client: r.client, - fallbackRecorder: r.fallbackRecorder.WithComponentSuffix(componentName), - options: r.options, - involvedObjectRef: r.involvedObjectRef, - shuttingDown: r.shuttingDown, - } - - // tweak the event correlator, so we don't loose important events. - broadcaster := record.NewBroadcasterWithCorrelatorOptions(r.options) - broadcaster.StartLogging(klog.Infof) - broadcaster.StartRecordingToSink(&corev1client.EventSinkImpl{Interface: newRecorderForComponent.client}) - - newRecorderForComponent.eventRecorder = broadcaster.NewRecorder(scheme.Scheme, corev1.EventSource{Component: componentName}) - newRecorderForComponent.broadcaster = broadcaster - newRecorderForComponent.component = componentName - - return &newRecorderForComponent -} - -func (r *upstreamRecorder) Shutdown() { - r.shutdownMutex.Lock() - r.shuttingDown = true - r.shutdownMutex.Unlock() - // Wait for broadcaster to flush events (this is blocking) - // TODO: There is still race condition in upstream that might cause panic() on events recorded after the shutdown - // is called as the event recording is not-blocking (go routine based). - r.broadcaster.Shutdown() -} - -func (r *upstreamRecorder) WithComponentSuffix(suffix string) Recorder { - return r.ForComponent(fmt.Sprintf("%s-%s", r.ComponentName(), suffix)) -} - -func (r *upstreamRecorder) ComponentName() string { - return r.component -} - -// Eventf emits the normal type event and allow formatting of message. -func (r *upstreamRecorder) Eventf(reason, messageFmt string, args ...interface{}) { - r.Event(reason, fmt.Sprintf(messageFmt, args...)) -} - -// Warningf emits the warning type event and allow formatting of message. -func (r *upstreamRecorder) Warningf(reason, messageFmt string, args ...interface{}) { - r.Warning(reason, fmt.Sprintf(messageFmt, args...)) -} - -func (r *upstreamRecorder) incrementEventsCounter(severity string) { - if r.involvedObjectRef == nil { - return - } - eventsCounterMetric.WithLabelValues(severity).Inc() -} - -// Event emits the normal type event. -func (r *upstreamRecorder) Event(reason, message string) { - r.shutdownMutex.RLock() - defer r.shutdownMutex.RUnlock() - defer r.incrementEventsCounter(corev1.EventTypeNormal) - if r.shuttingDown { - r.fallbackRecorder.Event(reason, message) - return - } - r.eventRecorder.Event(r.involvedObjectRef, corev1.EventTypeNormal, reason, message) -} - -// Warning emits the warning type event. -func (r *upstreamRecorder) Warning(reason, message string) { - r.shutdownMutex.RLock() - defer r.shutdownMutex.RUnlock() - defer r.incrementEventsCounter(corev1.EventTypeWarning) - if r.shuttingDown { - r.fallbackRecorder.Warning(reason, message) - return - } - r.eventRecorder.Event(r.involvedObjectRef, corev1.EventTypeWarning, reason, message) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/management/management_state.go b/vendor/github.com/openshift/library-go/pkg/operator/management/management_state.go deleted file mode 100644 index 4837a6c16..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/management/management_state.go +++ /dev/null @@ -1,77 +0,0 @@ -package management - -import ( - v1 "github.com/openshift/api/operator/v1" -) - -var ( - allowOperatorUnmanagedState = true - allowOperatorRemovedState = true -) - -// SetOperatorAlwaysManaged is one time choice when an operator want to opt-out from supporting the "unmanaged" state. -// This is a case of control plane operators or operators that are required to always run otherwise the cluster will -// get into unstable state or critical components will stop working. -func SetOperatorAlwaysManaged() { - allowOperatorUnmanagedState = false -} - -// SetOperatorUnmanageable is one time choice when an operator wants to support the "unmanaged" state. -// This is the default setting, provided here mostly for unit tests. -func SetOperatorUnmanageable() { - allowOperatorUnmanagedState = true -} - -// SetOperatorNotRemovable is one time choice the operator author can make to indicate the operator does not support -// removing of his operand. This makes sense for operators like kube-apiserver where removing operand will lead to a -// bricked, non-automatically recoverable state. -func SetOperatorNotRemovable() { - allowOperatorRemovedState = false -} - -// SetOperatorRemovable is one time choice the operator author can make to indicate the operator supports -// removing of his operand. -// This is the default setting, provided here mostly for unit tests. -func SetOperatorRemovable() { - allowOperatorRemovedState = true -} - -// IsOperatorAlwaysManaged means the operator can't be set to unmanaged state. -func IsOperatorAlwaysManaged() bool { - return !allowOperatorUnmanagedState -} - -// IsOperatorNotRemovable means the operator can't be set to removed state. -func IsOperatorNotRemovable() bool { - return !allowOperatorRemovedState -} - -// IsOperatorRemovable means the operator can be set to removed state. -func IsOperatorRemovable() bool { - return allowOperatorRemovedState -} - -func IsOperatorUnknownState(state v1.ManagementState) bool { - switch state { - case v1.Managed, v1.Removed, v1.Unmanaged: - return false - default: - return true - } -} - -// IsOperatorManaged indicates whether the operator management state allows the control loop to proceed and manage the operand. -func IsOperatorManaged(state v1.ManagementState) bool { - if IsOperatorAlwaysManaged() { - return true - } - switch state { - case v1.Managed: - return true - case v1.Removed: - return false - case v1.Unmanaged: - return false - } - return true -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/admissionregistration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/admissionregistration.go deleted file mode 100644 index 0b52c3a32..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/admissionregistration.go +++ /dev/null @@ -1,465 +0,0 @@ -package resourceapply - -import ( - "context" - "fmt" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - admissionregistrationclientv1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1" - admissionregistrationclientv1beta1 "k8s.io/client-go/kubernetes/typed/admissionregistration/v1beta1" - "k8s.io/klog/v2" -) - -// ApplyMutatingWebhookConfigurationImproved ensures the form of the specified -// mutatingwebhookconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// mutatingwebhookconfiguration will be merged with the existing mutatingwebhookconfiguration -// and an update performed if the mutatingwebhookconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyMutatingWebhookConfigurationImproved(ctx context.Context, client admissionregistrationclientv1.MutatingWebhookConfigurationsGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1.MutatingWebhookConfiguration, cache ResourceCache) (*admissionregistrationv1.MutatingWebhookConfiguration, bool, error) { - - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.MutatingWebhookConfigurations().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.MutatingWebhookConfigurations().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1.MutatingWebhookConfiguration), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - copyMutatingWebhookCABundle(existing, required) - webhooksEquivalent := equality.Semantic.DeepEqual(existingCopy.Webhooks, required.Webhooks) - if webhooksEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Webhooks = required.Webhooks - - klog.V(2).Infof("MutatingWebhookConfiguration %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.MutatingWebhookConfigurations().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -// copyMutatingWebhookCABundle populates webhooks[].clientConfig.caBundle fields from existing resource if it was set before -// and is not set in present. This provides upgrade compatibility with service-ca-bundle operator. -func copyMutatingWebhookCABundle(from, to *admissionregistrationv1.MutatingWebhookConfiguration) { - fromMap := make(map[string]admissionregistrationv1.MutatingWebhook, len(from.Webhooks)) - for _, webhook := range from.Webhooks { - fromMap[webhook.Name] = webhook - } - - for i, wh := range to.Webhooks { - if existing, ok := fromMap[wh.Name]; ok && wh.ClientConfig.CABundle == nil { - to.Webhooks[i].ClientConfig.CABundle = existing.ClientConfig.CABundle - } - } -} - -// ApplyValidatingWebhookConfigurationImproved ensures the form of the specified -// validatingwebhookconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// validatingwebhookconfiguration will be merged with the existing validatingwebhookconfiguration -// and an update performed if the validatingwebhookconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyValidatingWebhookConfigurationImproved(ctx context.Context, client admissionregistrationclientv1.ValidatingWebhookConfigurationsGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1.ValidatingWebhookConfiguration, cache ResourceCache) (*admissionregistrationv1.ValidatingWebhookConfiguration, bool, error) { - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.ValidatingWebhookConfigurations().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.ValidatingWebhookConfigurations().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1.ValidatingWebhookConfiguration), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - copyValidatingWebhookCABundle(existing, required) - webhooksEquivalent := equality.Semantic.DeepEqual(existingCopy.Webhooks, required.Webhooks) - if webhooksEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Webhooks = required.Webhooks - - klog.V(2).Infof("ValidatingWebhookConfiguration %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.ValidatingWebhookConfigurations().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -func DeleteValidatingWebhookConfiguration(ctx context.Context, client admissionregistrationclientv1.ValidatingWebhookConfigurationsGetter, recorder events.Recorder, required *admissionregistrationv1.ValidatingWebhookConfiguration) (*admissionregistrationv1.ValidatingWebhookConfiguration, bool, error) { - err := client.ValidatingWebhookConfigurations().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -// copyValidatingWebhookCABundle populates webhooks[].clientConfig.caBundle fields from existing resource if it was set before -// and is not set in present. This provides upgrade compatibility with service-ca-bundle operator. -func copyValidatingWebhookCABundle(from, to *admissionregistrationv1.ValidatingWebhookConfiguration) { - fromMap := make(map[string]admissionregistrationv1.ValidatingWebhook, len(from.Webhooks)) - for _, webhook := range from.Webhooks { - fromMap[webhook.Name] = webhook - } - - for i, wh := range to.Webhooks { - if existing, ok := fromMap[wh.Name]; ok && wh.ClientConfig.CABundle == nil { - to.Webhooks[i].ClientConfig.CABundle = existing.ClientConfig.CABundle - } - } -} - -// ApplyValidatingAdmissionPolicyV1beta1 ensures the form of the specified -// validatingadmissionpolicyconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// validatingadmissionpolicyconfiguration will be merged with the existing validatingadmissionpolicyconfiguration -// and an update performed if the validatingadmissionpolicyconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyValidatingAdmissionPolicyV1beta1(ctx context.Context, client admissionregistrationclientv1beta1.ValidatingAdmissionPoliciesGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1beta1.ValidatingAdmissionPolicy, cache ResourceCache) (*admissionregistrationv1beta1.ValidatingAdmissionPolicy, bool, error) { - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.ValidatingAdmissionPolicies().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.ValidatingAdmissionPolicies().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1beta1.ValidatingAdmissionPolicy), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - specEquivalent := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if specEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = required.Spec - - klog.V(2).Infof("ValidatingAdmissionPolicyConfigurationV1beta1 %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.ValidatingAdmissionPolicies().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -// ApplyValidatingAdmissionPolicyV1 ensures the form of the specified -// validatingadmissionpolicyconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// validatingadmissionpolicyconfiguration will be merged with the existing validatingadmissionpolicyconfiguration -// and an update performed if the validatingadmissionpolicyconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyValidatingAdmissionPolicyV1(ctx context.Context, client admissionregistrationclientv1.ValidatingAdmissionPoliciesGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1.ValidatingAdmissionPolicy, cache ResourceCache) (*admissionregistrationv1.ValidatingAdmissionPolicy, bool, error) { - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.ValidatingAdmissionPolicies().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.ValidatingAdmissionPolicies().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1.ValidatingAdmissionPolicy), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - specEquivalent := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if specEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = required.Spec - - klog.V(2).Infof("ValidatingAdmissionPolicyConfigurationV1 %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.ValidatingAdmissionPolicies().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -// ApplyValidatingAdmissionPolicyBindingV1beta1 ensures the form of the specified -// validatingadmissionpolicybindingconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// validatingadmissionpolicybindingconfiguration will be merged with the existing validatingadmissionpolicybindingconfiguration -// and an update performed if the validatingadmissionpolicybindingconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyValidatingAdmissionPolicyBindingV1beta1(ctx context.Context, client admissionregistrationclientv1beta1.ValidatingAdmissionPolicyBindingsGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, cache ResourceCache) (*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, bool, error) { - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.ValidatingAdmissionPolicyBindings().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.ValidatingAdmissionPolicyBindings().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - specEquivalent := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if specEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = required.Spec - - klog.V(2).Infof("ValidatingAdmissionPolicyBindingConfigurationV1beta1 %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.ValidatingAdmissionPolicyBindings().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -// ApplyValidatingAdmissionPolicyBindingV1 ensures the form of the specified -// validatingadmissionpolicybindingconfiguration is present in the API. If it does not exist, -// it will be created. If it does exist, the metadata of the required -// validatingadmissionpolicybindingconfiguration will be merged with the existing validatingadmissionpolicybindingconfiguration -// and an update performed if the validatingadmissionpolicybindingconfiguration spec and metadata differ from -// the previously required spec and metadata based on generation change. -func ApplyValidatingAdmissionPolicyBindingV1(ctx context.Context, client admissionregistrationclientv1.ValidatingAdmissionPolicyBindingsGetter, recorder events.Recorder, - requiredOriginal *admissionregistrationv1.ValidatingAdmissionPolicyBinding, cache ResourceCache) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, bool, error) { - if requiredOriginal == nil { - return nil, false, fmt.Errorf("Unexpected nil instead of an object") - } - - existing, err := client.ValidatingAdmissionPolicyBindings().Get(ctx, requiredOriginal.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - required := requiredOriginal.DeepCopy() - actual, err := client.ValidatingAdmissionPolicyBindings().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(required).(*admissionregistrationv1.ValidatingAdmissionPolicyBinding), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil - } else if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredOriginal, existing) { - return existing, false, nil - } - - required := requiredOriginal.DeepCopy() - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - specEquivalent := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if specEquivalent && !modified { - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, existingCopy) - return existingCopy, false, nil - } - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = required.Spec - - klog.V(2).Infof("ValidatingAdmissionPolicyBindingConfigurationV1 %q changes: %v", required.GetNamespace()+"/"+required.GetName(), JSONPatchNoError(existing, toWrite)) - - actual, err := client.ValidatingAdmissionPolicyBindings().Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - if err != nil { - return nil, false, err - } - // need to store the original so that the early comparison of hashes is done based on the original, not a mutated copy - cache.UpdateCachedResourceMetadata(requiredOriginal, actual) - return actual, true, nil -} - -func DeleteValidatingAdmissionPolicyV1beta1(ctx context.Context, client admissionregistrationclientv1beta1.ValidatingAdmissionPoliciesGetter, recorder events.Recorder, required *admissionregistrationv1beta1.ValidatingAdmissionPolicy) (*admissionregistrationv1beta1.ValidatingAdmissionPolicy, bool, error) { - err := client.ValidatingAdmissionPolicies().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteValidatingAdmissionPolicyBindingV1beta1(ctx context.Context, client admissionregistrationclientv1beta1.ValidatingAdmissionPolicyBindingsGetter, recorder events.Recorder, required *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding) (*admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding, bool, error) { - err := client.ValidatingAdmissionPolicyBindings().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteValidatingAdmissionPolicyV1(ctx context.Context, client admissionregistrationclientv1.ValidatingAdmissionPoliciesGetter, recorder events.Recorder, required *admissionregistrationv1.ValidatingAdmissionPolicy) (*admissionregistrationv1.ValidatingAdmissionPolicy, bool, error) { - err := client.ValidatingAdmissionPolicies().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteValidatingAdmissionPolicyBindingV1(ctx context.Context, client admissionregistrationclientv1.ValidatingAdmissionPolicyBindingsGetter, recorder events.Recorder, required *admissionregistrationv1.ValidatingAdmissionPolicyBinding) (*admissionregistrationv1.ValidatingAdmissionPolicyBinding, bool, error) { - err := client.ValidatingAdmissionPolicyBindings().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiextensions.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiextensions.go deleted file mode 100644 index 0e76cf834..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiextensions.go +++ /dev/null @@ -1,57 +0,0 @@ -package resourceapply - -import ( - "context" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextclientv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog/v2" -) - -// ApplyCustomResourceDefinitionV1 applies the required CustomResourceDefinition to the cluster. -func ApplyCustomResourceDefinitionV1(ctx context.Context, client apiextclientv1.CustomResourceDefinitionsGetter, recorder events.Recorder, required *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, bool, error) { - existing, err := client.CustomResourceDefinitions().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.CustomResourceDefinitions().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*apiextensionsv1.CustomResourceDefinition), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - resourcemerge.EnsureCustomResourceDefinitionV1(&modified, existingCopy, *required) - if !modified { - return existing, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("CustomResourceDefinition %q changes: %s", existing.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.CustomResourceDefinitions().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - - return actual, true, err -} - -func DeleteCustomResourceDefinitionV1(ctx context.Context, client apiextclientv1.CustomResourceDefinitionsGetter, recorder events.Recorder, required *apiextensionsv1.CustomResourceDefinition) (*apiextensionsv1.CustomResourceDefinition, bool, error) { - err := client.CustomResourceDefinitions().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiregistration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiregistration.go deleted file mode 100644 index e465438f6..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apiregistration.go +++ /dev/null @@ -1,52 +0,0 @@ -package resourceapply - -import ( - "context" - - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog/v2" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - apiregistrationv1client "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -// ApplyAPIService merges objectmeta and requires apiservice coordinates. It does not touch CA bundles, which should be managed via service CA controller. -func ApplyAPIService(ctx context.Context, client apiregistrationv1client.APIServicesGetter, recorder events.Recorder, required *apiregistrationv1.APIService) (*apiregistrationv1.APIService, bool, error) { - existing, err := client.APIServices().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.APIServices().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*apiregistrationv1.APIService), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - serviceSame := equality.Semantic.DeepEqual(existingCopy.Spec.Service, required.Spec.Service) - prioritySame := existingCopy.Spec.VersionPriority == required.Spec.VersionPriority && existingCopy.Spec.GroupPriorityMinimum == required.Spec.GroupPriorityMinimum - insecureSame := existingCopy.Spec.InsecureSkipTLSVerify == required.Spec.InsecureSkipTLSVerify - // there was no change to metadata, the service and priorities were right - if !modified && serviceSame && prioritySame && insecureSame { - return existingCopy, false, nil - } - - existingCopy.Spec = required.Spec - - if klog.V(2).Enabled() { - klog.Infof("APIService %q changes: %s", existing.Name, JSONPatchNoError(existing, existingCopy)) - } - actual, err := client.APIServices().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apps.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apps.go deleted file mode 100644 index c53e370de..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/apps.go +++ /dev/null @@ -1,271 +0,0 @@ -package resourceapply - -import ( - "context" - "crypto/sha256" - "encoding/json" - "fmt" - - "k8s.io/klog/v2" - - appsv1 "k8s.io/api/apps/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/uuid" - appsclientv1 "k8s.io/client-go/kubernetes/typed/apps/v1" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -// The Apply methods in this file ensure that a resource is created or updated to match -// the form provided by the caller. -// -// If the resource does not yet exist, it will be created. -// -// If the resource exists, the metadata of the required resource will be merged with the -// existing resource and an update will be performed if the spec and metadata differ between -// the required and existing resources. To be reliable, the input of the required spec from -// the operator should be stable. It does not need to set all fields, since some fields are -// defaulted server-side. Detection of spec drift from intent by other actors is determined -// by generation, not by spec comparison. -// -// To ensure an update in response to state external to the resource spec, the caller should -// set an annotation representing that external state e.g. -// -// `myoperator.openshift.io/config-resource-version: ` -// -// An update will be performed if: -// -// - The required resource metadata differs from that of the existing resource. -// - The difference will be detected by comparing the name, namespace, labels and -// annotations of the 2 resources. -// -// - The generation expected by the operator differs from generation of the existing -// resource. -// - This is the likely result of an actor other than the operator updating a resource -// managed by the operator. -// -// - The spec of the required resource differs from the spec of the existing resource. -// - The difference will be detected via metadata comparison since the hash of the -// resource's spec will be set as an annotation prior to comparison. - -const specHashAnnotation = "operator.openshift.io/spec-hash" - -// SetSpecHashAnnotation computes the hash of the provided spec and sets an annotation of the -// hash on the provided ObjectMeta. This method is used internally by Apply methods, and -// is exposed to support testing with fake clients that need to know the mutated form of the -// resource resulting from an Apply call. -func SetSpecHashAnnotation(objMeta *metav1.ObjectMeta, spec interface{}) error { - jsonBytes, err := json.Marshal(spec) - if err != nil { - return err - } - specHash := fmt.Sprintf("%x", sha256.Sum256(jsonBytes)) - if objMeta.Annotations == nil { - objMeta.Annotations = map[string]string{} - } - objMeta.Annotations[specHashAnnotation] = specHash - return nil -} - -// ApplyDeployment ensures the form of the specified deployment is present in the API. If it -// does not exist, it will be created. If it does exist, the metadata of the required -// deployment will be merged with the existing deployment and an update performed if the -// deployment spec and metadata differ from the previously required spec and metadata. For -// further detail, check the top-level comment. -// -// NOTE: The previous implementation of this method was renamed to -// ApplyDeploymentWithForce. If are reading this in response to a compile error due to the -// change in signature, you have the following options: -// -// - Update the calling code to rely on the spec comparison provided by the new -// implementation. If the code in question was specifying the force parameter to ensure -// rollout in response to changes in resources external to the deployment, it will need to be -// revised to set that external state as an annotation e.g. -// -// myoperator.openshift.io/my-resource: -// -// - Update the call to use ApplyDeploymentWithForce. This is available as a temporary measure -// but the method is deprecated and will be removed in 4.6. -func ApplyDeployment(ctx context.Context, client appsclientv1.DeploymentsGetter, recorder events.Recorder, - requiredOriginal *appsv1.Deployment, expectedGeneration int64) (*appsv1.Deployment, bool, error) { - - required := requiredOriginal.DeepCopy() - err := SetSpecHashAnnotation(&required.ObjectMeta, required.Spec) - if err != nil { - return nil, false, err - } - - return ApplyDeploymentWithForce(ctx, client, recorder, required, expectedGeneration, false) -} - -// ApplyDeploymentWithForce merges objectmeta and requires matching generation. It returns the final Object, whether any change as made, and an error. -// -// DEPRECATED - This method will be removed in 4.6 and callers will need to migrate to ApplyDeployment before then. -func ApplyDeploymentWithForce(ctx context.Context, client appsclientv1.DeploymentsGetter, recorder events.Recorder, requiredOriginal *appsv1.Deployment, expectedGeneration int64, - forceRollout bool) (*appsv1.Deployment, bool, error) { - - required := requiredOriginal.DeepCopy() - if required.Annotations == nil { - required.Annotations = map[string]string{} - } - if _, ok := required.Annotations[specHashAnnotation]; !ok { - // If the spec hash annotation is not present, the caller expects the - // pull-spec annotation to be applied. - required.Annotations["operator.openshift.io/pull-spec"] = required.Spec.Template.Spec.Containers[0].Image - } - existing, err := client.Deployments(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - actual, err := client.Deployments(required.Namespace).Create(ctx, required, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - // there was no change to metadata, the generation was right, and we weren't asked for force the deployment - if !modified && existingCopy.ObjectMeta.Generation == expectedGeneration && !forceRollout { - return existingCopy, false, nil - } - - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = *required.Spec.DeepCopy() - if forceRollout { - // forces a deployment - forceString := string(uuid.NewUUID()) - if toWrite.Annotations == nil { - toWrite.Annotations = map[string]string{} - } - if toWrite.Spec.Template.Annotations == nil { - toWrite.Spec.Template.Annotations = map[string]string{} - } - toWrite.Annotations["operator.openshift.io/force"] = forceString - toWrite.Spec.Template.Annotations["operator.openshift.io/force"] = forceString - } - - if klog.V(2).Enabled() { - klog.Infof("Deployment %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, toWrite)) - } - - actual, err := client.Deployments(required.Namespace).Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -// ApplyDaemonSet ensures the form of the specified daemonset is present in the API. If it -// does not exist, it will be created. If it does exist, the metadata of the required -// daemonset will be merged with the existing daemonset and an update performed if the -// daemonset spec and metadata differ from the previously required spec and metadata. For -// further detail, check the top-level comment. -// -// NOTE: The previous implementation of this method was renamed to ApplyDaemonSetWithForce. If -// are reading this in response to a compile error due to the change in signature, you have -// the following options: -// -// - Update the calling code to rely on the spec comparison provided by the new -// implementation. If the code in question was specifying the force parameter to ensure -// rollout in response to changes in resources external to the daemonset, it will need to be -// revised to set that external state as an annotation e.g. -// -// myoperator.openshift.io/my-resource: -// -// - Update the call to use ApplyDaemonSetWithForce. This is available as a temporary measure -// but the method is deprecated and will be removed in 4.6. -func ApplyDaemonSet(ctx context.Context, client appsclientv1.DaemonSetsGetter, recorder events.Recorder, - requiredOriginal *appsv1.DaemonSet, expectedGeneration int64) (*appsv1.DaemonSet, bool, error) { - - required := requiredOriginal.DeepCopy() - err := SetSpecHashAnnotation(&required.ObjectMeta, required.Spec) - if err != nil { - return nil, false, err - } - - return ApplyDaemonSetWithForce(ctx, client, recorder, required, expectedGeneration, false) -} - -// ApplyDaemonSetWithForce merges objectmeta and requires matching generation. It returns the final Object, whether any change as made, and an error -// DEPRECATED - This method will be removed in 4.6 and callers will need to migrate to ApplyDaemonSet before then. -func ApplyDaemonSetWithForce(ctx context.Context, client appsclientv1.DaemonSetsGetter, recorder events.Recorder, requiredOriginal *appsv1.DaemonSet, expectedGeneration int64, forceRollout bool) (*appsv1.DaemonSet, bool, error) { - required := requiredOriginal.DeepCopy() - if required.Annotations == nil { - required.Annotations = map[string]string{} - } - if _, ok := required.Annotations[specHashAnnotation]; !ok { - // If the spec hash annotation is not present, the caller expects the - // pull-spec annotation to be applied. - required.Annotations["operator.openshift.io/pull-spec"] = required.Spec.Template.Spec.Containers[0].Image - } - existing, err := client.DaemonSets(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - actual, err := client.DaemonSets(required.Namespace).Create(ctx, required, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - // there was no change to metadata, the generation was right, and we weren't asked for force the deployment - if !modified && existingCopy.ObjectMeta.Generation == expectedGeneration && !forceRollout { - return existingCopy, false, nil - } - - // at this point we know that we're going to perform a write. We're just trying to get the object correct - toWrite := existingCopy // shallow copy so the code reads easier - toWrite.Spec = *required.Spec.DeepCopy() - if forceRollout { - // forces a deployment - forceString := string(uuid.NewUUID()) - if toWrite.Annotations == nil { - toWrite.Annotations = map[string]string{} - } - if toWrite.Spec.Template.Annotations == nil { - toWrite.Spec.Template.Annotations = map[string]string{} - } - toWrite.Annotations["operator.openshift.io/force"] = forceString - toWrite.Spec.Template.Annotations["operator.openshift.io/force"] = forceString - } - - if klog.V(2).Enabled() { - klog.Infof("DaemonSet %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, toWrite)) - } - actual, err := client.DaemonSets(required.Namespace).Update(ctx, toWrite, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -func DeleteDeployment(ctx context.Context, client appsclientv1.DeploymentsGetter, recorder events.Recorder, required *appsv1.Deployment) (*appsv1.Deployment, bool, error) { - err := client.Deployments(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteDaemonSet(ctx context.Context, client appsclientv1.DaemonSetsGetter, recorder events.Recorder, required *appsv1.DaemonSet) (*appsv1.DaemonSet, bool, error) { - err := client.DaemonSets(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/core.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/core.go deleted file mode 100644 index 377e27806..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/core.go +++ /dev/null @@ -1,698 +0,0 @@ -package resourceapply - -import ( - "bytes" - "context" - "fmt" - "sort" - "strings" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/sets" - coreclientv1 "k8s.io/client-go/kubernetes/typed/core/v1" - "k8s.io/klog/v2" - "k8s.io/utils/ptr" -) - -// TODO find way to create a registry of these based on struct mapping or some such that forces users to get this right -// -// for creating an ApplyGeneric -// Perhaps a struct containing the apply function and the getKind -func getCoreGroupKind(obj runtime.Object) *schema.GroupKind { - switch obj.(type) { - case *corev1.Namespace: - return &schema.GroupKind{ - Kind: "Namespace", - } - case *corev1.Service: - return &schema.GroupKind{ - Kind: "Service", - } - case *corev1.Pod: - return &schema.GroupKind{ - Kind: "Pod", - } - case *corev1.ServiceAccount: - return &schema.GroupKind{ - Kind: "ServiceAccount", - } - case *corev1.ConfigMap: - return &schema.GroupKind{ - Kind: "ConfigMap", - } - case *corev1.Secret: - return &schema.GroupKind{ - Kind: "Secret", - } - default: - return nil - } -} - -// ApplyNamespace merges objectmeta, does not worry about anything else -func ApplyNamespace(ctx context.Context, client coreclientv1.NamespacesGetter, recorder events.Recorder, required *corev1.Namespace) (*corev1.Namespace, bool, error) { - return ApplyNamespaceImproved(ctx, client, recorder, required, noCache) -} - -// ApplyService merges objectmeta and requires -// TODO, since this cannot determine whether changes are due to legitimate actors (api server) or illegitimate ones (users), we cannot update -// TODO I've special cased the selector for now -func ApplyService(ctx context.Context, client coreclientv1.ServicesGetter, recorder events.Recorder, required *corev1.Service) (*corev1.Service, bool, error) { - return ApplyServiceImproved(ctx, client, recorder, required, noCache) -} - -// ApplyPod merges objectmeta, does not worry about anything else -func ApplyPod(ctx context.Context, client coreclientv1.PodsGetter, recorder events.Recorder, required *corev1.Pod) (*corev1.Pod, bool, error) { - return ApplyPodImproved(ctx, client, recorder, required, noCache) -} - -// ApplyServiceAccount merges objectmeta, does not worry about anything else -func ApplyServiceAccount(ctx context.Context, client coreclientv1.ServiceAccountsGetter, recorder events.Recorder, required *corev1.ServiceAccount) (*corev1.ServiceAccount, bool, error) { - return ApplyServiceAccountImproved(ctx, client, recorder, required, noCache) -} - -// ApplyConfigMap merges objectmeta, requires data -func ApplyConfigMap(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, required *corev1.ConfigMap) (*corev1.ConfigMap, bool, error) { - return ApplyConfigMapImproved(ctx, client, recorder, required, noCache) -} - -// ApplySecret merges objectmeta, requires data -func ApplySecret(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, required *corev1.Secret) (*corev1.Secret, bool, error) { - return ApplySecretImproved(ctx, client, recorder, required, noCache) -} - -// ApplyNamespace merges objectmeta, does not worry about anything else -func ApplyNamespaceImproved(ctx context.Context, client coreclientv1.NamespacesGetter, recorder events.Recorder, required *corev1.Namespace, cache ResourceCache) (*corev1.Namespace, bool, error) { - existing, err := client.Namespaces().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.Namespaces(). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.Namespace), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - if !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("Namespace %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.Namespaces().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -// ApplyService merges objectmeta and requires. -// It detects changes in `required`, i.e. an operator needs .spec changes and overwrites existing .spec with those. -// TODO, since this cannot determine whether changes in `existing` are due to legitimate actors (api server) or illegitimate ones (users), we cannot update. -// TODO I've special cased the selector for now -func ApplyServiceImproved(ctx context.Context, client coreclientv1.ServicesGetter, recorder events.Recorder, requiredOriginal *corev1.Service, cache ResourceCache) (*corev1.Service, bool, error) { - required := requiredOriginal.DeepCopy() - err := SetSpecHashAnnotation(&required.ObjectMeta, required.Spec) - if err != nil { - return nil, false, err - } - - existing, err := client.Services(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.Services(requiredCopy.Namespace). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.Service), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - // This will catch also changes between old `required.spec` and current `required.spec`, because - // the annotation from SetSpecHashAnnotation will be different. - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - selectorSame := equality.Semantic.DeepEqual(existingCopy.Spec.Selector, required.Spec.Selector) - - typeSame := false - requiredIsEmpty := len(required.Spec.Type) == 0 - existingCopyIsCluster := existingCopy.Spec.Type == corev1.ServiceTypeClusterIP - if (requiredIsEmpty && existingCopyIsCluster) || equality.Semantic.DeepEqual(existingCopy.Spec.Type, required.Spec.Type) { - typeSame = true - } - - if selectorSame && typeSame && !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - - // Either (user changed selector or type) or metadata changed (incl. spec hash). Stomp over - // any user *and* Kubernetes changes, hoping that Kubernetes will restore its values. - existingCopy.Spec = required.Spec - if klog.V(4).Enabled() { - klog.Infof("Service %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, required)) - } - - actual, err := client.Services(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -// ApplyPod merges objectmeta, does not worry about anything else -func ApplyPodImproved(ctx context.Context, client coreclientv1.PodsGetter, recorder events.Recorder, required *corev1.Pod, cache ResourceCache) (*corev1.Pod, bool, error) { - existing, err := client.Pods(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.Pods(requiredCopy.Namespace). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.Pod), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - if !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("Pod %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, required)) - } - - actual, err := client.Pods(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -// ApplyServiceAccount merges objectmeta, does not worry about anything else -func ApplyServiceAccountImproved(ctx context.Context, client coreclientv1.ServiceAccountsGetter, recorder events.Recorder, required *corev1.ServiceAccount, cache ResourceCache) (*corev1.ServiceAccount, bool, error) { - existing, err := client.ServiceAccounts(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.ServiceAccounts(requiredCopy.Namespace). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.ServiceAccount), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - if !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - if klog.V(2).Enabled() { - klog.Infof("ServiceAccount %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, required)) - } - actual, err := client.ServiceAccounts(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -// ApplyConfigMap merges objectmeta, requires data -func ApplyConfigMapImproved(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, required *corev1.ConfigMap, cache ResourceCache) (*corev1.ConfigMap, bool, error) { - existing, err := client.ConfigMaps(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.ConfigMaps(requiredCopy.Namespace). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.ConfigMap), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - - // injected by cluster-network-operator: https://github.com/openshift/cluster-network-operator/blob/acc819ee0f3424a341b9ad4e1e83ca0a742c230a/docs/architecture.md?L192#configmap-ca-injector - caBundleInjected := required.Labels["config.openshift.io/inject-trusted-cabundle"] == "true" - _, newCABundleRequired := required.Data["ca-bundle.crt"] - - // injected by service-ca-operator: https://github.com/openshift/service-ca-operator/blob/f409fb9e308ace1e5f8596add187d2239b073e23/README.md#openshift-service-ca-operator - serviceCAInjected := required.Annotations["service.beta.openshift.io/inject-cabundle"] == "true" - _, newServiceCARequired := required.Data["service-ca.crt"] - - var modifiedKeys []string - for existingCopyKey, existingCopyValue := range existingCopy.Data { - // if we're injecting a ca-bundle or a service-ca and the required isn't forcing the value, then don't use the value of existing - // to drive a diff detection. If required has set the value then we need to force the value in order to have apply - // behave predictably. - if caBundleInjected && !newCABundleRequired && existingCopyKey == "ca-bundle.crt" { - continue - } - if serviceCAInjected && !newServiceCARequired && existingCopyKey == "service-ca.crt" { - continue - } - - if requiredValue, ok := required.Data[existingCopyKey]; !ok || (existingCopyValue != requiredValue) { - modifiedKeys = append(modifiedKeys, "data."+existingCopyKey) - } - } - for existingCopyKey, existingCopyBinValue := range existingCopy.BinaryData { - if requiredBinValue, ok := required.BinaryData[existingCopyKey]; !ok || !bytes.Equal(existingCopyBinValue, requiredBinValue) { - modifiedKeys = append(modifiedKeys, "binaryData."+existingCopyKey) - } - } - for requiredKey := range required.Data { - if _, ok := existingCopy.Data[requiredKey]; !ok { - modifiedKeys = append(modifiedKeys, "data."+requiredKey) - } - } - for requiredBinKey := range required.BinaryData { - if _, ok := existingCopy.BinaryData[requiredBinKey]; !ok { - modifiedKeys = append(modifiedKeys, "binaryData."+requiredBinKey) - } - } - - dataSame := len(modifiedKeys) == 0 - if dataSame && !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - existingCopy.Data = required.Data - existingCopy.BinaryData = required.BinaryData - // if we're injecting a cabundle, and we had a previous value, and the required object isn't setting the value, then set back to the previous - if existingCABundle, existedBefore := existing.Data["ca-bundle.crt"]; caBundleInjected && existedBefore && !newCABundleRequired { - if existingCopy.Data == nil { - existingCopy.Data = map[string]string{} - } - existingCopy.Data["ca-bundle.crt"] = existingCABundle - } - - actual, err := client.ConfigMaps(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - - var details string - if !dataSame { - sort.Sort(sort.StringSlice(modifiedKeys)) - details = fmt.Sprintf("cause by changes in %v", strings.Join(modifiedKeys, ",")) - } - if klog.V(2).Enabled() { - klog.Infof("ConfigMap %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, required)) - } - resourcehelper.ReportUpdateEvent(recorder, required, err, details) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -// ApplySecret merges objectmeta, requires data -func ApplySecretImproved(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, requiredInput *corev1.Secret, cache ResourceCache) (*corev1.Secret, bool, error) { - // copy the stringData to data. Error on a data content conflict inside required. This is usually a bug. - - existing, err := client.Secrets(requiredInput.Namespace).Get(ctx, requiredInput.Name, metav1.GetOptions{}) - if err != nil && !apierrors.IsNotFound(err) { - return nil, false, err - } - - if cache.SafeToSkipApply(requiredInput, existing) { - return existing, false, nil - } - - required := requiredInput.DeepCopy() - if required.Data == nil { - required.Data = map[string][]byte{} - } - for k, v := range required.StringData { - if dataV, ok := required.Data[k]; ok { - if string(dataV) != v { - return nil, false, fmt.Errorf("Secret.stringData[%q] conflicts with Secret.data[%q]", k, k) - } - } - required.Data[k] = []byte(v) - } - required.StringData = nil - - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.Secrets(requiredCopy.Namespace). - Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*corev1.Secret), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - cache.UpdateCachedResourceMetadata(requiredInput, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(ptr.To(false), &existingCopy.ObjectMeta, required.ObjectMeta) - - switch required.Type { - case corev1.SecretTypeServiceAccountToken: - // Secrets for ServiceAccountTokens will have data injected by kube controller manager. - // We will apply only the explicitly set keys. - if existingCopy.Data == nil { - existingCopy.Data = map[string][]byte{} - } - - for k, v := range required.Data { - existingCopy.Data[k] = v - } - - default: - existingCopy.Data = required.Data - } - - existingCopy.Type = required.Type - - // Server defaults some values and we need to do it as well or it will never equal. - if existingCopy.Type == "" { - existingCopy.Type = corev1.SecretTypeOpaque - } - - if equality.Semantic.DeepEqual(existingCopy, existing) { - cache.UpdateCachedResourceMetadata(requiredInput, existingCopy) - return existing, false, nil - } - - if klog.V(4).Enabled() { - klog.Infof("Secret %s/%s changes: %v", required.Namespace, required.Name, JSONPatchSecretNoError(existing, existingCopy)) - } - - var actual *corev1.Secret - /* - * Kubernetes validation silently hides failures to update secret type. - * https://github.com/kubernetes/kubernetes/blob/98e65951dccfd40d3b4f31949c2ab8df5912d93e/pkg/apis/core/validation/validation.go#L5048 - * We need to explicitly opt for delete+create in that case. - */ - if existingCopy.Type == existing.Type { - actual, err = client.Secrets(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, existingCopy, err) - - if err == nil { - return actual, true, err - } - if !strings.Contains(err.Error(), "field is immutable") { - return actual, true, err - } - } - - // if the field was immutable on a secret, we're going to be stuck until we delete it. Try to delete and then create - deleteErr := client.Secrets(required.Namespace).Delete(ctx, existingCopy.Name, metav1.DeleteOptions{}) - resourcehelper.ReportDeleteEvent(recorder, existingCopy, deleteErr) - - // clear the RV and track the original actual and error for the return like our create value. - existingCopy.ResourceVersion = "" - actual, err = client.Secrets(required.Namespace).Create(ctx, existingCopy, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, existingCopy, err) - cache.UpdateCachedResourceMetadata(requiredInput, actual) - return actual, true, err -} - -// SyncConfigMap applies a ConfigMap from a location `sourceNamespace/sourceName` to `targetNamespace/targetName` -func SyncConfigMap(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference) (*corev1.ConfigMap, bool, error) { - return syncPartialConfigMap(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, nil, ownerRefs, nil) -} - -// SyncConfigMapWithLabels does what SyncConfigMap does, but adds additional labels to the target ConfigMap. -func SyncConfigMapWithLabels(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference, labels map[string]string) (*corev1.ConfigMap, bool, error) { - return syncPartialConfigMap(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, nil, ownerRefs, labels) -} - -// SyncPartialConfigMap does what SyncConfigMap does but it only synchronizes a subset of keys given by `syncedKeys`. -// SyncPartialConfigMap will delete the target if `syncedKeys` are set but the source does not contain any of these keys. -func SyncPartialConfigMap(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, syncedKeys sets.Set[string], ownerRefs []metav1.OwnerReference) (*corev1.ConfigMap, bool, error) { - return syncPartialConfigMap(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, syncedKeys, ownerRefs, nil) -} - -func syncPartialConfigMap(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, syncedKeys sets.Set[string], ownerRefs []metav1.OwnerReference, labels map[string]string) (*corev1.ConfigMap, bool, error) { - source, err := client.ConfigMaps(sourceNamespace).Get(ctx, sourceName, metav1.GetOptions{}) - switch { - case apierrors.IsNotFound(err): - modified, err := deleteConfigMapSyncTarget(ctx, client, recorder, targetNamespace, targetName) - return nil, modified, err - case err != nil: - return nil, false, err - default: - if len(syncedKeys) > 0 { - for sourceKey := range source.Data { - if !syncedKeys.Has(sourceKey) { - delete(source.Data, sourceKey) - } - } - for sourceKey := range source.BinaryData { - if !syncedKeys.Has(sourceKey) { - delete(source.BinaryData, sourceKey) - } - } - - // remove the synced CM if the requested fields are not present in source - if len(source.Data)+len(source.BinaryData) == 0 { - modified, err := deleteConfigMapSyncTarget(ctx, client, recorder, targetNamespace, targetName) - return nil, modified, err - } - } - - source.Namespace = targetNamespace - source.Name = targetName - source.ResourceVersion = "" - source.OwnerReferences = ownerRefs - if labels != nil && source.Labels == nil { - source.Labels = map[string]string{} - } - for k, v := range labels { - source.Labels[k] = v - } - return ApplyConfigMap(ctx, client, recorder, source) - } -} - -func deleteConfigMapSyncTarget(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, targetNamespace, targetName string) (bool, error) { - // This goal of this additional GET is to avoid reaching the API with a DELETE request - // in case the target doesn't exist. This is useful when using a cached client. - _, err := client.ConfigMaps(targetNamespace).Get(ctx, targetName, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - return false, nil - } - err = client.ConfigMaps(targetNamespace).Delete(ctx, targetName, metav1.DeleteOptions{}) - if apierrors.IsNotFound(err) { - return false, nil - } - if err == nil { - recorder.Eventf("TargetConfigDeleted", "Deleted target configmap %s/%s because source config does not exist", targetNamespace, targetName) - return true, nil - } - return false, err -} - -// SyncSecret applies a Secret from a location `sourceNamespace/sourceName` to `targetNamespace/targetName` -func SyncSecret(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference) (*corev1.Secret, bool, error) { - return syncPartialSecret(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, nil, ownerRefs, nil) -} - -// SyncSecretWithLabels does what SyncSecret does, but adds additional labels to the target Secret. -func SyncSecretWithLabels(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference, labels map[string]string) (*corev1.Secret, bool, error) { - return syncPartialSecret(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, nil, ownerRefs, labels) -} - -// SyncPartialSecret does what SyncSecret does but it only synchronizes a subset of keys given by `syncedKeys`. -// SyncPartialSecret will delete the target if `syncedKeys` are set but the source does not contain any of these keys. -func SyncPartialSecret(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, syncedKeys sets.Set[string], ownerRefs []metav1.OwnerReference) (*corev1.Secret, bool, error) { - return syncPartialSecret(ctx, client, recorder, sourceNamespace, sourceName, targetNamespace, targetName, syncedKeys, ownerRefs, nil) -} - -func syncPartialSecret(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, syncedKeys sets.Set[string], ownerRefs []metav1.OwnerReference, labels map[string]string) (*corev1.Secret, bool, error) { - source, err := client.Secrets(sourceNamespace).Get(ctx, sourceName, metav1.GetOptions{}) - switch { - case apierrors.IsNotFound(err): - modified, err := deleteSecretSyncTarget(ctx, client, recorder, targetNamespace, targetName) - return nil, modified, err - case err != nil: - return nil, false, err - default: - if source.Type == corev1.SecretTypeServiceAccountToken { - - // Make sure the token is already present, otherwise we have to wait before creating the target - if len(source.Data[corev1.ServiceAccountTokenKey]) == 0 { - return nil, false, fmt.Errorf("secret %s/%s doesn't have a token yet", source.Namespace, source.Name) - } - - if source.Annotations != nil { - // When syncing a service account token we have to remove the SA annotation to disable injection into copies - delete(source.Annotations, corev1.ServiceAccountNameKey) - // To make it clean, remove the dormant annotations as well - delete(source.Annotations, corev1.ServiceAccountUIDKey) - } - - // SecretTypeServiceAccountToken implies required fields and injection which we do not want in copies - source.Type = corev1.SecretTypeOpaque - } - - if len(syncedKeys) > 0 { - for sourceKey := range source.Data { - if !syncedKeys.Has(sourceKey) { - delete(source.Data, sourceKey) - } - } - for sourceKey := range source.StringData { - if !syncedKeys.Has(sourceKey) { - delete(source.StringData, sourceKey) - } - } - - // remove the synced secret if the requested fields are not present in source - if len(source.Data)+len(source.StringData) == 0 { - modified, err := deleteSecretSyncTarget(ctx, client, recorder, targetNamespace, targetName) - return nil, modified, err - } - } - - source.Namespace = targetNamespace - source.Name = targetName - source.ResourceVersion = "" - source.OwnerReferences = ownerRefs - if labels != nil && source.Labels == nil { - source.Labels = map[string]string{} - } - for k, v := range labels { - source.Labels[k] = v - } - return ApplySecret(ctx, client, recorder, source) - } -} - -func deleteSecretSyncTarget(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, targetNamespace, targetName string) (bool, error) { - err := client.Secrets(targetNamespace).Delete(ctx, targetName, metav1.DeleteOptions{}) - if apierrors.IsNotFound(err) { - return false, nil - } - if err == nil { - recorder.Eventf("TargetSecretDeleted", "Deleted target secret %s/%s because source config does not exist", targetNamespace, targetName) - return true, nil - } - return false, err -} - -func DeleteNamespace(ctx context.Context, client coreclientv1.NamespacesGetter, recorder events.Recorder, required *corev1.Namespace) (*corev1.Namespace, bool, error) { - err := client.Namespaces().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteService(ctx context.Context, client coreclientv1.ServicesGetter, recorder events.Recorder, required *corev1.Service) (*corev1.Service, bool, error) { - err := client.Services(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeletePod(ctx context.Context, client coreclientv1.PodsGetter, recorder events.Recorder, required *corev1.Pod) (*corev1.Pod, bool, error) { - err := client.Pods(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteServiceAccount(ctx context.Context, client coreclientv1.ServiceAccountsGetter, recorder events.Recorder, required *corev1.ServiceAccount) (*corev1.ServiceAccount, bool, error) { - err := client.ServiceAccounts(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteConfigMap(ctx context.Context, client coreclientv1.ConfigMapsGetter, recorder events.Recorder, required *corev1.ConfigMap) (*corev1.ConfigMap, bool, error) { - err := client.ConfigMaps(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteSecret(ctx context.Context, client coreclientv1.SecretsGetter, recorder events.Recorder, required *corev1.Secret) (*corev1.Secret, bool, error) { - err := client.Secrets(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/credentialsrequest.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/credentialsrequest.go deleted file mode 100644 index 2de8136a8..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/credentialsrequest.go +++ /dev/null @@ -1,106 +0,0 @@ -package resourceapply - -import ( - "context" - "crypto/sha256" - "fmt" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/util/json" - "k8s.io/client-go/dynamic" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" -) - -const ( - CredentialsRequestGroup = "cloudcredential.openshift.io" - CredentialsRequestVersion = "v1" - CredentialsRequestResource = "credentialsrequests" -) - -var credentialsRequestResourceGVR schema.GroupVersionResource = schema.GroupVersionResource{ - Group: CredentialsRequestGroup, - Version: CredentialsRequestVersion, - Resource: CredentialsRequestResource, -} - -func AddCredentialsRequestHash(cr *unstructured.Unstructured) error { - jsonBytes, err := json.Marshal(cr.Object["spec"]) - if err != nil { - return err - } - specHash := fmt.Sprintf("%x", sha256.Sum256(jsonBytes)) - annotations := cr.GetAnnotations() - if annotations == nil { - annotations = map[string]string{} - } - annotations[specHashAnnotation] = specHash - cr.SetAnnotations(annotations) - return nil -} - -func ApplyCredentialsRequest( - ctx context.Context, - client dynamic.Interface, - recorder events.Recorder, - required *unstructured.Unstructured, - expectedGeneration int64, -) (*unstructured.Unstructured, bool, error) { - if required.GetName() == "" { - return nil, false, fmt.Errorf("invalid object: name cannot be empty") - } - - if err := AddCredentialsRequestHash(required); err != nil { - return nil, false, err - } - - crClient := client.Resource(credentialsRequestResourceGVR).Namespace(required.GetNamespace()) - existing, err := crClient.Get(ctx, required.GetName(), metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - actual, err := crClient.Create(ctx, required, metav1.CreateOptions{}) - if err == nil { - recorder.Eventf( - fmt.Sprintf("%sCreated", required.GetKind()), - "Created %s because it was missing", - resourcehelper.FormatResourceForCLIWithNamespace(required)) - return actual, true, err - } - recorder.Warningf( - fmt.Sprintf("%sCreateFailed", required.GetKind()), - "Failed to create %s: %v", - resourcehelper.FormatResourceForCLIWithNamespace(required), - err) - return nil, false, err - } - if err != nil { - return nil, false, err - } - - // Check CredentialRequest.Generation. - needApply := false - if existing.GetGeneration() != expectedGeneration { - needApply = true - } - - // Check specHashAnnotation - existingAnnotations := existing.GetAnnotations() - if existingAnnotations == nil || existingAnnotations[specHashAnnotation] != required.GetAnnotations()[specHashAnnotation] { - needApply = true - } - - if !needApply { - return existing, false, nil - } - - requiredCopy := required.DeepCopy() - existing.Object["spec"] = requiredCopy.Object["spec"] - actual, err := crClient.Update(ctx, existing, metav1.UpdateOptions{}) - if err != nil { - return nil, false, err - } - return actual, existing.GetResourceVersion() != actual.GetResourceVersion(), nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/generic.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/generic.go deleted file mode 100644 index 58f49823f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/generic.go +++ /dev/null @@ -1,453 +0,0 @@ -package resourceapply - -import ( - "context" - "fmt" - - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - admissionregistrationv1beta1 "k8s.io/api/admissionregistration/v1beta1" - appsv1 "k8s.io/api/apps/v1" - - corev1 "k8s.io/api/core/v1" - networkingv1 "k8s.io/api/networking/v1" - policyv1 "k8s.io/api/policy/v1" - rbacv1 "k8s.io/api/rbac/v1" - storagev1 "k8s.io/api/storage/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsclient "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/client-go/dynamic" - "k8s.io/client-go/kubernetes" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - migrationclient "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourceread" - "github.com/openshift/library-go/pkg/operator/v1helpers" -) - -type AssetFunc func(name string) ([]byte, error) - -type ApplyResult struct { - File string - Type string - Result runtime.Object - Changed bool - Error error -} - -// ConditionalFunction provides needed dependency for a resource on another condition instead of blindly creating -// a resource. This conditional function can also be used to delete the resource when not needed -type ConditionalFunction func() bool - -type ClientHolder struct { - kubeClient kubernetes.Interface - apiExtensionsClient apiextensionsclient.Interface - kubeInformers v1helpers.KubeInformersForNamespaces - dynamicClient dynamic.Interface - migrationClient migrationclient.Interface -} - -func NewClientHolder() *ClientHolder { - return &ClientHolder{} -} - -func NewKubeClientHolder(client kubernetes.Interface) *ClientHolder { - return NewClientHolder().WithKubernetes(client) -} - -func (c *ClientHolder) WithKubernetes(client kubernetes.Interface) *ClientHolder { - c.kubeClient = client - return c -} - -func (c *ClientHolder) WithKubernetesInformers(kubeInformers v1helpers.KubeInformersForNamespaces) *ClientHolder { - c.kubeInformers = kubeInformers - return c -} - -func (c *ClientHolder) WithAPIExtensionsClient(client apiextensionsclient.Interface) *ClientHolder { - c.apiExtensionsClient = client - return c -} - -func (c *ClientHolder) WithDynamicClient(client dynamic.Interface) *ClientHolder { - c.dynamicClient = client - return c -} - -func (c *ClientHolder) WithMigrationClient(client migrationclient.Interface) *ClientHolder { - c.migrationClient = client - return c -} - -// ApplyDirectly applies the given manifest files to API server. -func ApplyDirectly(ctx context.Context, clients *ClientHolder, recorder events.Recorder, cache ResourceCache, manifests AssetFunc, files ...string) []ApplyResult { - ret := []ApplyResult{} - - for _, file := range files { - result := ApplyResult{File: file} - objBytes, err := manifests(file) - if err != nil { - result.Error = fmt.Errorf("missing %q: %v", file, err) - ret = append(ret, result) - continue - } - requiredObj, err := resourceread.ReadGenericWithUnstructured(objBytes) - if err != nil { - result.Error = fmt.Errorf("cannot decode %q: %v", file, err) - ret = append(ret, result) - continue - } - result.Type = fmt.Sprintf("%T", requiredObj) - - // NOTE: Do not add CR resources into this switch otherwise the protobuf client can cause problems. - switch t := requiredObj.(type) { - case *corev1.Namespace: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyNamespaceImproved(ctx, clients.kubeClient.CoreV1(), recorder, t, cache) - } - case *corev1.Service: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyServiceImproved(ctx, clients.kubeClient.CoreV1(), recorder, t, cache) - } - case *corev1.Pod: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyPodImproved(ctx, clients.kubeClient.CoreV1(), recorder, t, cache) - } - case *corev1.ServiceAccount: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyServiceAccountImproved(ctx, clients.kubeClient.CoreV1(), recorder, t, cache) - } - case *corev1.ConfigMap: - client := clients.configMapsGetter() - if client == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyConfigMapImproved(ctx, client, recorder, t, cache) - } - case *corev1.Secret: - client := clients.secretsGetter() - if client == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplySecretImproved(ctx, client, recorder, t, cache) - } - case *networkingv1.NetworkPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyNetworkPolicy(ctx, clients.kubeClient.NetworkingV1(), recorder, t, cache) - } - case *rbacv1.ClusterRole: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyClusterRole(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.ClusterRoleBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyClusterRoleBinding(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.Role: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyRole(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.RoleBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyRoleBinding(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *policyv1.PodDisruptionBudget: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyPodDisruptionBudget(ctx, clients.kubeClient.PolicyV1(), recorder, t) - } - case *apiextensionsv1.CustomResourceDefinition: - if clients.apiExtensionsClient == nil { - result.Error = fmt.Errorf("missing apiExtensionsClient") - } else { - result.Result, result.Changed, result.Error = ApplyCustomResourceDefinitionV1(ctx, clients.apiExtensionsClient.ApiextensionsV1(), recorder, t) - } - case *storagev1.StorageClass: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyStorageClass(ctx, clients.kubeClient.StorageV1(), recorder, t) - } - case *admissionregistrationv1.ValidatingWebhookConfiguration: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyValidatingWebhookConfigurationImproved(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t, cache) - } - case *admissionregistrationv1.MutatingWebhookConfiguration: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyMutatingWebhookConfigurationImproved(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t, cache) - } - case *admissionregistrationv1beta1.ValidatingAdmissionPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyValidatingAdmissionPolicyV1beta1(ctx, clients.kubeClient.AdmissionregistrationV1beta1(), recorder, t, cache) - } - case *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyValidatingAdmissionPolicyBindingV1beta1(ctx, clients.kubeClient.AdmissionregistrationV1beta1(), recorder, t, cache) - } - case *admissionregistrationv1.ValidatingAdmissionPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyValidatingAdmissionPolicyV1(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t, cache) - } - case *admissionregistrationv1.ValidatingAdmissionPolicyBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyValidatingAdmissionPolicyBindingV1(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t, cache) - } - case *storagev1.CSIDriver: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - result.Result, result.Changed, result.Error = ApplyCSIDriver(ctx, clients.kubeClient.StorageV1(), recorder, t) - } - case *migrationv1alpha1.StorageVersionMigration: - if clients.migrationClient == nil { - result.Error = fmt.Errorf("missing migrationClient") - } else { - result.Result, result.Changed, result.Error = ApplyStorageVersionMigration(ctx, clients.migrationClient, recorder, t) - } - case *unstructured.Unstructured: - if clients.dynamicClient == nil { - result.Error = fmt.Errorf("missing dynamicClient") - } else { - result.Result, result.Changed, result.Error = ApplyKnownUnstructured(ctx, clients.dynamicClient, recorder, t) - } - default: - result.Error = fmt.Errorf("unhandled type %T", requiredObj) - } - - ret = append(ret, result) - } - - return ret -} - -func DeleteAll(ctx context.Context, clients *ClientHolder, recorder events.Recorder, manifests AssetFunc, - files ...string) []ApplyResult { - ret := []ApplyResult{} - - for _, file := range files { - result := ApplyResult{File: file} - objBytes, err := manifests(file) - if err != nil { - result.Error = fmt.Errorf("missing %q: %v", file, err) - ret = append(ret, result) - continue - } - requiredObj, err := resourceread.ReadGenericWithUnstructured(objBytes) - if err != nil { - result.Error = fmt.Errorf("cannot decode %q: %v", file, err) - ret = append(ret, result) - continue - } - result.Type = fmt.Sprintf("%T", requiredObj) - // NOTE: Do not add CR resources into this switch otherwise the protobuf client can cause problems. - switch t := requiredObj.(type) { - case *corev1.Namespace: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteNamespace(ctx, clients.kubeClient.CoreV1(), recorder, t) - } - case *corev1.Service: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteService(ctx, clients.kubeClient.CoreV1(), recorder, t) - } - case *corev1.Pod: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeletePod(ctx, clients.kubeClient.CoreV1(), recorder, t) - } - case *corev1.ServiceAccount: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteServiceAccount(ctx, clients.kubeClient.CoreV1(), recorder, t) - } - case *corev1.ConfigMap: - client := clients.configMapsGetter() - if client == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteConfigMap(ctx, client, recorder, t) - } - case *corev1.Secret: - client := clients.secretsGetter() - if client == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteSecret(ctx, client, recorder, t) - } - case *networkingv1.NetworkPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteNetworkPolicy(ctx, clients.kubeClient.NetworkingV1(), recorder, t) - } - case *rbacv1.ClusterRole: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteClusterRole(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.ClusterRoleBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteClusterRoleBinding(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.Role: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteRole(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *rbacv1.RoleBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteRoleBinding(ctx, clients.kubeClient.RbacV1(), recorder, t) - } - case *appsv1.Deployment: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteDeployment(ctx, clients.kubeClient.AppsV1(), recorder, t) - } - case *appsv1.DaemonSet: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteDaemonSet(ctx, clients.kubeClient.AppsV1(), recorder, t) - } - case *policyv1.PodDisruptionBudget: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeletePodDisruptionBudget(ctx, clients.kubeClient.PolicyV1(), recorder, t) - } - case *apiextensionsv1.CustomResourceDefinition: - if clients.apiExtensionsClient == nil { - result.Error = fmt.Errorf("missing apiExtensionsClient") - } else { - _, result.Changed, result.Error = DeleteCustomResourceDefinitionV1(ctx, clients.apiExtensionsClient.ApiextensionsV1(), recorder, t) - } - case *storagev1.StorageClass: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteStorageClass(ctx, clients.kubeClient.StorageV1(), recorder, t) - } - case *admissionregistrationv1.ValidatingWebhookConfiguration: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteValidatingWebhookConfiguration(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t) - } - case *admissionregistrationv1beta1.ValidatingAdmissionPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteValidatingAdmissionPolicyV1beta1(ctx, clients.kubeClient.AdmissionregistrationV1beta1(), recorder, t) - } - case *admissionregistrationv1beta1.ValidatingAdmissionPolicyBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteValidatingAdmissionPolicyBindingV1beta1(ctx, clients.kubeClient.AdmissionregistrationV1beta1(), recorder, t) - } - case *admissionregistrationv1.ValidatingAdmissionPolicy: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteValidatingAdmissionPolicyV1(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t) - } - case *admissionregistrationv1.ValidatingAdmissionPolicyBinding: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteValidatingAdmissionPolicyBindingV1(ctx, clients.kubeClient.AdmissionregistrationV1(), recorder, t) - } - case *storagev1.CSIDriver: - if clients.kubeClient == nil { - result.Error = fmt.Errorf("missing kubeClient") - } else { - _, result.Changed, result.Error = DeleteCSIDriver(ctx, clients.kubeClient.StorageV1(), recorder, t) - } - case *migrationv1alpha1.StorageVersionMigration: - if clients.migrationClient == nil { - result.Error = fmt.Errorf("missing migrationClient") - } else { - _, result.Changed, result.Error = DeleteStorageVersionMigration(ctx, clients.migrationClient, recorder, t) - } - case *unstructured.Unstructured: - if clients.dynamicClient == nil { - result.Error = fmt.Errorf("missing dynamicClient") - } else { - _, result.Changed, result.Error = DeleteKnownUnstructured(ctx, clients.dynamicClient, recorder, t) - } - default: - result.Error = fmt.Errorf("unhandled type %T", requiredObj) - } - - ret = append(ret, result) - } - - return ret -} - -func (c *ClientHolder) configMapsGetter() corev1client.ConfigMapsGetter { - if c.kubeClient == nil { - return nil - } - if c.kubeInformers == nil { - return c.kubeClient.CoreV1() - } - return v1helpers.CachedConfigMapGetter(c.kubeClient.CoreV1(), c.kubeInformers) -} - -func (c *ClientHolder) secretsGetter() corev1client.SecretsGetter { - if c.kubeClient == nil { - return nil - } - if c.kubeInformers == nil { - return c.kubeClient.CoreV1() - } - return v1helpers.CachedSecretGetter(c.kubeClient.CoreV1(), c.kubeInformers) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/json_patch_helpers.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/json_patch_helpers.go deleted file mode 100644 index 84b50fde1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/json_patch_helpers.go +++ /dev/null @@ -1,70 +0,0 @@ -package resourceapply - -import ( - "fmt" - - patch "gopkg.in/evanphx/json-patch.v4" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" -) - -// JSONPatchNoError generates a JSON patch between original and modified objects and return the JSON as a string. -// Note: -// -// In case of error, the returned string will contain the error messages. -func JSONPatchNoError(original, modified runtime.Object) string { - if original == nil { - return "original object is nil" - } - if modified == nil { - return "modified object is nil" - } - originalJSON, err := runtime.Encode(unstructured.UnstructuredJSONScheme, original) - if err != nil { - return fmt.Sprintf("unable to decode original to JSON: %v", err) - } - modifiedJSON, err := runtime.Encode(unstructured.UnstructuredJSONScheme, modified) - if err != nil { - return fmt.Sprintf("unable to decode modified to JSON: %v", err) - } - patchBytes, err := patch.CreateMergePatch(originalJSON, modifiedJSON) - if err != nil { - return fmt.Sprintf("unable to create JSON patch: %v", err) - } - return string(patchBytes) -} - -// JSONPatchSecretNoError generates a JSON patch between original and modified secrets, hiding its data, -// and return the JSON as a string. -// -// Note: -// In case of error, the returned string will contain the error messages. -func JSONPatchSecretNoError(original, modified *corev1.Secret) string { - if original == nil { - return "original object is nil" - } - if modified == nil { - return "modified object is nil" - } - - safeModified := modified.DeepCopy() - safeOriginal := original.DeepCopy() - - for s := range safeOriginal.Data { - safeOriginal.Data[s] = []byte("OLD") - } - for s := range safeModified.Data { - if _, preoriginal := original.Data[s]; !preoriginal { - safeModified.Data[s] = []byte("NEW") - } else if !equality.Semantic.DeepEqual(original.Data[s], safeModified.Data[s]) { - safeModified.Data[s] = []byte("MODIFIED") - } else { - safeModified.Data[s] = []byte("OLD") - } - } - - return JSONPatchNoError(safeOriginal, safeModified) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/migration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/migration.go deleted file mode 100644 index 2bf3d74b6..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/migration.go +++ /dev/null @@ -1,60 +0,0 @@ -package resourceapply - -import ( - "context" - "reflect" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/klog/v2" - "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - migrationclientv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset" -) - -// ApplyStorageVersionMigration merges objectmeta and required data. -func ApplyStorageVersionMigration(ctx context.Context, client migrationclientv1alpha1.Interface, recorder events.Recorder, required *migrationv1alpha1.StorageVersionMigration) (*migrationv1alpha1.StorageVersionMigration, bool, error) { - clientInterface := client.MigrationV1alpha1().StorageVersionMigrations() - existing, err := clientInterface.Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := clientInterface.Create(ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*v1alpha1.StorageVersionMigration), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, requiredCopy, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - if !modified && reflect.DeepEqual(existingCopy.Spec, required.Spec) { - return existingCopy, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("StorageVersionMigration %q changes: %v", required.Name, JSONPatchNoError(existing, required)) - } - - required.Spec.Resource.DeepCopyInto(&existingCopy.Spec.Resource) - actual, err := clientInterface.Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -func DeleteStorageVersionMigration(ctx context.Context, client migrationclientv1alpha1.Interface, recorder events.Recorder, required *migrationv1alpha1.StorageVersionMigration) (*migrationv1alpha1.StorageVersionMigration, bool, error) { - clientInterface := client.MigrationV1alpha1().StorageVersionMigrations() - err := clientInterface.Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/monitoring.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/monitoring.go deleted file mode 100644 index d0996a2af..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/monitoring.go +++ /dev/null @@ -1,186 +0,0 @@ -package resourceapply - -import ( - "context" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" - "k8s.io/klog/v2" -) - -var alertmanagerGVR = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "alertmanagers"} -var prometheusGVR = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "prometheuses"} -var prometheusRuleGVR = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "prometheusrules"} -var serviceMonitorGVR = schema.GroupVersionResource{Group: "monitoring.coreos.com", Version: "v1", Resource: "servicemonitors"} - -// ApplyAlertmanager applies the Alertmanager. -func ApplyAlertmanager(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return ApplyUnstructuredResourceImproved(ctx, client, recorder, required, noCache, alertmanagerGVR, nil, nil) -} - -// DeleteAlertmanager deletes the Alertmanager. -func DeleteAlertmanager(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return DeleteUnstructuredResource(ctx, client, recorder, required, alertmanagerGVR) -} - -// ApplyPrometheus applies the Prometheus. -func ApplyPrometheus(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return ApplyUnstructuredResourceImproved(ctx, client, recorder, required, noCache, prometheusGVR, nil, nil) -} - -// DeletePrometheus deletes the Prometheus. -func DeletePrometheus(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return DeleteUnstructuredResource(ctx, client, recorder, required, prometheusGVR) -} - -// ApplyPrometheusRule applies the PrometheusRule. -func ApplyPrometheusRule(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return ApplyUnstructuredResourceImproved(ctx, client, recorder, required, noCache, prometheusRuleGVR, nil, nil) -} - -// DeletePrometheusRule deletes the PrometheusRule. -func DeletePrometheusRule(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return DeleteUnstructuredResource(ctx, client, recorder, required, prometheusRuleGVR) -} - -// ApplyServiceMonitor applies the ServiceMonitor. -func ApplyServiceMonitor(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return ApplyUnstructuredResourceImproved(ctx, client, recorder, required, noCache, serviceMonitorGVR, nil, nil) -} - -// DeleteServiceMonitor deletes the ServiceMonitor. -func DeleteServiceMonitor(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - return DeleteUnstructuredResource(ctx, client, recorder, required, serviceMonitorGVR) -} - -// ApplyUnstructuredResourceImproved can utilize the cache to reconcile the existing resource to the desired state. -// NOTE: A `nil` defaultingFunc and equalityChecker are assigned resourceapply.noDefaulting and equality.Semantic, -// respectively. Users are recommended to instantiate a cache to benefit from the memoization machinery. -func ApplyUnstructuredResourceImproved( - ctx context.Context, - client dynamic.Interface, - recorder events.Recorder, - required *unstructured.Unstructured, - cache ResourceCache, - resourceGVR schema.GroupVersionResource, - defaultingFunc mimicDefaultingFunc, - equalityChecker equalityChecker, -) (*unstructured.Unstructured, bool, error) { - name := required.GetName() - namespace := required.GetNamespace() - - // Create if resource does not exist, and update cache with new metadata. - if cache == nil { - cache = noCache - } - existing, err := client.Resource(resourceGVR).Namespace(namespace).Get(ctx, name, metav1.GetOptions{}) - if errors.IsNotFound(err) { - want, errCreate := client.Resource(resourceGVR).Namespace(namespace).Create(ctx, required, metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, errCreate) - cache.UpdateCachedResourceMetadata(required, want) - return want, true, errCreate - } - if err != nil { - return nil, false, err - } - - // Skip if the cache is non-nil, and the metadata hashes and resource version hashes match. - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - existingCopy := existing.DeepCopy() - - // Replace and/or merge certain metadata fields. - didMetadataModify := false - err = resourcemerge.EnsureObjectMetaForUnstructured(&didMetadataModify, existingCopy, required) - if err != nil { - return nil, false, err - } - - // Deep-check the spec objects for equality, and update the cache in either case. - if defaultingFunc == nil { - defaultingFunc = noDefaulting - } - if equalityChecker == nil { - equalityChecker = equality.Semantic - } - didSpecModify := false - err = ensureGenericSpec(&didSpecModify, required, existingCopy, defaultingFunc, equalityChecker) - if err != nil { - return nil, false, err - } - if !didSpecModify && !didMetadataModify { - // Update cache even if certain fields are not modified, in order to maintain a consistent cache based on the - // resource hash. The resource hash depends on the entire metadata, not just the fields that were checked above, - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - - // Perform update if resource exists but different from the required (desired) one. - if klog.V(4).Enabled() { - klog.Infof("%s %q changes: %v", resourceGVR.String(), namespace+"/"+name, JSONPatchNoError(existing, existingCopy)) - } - actual, errUpdate := client.Resource(resourceGVR).Namespace(namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, existingCopy, errUpdate) - cache.UpdateCachedResourceMetadata(existingCopy, actual) - return actual, true, errUpdate -} - -// DeleteUnstructuredResource deletes the unstructured resource. -func DeleteUnstructuredResource(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured, resourceGVR schema.GroupVersionResource) (*unstructured.Unstructured, bool, error) { - err := client.Resource(resourceGVR).Namespace(required.GetNamespace()).Delete(ctx, required.GetName(), metav1.DeleteOptions{}) - if err != nil && errors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func ensureGenericSpec(didSpecModify *bool, required, existing *unstructured.Unstructured, mimicDefaultingFn mimicDefaultingFunc, equalityChecker equalityChecker) error { - mimicDefaultingFn(required) - requiredSpec, _, err := unstructured.NestedMap(required.UnstructuredContent(), "spec") - if err != nil { - return err - } - existingSpec, _, err := unstructured.NestedMap(existing.UnstructuredContent(), "spec") - if err != nil { - return err - } - - if equalityChecker.DeepEqual(existingSpec, requiredSpec) { - return nil - } - - if err = unstructured.SetNestedMap(existing.UnstructuredContent(), requiredSpec, "spec"); err != nil { - return err - } - *didSpecModify = true - - return nil -} - -// mimicDefaultingFunc is used to set fields that are defaulted. This allows for sparse manifests to apply correctly. -// For instance, if field .spec.foo is set to 10 if not set, then a function of this type could be used to set -// the field to 10 to match the comparison. This is sometimes (often?) easier than updating the semantic equality. -// We often see this in places like RBAC and CRD. Logically it can happen generically too. -type mimicDefaultingFunc func(obj *unstructured.Unstructured) - -func noDefaulting(*unstructured.Unstructured) {} - -// equalityChecker allows for custom equality comparisons. This can be used to allow equality checks to skip certain -// operator managed fields. This capability allows something like .spec.scale to be specified or changed by a component -// like HPA. Use this capability sparingly. Most places ought to just use `equality.Semantic` -type equalityChecker interface { - DeepEqual(existing, required interface{}) bool -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/networking.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/networking.go deleted file mode 100644 index cc2de17ff..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/networking.go +++ /dev/null @@ -1,69 +0,0 @@ -package resourceapply - -import ( - "context" - - networkingv1 "k8s.io/api/networking/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - networkingclientv1 "k8s.io/client-go/kubernetes/typed/networking/v1" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -// ApplyNetworkPolicy merges objectmeta and requires spec -func ApplyNetworkPolicy(ctx context.Context, client networkingclientv1.NetworkPoliciesGetter, recorder events.Recorder, required *networkingv1.NetworkPolicy, cache ResourceCache) (*networkingv1.NetworkPolicy, bool, error) { - existing, err := client.NetworkPolicies(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.NetworkPolicies(required.Namespace).Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*networkingv1.NetworkPolicy), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if cache.SafeToSkipApply(required, existing) { - return existing, false, nil - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - specContentSame := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if specContentSame && !modified { - cache.UpdateCachedResourceMetadata(required, existingCopy) - return existingCopy, false, nil - } - - existingCopy.Spec = required.Spec - - if klog.V(2).Enabled() { - klog.Infof("NetworkPolicy %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.NetworkPolicies(existingCopy.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - cache.UpdateCachedResourceMetadata(required, actual) - return actual, true, err -} - -func DeleteNetworkPolicy(ctx context.Context, client networkingclientv1.NetworkPoliciesGetter, recorder events.Recorder, required *networkingv1.NetworkPolicy) (*networkingv1.NetworkPolicy, bool, error) { - err := client.NetworkPolicies(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/policy.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/policy.go deleted file mode 100644 index 86d45fad0..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/policy.go +++ /dev/null @@ -1,61 +0,0 @@ -package resourceapply - -import ( - "context" - - policyv1 "k8s.io/api/policy/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - policyclientv1 "k8s.io/client-go/kubernetes/typed/policy/v1" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -func ApplyPodDisruptionBudget(ctx context.Context, client policyclientv1.PodDisruptionBudgetsGetter, recorder events.Recorder, required *policyv1.PodDisruptionBudget) (*policyv1.PodDisruptionBudget, bool, error) { - existing, err := client.PodDisruptionBudgets(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.PodDisruptionBudgets(required.Namespace).Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*policyv1.PodDisruptionBudget), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - contentSame := equality.Semantic.DeepEqual(existingCopy.Spec, required.Spec) - if contentSame && !modified { - return existingCopy, false, nil - } - - existingCopy.Spec = required.Spec - - if klog.V(2).Enabled() { - klog.Infof("PodDisruptionBudget %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.PodDisruptionBudgets(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -func DeletePodDisruptionBudget(ctx context.Context, client policyclientv1.PodDisruptionBudgetsGetter, recorder events.Recorder, required *policyv1.PodDisruptionBudget) (*policyv1.PodDisruptionBudget, bool, error) { - err := client.PodDisruptionBudgets(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/rbac.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/rbac.go deleted file mode 100644 index 223c64d4f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/rbac.go +++ /dev/null @@ -1,252 +0,0 @@ -package resourceapply - -import ( - "context" - - rbacv1 "k8s.io/api/rbac/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rbacclientv1 "k8s.io/client-go/kubernetes/typed/rbac/v1" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -// ApplyClusterRole merges objectmeta, requires rules. -func ApplyClusterRole(ctx context.Context, client rbacclientv1.ClusterRolesGetter, recorder events.Recorder, required *rbacv1.ClusterRole) (*rbacv1.ClusterRole, bool, error) { - existing, err := client.ClusterRoles().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.ClusterRoles().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*rbacv1.ClusterRole), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - rulesContentSame := equality.Semantic.DeepEqual(existingCopy.Rules, required.Rules) - aggregationRuleContentSame := equality.Semantic.DeepEqual(existingCopy.AggregationRule, required.AggregationRule) - - if aggregationRuleContentSame && rulesContentSame && !modified { - return existingCopy, false, nil - } - - if !aggregationRuleContentSame { - existingCopy.AggregationRule = required.AggregationRule - } - - // The control plane controller that reconciles ClusterRoles - // overwrites any values that are manually specified in the rules field of an aggregate ClusterRole. - // As such skip reconciling on the Rules field when the AggregationRule is set. - if !rulesContentSame && required.AggregationRule == nil { - existingCopy.Rules = required.Rules - } - - if klog.V(2).Enabled() { - klog.Infof("ClusterRole %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.ClusterRoles().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -// ApplyClusterRoleBinding merges objectmeta, requires subjects and role refs -// TODO on non-matching roleref, delete and recreate -func ApplyClusterRoleBinding(ctx context.Context, client rbacclientv1.ClusterRoleBindingsGetter, recorder events.Recorder, required *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, bool, error) { - existing, err := client.ClusterRoleBindings().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.ClusterRoleBindings().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*rbacv1.ClusterRoleBinding), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - requiredCopy := required.DeepCopy() - - // Enforce apiGroup fields in roleRefs - existingCopy.RoleRef.APIGroup = rbacv1.GroupName - for i := range existingCopy.Subjects { - if existingCopy.Subjects[i].Kind == "User" { - existingCopy.Subjects[i].APIGroup = rbacv1.GroupName - } - } - - requiredCopy.RoleRef.APIGroup = rbacv1.GroupName - for i := range requiredCopy.Subjects { - if requiredCopy.Subjects[i].Kind == "User" { - requiredCopy.Subjects[i].APIGroup = rbacv1.GroupName - } - } - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, requiredCopy.ObjectMeta) - - subjectsAreSame := equality.Semantic.DeepEqual(existingCopy.Subjects, requiredCopy.Subjects) - roleRefIsSame := equality.Semantic.DeepEqual(existingCopy.RoleRef, requiredCopy.RoleRef) - - if subjectsAreSame && roleRefIsSame && !modified { - return existingCopy, false, nil - } - - existingCopy.Subjects = requiredCopy.Subjects - existingCopy.RoleRef = requiredCopy.RoleRef - - if klog.V(2).Enabled() { - klog.Infof("ClusterRoleBinding %q changes: %v", requiredCopy.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.ClusterRoleBindings().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, requiredCopy, err) - return actual, true, err -} - -// ApplyRole merges objectmeta, requires rules -func ApplyRole(ctx context.Context, client rbacclientv1.RolesGetter, recorder events.Recorder, required *rbacv1.Role) (*rbacv1.Role, bool, error) { - existing, err := client.Roles(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.Roles(required.Namespace).Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*rbacv1.Role), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - contentSame := equality.Semantic.DeepEqual(existingCopy.Rules, required.Rules) - if contentSame && !modified { - return existingCopy, false, nil - } - - existingCopy.Rules = required.Rules - - if klog.V(2).Enabled() { - klog.Infof("Role %q changes: %v", required.Namespace+"/"+required.Name, JSONPatchNoError(existing, existingCopy)) - } - actual, err := client.Roles(required.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -// ApplyRoleBinding merges objectmeta, requires subjects and role refs -// TODO on non-matching roleref, delete and recreate -func ApplyRoleBinding(ctx context.Context, client rbacclientv1.RoleBindingsGetter, recorder events.Recorder, required *rbacv1.RoleBinding) (*rbacv1.RoleBinding, bool, error) { - existing, err := client.RoleBindings(required.Namespace).Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.RoleBindings(required.Namespace).Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*rbacv1.RoleBinding), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - modified := false - existingCopy := existing.DeepCopy() - requiredCopy := required.DeepCopy() - - // Enforce apiGroup fields in roleRefs and subjects - existingCopy.RoleRef.APIGroup = rbacv1.GroupName - for i := range existingCopy.Subjects { - if existingCopy.Subjects[i].Kind == "User" { - existingCopy.Subjects[i].APIGroup = rbacv1.GroupName - } - } - - requiredCopy.RoleRef.APIGroup = rbacv1.GroupName - for i := range requiredCopy.Subjects { - if requiredCopy.Subjects[i].Kind == "User" { - requiredCopy.Subjects[i].APIGroup = rbacv1.GroupName - } - } - - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, requiredCopy.ObjectMeta) - - subjectsAreSame := equality.Semantic.DeepEqual(existingCopy.Subjects, requiredCopy.Subjects) - roleRefIsSame := equality.Semantic.DeepEqual(existingCopy.RoleRef, requiredCopy.RoleRef) - - if subjectsAreSame && roleRefIsSame && !modified { - return existingCopy, false, nil - } - - existingCopy.Subjects = requiredCopy.Subjects - existingCopy.RoleRef = requiredCopy.RoleRef - - if klog.V(2).Enabled() { - klog.Infof("RoleBinding %q changes: %v", requiredCopy.Namespace+"/"+requiredCopy.Name, JSONPatchNoError(existing, existingCopy)) - } - - actual, err := client.RoleBindings(requiredCopy.Namespace).Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, requiredCopy, err) - return actual, true, err -} - -func DeleteClusterRole(ctx context.Context, client rbacclientv1.ClusterRolesGetter, recorder events.Recorder, required *rbacv1.ClusterRole) (*rbacv1.ClusterRole, bool, error) { - err := client.ClusterRoles().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteClusterRoleBinding(ctx context.Context, client rbacclientv1.ClusterRoleBindingsGetter, recorder events.Recorder, required *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, bool, error) { - err := client.ClusterRoleBindings().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteRole(ctx context.Context, client rbacclientv1.RolesGetter, recorder events.Recorder, required *rbacv1.Role) (*rbacv1.Role, bool, error) { - err := client.Roles(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteRoleBinding(ctx context.Context, client rbacclientv1.RoleBindingsGetter, recorder events.Recorder, required *rbacv1.RoleBinding) (*rbacv1.RoleBinding, bool, error) { - err := client.RoleBindings(required.Namespace).Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/resource_cache.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/resource_cache.go deleted file mode 100644 index daa1a5e15..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/resource_cache.go +++ /dev/null @@ -1,168 +0,0 @@ -package resourceapply - -import ( - "crypto/md5" - "fmt" - "io" - "reflect" - - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/klog/v2" -) - -type cachedVersionKey struct { - name string - namespace string - kind schema.GroupKind -} - -// record of resource metadata used to determine if its safe to return early from an ApplyFoo -// resourceHash is an ms5 hash of the required in an ApplyFoo that is computed in case the input changes -// resourceVersion is the received resourceVersion from the apiserver in response to an update that is comparable to the GET -type cachedResource struct { - resourceHash, resourceVersion string -} - -type resourceCache struct { - cache map[cachedVersionKey]cachedResource -} - -type ResourceCache interface { - UpdateCachedResourceMetadata(required runtime.Object, actual runtime.Object) - SafeToSkipApply(required runtime.Object, existing runtime.Object) bool -} - -func NewResourceCache() *resourceCache { - return &resourceCache{ - cache: map[cachedVersionKey]cachedResource{}, - } -} - -var noCache *resourceCache - -func getResourceMetadata(obj runtime.Object) (schema.GroupKind, string, string, string, error) { - if obj == nil { - return schema.GroupKind{}, "", "", "", fmt.Errorf("nil object has no metadata") - } - metadata, err := meta.Accessor(obj) - if err != nil { - return schema.GroupKind{}, "", "", "", err - } - if metadata == nil || reflect.ValueOf(metadata).IsNil() { - return schema.GroupKind{}, "", "", "", fmt.Errorf("object has no metadata") - } - resourceHash := hashOfResourceStruct(obj) - - // retrieve kind, sometimes this can be done via the accesor, sometimes not (depends on the type) - kind := schema.GroupKind{} - gvk := obj.GetObjectKind().GroupVersionKind() - if len(gvk.Kind) > 0 { - kind = gvk.GroupKind() - } else { - if currKind := getCoreGroupKind(obj); currKind != nil { - kind = *currKind - } - } - if len(kind.Kind) == 0 { - return schema.GroupKind{}, "", "", "", fmt.Errorf("unable to determine GroupKind of %T", obj) - } - - return kind, metadata.GetName(), metadata.GetNamespace(), resourceHash, nil -} - -func getResourceVersion(obj runtime.Object) (string, error) { - if obj == nil { - return "", fmt.Errorf("nil object has no resourceVersion") - } - metadata, err := meta.Accessor(obj) - if err != nil { - return "", err - } - if metadata == nil || reflect.ValueOf(metadata).IsNil() { - return "", fmt.Errorf("object has no metadata") - } - rv := metadata.GetResourceVersion() - if len(rv) == 0 { - return "", fmt.Errorf("missing resourceVersion") - } - - return rv, nil -} - -func (c *resourceCache) UpdateCachedResourceMetadata(required runtime.Object, actual runtime.Object) { - if c == nil || c.cache == nil { - return - } - if required == nil || actual == nil { - return - } - kind, name, namespace, resourceHash, err := getResourceMetadata(required) - if err != nil { - return - } - cacheKey := cachedVersionKey{ - name: name, - namespace: namespace, - kind: kind, - } - - resourceVersion, err := getResourceVersion(actual) - if err != nil { - klog.V(4).Infof("error reading resourceVersion %s:%s:%s %s", name, kind, namespace, err) - return - } - - c.cache[cacheKey] = cachedResource{resourceHash, resourceVersion} - klog.V(7).Infof("updated resourceVersion of %s:%s:%s %s", name, kind, namespace, resourceVersion) -} - -// in the circumstance that an ApplyFoo's 'required' is the same one which was previously -// applied for a given (name, kind, namespace) and the existing resource (if any), -// hasn't been modified since the ApplyFoo last updated that resource, then return true (we don't -// need to reapply the resource). Otherwise return false. -func (c *resourceCache) SafeToSkipApply(required runtime.Object, existing runtime.Object) bool { - if c == nil || c.cache == nil { - return false - } - if required == nil || existing == nil { - return false - } - kind, name, namespace, resourceHash, err := getResourceMetadata(required) - if err != nil { - return false - } - cacheKey := cachedVersionKey{ - name: name, - namespace: namespace, - kind: kind, - } - - resourceVersion, err := getResourceVersion(existing) - if err != nil { - return false - } - - var versionMatch, hashMatch bool - if cached, exists := c.cache[cacheKey]; exists { - versionMatch = cached.resourceVersion == resourceVersion - hashMatch = cached.resourceHash == resourceHash - if versionMatch && hashMatch { - klog.V(4).Infof("found matching resourceVersion & manifest hash") - return true - } - } - - return false -} - -// detect changes in a resource by caching a hash of the string representation of the resource -// note: some changes in a resource e.g. nil vs empty, will not be detected this way -func hashOfResourceStruct(o interface{}) string { - oString := fmt.Sprintf("%v", o) - h := md5.New() - io.WriteString(h, oString) - rval := fmt.Sprintf("%x", h.Sum(nil)) - return rval -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/storage.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/storage.go deleted file mode 100644 index afbdc53ee..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/storage.go +++ /dev/null @@ -1,297 +0,0 @@ -package resourceapply - -import ( - "context" - "fmt" - - storagev1 "k8s.io/api/storage/v1" - "k8s.io/apimachinery/pkg/api/equality" - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - storageclientv1 "k8s.io/client-go/kubernetes/typed/storage/v1" - "k8s.io/klog/v2" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" - "github.com/openshift/library-go/pkg/operator/resource/resourcemerge" -) - -const ( - // Label on the CSIDriver to declare the driver's effective pod security profile - csiInlineVolProfileLabel = "security.openshift.io/csi-ephemeral-volume-profile" - - defaultScAnnotationKey = "storageclass.kubernetes.io/is-default-class" -) - -var ( - // Exempt labels are not overwritten if the value has changed - exemptCSIDriverLabels = []string{ - csiInlineVolProfileLabel, - } -) - -// ApplyStorageClass merges objectmeta, tries to write everything else -func ApplyStorageClass(ctx context.Context, client storageclientv1.StorageClassesGetter, recorder events.Recorder, required *storagev1.StorageClass) (*storagev1.StorageClass, bool, - error) { - existing, err := client.StorageClasses().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.StorageClasses().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*storagev1.StorageClass), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - if required.ObjectMeta.ResourceVersion != "" && required.ObjectMeta.ResourceVersion != existing.ObjectMeta.ResourceVersion { - err = fmt.Errorf("rejected to update StorageClass %s because the object has been modified: desired/actual ResourceVersion: %v/%v", - required.Name, required.ObjectMeta.ResourceVersion, existing.ObjectMeta.ResourceVersion) - return nil, false, err - } - // Our caller may not be able to set required.ObjectMeta.ResourceVersion. We only want to overwrite value of - // default storage class annotation if it is missing in existing.Annotations - if existing.Annotations != nil { - if _, ok := existing.Annotations[defaultScAnnotationKey]; ok { - if required.Annotations == nil { - required.Annotations = make(map[string]string) - } - required.Annotations[defaultScAnnotationKey] = existing.Annotations[defaultScAnnotationKey] - } - } - - // First, let's compare ObjectMeta from both objects - modified := false - existingCopy := existing.DeepCopy() - resourcemerge.EnsureObjectMeta(&modified, &existingCopy.ObjectMeta, required.ObjectMeta) - - // Second, let's compare the other fields. StorageClass doesn't have a spec and we don't - // want to miss fields, so we have to copy required to get all fields - // and then overwrite ObjectMeta and TypeMeta from the original. - requiredCopy := required.DeepCopy() - requiredCopy.ObjectMeta = *existingCopy.ObjectMeta.DeepCopy() - requiredCopy.TypeMeta = existingCopy.TypeMeta - - contentSame := equality.Semantic.DeepEqual(existingCopy, requiredCopy) - if contentSame && !modified { - return existing, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("StorageClass %q changes: %v", required.Name, JSONPatchNoError(existingCopy, requiredCopy)) - } - - if storageClassNeedsRecreate(existingCopy, requiredCopy) { - requiredCopy.ObjectMeta.ResourceVersion = "" - err = client.StorageClasses().Delete(ctx, existingCopy.Name, metav1.DeleteOptions{}) - resourcehelper.ReportDeleteEvent(recorder, requiredCopy, err, "Deleting StorageClass to re-create it with updated parameters") - if err != nil && !apierrors.IsNotFound(err) { - return existing, false, err - } - actual, err := client.StorageClasses().Create(ctx, requiredCopy, metav1.CreateOptions{}) - if err != nil && apierrors.IsAlreadyExists(err) { - // Delete() few lines above did not really delete the object, - // the API server is probably waiting for a finalizer removal or so. - // Report an error, but something else than "Already exists", because - // that would be very confusing - Apply failed because the object - // already exists??? - err = fmt.Errorf("failed to re-create StorageClass %s, waiting for the original object to be deleted", existingCopy.Name) - } else if err != nil { - err = fmt.Errorf("failed to re-create StorageClass %s: %s", existingCopy.Name, err) - } - resourcehelper.ReportCreateEvent(recorder, actual, err) - return actual, true, err - } - - // Only mutable fields need a change - actual, err := client.StorageClasses().Update(ctx, requiredCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err -} - -func storageClassNeedsRecreate(oldSC, newSC *storagev1.StorageClass) bool { - // Based on kubernetes/kubernetes/pkg/apis/storage/validation/validation.go, - // these fields are immutable. - if !equality.Semantic.DeepEqual(oldSC.Parameters, newSC.Parameters) { - return true - } - if oldSC.Provisioner != newSC.Provisioner { - return true - } - - // In theory, ReclaimPolicy is always set, just in case: - if (oldSC.ReclaimPolicy == nil && newSC.ReclaimPolicy != nil) || - (oldSC.ReclaimPolicy != nil && newSC.ReclaimPolicy == nil) { - return true - } - if oldSC.ReclaimPolicy != nil && newSC.ReclaimPolicy != nil && *oldSC.ReclaimPolicy != *newSC.ReclaimPolicy { - return true - } - - if !equality.Semantic.DeepEqual(oldSC.VolumeBindingMode, newSC.VolumeBindingMode) { - return true - } - return false -} - -// ApplyCSIDriver merges objectmeta and tries to update spec if any of the required fields were cleared by the API server. -// It assumes they were cleared due to a feature gate not enabled in the API server and it will be enabled soon. -// When used by StaticResourceController, it will retry periodically and eventually save the spec with the field. -func ApplyCSIDriver(ctx context.Context, client storageclientv1.CSIDriversGetter, recorder events.Recorder, requiredOriginal *storagev1.CSIDriver) (*storagev1.CSIDriver, bool, error) { - required := requiredOriginal.DeepCopy() - if required.Annotations == nil { - required.Annotations = map[string]string{} - } - if required.Labels == nil { - required.Labels = map[string]string{} - } - if err := SetSpecHashAnnotation(&required.ObjectMeta, required.Spec); err != nil { - return nil, false, err - } - if err := validateRequiredCSIDriverLabels(required); err != nil { - return nil, false, err - } - - existing, err := client.CSIDrivers().Get(ctx, required.Name, metav1.GetOptions{}) - if apierrors.IsNotFound(err) { - requiredCopy := required.DeepCopy() - actual, err := client.CSIDrivers().Create( - ctx, resourcemerge.WithCleanLabelsAndAnnotations(requiredCopy).(*storagev1.CSIDriver), metav1.CreateOptions{}) - resourcehelper.ReportCreateEvent(recorder, required, err) - return actual, true, err - } - if err != nil { - return nil, false, err - } - - // Exempt labels are not overwritten if the value has changed. They get set - // once during creation, but the admin may choose to set a different value. - // If the label is removed, it reverts back to the default value. - for _, exemptLabel := range exemptCSIDriverLabels { - if existingValue, ok := existing.Labels[exemptLabel]; ok { - required.Labels[exemptLabel] = existingValue - } - } - - needsUpdate := false - // Most CSIDriver fields are immutable. Any change to them should trigger Delete() + Create() calls. - needsRecreate := false - - existingCopy := existing.DeepCopy() - // Metadata change should need just Update() call. - resourcemerge.EnsureObjectMeta(&needsUpdate, &existingCopy.ObjectMeta, required.ObjectMeta) - - requiredSpecHash := required.Annotations[specHashAnnotation] - existingSpecHash := existing.Annotations[specHashAnnotation] - // Assume whole re-create is needed on any spec change. - // We don't keep a track of which field is mutable. - needsRecreate = requiredSpecHash != existingSpecHash - - // TODO: remove when CSIDriver spec.nodeAllocatableUpdatePeriodSeconds is enabled by default - // (https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/4876-mutable-csinode-allocatable) - if !needsRecreate && !alphaFieldsSaved(existingCopy, required) { - // The required spec is the same as in previous succesful call, however, - // the API server must have cleared some alpha/beta fields in it. - // Try to save the object again. In case the fields are cleared again, - // the caller (typically StaticResourceController) must retry periodically. - klog.V(4).Infof("Detected CSIDriver %q field cleared by the API server, updating", required.Name) - - // Assumption: the alpha fields are **mutable**, so only Update() is needed. - // Update() with the same spec as before + the field cleared by the API server - // won't generate any informer events. StaticResourceController will retry with - // periodic retry (1 minute.) - // We cannot use needsRecreate=true, as it will generate informer events and - // StaticResourceController will retry immediately, leading to a busy loop. - needsUpdate = true - existingCopy.Spec = required.Spec - } - - if !needsUpdate && !needsRecreate { - return existing, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("CSIDriver %q changes: %v", required.Name, JSONPatchNoError(existing, existingCopy)) - } - - if !needsRecreate { - // only needsUpdate is true, update the object by a simple Update call - actual, err := client.CSIDrivers().Update(ctx, existingCopy, metav1.UpdateOptions{}) - resourcehelper.ReportUpdateEvent(recorder, required, err) - return actual, true, err - } - - // needsRecreate is true, needsUpdate does not matter. Delete and re-create the object. - existingCopy.Spec = required.Spec - existingCopy.ObjectMeta.ResourceVersion = "" - err = client.CSIDrivers().Delete(ctx, existingCopy.Name, metav1.DeleteOptions{}) - resourcehelper.ReportDeleteEvent(recorder, existingCopy, err, "Deleting CSIDriver to re-create it with updated parameters") - if err != nil && !apierrors.IsNotFound(err) { - return existing, false, err - } - actual, err := client.CSIDrivers().Create(ctx, existingCopy, metav1.CreateOptions{}) - if err != nil && apierrors.IsAlreadyExists(err) { - // Delete() few lines above did not really delete the object, - // the API server is probably waiting for a finalizer removal or so. - // Report an error, but something else than "Already exists", because - // that would be very confusing - Apply failed because the object - // already exists??? - err = fmt.Errorf("failed to re-create CSIDriver object %s, waiting for the original object to be deleted", existingCopy.Name) - } else if err != nil { - err = fmt.Errorf("failed to re-create CSIDriver %s: %s", existingCopy.Name, err) - } - resourcehelper.ReportCreateEvent(recorder, actual, err) - return actual, true, err -} - -// alphaFieldsSaved checks that all required fields in the CSIDriver required spec are present and equal in the actual spec. -func alphaFieldsSaved(actual, required *storagev1.CSIDriver) bool { - // DeepDerivative checks that all fields in "required" are present and equal in "actual" - // Fields not present in "required" are ignored. - return equality.Semantic.DeepDerivative(required.Spec, actual.Spec) -} - -func validateRequiredCSIDriverLabels(required *storagev1.CSIDriver) error { - supportsEphemeralVolumes := false - for _, mode := range required.Spec.VolumeLifecycleModes { - if mode == storagev1.VolumeLifecycleEphemeral { - supportsEphemeralVolumes = true - break - } - } - // All OCP managed CSI drivers that support the Ephemeral volume - // lifecycle mode must provide a profile label the be matched against - // the pod security policy for the namespace of the pod. - // Valid values are: restricted, baseline, privileged. - _, labelFound := required.Labels[csiInlineVolProfileLabel] - if supportsEphemeralVolumes && !labelFound { - return fmt.Errorf("CSIDriver %s supports Ephemeral volume lifecycle but is missing required label %s", required.Name, csiInlineVolProfileLabel) - } - return nil -} - -func DeleteStorageClass(ctx context.Context, client storageclientv1.StorageClassesGetter, recorder events.Recorder, required *storagev1.StorageClass) (*storagev1.StorageClass, bool, - error) { - err := client.StorageClasses().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} - -func DeleteCSIDriver(ctx context.Context, client storageclientv1.CSIDriversGetter, recorder events.Recorder, required *storagev1.CSIDriver) (*storagev1.CSIDriver, bool, error) { - err := client.CSIDrivers().Delete(ctx, required.Name, metav1.DeleteOptions{}) - if err != nil && apierrors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/unstructured.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/unstructured.go deleted file mode 100644 index b17e484a8..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/unstructured.go +++ /dev/null @@ -1,51 +0,0 @@ -package resourceapply - -import ( - "context" - "fmt" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" - - "github.com/openshift/library-go/pkg/operator/events" -) - -// ApplyKnownUnstructured applies few selected Unstructured types, where it semantic knowledge -// to merge existing & required objects intelligently. Feel free to add more. -func ApplyKnownUnstructured(ctx context.Context, client dynamic.Interface, recorder events.Recorder, obj *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - switch obj.GetObjectKind().GroupVersionKind().GroupKind() { - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "ServiceMonitor"}: - return ApplyServiceMonitor(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "PrometheusRule"}: - return ApplyPrometheusRule(ctx, client, recorder, obj) - case schema.GroupKind{Group: "snapshot.storage.k8s.io", Kind: "VolumeSnapshotClass"}: - return ApplyVolumeSnapshotClass(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "Alertmanager"}: - return ApplyAlertmanager(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "Prometheus"}: - return ApplyPrometheus(ctx, client, recorder, obj) - - } - - return nil, false, fmt.Errorf("unsupported object type: %s", obj.GetKind()) -} - -// DeleteKnownUnstructured deletes few selected Unstructured types -func DeleteKnownUnstructured(ctx context.Context, client dynamic.Interface, recorder events.Recorder, obj *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - switch obj.GetObjectKind().GroupVersionKind().GroupKind() { - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "ServiceMonitor"}: - return DeleteServiceMonitor(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "PrometheusRule"}: - return DeletePrometheusRule(ctx, client, recorder, obj) - case schema.GroupKind{Group: "snapshot.storage.k8s.io", Kind: "VolumeSnapshotClass"}: - return DeleteVolumeSnapshotClass(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "Alertmanager"}: - return DeleteAlertmanager(ctx, client, recorder, obj) - case schema.GroupKind{Group: "monitoring.coreos.com", Kind: "Prometheus"}: - return DeletePrometheus(ctx, client, recorder, obj) - - } - - return nil, false, fmt.Errorf("unsupported object type: %s", obj.GetKind()) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/volumesnapshotclass.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/volumesnapshotclass.go deleted file mode 100644 index 763e03d5d..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceapply/volumesnapshotclass.go +++ /dev/null @@ -1,130 +0,0 @@ -package resourceapply - -import ( - "context" - - "k8s.io/klog/v2" - - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/dynamic" - - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/resource/resourcehelper" -) - -const ( - VolumeSnapshotClassGroup = "snapshot.storage.k8s.io" - VolumeSnapshotClassVersion = "v1" - VolumeSnapshotClassResource = "volumesnapshotclasses" -) - -var volumeSnapshotClassResourceGVR schema.GroupVersionResource = schema.GroupVersionResource{ - Group: VolumeSnapshotClassGroup, - Version: VolumeSnapshotClassVersion, - Resource: VolumeSnapshotClassResource, -} - -func ensureGenericVolumeSnapshotClass(required, existing *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - var existingCopy *unstructured.Unstructured - - // Apply "parameters" - requiredParameters, _, err := unstructured.NestedMap(required.UnstructuredContent(), "parameters") - if err != nil { - return nil, false, err - } - existingParameters, _, err := unstructured.NestedMap(existing.UnstructuredContent(), "parameters") - if err != nil { - return nil, false, err - } - if !equality.Semantic.DeepEqual(existingParameters, requiredParameters) { - if existingCopy == nil { - existingCopy = existing.DeepCopy() - } - if err := unstructured.SetNestedMap(existingCopy.UnstructuredContent(), requiredParameters, "parameters"); err != nil { - return nil, true, err - } - } - - // Apply "driver" and "deletionPolicy" - for _, fieldName := range []string{"driver", "deletionPolicy"} { - requiredField, _, err := unstructured.NestedString(required.UnstructuredContent(), fieldName) - if err != nil { - return nil, false, err - } - existingField, _, err := unstructured.NestedString(existing.UnstructuredContent(), fieldName) - if err != nil { - return nil, false, err - } - if requiredField != existingField { - if existingCopy == nil { - existingCopy = existing.DeepCopy() - } - if err := unstructured.SetNestedField(existingCopy.UnstructuredContent(), requiredField, fieldName); err != nil { - return nil, true, err - } - } - } - - // If existingCopy is not nil, then the object has been modified - if existingCopy != nil { - return existingCopy, true, nil - } - - return existing, false, nil -} - -// ApplyVolumeSnapshotClass applies Volume Snapshot Class. -func ApplyVolumeSnapshotClass(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - existing, err := client.Resource(volumeSnapshotClassResourceGVR).Get(ctx, required.GetName(), metav1.GetOptions{}) - if errors.IsNotFound(err) { - newObj, createErr := client.Resource(volumeSnapshotClassResourceGVR).Create(ctx, required, metav1.CreateOptions{}) - if createErr != nil { - recorder.Warningf("VolumeSnapshotClassCreateFailed", "Failed to create VolumeSnapshotClass.snapshot.storage.k8s.io/v1: %v", createErr) - return nil, true, createErr - } - recorder.Eventf("VolumeSnapshotClassCreated", "Created VolumeSnapshotClass.snapshot.storage.k8s.io/v1 because it was missing") - return newObj, true, nil - } - if err != nil { - return nil, false, err - } - - toUpdate, modified, err := ensureGenericVolumeSnapshotClass(required, existing) - if err != nil { - return nil, false, err - } - - if !modified { - return existing, false, nil - } - - if klog.V(2).Enabled() { - klog.Infof("VolumeSnapshotClass %q changes: %v", required.GetName(), JSONPatchNoError(existing, toUpdate)) - } - - newObj, err := client.Resource(volumeSnapshotClassResourceGVR).Update(ctx, toUpdate, metav1.UpdateOptions{}) - if err != nil { - recorder.Warningf("VolumeSnapshotClassFailed", "Failed to update VolumeSnapshotClass.snapshot.storage.k8s.io/v1: %v", err) - return nil, true, err - } - - recorder.Eventf("VolumeSnapshotClassUpdated", "Updated VolumeSnapshotClass.snapshot.storage.k8s.io/v1 because it changed") - return newObj, true, err -} - -func DeleteVolumeSnapshotClass(ctx context.Context, client dynamic.Interface, recorder events.Recorder, required *unstructured.Unstructured) (*unstructured.Unstructured, bool, error) { - namespace := required.GetNamespace() - err := client.Resource(volumeSnapshotClassResourceGVR).Namespace(namespace).Delete(ctx, required.GetName(), metav1.DeleteOptions{}) - if err != nil && errors.IsNotFound(err) { - return nil, false, nil - } - if err != nil { - return nil, false, err - } - resourcehelper.ReportDeleteEvent(recorder, required, err) - return nil, true, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/event_helpers.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/event_helpers.go deleted file mode 100644 index 8e8ebbe96..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/event_helpers.go +++ /dev/null @@ -1,43 +0,0 @@ -package resourcehelper - -import ( - "fmt" - "strings" - - "k8s.io/apimachinery/pkg/runtime" - - "github.com/openshift/library-go/pkg/operator/events" -) - -func ReportCreateEvent(recorder events.Recorder, obj runtime.Object, originalErr error) { - gvk := GuessObjectGroupVersionKind(obj) - if originalErr == nil { - recorder.Eventf(fmt.Sprintf("%sCreated", gvk.Kind), "Created %s because it was missing", FormatResourceForCLIWithNamespace(obj)) - return - } - recorder.Warningf(fmt.Sprintf("%sCreateFailed", gvk.Kind), "Failed to create %s: %v", FormatResourceForCLIWithNamespace(obj), originalErr) -} - -func ReportUpdateEvent(recorder events.Recorder, obj runtime.Object, originalErr error, details ...string) { - gvk := GuessObjectGroupVersionKind(obj) - switch { - case originalErr != nil: - recorder.Warningf(fmt.Sprintf("%sUpdateFailed", gvk.Kind), "Failed to update %s: %v", FormatResourceForCLIWithNamespace(obj), originalErr) - case len(details) == 0: - recorder.Eventf(fmt.Sprintf("%sUpdated", gvk.Kind), "Updated %s because it changed", FormatResourceForCLIWithNamespace(obj)) - default: - recorder.Eventf(fmt.Sprintf("%sUpdated", gvk.Kind), "Updated %s:\n%s", FormatResourceForCLIWithNamespace(obj), strings.Join(details, "\n")) - } -} - -func ReportDeleteEvent(recorder events.Recorder, obj runtime.Object, originalErr error, details ...string) { - gvk := GuessObjectGroupVersionKind(obj) - switch { - case originalErr != nil: - recorder.Warningf(fmt.Sprintf("%sDeleteFailed", gvk.Kind), "Failed to delete %s: %v", FormatResourceForCLIWithNamespace(obj), originalErr) - case len(details) == 0: - recorder.Eventf(fmt.Sprintf("%sDeleted", gvk.Kind), "Deleted %s", FormatResourceForCLIWithNamespace(obj)) - default: - recorder.Eventf(fmt.Sprintf("%sDeleted", gvk.Kind), "Deleted %s:\n%s", FormatResourceForCLIWithNamespace(obj), strings.Join(details, "\n")) - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/resource_helpers.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/resource_helpers.go deleted file mode 100644 index e89974790..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcehelper/resource_helpers.go +++ /dev/null @@ -1,79 +0,0 @@ -package resourcehelper - -import ( - "k8s.io/apimachinery/pkg/api/meta" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/kubernetes/scheme" - - "github.com/openshift/api" -) - -var ( - openshiftScheme = runtime.NewScheme() -) - -func init() { - if err := api.Install(openshiftScheme); err != nil { - panic(err) - } -} - -// FormatResourceForCLIWithNamespace generates a string that can be copy/pasted for use with oc get that includes -// specifying the namespace with the -n option (e.g., `ConfigMap/cluster-config-v1 -n kube-system`). -func FormatResourceForCLIWithNamespace(obj runtime.Object) string { - gvk := GuessObjectGroupVersionKind(obj) - kind := gvk.Kind - group := gvk.Group - var name, namespace string - accessor, err := meta.Accessor(obj) - if err != nil { - name = "" - namespace = "" - } else { - name = accessor.GetName() - namespace = accessor.GetNamespace() - } - if len(group) > 0 { - group = "." + group - } - if len(namespace) > 0 { - namespace = " -n " + namespace - } - return kind + group + "/" + name + namespace -} - -// FormatResourceForCLI generates a string that can be copy/pasted for use with oc get. -func FormatResourceForCLI(obj runtime.Object) string { - gvk := GuessObjectGroupVersionKind(obj) - kind := gvk.Kind - group := gvk.Group - var name string - accessor, err := meta.Accessor(obj) - if err != nil { - name = "" - } else { - name = accessor.GetName() - } - if len(group) > 0 { - group = "." + group - } - return kind + group + "/" + name -} - -// GuessObjectGroupVersionKind returns a human readable for the passed runtime object. -func GuessObjectGroupVersionKind(object runtime.Object) schema.GroupVersionKind { - if object == nil { - return schema.GroupVersionKind{Kind: ""} - } - if gvk := object.GetObjectKind().GroupVersionKind(); len(gvk.Kind) > 0 { - return gvk - } - if kinds, _, _ := scheme.Scheme.ObjectKinds(object); len(kinds) > 0 { - return kinds[0] - } - if kinds, _, _ := openshiftScheme.ObjectKinds(object); len(kinds) > 0 { - return kinds[0] - } - return schema.GroupVersionKind{Kind: ""} -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go deleted file mode 100644 index 2fcfd1394..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/admissionregistration.go +++ /dev/null @@ -1,51 +0,0 @@ -package resourcemerge - -import ( - operatorsv1 "github.com/openshift/api/operator/v1" - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// ExpectedMutatingWebhooksConfiguration returns last applied generation for MutatingWebhookConfiguration resource registered in operator -func ExpectedMutatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64 { - generation := GenerationFor(previousGenerations, schema.GroupResource{Group: admissionregistrationv1.SchemeGroupVersion.Group, Resource: "mutatingwebhookconfigurations"}, "", name) - if generation != nil { - return generation.LastGeneration - } - return -1 -} - -// SetMutatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided MutatingWebhookConfiguration resource -func SetMutatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.MutatingWebhookConfiguration) { - if actual == nil { - return - } - SetGeneration(generations, operatorsv1.GenerationStatus{ - Group: admissionregistrationv1.SchemeGroupVersion.Group, - Resource: "mutatingwebhookconfigurations", - Name: actual.Name, - LastGeneration: actual.ObjectMeta.Generation, - }) -} - -// ExpectedValidatingWebhooksConfiguration returns last applied generation for ValidatingWebhookConfiguration resource registered in operator -func ExpectedValidatingWebhooksConfiguration(name string, previousGenerations []operatorsv1.GenerationStatus) int64 { - generation := GenerationFor(previousGenerations, schema.GroupResource{Group: admissionregistrationv1.SchemeGroupVersion.Group, Resource: "validatingwebhookconfigurations"}, "", name) - if generation != nil { - return generation.LastGeneration - } - return -1 -} - -// SetValidatingWebhooksConfigurationGeneration updates operator generation status list with last applied generation for provided ValidatingWebhookConfiguration resource -func SetValidatingWebhooksConfigurationGeneration(generations *[]operatorsv1.GenerationStatus, actual *admissionregistrationv1.ValidatingWebhookConfiguration) { - if actual == nil { - return - } - SetGeneration(generations, operatorsv1.GenerationStatus{ - Group: admissionregistrationv1.SchemeGroupVersion.Group, - Resource: "validatingwebhookconfigurations", - Name: actual.Name, - LastGeneration: actual.ObjectMeta.Generation, - }) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apiextensions.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apiextensions.go deleted file mode 100644 index 3a00f557c..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apiextensions.go +++ /dev/null @@ -1,68 +0,0 @@ -package resourcemerge - -import ( - "strings" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/utils/ptr" -) - -// EnsureCustomResourceDefinitionV1Beta1 ensures that the existing matches the required. -// modified is set to true when existing had to be updated with required. -func EnsureCustomResourceDefinitionV1Beta1(modified *bool, existing *apiextensionsv1beta1.CustomResourceDefinition, required apiextensionsv1beta1.CustomResourceDefinition) { - EnsureObjectMeta(modified, &existing.ObjectMeta, required.ObjectMeta) - - // we stomp everything - if !equality.Semantic.DeepEqual(existing.Spec, required.Spec) { - *modified = true - existing.Spec = required.Spec - } -} - -// EnsureCustomResourceDefinitionV1 ensures that the existing matches the required. -// modified is set to true when existing had to be updated with required. -func EnsureCustomResourceDefinitionV1(modified *bool, existing *apiextensionsv1.CustomResourceDefinition, required apiextensionsv1.CustomResourceDefinition) { - EnsureObjectMeta(modified, &existing.ObjectMeta, required.ObjectMeta) - - // we need to match defaults - mimicCRDV1Defaulting(&required) - // we stomp everything - if !equality.Semantic.DeepEqual(existing.Spec, required.Spec) { - *modified = true - existing.Spec = required.Spec - } -} - -func mimicCRDV1Defaulting(required *apiextensionsv1.CustomResourceDefinition) { - crd_SetDefaults_CustomResourceDefinitionSpec(&required.Spec) - - if required.Spec.Conversion != nil && - required.Spec.Conversion.Webhook != nil && - required.Spec.Conversion.Webhook.ClientConfig != nil && - required.Spec.Conversion.Webhook.ClientConfig.Service != nil { - crd_SetDefaults_ServiceReference(required.Spec.Conversion.Webhook.ClientConfig.Service) - } -} - -// lifted from https://github.com/kubernetes/kubernetes/blob/v1.21.0/staging/src/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go#L42-L61 -func crd_SetDefaults_CustomResourceDefinitionSpec(obj *apiextensionsv1.CustomResourceDefinitionSpec) { - if len(obj.Names.Singular) == 0 { - obj.Names.Singular = strings.ToLower(obj.Names.Kind) - } - if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { - obj.Names.ListKind = obj.Names.Kind + "List" - } - if obj.Conversion == nil { - obj.Conversion = &apiextensionsv1.CustomResourceConversion{ - Strategy: apiextensionsv1.NoneConverter, - } - } -} - -func crd_SetDefaults_ServiceReference(obj *apiextensionsv1.ServiceReference) { - if obj.Port == nil { - obj.Port = ptr.To[int32](443) - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apps.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apps.go deleted file mode 100644 index 1731382e6..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/apps.go +++ /dev/null @@ -1,80 +0,0 @@ -package resourcemerge - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/apimachinery/pkg/runtime/schema" - - operatorsv1 "github.com/openshift/api/operator/v1" -) - -func GenerationFor(generations []operatorsv1.GenerationStatus, resource schema.GroupResource, namespace, name string) *operatorsv1.GenerationStatus { - for i := range generations { - curr := &generations[i] - if curr.Namespace == namespace && - curr.Name == name && - curr.Group == resource.Group && - curr.Resource == resource.Resource { - - return curr - } - } - - return nil -} - -func SetGeneration(generations *[]operatorsv1.GenerationStatus, newGeneration operatorsv1.GenerationStatus) { - if generations == nil { - generations = &[]operatorsv1.GenerationStatus{} - } - - existingGeneration := GenerationFor(*generations, schema.GroupResource{Group: newGeneration.Group, Resource: newGeneration.Resource}, newGeneration.Namespace, newGeneration.Name) - if existingGeneration == nil { - *generations = append(*generations, newGeneration) - return - } - - existingGeneration.LastGeneration = newGeneration.LastGeneration - existingGeneration.Hash = newGeneration.Hash -} - -func ExpectedDeploymentGeneration(required *appsv1.Deployment, previousGenerations []operatorsv1.GenerationStatus) int64 { - generation := GenerationFor(previousGenerations, schema.GroupResource{Group: "apps", Resource: "deployments"}, required.Namespace, required.Name) - if generation != nil { - return generation.LastGeneration - } - return -1 -} - -func SetDeploymentGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.Deployment) { - if actual == nil { - return - } - SetGeneration(generations, operatorsv1.GenerationStatus{ - Group: "apps", - Resource: "deployments", - Namespace: actual.Namespace, - Name: actual.Name, - LastGeneration: actual.ObjectMeta.Generation, - }) -} - -func ExpectedDaemonSetGeneration(required *appsv1.DaemonSet, previousGenerations []operatorsv1.GenerationStatus) int64 { - generation := GenerationFor(previousGenerations, schema.GroupResource{Group: "apps", Resource: "daemonsets"}, required.Namespace, required.Name) - if generation != nil { - return generation.LastGeneration - } - return -1 -} - -func SetDaemonSetGeneration(generations *[]operatorsv1.GenerationStatus, actual *appsv1.DaemonSet) { - if actual == nil { - return - } - SetGeneration(generations, operatorsv1.GenerationStatus{ - Group: "apps", - Resource: "daemonsets", - Namespace: actual.Namespace, - Name: actual.Name, - LastGeneration: actual.ObjectMeta.Generation, - }) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/generic_config_merger.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/generic_config_merger.go deleted file mode 100644 index f1e6d0c9f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/generic_config_merger.go +++ /dev/null @@ -1,271 +0,0 @@ -package resourcemerge - -import ( - "bytes" - "encoding/json" - "fmt" - "reflect" - "strings" - - "k8s.io/klog/v2" - "sigs.k8s.io/yaml" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - kyaml "k8s.io/apimachinery/pkg/util/yaml" -) - -// MergeConfigMap takes a configmap, the target key, special overlay funcs a list of config configs to overlay on top of each other -// It returns the resultant configmap and a bool indicating if any changes were made to the configmap -func MergeConfigMap(configMap *corev1.ConfigMap, configKey string, specialCases map[string]MergeFunc, configYAMLs ...[]byte) (*corev1.ConfigMap, bool, error) { - return MergePrunedConfigMap(nil, configMap, configKey, specialCases, configYAMLs...) -} - -// MergePrunedConfigMap takes a configmap, the target key, special overlay funcs a list of config configs to overlay on top of each other -// It returns the resultant configmap and a bool indicating if any changes were made to the configmap. -// It roundtrips the config through the given schema. -func MergePrunedConfigMap(schema runtime.Object, configMap *corev1.ConfigMap, configKey string, specialCases map[string]MergeFunc, configYAMLs ...[]byte) (*corev1.ConfigMap, bool, error) { - configBytes, err := MergePrunedProcessConfig(schema, specialCases, configYAMLs...) - if err != nil { - return nil, false, err - } - - if reflect.DeepEqual(configMap.Data[configKey], configBytes) { - return configMap, false, nil - } - - ret := configMap.DeepCopy() - ret.Data[configKey] = string(configBytes) - - return ret, true, nil -} - -// MergeProcessConfig merges a series of config yaml files together with each later one overlaying all previous -func MergeProcessConfig(specialCases map[string]MergeFunc, configYAMLs ...[]byte) ([]byte, error) { - currentConfigYAML := configYAMLs[0] - - for _, currConfigYAML := range configYAMLs[1:] { - prevConfigJSON, err := kyaml.ToJSON(currentConfigYAML) - if err != nil { - klog.Warning(err) - // maybe it's just json - prevConfigJSON = currentConfigYAML - } - prevConfig := map[string]interface{}{} - if err := json.NewDecoder(bytes.NewBuffer(prevConfigJSON)).Decode(&prevConfig); err != nil { - return nil, err - } - - if len(currConfigYAML) > 0 { - currConfigJSON, err := kyaml.ToJSON(currConfigYAML) - if err != nil { - klog.Warning(err) - // maybe it's just json - currConfigJSON = currConfigYAML - } - currConfig := map[string]interface{}{} - if err := json.NewDecoder(bytes.NewBuffer(currConfigJSON)).Decode(&currConfig); err != nil { - return nil, err - } - - // protected against mismatched typemeta - prevAPIVersion, _, _ := unstructured.NestedString(prevConfig, "apiVersion") - prevKind, _, _ := unstructured.NestedString(prevConfig, "kind") - currAPIVersion, _, _ := unstructured.NestedString(currConfig, "apiVersion") - currKind, _, _ := unstructured.NestedString(currConfig, "kind") - currGVKSet := len(currAPIVersion) > 0 || len(currKind) > 0 - gvkMismatched := currAPIVersion != prevAPIVersion || currKind != prevKind - if currGVKSet && gvkMismatched { - return nil, fmt.Errorf("%v/%v does not equal %v/%v", currAPIVersion, currKind, prevAPIVersion, prevKind) - } - - if err := mergeConfig(prevConfig, currConfig, "", specialCases); err != nil { - return nil, err - } - } - - currentConfigYAML, err = runtime.Encode(unstructured.UnstructuredJSONScheme, &unstructured.Unstructured{Object: prevConfig}) - if err != nil { - return nil, err - } - } - - return currentConfigYAML, nil -} - -// MergePrunedProcessConfig merges a series of config yaml files together with each later one overlaying all previous. -// The result is roundtripped through the given schema if it is non-nil. -func MergePrunedProcessConfig(schema runtime.Object, specialCases map[string]MergeFunc, configYAMLs ...[]byte) ([]byte, error) { - bs, err := MergeProcessConfig(specialCases, configYAMLs...) - if err != nil { - return nil, err - } - - if schema == nil { - return bs, nil - } - - // roundtrip through the schema - typed := schema.DeepCopyObject() - if err := yaml.Unmarshal(bs, typed); err != nil { - return nil, err - } - typedBytes, err := json.Marshal(typed) - if err != nil { - return nil, err - } - var untypedJSON map[string]interface{} - if err := json.Unmarshal(typedBytes, &untypedJSON); err != nil { - return nil, err - } - - // and intersect output with input because we cannot rely on omitempty in the schema - inputBytes, err := yaml.YAMLToJSON(bs) - if err != nil { - return nil, err - } - var inputJSON map[string]interface{} - if err := json.Unmarshal(inputBytes, &inputJSON); err != nil { - return nil, err - } - return json.Marshal(intersectJSON(inputJSON, untypedJSON)) -} - -type MergeFunc func(dst, src interface{}, currentPath string) (interface{}, error) - -var _ MergeFunc = RemoveConfig - -// RemoveConfig is a merge func that elimintes an entire path from the config -func RemoveConfig(dst, src interface{}, currentPath string) (interface{}, error) { - return dst, nil -} - -// mergeConfig overwrites entries in curr by additional. It modifies curr. -func mergeConfig(curr, additional map[string]interface{}, currentPath string, specialCases map[string]MergeFunc) error { - for additionalKey, additionalVal := range additional { - fullKey := currentPath + "." + additionalKey - specialCase, ok := specialCases[fullKey] - if ok { - var err error - curr[additionalKey], err = specialCase(curr[additionalKey], additionalVal, currentPath) - if err != nil { - return err - } - continue - } - - currVal, ok := curr[additionalKey] - if !ok { - curr[additionalKey] = additionalVal - continue - } - - // only some scalars are accepted - switch castVal := additionalVal.(type) { - case map[string]interface{}: - currValAsMap, ok := currVal.(map[string]interface{}) - if !ok { - currValAsMap = map[string]interface{}{} - curr[additionalKey] = currValAsMap - } - - err := mergeConfig(currValAsMap, castVal, fullKey, specialCases) - if err != nil { - return err - } - continue - - default: - if err := unstructured.SetNestedField(curr, castVal, additionalKey); err != nil { - return err - } - } - - } - - return nil -} - -// jsonIntersection returns the intersection of both JSON object, -// preferring the values of the first argument. -func intersectJSON(x1, x2 map[string]interface{}) map[string]interface{} { - if x1 == nil || x2 == nil { - return nil - } - ret := map[string]interface{}{} - for k, v1 := range x1 { - v2, ok := x2[k] - if !ok { - continue - } - ret[k] = intersectValue(v1, v2) - } - return ret -} - -func intersectArray(x1, x2 []interface{}) []interface{} { - if x1 == nil || x2 == nil { - return nil - } - ret := make([]interface{}, 0, len(x1)) - for i := range x1 { - if i >= len(x2) { - break - } - ret = append(ret, intersectValue(x1[i], x2[i])) - } - return ret -} - -func intersectValue(x1, x2 interface{}) interface{} { - switch x1 := x1.(type) { - case map[string]interface{}: - x2, ok := x2.(map[string]interface{}) - if !ok { - return x1 - } - return intersectJSON(x1, x2) - case []interface{}: - x2, ok := x2.([]interface{}) - if !ok { - return x1 - } - return intersectArray(x1, x2) - default: - return x1 - } -} - -// IsRequiredConfigPresent can check an observedConfig to see if certain required paths are present in that config. -// This allows operators to require certain configuration to be observed before proceeding to honor a configuration or roll it out. -func IsRequiredConfigPresent(config []byte, requiredPaths [][]string) error { - if len(config) == 0 { - return fmt.Errorf("no observedConfig") - } - - existingConfig := map[string]interface{}{} - if err := json.NewDecoder(bytes.NewBuffer(config)).Decode(&existingConfig); err != nil { - return fmt.Errorf("error parsing config, %v", err) - } - - for _, requiredPath := range requiredPaths { - configVal, found, err := unstructured.NestedFieldNoCopy(existingConfig, requiredPath...) - if err != nil { - return fmt.Errorf("error reading %v from config, %v", strings.Join(requiredPath, "."), err) - } - if !found { - return fmt.Errorf("%v missing from config", strings.Join(requiredPath, ".")) - } - if configVal == nil { - return fmt.Errorf("%v null in config", strings.Join(requiredPath, ".")) - } - if configValSlice, ok := configVal.([]interface{}); ok && len(configValSlice) == 0 { - return fmt.Errorf("%v empty in config", strings.Join(requiredPath, ".")) - } - if configValString, ok := configVal.(string); ok && len(configValString) == 0 { - return fmt.Errorf("%v empty in config", strings.Join(requiredPath, ".")) - } - } - return nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go deleted file mode 100644 index 20e19a78f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourcemerge/object_merger.go +++ /dev/null @@ -1,289 +0,0 @@ -package resourcemerge - -import ( - errorsstdlib "errors" - "fmt" - "reflect" - "strings" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// EnsureObjectMeta writes namespace, name, labels, and annotations. Don't set other things here. -// TODO finalizer support maybe? -func EnsureObjectMeta(modified *bool, existing *metav1.ObjectMeta, required metav1.ObjectMeta) { - SetStringIfSet(modified, &existing.Namespace, required.Namespace) - SetStringIfSet(modified, &existing.Name, required.Name) - MergeMap(modified, &existing.Labels, required.Labels) - MergeMap(modified, &existing.Annotations, required.Annotations) - MergeOwnerRefs(modified, &existing.OwnerReferences, required.OwnerReferences) -} - -func EnsureObjectMetaForUnstructured(modified *bool, existing *unstructured.Unstructured, required *unstructured.Unstructured) error { - - // Ensure metadata field is present on the object. - existingObjectMeta, found, err := unstructured.NestedMap(existing.Object, "metadata") - if err != nil { - return err - } - if !found { - return errorsstdlib.New(fmt.Sprintf("metadata not found in the existing object: %s/%s", existing.GetNamespace(), existing.GetName())) - } - var requiredObjectMeta map[string]interface{} - requiredObjectMeta, found, err = unstructured.NestedMap(required.Object, "metadata") - if err != nil { - return err - } - if !found { - return errorsstdlib.New(fmt.Sprintf("metadata not found in the required object: %s/%s", required.GetNamespace(), required.GetName())) - } - - // Cast the metadata to the correct type. - var existingObjectMetaTyped, requiredObjectMetaTyped metav1.ObjectMeta - err = runtime.DefaultUnstructuredConverter.FromUnstructured(existingObjectMeta, &existingObjectMetaTyped) - if err != nil { - return err - } - err = runtime.DefaultUnstructuredConverter.FromUnstructured(requiredObjectMeta, &requiredObjectMetaTyped) - if err != nil { - return err - } - - // Check if the metadata objects differ. This only checks for selective fields (excluding the resource version, among others). - EnsureObjectMeta(modified, &existingObjectMetaTyped, requiredObjectMetaTyped) - if *modified { - existing.Object["metadata"], err = runtime.DefaultUnstructuredConverter.ToUnstructured(&existingObjectMetaTyped) - if err != nil { - return err - } - } - - return nil -} - -// WithCleanLabelsAndAnnotations cleans the metadata off the removal annotations/labels/ownerrefs -// (those that end with trailing "-") -func WithCleanLabelsAndAnnotations(obj metav1.Object) metav1.Object { - obj.SetAnnotations(cleanRemovalKeys(obj.GetAnnotations())) - obj.SetLabels(cleanRemovalKeys(obj.GetLabels())) - obj.SetOwnerReferences(cleanRemovalOwnerRefs(obj.GetOwnerReferences())) - return obj -} - -func cleanRemovalKeys(required map[string]string) map[string]string { - for k := range required { - if strings.HasSuffix(k, "-") { - delete(required, k) - } - } - return required -} - -func SetString(modified *bool, existing *string, required string) { - if required != *existing { - *existing = required - *modified = true - } -} - -func SetStringIfSet(modified *bool, existing *string, required string) { - if len(required) == 0 { - return - } - if required != *existing { - *existing = required - *modified = true - } -} - -func SetStringSlice(modified *bool, existing *[]string, required []string) { - if !reflect.DeepEqual(required, *existing) { - *existing = required - *modified = true - } -} - -func SetStringSliceIfSet(modified *bool, existing *[]string, required []string) { - if required == nil { - return - } - if !reflect.DeepEqual(required, *existing) { - *existing = required - *modified = true - } -} - -// Deprecated: Use k8s.io/utils/ptr.To instead. -func BoolPtr(val bool) *bool { - return &val -} - -func SetBool(modified *bool, existing *bool, required bool) { - if required != *existing { - *existing = required - *modified = true - } -} - -func SetInt32(modified *bool, existing *int32, required int32) { - if required != *existing { - *existing = required - *modified = true - } -} - -func SetInt32IfSet(modified *bool, existing *int32, required int32) { - if required == 0 { - return - } - - SetInt32(modified, existing, required) -} - -func SetInt64(modified *bool, existing *int64, required int64) { - if required != *existing { - *existing = required - *modified = true - } -} - -func MergeMap(modified *bool, existing *map[string]string, required map[string]string) { - if *existing == nil { - *existing = map[string]string{} - } - for k, v := range required { - actualKey := k - removeKey := false - - // if "required" map contains a key with "-" as suffix, remove that - // key from the existing map instead of replacing the value - if strings.HasSuffix(k, "-") { - removeKey = true - actualKey = strings.TrimRight(k, "-") - } - - if existingV, ok := (*existing)[actualKey]; removeKey { - if !ok { - continue - } - // value found -> it should be removed - delete(*existing, actualKey) - *modified = true - - } else if !ok || v != existingV { - *modified = true - (*existing)[actualKey] = v - } - } -} - -func SetMapStringString(modified *bool, existing *map[string]string, required map[string]string) { - if *existing == nil { - *existing = map[string]string{} - } - - if !reflect.DeepEqual(*existing, required) { - *existing = required - } -} - -func SetMapStringStringIfSet(modified *bool, existing *map[string]string, required map[string]string) { - if required == nil { - return - } - if *existing == nil { - *existing = map[string]string{} - } - - if !reflect.DeepEqual(*existing, required) { - *existing = required - } -} - -func MergeOwnerRefs(modified *bool, existing *[]metav1.OwnerReference, required []metav1.OwnerReference) { - if *existing == nil { - *existing = []metav1.OwnerReference{} - } - - for _, o := range required { - removeOwner := false - - // if "required" ownerRefs contain an owner.UID with "-" as suffix, remove that - // ownerRef from the existing ownerRefs instead of replacing the value - // NOTE: this is the same format as kubectl annotate and kubectl label - if strings.HasSuffix(string(o.UID), "-") { - removeOwner = true - } - - existedIndex := 0 - - for existedIndex < len(*existing) { - if ownerRefMatched(o, (*existing)[existedIndex]) { - break - } - existedIndex++ - } - - if existedIndex == len(*existing) { - // There is no matched ownerref found, append the ownerref - // if it is not to be removed. - if !removeOwner { - *existing = append(*existing, o) - *modified = true - } - continue - } - - if removeOwner { - *existing = append((*existing)[:existedIndex], (*existing)[existedIndex+1:]...) - *modified = true - continue - } - - if !reflect.DeepEqual(o, (*existing)[existedIndex]) { - (*existing)[existedIndex] = o - *modified = true - } - } -} - -func ownerRefMatched(existing, required metav1.OwnerReference) bool { - if existing.Name != required.Name { - return false - } - - if existing.Kind != required.Kind { - return false - } - - existingGV, err := schema.ParseGroupVersion(existing.APIVersion) - - if err != nil { - return false - } - - requiredGV, err := schema.ParseGroupVersion(required.APIVersion) - - if err != nil { - return false - } - - if existingGV.Group != requiredGV.Group { - return false - } - - return true -} - -func cleanRemovalOwnerRefs(required []metav1.OwnerReference) []metav1.OwnerReference { - for k := 0; k < len(required); k++ { - if strings.HasSuffix(string(required[k].UID), "-") { - required = append(required[:k], required[k+1:]...) - k-- - } - } - return required -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go deleted file mode 100644 index 11326c89d..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/admission.go +++ /dev/null @@ -1,73 +0,0 @@ -package resourceread - -import ( - admissionv1 "k8s.io/api/admissionregistration/v1" - admissionv1beta1 "k8s.io/api/admissionregistration/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var ( - admissionScheme = runtime.NewScheme() - admissionCodecs = serializer.NewCodecFactory(admissionScheme) -) - -func init() { - utilruntime.Must(admissionv1.AddToScheme(admissionScheme)) - utilruntime.Must(admissionv1beta1.AddToScheme(admissionScheme)) -} - -func ReadValidatingWebhookConfigurationV1OrDie(objBytes []byte) *admissionv1.ValidatingWebhookConfiguration { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1.ValidatingWebhookConfiguration) -} - -func ReadMutatingWebhookConfigurationV1OrDie(objBytes []byte) *admissionv1.MutatingWebhookConfiguration { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1.MutatingWebhookConfiguration) -} - -func ReadValidatingAdmissionPolicyV1beta1OrDie(objBytes []byte) *admissionv1beta1.ValidatingAdmissionPolicy { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1beta1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1beta1.ValidatingAdmissionPolicy) -} - -func ReadValidatingAdmissionPolicyBindingV1beta1OrDie(objBytes []byte) *admissionv1beta1.ValidatingAdmissionPolicyBinding { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1beta1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1beta1.ValidatingAdmissionPolicyBinding) -} - -func ReadValidatingAdmissionPolicyV1OrDie(objBytes []byte) *admissionv1.ValidatingAdmissionPolicy { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1.ValidatingAdmissionPolicy) -} - -func ReadValidatingAdmissionPolicyBindingV1OrDie(objBytes []byte) *admissionv1.ValidatingAdmissionPolicyBinding { - requiredObj, err := runtime.Decode(admissionCodecs.UniversalDecoder(admissionv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - - return requiredObj.(*admissionv1.ValidatingAdmissionPolicyBinding) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiextensions.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiextensions.go deleted file mode 100644 index e21f774e1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiextensions.go +++ /dev/null @@ -1,35 +0,0 @@ -package resourceread - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var ( - apiExtensionsScheme = runtime.NewScheme() - apiExtensionsCodecs = serializer.NewCodecFactory(apiExtensionsScheme) -) - -func init() { - utilruntime.Must(apiextensionsv1beta1.AddToScheme(apiExtensionsScheme)) - utilruntime.Must(apiextensionsv1.AddToScheme(apiExtensionsScheme)) -} - -func ReadCustomResourceDefinitionV1Beta1OrDie(objBytes []byte) *apiextensionsv1beta1.CustomResourceDefinition { - requiredObj, err := runtime.Decode(apiExtensionsCodecs.UniversalDecoder(apiextensionsv1beta1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*apiextensionsv1beta1.CustomResourceDefinition) -} - -func ReadCustomResourceDefinitionV1OrDie(objBytes []byte) *apiextensionsv1.CustomResourceDefinition { - requiredObj, err := runtime.Decode(apiExtensionsCodecs.UniversalDecoder(apiextensionsv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*apiextensionsv1.CustomResourceDefinition) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiregistration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiregistration.go deleted file mode 100644 index 05a4146ec..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apiregistration.go +++ /dev/null @@ -1,26 +0,0 @@ -package resourceread - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" -) - -var ( - apiRegisterScheme = runtime.NewScheme() - apiRegisterCodec = serializer.NewCodecFactory(apiRegisterScheme) -) - -func init() { - if err := apiregistrationv1.AddToScheme(apiRegisterScheme); err != nil { - panic(err) - } -} - -func ReadAPIServiceOrDie(objBytes []byte) *apiregistrationv1.APIService { - requiredObj, err := runtime.Decode(apiRegisterCodec.UniversalDecoder(apiregistrationv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*apiregistrationv1.APIService) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apps.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apps.go deleted file mode 100644 index 8490017e1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/apps.go +++ /dev/null @@ -1,34 +0,0 @@ -package resourceread - -import ( - appsv1 "k8s.io/api/apps/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - appsScheme = runtime.NewScheme() - appsCodecs = serializer.NewCodecFactory(appsScheme) -) - -func init() { - if err := appsv1.AddToScheme(appsScheme); err != nil { - panic(err) - } -} - -func ReadDeploymentV1OrDie(objBytes []byte) *appsv1.Deployment { - requiredObj, err := runtime.Decode(appsCodecs.UniversalDecoder(appsv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*appsv1.Deployment) -} - -func ReadDaemonSetV1OrDie(objBytes []byte) *appsv1.DaemonSet { - requiredObj, err := runtime.Decode(appsCodecs.UniversalDecoder(appsv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*appsv1.DaemonSet) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/config.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/config.go deleted file mode 100644 index dd6b05110..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/config.go +++ /dev/null @@ -1,58 +0,0 @@ -package resourceread - -import ( - "encoding/json" - - configv1 "github.com/openshift/api/config/v1" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var ( - configScheme = runtime.NewScheme() - configCodecs = serializer.NewCodecFactory(configScheme) -) - -func init() { - utilruntime.Must(configv1.AddToScheme(configScheme)) -} - -func ReadFeatureGateV1(objBytes []byte) (*configv1.FeatureGate, error) { - requiredObj, err := runtime.Decode(configCodecs.UniversalDecoder(configv1.SchemeGroupVersion), objBytes) - if err != nil { - return nil, err - } - - return requiredObj.(*configv1.FeatureGate), nil -} - -func ReadFeatureGateV1OrDie(objBytes []byte) *configv1.FeatureGate { - requiredObj, err := ReadFeatureGateV1(objBytes) - if err != nil { - panic(err) - } - - return requiredObj -} -func WriteFeatureGateV1(obj *configv1.FeatureGate) (string, error) { - // done for pretty printing of JSON (technically also yaml) - asMap, err := runtime.DefaultUnstructuredConverter.ToUnstructured(obj) - if err != nil { - return "", err - } - ret, err := json.MarshalIndent(asMap, "", " ") - if err != nil { - return "", err - } - return string(ret) + "\n", nil -} - -func WriteFeatureGateV1OrDie(obj *configv1.FeatureGate) string { - ret, err := WriteFeatureGateV1(obj) - if err != nil { - panic(err) - } - return ret -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/core.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/core.go deleted file mode 100644 index daa27c7b5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/core.go +++ /dev/null @@ -1,78 +0,0 @@ -package resourceread - -import ( - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - coreScheme = runtime.NewScheme() - coreCodecs = serializer.NewCodecFactory(coreScheme) -) - -func init() { - if err := corev1.AddToScheme(coreScheme); err != nil { - panic(err) - } -} - -func ReadConfigMapV1OrDie(objBytes []byte) *corev1.ConfigMap { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*corev1.ConfigMap) -} - -func ReadSecretV1OrDie(objBytes []byte) *corev1.Secret { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*corev1.Secret) -} - -func ReadNamespaceV1OrDie(objBytes []byte) *corev1.Namespace { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*corev1.Namespace) -} - -func ReadServiceAccountV1OrDie(objBytes []byte) *corev1.ServiceAccount { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*corev1.ServiceAccount) -} - -func ReadServiceV1OrDie(objBytes []byte) *corev1.Service { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*corev1.Service) -} - -func ReadPodV1OrDie(objBytes []byte) *corev1.Pod { - requiredObj, err := ReadPodV1(objBytes) - if err != nil { - panic(err) - } - return requiredObj -} - -func ReadPodV1(objBytes []byte) (*corev1.Pod, error) { - requiredObj, err := runtime.Decode(coreCodecs.UniversalDecoder(corev1.SchemeGroupVersion), objBytes) - if err != nil { - return nil, err - } - return requiredObj.(*corev1.Pod), nil -} - -func WritePodV1OrDie(obj *corev1.Pod) string { - return runtime.EncodeOrDie(coreCodecs.LegacyCodec(corev1.SchemeGroupVersion), obj) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/generic.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/generic.go deleted file mode 100644 index b62fb2b64..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/generic.go +++ /dev/null @@ -1,57 +0,0 @@ -package resourceread - -import ( - "github.com/openshift/api" - admissionregistrationv1 "k8s.io/api/admissionregistration/v1" - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/client-go/kubernetes/scheme" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" -) - -var ( - genericScheme = runtime.NewScheme() - genericCodecs = serializer.NewCodecFactory(genericScheme) - genericCodec = genericCodecs.UniversalDeserializer() -) - -func init() { - utilruntime.Must(api.Install(genericScheme)) - utilruntime.Must(api.InstallKube(genericScheme)) - utilruntime.Must(apiextensionsv1beta1.AddToScheme(genericScheme)) - utilruntime.Must(apiextensionsv1.AddToScheme(genericScheme)) - utilruntime.Must(migrationv1alpha1.AddToScheme(genericScheme)) - utilruntime.Must(admissionregistrationv1.AddToScheme(genericScheme)) -} - -// ReadGenericWithUnstructured parses given yaml file using known scheme (see genericScheme above). -// If the object kind is not registered in the scheme, it returns Unstructured as the last resort. -func ReadGenericWithUnstructured(objBytes []byte) (runtime.Object, error) { - // Try to get a typed object first - typedObj, _, decodeErr := genericCodec.Decode(objBytes, nil, nil) - if decodeErr == nil { - return typedObj, nil - } - - // Try unstructured, hoping to recover from "no kind XXX is registered for version YYY" - unstructuredObj, _, err := scheme.Codecs.UniversalDecoder().Decode(objBytes, nil, &unstructured.Unstructured{}) - if err != nil { - // Return the original error - return nil, decodeErr - } - return unstructuredObj, nil -} - -// ReadGenericWithUnstructuredOrDie parses given yaml file using known scheme (see genericScheme above). -// If the object kind is not registered in the scheme, it returns Unstructured as the last resort. -func ReadGenericWithUnstructuredOrDie(objBytes []byte) runtime.Object { - obj, err := ReadGenericWithUnstructured(objBytes) - if err != nil { - panic(err) - } - return obj -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/images.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/images.go deleted file mode 100644 index 62a80d128..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/images.go +++ /dev/null @@ -1,26 +0,0 @@ -package resourceread - -import ( - imagev1 "github.com/openshift/api/image/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - imagesScheme = runtime.NewScheme() - imagesCodecs = serializer.NewCodecFactory(imagesScheme) -) - -func init() { - if err := imagev1.AddToScheme(imagesScheme); err != nil { - panic(err) - } -} - -func ReadImageStreamV1OrDie(objBytes []byte) *imagev1.ImageStream { - requiredObj, err := runtime.Decode(imagesCodecs.UniversalDecoder(imagev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*imagev1.ImageStream) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/migration.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/migration.go deleted file mode 100644 index 71b6074c9..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/migration.go +++ /dev/null @@ -1,26 +0,0 @@ -package resourceread - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" -) - -var ( - migrationScheme = runtime.NewScheme() - migrationCodecs = serializer.NewCodecFactory(migrationScheme) -) - -func init() { - if err := migrationv1alpha1.AddToScheme(migrationScheme); err != nil { - panic(err) - } -} - -func ReadStorageVersionMigrationV1Alpha1OrDie(objBytes []byte) *migrationv1alpha1.StorageVersionMigration { - requiredObj, err := runtime.Decode(migrationCodecs.UniversalDecoder(migrationv1alpha1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*migrationv1alpha1.StorageVersionMigration) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/networking.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/networking.go deleted file mode 100644 index 2953e3bd1..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/networking.go +++ /dev/null @@ -1,26 +0,0 @@ -package resourceread - -import ( - networkingv1 "k8s.io/api/networking/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - netScheme = runtime.NewScheme() - netCodecs = serializer.NewCodecFactory(netScheme) -) - -func init() { - if err := networkingv1.AddToScheme(netScheme); err != nil { - panic(err) - } -} - -func ReadNetworkPolicyV1OrDie(objBytes []byte) *networkingv1.NetworkPolicy { - requiredObj, err := runtime.Decode(netCodecs.UniversalDecoder(networkingv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*networkingv1.NetworkPolicy) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/policy.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/policy.go deleted file mode 100644 index fe058fdc6..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/policy.go +++ /dev/null @@ -1,25 +0,0 @@ -package resourceread - -import ( - policyv1 "k8s.io/api/policy/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var ( - policyScheme = runtime.NewScheme() - policyCodecs = serializer.NewCodecFactory(policyScheme) -) - -func init() { - utilruntime.Must(policyv1.AddToScheme(policyScheme)) -} - -func ReadPodDisruptionBudgetV1OrDie(objBytes []byte) *policyv1.PodDisruptionBudget { - requiredObj, err := runtime.Decode(policyCodecs.UniversalDecoder(policyv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*policyv1.PodDisruptionBudget) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/rbac.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/rbac.go deleted file mode 100644 index bf14899d8..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/rbac.go +++ /dev/null @@ -1,50 +0,0 @@ -package resourceread - -import ( - rbacv1 "k8s.io/api/rbac/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - rbacScheme = runtime.NewScheme() - rbacCodecs = serializer.NewCodecFactory(rbacScheme) -) - -func init() { - if err := rbacv1.AddToScheme(rbacScheme); err != nil { - panic(err) - } -} - -func ReadClusterRoleBindingV1OrDie(objBytes []byte) *rbacv1.ClusterRoleBinding { - requiredObj, err := runtime.Decode(rbacCodecs.UniversalDecoder(rbacv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*rbacv1.ClusterRoleBinding) -} - -func ReadClusterRoleV1OrDie(objBytes []byte) *rbacv1.ClusterRole { - requiredObj, err := runtime.Decode(rbacCodecs.UniversalDecoder(rbacv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*rbacv1.ClusterRole) -} - -func ReadRoleBindingV1OrDie(objBytes []byte) *rbacv1.RoleBinding { - requiredObj, err := runtime.Decode(rbacCodecs.UniversalDecoder(rbacv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*rbacv1.RoleBinding) -} - -func ReadRoleV1OrDie(objBytes []byte) *rbacv1.Role { - requiredObj, err := runtime.Decode(rbacCodecs.UniversalDecoder(rbacv1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*rbacv1.Role) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go deleted file mode 100644 index 08e125892..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/route.go +++ /dev/null @@ -1,26 +0,0 @@ -package resourceread - -import ( - routev1 "github.com/openshift/api/route/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" -) - -var ( - routeScheme = runtime.NewScheme() - routeCodecs = serializer.NewCodecFactory(routeScheme) -) - -func init() { - if err := routev1.AddToScheme(routeScheme); err != nil { - panic(err) - } -} - -func ReadRouteV1OrDie(objBytes []byte) *routev1.Route { - requiredObj, err := runtime.Decode(routeCodecs.UniversalDecoder(routev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*routev1.Route) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go deleted file mode 100644 index 6a7d51ee7..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/storage.go +++ /dev/null @@ -1,43 +0,0 @@ -package resourceread - -import ( - storagev1 "k8s.io/api/storage/v1" - storagev1beta1 "k8s.io/api/storage/v1beta1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var ( - storageScheme = runtime.NewScheme() - storageCodecs = serializer.NewCodecFactory(storageScheme) -) - -func init() { - utilruntime.Must(storagev1.AddToScheme(storageScheme)) - utilruntime.Must(storagev1beta1.AddToScheme(storageScheme)) -} - -func ReadStorageClassV1OrDie(objBytes []byte) *storagev1.StorageClass { - requiredObj, err := runtime.Decode(storageCodecs.UniversalDecoder(storagev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*storagev1.StorageClass) -} - -func ReadCSIDriverV1Beta1OrDie(objBytes []byte) *storagev1beta1.CSIDriver { - requiredObj, err := runtime.Decode(storageCodecs.UniversalDecoder(storagev1beta1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*storagev1beta1.CSIDriver) -} - -func ReadCSIDriverV1OrDie(objBytes []byte) *storagev1.CSIDriver { - requiredObj, err := runtime.Decode(storageCodecs.UniversalDecoder(storagev1.SchemeGroupVersion), objBytes) - if err != nil { - panic(err) - } - return requiredObj.(*storagev1.CSIDriver) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go b/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go deleted file mode 100644 index bf6bfb010..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resource/resourceread/unstructured.go +++ /dev/null @@ -1,18 +0,0 @@ -package resourceread - -import ( - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/client-go/kubernetes/scheme" -) - -func ReadCredentialRequestsOrDie(objBytes []byte) *unstructured.Unstructured { - return ReadUnstructuredOrDie(objBytes) -} - -func ReadUnstructuredOrDie(objBytes []byte) *unstructured.Unstructured { - udi, _, err := scheme.Codecs.UniversalDecoder().Decode(objBytes, nil, &unstructured.Unstructured{}) - if err != nil { - panic(err) - } - return udi.(*unstructured.Unstructured) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/core.go b/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/core.go deleted file mode 100644 index bbd2ab58f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/core.go +++ /dev/null @@ -1,133 +0,0 @@ -package resourcesynccontroller - -import ( - "crypto/x509" - "fmt" - "reflect" - - corev1 "k8s.io/api/core/v1" - apierrors "k8s.io/apimachinery/pkg/api/errors" - corev1listers "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/util/cert" - - "github.com/openshift/library-go/pkg/crypto" - "github.com/openshift/library-go/pkg/operator/certrotation" -) - -func CombineCABundleConfigMaps(destinationConfigMap ResourceLocation, lister corev1listers.ConfigMapLister, additionalAnnotations certrotation.AdditionalAnnotations, inputConfigMaps ...ResourceLocation) (*corev1.ConfigMap, error) { - certificates := []*x509.Certificate{} - for _, input := range inputConfigMaps { - inputConfigMap, err := lister.ConfigMaps(input.Namespace).Get(input.Name) - if apierrors.IsNotFound(err) { - continue - } - if err != nil { - return nil, err - } - - // configmaps must conform to this - inputContent := inputConfigMap.Data["ca-bundle.crt"] - if len(inputContent) == 0 { - continue - } - inputCerts, err := cert.ParseCertsPEM([]byte(inputContent)) - if err != nil { - return nil, fmt.Errorf("configmap/%s in %q is malformed: %v", input.Name, input.Namespace, err) - } - certificates = append(certificates, inputCerts...) - } - - certificates = crypto.FilterExpiredCerts(certificates...) - finalCertificates := []*x509.Certificate{} - // now check for duplicates. n^2, but super simple - for i := range certificates { - found := false - for j := range finalCertificates { - if reflect.DeepEqual(certificates[i].Raw, finalCertificates[j].Raw) { - found = true - break - } - } - if !found { - finalCertificates = append(finalCertificates, certificates[i]) - } - } - - caBytes, err := crypto.EncodeCertificates(finalCertificates...) - if err != nil { - return nil, err - } - - cm := &corev1.ConfigMap{ - ObjectMeta: certrotation.NewTLSArtifactObjectMeta( - destinationConfigMap.Name, - destinationConfigMap.Namespace, - additionalAnnotations, - ), - Data: map[string]string{ - "ca-bundle.crt": string(caBytes), - }, - } - return cm, nil -} - -func CombineCABundleConfigMapsOptimistically(destinationConfigMap *corev1.ConfigMap, lister corev1listers.ConfigMapLister, additionalAnnotations certrotation.AdditionalAnnotations, inputConfigMaps ...ResourceLocation) (*corev1.ConfigMap, bool, error) { - var cm *corev1.ConfigMap - if destinationConfigMap == nil { - cm = &corev1.ConfigMap{} - } else { - cm = destinationConfigMap.DeepCopy() - } - certificates := []*x509.Certificate{} - for _, input := range inputConfigMaps { - inputConfigMap, err := lister.ConfigMaps(input.Namespace).Get(input.Name) - if apierrors.IsNotFound(err) { - continue - } - if err != nil { - return nil, false, err - } - - // configmaps must conform to this - inputContent := inputConfigMap.Data["ca-bundle.crt"] - if len(inputContent) == 0 { - continue - } - inputCerts, err := cert.ParseCertsPEM([]byte(inputContent)) - if err != nil { - return nil, false, fmt.Errorf("configmap/%s in %q is malformed: %v", input.Name, input.Namespace, err) - } - certificates = append(certificates, inputCerts...) - } - - certificates = crypto.FilterExpiredCerts(certificates...) - finalCertificates := []*x509.Certificate{} - // now check for duplicates. n^2, but super simple - for i := range certificates { - found := false - for j := range finalCertificates { - if reflect.DeepEqual(certificates[i].Raw, finalCertificates[j].Raw) { - found = true - break - } - } - if !found { - finalCertificates = append(finalCertificates, certificates[i]) - } - } - - caBytes, err := crypto.EncodeCertificates(finalCertificates...) - if err != nil { - return nil, false, err - } - - modified := additionalAnnotations.EnsureTLSMetadataUpdate(&cm.ObjectMeta) - newCMData := map[string]string{ - "ca-bundle.crt": string(caBytes), - } - if !reflect.DeepEqual(cm.Data, newCMData) { - cm.Data = newCMData - modified = true - } - return cm, modified, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/interfaces.go b/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/interfaces.go deleted file mode 100644 index 04cc44a44..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/interfaces.go +++ /dev/null @@ -1,41 +0,0 @@ -package resourcesynccontroller - -import "k8s.io/apimachinery/pkg/util/sets" - -// ResourceLocation describes coordinates for a resource to be synced -type ResourceLocation struct { - Namespace string `json:"namespace"` - Name string `json:"name"` - - // Provider if set for the source location enhance the error message to point to the component which - // provide this resource. - Provider string `json:"provider,omitempty"` -} - -// PreconditionsFulfilled is a function that indicates whether all prerequisites -// are met and a resource can be synced. -type preconditionsFulfilled func() (bool, error) - -func alwaysFulfilledPreconditions() (bool, error) { return true, nil } - -type syncRuleSource struct { - ResourceLocation - syncedKeys sets.Set[string] // defines the set of keys to sync from source to dest - preconditionsFulfilledFn preconditionsFulfilled // preconditions to fulfill before syncing the resource -} - -type syncRules map[ResourceLocation]syncRuleSource - -var ( - emptyResourceLocation = ResourceLocation{} -) - -// ResourceSyncer allows changes to syncing rules by this controller -type ResourceSyncer interface { - // SyncConfigMap indicates that a configmap should be copied from the source to the destination. It will also - // mirror a deletion from the source. If the source is a zero object the destination will be deleted. - SyncConfigMap(destination, source ResourceLocation) error - // SyncSecret indicates that a secret should be copied from the source to the destination. It will also - // mirror a deletion from the source. If the source is a zero object the destination will be deleted. - SyncSecret(destination, source ResourceLocation) error -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/resourcesync_controller.go b/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/resourcesync_controller.go deleted file mode 100644 index cbfc2dd5f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/resourcesynccontroller/resourcesync_controller.go +++ /dev/null @@ -1,352 +0,0 @@ -package resourcesynccontroller - -import ( - "context" - "encoding/json" - "fmt" - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - "net/http" - "sort" - "strings" - "sync" - "time" - - apierrors "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - - operatorv1 "github.com/openshift/api/operator/v1" - - "github.com/openshift/library-go/pkg/controller/factory" - "github.com/openshift/library-go/pkg/operator/condition" - "github.com/openshift/library-go/pkg/operator/events" - "github.com/openshift/library-go/pkg/operator/management" - "github.com/openshift/library-go/pkg/operator/resource/resourceapply" - "github.com/openshift/library-go/pkg/operator/v1helpers" -) - -// ResourceSyncController is a controller that will copy source configmaps and secrets to their destinations. -// It will also mirror deletions by deleting destinations. -type ResourceSyncController struct { - controllerInstanceName string - // syncRuleLock is used to ensure we avoid races on changes to syncing rules - syncRuleLock sync.RWMutex - // configMapSyncRules is a map from destination location to source location - configMapSyncRules syncRules - // secretSyncRules is a map from destination location to source location - secretSyncRules syncRules - - // knownNamespaces is the list of namespaces we are watching. - knownNamespaces sets.Set[string] - - configMapGetter corev1client.ConfigMapsGetter - secretGetter corev1client.SecretsGetter - kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces - operatorConfigClient v1helpers.OperatorClient - - runFn func(ctx context.Context, workers int) - syncCtx factory.SyncContext -} - -var _ ResourceSyncer = &ResourceSyncController{} -var _ factory.Controller = &ResourceSyncController{} - -// NewResourceSyncController creates ResourceSyncController. -func NewResourceSyncController( - instanceName string, - operatorConfigClient v1helpers.OperatorClient, - kubeInformersForNamespaces v1helpers.KubeInformersForNamespaces, - secretsGetter corev1client.SecretsGetter, - configMapsGetter corev1client.ConfigMapsGetter, - eventRecorder events.Recorder, -) *ResourceSyncController { - c := &ResourceSyncController{ - controllerInstanceName: factory.ControllerInstanceName(instanceName, "ResourceSync"), - operatorConfigClient: operatorConfigClient, - - configMapSyncRules: syncRules{}, - secretSyncRules: syncRules{}, - kubeInformersForNamespaces: kubeInformersForNamespaces, - knownNamespaces: kubeInformersForNamespaces.Namespaces(), - - configMapGetter: v1helpers.CachedConfigMapGetter(configMapsGetter, kubeInformersForNamespaces), - secretGetter: v1helpers.CachedSecretGetter(secretsGetter, kubeInformersForNamespaces), - syncCtx: factory.NewSyncContext("ResourceSyncController", eventRecorder.WithComponentSuffix("resource-sync-controller")), - } - - informers := []factory.Informer{ - operatorConfigClient.Informer(), - } - for namespace := range kubeInformersForNamespaces.Namespaces() { - if len(namespace) == 0 { - continue - } - informer := kubeInformersForNamespaces.InformersFor(namespace) - informers = append(informers, informer.Core().V1().ConfigMaps().Informer()) - informers = append(informers, informer.Core().V1().Secrets().Informer()) - } - - f := factory.New(). - WithSync(c.Sync). - WithSyncContext(c.syncCtx). - WithInformers(informers...). - ResyncEvery(time.Minute). - ToController( - instanceName, // don't change what is passed here unless you also remove the old FooDegraded condition - eventRecorder.WithComponentSuffix("resource-sync-controller"), - ) - c.runFn = f.Run - - return c -} - -func (c *ResourceSyncController) Run(ctx context.Context, workers int) { - c.runFn(ctx, workers) -} - -func (c *ResourceSyncController) Name() string { - return c.controllerInstanceName -} - -func (c *ResourceSyncController) SyncConfigMap(destination, source ResourceLocation) error { - return c.syncConfigMap(destination, source, alwaysFulfilledPreconditions) -} - -func (c *ResourceSyncController) SyncPartialConfigMap(destination ResourceLocation, source ResourceLocation, keys ...string) error { - return c.syncConfigMap(destination, source, alwaysFulfilledPreconditions, keys...) -} - -// SyncConfigMapConditionally adds a new configmap that the resource sync -// controller will synchronise if the given precondition is fulfilled. -func (c *ResourceSyncController) SyncConfigMapConditionally(destination, source ResourceLocation, preconditionsFulfilledFn preconditionsFulfilled) error { - return c.syncConfigMap(destination, source, preconditionsFulfilledFn) -} - -func (c *ResourceSyncController) syncConfigMap(destination ResourceLocation, source ResourceLocation, preconditionsFulfilledFn preconditionsFulfilled, keys ...string) error { - if !c.knownNamespaces.Has(destination.Namespace) { - return fmt.Errorf("not watching namespace %q", destination.Namespace) - } - if source != emptyResourceLocation && !c.knownNamespaces.Has(source.Namespace) { - return fmt.Errorf("not watching namespace %q", source.Namespace) - } - - c.syncRuleLock.Lock() - defer c.syncRuleLock.Unlock() - c.configMapSyncRules[destination] = syncRuleSource{ - ResourceLocation: source, - syncedKeys: sets.New(keys...), - preconditionsFulfilledFn: preconditionsFulfilledFn, - } - - // make sure the new rule is picked up - c.syncCtx.Queue().Add(c.syncCtx.QueueKey()) - return nil -} - -func (c *ResourceSyncController) SyncSecret(destination, source ResourceLocation) error { - return c.syncSecret(destination, source, alwaysFulfilledPreconditions) -} - -func (c *ResourceSyncController) SyncPartialSecret(destination, source ResourceLocation, keys ...string) error { - return c.syncSecret(destination, source, alwaysFulfilledPreconditions, keys...) -} - -// SyncSecretConditionally adds a new secret that the resource sync controller -// will synchronise if the given precondition is fulfilled. -func (c *ResourceSyncController) SyncSecretConditionally(destination, source ResourceLocation, preconditionsFulfilledFn preconditionsFulfilled) error { - return c.syncSecret(destination, source, preconditionsFulfilledFn) -} - -func (c *ResourceSyncController) syncSecret(destination, source ResourceLocation, preconditionsFulfilledFn preconditionsFulfilled, keys ...string) error { - if !c.knownNamespaces.Has(destination.Namespace) { - return fmt.Errorf("not watching namespace %q", destination.Namespace) - } - if source != emptyResourceLocation && !c.knownNamespaces.Has(source.Namespace) { - return fmt.Errorf("not watching namespace %q", source.Namespace) - } - - c.syncRuleLock.Lock() - defer c.syncRuleLock.Unlock() - c.secretSyncRules[destination] = syncRuleSource{ - ResourceLocation: source, - syncedKeys: sets.New(keys...), - preconditionsFulfilledFn: preconditionsFulfilledFn, - } - - // make sure the new rule is picked up - c.syncCtx.Queue().Add(c.syncCtx.QueueKey()) - return nil -} - -// errorWithProvider provides a finger of blame in case a source resource cannot be retrieved. -func errorWithProvider(provider string, err error) error { - if len(provider) > 0 { - return fmt.Errorf("%w (check the %q that is supposed to provide this resource)", err, provider) - } - return err -} - -func (c *ResourceSyncController) Sync(ctx context.Context, syncCtx factory.SyncContext) error { - operatorSpec, _, _, err := c.operatorConfigClient.GetOperatorState() - if err != nil { - return err - } - - if !management.IsOperatorManaged(operatorSpec.ManagementState) { - return nil - } - - c.syncRuleLock.RLock() - defer c.syncRuleLock.RUnlock() - - errors := []error{} - - for destination, source := range c.configMapSyncRules { - // skip the sync if the preconditions aren't fulfilled - if fulfilled, err := source.preconditionsFulfilledFn(); !fulfilled || err != nil { - if err != nil { - errors = append(errors, err) - } - continue - } - - if source.ResourceLocation == emptyResourceLocation { - // use the cache to check whether the configmap exists in target namespace, if not skip the extra delete call. - if _, err := c.configMapGetter.ConfigMaps(destination.Namespace).Get(ctx, destination.Name, metav1.GetOptions{}); err != nil { - if !apierrors.IsNotFound(err) { - errors = append(errors, err) - } - continue - } - if err := c.configMapGetter.ConfigMaps(destination.Namespace).Delete(ctx, destination.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { - errors = append(errors, err) - } - continue - } - - _, _, err := resourceapply.SyncPartialConfigMap(ctx, c.configMapGetter, syncCtx.Recorder(), source.Namespace, source.Name, destination.Namespace, destination.Name, source.syncedKeys, []metav1.OwnerReference{}) - if err != nil { - errors = append(errors, errorWithProvider(source.Provider, err)) - } - } - for destination, source := range c.secretSyncRules { - // skip the sync if the preconditions aren't fulfilled - if fulfilled, err := source.preconditionsFulfilledFn(); !fulfilled || err != nil { - if err != nil { - errors = append(errors, err) - } - continue - } - - if source.ResourceLocation == emptyResourceLocation { - // use the cache to check whether the secret exists in target namespace, if not skip the extra delete call. - if _, err := c.secretGetter.Secrets(destination.Namespace).Get(ctx, destination.Name, metav1.GetOptions{}); err != nil { - if !apierrors.IsNotFound(err) { - errors = append(errors, err) - } - continue - } - if err := c.secretGetter.Secrets(destination.Namespace).Delete(ctx, destination.Name, metav1.DeleteOptions{}); err != nil && !apierrors.IsNotFound(err) { - errors = append(errors, err) - } - continue - } - - _, _, err := resourceapply.SyncPartialSecret(ctx, c.secretGetter, syncCtx.Recorder(), source.Namespace, source.Name, destination.Namespace, destination.Name, source.syncedKeys, []metav1.OwnerReference{}) - if err != nil { - errors = append(errors, errorWithProvider(source.Provider, err)) - } - } - - if len(errors) > 0 { - condition := applyoperatorv1.OperatorStatus(). - WithConditions(applyoperatorv1.OperatorCondition(). - WithType(condition.ResourceSyncControllerDegradedConditionType). - WithStatus(operatorv1.ConditionTrue). - WithReason("Error"). - WithMessage(v1helpers.NewMultiLineAggregate(errors).Error())) - updateErr := c.operatorConfigClient.ApplyOperatorStatus(ctx, c.controllerInstanceName, condition) - if updateErr != nil { - return updateErr - } - return nil - } - - condition := applyoperatorv1.OperatorStatus(). - WithConditions(applyoperatorv1.OperatorCondition(). - WithType(condition.ResourceSyncControllerDegradedConditionType). - WithStatus(operatorv1.ConditionFalse)) - updateErr := c.operatorConfigClient.ApplyOperatorStatus(ctx, c.controllerInstanceName, condition) - if updateErr != nil { - return updateErr - } - return nil -} - -func NewDebugHandler(controller *ResourceSyncController) http.Handler { - return &debugHTTPHandler{controller: controller} -} - -type debugHTTPHandler struct { - controller *ResourceSyncController -} - -type ResourceSyncRule struct { - Destination ResourceLocation `json:"destination"` - Source syncRuleSource `json:"source"` -} - -type ResourceSyncRuleList []ResourceSyncRule - -func (l ResourceSyncRuleList) Len() int { return len(l) } -func (l ResourceSyncRuleList) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l ResourceSyncRuleList) Less(i, j int) bool { - if strings.Compare(l[i].Source.Namespace, l[j].Source.Namespace) < 0 { - return true - } - if strings.Compare(l[i].Source.Namespace, l[j].Source.Namespace) > 0 { - return false - } - if strings.Compare(l[i].Source.Name, l[j].Source.Name) < 0 { - return true - } - return false -} - -type ControllerSyncRules struct { - Secrets ResourceSyncRuleList `json:"secrets"` - Configs ResourceSyncRuleList `json:"configs"` -} - -// ServeSyncRules provides a handler function to return the sync rules of the controller -func (h *debugHTTPHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - syncRules := ControllerSyncRules{ResourceSyncRuleList{}, ResourceSyncRuleList{}} - - h.controller.syncRuleLock.RLock() - defer h.controller.syncRuleLock.RUnlock() - syncRules.Secrets = append(syncRules.Secrets, resourceSyncRuleList(h.controller.secretSyncRules)...) - syncRules.Configs = append(syncRules.Configs, resourceSyncRuleList(h.controller.configMapSyncRules)...) - - data, err := json.Marshal(syncRules) - if err != nil { - w.Write([]byte(err.Error())) - w.WriteHeader(http.StatusInternalServerError) - return - } - w.Write(data) - w.WriteHeader(http.StatusOK) -} - -func resourceSyncRuleList(syncRules syncRules) ResourceSyncRuleList { - rules := make(ResourceSyncRuleList, 0, len(syncRules)) - for dest, src := range syncRules { - rule := ResourceSyncRule{ - Source: src, - Destination: dest, - } - rules = append(rules, rule) - } - sort.Sort(rules) - return rules -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/args.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/args.go deleted file mode 100644 index e1a165e63..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/args.go +++ /dev/null @@ -1,61 +0,0 @@ -package v1helpers - -import ( - "fmt" - "sort" - - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" -) - -// FlagsFromUnstructured process the unstructured arguments usually retrieved from an operator's configuration file under a specific key. -// There are only two supported/valid types for arguments, that is []sting and/or string. -// Passing a different type yield an error. -// -// Use ToFlagSlice function to get a slice of string flags. -func FlagsFromUnstructured(unstructuredArgs map[string]interface{}) (map[string][]string, error) { - return flagsFromUnstructured(unstructuredArgs) -} - -// ToFlagSlice transforms the provided arguments to a slice of string flags. -// A flag name is taken directly from the key and the value is simply attached. -// A flag is repeated iff it has more than one value. -func ToFlagSlice(args map[string][]string) []string { - var keys []string - for key := range args { - keys = append(keys, key) - } - sort.Strings(keys) - - var flags []string - for _, key := range keys { - for _, token := range args[key] { - flags = append(flags, fmt.Sprintf("--%s=%s", key, token)) - } - } - return flags -} - -// flagsFromUnstructured process the unstructured arguments (interface{}) to a map of strings. -// There are only two supported/valid types for arguments, that is []sting and/or string. -// Passing a different type yield an error. -func flagsFromUnstructured(unstructuredArgs map[string]interface{}) (map[string][]string, error) { - ret := map[string][]string{} - for argName, argRawValue := range unstructuredArgs { - var argsSlice []string - var found bool - var err error - - argsSlice, found, err = unstructured.NestedStringSlice(unstructuredArgs, argName) - if !found || err != nil { - str, found, err := unstructured.NestedString(unstructuredArgs, argName) - if !found || err != nil { - return nil, fmt.Errorf("unable to process an argument, incorrect value %v under %v key, expected []string or string", argRawValue, argName) - } - argsSlice = append(argsSlice, str) - } - - ret[argName] = argsSlice - } - - return ret, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/canonicalize.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/canonicalize.go deleted file mode 100644 index b6a59e243..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/canonicalize.go +++ /dev/null @@ -1,109 +0,0 @@ -package v1helpers - -import ( - "fmt" - "slices" - "strings" - - operatorv1 "github.com/openshift/api/operator/v1" - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/json" - "k8s.io/utils/clock" - "k8s.io/utils/ptr" -) - -// ToStaticPodOperator returns the equivalent typed kind for the applyconfiguration. Due to differences in serialization like -// omitempty on strings versus pointers, the returned values can be slightly different. This is an expensive way to diff the -// result, but it is an effective one. -func ToStaticPodOperator(in *applyoperatorv1.StaticPodOperatorStatusApplyConfiguration) (*operatorv1.StaticPodOperatorStatus, error) { - if in == nil { - return nil, nil - } - jsonBytes, err := json.Marshal(in) - if err != nil { - return nil, fmt.Errorf("unable to serialize: %w", err) - } - - ret := &operatorv1.StaticPodOperatorStatus{} - if err := json.Unmarshal(jsonBytes, ret); err != nil { - return nil, fmt.Errorf("unable to deserialize: %w", err) - } - - return ret, nil -} - -func SetApplyConditionsLastTransitionTime(clock clock.PassiveClock, newConditions *[]applyoperatorv1.OperatorConditionApplyConfiguration, oldConditions []applyoperatorv1.OperatorConditionApplyConfiguration) { - if newConditions == nil { - return - } - - now := metav1.NewTime(clock.Now()) - for i := range *newConditions { - newCondition := (*newConditions)[i] - - // if the condition status is the same, then the lastTransitionTime doesn't change - if existingCondition := FindApplyCondition(oldConditions, newCondition.Type); existingCondition != nil && ptr.Equal(existingCondition.Status, newCondition.Status) { - newCondition.LastTransitionTime = existingCondition.LastTransitionTime - } - - // backstop to handle upgrade case too. If the newCondition doesn't have a lastTransitionTime it needs something - if newCondition.LastTransitionTime == nil { - newCondition.LastTransitionTime = &now - } - - (*newConditions)[i] = newCondition - } -} - -func FindApplyCondition(haystack []applyoperatorv1.OperatorConditionApplyConfiguration, conditionType *string) *applyoperatorv1.OperatorConditionApplyConfiguration { - for i := range haystack { - curr := haystack[i] - if ptr.Equal(curr.Type, conditionType) { - return &curr - } - } - - return nil -} - -func CanonicalizeStaticPodOperatorStatus(obj *applyoperatorv1.StaticPodOperatorStatusApplyConfiguration) { - if obj == nil { - return - } - CanonicalizeOperatorStatus(&obj.OperatorStatusApplyConfiguration) - slices.SortStableFunc(obj.NodeStatuses, CompareNodeStatusByNode) -} - -func CanonicalizeOperatorStatus(obj *applyoperatorv1.OperatorStatusApplyConfiguration) { - if obj == nil { - return - } - slices.SortStableFunc(obj.Conditions, CompareOperatorConditionByType) - slices.SortStableFunc(obj.Generations, CompareGenerationStatusByKeys) -} - -func CompareOperatorConditionByType(a, b applyoperatorv1.OperatorConditionApplyConfiguration) int { - return strings.Compare(ptr.Deref(a.Type, ""), ptr.Deref(b.Type, "")) -} - -func CompareGenerationStatusByKeys(a, b applyoperatorv1.GenerationStatusApplyConfiguration) int { - if c := strings.Compare(ptr.Deref(a.Group, ""), ptr.Deref(b.Group, "")); c != 0 { - return c - } - if c := strings.Compare(ptr.Deref(a.Resource, ""), ptr.Deref(b.Resource, "")); c != 0 { - return c - } - if c := strings.Compare(ptr.Deref(a.Namespace, ""), ptr.Deref(b.Namespace, "")); c != 0 { - return c - } - if c := strings.Compare(ptr.Deref(a.Name, ""), ptr.Deref(b.Name, "")); c != 0 { - return c - } - - return 0 -} - -func CompareNodeStatusByNode(a, b applyoperatorv1.NodeStatusApplyConfiguration) int { - return strings.Compare(ptr.Deref(a.NodeName, ""), ptr.Deref(b.NodeName, "")) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/core_getters.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/core_getters.go deleted file mode 100644 index bdfe17d92..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/core_getters.go +++ /dev/null @@ -1,127 +0,0 @@ -package v1helpers - -import ( - "context" - "fmt" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - corev1client "k8s.io/client-go/kubernetes/typed/core/v1" - corev1listers "k8s.io/client-go/listers/core/v1" -) - -var ( - emptyGetOptions = metav1.GetOptions{} - emptyListOptions = metav1.ListOptions{} -) - -type combinedConfigMapGetter struct { - client corev1client.ConfigMapsGetter - listers KubeInformersForNamespaces -} - -func CachedConfigMapGetter(client corev1client.ConfigMapsGetter, listers KubeInformersForNamespaces) corev1client.ConfigMapsGetter { - return &combinedConfigMapGetter{ - client: client, - listers: listers, - } -} - -type combinedConfigMapInterface struct { - corev1client.ConfigMapInterface - lister corev1listers.ConfigMapNamespaceLister - namespace string -} - -func (g combinedConfigMapGetter) ConfigMaps(namespace string) corev1client.ConfigMapInterface { - return combinedConfigMapInterface{ - ConfigMapInterface: g.client.ConfigMaps(namespace), - lister: g.listers.InformersFor(namespace).Core().V1().ConfigMaps().Lister().ConfigMaps(namespace), - namespace: namespace, - } -} - -func (g combinedConfigMapInterface) Get(_ context.Context, name string, options metav1.GetOptions) (*corev1.ConfigMap, error) { - if !equality.Semantic.DeepEqual(options, emptyGetOptions) { - return nil, fmt.Errorf("GetOptions are not honored by cached client: %#v", options) - } - - ret, err := g.lister.Get(name) - if err != nil { - return nil, err - } - return ret.DeepCopy(), nil -} -func (g combinedConfigMapInterface) List(_ context.Context, options metav1.ListOptions) (*corev1.ConfigMapList, error) { - if !equality.Semantic.DeepEqual(options, emptyListOptions) { - return nil, fmt.Errorf("ListOptions are not honored by cached client: %#v", options) - } - - list, err := g.lister.List(labels.Everything()) - if err != nil { - return nil, err - } - - ret := &corev1.ConfigMapList{} - for i := range list { - ret.Items = append(ret.Items, *(list[i].DeepCopy())) - } - return ret, nil -} - -type combinedSecretGetter struct { - client corev1client.SecretsGetter - listers KubeInformersForNamespaces -} - -func CachedSecretGetter(client corev1client.SecretsGetter, listers KubeInformersForNamespaces) corev1client.SecretsGetter { - return &combinedSecretGetter{ - client: client, - listers: listers, - } -} - -type combinedSecretInterface struct { - corev1client.SecretInterface - lister corev1listers.SecretNamespaceLister - namespace string -} - -func (g combinedSecretGetter) Secrets(namespace string) corev1client.SecretInterface { - return combinedSecretInterface{ - SecretInterface: g.client.Secrets(namespace), - lister: g.listers.InformersFor(namespace).Core().V1().Secrets().Lister().Secrets(namespace), - namespace: namespace, - } -} - -func (g combinedSecretInterface) Get(_ context.Context, name string, options metav1.GetOptions) (*corev1.Secret, error) { - if !equality.Semantic.DeepEqual(options, emptyGetOptions) { - return nil, fmt.Errorf("GetOptions are not honored by cached client: %#v", options) - } - - ret, err := g.lister.Get(name) - if err != nil { - return nil, err - } - return ret.DeepCopy(), nil -} - -func (g combinedSecretInterface) List(_ context.Context, options metav1.ListOptions) (*corev1.SecretList, error) { - if !equality.Semantic.DeepEqual(options, emptyListOptions) { - return nil, fmt.Errorf("ListOptions are not honored by cached client: %#v", options) - } - - list, err := g.lister.List(labels.Everything()) - if err != nil { - return nil, err - } - - ret := &corev1.SecretList{} - for i := range list { - ret.Items = append(ret.Items, *(list[i].DeepCopy())) - } - return ret, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/fake_informers.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/fake_informers.go deleted file mode 100644 index 893332897..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/fake_informers.go +++ /dev/null @@ -1,7 +0,0 @@ -package v1helpers - -import "k8s.io/client-go/informers" - -func NewFakeKubeInformersForNamespaces(informers map[string]informers.SharedInformerFactory) KubeInformersForNamespaces { - return kubeInformersForNamespaces(informers) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/helpers.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/helpers.go deleted file mode 100644 index f4a0943e5..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/helpers.go +++ /dev/null @@ -1,578 +0,0 @@ -package v1helpers - -import ( - "context" - "errors" - "fmt" - "os" - "sort" - "strings" - "time" - - "github.com/google/go-cmp/cmp" - configv1 "github.com/openshift/api/config/v1" - operatorv1 "github.com/openshift/api/operator/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/equality" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" - utilerrors "k8s.io/apimachinery/pkg/util/errors" - "k8s.io/client-go/util/retry" - "k8s.io/klog/v2" - "sigs.k8s.io/yaml" -) - -const ( - progressingConditionTimeout = 15 * time.Minute -) - -// SetOperandVersion sets the new version and returns the previous value. -func SetOperandVersion(versions *[]configv1.OperandVersion, operandVersion configv1.OperandVersion) string { - if versions == nil { - versions = &[]configv1.OperandVersion{} - } - existingVersion := FindOperandVersion(*versions, operandVersion.Name) - if existingVersion == nil { - *versions = append(*versions, operandVersion) - return "" - } - - previous := existingVersion.Version - existingVersion.Version = operandVersion.Version - return previous -} - -func FindOperandVersion(versions []configv1.OperandVersion, name string) *configv1.OperandVersion { - if versions == nil { - return nil - } - for i := range versions { - if versions[i].Name == name { - return &versions[i] - } - } - return nil -} - -func SetOperatorCondition(conditions *[]operatorv1.OperatorCondition, newCondition operatorv1.OperatorCondition) { - if conditions == nil { - conditions = &[]operatorv1.OperatorCondition{} - } - existingCondition := FindOperatorCondition(*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 -} - -func RemoveOperatorCondition(conditions *[]operatorv1.OperatorCondition, conditionType string) { - if conditions == nil { - conditions = &[]operatorv1.OperatorCondition{} - } - newConditions := []operatorv1.OperatorCondition{} - for _, condition := range *conditions { - if condition.Type != conditionType { - newConditions = append(newConditions, condition) - } - } - - *conditions = newConditions -} - -func FindOperatorCondition(conditions []operatorv1.OperatorCondition, conditionType string) *operatorv1.OperatorCondition { - for i := range conditions { - if conditions[i].Type == conditionType { - return &conditions[i] - } - } - - return nil -} - -func IsOperatorConditionTrue(conditions []operatorv1.OperatorCondition, conditionType string) bool { - return IsOperatorConditionPresentAndEqual(conditions, conditionType, operatorv1.ConditionTrue) -} - -func IsOperatorConditionFalse(conditions []operatorv1.OperatorCondition, conditionType string) bool { - return IsOperatorConditionPresentAndEqual(conditions, conditionType, operatorv1.ConditionFalse) -} - -func IsOperatorConditionPresentAndEqual(conditions []operatorv1.OperatorCondition, conditionType string, status operatorv1.ConditionStatus) bool { - for _, condition := range conditions { - if condition.Type == conditionType { - return condition.Status == status - } - } - return false -} - -// UpdateOperatorSpecFunc is a func that mutates an operator spec. -type UpdateOperatorSpecFunc func(spec *operatorv1.OperatorSpec) error - -// UpdateSpec applies the update funcs to the oldStatus and tries to update via the client. -func UpdateSpec(ctx context.Context, client OperatorClient, updateFuncs ...UpdateOperatorSpecFunc) (*operatorv1.OperatorSpec, bool, error) { - updated := false - var operatorSpec *operatorv1.OperatorSpec - previousResourceVersion := "" - err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { - oldSpec, _, resourceVersion, err := client.GetOperatorState() - if err != nil { - return err - } - if resourceVersion == previousResourceVersion { - // Lister is stale (e.g. after a conflict or restart); do a live GET to get the current resourceVersion. - listerResourceVersion := resourceVersion - oldSpec, _, resourceVersion, err = client.GetOperatorStateWithQuorum(ctx) - if err != nil { - return err - } - klog.V(2).Infof("lister was stale at resourceVersion=%v, live get showed resourceVersion=%v", listerResourceVersion, resourceVersion) - } - previousResourceVersion = resourceVersion - - newSpec := oldSpec.DeepCopy() - for _, update := range updateFuncs { - if err := update(newSpec); err != nil { - return err - } - } - - if equality.Semantic.DeepEqual(oldSpec, newSpec) { - return nil - } - - operatorSpec, _, err = client.UpdateOperatorSpec(ctx, resourceVersion, newSpec) - updated = err == nil - return err - }) - - return operatorSpec, updated, err -} - -// UpdateObservedConfigFn returns a func to update the config. -func UpdateObservedConfigFn(config map[string]interface{}) UpdateOperatorSpecFunc { - return func(oldSpec *operatorv1.OperatorSpec) error { - oldSpec.ObservedConfig = runtime.RawExtension{Object: &unstructured.Unstructured{Object: config}} - return nil - } -} - -// UpdateStatusFunc is a func that mutates an operator status. -type UpdateStatusFunc func(status *operatorv1.OperatorStatus) error - -// UpdateStatus applies the update funcs to the oldStatus and tries to update via the client. -func UpdateStatus(ctx context.Context, client OperatorClient, updateFuncs ...UpdateStatusFunc) (*operatorv1.OperatorStatus, bool, error) { - updated := false - var updatedOperatorStatus *operatorv1.OperatorStatus - numberOfAttempts := 0 - previousResourceVersion := "" - err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { - defer func() { - numberOfAttempts++ - }() - var oldStatus *operatorv1.OperatorStatus - var resourceVersion string - var err error - - // prefer lister if we haven't already failed. - _, oldStatus, resourceVersion, err = client.GetOperatorState() - if err != nil { - return err - } - if resourceVersion == previousResourceVersion { - listerResourceVersion := resourceVersion - // this indicates that we've had a conflict and the lister has not caught up, so do a live GET - _, oldStatus, resourceVersion, err = client.GetOperatorStateWithQuorum(ctx) - if err != nil { - return err - } - klog.V(2).Infof("lister was stale at resourceVersion=%v, live get showed resourceVersion=%v", listerResourceVersion, resourceVersion) - } - previousResourceVersion = resourceVersion - - newStatus := oldStatus.DeepCopy() - for _, update := range updateFuncs { - if err := update(newStatus); err != nil { - return err - } - } - - if equality.Semantic.DeepEqual(oldStatus, newStatus) { - // We return the newStatus which is a deep copy of oldStatus but with all update funcs applied. - updatedOperatorStatus = newStatus - return nil - } - if klog.V(4).Enabled() { - klog.Infof("Operator status changed: %v", operatorStatusJSONPatchNoError(oldStatus, newStatus)) - } - - updatedOperatorStatus, err = client.UpdateOperatorStatus(ctx, resourceVersion, newStatus) - updated = err == nil - return err - }) - - return updatedOperatorStatus, updated, err -} - -func operatorStatusJSONPatchNoError(original, modified *operatorv1.OperatorStatus) string { - if original == nil { - return "original object is nil" - } - if modified == nil { - return "modified object is nil" - } - - return cmp.Diff(original, modified) -} - -// UpdateConditionFn returns a func to update a condition. -func UpdateConditionFn(cond operatorv1.OperatorCondition) UpdateStatusFunc { - return func(oldStatus *operatorv1.OperatorStatus) error { - SetOperatorCondition(&oldStatus.Conditions, cond) - return nil - } -} - -// UpdateStaticPodStatusFunc is a func that mutates an operator status. -type UpdateStaticPodStatusFunc func(status *operatorv1.StaticPodOperatorStatus) error - -// UpdateStaticPodStatus applies the update funcs to the oldStatus abd tries to update via the client. -func UpdateStaticPodStatus(ctx context.Context, client StaticPodOperatorClient, updateFuncs ...UpdateStaticPodStatusFunc) (*operatorv1.StaticPodOperatorStatus, bool, error) { - updated := false - var updatedOperatorStatus *operatorv1.StaticPodOperatorStatus - numberOfAttempts := 0 - previousResourceVersion := "" - err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { - defer func() { - numberOfAttempts++ - }() - var oldStatus *operatorv1.StaticPodOperatorStatus - var resourceVersion string - var err error - - // prefer lister if we haven't already failed. - _, oldStatus, resourceVersion, err = client.GetStaticPodOperatorState() - if err != nil { - return err - } - if resourceVersion == previousResourceVersion { - listerResourceVersion := resourceVersion - // this indicates that we've had a conflict and the lister has not caught up, so do a live GET - _, oldStatus, resourceVersion, err = client.GetStaticPodOperatorStateWithQuorum(ctx) - if err != nil { - return err - } - klog.V(2).Infof("lister was stale at resourceVersion=%v, live get showed resourceVersion=%v", listerResourceVersion, resourceVersion) - } - previousResourceVersion = resourceVersion - - newStatus := oldStatus.DeepCopy() - for _, update := range updateFuncs { - if err := update(newStatus); err != nil { - return err - } - } - - if equality.Semantic.DeepEqual(oldStatus, newStatus) { - // We return the newStatus which is a deep copy of oldStatus but with all update funcs applied. - updatedOperatorStatus = newStatus - return nil - } - if klog.V(4).Enabled() { - klog.Infof("Operator status changed: %v", staticPodOperatorStatusJSONPatchNoError(oldStatus, newStatus)) - } - - updatedOperatorStatus, err = client.UpdateStaticPodOperatorStatus(ctx, resourceVersion, newStatus) - updated = err == nil - return err - }) - - return updatedOperatorStatus, updated, err -} - -func staticPodOperatorStatusJSONPatchNoError(original, modified *operatorv1.StaticPodOperatorStatus) string { - if original == nil { - return "original object is nil" - } - if modified == nil { - return "modified object is nil" - } - return cmp.Diff(original, modified) -} - -// UpdateStaticPodConditionFn returns a func to update a condition. -func UpdateStaticPodConditionFn(cond operatorv1.OperatorCondition) UpdateStaticPodStatusFunc { - return func(oldStatus *operatorv1.StaticPodOperatorStatus) error { - SetOperatorCondition(&oldStatus.Conditions, cond) - return nil - } -} - -// EnsureFinalizer adds a new finalizer to the operator CR, if it does not exists. No-op otherwise. -// The finalizer name is computed from the controller name and operator name ($OPERATOR_NAME or os.Args[0]) -// It re-tries on conflicts. -func EnsureFinalizer(ctx context.Context, client OperatorClientWithFinalizers, controllerName string) error { - finalizer := getFinalizerName(controllerName) - err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { - return client.EnsureFinalizer(ctx, finalizer) - }) - return err -} - -// RemoveFinalizer removes a finalizer from the operator CR, if it is there. No-op otherwise. -// The finalizer name is computed from the controller name and operator name ($OPERATOR_NAME or os.Args[0]) -// It re-tries on conflicts. -func RemoveFinalizer(ctx context.Context, client OperatorClientWithFinalizers, controllerName string) error { - finalizer := getFinalizerName(controllerName) - err := retry.RetryOnConflict(retry.DefaultBackoff, func() error { - return client.RemoveFinalizer(ctx, finalizer) - }) - return err -} - -// getFinalizerName computes a nice finalizer name from controllerName and the operator name ($OPERATOR_NAME or os.Args[0]). -func getFinalizerName(controllerName string) string { - return fmt.Sprintf("%s.operator.openshift.io/%s", getOperatorName(), controllerName) -} - -func getOperatorName() string { - if name := os.Getenv("OPERATOR_NAME"); name != "" { - return name - } - return os.Args[0] -} - -type aggregate []error - -var _ utilerrors.Aggregate = aggregate{} - -// NewMultiLineAggregate returns an aggregate error with multi-line output -func NewMultiLineAggregate(errList []error) error { - var errs []error - for _, e := range errList { - if e != nil { - errs = append(errs, e) - } - } - if len(errs) == 0 { - return nil - } - // We sort errors to allow for consistent output for testing. - sort.SliceStable(errs, func(i, j int) bool { - return errs[i].Error() < errs[j].Error() - }) - return aggregate(errs) -} - -// Error is part of the error interface. -func (agg aggregate) Error() string { - msgs := make([]string, len(agg)) - for i := range agg { - msgs[i] = agg[i].Error() - } - return strings.Join(msgs, "\n") -} - -// Errors is part of the Aggregate interface. -func (agg aggregate) Errors() []error { - return []error(agg) -} - -// Is is part of the Aggregate interface -func (agg aggregate) Is(target error) bool { - return agg.visit(func(err error) bool { - return errors.Is(err, target) - }) -} - -func (agg aggregate) visit(f func(err error) bool) bool { - for _, err := range agg { - switch err := err.(type) { - case aggregate: - if match := err.visit(f); match { - return match - } - case utilerrors.Aggregate: - for _, nestedErr := range err.Errors() { - if match := f(nestedErr); match { - return match - } - } - default: - if match := f(err); match { - return match - } - } - } - - return false -} - -// MapToEnvVars converts a string-string map to a slice of corev1.EnvVar-s -func MapToEnvVars(mapEnvVars map[string]string) []corev1.EnvVar { - if mapEnvVars == nil { - return nil - } - - envVars := make([]corev1.EnvVar, len(mapEnvVars)) - i := 0 - for k, v := range mapEnvVars { - envVars[i] = corev1.EnvVar{Name: k, Value: v} - i++ - } - - // need to sort the slice so that kube-controller-manager-pod configmap does not change all the time - sort.Slice(envVars, func(i, j int) bool { return envVars[i].Name < envVars[j].Name }) - return envVars -} - -// InjectObservedProxyIntoContainers injects proxy environment variables in containers specified in containerNames. -func InjectObservedProxyIntoContainers(podSpec *corev1.PodSpec, containerNames []string, observedConfig []byte, fields ...string) error { - var config map[string]interface{} - if err := yaml.Unmarshal(observedConfig, &config); err != nil { - return fmt.Errorf("failed to unmarshal the observedConfig: %w", err) - } - - proxyConfig, found, err := unstructured.NestedStringMap(config, fields...) - if err != nil { - return fmt.Errorf("couldn't get the proxy config from observedConfig: %w", err) - } - - proxyEnvVars := MapToEnvVars(proxyConfig) - if !found || len(proxyEnvVars) < 1 { - // There's no observed proxy config, we should tolerate that - return nil - } - - for _, containerName := range containerNames { - for i := range podSpec.InitContainers { - if podSpec.InitContainers[i].Name == containerName { - podSpec.InitContainers[i].Env = append(podSpec.InitContainers[i].Env, proxyEnvVars...) - } - } - for i := range podSpec.Containers { - if podSpec.Containers[i].Name == containerName { - podSpec.Containers[i].Env = append(podSpec.Containers[i].Env, proxyEnvVars...) - } - } - } - - return nil -} - -func InjectTrustedCAIntoContainers(podSpec *corev1.PodSpec, configMapName string, containerNames []string) error { - podSpec.Volumes = append(podSpec.Volumes, corev1.Volume{ - Name: "non-standard-root-system-trust-ca-bundle", - VolumeSource: corev1.VolumeSource{ - ConfigMap: &corev1.ConfigMapVolumeSource{ - LocalObjectReference: corev1.LocalObjectReference{ - Name: configMapName, - }, - Items: []corev1.KeyToPath{ - {Key: "ca-bundle.crt", Path: "tls-ca-bundle.pem"}, - }, - }, - }, - }) - - for _, containerName := range containerNames { - for i := range podSpec.InitContainers { - if podSpec.InitContainers[i].Name == containerName { - podSpec.InitContainers[i].VolumeMounts = append(podSpec.InitContainers[i].VolumeMounts, corev1.VolumeMount{ - Name: "non-standard-root-system-trust-ca-bundle", - MountPath: "/etc/pki/ca-trust/extracted/pem", - ReadOnly: true, - }) - } - } - for i := range podSpec.Containers { - if podSpec.Containers[i].Name == containerName { - podSpec.Containers[i].VolumeMounts = append(podSpec.Containers[i].VolumeMounts, corev1.VolumeMount{ - Name: "non-standard-root-system-trust-ca-bundle", - MountPath: "/etc/pki/ca-trust/extracted/pem", - ReadOnly: true, - }) - } - } - } - - return nil -} - -func SetCondition(conditions *[]metav1.Condition, newCondition metav1.Condition) { - if conditions == nil { - conditions = &[]metav1.Condition{} - } - existingCondition := FindCondition(*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 -} - -func RemoveCondition(conditions *[]metav1.Condition, conditionType string) { - if conditions == nil { - conditions = &[]metav1.Condition{} - } - newConditions := []metav1.Condition{} - for _, condition := range *conditions { - if condition.Type != conditionType { - newConditions = append(newConditions, condition) - } - } - - *conditions = newConditions -} - -func FindCondition(conditions []metav1.Condition, conditionType string) *metav1.Condition { - for i := range conditions { - if conditions[i].Type == conditionType { - return &conditions[i] - } - } - - return nil -} - -func IsConditionTrue(conditions []metav1.Condition, conditionType string) bool { - return IsConditionPresentAndEqual(conditions, conditionType, metav1.ConditionTrue) -} - -func IsConditionFalse(conditions []metav1.Condition, conditionType string) bool { - return IsConditionPresentAndEqual(conditions, conditionType, metav1.ConditionFalse) -} - -func IsConditionPresentAndEqual(conditions []metav1.Condition, conditionType string, status metav1.ConditionStatus) bool { - for _, condition := range conditions { - if condition.Type == conditionType { - return condition.Status == status - } - } - return false -} - -// IsUpdatingTooLong determines if updating operands condition takes too long. -// It returns true if the given condition was found and has been set to True longer than progressingConditionTimeout. -func IsUpdatingTooLong(operatorStatus *operatorv1.OperatorStatus, progressingConditionType string) bool { - progressing := FindOperatorCondition(operatorStatus.Conditions, progressingConditionType) - return progressing != nil && progressing.Status == operatorv1.ConditionTrue && time.Now().After(progressing.LastTransitionTime.Add(progressingConditionTimeout)) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/informers.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/informers.go deleted file mode 100644 index 4d38ef05d..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/informers.go +++ /dev/null @@ -1,154 +0,0 @@ -package v1helpers - -import ( - "fmt" - "reflect" - "time" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/client-go/informers" - "k8s.io/client-go/kubernetes" - corev1listers "k8s.io/client-go/listers/core/v1" -) - -// KubeInformersForNamespaces is a simple way to combine several shared informers into a single struct with unified listing power -type KubeInformersForNamespaces interface { - Start(stopCh <-chan struct{}) - InformersFor(namespace string) informers.SharedInformerFactory - Namespaces() sets.Set[string] - - // WaitForCacheSync blocks until all started informers' caches were synced - // or the stop channel gets closed. - WaitForCacheSync(stopCh <-chan struct{}) map[string]map[reflect.Type]bool - - ConfigMapLister() corev1listers.ConfigMapLister - SecretLister() corev1listers.SecretLister - - // Used in by workloads controller and controllers that report deployment pods status - PodLister() corev1listers.PodLister -} - -var _ KubeInformersForNamespaces = kubeInformersForNamespaces{} - -func NewKubeInformersForNamespacesWithResyncPeriod(kubeClient kubernetes.Interface, resyncInterval time.Duration, namespaces ...string) KubeInformersForNamespaces { - ret := kubeInformersForNamespaces{} - for _, namespace := range namespaces { - if len(namespace) == 0 { - ret[""] = informers.NewSharedInformerFactory(kubeClient, resyncInterval) - continue - } - ret[namespace] = informers.NewSharedInformerFactoryWithOptions(kubeClient, resyncInterval, informers.WithNamespace(namespace)) - } - - return ret -} - -func NewKubeInformersForNamespaces(kubeClient kubernetes.Interface, namespaces ...string) KubeInformersForNamespaces { - return NewKubeInformersForNamespacesWithResyncPeriod(kubeClient, 10*time.Minute, namespaces...) -} - -type kubeInformersForNamespaces map[string]informers.SharedInformerFactory - -// WaitForCacheSync waits for all started informers' cache were synced. -func (i kubeInformersForNamespaces) WaitForCacheSync(stopCh <-chan struct{}) map[string]map[reflect.Type]bool { - ret := map[string]map[reflect.Type]bool{} - for namespace, informerFactory := range i { - ret[namespace] = informerFactory.WaitForCacheSync(stopCh) - } - - return ret -} - -func (i kubeInformersForNamespaces) Start(stopCh <-chan struct{}) { - for _, informer := range i { - informer.Start(stopCh) - } -} - -func (i kubeInformersForNamespaces) Namespaces() sets.Set[string] { - return sets.KeySet(i) -} -func (i kubeInformersForNamespaces) InformersFor(namespace string) informers.SharedInformerFactory { - return i[namespace] -} - -func (i kubeInformersForNamespaces) HasInformersFor(namespace string) bool { - return i.InformersFor(namespace) != nil -} - -type configMapLister kubeInformersForNamespaces - -func (i kubeInformersForNamespaces) ConfigMapLister() corev1listers.ConfigMapLister { - return configMapLister(i) -} - -func (l configMapLister) List(selector labels.Selector) (ret []*corev1.ConfigMap, err error) { - globalInformer, ok := l[""] - if !ok { - return nil, fmt.Errorf("combinedLister does not support cross namespace list") - } - - return globalInformer.Core().V1().ConfigMaps().Lister().List(selector) -} - -func (l configMapLister) ConfigMaps(namespace string) corev1listers.ConfigMapNamespaceLister { - informer, ok := l[namespace] - if !ok { - // coding error - panic(fmt.Sprintf("namespace %q is missing", namespace)) - } - - return informer.Core().V1().ConfigMaps().Lister().ConfigMaps(namespace) -} - -type secretLister kubeInformersForNamespaces - -func (i kubeInformersForNamespaces) SecretLister() corev1listers.SecretLister { - return secretLister(i) -} - -func (l secretLister) List(selector labels.Selector) (ret []*corev1.Secret, err error) { - globalInformer, ok := l[""] - if !ok { - return nil, fmt.Errorf("combinedLister does not support cross namespace list") - } - - return globalInformer.Core().V1().Secrets().Lister().List(selector) -} - -func (l secretLister) Secrets(namespace string) corev1listers.SecretNamespaceLister { - informer, ok := l[namespace] - if !ok { - // coding error - panic(fmt.Sprintf("namespace %q is missing", namespace)) - } - - return informer.Core().V1().Secrets().Lister().Secrets(namespace) -} - -type podLister kubeInformersForNamespaces - -func (i kubeInformersForNamespaces) PodLister() corev1listers.PodLister { - return podLister(i) -} - -func (l podLister) List(selector labels.Selector) (ret []*corev1.Pod, err error) { - globalInformer, ok := l[""] - if !ok { - return nil, fmt.Errorf("combinedLister does not support cross namespace list") - } - - return globalInformer.Core().V1().Pods().Lister().List(selector) -} - -func (l podLister) Pods(namespace string) corev1listers.PodNamespaceLister { - informer, ok := l[namespace] - if !ok { - // coding error - panic(fmt.Sprintf("namespace %q is missing", namespace)) - } - - return informer.Core().V1().Pods().Lister().Pods(namespace) -} diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/interfaces.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/interfaces.go deleted file mode 100644 index 50bfae945..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/interfaces.go +++ /dev/null @@ -1,67 +0,0 @@ -package v1helpers - -import ( - "context" - - operatorv1 "github.com/openshift/api/operator/v1" - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - "github.com/openshift/library-go/pkg/apiserver/jsonpatch" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/client-go/tools/cache" -) - -type OperatorClient interface { - Informer() cache.SharedIndexInformer - // GetObjectMeta return the operator metadata. - GetObjectMeta() (meta *metav1.ObjectMeta, err error) - // GetOperatorState returns the operator spec, status and the resource version, potentially from a lister. - GetOperatorState() (spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, resourceVersion string, err error) - // GetOperatorStateWithQuorum return the operator spec, status and resource version directly from a server read. - GetOperatorStateWithQuorum(ctx context.Context) (spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, resourceVersion string, err error) - // UpdateOperatorSpec updates the spec of the operator, assuming the given resource version. - UpdateOperatorSpec(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorSpec) (out *operatorv1.OperatorSpec, newResourceVersion string, err error) - // UpdateOperatorStatus updates the status of the operator, assuming the given resource version. - UpdateOperatorStatus(ctx context.Context, oldResourceVersion string, in *operatorv1.OperatorStatus) (out *operatorv1.OperatorStatus, err error) - - ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorSpecApplyConfiguration) (err error) - ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) (err error) - - PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error) -} - -type StaticPodOperatorClient interface { - OperatorClient - // GetStaticPodOperatorState returns the static pod operator spec, status and the resource version, - // potentially from a lister. - GetStaticPodOperatorState() (spec *operatorv1.StaticPodOperatorSpec, status *operatorv1.StaticPodOperatorStatus, resourceVersion string, err error) - // GetStaticPodOperatorStateWithQuorum return the static pod operator spec, status and resource version - // directly from a server read. - GetStaticPodOperatorStateWithQuorum(ctx context.Context) (spec *operatorv1.StaticPodOperatorSpec, status *operatorv1.StaticPodOperatorStatus, resourceVersion string, err error) - // UpdateStaticPodOperatorStatus updates the status, assuming the given resource version. - UpdateStaticPodOperatorStatus(ctx context.Context, resourceVersion string, in *operatorv1.StaticPodOperatorStatus) (out *operatorv1.StaticPodOperatorStatus, err error) - // UpdateStaticPodOperatorSpec updates the spec, assuming the given resource version. - UpdateStaticPodOperatorSpec(ctx context.Context, resourceVersion string, in *operatorv1.StaticPodOperatorSpec) (out *operatorv1.StaticPodOperatorSpec, newResourceVersion string, err error) - - ApplyStaticPodOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.StaticPodOperatorSpecApplyConfiguration) (err error) - ApplyStaticPodOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.StaticPodOperatorStatusApplyConfiguration) (err error) - - PatchStaticOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error) -} - -type OperatorClientWithFinalizers interface { - OperatorClient - // EnsureFinalizer adds a new finalizer to the operator CR, if it does not exists. No-op otherwise. - EnsureFinalizer(ctx context.Context, finalizer string) error - // RemoveFinalizer removes a finalizer from the operator CR, if it is there. No-op otherwise. - RemoveFinalizer(ctx context.Context, finalizer string) error -} - -type Foo interface { - ExtractOperatorSpec(fieldManager string) (*applyoperatorv1.OperatorSpecApplyConfiguration, error) - ExtractOperatorStatus(fieldManager string) (*applyoperatorv1.OperatorStatusApplyConfiguration, error) -} - -type OperatorSpecExtractor func(obj *unstructured.Unstructured, fieldManager string) (*applyoperatorv1.OperatorSpecApplyConfiguration, error) -type OperatorStatusExtractor func(obj *unstructured.Unstructured, fieldManager string) (*applyoperatorv1.OperatorStatusApplyConfiguration, error) diff --git a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/test_helpers.go b/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/test_helpers.go deleted file mode 100644 index 66a7b6d89..000000000 --- a/vendor/github.com/openshift/library-go/pkg/operator/v1helpers/test_helpers.go +++ /dev/null @@ -1,521 +0,0 @@ -package v1helpers - -import ( - "context" - "fmt" - "strconv" - "time" - - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/labels" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/client-go/kubernetes" - corev1listers "k8s.io/client-go/listers/core/v1" - "k8s.io/client-go/tools/cache" - "k8s.io/utils/ptr" - - operatorv1 "github.com/openshift/api/operator/v1" - v1 "github.com/openshift/api/operator/v1" - applyoperatorv1 "github.com/openshift/client-go/operator/applyconfigurations/operator/v1" - "github.com/openshift/library-go/pkg/apiserver/jsonpatch" -) - -// NewFakeSharedIndexInformer returns a fake shared index informer, suitable to use in static pod controller unit tests. -func NewFakeSharedIndexInformer() cache.SharedIndexInformer { - return &fakeSharedIndexInformer{synced: newFakeSyncedChan()} -} - -type fakeSharedIndexInformer struct { - synced chan struct{} -} - -func newFakeSyncedChan() chan struct{} { - ch := make(chan struct{}) - close(ch) - return ch -} - -func (i fakeSharedIndexInformer) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil -} - -func (i fakeSharedIndexInformer) AddEventHandlerWithResyncPeriod(handler cache.ResourceEventHandler, resyncPeriod time.Duration) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil -} - -func (i fakeSharedIndexInformer) AddEventHandlerWithOptions(handler cache.ResourceEventHandler, options cache.HandlerOptions) (cache.ResourceEventHandlerRegistration, error) { - return nil, nil -} - -func (i fakeSharedIndexInformer) RemoveEventHandler(handle cache.ResourceEventHandlerRegistration) error { - panic("implement me") -} - -func (i fakeSharedIndexInformer) IsStopped() bool { - panic("implement me") -} - -func (fakeSharedIndexInformer) GetStore() cache.Store { - panic("implement me") -} - -func (fakeSharedIndexInformer) GetController() cache.Controller { - panic("implement me") -} - -func (fakeSharedIndexInformer) Run(stopCh <-chan struct{}) { - panic("implement me") -} - -func (fakeSharedIndexInformer) RunWithContext(ctx context.Context) { - panic("implement me") -} - -func (f fakeSharedIndexInformer) HasSynced() bool { - select { - case <-f.synced: - return true - default: - return false - } -} - -type fakeSharedIndexInformerDone struct { - synced chan struct{} -} - -func (fd *fakeSharedIndexInformerDone) Name() string { - return "FakeSharedIndexInformer" -} - -func (fd *fakeSharedIndexInformerDone) Done() <-chan struct{} { - return fd.synced -} - -func (f fakeSharedIndexInformer) HasSyncedChecker() cache.DoneChecker { - return &fakeSharedIndexInformerDone{synced: f.synced} -} - -func (fakeSharedIndexInformer) LastSyncResourceVersion() string { - panic("implement me") -} - -func (fakeSharedIndexInformer) AddIndexers(indexers cache.Indexers) error { - panic("implement me") -} - -func (fakeSharedIndexInformer) GetIndexer() cache.Indexer { - panic("implement me") -} - -func (fakeSharedIndexInformer) SetWatchErrorHandler(handler cache.WatchErrorHandler) error { - panic("implement me") -} - -func (fakeSharedIndexInformer) SetWatchErrorHandlerWithContext(handler cache.WatchErrorHandlerWithContext) error { - panic("implement me") -} - -func (fakeSharedIndexInformer) SetTransform(f cache.TransformFunc) error { - panic("implement me") -} - -// NewFakeStaticPodOperatorClient returns a fake operator client suitable to use in static pod controller unit tests. -func NewFakeStaticPodOperatorClient( - staticPodSpec *operatorv1.StaticPodOperatorSpec, staticPodStatus *operatorv1.StaticPodOperatorStatus, - triggerStatusErr func(rv string, status *operatorv1.StaticPodOperatorStatus) error, - triggerSpecErr func(rv string, spec *operatorv1.StaticPodOperatorSpec) error) *fakeStaticPodOperatorClient { - return &fakeStaticPodOperatorClient{ - fakeStaticPodOperatorSpec: staticPodSpec, - fakeStaticPodOperatorStatus: staticPodStatus, - resourceVersion: "0", - triggerStatusUpdateError: triggerStatusErr, - triggerSpecUpdateError: triggerSpecErr, - } -} - -type fakeStaticPodOperatorClient struct { - fakeStaticPodOperatorSpec *operatorv1.StaticPodOperatorSpec - fakeStaticPodOperatorStatus *operatorv1.StaticPodOperatorStatus - resourceVersion string - triggerStatusUpdateError func(rv string, status *operatorv1.StaticPodOperatorStatus) error - triggerSpecUpdateError func(rv string, status *operatorv1.StaticPodOperatorSpec) error - - patchedOperatorStatus *jsonpatch.PatchSet -} - -func (c *fakeStaticPodOperatorClient) Informer() cache.SharedIndexInformer { - return NewFakeSharedIndexInformer() - -} -func (c *fakeStaticPodOperatorClient) GetObjectMeta() (*metav1.ObjectMeta, error) { - panic("not supported") -} - -func (c *fakeStaticPodOperatorClient) GetStaticPodOperatorState() (*operatorv1.StaticPodOperatorSpec, *operatorv1.StaticPodOperatorStatus, string, error) { - return c.fakeStaticPodOperatorSpec, c.fakeStaticPodOperatorStatus, c.resourceVersion, nil -} - -func (c *fakeStaticPodOperatorClient) GetLiveStaticPodOperatorState() (*operatorv1.StaticPodOperatorSpec, *operatorv1.StaticPodOperatorStatus, string, error) { - return c.GetStaticPodOperatorState() -} - -func (c *fakeStaticPodOperatorClient) GetStaticPodOperatorStateWithQuorum(ctx context.Context) (*operatorv1.StaticPodOperatorSpec, *operatorv1.StaticPodOperatorStatus, string, error) { - return c.fakeStaticPodOperatorSpec, c.fakeStaticPodOperatorStatus, c.resourceVersion, nil -} - -func (c *fakeStaticPodOperatorClient) UpdateStaticPodOperatorStatus(ctx context.Context, resourceVersion string, status *operatorv1.StaticPodOperatorStatus) (*operatorv1.StaticPodOperatorStatus, error) { - if c.resourceVersion != resourceVersion { - return nil, errors.NewConflict(schema.GroupResource{Group: operatorv1.GroupName, Resource: "TestOperatorConfig"}, "instance", fmt.Errorf("invalid resourceVersion")) - } - rv, err := strconv.Atoi(resourceVersion) - if err != nil { - return nil, err - } - c.resourceVersion = strconv.Itoa(rv + 1) - if c.triggerStatusUpdateError != nil { - if err := c.triggerStatusUpdateError(resourceVersion, status); err != nil { - return nil, err - } - } - c.fakeStaticPodOperatorStatus = status - return c.fakeStaticPodOperatorStatus, nil -} - -func (c *fakeStaticPodOperatorClient) UpdateStaticPodOperatorSpec(ctx context.Context, resourceVersion string, spec *operatorv1.StaticPodOperatorSpec) (*operatorv1.StaticPodOperatorSpec, string, error) { - if c.resourceVersion != resourceVersion { - return nil, "", errors.NewConflict(schema.GroupResource{Group: operatorv1.GroupName, Resource: "TestOperatorConfig"}, "instance", fmt.Errorf("invalid resourceVersion")) - } - rv, err := strconv.Atoi(resourceVersion) - if err != nil { - return nil, "", err - } - c.resourceVersion = strconv.Itoa(rv + 1) - if c.triggerSpecUpdateError != nil { - if err := c.triggerSpecUpdateError(resourceVersion, spec); err != nil { - return nil, "", err - } - } - c.fakeStaticPodOperatorSpec = spec - return c.fakeStaticPodOperatorSpec, c.resourceVersion, nil -} - -func (c *fakeStaticPodOperatorClient) ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorSpecApplyConfiguration) (err error) { - return nil -} - -func (c *fakeStaticPodOperatorClient) ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) (err error) { - if c.triggerStatusUpdateError != nil { - operatorStatus := &operatorv1.StaticPodOperatorStatus{OperatorStatus: *mergeOperatorStatusApplyConfiguration(&c.fakeStaticPodOperatorStatus.OperatorStatus, applyConfiguration)} - if err := c.triggerStatusUpdateError("", operatorStatus); err != nil { - return err - } - } - c.fakeStaticPodOperatorStatus = &operatorv1.StaticPodOperatorStatus{ - OperatorStatus: *mergeOperatorStatusApplyConfiguration(&c.fakeStaticPodOperatorStatus.OperatorStatus, applyConfiguration), - } - return nil -} - -func (c *fakeStaticPodOperatorClient) ApplyStaticPodOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.StaticPodOperatorSpecApplyConfiguration) (err error) { - return nil -} - -func (c *fakeStaticPodOperatorClient) ApplyStaticPodOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.StaticPodOperatorStatusApplyConfiguration) (err error) { - if c.triggerStatusUpdateError != nil { - operatorStatus := mergeStaticPodOperatorStatusApplyConfiguration(&c.fakeStaticPodOperatorStatus.OperatorStatus, applyConfiguration) - if err := c.triggerStatusUpdateError("", operatorStatus); err != nil { - return err - } - } - c.fakeStaticPodOperatorStatus = mergeStaticPodOperatorStatusApplyConfiguration(&c.fakeStaticPodOperatorStatus.OperatorStatus, applyConfiguration) - return nil -} - -func (c *fakeStaticPodOperatorClient) PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error) { - return nil -} - -func (c *fakeStaticPodOperatorClient) PatchStaticOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error) { - if c.triggerStatusUpdateError != nil { - return c.triggerStatusUpdateError("", nil) - } - c.patchedOperatorStatus = jsonPatch - return nil -} - -func (c *fakeStaticPodOperatorClient) GetPatchedOperatorStatus() *jsonpatch.PatchSet { - return c.patchedOperatorStatus -} - -func (c *fakeStaticPodOperatorClient) GetOperatorState() (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, string, error) { - return &c.fakeStaticPodOperatorSpec.OperatorSpec, &c.fakeStaticPodOperatorStatus.OperatorStatus, c.resourceVersion, nil -} -func (c *fakeStaticPodOperatorClient) GetOperatorStateWithQuorum(ctx context.Context) (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, string, error) { - return c.GetOperatorState() -} -func (c *fakeStaticPodOperatorClient) UpdateOperatorSpec(ctx context.Context, s string, p *operatorv1.OperatorSpec) (spec *operatorv1.OperatorSpec, resourceVersion string, err error) { - panic("not supported") -} -func (c *fakeStaticPodOperatorClient) UpdateOperatorStatus(ctx context.Context, resourceVersion string, status *operatorv1.OperatorStatus) (*operatorv1.OperatorStatus, error) { - if c.resourceVersion != resourceVersion { - return nil, errors.NewConflict(schema.GroupResource{Group: operatorv1.GroupName, Resource: "TestOperatorConfig"}, "instance", fmt.Errorf("invalid resourceVersion")) - } - rv, err := strconv.Atoi(resourceVersion) - if err != nil { - return nil, err - } - c.resourceVersion = strconv.Itoa(rv + 1) - if c.triggerStatusUpdateError != nil { - staticPodStatus := c.fakeStaticPodOperatorStatus.DeepCopy() - staticPodStatus.OperatorStatus = *status - if err := c.triggerStatusUpdateError(resourceVersion, staticPodStatus); err != nil { - return nil, err - } - } - c.fakeStaticPodOperatorStatus.OperatorStatus = *status - return &c.fakeStaticPodOperatorStatus.OperatorStatus, nil -} - -// NewFakeNodeLister returns a fake node lister suitable to use in node controller unit test -func NewFakeNodeLister(client kubernetes.Interface) corev1listers.NodeLister { - return &fakeNodeLister{client: client} -} - -type fakeNodeLister struct { - client kubernetes.Interface -} - -func (n *fakeNodeLister) List(selector labels.Selector) ([]*corev1.Node, error) { - nodes, err := n.client.CoreV1().Nodes().List(context.TODO(), metav1.ListOptions{LabelSelector: selector.String()}) - if err != nil { - return nil, err - } - ret := []*corev1.Node{} - for i := range nodes.Items { - ret = append(ret, &nodes.Items[i]) - } - return ret, nil -} - -func (n *fakeNodeLister) Get(name string) (*corev1.Node, error) { - panic("implement me") -} - -// NewFakeOperatorClient returns a fake operator client suitable to use in static pod controller unit tests. -func NewFakeOperatorClient(spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, triggerErr func(rv string, status *operatorv1.OperatorStatus) error) *fakeOperatorClient { - return NewFakeOperatorClientWithObjectMeta(nil, spec, status, triggerErr) -} - -func NewFakeOperatorClientWithObjectMeta(meta *metav1.ObjectMeta, spec *operatorv1.OperatorSpec, status *operatorv1.OperatorStatus, triggerErr func(rv string, status *operatorv1.OperatorStatus) error) *fakeOperatorClient { - return &fakeOperatorClient{ - fakeOperatorSpec: spec, - fakeOperatorStatus: status, - fakeObjectMeta: meta, - resourceVersion: "0", - triggerStatusUpdateError: triggerErr, - } -} - -type fakeOperatorClient struct { - fakeOperatorSpec *operatorv1.OperatorSpec - fakeOperatorStatus *operatorv1.OperatorStatus - fakeObjectMeta *metav1.ObjectMeta - resourceVersion string - triggerStatusUpdateError func(rv string, status *operatorv1.OperatorStatus) error - - patchedOperatorStatus *jsonpatch.PatchSet -} - -func (c *fakeOperatorClient) Informer() cache.SharedIndexInformer { - return NewFakeSharedIndexInformer() -} - -func (c *fakeOperatorClient) GetObjectMeta() (*metav1.ObjectMeta, error) { - if c.fakeObjectMeta == nil { - return &metav1.ObjectMeta{}, nil - } - - return c.fakeObjectMeta, nil -} - -func (c *fakeOperatorClient) GetOperatorState() (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, string, error) { - return c.fakeOperatorSpec, c.fakeOperatorStatus, c.resourceVersion, nil -} - -func (c *fakeOperatorClient) GetOperatorStateWithQuorum(ctx context.Context) (*operatorv1.OperatorSpec, *operatorv1.OperatorStatus, string, error) { - return c.GetOperatorState() -} - -func (c *fakeOperatorClient) UpdateOperatorStatus(ctx context.Context, resourceVersion string, status *operatorv1.OperatorStatus) (*operatorv1.OperatorStatus, error) { - if c.resourceVersion != resourceVersion { - return nil, errors.NewConflict(schema.GroupResource{Group: operatorv1.GroupName, Resource: "TestOperatorConfig"}, "instance", fmt.Errorf("invalid resourceVersion")) - } - rv, err := strconv.Atoi(resourceVersion) - if err != nil { - return nil, err - } - c.resourceVersion = strconv.Itoa(rv + 1) - if c.triggerStatusUpdateError != nil { - if err := c.triggerStatusUpdateError(resourceVersion, status); err != nil { - return nil, err - } - } - c.fakeOperatorStatus = status - return c.fakeOperatorStatus, nil -} - -func (c *fakeOperatorClient) UpdateOperatorSpec(ctx context.Context, resourceVersion string, spec *operatorv1.OperatorSpec) (*operatorv1.OperatorSpec, string, error) { - if c.resourceVersion != resourceVersion { - return nil, c.resourceVersion, errors.NewConflict(schema.GroupResource{Group: operatorv1.GroupName, Resource: "TestOperatorConfig"}, "instance", fmt.Errorf("invalid resourceVersion")) - } - rv, err := strconv.Atoi(resourceVersion) - if err != nil { - return nil, c.resourceVersion, err - } - c.resourceVersion = strconv.Itoa(rv + 1) - c.fakeOperatorSpec = spec - return c.fakeOperatorSpec, c.resourceVersion, nil -} - -func (c *fakeOperatorClient) ApplyOperatorSpec(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorSpecApplyConfiguration) (err error) { - return nil -} - -func (c *fakeOperatorClient) ApplyOperatorStatus(ctx context.Context, fieldManager string, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) (err error) { - c.fakeOperatorStatus = mergeOperatorStatusApplyConfiguration(c.fakeOperatorStatus, applyConfiguration) - return nil -} - -func (c *fakeOperatorClient) PatchOperatorStatus(ctx context.Context, jsonPatch *jsonpatch.PatchSet) (err error) { - if c.triggerStatusUpdateError != nil { - return c.triggerStatusUpdateError("", nil) - } - c.patchedOperatorStatus = jsonPatch - return nil -} - -func (c *fakeOperatorClient) GetPatchedOperatorStatus() *jsonpatch.PatchSet { - return c.patchedOperatorStatus -} - -func (c *fakeOperatorClient) EnsureFinalizer(ctx context.Context, finalizer string) error { - if c.fakeObjectMeta == nil { - c.fakeObjectMeta = &metav1.ObjectMeta{} - } - for _, f := range c.fakeObjectMeta.Finalizers { - if f == finalizer { - return nil - } - } - c.fakeObjectMeta.Finalizers = append(c.fakeObjectMeta.Finalizers, finalizer) - return nil -} - -func (c *fakeOperatorClient) RemoveFinalizer(ctx context.Context, finalizer string) error { - newFinalizers := []string{} - for _, f := range c.fakeObjectMeta.Finalizers { - if f == finalizer { - continue - } - newFinalizers = append(newFinalizers, f) - } - c.fakeObjectMeta.Finalizers = newFinalizers - return nil -} - -func (c *fakeOperatorClient) SetObjectMeta(meta *metav1.ObjectMeta) { - c.fakeObjectMeta = meta -} - -func mergeOperatorStatusApplyConfiguration(currentOperatorStatus *v1.OperatorStatus, applyConfiguration *applyoperatorv1.OperatorStatusApplyConfiguration) *v1.OperatorStatus { - status := &v1.OperatorStatus{ - ObservedGeneration: ptr.Deref(applyConfiguration.ObservedGeneration, currentOperatorStatus.ObservedGeneration), - Version: ptr.Deref(applyConfiguration.Version, currentOperatorStatus.Version), - ReadyReplicas: ptr.Deref(applyConfiguration.ReadyReplicas, currentOperatorStatus.ReadyReplicas), - LatestAvailableRevision: ptr.Deref(applyConfiguration.LatestAvailableRevision, currentOperatorStatus.LatestAvailableRevision), - } - - for _, condition := range applyConfiguration.Conditions { - newCondition := operatorv1.OperatorCondition{ - Type: ptr.Deref(condition.Type, ""), - Status: ptr.Deref(condition.Status, ""), - Reason: ptr.Deref(condition.Reason, ""), - Message: ptr.Deref(condition.Message, ""), - } - status.Conditions = append(status.Conditions, newCondition) - } - var existingConditions []v1.OperatorCondition - for _, condition := range currentOperatorStatus.Conditions { - var foundCondition bool - for _, statusCondition := range status.Conditions { - if condition.Type == statusCondition.Type { - foundCondition = true - break - } - } - if !foundCondition { - existingConditions = append(existingConditions, condition) - } - } - status.Conditions = append(status.Conditions, existingConditions...) - - for _, generation := range applyConfiguration.Generations { - newGeneration := operatorv1.GenerationStatus{ - Group: ptr.Deref(generation.Group, ""), - Resource: ptr.Deref(generation.Resource, ""), - Namespace: ptr.Deref(generation.Namespace, ""), - Name: ptr.Deref(generation.Name, ""), - LastGeneration: ptr.Deref(generation.LastGeneration, 0), - Hash: ptr.Deref(generation.Hash, ""), - } - status.Generations = append(status.Generations, newGeneration) - } - var existingGenerations []v1.GenerationStatus - for _, generation := range currentOperatorStatus.Generations { - var foundGeneration bool - for _, statusGeneration := range status.Generations { - if generation.Namespace == statusGeneration.Namespace && generation.Name == statusGeneration.Name { - foundGeneration = true - break - } - } - if !foundGeneration { - existingGenerations = append(existingGenerations, generation) - } - } - status.Generations = append(status.Generations, existingGenerations...) - - return status -} - -func mergeStaticPodOperatorStatusApplyConfiguration(currentOperatorStatus *v1.OperatorStatus, applyConfiguration *applyoperatorv1.StaticPodOperatorStatusApplyConfiguration) *v1.StaticPodOperatorStatus { - status := &v1.StaticPodOperatorStatus{ - OperatorStatus: *mergeOperatorStatusApplyConfiguration(currentOperatorStatus, &applyConfiguration.OperatorStatusApplyConfiguration), - } - - for _, nodeStatus := range applyConfiguration.NodeStatuses { - newNodeStatus := operatorv1.NodeStatus{ - NodeName: ptr.Deref(nodeStatus.NodeName, ""), - CurrentRevision: ptr.Deref(nodeStatus.CurrentRevision, 0), - TargetRevision: ptr.Deref(nodeStatus.TargetRevision, 0), - LastFailedRevision: ptr.Deref(nodeStatus.LastFailedRevision, 0), - LastFailedTime: nil, - LastFailedReason: ptr.Deref(nodeStatus.LastFailedReason, ""), - LastFailedCount: ptr.Deref(nodeStatus.LastFailedCount, 0), - LastFallbackCount: ptr.Deref(nodeStatus.LastFallbackCount, 0), - LastFailedRevisionErrors: nil, - } - if nodeStatus.LastFailedTime != nil { - newNodeStatus.LastFailedTime = nodeStatus.LastFailedTime - } - for _, curr := range nodeStatus.LastFailedRevisionErrors { - newNodeStatus.LastFailedRevisionErrors = append(newNodeStatus.LastFailedRevisionErrors, curr) - } - status.NodeStatuses = append(status.NodeStatuses, newNodeStatus) - } - - return status -} diff --git a/vendor/github.com/openshift/library-go/pkg/pki/profile.go b/vendor/github.com/openshift/library-go/pkg/pki/profile.go deleted file mode 100644 index 6f534c94f..000000000 --- a/vendor/github.com/openshift/library-go/pkg/pki/profile.go +++ /dev/null @@ -1,114 +0,0 @@ -package pki - -import ( - "fmt" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - "github.com/openshift/library-go/pkg/crypto" -) - -// DefaultPKIProfile returns the default PKIProfile for OpenShift. -func DefaultPKIProfile() configv1alpha1.PKIProfile { - return configv1alpha1.PKIProfile{ - Defaults: configv1alpha1.DefaultCertificateConfig{ - Key: configv1alpha1.KeyConfig{ - Algorithm: configv1alpha1.KeyAlgorithmECDSA, - ECDSA: configv1alpha1.ECDSAKeyConfig{Curve: configv1alpha1.ECDSACurveP256}, - }, - }, - SignerCertificates: configv1alpha1.CertificateConfig{ - Key: configv1alpha1.KeyConfig{ - Algorithm: configv1alpha1.KeyAlgorithmECDSA, - ECDSA: configv1alpha1.ECDSAKeyConfig{Curve: configv1alpha1.ECDSACurveP384}, - }, - }, - } -} - -// KeyPairGeneratorFromAPI converts a configv1alpha1.KeyConfig to a -// crypto.KeyPairGenerator. -func KeyPairGeneratorFromAPI(apiKey configv1alpha1.KeyConfig) (crypto.KeyPairGenerator, error) { - switch apiKey.Algorithm { - case configv1alpha1.KeyAlgorithmRSA: - return crypto.RSAKeyPairGenerator{ - Bits: int(apiKey.RSA.KeySize), - }, nil - case configv1alpha1.KeyAlgorithmECDSA: - curve, err := ecdsaCurveFromAPI(apiKey.ECDSA.Curve) - if err != nil { - return nil, err - } - return crypto.ECDSAKeyPairGenerator{ - Curve: curve, - }, nil - default: - return nil, fmt.Errorf("unknown key algorithm: %q", apiKey.Algorithm) - } -} - -// ecdsaCurveFromAPI converts an API ECDSA curve name to the crypto package's ECDSACurve. -func ecdsaCurveFromAPI(c configv1alpha1.ECDSACurve) (crypto.ECDSACurve, error) { - switch c { - case configv1alpha1.ECDSACurveP256: - return crypto.P256, nil - case configv1alpha1.ECDSACurveP384: - return crypto.P384, nil - case configv1alpha1.ECDSACurveP521: - return crypto.P521, nil - default: - return "", fmt.Errorf("unknown ECDSA curve: %q", c) - } -} - -// securityBits returns the NIST security strength in bits for a given -// KeyPairGenerator. For RSA, values come from the rsaSecurityStrength table. -// For ECDSA, security strength is half the key size (fixed per curve). -func securityBits(g crypto.KeyPairGenerator) int { - switch g := g.(type) { - case crypto.RSAKeyPairGenerator: - return rsaSecurityStrength[g.Bits] - case crypto.ECDSAKeyPairGenerator: - switch g.Curve { - case crypto.P256: - return 128 - case crypto.P384: - return 192 - case crypto.P521: - return 256 - } - } - return 0 -} - -// rsaSecurityStrength maps RSA key sizes (2048-8192 in 1024-bit increments) -// to their security strengths from NIST SP 800-56B Rev 2 Table 2 or -// pre-calculated from the GNFS complexity estimate. -var rsaSecurityStrength = map[int]int{ - 2048: 112, - 3072: 128, - 4096: 152, - 5120: 168, - 6144: 176, - 7168: 192, - 8192: 200, -} - -// strongerKeyPairGenerator returns whichever of a or b provides higher NIST -// security strength. In case of a tie, ECDSA is preferred over RSA. -func strongerKeyPairGenerator(a, b crypto.KeyPairGenerator) crypto.KeyPairGenerator { - sa, sb := securityBits(a), securityBits(b) - if sb > sa { - return b - } - if sa > sb { - return a - } - // Equal strength: prefer ECDSA over RSA. - if _, ok := a.(crypto.ECDSAKeyPairGenerator); ok { - return a - } - if _, ok := b.(crypto.ECDSAKeyPairGenerator); ok { - return b - } - return a -} diff --git a/vendor/github.com/openshift/library-go/pkg/pki/provider.go b/vendor/github.com/openshift/library-go/pkg/pki/provider.go deleted file mode 100644 index 2007aa890..000000000 --- a/vendor/github.com/openshift/library-go/pkg/pki/provider.go +++ /dev/null @@ -1,75 +0,0 @@ -package pki - -import ( - "fmt" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - configv1alpha1listers "github.com/openshift/client-go/config/listers/config/v1alpha1" -) - -// PKIProfileProvider provides the PKIProfile that determines certificate key -// configuration. A nil profile indicates Unmanaged mode where the caller -// should use its own defaults. -type PKIProfileProvider interface { - PKIProfile() (*configv1alpha1.PKIProfile, error) -} - -// StaticPKIProfileProvider is a PKIProfileProvider backed by a fixed PKIProfile. -type StaticPKIProfileProvider struct { - profile *configv1alpha1.PKIProfile -} - -// NewStaticPKIProfileProvider returns a PKIProfileProvider backed by the given -// profile. A nil profile signals Unmanaged mode. -func NewStaticPKIProfileProvider(profile *configv1alpha1.PKIProfile) *StaticPKIProfileProvider { - return &StaticPKIProfileProvider{profile: profile} -} - -// PKIProfile returns the static PKIProfile. -func (s *StaticPKIProfileProvider) PKIProfile() (*configv1alpha1.PKIProfile, error) { - return s.profile, nil -} - -// ListerPKIProfileProvider is a PKIProfileProvider that reads a named -// cluster-scoped PKI resource via a lister. -type ListerPKIProfileProvider struct { - lister configv1alpha1listers.PKILister - resourceName string -} - -// NewClusterPKIProfileProvider creates a PKIProfileProvider that resolves the -// PKIProfile from the OpenShift cluster configuration PKI resource. -func NewClusterPKIProfileProvider(lister configv1alpha1listers.PKILister) *ListerPKIProfileProvider { - return NewListerPKIProfileProvider(lister, "cluster") -} - -// NewListerPKIProfileProvider returns a PKIProfileProvider that reads the -// named cluster-scoped PKI resource via a lister. -func NewListerPKIProfileProvider(lister configv1alpha1listers.PKILister, resourceName string) *ListerPKIProfileProvider { - return &ListerPKIProfileProvider{ - lister: lister, - resourceName: resourceName, - } -} - -// PKIProfile reads the PKI resource and returns the profile based on its -// certificate management mode. Returns nil for Unmanaged mode. -func (l *ListerPKIProfileProvider) PKIProfile() (*configv1alpha1.PKIProfile, error) { - pki, err := l.lister.Get(l.resourceName) - if err != nil { - return nil, fmt.Errorf("failed to get PKI resource %q: %w", l.resourceName, err) - } - - switch pki.Spec.CertificateManagement.Mode { - case configv1alpha1.PKICertificateManagementModeUnmanaged: - return nil, nil - case configv1alpha1.PKICertificateManagementModeDefault: - profile := DefaultPKIProfile() - return &profile, nil - case configv1alpha1.PKICertificateManagementModeCustom: - profile := pki.Spec.CertificateManagement.Custom.PKIProfile - return &profile, nil - default: - return nil, fmt.Errorf("unknown PKI certificate management mode: %q", pki.Spec.CertificateManagement.Mode) - } -} diff --git a/vendor/github.com/openshift/library-go/pkg/pki/resolve.go b/vendor/github.com/openshift/library-go/pkg/pki/resolve.go deleted file mode 100644 index 1154fd48e..000000000 --- a/vendor/github.com/openshift/library-go/pkg/pki/resolve.go +++ /dev/null @@ -1,77 +0,0 @@ -package pki - -import ( - "fmt" - - configv1alpha1 "github.com/openshift/api/config/v1alpha1" - "github.com/openshift/library-go/pkg/crypto" -) - -// CertificateConfig holds the resolved configuration for a specific certificate. -// Currently contains key configuration; will grow as the PKI API expands to -// include additional certificate properties. -type CertificateConfig struct { - // Key is the resolved key pair generator. - Key crypto.KeyPairGenerator -} - -// ResolveCertificateConfig resolves the effective certificate configuration -// for a given certificate type and name from the PKI profile. -// -// Returns nil if the provider returns a nil profile (Unmanaged mode), -// indicating that the caller should use its own default behavior. -// -// The name parameter is reserved for future per-certificate overrides and -// can be used for metrics and logging. -func ResolveCertificateConfig(provider PKIProfileProvider, certType CertificateType, name string) (*CertificateConfig, error) { - profile, err := provider.PKIProfile() - if err != nil { - return nil, fmt.Errorf("resolving PKI profile for %s certificate %q: %w", certType, name, err) - } - if profile == nil { - return nil, nil - } - - switch certType { - case CertificateTypeSigner: - return resolveKeyConfig(profile.Defaults, profile.SignerCertificates) - case CertificateTypeServing: - return resolveKeyConfig(profile.Defaults, profile.ServingCertificates) - case CertificateTypeClient: - return resolveKeyConfig(profile.Defaults, profile.ClientCertificates) - case CertificateTypePeer: - return resolvePeerKeyConfig(profile) - default: - return nil, fmt.Errorf("unknown certificate type: %q", certType) - } -} - -// resolveKeyConfig returns the override KeyConfig if its Algorithm is set, -// otherwise falls back to the default. -func resolveKeyConfig(defaults configv1alpha1.DefaultCertificateConfig, override configv1alpha1.CertificateConfig) (*CertificateConfig, error) { - apiKey := defaults.Key - if override.Key.Algorithm != "" { - apiKey = override.Key - } - g, err := KeyPairGeneratorFromAPI(apiKey) - if err != nil { - return nil, err - } - return &CertificateConfig{Key: g}, nil -} - -// resolvePeerKeyConfig resolves both the serving and client configs and -// returns whichever has higher NIST security strength. -func resolvePeerKeyConfig(profile *configv1alpha1.PKIProfile) (*CertificateConfig, error) { - servingCfg, err := resolveKeyConfig(profile.Defaults, profile.ServingCertificates) - if err != nil { - return nil, fmt.Errorf("resolving serving config for peer: %w", err) - } - clientCfg, err := resolveKeyConfig(profile.Defaults, profile.ClientCertificates) - if err != nil { - return nil, fmt.Errorf("resolving client config for peer: %w", err) - } - return &CertificateConfig{ - Key: strongerKeyPairGenerator(servingCfg.Key, clientCfg.Key), - }, nil -} diff --git a/vendor/github.com/openshift/library-go/pkg/pki/types.go b/vendor/github.com/openshift/library-go/pkg/pki/types.go deleted file mode 100644 index 2cf828225..000000000 --- a/vendor/github.com/openshift/library-go/pkg/pki/types.go +++ /dev/null @@ -1,23 +0,0 @@ -package pki - -// CertificateType identifies the category of a certificate for profile resolution. -type CertificateType string - -const ( - // CertificateTypeSigner identifies certificate authority (CA) certificates - // that sign other certificates. - CertificateTypeSigner CertificateType = "signer" - - // CertificateTypeServing identifies TLS server certificates used to serve - // HTTPS endpoints. - CertificateTypeServing CertificateType = "serving" - - // CertificateTypeClient identifies client authentication certificates used - // to authenticate to servers. - CertificateTypeClient CertificateType = "client" - - // CertificateTypePeer identifies certificates used for both server and client - // authentication. The resolved key configuration is the stronger of the - // serving and client configurations. - CertificateTypePeer CertificateType = "peer" -) diff --git a/vendor/github.com/prometheus/client_golang/LICENSE b/vendor/github.com/prometheus/client_golang/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/client_golang/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/prometheus/client_golang/NOTICE b/vendor/github.com/prometheus/client_golang/NOTICE deleted file mode 100644 index b9cc55abb..000000000 --- a/vendor/github.com/prometheus/client_golang/NOTICE +++ /dev/null @@ -1,18 +0,0 @@ -Prometheus instrumentation library for Go applications -Copyright 2012-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). - - -The following components are included in this product: - -perks - a fork of https://github.com/bmizerany/perks -https://github.com/beorn7/perks -Copyright 2013-2015 Blake Mizerany, Björn Rabenstein -See https://github.com/beorn7/perks/blob/master/README.md for license details. - -Go support for Protocol Buffers - Google's data interchange format -http://github.com/golang/protobuf/ -Copyright 2010 The Go Authors -See source code for license details. diff --git a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE b/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE deleted file mode 100644 index 65d761bc9..000000000 --- a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) 2013 The Go Authors. All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are -met: - - * Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following disclaimer -in the documentation and/or other materials provided with the -distribution. - * Neither the name of Google Inc. nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go b/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go deleted file mode 100644 index 8547c8dfd..000000000 --- a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header/header.go +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd. - -// Package header provides functions for parsing HTTP headers. -package header - -import ( - "net/http" - "strings" -) - -// Octet types from RFC 2616. -var octetTypes [256]octetType - -type octetType byte - -const ( - isToken octetType = 1 << iota - isSpace -) - -func init() { - // OCTET = - // CHAR = - // CTL = - // CR = - // LF = - // SP = - // HT = - // <"> = - // CRLF = CR LF - // LWS = [CRLF] 1*( SP | HT ) - // TEXT = - // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> - // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT - // token = 1* - // qdtext = > - - for c := 0; c < 256; c++ { - var t octetType - isCtl := c <= 31 || c == 127 - isChar := 0 <= c && c <= 127 - isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) - if strings.ContainsRune(" \t\r\n", rune(c)) { - t |= isSpace - } - if isChar && !isCtl && !isSeparator { - t |= isToken - } - octetTypes[c] = t - } -} - -// AcceptSpec describes an Accept* header. -type AcceptSpec struct { - Value string - Q float64 -} - -// ParseAccept parses Accept* headers. -func ParseAccept(header http.Header, key string) (specs []AcceptSpec) { -loop: - for _, s := range header[key] { - for { - var spec AcceptSpec - spec.Value, s = expectTokenSlash(s) - if spec.Value == "" { - continue loop - } - spec.Q = 1.0 - s = skipSpace(s) - if strings.HasPrefix(s, ";") { - s = skipSpace(s[1:]) - if !strings.HasPrefix(s, "q=") { - continue loop - } - spec.Q, s = expectQuality(s[2:]) - if spec.Q < 0.0 { - continue loop - } - } - specs = append(specs, spec) - s = skipSpace(s) - if !strings.HasPrefix(s, ",") { - continue loop - } - s = skipSpace(s[1:]) - } - } - return -} - -func skipSpace(s string) (rest string) { - i := 0 - for ; i < len(s); i++ { - if octetTypes[s[i]]&isSpace == 0 { - break - } - } - return s[i:] -} - -func expectTokenSlash(s string) (token, rest string) { - i := 0 - for ; i < len(s); i++ { - b := s[i] - if (octetTypes[b]&isToken == 0) && b != '/' { - break - } - } - return s[:i], s[i:] -} - -func expectQuality(s string) (q float64, rest string) { - switch { - case len(s) == 0: - return -1, "" - case s[0] == '0': - q = 0 - case s[0] == '1': - q = 1 - default: - return -1, "" - } - s = s[1:] - if !strings.HasPrefix(s, ".") { - return q, s - } - s = s[1:] - i := 0 - n := 0 - d := 1 - for ; i < len(s); i++ { - b := s[i] - if b < '0' || b > '9' { - break - } - n = n*10 + int(b) - '0' - d *= 10 - } - return q + float64(n)/float64(d), s[i:] -} diff --git a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go b/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go deleted file mode 100644 index 2e45780b7..000000000 --- a/vendor/github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/negotiate.go +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright 2013 The Go Authors. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd. - -package httputil - -import ( - "net/http" - - "github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header" -) - -// NegotiateContentEncoding returns the best offered content encoding for the -// request's Accept-Encoding header. If two offers match with equal weight and -// then the offer earlier in the list is preferred. If no offers are -// acceptable, then "" is returned. -func NegotiateContentEncoding(r *http.Request, offers []string) string { - bestOffer := "identity" - bestQ := -1.0 - specs := header.ParseAccept(r.Header, "Accept-Encoding") - for _, offer := range offers { - for _, spec := range specs { - if spec.Q > bestQ && - (spec.Value == "*" || spec.Value == offer) { - bestQ = spec.Q - bestOffer = offer - } - } - } - if bestQ == 0 { - bestOffer = "" - } - return bestOffer -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/.gitignore b/vendor/github.com/prometheus/client_golang/prometheus/.gitignore deleted file mode 100644 index 3460f0346..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/.gitignore +++ /dev/null @@ -1 +0,0 @@ -command-line-arguments.test diff --git a/vendor/github.com/prometheus/client_golang/prometheus/README.md b/vendor/github.com/prometheus/client_golang/prometheus/README.md deleted file mode 100644 index c67ff1b7f..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/README.md +++ /dev/null @@ -1 +0,0 @@ -See [![Go Reference](https://pkg.go.dev/badge/github.com/prometheus/client_golang/prometheus.svg)](https://pkg.go.dev/github.com/prometheus/client_golang/prometheus). diff --git a/vendor/github.com/prometheus/client_golang/prometheus/build_info_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/build_info_collector.go deleted file mode 100644 index 450189f35..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/build_info_collector.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2021 The Prometheus 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 prometheus - -import "runtime/debug" - -// NewBuildInfoCollector is the obsolete version of collectors.NewBuildInfoCollector. -// See there for documentation. -// -// Deprecated: Use collectors.NewBuildInfoCollector instead. -func NewBuildInfoCollector() Collector { - path, version, sum := "unknown", "unknown", "unknown" - if bi, ok := debug.ReadBuildInfo(); ok { - path = bi.Main.Path - version = bi.Main.Version - sum = bi.Main.Sum - } - c := &selfCollector{MustNewConstMetric( - NewDesc( - "go_build_info", - "Build information about the main Go module.", - nil, Labels{"path": path, "version": version, "checksum": sum}, - ), - GaugeValue, 1)} - c.init(c.self) - return c -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collector.go deleted file mode 100644 index cf05079fb..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collector.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -// Collector is the interface implemented by anything that can be used by -// Prometheus to collect metrics. A Collector has to be registered for -// collection. See Registerer.Register. -// -// The stock metrics provided by this package (Gauge, Counter, Summary, -// Histogram, Untyped) are also Collectors (which only ever collect one metric, -// namely itself). An implementer of Collector may, however, collect multiple -// metrics in a coordinated fashion and/or create metrics on the fly. Examples -// for collectors already implemented in this library are the metric vectors -// (i.e. collection of multiple instances of the same Metric but with different -// label values) like GaugeVec or SummaryVec, and the ExpvarCollector. -type Collector interface { - // Describe sends the super-set of all possible descriptors of metrics - // collected by this Collector to the provided channel and returns once - // the last descriptor has been sent. The sent descriptors fulfill the - // consistency and uniqueness requirements described in the Desc - // documentation. - // - // It is valid if one and the same Collector sends duplicate - // descriptors. Those duplicates are simply ignored. However, two - // different Collectors must not send duplicate descriptors. - // - // Sending no descriptor at all marks the Collector as “unchecked”, - // i.e. no checks will be performed at registration time, and the - // Collector may yield any Metric it sees fit in its Collect method. - // - // This method idempotently sends the same descriptors throughout the - // lifetime of the Collector. It may be called concurrently and - // therefore must be implemented in a concurrency safe way. - // - // If a Collector encounters an error while executing this method, it - // must send an invalid descriptor (created with NewInvalidDesc) to - // signal the error to the registry. - Describe(chan<- *Desc) - // Collect is called by the Prometheus registry when collecting - // metrics. The implementation sends each collected metric via the - // provided channel and returns once the last metric has been sent. The - // descriptor of each sent metric is one of those returned by Describe - // (unless the Collector is unchecked, see above). Returned metrics that - // share the same descriptor must differ in their variable label - // values. - // - // This method may be called concurrently and must therefore be - // implemented in a concurrency safe way. Blocking occurs at the expense - // of total performance of rendering all registered metrics. Ideally, - // Collector implementations support concurrent readers. - Collect(chan<- Metric) -} - -// DescribeByCollect is a helper to implement the Describe method of a custom -// Collector. It collects the metrics from the provided Collector and sends -// their descriptors to the provided channel. -// -// If a Collector collects the same metrics throughout its lifetime, its -// Describe method can simply be implemented as: -// -// func (c customCollector) Describe(ch chan<- *Desc) { -// DescribeByCollect(c, ch) -// } -// -// However, this will not work if the metrics collected change dynamically over -// the lifetime of the Collector in a way that their combined set of descriptors -// changes as well. The shortcut implementation will then violate the contract -// of the Describe method. If a Collector sometimes collects no metrics at all -// (for example vectors like CounterVec, GaugeVec, etc., which only collect -// metrics after a metric with a fully specified label set has been accessed), -// it might even get registered as an unchecked Collector (cf. the Register -// method of the Registerer interface). Hence, only use this shortcut -// implementation of Describe if you are certain to fulfill the contract. -// -// The Collector example demonstrates a use of DescribeByCollect. -func DescribeByCollect(c Collector, descs chan<- *Desc) { - metrics := make(chan Metric) - go func() { - c.Collect(metrics) - close(metrics) - }() - for m := range metrics { - descs <- m.Desc() - } -} - -// selfCollector implements Collector for a single Metric so that the Metric -// collects itself. Add it as an anonymous field to a struct that implements -// Metric, and call init with the Metric itself as an argument. -type selfCollector struct { - self Metric -} - -// init provides the selfCollector with a reference to the metric it is supposed -// to collect. It is usually called within the factory function to create a -// metric. See example. -func (c *selfCollector) init(self Metric) { - c.self = self -} - -// Describe implements Collector. -func (c *selfCollector) Describe(ch chan<- *Desc) { - ch <- c.self.Desc() -} - -// Collect implements Collector. -func (c *selfCollector) Collect(ch chan<- Metric) { - ch <- c.self -} - -// collectorMetric is a metric that is also a collector. -// Because of selfCollector, most (if not all) Metrics in -// this package are also collectors. -type collectorMetric interface { - Metric - Collector -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go b/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go deleted file mode 100644 index 9a71a15db..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectorfunc.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2025 The Prometheus 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 prometheus - -// CollectorFunc is a convenient way to implement a Prometheus Collector -// without interface boilerplate. -// This implementation is based on DescribeByCollect method. -// familiarize yourself to it before using. -type CollectorFunc func(chan<- Metric) - -// Collect calls the defined CollectorFunc function with the provided Metrics channel -func (f CollectorFunc) Collect(ch chan<- Metric) { - f(ch) -} - -// Describe sends the descriptor information using DescribeByCollect -func (f CollectorFunc) Describe(ch chan<- *Desc) { - DescribeByCollect(f, ch) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/collectors.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/collectors.go deleted file mode 100644 index f4c92913a..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/collectors.go +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2021 The Prometheus 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 collectors provides implementations of prometheus.Collector to -// conveniently collect process and Go-related metrics. -package collectors - -import "github.com/prometheus/client_golang/prometheus" - -// NewBuildInfoCollector returns a collector collecting a single metric -// "go_build_info" with the constant value 1 and three labels "path", "version", -// and "checksum". Their label values contain the main module path, version, and -// checksum, respectively. The labels will only have meaningful values if the -// binary is built with Go module support and from source code retrieved from -// the source repository (rather than the local file system). This is usually -// accomplished by building from outside of GOPATH, specifying the full address -// of the main package, e.g. "GO111MODULE=on go run -// github.com/prometheus/client_golang/examples/random". If built without Go -// module support, all label values will be "unknown". If built with Go module -// support but using the source code from the local file system, the "path" will -// be set appropriately, but "checksum" will be empty and "version" will be -// "(devel)". -// -// This collector uses only the build information for the main module. See -// https://github.com/povilasv/prommod for an example of a collector for the -// module dependencies. -func NewBuildInfoCollector() prometheus.Collector { - //nolint:staticcheck // Ignore SA1019 until v2. - return prometheus.NewBuildInfoCollector() -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/dbstats_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/dbstats_collector.go deleted file mode 100644 index d5a7279fb..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/dbstats_collector.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2021 The Prometheus 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 collectors - -import ( - "database/sql" - - "github.com/prometheus/client_golang/prometheus" -) - -type dbStatsCollector struct { - db *sql.DB - - maxOpenConnections *prometheus.Desc - - openConnections *prometheus.Desc - inUseConnections *prometheus.Desc - idleConnections *prometheus.Desc - - waitCount *prometheus.Desc - waitDuration *prometheus.Desc - maxIdleClosed *prometheus.Desc - maxIdleTimeClosed *prometheus.Desc - maxLifetimeClosed *prometheus.Desc -} - -// NewDBStatsCollector returns a collector that exports metrics about the given *sql.DB. -// See https://golang.org/pkg/database/sql/#DBStats for more information on stats. -func NewDBStatsCollector(db *sql.DB, dbName string) prometheus.Collector { - fqName := func(name string) string { - return "go_sql_" + name - } - return &dbStatsCollector{ - db: db, - maxOpenConnections: prometheus.NewDesc( - fqName("max_open_connections"), - "Maximum number of open connections to the database.", - nil, prometheus.Labels{"db_name": dbName}, - ), - openConnections: prometheus.NewDesc( - fqName("open_connections"), - "The number of established connections both in use and idle.", - nil, prometheus.Labels{"db_name": dbName}, - ), - inUseConnections: prometheus.NewDesc( - fqName("in_use_connections"), - "The number of connections currently in use.", - nil, prometheus.Labels{"db_name": dbName}, - ), - idleConnections: prometheus.NewDesc( - fqName("idle_connections"), - "The number of idle connections.", - nil, prometheus.Labels{"db_name": dbName}, - ), - waitCount: prometheus.NewDesc( - fqName("wait_count_total"), - "The total number of connections waited for.", - nil, prometheus.Labels{"db_name": dbName}, - ), - waitDuration: prometheus.NewDesc( - fqName("wait_duration_seconds_total"), - "The total time blocked waiting for a new connection.", - nil, prometheus.Labels{"db_name": dbName}, - ), - maxIdleClosed: prometheus.NewDesc( - fqName("max_idle_closed_total"), - "The total number of connections closed due to SetMaxIdleConns.", - nil, prometheus.Labels{"db_name": dbName}, - ), - maxIdleTimeClosed: prometheus.NewDesc( - fqName("max_idle_time_closed_total"), - "The total number of connections closed due to SetConnMaxIdleTime.", - nil, prometheus.Labels{"db_name": dbName}, - ), - maxLifetimeClosed: prometheus.NewDesc( - fqName("max_lifetime_closed_total"), - "The total number of connections closed due to SetConnMaxLifetime.", - nil, prometheus.Labels{"db_name": dbName}, - ), - } -} - -// Describe implements Collector. -func (c *dbStatsCollector) Describe(ch chan<- *prometheus.Desc) { - ch <- c.maxOpenConnections - ch <- c.openConnections - ch <- c.inUseConnections - ch <- c.idleConnections - ch <- c.waitCount - ch <- c.waitDuration - ch <- c.maxIdleClosed - ch <- c.maxLifetimeClosed - ch <- c.maxIdleTimeClosed -} - -// Collect implements Collector. -func (c *dbStatsCollector) Collect(ch chan<- prometheus.Metric) { - stats := c.db.Stats() - ch <- prometheus.MustNewConstMetric(c.maxOpenConnections, prometheus.GaugeValue, float64(stats.MaxOpenConnections)) - ch <- prometheus.MustNewConstMetric(c.openConnections, prometheus.GaugeValue, float64(stats.OpenConnections)) - ch <- prometheus.MustNewConstMetric(c.inUseConnections, prometheus.GaugeValue, float64(stats.InUse)) - ch <- prometheus.MustNewConstMetric(c.idleConnections, prometheus.GaugeValue, float64(stats.Idle)) - ch <- prometheus.MustNewConstMetric(c.waitCount, prometheus.CounterValue, float64(stats.WaitCount)) - ch <- prometheus.MustNewConstMetric(c.waitDuration, prometheus.CounterValue, stats.WaitDuration.Seconds()) - ch <- prometheus.MustNewConstMetric(c.maxIdleClosed, prometheus.CounterValue, float64(stats.MaxIdleClosed)) - ch <- prometheus.MustNewConstMetric(c.maxLifetimeClosed, prometheus.CounterValue, float64(stats.MaxLifetimeClosed)) - ch <- prometheus.MustNewConstMetric(c.maxIdleTimeClosed, prometheus.CounterValue, float64(stats.MaxIdleTimeClosed)) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/expvar_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/expvar_collector.go deleted file mode 100644 index b22d862fb..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/expvar_collector.go +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2021 The Prometheus 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 collectors - -import "github.com/prometheus/client_golang/prometheus" - -// NewExpvarCollector returns a newly allocated expvar Collector. -// -// An expvar Collector collects metrics from the expvar interface. It provides a -// quick way to expose numeric values that are already exported via expvar as -// Prometheus metrics. Note that the data models of expvar and Prometheus are -// fundamentally different, and that the expvar Collector is inherently slower -// than native Prometheus metrics. Thus, the expvar Collector is probably great -// for experiments and prototyping, but you should seriously consider a more -// direct implementation of Prometheus metrics for monitoring production -// systems. -// -// The exports map has the following meaning: -// -// The keys in the map correspond to expvar keys, i.e. for every expvar key you -// want to export as Prometheus metric, you need an entry in the exports -// map. The descriptor mapped to each key describes how to export the expvar -// value. It defines the name and the help string of the Prometheus metric -// proxying the expvar value. The type will always be Untyped. -// -// For descriptors without variable labels, the expvar value must be a number or -// a bool. The number is then directly exported as the Prometheus sample -// value. (For a bool, 'false' translates to 0 and 'true' to 1). Expvar values -// that are not numbers or bools are silently ignored. -// -// If the descriptor has one variable label, the expvar value must be an expvar -// map. The keys in the expvar map become the various values of the one -// Prometheus label. The values in the expvar map must be numbers or bools again -// as above. -// -// For descriptors with more than one variable label, the expvar must be a -// nested expvar map, i.e. where the values of the topmost map are maps again -// etc. until a depth is reached that corresponds to the number of labels. The -// leaves of that structure must be numbers or bools as above to serve as the -// sample values. -// -// Anything that does not fit into the scheme above is silently ignored. -func NewExpvarCollector(exports map[string]*prometheus.Desc) prometheus.Collector { - //nolint:staticcheck // Ignore SA1019 until v2. - return prometheus.NewExpvarCollector(exports) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_go116.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_go116.go deleted file mode 100644 index effc57840..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_go116.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2021 The Prometheus 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. - -//go:build !go1.17 -// +build !go1.17 - -package collectors - -import "github.com/prometheus/client_golang/prometheus" - -// NewGoCollector returns a collector that exports metrics about the current Go -// process. This includes memory stats. To collect those, runtime.ReadMemStats -// is called. This requires to “stop the world”, which usually only happens for -// garbage collection (GC). Take the following implications into account when -// deciding whether to use the Go collector: -// -// 1. The performance impact of stopping the world is the more relevant the more -// frequently metrics are collected. However, with Go1.9 or later the -// stop-the-world time per metrics collection is very short (~25µs) so that the -// performance impact will only matter in rare cases. However, with older Go -// versions, the stop-the-world duration depends on the heap size and can be -// quite significant (~1.7 ms/GiB as per -// https://go-review.googlesource.com/c/go/+/34937). -// -// 2. During an ongoing GC, nothing else can stop the world. Therefore, if the -// metrics collection happens to coincide with GC, it will only complete after -// GC has finished. Usually, GC is fast enough to not cause problems. However, -// with a very large heap, GC might take multiple seconds, which is enough to -// cause scrape timeouts in common setups. To avoid this problem, the Go -// collector will use the memstats from a previous collection if -// runtime.ReadMemStats takes more than 1s. However, if there are no previously -// collected memstats, or their collection is more than 5m ago, the collection -// will block until runtime.ReadMemStats succeeds. -// -// NOTE: The problem is solved in Go 1.15, see -// https://github.com/golang/go/issues/19812 for the related Go issue. -func NewGoCollector() prometheus.Collector { - return prometheus.NewGoCollector() -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go deleted file mode 100644 index cc4ef1077..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/go_collector_latest.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2021 The Prometheus 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. - -//go:build go1.17 -// +build go1.17 - -package collectors - -import ( - "regexp" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/internal" -) - -var ( - // MetricsAll allows all the metrics to be collected from Go runtime. - MetricsAll = GoRuntimeMetricsRule{regexp.MustCompile("/.*")} - // MetricsGC allows only GC metrics to be collected from Go runtime. - // e.g. go_gc_cycles_automatic_gc_cycles_total - // NOTE: This does not include new class of "/cpu/classes/gc/..." metrics. - // Use custom metric rule to access those. - MetricsGC = GoRuntimeMetricsRule{regexp.MustCompile(`^/gc/.*`)} - // MetricsMemory allows only memory metrics to be collected from Go runtime. - // e.g. go_memory_classes_heap_free_bytes - MetricsMemory = GoRuntimeMetricsRule{regexp.MustCompile(`^/memory/.*`)} - // MetricsScheduler allows only scheduler metrics to be collected from Go runtime. - // e.g. go_sched_goroutines_goroutines - MetricsScheduler = GoRuntimeMetricsRule{regexp.MustCompile(`^/sched/.*`)} - // MetricsDebug allows only debug metrics to be collected from Go runtime. - // e.g. go_godebug_non_default_behavior_gocachetest_events_total - MetricsDebug = GoRuntimeMetricsRule{regexp.MustCompile(`^/godebug/.*`)} -) - -// WithGoCollectorMemStatsMetricsDisabled disables metrics that is gathered in runtime.MemStats structure such as: -// -// go_memstats_alloc_bytes -// go_memstats_alloc_bytes_total -// go_memstats_sys_bytes -// go_memstats_mallocs_total -// go_memstats_frees_total -// go_memstats_heap_alloc_bytes -// go_memstats_heap_sys_bytes -// go_memstats_heap_idle_bytes -// go_memstats_heap_inuse_bytes -// go_memstats_heap_released_bytes -// go_memstats_heap_objects -// go_memstats_stack_inuse_bytes -// go_memstats_stack_sys_bytes -// go_memstats_mspan_inuse_bytes -// go_memstats_mspan_sys_bytes -// go_memstats_mcache_inuse_bytes -// go_memstats_mcache_sys_bytes -// go_memstats_buck_hash_sys_bytes -// go_memstats_gc_sys_bytes -// go_memstats_other_sys_bytes -// go_memstats_next_gc_bytes -// -// so the metrics known from pre client_golang v1.12.0, -// -// NOTE(bwplotka): The above represents runtime.MemStats statistics, but they are -// actually implemented using new runtime/metrics package. (except skipped go_memstats_gc_cpu_fraction -// -- see https://github.com/prometheus/client_golang/issues/842#issuecomment-861812034 for explanation). -// -// Some users might want to disable this on collector level (although you can use scrape relabelling on Prometheus), -// because similar metrics can be now obtained using WithGoCollectorRuntimeMetrics. Note that the semantics of new -// metrics might be different, plus the names can be change over time with different Go version. -// -// NOTE(bwplotka): Changing metric names can be tedious at times as the alerts, recording rules and dashboards have to be adjusted. -// The old metrics are also very useful, with many guides and books written about how to interpret them. -// -// As a result our recommendation would be to stick with MemStats like metrics and enable other runtime/metrics if you are interested -// in advanced insights Go provides. See ExampleGoCollector_WithAdvancedGoMetrics. -func WithGoCollectorMemStatsMetricsDisabled() func(options *internal.GoCollectorOptions) { - return func(o *internal.GoCollectorOptions) { - o.DisableMemStatsLikeMetrics = true - } -} - -// GoRuntimeMetricsRule allow enabling and configuring particular group of runtime/metrics. -// TODO(bwplotka): Consider adding ability to adjust buckets. -type GoRuntimeMetricsRule struct { - // Matcher represents RE2 expression will match the runtime/metrics from https://golang.bg/src/runtime/metrics/description.go - // Use `regexp.MustCompile` or `regexp.Compile` to create this field. - Matcher *regexp.Regexp -} - -// WithGoCollectorRuntimeMetrics allows enabling and configuring particular group of runtime/metrics. -// See the list of metrics https://golang.bg/src/runtime/metrics/description.go (pick the Go version you use there!). -// You can use this option in repeated manner, which will add new rules. The order of rules is important, the last rule -// that matches particular metrics is applied. -func WithGoCollectorRuntimeMetrics(rules ...GoRuntimeMetricsRule) func(options *internal.GoCollectorOptions) { - rs := make([]internal.GoCollectorRule, len(rules)) - for i, r := range rules { - rs[i] = internal.GoCollectorRule{ - Matcher: r.Matcher, - } - } - - return func(o *internal.GoCollectorOptions) { - o.RuntimeMetricRules = append(o.RuntimeMetricRules, rs...) - } -} - -// WithoutGoCollectorRuntimeMetrics allows disabling group of runtime/metrics that you might have added in WithGoCollectorRuntimeMetrics. -// It behaves similarly to WithGoCollectorRuntimeMetrics just with deny-list semantics. -func WithoutGoCollectorRuntimeMetrics(matchers ...*regexp.Regexp) func(options *internal.GoCollectorOptions) { - rs := make([]internal.GoCollectorRule, len(matchers)) - for i, m := range matchers { - rs[i] = internal.GoCollectorRule{ - Matcher: m, - Deny: true, - } - } - - return func(o *internal.GoCollectorOptions) { - o.RuntimeMetricRules = append(o.RuntimeMetricRules, rs...) - } -} - -// GoCollectionOption represents Go collection option flag. -// Deprecated. -type GoCollectionOption uint32 - -const ( - // GoRuntimeMemStatsCollection represents the metrics represented by runtime.MemStats structure. - // - // Deprecated: Use WithGoCollectorMemStatsMetricsDisabled() function to disable those metrics in the collector. - GoRuntimeMemStatsCollection GoCollectionOption = 1 << iota - // GoRuntimeMetricsCollection is the new set of metrics represented by runtime/metrics package. - // - // Deprecated: Use WithGoCollectorRuntimeMetrics(GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")}) - // function to enable those metrics in the collector. - GoRuntimeMetricsCollection -) - -// WithGoCollections allows enabling different collections for Go collector on top of base metrics. -// -// Deprecated: Use WithGoCollectorRuntimeMetrics() and WithGoCollectorMemStatsMetricsDisabled() instead to control metrics. -func WithGoCollections(flags GoCollectionOption) func(options *internal.GoCollectorOptions) { - return func(options *internal.GoCollectorOptions) { - if flags&GoRuntimeMemStatsCollection == 0 { - WithGoCollectorMemStatsMetricsDisabled()(options) - } - - if flags&GoRuntimeMetricsCollection != 0 { - WithGoCollectorRuntimeMetrics(GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")})(options) - } - } -} - -// NewGoCollector returns a collector that exports metrics about the current Go -// process using debug.GCStats (base metrics) and runtime/metrics (both in MemStats style and new ones). -func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) prometheus.Collector { - //nolint:staticcheck // Ignore SA1019 until v2. - return prometheus.NewGoCollector(opts...) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/collectors/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/collectors/process_collector.go deleted file mode 100644 index 24558f50a..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/collectors/process_collector.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2021 The Prometheus 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 collectors - -import "github.com/prometheus/client_golang/prometheus" - -// ProcessCollectorOpts defines the behavior of a process metrics collector -// created with NewProcessCollector. -type ProcessCollectorOpts struct { - // PidFn returns the PID of the process the collector collects metrics - // for. It is called upon each collection. By default, the PID of the - // current process is used, as determined on construction time by - // calling os.Getpid(). - PidFn func() (int, error) - // If non-empty, each of the collected metrics is prefixed by the - // provided string and an underscore ("_"). - Namespace string - // If true, any error encountered during collection is reported as an - // invalid metric (see NewInvalidMetric). Otherwise, errors are ignored - // and the collected metrics will be incomplete. (Possibly, no metrics - // will be collected at all.) While that's usually not desired, it is - // appropriate for the common "mix-in" of process metrics, where process - // metrics are nice to have, but failing to collect them should not - // disrupt the collection of the remaining metrics. - ReportErrors bool -} - -// NewProcessCollector returns a collector which exports the current state of -// process metrics including CPU, memory and file descriptor usage as well as -// the process start time. The detailed behavior is defined by the provided -// ProcessCollectorOpts. The zero value of ProcessCollectorOpts creates a -// collector for the current process with an empty namespace string and no error -// reporting. -// -// The collector only works on operating systems with a Linux-style proc -// filesystem and on Microsoft Windows. On other operating systems, it will not -// collect any metrics. -func NewProcessCollector(opts ProcessCollectorOpts) prometheus.Collector { - //nolint:staticcheck // Ignore SA1019 until v2. - return prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{ - PidFn: opts.PidFn, - Namespace: opts.Namespace, - ReportErrors: opts.ReportErrors, - }) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/counter.go b/vendor/github.com/prometheus/client_golang/prometheus/counter.go deleted file mode 100644 index 4ce84e7a8..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/counter.go +++ /dev/null @@ -1,358 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "errors" - "math" - "sync/atomic" - "time" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// Counter is a Metric that represents a single numerical value that only ever -// goes up. That implies that it cannot be used to count items whose number can -// also go down, e.g. the number of currently running goroutines. Those -// "counters" are represented by Gauges. -// -// A Counter is typically used to count requests served, tasks completed, errors -// occurred, etc. -// -// To create Counter instances, use NewCounter. -type Counter interface { - Metric - Collector - - // Inc increments the counter by 1. Use Add to increment it by arbitrary - // non-negative values. - Inc() - // Add adds the given value to the counter. It panics if the value is < - // 0. - Add(float64) -} - -// ExemplarAdder is implemented by Counters that offer the option of adding a -// value to the Counter together with an exemplar. Its AddWithExemplar method -// works like the Add method of the Counter interface but also replaces the -// currently saved exemplar (if any) with a new one, created from the provided -// value, the current time as timestamp, and the provided labels. Empty Labels -// will lead to a valid (label-less) exemplar. But if Labels is nil, the current -// exemplar is left in place. AddWithExemplar panics if the value is < 0, if any -// of the provided labels are invalid, or if the provided labels contain more -// than 128 runes in total. -type ExemplarAdder interface { - AddWithExemplar(value float64, exemplar Labels) -} - -// CounterOpts is an alias for Opts. See there for doc comments. -type CounterOpts Opts - -// CounterVecOpts bundles the options to create a CounterVec metric. -// It is mandatory to set CounterOpts, see there for mandatory fields. VariableLabels -// is optional and can safely be left to its default value. -type CounterVecOpts struct { - CounterOpts - - // VariableLabels are used to partition the metric vector by the given set - // of labels. Each label value will be constrained with the optional Constraint - // function, if provided. - VariableLabels ConstrainableLabels -} - -// NewCounter creates a new Counter based on the provided CounterOpts. -// -// The returned implementation also implements ExemplarAdder. It is safe to -// perform the corresponding type assertion. -// -// The returned implementation tracks the counter value in two separate -// variables, a float64 and a uint64. The latter is used to track calls of the -// Inc method and calls of the Add method with a value that can be represented -// as a uint64. This allows atomic increments of the counter with optimal -// performance. (It is common to have an Inc call in very hot execution paths.) -// Both internal tracking values are added up in the Write method. This has to -// be taken into account when it comes to precision and overflow behavior. -func NewCounter(opts CounterOpts) Counter { - desc := NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ) - if opts.now == nil { - opts.now = time.Now - } - result := &counter{desc: desc, labelPairs: desc.constLabelPairs, now: opts.now} - result.init(result) // Init self-collection. - result.createdTs = timestamppb.New(opts.now()) - return result -} - -type counter struct { - // valBits contains the bits of the represented float64 value, while - // valInt stores values that are exact integers. Both have to go first - // in the struct to guarantee alignment for atomic operations. - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG - valBits uint64 - valInt uint64 - - selfCollector - desc *Desc - - createdTs *timestamppb.Timestamp - labelPairs []*dto.LabelPair - exemplar atomic.Value // Containing nil or a *dto.Exemplar. - - // now is for testing purposes, by default it's time.Now. - now func() time.Time -} - -func (c *counter) Desc() *Desc { - return c.desc -} - -func (c *counter) Add(v float64) { - if v < 0 { - panic(errors.New("counter cannot decrease in value")) - } - - ival := uint64(v) - if float64(ival) == v { - atomic.AddUint64(&c.valInt, ival) - return - } - - for { - oldBits := atomic.LoadUint64(&c.valBits) - newBits := math.Float64bits(math.Float64frombits(oldBits) + v) - if atomic.CompareAndSwapUint64(&c.valBits, oldBits, newBits) { - return - } - } -} - -func (c *counter) AddWithExemplar(v float64, e Labels) { - c.Add(v) - c.updateExemplar(v, e) -} - -func (c *counter) Inc() { - atomic.AddUint64(&c.valInt, 1) -} - -func (c *counter) get() float64 { - fval := math.Float64frombits(atomic.LoadUint64(&c.valBits)) - ival := atomic.LoadUint64(&c.valInt) - return fval + float64(ival) -} - -func (c *counter) Write(out *dto.Metric) error { - // Read the Exemplar first and the value second. This is to avoid a race condition - // where users see an exemplar for a not-yet-existing observation. - var exemplar *dto.Exemplar - if e := c.exemplar.Load(); e != nil { - exemplar = e.(*dto.Exemplar) - } - val := c.get() - return populateMetric(CounterValue, val, c.labelPairs, exemplar, out, c.createdTs) -} - -func (c *counter) updateExemplar(v float64, l Labels) { - if l == nil { - return - } - e, err := newExemplar(v, c.now(), l) - if err != nil { - panic(err) - } - c.exemplar.Store(e) -} - -// CounterVec is a Collector that bundles a set of Counters that all share the -// same Desc, but have different values for their variable labels. This is used -// if you want to count the same thing partitioned by various dimensions -// (e.g. number of HTTP requests, partitioned by response code and -// method). Create instances with NewCounterVec. -type CounterVec struct { - *MetricVec -} - -// NewCounterVec creates a new CounterVec based on the provided CounterOpts and -// partitioned by the given label names. -func NewCounterVec(opts CounterOpts, labelNames []string) *CounterVec { - return V2.NewCounterVec(CounterVecOpts{ - CounterOpts: opts, - VariableLabels: UnconstrainedLabels(labelNames), - }) -} - -// NewCounterVec creates a new CounterVec based on the provided CounterVecOpts. -func (v2) NewCounterVec(opts CounterVecOpts) *CounterVec { - desc := V2.NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - opts.VariableLabels, - opts.ConstLabels, - ) - if opts.now == nil { - opts.now = time.Now - } - return &CounterVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { - if len(lvs) != len(desc.variableLabels.names) { - panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels.names, lvs)) - } - result := &counter{desc: desc, labelPairs: MakeLabelPairs(desc, lvs), now: opts.now} - result.init(result) // Init self-collection. - result.createdTs = timestamppb.New(opts.now()) - return result - }), - } -} - -// GetMetricWithLabelValues returns the Counter for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Counter is created. -// -// It is possible to call this method without using the returned Counter to only -// create the new Counter but leave it at its starting value 0. See also the -// SummaryVec example. -// -// Keeping the Counter for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Counter from the CounterVec. In that case, -// the Counter will still exist, but it will not be exported anymore, even if a -// Counter with the same label values is created later. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// See also the GaugeVec example. -func (v *CounterVec) GetMetricWithLabelValues(lvs ...string) (Counter, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(Counter), err - } - return nil, err -} - -// GetMetricWith returns the Counter for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Counter is created. Implications of -// creating a Counter without using it and keeping the Counter for later use are -// the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -func (v *CounterVec) GetMetricWith(labels Labels) (Counter, error) { - metric, err := v.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(Counter), err - } - return nil, err -} - -// WithLabelValues works as GetMetricWithLabelValues, but panics where -// GetMetricWithLabelValues would have returned an error. Not returning an -// error allows shortcuts like -// -// myVec.WithLabelValues("404", "GET").Add(42) -func (v *CounterVec) WithLabelValues(lvs ...string) Counter { - c, err := v.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return c -} - -// With works as GetMetricWith, but panics where GetMetricWithLabels would have -// returned an error. Not returning an error allows shortcuts like -// -// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42) -func (v *CounterVec) With(labels Labels) Counter { - c, err := v.GetMetricWith(labels) - if err != nil { - panic(err) - } - return c -} - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the CounterVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -func (v *CounterVec) CurryWith(labels Labels) (*CounterVec, error) { - vec, err := v.MetricVec.CurryWith(labels) - if vec != nil { - return &CounterVec{vec}, err - } - return nil, err -} - -// MustCurryWith works as CurryWith but panics where CurryWith would have -// returned an error. -func (v *CounterVec) MustCurryWith(labels Labels) *CounterVec { - vec, err := v.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} - -// CounterFunc is a Counter whose value is determined at collect time by calling a -// provided function. -// -// To create CounterFunc instances, use NewCounterFunc. -type CounterFunc interface { - Metric - Collector -} - -// NewCounterFunc creates a new CounterFunc based on the provided -// CounterOpts. The value reported is determined by calling the given function -// from within the Write method. Take into account that metric collection may -// happen concurrently. If that results in concurrent calls to Write, like in -// the case where a CounterFunc is directly registered with Prometheus, the -// provided function must be concurrency-safe. The function should also honor -// the contract for a Counter (values only go up, not down), but compliance will -// not be checked. -// -// Check out the ExampleGaugeFunc examples for the similar GaugeFunc. -func NewCounterFunc(opts CounterOpts, function func() float64) CounterFunc { - return newValueFunc(NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ), CounterValue, function) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/desc.go b/vendor/github.com/prometheus/client_golang/prometheus/desc.go deleted file mode 100644 index 2331b8b4f..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/desc.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright 2016 The Prometheus 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 prometheus - -import ( - "fmt" - "sort" - "strings" - - "github.com/cespare/xxhash/v2" - dto "github.com/prometheus/client_model/go" - "github.com/prometheus/common/model" - "google.golang.org/protobuf/proto" - - "github.com/prometheus/client_golang/prometheus/internal" -) - -// Desc is the descriptor used by every Prometheus Metric. It is essentially -// the immutable meta-data of a Metric. The normal Metric implementations -// included in this package manage their Desc under the hood. Users only have to -// deal with Desc if they use advanced features like the ExpvarCollector or -// custom Collectors and Metrics. -// -// Descriptors registered with the same registry have to fulfill certain -// consistency and uniqueness criteria if they share the same fully-qualified -// name: They must have the same help string and the same label names (aka label -// dimensions) in each, constLabels and variableLabels, but they must differ in -// the values of the constLabels. -// -// Descriptors that share the same fully-qualified names and the same label -// values of their constLabels are considered equal. -// -// Use NewDesc to create new Desc instances. -type Desc struct { - // fqName has been built from Namespace, Subsystem, and Name. - fqName string - // help provides some helpful information about this metric. - help string - // constLabelPairs contains precalculated DTO label pairs based on - // the constant labels. - constLabelPairs []*dto.LabelPair - // variableLabels contains names of labels and normalization function for - // which the metric maintains variable values. - variableLabels *compiledLabels - // id is a hash of the values of the ConstLabels and fqName. This - // must be unique among all registered descriptors and can therefore be - // used as an identifier of the descriptor. - id uint64 - // dimHash is a hash of the label names (preset and variable) and the - // Help string. Each Desc with the same fqName must have the same - // dimHash. - dimHash uint64 - // err is an error that occurred during construction. It is reported on - // registration time. - err error -} - -// NewDesc allocates and initializes a new Desc. Errors are recorded in the Desc -// and will be reported on registration time. variableLabels and constLabels can -// be nil if no such labels should be set. fqName must not be empty. -// -// variableLabels only contain the label names. Their label values are variable -// and therefore not part of the Desc. (They are managed within the Metric.) -// -// For constLabels, the label values are constant. Therefore, they are fully -// specified in the Desc. See the Collector example for a usage pattern. -func NewDesc(fqName, help string, variableLabels []string, constLabels Labels) *Desc { - return V2.NewDesc(fqName, help, UnconstrainedLabels(variableLabels), constLabels) -} - -// NewDesc allocates and initializes a new Desc. Errors are recorded in the Desc -// and will be reported on registration time. variableLabels and constLabels can -// be nil if no such labels should be set. fqName must not be empty. -// -// variableLabels only contain the label names and normalization functions. Their -// label values are variable and therefore not part of the Desc. (They are managed -// within the Metric.) -// -// For constLabels, the label values are constant. Therefore, they are fully -// specified in the Desc. See the Collector example for a usage pattern. -func (v2) NewDesc(fqName, help string, variableLabels ConstrainableLabels, constLabels Labels) *Desc { - d := &Desc{ - fqName: fqName, - help: help, - variableLabels: variableLabels.compile(), - } - //nolint:staticcheck // TODO: Don't use deprecated model.NameValidationScheme. - if !model.NameValidationScheme.IsValidMetricName(fqName) { - d.err = fmt.Errorf("%q is not a valid metric name", fqName) - return d - } - // labelValues contains the label values of const labels (in order of - // their sorted label names) plus the fqName (at position 0). - labelValues := make([]string, 1, len(constLabels)+1) - labelValues[0] = fqName - labelNames := make([]string, 0, len(constLabels)+len(d.variableLabels.names)) - labelNameSet := map[string]struct{}{} - // First add only the const label names and sort them... - for labelName := range constLabels { - if !checkLabelName(labelName) { - d.err = fmt.Errorf("%q is not a valid label name for metric %q", labelName, fqName) - return d - } - labelNames = append(labelNames, labelName) - labelNameSet[labelName] = struct{}{} - } - sort.Strings(labelNames) - // ... so that we can now add const label values in the order of their names. - for _, labelName := range labelNames { - labelValues = append(labelValues, constLabels[labelName]) - } - // Validate the const label values. They can't have a wrong cardinality, so - // use in len(labelValues) as expectedNumberOfValues. - if err := validateLabelValues(labelValues, len(labelValues)); err != nil { - d.err = err - return d - } - // Now add the variable label names, but prefix them with something that - // cannot be in a regular label name. That prevents matching the label - // dimension with a different mix between preset and variable labels. - for _, label := range d.variableLabels.names { - if !checkLabelName(label) { - d.err = fmt.Errorf("%q is not a valid label name for metric %q", label, fqName) - return d - } - labelNames = append(labelNames, "$"+label) - labelNameSet[label] = struct{}{} - } - if len(labelNames) != len(labelNameSet) { - d.err = fmt.Errorf("duplicate label names in constant and variable labels for metric %q", fqName) - return d - } - - xxh := xxhash.New() - for _, val := range labelValues { - xxh.WriteString(val) - xxh.Write(separatorByteSlice) - } - d.id = xxh.Sum64() - // Sort labelNames so that order doesn't matter for the hash. - sort.Strings(labelNames) - // Now hash together (in this order) the help string and the sorted - // label names. - xxh.Reset() - xxh.WriteString(help) - xxh.Write(separatorByteSlice) - for _, labelName := range labelNames { - xxh.WriteString(labelName) - xxh.Write(separatorByteSlice) - } - d.dimHash = xxh.Sum64() - - d.constLabelPairs = make([]*dto.LabelPair, 0, len(constLabels)) - for n, v := range constLabels { - d.constLabelPairs = append(d.constLabelPairs, &dto.LabelPair{ - Name: proto.String(n), - Value: proto.String(v), - }) - } - sort.Sort(internal.LabelPairSorter(d.constLabelPairs)) - return d -} - -// NewInvalidDesc returns an invalid descriptor, i.e. a descriptor with the -// provided error set. If a collector returning such a descriptor is registered, -// registration will fail with the provided error. NewInvalidDesc can be used by -// a Collector to signal inability to describe itself. -func NewInvalidDesc(err error) *Desc { - return &Desc{ - err: err, - } -} - -func (d *Desc) String() string { - lpStrings := make([]string, 0, len(d.constLabelPairs)) - for _, lp := range d.constLabelPairs { - lpStrings = append( - lpStrings, - fmt.Sprintf("%s=%q", lp.GetName(), lp.GetValue()), - ) - } - vlStrings := []string{} - if d.variableLabels != nil { - vlStrings = make([]string, 0, len(d.variableLabels.names)) - for _, vl := range d.variableLabels.names { - if fn, ok := d.variableLabels.labelConstraints[vl]; ok && fn != nil { - vlStrings = append(vlStrings, fmt.Sprintf("c(%s)", vl)) - } else { - vlStrings = append(vlStrings, vl) - } - } - } - return fmt.Sprintf( - "Desc{fqName: %q, help: %q, constLabels: {%s}, variableLabels: {%s}}", - d.fqName, - d.help, - strings.Join(lpStrings, ","), - strings.Join(vlStrings, ","), - ) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go deleted file mode 100644 index 962608f02..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus is the core instrumentation package. It provides metrics -// primitives to instrument code for monitoring. It also offers a registry for -// metrics. Sub-packages allow to expose the registered metrics via HTTP -// (package promhttp) or push them to a Pushgateway (package push). There is -// also a sub-package promauto, which provides metrics constructors with -// automatic registration. -// -// All exported functions and methods are safe to be used concurrently unless -// specified otherwise. -// -// # A Basic Example -// -// As a starting point, a very basic usage example: -// -// package main -// -// import ( -// "log" -// "net/http" -// -// "github.com/prometheus/client_golang/prometheus" -// "github.com/prometheus/client_golang/prometheus/promhttp" -// ) -// -// type metrics struct { -// cpuTemp prometheus.Gauge -// hdFailures *prometheus.CounterVec -// } -// -// func NewMetrics(reg prometheus.Registerer) *metrics { -// m := &metrics{ -// cpuTemp: prometheus.NewGauge(prometheus.GaugeOpts{ -// Name: "cpu_temperature_celsius", -// Help: "Current temperature of the CPU.", -// }), -// hdFailures: prometheus.NewCounterVec( -// prometheus.CounterOpts{ -// Name: "hd_errors_total", -// Help: "Number of hard-disk errors.", -// }, -// []string{"device"}, -// ), -// } -// reg.MustRegister(m.cpuTemp) -// reg.MustRegister(m.hdFailures) -// return m -// } -// -// func main() { -// // Create a non-global registry. -// reg := prometheus.NewRegistry() -// -// // Create new metrics and register them using the custom registry. -// m := NewMetrics(reg) -// // Set values for the new created metrics. -// m.cpuTemp.Set(65.3) -// m.hdFailures.With(prometheus.Labels{"device":"/dev/sda"}).Inc() -// -// // Expose metrics and custom registry via an HTTP server -// // using the HandleFor function. "/metrics" is the usual endpoint for that. -// http.Handle("/metrics", promhttp.HandlerFor(reg, promhttp.HandlerOpts{Registry: reg})) -// log.Fatal(http.ListenAndServe(":8080", nil)) -// } -// -// This is a complete program that exports two metrics, a Gauge and a Counter, -// the latter with a label attached to turn it into a (one-dimensional) vector. -// It register the metrics using a custom registry and exposes them via an HTTP server -// on the /metrics endpoint. -// -// # Metrics -// -// The number of exported identifiers in this package might appear a bit -// overwhelming. However, in addition to the basic plumbing shown in the example -// above, you only need to understand the different metric types and their -// vector versions for basic usage. Furthermore, if you are not concerned with -// fine-grained control of when and how to register metrics with the registry, -// have a look at the promauto package, which will effectively allow you to -// ignore registration altogether in simple cases. -// -// Above, you have already touched the Counter and the Gauge. There are two more -// advanced metric types: the Summary and Histogram. A more thorough description -// of those four metric types can be found in the Prometheus docs: -// https://prometheus.io/docs/concepts/metric_types/ -// -// In addition to the fundamental metric types Gauge, Counter, Summary, and -// Histogram, a very important part of the Prometheus data model is the -// partitioning of samples along dimensions called labels, which results in -// metric vectors. The fundamental types are GaugeVec, CounterVec, SummaryVec, -// and HistogramVec. -// -// While only the fundamental metric types implement the Metric interface, both -// the metrics and their vector versions implement the Collector interface. A -// Collector manages the collection of a number of Metrics, but for convenience, -// a Metric can also “collect itself”. Note that Gauge, Counter, Summary, and -// Histogram are interfaces themselves while GaugeVec, CounterVec, SummaryVec, -// and HistogramVec are not. -// -// To create instances of Metrics and their vector versions, you need a suitable -// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, or HistogramOpts. -// -// # Custom Collectors and constant Metrics -// -// While you could create your own implementations of Metric, most likely you -// will only ever implement the Collector interface on your own. At a first -// glance, a custom Collector seems handy to bundle Metrics for common -// registration (with the prime example of the different metric vectors above, -// which bundle all the metrics of the same name but with different labels). -// -// There is a more involved use case, too: If you already have metrics -// available, created outside of the Prometheus context, you don't need the -// interface of the various Metric types. You essentially want to mirror the -// existing numbers into Prometheus Metrics during collection. An own -// implementation of the Collector interface is perfect for that. You can create -// Metric instances “on the fly” using NewConstMetric, NewConstHistogram, and -// NewConstSummary (and their respective Must… versions). NewConstMetric is used -// for all metric types with just a float64 as their value: Counter, Gauge, and -// a special “type” called Untyped. Use the latter if you are not sure if the -// mirrored metric is a Counter or a Gauge. Creation of the Metric instance -// happens in the Collect method. The Describe method has to return separate -// Desc instances, representative of the “throw-away” metrics to be created -// later. NewDesc comes in handy to create those Desc instances. Alternatively, -// you could return no Desc at all, which will mark the Collector “unchecked”. -// No checks are performed at registration time, but metric consistency will -// still be ensured at scrape time, i.e. any inconsistencies will lead to scrape -// errors. Thus, with unchecked Collectors, the responsibility to not collect -// metrics that lead to inconsistencies in the total scrape result lies with the -// implementer of the Collector. While this is not a desirable state, it is -// sometimes necessary. The typical use case is a situation where the exact -// metrics to be returned by a Collector cannot be predicted at registration -// time, but the implementer has sufficient knowledge of the whole system to -// guarantee metric consistency. -// -// The Collector example illustrates the use case. You can also look at the -// source code of the processCollector (mirroring process metrics), the -// goCollector (mirroring Go metrics), or the expvarCollector (mirroring expvar -// metrics) as examples that are used in this package itself. -// -// If you just need to call a function to get a single float value to collect as -// a metric, GaugeFunc, CounterFunc, or UntypedFunc might be interesting -// shortcuts. -// -// # Advanced Uses of the Registry -// -// While MustRegister is the by far most common way of registering a Collector, -// sometimes you might want to handle the errors the registration might cause. -// As suggested by the name, MustRegister panics if an error occurs. With the -// Register function, the error is returned and can be handled. -// -// An error is returned if the registered Collector is incompatible or -// inconsistent with already registered metrics. The registry aims for -// consistency of the collected metrics according to the Prometheus data model. -// Inconsistencies are ideally detected at registration time, not at collect -// time. The former will usually be detected at start-up time of a program, -// while the latter will only happen at scrape time, possibly not even on the -// first scrape if the inconsistency only becomes relevant later. That is the -// main reason why a Collector and a Metric have to describe themselves to the -// registry. -// -// So far, everything we did operated on the so-called default registry, as it -// can be found in the global DefaultRegisterer variable. With NewRegistry, you -// can create a custom registry, or you can even implement the Registerer or -// Gatherer interfaces yourself. The methods Register and Unregister work in the -// same way on a custom registry as the global functions Register and Unregister -// on the default registry. -// -// There are a number of uses for custom registries: You can use registries with -// special properties, see NewPedanticRegistry. You can avoid global state, as -// it is imposed by the DefaultRegisterer. You can use multiple registries at -// the same time to expose different metrics in different ways. You can use -// separate registries for testing purposes. -// -// Also note that the DefaultRegisterer comes registered with a Collector for Go -// runtime metrics (via NewGoCollector) and a Collector for process metrics (via -// NewProcessCollector). With a custom registry, you are in control and decide -// yourself about the Collectors to register. -// -// # HTTP Exposition -// -// The Registry implements the Gatherer interface. The caller of the Gather -// method can then expose the gathered metrics in some way. Usually, the metrics -// are served via HTTP on the /metrics endpoint. That's happening in the example -// above. The tools to expose metrics via HTTP are in the promhttp sub-package. -// -// # Pushing to the Pushgateway -// -// Function for pushing to the Pushgateway can be found in the push sub-package. -// -// # Graphite Bridge -// -// Functions and examples to push metrics from a Gatherer to Graphite can be -// found in the graphite sub-package. -// -// # Other Means of Exposition -// -// More ways of exposing metrics can easily be added by following the approaches -// of the existing implementations. -package prometheus diff --git a/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go deleted file mode 100644 index de5a85629..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/expvar_collector.go +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "encoding/json" - "expvar" -) - -type expvarCollector struct { - exports map[string]*Desc -} - -// NewExpvarCollector is the obsolete version of collectors.NewExpvarCollector. -// See there for documentation. -// -// Deprecated: Use collectors.NewExpvarCollector instead. -func NewExpvarCollector(exports map[string]*Desc) Collector { - return &expvarCollector{ - exports: exports, - } -} - -// Describe implements Collector. -func (e *expvarCollector) Describe(ch chan<- *Desc) { - for _, desc := range e.exports { - ch <- desc - } -} - -// Collect implements Collector. -func (e *expvarCollector) Collect(ch chan<- Metric) { - for name, desc := range e.exports { - var m Metric - expVar := expvar.Get(name) - if expVar == nil { - continue - } - var v interface{} - labels := make([]string, len(desc.variableLabels.names)) - if err := json.Unmarshal([]byte(expVar.String()), &v); err != nil { - ch <- NewInvalidMetric(desc, err) - continue - } - var processValue func(v interface{}, i int) - processValue = func(v interface{}, i int) { - if i >= len(labels) { - copiedLabels := append(make([]string, 0, len(labels)), labels...) - switch v := v.(type) { - case float64: - m = MustNewConstMetric(desc, UntypedValue, v, copiedLabels...) - case bool: - if v { - m = MustNewConstMetric(desc, UntypedValue, 1, copiedLabels...) - } else { - m = MustNewConstMetric(desc, UntypedValue, 0, copiedLabels...) - } - default: - return - } - ch <- m - return - } - vm, ok := v.(map[string]interface{}) - if !ok { - return - } - for lv, val := range vm { - labels[i] = lv - processValue(val, i+1) - } - } - processValue(v, 0) - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/fnv.go b/vendor/github.com/prometheus/client_golang/prometheus/fnv.go deleted file mode 100644 index 3d383a735..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/fnv.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2018 The Prometheus 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 prometheus - -// Inline and byte-free variant of hash/fnv's fnv64a. - -const ( - offset64 = 14695981039346656037 - prime64 = 1099511628211 -) - -// hashNew initializies a new fnv64a hash value. -func hashNew() uint64 { - return offset64 -} - -// hashAdd adds a string to a fnv64a hash value, returning the updated hash. -func hashAdd(h uint64, s string) uint64 { - for i := 0; i < len(s); i++ { - h ^= uint64(s[i]) - h *= prime64 - } - return h -} - -// hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. -func hashAddByte(h uint64, b byte) uint64 { - h ^= uint64(b) - h *= prime64 - return h -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go b/vendor/github.com/prometheus/client_golang/prometheus/gauge.go deleted file mode 100644 index dd2eac940..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/gauge.go +++ /dev/null @@ -1,311 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "math" - "sync/atomic" - "time" - - dto "github.com/prometheus/client_model/go" -) - -// Gauge is a Metric that represents a single numerical value that can -// arbitrarily go up and down. -// -// A Gauge is typically used for measured values like temperatures or current -// memory usage, but also "counts" that can go up and down, like the number of -// running goroutines. -// -// To create Gauge instances, use NewGauge. -type Gauge interface { - Metric - Collector - - // Set sets the Gauge to an arbitrary value. - Set(float64) - // Inc increments the Gauge by 1. Use Add to increment it by arbitrary - // values. - Inc() - // Dec decrements the Gauge by 1. Use Sub to decrement it by arbitrary - // values. - Dec() - // Add adds the given value to the Gauge. (The value can be negative, - // resulting in a decrease of the Gauge.) - Add(float64) - // Sub subtracts the given value from the Gauge. (The value can be - // negative, resulting in an increase of the Gauge.) - Sub(float64) - - // SetToCurrentTime sets the Gauge to the current Unix time in seconds. - SetToCurrentTime() -} - -// GaugeOpts is an alias for Opts. See there for doc comments. -type GaugeOpts Opts - -// GaugeVecOpts bundles the options to create a GaugeVec metric. -// It is mandatory to set GaugeOpts, see there for mandatory fields. VariableLabels -// is optional and can safely be left to its default value. -type GaugeVecOpts struct { - GaugeOpts - - // VariableLabels are used to partition the metric vector by the given set - // of labels. Each label value will be constrained with the optional Constraint - // function, if provided. - VariableLabels ConstrainableLabels -} - -// NewGauge creates a new Gauge based on the provided GaugeOpts. -// -// The returned implementation is optimized for a fast Set method. If you have a -// choice for managing the value of a Gauge via Set vs. Inc/Dec/Add/Sub, pick -// the former. For example, the Inc method of the returned Gauge is slower than -// the Inc method of a Counter returned by NewCounter. This matches the typical -// scenarios for Gauges and Counters, where the former tends to be Set-heavy and -// the latter Inc-heavy. -func NewGauge(opts GaugeOpts) Gauge { - desc := NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ) - result := &gauge{desc: desc, labelPairs: desc.constLabelPairs} - result.init(result) // Init self-collection. - return result -} - -type gauge struct { - // valBits contains the bits of the represented float64 value. It has - // to go first in the struct to guarantee alignment for atomic - // operations. http://golang.org/pkg/sync/atomic/#pkg-note-BUG - valBits uint64 - - selfCollector - - desc *Desc - labelPairs []*dto.LabelPair -} - -func (g *gauge) Desc() *Desc { - return g.desc -} - -func (g *gauge) Set(val float64) { - atomic.StoreUint64(&g.valBits, math.Float64bits(val)) -} - -func (g *gauge) SetToCurrentTime() { - g.Set(float64(time.Now().UnixNano()) / 1e9) -} - -func (g *gauge) Inc() { - g.Add(1) -} - -func (g *gauge) Dec() { - g.Add(-1) -} - -func (g *gauge) Add(val float64) { - for { - oldBits := atomic.LoadUint64(&g.valBits) - newBits := math.Float64bits(math.Float64frombits(oldBits) + val) - if atomic.CompareAndSwapUint64(&g.valBits, oldBits, newBits) { - return - } - } -} - -func (g *gauge) Sub(val float64) { - g.Add(val * -1) -} - -func (g *gauge) Write(out *dto.Metric) error { - val := math.Float64frombits(atomic.LoadUint64(&g.valBits)) - return populateMetric(GaugeValue, val, g.labelPairs, nil, out, nil) -} - -// GaugeVec is a Collector that bundles a set of Gauges that all share the same -// Desc, but have different values for their variable labels. This is used if -// you want to count the same thing partitioned by various dimensions -// (e.g. number of operations queued, partitioned by user and operation -// type). Create instances with NewGaugeVec. -type GaugeVec struct { - *MetricVec -} - -// NewGaugeVec creates a new GaugeVec based on the provided GaugeOpts and -// partitioned by the given label names. -func NewGaugeVec(opts GaugeOpts, labelNames []string) *GaugeVec { - return V2.NewGaugeVec(GaugeVecOpts{ - GaugeOpts: opts, - VariableLabels: UnconstrainedLabels(labelNames), - }) -} - -// NewGaugeVec creates a new GaugeVec based on the provided GaugeVecOpts. -func (v2) NewGaugeVec(opts GaugeVecOpts) *GaugeVec { - desc := V2.NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - opts.VariableLabels, - opts.ConstLabels, - ) - return &GaugeVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { - if len(lvs) != len(desc.variableLabels.names) { - panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels.names, lvs)) - } - result := &gauge{desc: desc, labelPairs: MakeLabelPairs(desc, lvs)} - result.init(result) // Init self-collection. - return result - }), - } -} - -// GetMetricWithLabelValues returns the Gauge for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Gauge is created. -// -// It is possible to call this method without using the returned Gauge to only -// create the new Gauge but leave it at its starting value 0. See also the -// SummaryVec example. -// -// Keeping the Gauge for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Gauge from the GaugeVec. In that case, the -// Gauge will still exist, but it will not be exported anymore, even if a -// Gauge with the same label values is created later. See also the CounterVec -// example. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -func (v *GaugeVec) GetMetricWithLabelValues(lvs ...string) (Gauge, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(Gauge), err - } - return nil, err -} - -// GetMetricWith returns the Gauge for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Gauge is created. Implications of -// creating a Gauge without using it and keeping the Gauge for later use are -// the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -func (v *GaugeVec) GetMetricWith(labels Labels) (Gauge, error) { - metric, err := v.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(Gauge), err - } - return nil, err -} - -// WithLabelValues works as GetMetricWithLabelValues, but panics where -// GetMetricWithLabelValues would have returned an error. Not returning an -// error allows shortcuts like -// -// myVec.WithLabelValues("404", "GET").Add(42) -func (v *GaugeVec) WithLabelValues(lvs ...string) Gauge { - g, err := v.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return g -} - -// With works as GetMetricWith, but panics where GetMetricWithLabels would have -// returned an error. Not returning an error allows shortcuts like -// -// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Add(42) -func (v *GaugeVec) With(labels Labels) Gauge { - g, err := v.GetMetricWith(labels) - if err != nil { - panic(err) - } - return g -} - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the GaugeVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -func (v *GaugeVec) CurryWith(labels Labels) (*GaugeVec, error) { - vec, err := v.MetricVec.CurryWith(labels) - if vec != nil { - return &GaugeVec{vec}, err - } - return nil, err -} - -// MustCurryWith works as CurryWith but panics where CurryWith would have -// returned an error. -func (v *GaugeVec) MustCurryWith(labels Labels) *GaugeVec { - vec, err := v.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} - -// GaugeFunc is a Gauge whose value is determined at collect time by calling a -// provided function. -// -// To create GaugeFunc instances, use NewGaugeFunc. -type GaugeFunc interface { - Metric - Collector -} - -// NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The -// value reported is determined by calling the given function from within the -// Write method. Take into account that metric collection may happen -// concurrently. Therefore, it must be safe to call the provided function -// concurrently. -// -// NewGaugeFunc is a good way to create an “info” style metric with a constant -// value of 1. Example: -// https://github.com/prometheus/common/blob/8558a5b7db3c84fa38b4766966059a7bd5bfa2ee/version/info.go#L36-L56 -func NewGaugeFunc(opts GaugeOpts, function func() float64) GaugeFunc { - return newValueFunc(NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ), GaugeValue, function) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/get_pid.go b/vendor/github.com/prometheus/client_golang/prometheus/get_pid.go deleted file mode 100644 index 614fd61be..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/get_pid.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2015 The Prometheus 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. - -//go:build !js || wasm -// +build !js wasm - -package prometheus - -import "os" - -func getPIDFn() func() (int, error) { - pid := os.Getpid() - return func() (int, error) { - return pid, nil - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go b/vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go deleted file mode 100644 index eaf8059ee..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/get_pid_gopherjs.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2015 The Prometheus 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. - -//go:build js && !wasm -// +build js,!wasm - -package prometheus - -func getPIDFn() func() (int, error) { - return func() (int, error) { - return 1, nil - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go deleted file mode 100644 index 520cbd7d4..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2018 The Prometheus 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 prometheus - -import ( - "runtime" - "runtime/debug" - "time" -) - -// goRuntimeMemStats provides the metrics initially provided by runtime.ReadMemStats. -// From Go 1.17 those similar (and better) statistics are provided by runtime/metrics, so -// while eval closure works on runtime.MemStats, the struct from Go 1.17+ is -// populated using runtime/metrics. Those are the defaults we can't alter. -func goRuntimeMemStats() memStatsMetrics { - return memStatsMetrics{ - { - desc: NewDesc( - memstatNamespace("alloc_bytes"), - "Number of bytes allocated in heap and currently in use. Equals to /memory/classes/heap/objects:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.Alloc) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("alloc_bytes_total"), - "Total number of bytes allocated in heap until now, even if released already. Equals to /gc/heap/allocs:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.TotalAlloc) }, - valType: CounterValue, - }, { - desc: NewDesc( - memstatNamespace("sys_bytes"), - "Number of bytes obtained from system. Equals to /memory/classes/total:byte.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.Sys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("mallocs_total"), - // TODO(bwplotka): We could add go_memstats_heap_objects, probably useful for discovery. Let's gather more feedback, kind of a waste of bytes for everybody for compatibility reasons to keep both, and we can't really rename/remove useful metric. - "Total number of heap objects allocated, both live and gc-ed. Semantically a counter version for go_memstats_heap_objects gauge. Equals to /gc/heap/allocs:objects + /gc/heap/tiny/allocs:objects.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.Mallocs) }, - valType: CounterValue, - }, { - desc: NewDesc( - memstatNamespace("frees_total"), - "Total number of heap objects frees. Equals to /gc/heap/frees:objects + /gc/heap/tiny/allocs:objects.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.Frees) }, - valType: CounterValue, - }, { - desc: NewDesc( - memstatNamespace("heap_alloc_bytes"), - "Number of heap bytes allocated and currently in use, same as go_memstats_alloc_bytes. Equals to /memory/classes/heap/objects:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapAlloc) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("heap_sys_bytes"), - "Number of heap bytes obtained from system. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes + /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("heap_idle_bytes"), - "Number of heap bytes waiting to be used. Equals to /memory/classes/heap/released:bytes + /memory/classes/heap/free:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapIdle) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("heap_inuse_bytes"), - "Number of heap bytes that are in use. Equals to /memory/classes/heap/objects:bytes + /memory/classes/heap/unused:bytes", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapInuse) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("heap_released_bytes"), - "Number of heap bytes released to OS. Equals to /memory/classes/heap/released:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapReleased) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("heap_objects"), - "Number of currently allocated objects. Equals to /gc/heap/objects:objects.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.HeapObjects) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("stack_inuse_bytes"), - "Number of bytes obtained from system for stack allocator in non-CGO environments. Equals to /memory/classes/heap/stacks:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackInuse) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("stack_sys_bytes"), - "Number of bytes obtained from system for stack allocator. Equals to /memory/classes/heap/stacks:bytes + /memory/classes/os-stacks:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.StackSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("mspan_inuse_bytes"), - "Number of bytes in use by mspan structures. Equals to /memory/classes/metadata/mspan/inuse:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanInuse) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("mspan_sys_bytes"), - "Number of bytes used for mspan structures obtained from system. Equals to /memory/classes/metadata/mspan/inuse:bytes + /memory/classes/metadata/mspan/free:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.MSpanSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("mcache_inuse_bytes"), - "Number of bytes in use by mcache structures. Equals to /memory/classes/metadata/mcache/inuse:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheInuse) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("mcache_sys_bytes"), - "Number of bytes used for mcache structures obtained from system. Equals to /memory/classes/metadata/mcache/inuse:bytes + /memory/classes/metadata/mcache/free:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.MCacheSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("buck_hash_sys_bytes"), - "Number of bytes used by the profiling bucket hash table. Equals to /memory/classes/profiling/buckets:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.BuckHashSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("gc_sys_bytes"), - "Number of bytes used for garbage collection system metadata. Equals to /memory/classes/metadata/other:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.GCSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("other_sys_bytes"), - "Number of bytes used for other system allocations. Equals to /memory/classes/other:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.OtherSys) }, - valType: GaugeValue, - }, { - desc: NewDesc( - memstatNamespace("next_gc_bytes"), - "Number of heap bytes when next garbage collection will take place. Equals to /gc/heap/goal:bytes.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return float64(ms.NextGC) }, - valType: GaugeValue, - }, - } -} - -type baseGoCollector struct { - goroutinesDesc *Desc - threadsDesc *Desc - gcDesc *Desc - gcLastTimeDesc *Desc - goInfoDesc *Desc -} - -func newBaseGoCollector() baseGoCollector { - return baseGoCollector{ - goroutinesDesc: NewDesc( - "go_goroutines", - "Number of goroutines that currently exist.", - nil, nil), - threadsDesc: NewDesc( - "go_threads", - "Number of OS threads created.", - nil, nil), - gcDesc: NewDesc( - "go_gc_duration_seconds", - "A summary of the wall-time pause (stop-the-world) duration in garbage collection cycles.", - nil, nil), - gcLastTimeDesc: NewDesc( - "go_memstats_last_gc_time_seconds", - "Number of seconds since 1970 of last garbage collection.", - nil, nil), - goInfoDesc: NewDesc( - "go_info", - "Information about the Go environment.", - nil, Labels{"version": runtime.Version()}), - } -} - -// Describe returns all descriptions of the collector. -func (c *baseGoCollector) Describe(ch chan<- *Desc) { - ch <- c.goroutinesDesc - ch <- c.threadsDesc - ch <- c.gcDesc - ch <- c.gcLastTimeDesc - ch <- c.goInfoDesc -} - -// Collect returns the current state of all metrics of the collector. -func (c *baseGoCollector) Collect(ch chan<- Metric) { - ch <- MustNewConstMetric(c.goroutinesDesc, GaugeValue, float64(runtime.NumGoroutine())) - - n := getRuntimeNumThreads() - ch <- MustNewConstMetric(c.threadsDesc, GaugeValue, n) - - var stats debug.GCStats - stats.PauseQuantiles = make([]time.Duration, 5) - debug.ReadGCStats(&stats) - - quantiles := make(map[float64]float64) - for idx, pq := range stats.PauseQuantiles[1:] { - quantiles[float64(idx+1)/float64(len(stats.PauseQuantiles)-1)] = pq.Seconds() - } - quantiles[0.0] = stats.PauseQuantiles[0].Seconds() - ch <- MustNewConstSummary(c.gcDesc, uint64(stats.NumGC), stats.PauseTotal.Seconds(), quantiles) - ch <- MustNewConstMetric(c.gcLastTimeDesc, GaugeValue, float64(stats.LastGC.UnixNano())/1e9) - ch <- MustNewConstMetric(c.goInfoDesc, GaugeValue, 1) -} - -func memstatNamespace(s string) string { - return "go_memstats_" + s -} - -// memStatsMetrics provide description, evaluator, runtime/metrics name, and -// value type for memstat metrics. -type memStatsMetrics []struct { - desc *Desc - eval func(*runtime.MemStats) float64 - valType ValueType -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_go116.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector_go116.go deleted file mode 100644 index 897a6e906..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_go116.go +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright 2021 The Prometheus 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. - -//go:build !go1.17 -// +build !go1.17 - -package prometheus - -import ( - "runtime" - "sync" - "time" -) - -type goCollector struct { - base baseGoCollector - - // ms... are memstats related. - msLast *runtime.MemStats // Previously collected memstats. - msLastTimestamp time.Time - msMtx sync.Mutex // Protects msLast and msLastTimestamp. - msMetrics memStatsMetrics - msRead func(*runtime.MemStats) // For mocking in tests. - msMaxWait time.Duration // Wait time for fresh memstats. - msMaxAge time.Duration // Maximum allowed age of old memstats. -} - -// NewGoCollector is the obsolete version of collectors.NewGoCollector. -// See there for documentation. -// -// Deprecated: Use collectors.NewGoCollector instead. -func NewGoCollector() Collector { - msMetrics := goRuntimeMemStats() - msMetrics = append(msMetrics, struct { - desc *Desc - eval func(*runtime.MemStats) float64 - valType ValueType - }{ - // This metric is omitted in Go1.17+, see https://github.com/prometheus/client_golang/issues/842#issuecomment-861812034 - desc: NewDesc( - memstatNamespace("gc_cpu_fraction"), - "The fraction of this program's available CPU time used by the GC since the program started.", - nil, nil, - ), - eval: func(ms *runtime.MemStats) float64 { return ms.GCCPUFraction }, - valType: GaugeValue, - }) - return &goCollector{ - base: newBaseGoCollector(), - msLast: &runtime.MemStats{}, - msRead: runtime.ReadMemStats, - msMaxWait: time.Second, - msMaxAge: 5 * time.Minute, - msMetrics: msMetrics, - } -} - -// Describe returns all descriptions of the collector. -func (c *goCollector) Describe(ch chan<- *Desc) { - c.base.Describe(ch) - for _, i := range c.msMetrics { - ch <- i.desc - } -} - -// Collect returns the current state of all metrics of the collector. -func (c *goCollector) Collect(ch chan<- Metric) { - var ( - ms = &runtime.MemStats{} - done = make(chan struct{}) - ) - // Start reading memstats first as it might take a while. - go func() { - c.msRead(ms) - c.msMtx.Lock() - c.msLast = ms - c.msLastTimestamp = time.Now() - c.msMtx.Unlock() - close(done) - }() - - // Collect base non-memory metrics. - c.base.Collect(ch) - - timer := time.NewTimer(c.msMaxWait) - select { - case <-done: // Our own ReadMemStats succeeded in time. Use it. - timer.Stop() // Important for high collection frequencies to not pile up timers. - c.msCollect(ch, ms) - return - case <-timer.C: // Time out, use last memstats if possible. Continue below. - } - c.msMtx.Lock() - if time.Since(c.msLastTimestamp) < c.msMaxAge { - // Last memstats are recent enough. Collect from them under the lock. - c.msCollect(ch, c.msLast) - c.msMtx.Unlock() - return - } - // If we are here, the last memstats are too old or don't exist. We have - // to wait until our own ReadMemStats finally completes. For that to - // happen, we have to release the lock. - c.msMtx.Unlock() - <-done - c.msCollect(ch, ms) -} - -func (c *goCollector) msCollect(ch chan<- Metric, ms *runtime.MemStats) { - for _, i := range c.msMetrics { - ch <- MustNewConstMetric(i.desc, i.valType, i.eval(ms)) - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go deleted file mode 100644 index 6b8684731..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector_latest.go +++ /dev/null @@ -1,574 +0,0 @@ -// Copyright 2021 The Prometheus 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. - -//go:build go1.17 -// +build go1.17 - -package prometheus - -import ( - "fmt" - "math" - "runtime" - "runtime/metrics" - "strings" - "sync" - - "github.com/prometheus/client_golang/prometheus/internal" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/proto" -) - -const ( - // constants for strings referenced more than once. - goGCHeapTinyAllocsObjects = "/gc/heap/tiny/allocs:objects" - goGCHeapAllocsObjects = "/gc/heap/allocs:objects" - goGCHeapFreesObjects = "/gc/heap/frees:objects" - goGCHeapFreesBytes = "/gc/heap/frees:bytes" - goGCHeapAllocsBytes = "/gc/heap/allocs:bytes" - goGCHeapObjects = "/gc/heap/objects:objects" - goGCHeapGoalBytes = "/gc/heap/goal:bytes" - goMemoryClassesTotalBytes = "/memory/classes/total:bytes" - goMemoryClassesHeapObjectsBytes = "/memory/classes/heap/objects:bytes" - goMemoryClassesHeapUnusedBytes = "/memory/classes/heap/unused:bytes" - goMemoryClassesHeapReleasedBytes = "/memory/classes/heap/released:bytes" - goMemoryClassesHeapFreeBytes = "/memory/classes/heap/free:bytes" - goMemoryClassesHeapStacksBytes = "/memory/classes/heap/stacks:bytes" - goMemoryClassesOSStacksBytes = "/memory/classes/os-stacks:bytes" - goMemoryClassesMetadataMSpanInuseBytes = "/memory/classes/metadata/mspan/inuse:bytes" - goMemoryClassesMetadataMSPanFreeBytes = "/memory/classes/metadata/mspan/free:bytes" - goMemoryClassesMetadataMCacheInuseBytes = "/memory/classes/metadata/mcache/inuse:bytes" - goMemoryClassesMetadataMCacheFreeBytes = "/memory/classes/metadata/mcache/free:bytes" - goMemoryClassesProfilingBucketsBytes = "/memory/classes/profiling/buckets:bytes" - goMemoryClassesMetadataOtherBytes = "/memory/classes/metadata/other:bytes" - goMemoryClassesOtherBytes = "/memory/classes/other:bytes" -) - -// rmNamesForMemStatsMetrics represents runtime/metrics names required to populate goRuntimeMemStats from like logic. -var rmNamesForMemStatsMetrics = []string{ - goGCHeapTinyAllocsObjects, - goGCHeapAllocsObjects, - goGCHeapFreesObjects, - goGCHeapAllocsBytes, - goGCHeapObjects, - goGCHeapGoalBytes, - goMemoryClassesTotalBytes, - goMemoryClassesHeapObjectsBytes, - goMemoryClassesHeapUnusedBytes, - goMemoryClassesHeapReleasedBytes, - goMemoryClassesHeapFreeBytes, - goMemoryClassesHeapStacksBytes, - goMemoryClassesOSStacksBytes, - goMemoryClassesMetadataMSpanInuseBytes, - goMemoryClassesMetadataMSPanFreeBytes, - goMemoryClassesMetadataMCacheInuseBytes, - goMemoryClassesMetadataMCacheFreeBytes, - goMemoryClassesProfilingBucketsBytes, - goMemoryClassesMetadataOtherBytes, - goMemoryClassesOtherBytes, -} - -func bestEffortLookupRM(lookup []string) []metrics.Description { - ret := make([]metrics.Description, 0, len(lookup)) - for _, rm := range metrics.All() { - for _, m := range lookup { - if m == rm.Name { - ret = append(ret, rm) - } - } - } - return ret -} - -type goCollector struct { - base baseGoCollector - - // mu protects updates to all fields ensuring a consistent - // snapshot is always produced by Collect. - mu sync.Mutex - - // Contains all samples that has to retrieved from runtime/metrics (not all of them will be exposed). - sampleBuf []metrics.Sample - // sampleMap allows lookup for MemStats metrics and runtime/metrics histograms for exact sums. - sampleMap map[string]*metrics.Sample - - // rmExposedMetrics represents all runtime/metrics package metrics - // that were configured to be exposed. - rmExposedMetrics []collectorMetric - rmExactSumMapForHist map[string]string - - // With Go 1.17, the runtime/metrics package was introduced. - // From that point on, metric names produced by the runtime/metrics - // package could be generated from runtime/metrics names. However, - // these differ from the old names for the same values. - // - // This field exists to export the same values under the old names - // as well. - msMetrics memStatsMetrics - msMetricsEnabled bool -} - -type rmMetricDesc struct { - metrics.Description -} - -func matchRuntimeMetricsRules(rules []internal.GoCollectorRule) []rmMetricDesc { - var descs []rmMetricDesc - for _, d := range metrics.All() { - var ( - deny = true - desc rmMetricDesc - ) - - for _, r := range rules { - if !r.Matcher.MatchString(d.Name) { - continue - } - deny = r.Deny - } - if deny { - continue - } - - desc.Description = d - descs = append(descs, desc) - } - return descs -} - -func defaultGoCollectorOptions() internal.GoCollectorOptions { - return internal.GoCollectorOptions{ - RuntimeMetricSumForHist: map[string]string{ - "/gc/heap/allocs-by-size:bytes": goGCHeapAllocsBytes, - "/gc/heap/frees-by-size:bytes": goGCHeapFreesBytes, - }, - RuntimeMetricRules: []internal.GoCollectorRule{ - // Recommended metrics we want by default from runtime/metrics. - {Matcher: internal.GoCollectorDefaultRuntimeMetrics}, - }, - } -} - -// NewGoCollector is the obsolete version of collectors.NewGoCollector. -// See there for documentation. -// -// Deprecated: Use collectors.NewGoCollector instead. -func NewGoCollector(opts ...func(o *internal.GoCollectorOptions)) Collector { - opt := defaultGoCollectorOptions() - for _, o := range opts { - o(&opt) - } - - exposedDescriptions := matchRuntimeMetricsRules(opt.RuntimeMetricRules) - - // Collect all histogram samples so that we can get their buckets. - // The API guarantees that the buckets are always fixed for the lifetime - // of the process. - var histograms []metrics.Sample - for _, d := range exposedDescriptions { - if d.Kind == metrics.KindFloat64Histogram { - histograms = append(histograms, metrics.Sample{Name: d.Name}) - } - } - - if len(histograms) > 0 { - metrics.Read(histograms) - } - - bucketsMap := make(map[string][]float64) - for i := range histograms { - bucketsMap[histograms[i].Name] = histograms[i].Value.Float64Histogram().Buckets - } - - // Generate a collector for each exposed runtime/metrics metric. - metricSet := make([]collectorMetric, 0, len(exposedDescriptions)) - // SampleBuf is used for reading from runtime/metrics. - // We are assuming the largest case to have stable pointers for sampleMap purposes. - sampleBuf := make([]metrics.Sample, 0, len(exposedDescriptions)+len(opt.RuntimeMetricSumForHist)+len(rmNamesForMemStatsMetrics)) - sampleMap := make(map[string]*metrics.Sample, len(exposedDescriptions)) - for _, d := range exposedDescriptions { - namespace, subsystem, name, ok := internal.RuntimeMetricsToProm(&d.Description) - if !ok { - // Just ignore this metric; we can't do anything with it here. - // If a user decides to use the latest version of Go, we don't want - // to fail here. This condition is tested in TestExpectedRuntimeMetrics. - continue - } - help := attachOriginalName(d.Description.Description, d.Name) - - sampleBuf = append(sampleBuf, metrics.Sample{Name: d.Name}) - sampleMap[d.Name] = &sampleBuf[len(sampleBuf)-1] - - var m collectorMetric - if d.Kind == metrics.KindFloat64Histogram { - _, hasSum := opt.RuntimeMetricSumForHist[d.Name] - unit := d.Name[strings.IndexRune(d.Name, ':')+1:] - m = newBatchHistogram( - NewDesc( - BuildFQName(namespace, subsystem, name), - help, - nil, - nil, - ), - internal.RuntimeMetricsBucketsForUnit(bucketsMap[d.Name], unit), - hasSum, - ) - } else if d.Cumulative { - m = NewCounter(CounterOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: name, - Help: help, - }, - ) - } else { - m = NewGauge(GaugeOpts{ - Namespace: namespace, - Subsystem: subsystem, - Name: name, - Help: help, - }) - } - metricSet = append(metricSet, m) - } - - // Add exact sum metrics to sampleBuf if not added before. - for _, h := range histograms { - sumMetric, ok := opt.RuntimeMetricSumForHist[h.Name] - if !ok { - continue - } - - if _, ok := sampleMap[sumMetric]; ok { - continue - } - sampleBuf = append(sampleBuf, metrics.Sample{Name: sumMetric}) - sampleMap[sumMetric] = &sampleBuf[len(sampleBuf)-1] - } - - var ( - msMetrics memStatsMetrics - msDescriptions []metrics.Description - ) - - if !opt.DisableMemStatsLikeMetrics { - msMetrics = goRuntimeMemStats() - msDescriptions = bestEffortLookupRM(rmNamesForMemStatsMetrics) - - // Check if metric was not exposed before and if not, add to sampleBuf. - for _, mdDesc := range msDescriptions { - if _, ok := sampleMap[mdDesc.Name]; ok { - continue - } - sampleBuf = append(sampleBuf, metrics.Sample{Name: mdDesc.Name}) - sampleMap[mdDesc.Name] = &sampleBuf[len(sampleBuf)-1] - } - } - - return &goCollector{ - base: newBaseGoCollector(), - sampleBuf: sampleBuf, - sampleMap: sampleMap, - rmExposedMetrics: metricSet, - rmExactSumMapForHist: opt.RuntimeMetricSumForHist, - msMetrics: msMetrics, - msMetricsEnabled: !opt.DisableMemStatsLikeMetrics, - } -} - -func attachOriginalName(desc, origName string) string { - return fmt.Sprintf("%s Sourced from %s.", desc, origName) -} - -// Describe returns all descriptions of the collector. -func (c *goCollector) Describe(ch chan<- *Desc) { - c.base.Describe(ch) - for _, i := range c.msMetrics { - ch <- i.desc - } - for _, m := range c.rmExposedMetrics { - ch <- m.Desc() - } -} - -// Collect returns the current state of all metrics of the collector. -func (c *goCollector) Collect(ch chan<- Metric) { - // Collect base non-memory metrics. - c.base.Collect(ch) - - if len(c.sampleBuf) == 0 { - return - } - - // Collect must be thread-safe, so prevent concurrent use of - // sampleBuf elements. Just read into sampleBuf but write all the data - // we get into our Metrics or MemStats. - // - // This lock also ensures that the Metrics we send out are all from - // the same updates, ensuring their mutual consistency insofar as - // is guaranteed by the runtime/metrics package. - // - // N.B. This locking is heavy-handed, but Collect is expected to be called - // relatively infrequently. Also the core operation here, metrics.Read, - // is fast (O(tens of microseconds)) so contention should certainly be - // low, though channel operations and any allocations may add to that. - c.mu.Lock() - defer c.mu.Unlock() - - // Populate runtime/metrics sample buffer. - metrics.Read(c.sampleBuf) - - // Collect all our runtime/metrics user chose to expose from sampleBuf (if any). - for i, metric := range c.rmExposedMetrics { - // We created samples for exposed metrics first in order, so indexes match. - sample := c.sampleBuf[i] - - // N.B. switch on concrete type because it's significantly more efficient - // than checking for the Counter and Gauge interface implementations. In - // this case, we control all the types here. - switch m := metric.(type) { - case *counter: - // Guard against decreases. This should never happen, but a failure - // to do so will result in a panic, which is a harsh consequence for - // a metrics collection bug. - v0, v1 := m.get(), unwrapScalarRMValue(sample.Value) - if v1 > v0 { - m.Add(unwrapScalarRMValue(sample.Value) - m.get()) - } - m.Collect(ch) - case *gauge: - m.Set(unwrapScalarRMValue(sample.Value)) - m.Collect(ch) - case *batchHistogram: - m.update(sample.Value.Float64Histogram(), c.exactSumFor(sample.Name)) - m.Collect(ch) - default: - panic("unexpected metric type") - } - } - - if c.msMetricsEnabled { - // ms is a dummy MemStats that we populate ourselves so that we can - // populate the old metrics from it if goMemStatsCollection is enabled. - var ms runtime.MemStats - memStatsFromRM(&ms, c.sampleMap) - for _, i := range c.msMetrics { - ch <- MustNewConstMetric(i.desc, i.valType, i.eval(&ms)) - } - } -} - -// unwrapScalarRMValue unwraps a runtime/metrics value that is assumed -// to be scalar and returns the equivalent float64 value. Panics if the -// value is not scalar. -func unwrapScalarRMValue(v metrics.Value) float64 { - switch v.Kind() { - case metrics.KindUint64: - return float64(v.Uint64()) - case metrics.KindFloat64: - return v.Float64() - case metrics.KindBad: - // Unsupported metric. - // - // This should never happen because we always populate our metric - // set from the runtime/metrics package. - panic("unexpected bad kind metric") - default: - // Unsupported metric kind. - // - // This should never happen because we check for this during initialization - // and flag and filter metrics whose kinds we don't understand. - panic(fmt.Sprintf("unexpected unsupported metric: %v", v.Kind())) - } -} - -// exactSumFor takes a runtime/metrics metric name (that is assumed to -// be of kind KindFloat64Histogram) and returns its exact sum and whether -// its exact sum exists. -// -// The runtime/metrics API for histograms doesn't currently expose exact -// sums, but some of the other metrics are in fact exact sums of histograms. -func (c *goCollector) exactSumFor(rmName string) float64 { - sumName, ok := c.rmExactSumMapForHist[rmName] - if !ok { - return 0 - } - s, ok := c.sampleMap[sumName] - if !ok { - return 0 - } - return unwrapScalarRMValue(s.Value) -} - -func memStatsFromRM(ms *runtime.MemStats, rm map[string]*metrics.Sample) { - lookupOrZero := func(name string) uint64 { - if s, ok := rm[name]; ok { - return s.Value.Uint64() - } - return 0 - } - - // Currently, MemStats adds tiny alloc count to both Mallocs AND Frees. - // The reason for this is because MemStats couldn't be extended at the time - // but there was a desire to have Mallocs at least be a little more representative, - // while having Mallocs - Frees still represent a live object count. - // Unfortunately, MemStats doesn't actually export a large allocation count, - // so it's impossible to pull this number out directly. - tinyAllocs := lookupOrZero(goGCHeapTinyAllocsObjects) - ms.Mallocs = lookupOrZero(goGCHeapAllocsObjects) + tinyAllocs - ms.Frees = lookupOrZero(goGCHeapFreesObjects) + tinyAllocs - - ms.TotalAlloc = lookupOrZero(goGCHeapAllocsBytes) - ms.Sys = lookupOrZero(goMemoryClassesTotalBytes) - ms.Lookups = 0 // Already always zero. - ms.HeapAlloc = lookupOrZero(goMemoryClassesHeapObjectsBytes) - ms.Alloc = ms.HeapAlloc - ms.HeapInuse = ms.HeapAlloc + lookupOrZero(goMemoryClassesHeapUnusedBytes) - ms.HeapReleased = lookupOrZero(goMemoryClassesHeapReleasedBytes) - ms.HeapIdle = ms.HeapReleased + lookupOrZero(goMemoryClassesHeapFreeBytes) - ms.HeapSys = ms.HeapInuse + ms.HeapIdle - ms.HeapObjects = lookupOrZero(goGCHeapObjects) - ms.StackInuse = lookupOrZero(goMemoryClassesHeapStacksBytes) - ms.StackSys = ms.StackInuse + lookupOrZero(goMemoryClassesOSStacksBytes) - ms.MSpanInuse = lookupOrZero(goMemoryClassesMetadataMSpanInuseBytes) - ms.MSpanSys = ms.MSpanInuse + lookupOrZero(goMemoryClassesMetadataMSPanFreeBytes) - ms.MCacheInuse = lookupOrZero(goMemoryClassesMetadataMCacheInuseBytes) - ms.MCacheSys = ms.MCacheInuse + lookupOrZero(goMemoryClassesMetadataMCacheFreeBytes) - ms.BuckHashSys = lookupOrZero(goMemoryClassesProfilingBucketsBytes) - ms.GCSys = lookupOrZero(goMemoryClassesMetadataOtherBytes) - ms.OtherSys = lookupOrZero(goMemoryClassesOtherBytes) - ms.NextGC = lookupOrZero(goGCHeapGoalBytes) - - // N.B. GCCPUFraction is intentionally omitted. This metric is not useful, - // and often misleading due to the fact that it's an average over the lifetime - // of the process. - // See https://github.com/prometheus/client_golang/issues/842#issuecomment-861812034 - // for more details. - ms.GCCPUFraction = 0 -} - -// batchHistogram is a mutable histogram that is updated -// in batches. -type batchHistogram struct { - selfCollector - - // Static fields updated only once. - desc *Desc - hasSum bool - - // Because this histogram operates in batches, it just uses a - // single mutex for everything. updates are always serialized - // but Write calls may operate concurrently with updates. - // Contention between these two sources should be rare. - mu sync.Mutex - buckets []float64 // Inclusive lower bounds, like runtime/metrics. - counts []uint64 - sum float64 // Used if hasSum is true. -} - -// newBatchHistogram creates a new batch histogram value with the given -// Desc, buckets, and whether or not it has an exact sum available. -// -// buckets must always be from the runtime/metrics package, following -// the same conventions. -func newBatchHistogram(desc *Desc, buckets []float64, hasSum bool) *batchHistogram { - // We need to remove -Inf values. runtime/metrics keeps them around. - // But -Inf bucket should not be allowed for prometheus histograms. - if buckets[0] == math.Inf(-1) { - buckets = buckets[1:] - } - h := &batchHistogram{ - desc: desc, - buckets: buckets, - // Because buckets follows runtime/metrics conventions, there's - // 1 more value in the buckets list than there are buckets represented, - // because in runtime/metrics, the bucket values represent *boundaries*, - // and non-Inf boundaries are inclusive lower bounds for that bucket. - counts: make([]uint64, len(buckets)-1), - hasSum: hasSum, - } - h.init(h) - return h -} - -// update updates the batchHistogram from a runtime/metrics histogram. -// -// sum must be provided if the batchHistogram was created to have an exact sum. -// h.buckets must be a strict subset of his.Buckets. -func (h *batchHistogram) update(his *metrics.Float64Histogram, sum float64) { - counts, buckets := his.Counts, his.Buckets - - h.mu.Lock() - defer h.mu.Unlock() - - // Clear buckets. - for i := range h.counts { - h.counts[i] = 0 - } - // Copy and reduce buckets. - var j int - for i, count := range counts { - h.counts[j] += count - if buckets[i+1] == h.buckets[j+1] { - j++ - } - } - if h.hasSum { - h.sum = sum - } -} - -func (h *batchHistogram) Desc() *Desc { - return h.desc -} - -func (h *batchHistogram) Write(out *dto.Metric) error { - h.mu.Lock() - defer h.mu.Unlock() - - sum := float64(0) - if h.hasSum { - sum = h.sum - } - dtoBuckets := make([]*dto.Bucket, 0, len(h.counts)) - totalCount := uint64(0) - for i, count := range h.counts { - totalCount += count - if !h.hasSum { - if count != 0 { - // N.B. This computed sum is an underestimate. - sum += h.buckets[i] * float64(count) - } - } - - // Skip the +Inf bucket, but only for the bucket list. - // It must still count for sum and totalCount. - if math.IsInf(h.buckets[i+1], 1) { - break - } - // Float64Histogram's upper bound is exclusive, so make it inclusive - // by obtaining the next float64 value down, in order. - upperBound := math.Nextafter(h.buckets[i+1], h.buckets[i]) - dtoBuckets = append(dtoBuckets, &dto.Bucket{ - CumulativeCount: proto.Uint64(totalCount), - UpperBound: proto.Float64(upperBound), - }) - } - out.Histogram = &dto.Histogram{ - Bucket: dtoBuckets, - SampleCount: proto.Uint64(totalCount), - SampleSum: proto.Float64(sum), - } - return nil -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go b/vendor/github.com/prometheus/client_golang/prometheus/histogram.go deleted file mode 100644 index c453b754a..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/histogram.go +++ /dev/null @@ -1,2056 +0,0 @@ -// Copyright 2015 The Prometheus 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 prometheus - -import ( - "errors" - "fmt" - "math" - "runtime" - "sort" - "sync" - "sync/atomic" - "time" - - dto "github.com/prometheus/client_model/go" - - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" -) - -const ( - nativeHistogramSchemaMaximum = 8 - nativeHistogramSchemaMinimum = -4 -) - -// nativeHistogramBounds for the frac of observed values. Only relevant for -// schema > 0. The position in the slice is the schema. (0 is never used, just -// here for convenience of using the schema directly as the index.) -// -// TODO(beorn7): Currently, we do a binary search into these slices. There are -// ways to turn it into a small number of simple array lookups. It probably only -// matters for schema 5 and beyond, but should be investigated. See this comment -// as a starting point: -// https://github.com/open-telemetry/opentelemetry-specification/issues/1776#issuecomment-870164310 -var nativeHistogramBounds = [][]float64{ - // Schema "0": - {0.5}, - // Schema 1: - {0.5, 0.7071067811865475}, - // Schema 2: - {0.5, 0.5946035575013605, 0.7071067811865475, 0.8408964152537144}, - // Schema 3: - { - 0.5, 0.5452538663326288, 0.5946035575013605, 0.6484197773255048, - 0.7071067811865475, 0.7711054127039704, 0.8408964152537144, 0.9170040432046711, - }, - // Schema 4: - { - 0.5, 0.5221368912137069, 0.5452538663326288, 0.5693943173783458, - 0.5946035575013605, 0.620928906036742, 0.6484197773255048, 0.6771277734684463, - 0.7071067811865475, 0.7384130729697496, 0.7711054127039704, 0.805245165974627, - 0.8408964152537144, 0.8781260801866495, 0.9170040432046711, 0.9576032806985735, - }, - // Schema 5: - { - 0.5, 0.5109485743270583, 0.5221368912137069, 0.5335702003384117, - 0.5452538663326288, 0.5571933712979462, 0.5693943173783458, 0.5818624293887887, - 0.5946035575013605, 0.6076236799902344, 0.620928906036742, 0.6345254785958666, - 0.6484197773255048, 0.6626183215798706, 0.6771277734684463, 0.6919549409819159, - 0.7071067811865475, 0.7225904034885232, 0.7384130729697496, 0.7545822137967112, - 0.7711054127039704, 0.7879904225539431, 0.805245165974627, 0.8228777390769823, - 0.8408964152537144, 0.8593096490612387, 0.8781260801866495, 0.8973545375015533, - 0.9170040432046711, 0.9370838170551498, 0.9576032806985735, 0.9785720620876999, - }, - // Schema 6: - { - 0.5, 0.5054446430258502, 0.5109485743270583, 0.5165124395106142, - 0.5221368912137069, 0.5278225891802786, 0.5335702003384117, 0.5393803988785598, - 0.5452538663326288, 0.5511912916539204, 0.5571933712979462, 0.5632608093041209, - 0.5693943173783458, 0.5755946149764913, 0.5818624293887887, 0.5881984958251406, - 0.5946035575013605, 0.6010783657263515, 0.6076236799902344, 0.6142402680534349, - 0.620928906036742, 0.6276903785123455, 0.6345254785958666, 0.6414350080393891, - 0.6484197773255048, 0.6554806057623822, 0.6626183215798706, 0.6698337620266515, - 0.6771277734684463, 0.6845012114872953, 0.6919549409819159, 0.6994898362691555, - 0.7071067811865475, 0.7148066691959849, 0.7225904034885232, 0.7304588970903234, - 0.7384130729697496, 0.7464538641456323, 0.7545822137967112, 0.762799075372269, - 0.7711054127039704, 0.7795022001189185, 0.7879904225539431, 0.7965710756711334, - 0.805245165974627, 0.8140137109286738, 0.8228777390769823, 0.8318382901633681, - 0.8408964152537144, 0.8500531768592616, 0.8593096490612387, 0.8686669176368529, - 0.8781260801866495, 0.8876882462632604, 0.8973545375015533, 0.9071260877501991, - 0.9170040432046711, 0.9269895625416926, 0.9370838170551498, 0.9472879907934827, - 0.9576032806985735, 0.9680308967461471, 0.9785720620876999, 0.9892280131939752, - }, - // Schema 7: - { - 0.5, 0.5027149505564014, 0.5054446430258502, 0.5081891574554764, - 0.5109485743270583, 0.5137229745593818, 0.5165124395106142, 0.5193170509806894, - 0.5221368912137069, 0.5249720429003435, 0.5278225891802786, 0.5306886136446309, - 0.5335702003384117, 0.5364674337629877, 0.5393803988785598, 0.5423091811066545, - 0.5452538663326288, 0.5482145409081883, 0.5511912916539204, 0.5541842058618393, - 0.5571933712979462, 0.5602188762048033, 0.5632608093041209, 0.5663192597993595, - 0.5693943173783458, 0.572486072215902, 0.5755946149764913, 0.5787200368168754, - 0.5818624293887887, 0.585021884841625, 0.5881984958251406, 0.5913923554921704, - 0.5946035575013605, 0.5978321960199137, 0.6010783657263515, 0.6043421618132907, - 0.6076236799902344, 0.6109230164863786, 0.6142402680534349, 0.6175755319684665, - 0.620928906036742, 0.6243004885946023, 0.6276903785123455, 0.6310986751971253, - 0.6345254785958666, 0.637970889198196, 0.6414350080393891, 0.6449179367033329, - 0.6484197773255048, 0.6519406325959679, 0.6554806057623822, 0.659039800633032, - 0.6626183215798706, 0.6662162735415805, 0.6698337620266515, 0.6734708931164728, - 0.6771277734684463, 0.6808045103191123, 0.6845012114872953, 0.688217985377265, - 0.6919549409819159, 0.6957121878859629, 0.6994898362691555, 0.7032879969095076, - 0.7071067811865475, 0.7109463010845827, 0.7148066691959849, 0.718687998724491, - 0.7225904034885232, 0.7265139979245261, 0.7304588970903234, 0.7344252166684908, - 0.7384130729697496, 0.7424225829363761, 0.7464538641456323, 0.7505070348132126, - 0.7545822137967112, 0.7586795205991071, 0.762799075372269, 0.7669409989204777, - 0.7711054127039704, 0.7752924388424999, 0.7795022001189185, 0.7837348199827764, - 0.7879904225539431, 0.7922691326262467, 0.7965710756711334, 0.8008963778413465, - 0.805245165974627, 0.8096175675974316, 0.8140137109286738, 0.8184337248834821, - 0.8228777390769823, 0.8273458838280969, 0.8318382901633681, 0.8363550898207981, - 0.8408964152537144, 0.8454623996346523, 0.8500531768592616, 0.8546688815502312, - 0.8593096490612387, 0.8639756154809185, 0.8686669176368529, 0.8733836930995842, - 0.8781260801866495, 0.8828942179666361, 0.8876882462632604, 0.8925083056594671, - 0.8973545375015533, 0.9022270839033115, 0.9071260877501991, 0.9120516927035263, - 0.9170040432046711, 0.9219832844793128, 0.9269895625416926, 0.9320230241988943, - 0.9370838170551498, 0.9421720895161669, 0.9472879907934827, 0.9524316709088368, - 0.9576032806985735, 0.9628029718180622, 0.9680308967461471, 0.9732872087896164, - 0.9785720620876999, 0.9838856116165875, 0.9892280131939752, 0.9945994234836328, - }, - // Schema 8: - { - 0.5, 0.5013556375251013, 0.5027149505564014, 0.5040779490592088, - 0.5054446430258502, 0.5068150424757447, 0.5081891574554764, 0.509566998038869, - 0.5109485743270583, 0.5123338964485679, 0.5137229745593818, 0.5151158188430205, - 0.5165124395106142, 0.5179128468009786, 0.5193170509806894, 0.520725062344158, - 0.5221368912137069, 0.5235525479396449, 0.5249720429003435, 0.526395386502313, - 0.5278225891802786, 0.5292536613972564, 0.5306886136446309, 0.5321274564422321, - 0.5335702003384117, 0.5350168559101208, 0.5364674337629877, 0.5379219445313954, - 0.5393803988785598, 0.5408428074966075, 0.5423091811066545, 0.5437795304588847, - 0.5452538663326288, 0.5467321995364429, 0.5482145409081883, 0.549700901315111, - 0.5511912916539204, 0.5526857228508706, 0.5541842058618393, 0.5556867516724088, - 0.5571933712979462, 0.5587040757836845, 0.5602188762048033, 0.5617377836665098, - 0.5632608093041209, 0.564787964283144, 0.5663192597993595, 0.5678547070789026, - 0.5693943173783458, 0.5709381019847808, 0.572486072215902, 0.5740382394200894, - 0.5755946149764913, 0.5771552102951081, 0.5787200368168754, 0.5802891060137493, - 0.5818624293887887, 0.5834400184762408, 0.585021884841625, 0.5866080400818185, - 0.5881984958251406, 0.5897932637314379, 0.5913923554921704, 0.5929957828304968, - 0.5946035575013605, 0.5962156912915756, 0.5978321960199137, 0.5994530835371903, - 0.6010783657263515, 0.6027080545025619, 0.6043421618132907, 0.6059806996384005, - 0.6076236799902344, 0.6092711149137041, 0.6109230164863786, 0.6125793968185725, - 0.6142402680534349, 0.6159056423670379, 0.6175755319684665, 0.6192499490999082, - 0.620928906036742, 0.622612415087629, 0.6243004885946023, 0.6259931389331581, - 0.6276903785123455, 0.6293922197748583, 0.6310986751971253, 0.6328097572894031, - 0.6345254785958666, 0.6362458516947014, 0.637970889198196, 0.6397006037528346, - 0.6414350080393891, 0.6431741147730128, 0.6449179367033329, 0.6466664866145447, - 0.6484197773255048, 0.6501778216898253, 0.6519406325959679, 0.6537082229673385, - 0.6554806057623822, 0.6572577939746774, 0.659039800633032, 0.6608266388015788, - 0.6626183215798706, 0.6644148621029772, 0.6662162735415805, 0.6680225691020727, - 0.6698337620266515, 0.6716498655934177, 0.6734708931164728, 0.6752968579460171, - 0.6771277734684463, 0.6789636531064505, 0.6808045103191123, 0.6826503586020058, - 0.6845012114872953, 0.6863570825438342, 0.688217985377265, 0.690083933630119, - 0.6919549409819159, 0.6938310211492645, 0.6957121878859629, 0.6975984549830999, - 0.6994898362691555, 0.7013863456101023, 0.7032879969095076, 0.7051948041086352, - 0.7071067811865475, 0.7090239421602076, 0.7109463010845827, 0.7128738720527471, - 0.7148066691959849, 0.7167447066838943, 0.718687998724491, 0.7206365595643126, - 0.7225904034885232, 0.7245495448210174, 0.7265139979245261, 0.7284837772007218, - 0.7304588970903234, 0.7324393720732029, 0.7344252166684908, 0.7364164454346837, - 0.7384130729697496, 0.7404151139112358, 0.7424225829363761, 0.7444354947621984, - 0.7464538641456323, 0.7484777058836176, 0.7505070348132126, 0.7525418658117031, - 0.7545822137967112, 0.7566280937263048, 0.7586795205991071, 0.7607365094544071, - 0.762799075372269, 0.7648672334736434, 0.7669409989204777, 0.7690203869158282, - 0.7711054127039704, 0.7731960915705107, 0.7752924388424999, 0.7773944698885442, - 0.7795022001189185, 0.7816156449856788, 0.7837348199827764, 0.7858597406461707, - 0.7879904225539431, 0.7901268813264122, 0.7922691326262467, 0.7944171921585818, - 0.7965710756711334, 0.7987307989543135, 0.8008963778413465, 0.8030678282083853, - 0.805245165974627, 0.8074284071024302, 0.8096175675974316, 0.8118126635086642, - 0.8140137109286738, 0.8162207259936375, 0.8184337248834821, 0.820652723822003, - 0.8228777390769823, 0.8251087869603088, 0.8273458838280969, 0.8295890460808079, - 0.8318382901633681, 0.8340936325652911, 0.8363550898207981, 0.8386226785089391, - 0.8408964152537144, 0.8431763167241966, 0.8454623996346523, 0.8477546807446661, - 0.8500531768592616, 0.8523579048290255, 0.8546688815502312, 0.8569861239649629, - 0.8593096490612387, 0.8616394738731368, 0.8639756154809185, 0.8663180910111553, - 0.8686669176368529, 0.871022112577578, 0.8733836930995842, 0.8757516765159389, - 0.8781260801866495, 0.8805069215187917, 0.8828942179666361, 0.8852879870317771, - 0.8876882462632604, 0.890095013257712, 0.8925083056594671, 0.8949281411607002, - 0.8973545375015533, 0.8997875124702672, 0.9022270839033115, 0.9046732696855155, - 0.9071260877501991, 0.909585556079304, 0.9120516927035263, 0.9145245157024483, - 0.9170040432046711, 0.9194902933879467, 0.9219832844793128, 0.9244830347552253, - 0.9269895625416926, 0.92950288621441, 0.9320230241988943, 0.9345499949706191, - 0.9370838170551498, 0.93962450902828, 0.9421720895161669, 0.9447265771954693, - 0.9472879907934827, 0.9498563490882775, 0.9524316709088368, 0.9550139751351947, - 0.9576032806985735, 0.9601996065815236, 0.9628029718180622, 0.9654133954938133, - 0.9680308967461471, 0.9706554947643201, 0.9732872087896164, 0.9759260581154889, - 0.9785720620876999, 0.9812252401044634, 0.9838856116165875, 0.9865531961276168, - 0.9892280131939752, 0.9919100824251095, 0.9945994234836328, 0.9972960560854698, - }, -} - -// The nativeHistogramBounds above can be generated with the code below. -// -// TODO(beorn7): It's tempting to actually use `go generate` to generate the -// code above. However, this could lead to slightly different numbers on -// different architectures. We still need to come to terms if we are fine with -// that, or if we might prefer to specify precise numbers in the standard. -// -// var nativeHistogramBounds [][]float64 = make([][]float64, 9) -// -// func init() { -// // Populate nativeHistogramBounds. -// numBuckets := 1 -// for i := range nativeHistogramBounds { -// bounds := []float64{0.5} -// factor := math.Exp2(math.Exp2(float64(-i))) -// for j := 0; j < numBuckets-1; j++ { -// var bound float64 -// if (j+1)%2 == 0 { -// // Use previously calculated value for increased precision. -// bound = nativeHistogramBounds[i-1][j/2+1] -// } else { -// bound = bounds[j] * factor -// } -// bounds = append(bounds, bound) -// } -// numBuckets *= 2 -// nativeHistogramBounds[i] = bounds -// } -// } - -// A Histogram counts individual observations from an event or sample stream in -// configurable static buckets (or in dynamic sparse buckets as part of the -// experimental Native Histograms, see below for more details). Similar to a -// Summary, it also provides a sum of observations and an observation count. -// -// On the Prometheus server, quantiles can be calculated from a Histogram using -// the histogram_quantile PromQL function. -// -// Note that Histograms, in contrast to Summaries, can be aggregated in PromQL -// (see the documentation for detailed procedures). However, Histograms require -// the user to pre-define suitable buckets, and they are in general less -// accurate. (Both problems are addressed by the experimental Native -// Histograms. To use them, configure a NativeHistogramBucketFactor in the -// HistogramOpts. They also require a Prometheus server v2.40+ with the -// corresponding feature flag enabled.) -// -// The Observe method of a Histogram has a very low performance overhead in -// comparison with the Observe method of a Summary. -// -// To create Histogram instances, use NewHistogram. -type Histogram interface { - Metric - Collector - - // Observe adds a single observation to the histogram. Observations are - // usually positive or zero. Negative observations are accepted but - // prevent current versions of Prometheus from properly detecting - // counter resets in the sum of observations. (The experimental Native - // Histograms handle negative observations properly.) See - // https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations - // for details. - Observe(float64) -} - -// bucketLabel is used for the label that defines the upper bound of a -// bucket of a histogram ("le" -> "less or equal"). -const bucketLabel = "le" - -// DefBuckets are the default Histogram buckets. The default buckets are -// tailored to broadly measure the response time (in seconds) of a network -// service. Most likely, however, you will be required to define buckets -// customized to your use case. -var DefBuckets = []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10} - -// DefNativeHistogramZeroThreshold is the default value for -// NativeHistogramZeroThreshold in the HistogramOpts. -// -// The value is 2^-128 (or 0.5*2^-127 in the actual IEEE 754 representation), -// which is a bucket boundary at all possible resolutions. -const DefNativeHistogramZeroThreshold = 2.938735877055719e-39 - -// NativeHistogramZeroThresholdZero can be used as NativeHistogramZeroThreshold -// in the HistogramOpts to create a zero bucket of width zero, i.e. a zero -// bucket that only receives observations of precisely zero. -const NativeHistogramZeroThresholdZero = -1 - -var errBucketLabelNotAllowed = fmt.Errorf( - "%q is not allowed as label name in histograms", bucketLabel, -) - -// LinearBuckets creates 'count' regular buckets, each 'width' wide, where the -// lowest bucket has an upper bound of 'start'. The final +Inf bucket is not -// counted and not included in the returned slice. The returned slice is meant -// to be used for the Buckets field of HistogramOpts. -// -// The function panics if 'count' is zero or negative. -func LinearBuckets(start, width float64, count int) []float64 { - if count < 1 { - panic("LinearBuckets needs a positive count") - } - buckets := make([]float64, count) - for i := range buckets { - buckets[i] = start - start += width - } - return buckets -} - -// ExponentialBuckets creates 'count' regular buckets, where the lowest bucket -// has an upper bound of 'start' and each following bucket's upper bound is -// 'factor' times the previous bucket's upper bound. The final +Inf bucket is -// not counted and not included in the returned slice. The returned slice is -// meant to be used for the Buckets field of HistogramOpts. -// -// The function panics if 'count' is 0 or negative, if 'start' is 0 or negative, -// or if 'factor' is less than or equal 1. -func ExponentialBuckets(start, factor float64, count int) []float64 { - if count < 1 { - panic("ExponentialBuckets needs a positive count") - } - if start <= 0 { - panic("ExponentialBuckets needs a positive start value") - } - if factor <= 1 { - panic("ExponentialBuckets needs a factor greater than 1") - } - buckets := make([]float64, count) - for i := range buckets { - buckets[i] = start - start *= factor - } - return buckets -} - -// ExponentialBucketsRange creates 'count' buckets, where the lowest bucket is -// 'min' and the highest bucket is 'max'. The final +Inf bucket is not counted -// and not included in the returned slice. The returned slice is meant to be -// used for the Buckets field of HistogramOpts. -// -// The function panics if 'count' is 0 or negative, if 'min' is 0 or negative. -func ExponentialBucketsRange(minBucket, maxBucket float64, count int) []float64 { - if count < 1 { - panic("ExponentialBucketsRange count needs a positive count") - } - if minBucket <= 0 { - panic("ExponentialBucketsRange min needs to be greater than 0") - } - - // Formula for exponential buckets. - // max = min*growthFactor^(bucketCount-1) - - // We know max/min and highest bucket. Solve for growthFactor. - growthFactor := math.Pow(maxBucket/minBucket, 1.0/float64(count-1)) - - // Now that we know growthFactor, solve for each bucket. - buckets := make([]float64, count) - for i := 1; i <= count; i++ { - buckets[i-1] = minBucket * math.Pow(growthFactor, float64(i-1)) - } - return buckets -} - -// HistogramOpts bundles the options for creating a Histogram metric. It is -// mandatory to set Name to a non-empty string. All other fields are optional -// and can safely be left at their zero value, although it is strongly -// encouraged to set a Help string. -type HistogramOpts struct { - // Namespace, Subsystem, and Name are components of the fully-qualified - // name of the Histogram (created by joining these components with - // "_"). Only Name is mandatory, the others merely help structuring the - // name. Note that the fully-qualified name of the Histogram must be a - // valid Prometheus metric name. - Namespace string - Subsystem string - Name string - - // Help provides information about this Histogram. - // - // Metrics with the same fully-qualified name must have the same Help - // string. - Help string - - // ConstLabels are used to attach fixed labels to this metric. Metrics - // with the same fully-qualified name must have the same label names in - // their ConstLabels. - // - // ConstLabels are only used rarely. In particular, do not use them to - // attach the same labels to all your metrics. Those use cases are - // better covered by target labels set by the scraping Prometheus - // server, or by one specific metric (e.g. a build_info or a - // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels - ConstLabels Labels - - // Buckets defines the buckets into which observations are counted. Each - // element in the slice is the upper inclusive bound of a bucket. The - // values must be sorted in strictly increasing order. There is no need - // to add a highest bucket with +Inf bound, it will be added - // implicitly. If Buckets is left as nil or set to a slice of length - // zero, it is replaced by default buckets. The default buckets are - // DefBuckets if no buckets for a native histogram (see below) are used, - // otherwise the default is no buckets. (In other words, if you want to - // use both regular buckets and buckets for a native histogram, you have - // to define the regular buckets here explicitly.) - Buckets []float64 - - // If NativeHistogramBucketFactor is greater than one, so-called sparse - // buckets are used (in addition to the regular buckets, if defined - // above). A Histogram with sparse buckets will be ingested as a Native - // Histogram by a Prometheus server with that feature enabled (requires - // Prometheus v2.40+). Sparse buckets are exponential buckets covering - // the whole float64 range (with the exception of the “zero” bucket, see - // NativeHistogramZeroThreshold below). From any one bucket to the next, - // the width of the bucket grows by a constant - // factor. NativeHistogramBucketFactor provides an upper bound for this - // factor (exception see below). The smaller - // NativeHistogramBucketFactor, the more buckets will be used and thus - // the more costly the histogram will become. A generally good trade-off - // between cost and accuracy is a value of 1.1 (each bucket is at most - // 10% wider than the previous one), which will result in each power of - // two divided into 8 buckets (e.g. there will be 8 buckets between 1 - // and 2, same as between 2 and 4, and 4 and 8, etc.). - // - // Details about the actually used factor: The factor is calculated as - // 2^(2^-n), where n is an integer number between (and including) -4 and - // 8. n is chosen so that the resulting factor is the largest that is - // still smaller or equal to NativeHistogramBucketFactor. Note that the - // smallest possible factor is therefore approx. 1.00271 (i.e. 2^(2^-8) - // ). If NativeHistogramBucketFactor is greater than 1 but smaller than - // 2^(2^-8), then the actually used factor is still 2^(2^-8) even though - // it is larger than the provided NativeHistogramBucketFactor. - // - // NOTE: Native Histograms are still an experimental feature. Their - // behavior might still change without a major version - // bump. Subsequently, all NativeHistogram... options here might still - // change their behavior or name (or might completely disappear) without - // a major version bump. - NativeHistogramBucketFactor float64 - // All observations with an absolute value of less or equal - // NativeHistogramZeroThreshold are accumulated into a “zero” bucket. - // For best results, this should be close to a bucket boundary. This is - // usually the case if picking a power of two. If - // NativeHistogramZeroThreshold is left at zero, - // DefNativeHistogramZeroThreshold is used as the threshold. To - // configure a zero bucket with an actual threshold of zero (i.e. only - // observations of precisely zero will go into the zero bucket), set - // NativeHistogramZeroThreshold to the NativeHistogramZeroThresholdZero - // constant (or any negative float value). - NativeHistogramZeroThreshold float64 - - // The next three fields define a strategy to limit the number of - // populated sparse buckets. If NativeHistogramMaxBucketNumber is left - // at zero, the number of buckets is not limited. (Note that this might - // lead to unbounded memory consumption if the values observed by the - // Histogram are sufficiently wide-spread. In particular, this could be - // used as a DoS attack vector. Where the observed values depend on - // external inputs, it is highly recommended to set a - // NativeHistogramMaxBucketNumber.) Once the set - // NativeHistogramMaxBucketNumber is exceeded, the following strategy is - // enacted: - // - First, if the last reset (or the creation) of the histogram is at - // least NativeHistogramMinResetDuration ago, then the whole - // histogram is reset to its initial state (including regular - // buckets). - // - If less time has passed, or if NativeHistogramMinResetDuration is - // zero, no reset is performed. Instead, the zero threshold is - // increased sufficiently to reduce the number of buckets to or below - // NativeHistogramMaxBucketNumber, but not to more than - // NativeHistogramMaxZeroThreshold. Thus, if - // NativeHistogramMaxZeroThreshold is already at or below the current - // zero threshold, nothing happens at this step. - // - After that, if the number of buckets still exceeds - // NativeHistogramMaxBucketNumber, the resolution of the histogram is - // reduced by doubling the width of the sparse buckets (up to a - // growth factor between one bucket to the next of 2^(2^4) = 65536, - // see above). - // - Any increased zero threshold or reduced resolution is reset back - // to their original values once NativeHistogramMinResetDuration has - // passed (since the last reset or the creation of the histogram). - NativeHistogramMaxBucketNumber uint32 - NativeHistogramMinResetDuration time.Duration - NativeHistogramMaxZeroThreshold float64 - - // NativeHistogramMaxExemplars limits the number of exemplars - // that are kept in memory for each native histogram. If you leave it at - // zero, a default value of 10 is used. If no exemplars should be kept specifically - // for native histograms, set it to a negative value. (Scrapers can - // still use the exemplars exposed for classic buckets, which are managed - // independently.) - NativeHistogramMaxExemplars int - // NativeHistogramExemplarTTL is only checked once - // NativeHistogramMaxExemplars is exceeded. In that case, the - // oldest exemplar is removed if it is older than NativeHistogramExemplarTTL. - // Otherwise, the older exemplar in the pair of exemplars that are closest - // together (on an exponential scale) is removed. - // If NativeHistogramExemplarTTL is left at its zero value, a default value of - // 5m is used. To always delete the oldest exemplar, set it to a negative value. - NativeHistogramExemplarTTL time.Duration - - // now is for testing purposes, by default it's time.Now. - now func() time.Time - - // afterFunc is for testing purposes, by default it's time.AfterFunc. - afterFunc func(time.Duration, func()) *time.Timer -} - -// HistogramVecOpts bundles the options to create a HistogramVec metric. -// It is mandatory to set HistogramOpts, see there for mandatory fields. VariableLabels -// is optional and can safely be left to its default value. -type HistogramVecOpts struct { - HistogramOpts - - // VariableLabels are used to partition the metric vector by the given set - // of labels. Each label value will be constrained with the optional Constraint - // function, if provided. - VariableLabels ConstrainableLabels -} - -// NewHistogram creates a new Histogram based on the provided HistogramOpts. It -// panics if the buckets in HistogramOpts are not in strictly increasing order. -// -// The returned implementation also implements ExemplarObserver. It is safe to -// perform the corresponding type assertion. Exemplars are tracked separately -// for each bucket. -func NewHistogram(opts HistogramOpts) Histogram { - return newHistogram( - NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ), - opts, - ) -} - -func newHistogram(desc *Desc, opts HistogramOpts, labelValues ...string) Histogram { - if len(desc.variableLabels.names) != len(labelValues) { - panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels.names, labelValues)) - } - - for _, n := range desc.variableLabels.names { - if n == bucketLabel { - panic(errBucketLabelNotAllowed) - } - } - for _, lp := range desc.constLabelPairs { - if lp.GetName() == bucketLabel { - panic(errBucketLabelNotAllowed) - } - } - - if opts.now == nil { - opts.now = time.Now - } - if opts.afterFunc == nil { - opts.afterFunc = time.AfterFunc - } - - h := &histogram{ - desc: desc, - upperBounds: opts.Buckets, - labelPairs: MakeLabelPairs(desc, labelValues), - nativeHistogramMaxBuckets: opts.NativeHistogramMaxBucketNumber, - nativeHistogramMaxZeroThreshold: opts.NativeHistogramMaxZeroThreshold, - nativeHistogramMinResetDuration: opts.NativeHistogramMinResetDuration, - lastResetTime: opts.now(), - now: opts.now, - afterFunc: opts.afterFunc, - } - if len(h.upperBounds) == 0 && opts.NativeHistogramBucketFactor <= 1 { - h.upperBounds = DefBuckets - } - if opts.NativeHistogramBucketFactor <= 1 { - h.nativeHistogramSchema = math.MinInt32 // To mark that there are no sparse buckets. - } else { - switch { - case opts.NativeHistogramZeroThreshold > 0: - h.nativeHistogramZeroThreshold = opts.NativeHistogramZeroThreshold - case opts.NativeHistogramZeroThreshold == 0: - h.nativeHistogramZeroThreshold = DefNativeHistogramZeroThreshold - } // Leave h.nativeHistogramZeroThreshold at 0 otherwise. - h.nativeHistogramSchema = pickSchema(opts.NativeHistogramBucketFactor) - h.nativeExemplars = makeNativeExemplars(opts.NativeHistogramExemplarTTL, opts.NativeHistogramMaxExemplars) - } - for i, upperBound := range h.upperBounds { - if i < len(h.upperBounds)-1 { - if upperBound >= h.upperBounds[i+1] { - panic(fmt.Errorf( - "histogram buckets must be in increasing order: %f >= %f", - upperBound, h.upperBounds[i+1], - )) - } - } else { - if math.IsInf(upperBound, +1) { - // The +Inf bucket is implicit. Remove it here. - h.upperBounds = h.upperBounds[:i] - } - } - } - // Finally we know the final length of h.upperBounds and can make buckets - // for both counts as well as exemplars: - h.counts[0] = &histogramCounts{buckets: make([]uint64, len(h.upperBounds))} - atomic.StoreUint64(&h.counts[0].nativeHistogramZeroThresholdBits, math.Float64bits(h.nativeHistogramZeroThreshold)) - atomic.StoreInt32(&h.counts[0].nativeHistogramSchema, h.nativeHistogramSchema) - h.counts[1] = &histogramCounts{buckets: make([]uint64, len(h.upperBounds))} - atomic.StoreUint64(&h.counts[1].nativeHistogramZeroThresholdBits, math.Float64bits(h.nativeHistogramZeroThreshold)) - atomic.StoreInt32(&h.counts[1].nativeHistogramSchema, h.nativeHistogramSchema) - h.exemplars = make([]atomic.Value, len(h.upperBounds)+1) - - h.init(h) // Init self-collection. - return h -} - -type histogramCounts struct { - // Order in this struct matters for the alignment required by atomic - // operations, see http://golang.org/pkg/sync/atomic/#pkg-note-BUG - - // sumBits contains the bits of the float64 representing the sum of all - // observations. - sumBits uint64 - count uint64 - - // nativeHistogramZeroBucket counts all (positive and negative) - // observations in the zero bucket (with an absolute value less or equal - // the current threshold, see next field. - nativeHistogramZeroBucket uint64 - // nativeHistogramZeroThresholdBits is the bit pattern of the current - // threshold for the zero bucket. It's initially equal to - // nativeHistogramZeroThreshold but may change according to the bucket - // count limitation strategy. - nativeHistogramZeroThresholdBits uint64 - // nativeHistogramSchema may change over time according to the bucket - // count limitation strategy and therefore has to be saved here. - nativeHistogramSchema int32 - // Number of (positive and negative) sparse buckets. - nativeHistogramBucketsNumber uint32 - - // Regular buckets. - buckets []uint64 - - // The sparse buckets for native histograms are implemented with a - // sync.Map for now. A dedicated data structure will likely be more - // efficient. There are separate maps for negative and positive - // observations. The map's value is an *int64, counting observations in - // that bucket. (Note that we don't use uint64 as an int64 won't - // overflow in practice, and working with signed numbers from the - // beginning simplifies the handling of deltas.) The map's key is the - // index of the bucket according to the used - // nativeHistogramSchema. Index 0 is for an upper bound of 1. - nativeHistogramBucketsPositive, nativeHistogramBucketsNegative sync.Map -} - -// observe manages the parts of observe that only affects -// histogramCounts. doSparse is true if sparse buckets should be done, -// too. -func (hc *histogramCounts) observe(v float64, bucket int, doSparse bool) { - if bucket < len(hc.buckets) { - atomic.AddUint64(&hc.buckets[bucket], 1) - } - atomicAddFloat(&hc.sumBits, v) - if doSparse && !math.IsNaN(v) { - var ( - key int - schema = atomic.LoadInt32(&hc.nativeHistogramSchema) - zeroThreshold = math.Float64frombits(atomic.LoadUint64(&hc.nativeHistogramZeroThresholdBits)) - bucketCreated, isInf bool - ) - if math.IsInf(v, 0) { - // Pretend v is MaxFloat64 but later increment key by one. - if math.IsInf(v, +1) { - v = math.MaxFloat64 - } else { - v = -math.MaxFloat64 - } - isInf = true - } - frac, exp := math.Frexp(math.Abs(v)) - if schema > 0 { - bounds := nativeHistogramBounds[schema] - key = sort.SearchFloat64s(bounds, frac) + (exp-1)*len(bounds) - } else { - key = exp - if frac == 0.5 { - key-- - } - offset := (1 << -schema) - 1 - key = (key + offset) >> -schema - } - if isInf { - key++ - } - switch { - case v > zeroThreshold: - bucketCreated = addToBucket(&hc.nativeHistogramBucketsPositive, key, 1) - case v < -zeroThreshold: - bucketCreated = addToBucket(&hc.nativeHistogramBucketsNegative, key, 1) - default: - atomic.AddUint64(&hc.nativeHistogramZeroBucket, 1) - } - if bucketCreated { - atomic.AddUint32(&hc.nativeHistogramBucketsNumber, 1) - } - } - // Increment count last as we take it as a signal that the observation - // is complete. - atomic.AddUint64(&hc.count, 1) -} - -type histogram struct { - // countAndHotIdx enables lock-free writes with use of atomic updates. - // The most significant bit is the hot index [0 or 1] of the count field - // below. Observe calls update the hot one. All remaining bits count the - // number of Observe calls. Observe starts by incrementing this counter, - // and finish by incrementing the count field in the respective - // histogramCounts, as a marker for completion. - // - // Calls of the Write method (which are non-mutating reads from the - // perspective of the histogram) swap the hot–cold under the writeMtx - // lock. A cooldown is awaited (while locked) by comparing the number of - // observations with the initiation count. Once they match, then the - // last observation on the now cool one has completed. All cold fields must - // be merged into the new hot before releasing writeMtx. - // - // Fields with atomic access first! See alignment constraint: - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG - countAndHotIdx uint64 - - selfCollector - desc *Desc - - // Only used in the Write method and for sparse bucket management. - mtx sync.Mutex - - // Two counts, one is "hot" for lock-free observations, the other is - // "cold" for writing out a dto.Metric. It has to be an array of - // pointers to guarantee 64bit alignment of the histogramCounts, see - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG. - counts [2]*histogramCounts - - upperBounds []float64 - labelPairs []*dto.LabelPair - exemplars []atomic.Value // One more than buckets (to include +Inf), each a *dto.Exemplar. - nativeHistogramSchema int32 // The initial schema. Set to math.MinInt32 if no sparse buckets are used. - nativeHistogramZeroThreshold float64 // The initial zero threshold. - nativeHistogramMaxZeroThreshold float64 - nativeHistogramMaxBuckets uint32 - nativeHistogramMinResetDuration time.Duration - // lastResetTime is protected by mtx. It is also used as created timestamp. - lastResetTime time.Time - // resetScheduled is protected by mtx. It is true if a reset is - // scheduled for a later time (when nativeHistogramMinResetDuration has - // passed). - resetScheduled bool - nativeExemplars nativeExemplars - - // now is for testing purposes, by default it's time.Now. - now func() time.Time - - // afterFunc is for testing purposes, by default it's time.AfterFunc. - afterFunc func(time.Duration, func()) *time.Timer -} - -func (h *histogram) Desc() *Desc { - return h.desc -} - -func (h *histogram) Observe(v float64) { - h.observe(v, h.findBucket(v)) -} - -// ObserveWithExemplar should not be called in a high-frequency setting -// for a native histogram with configured exemplars. For this case, -// the implementation isn't lock-free and might suffer from lock contention. -func (h *histogram) ObserveWithExemplar(v float64, e Labels) { - i := h.findBucket(v) - h.observe(v, i) - h.updateExemplar(v, i, e) -} - -func (h *histogram) Write(out *dto.Metric) error { - // For simplicity, we protect this whole method by a mutex. It is not in - // the hot path, i.e. Observe is called much more often than Write. The - // complication of making Write lock-free isn't worth it, if possible at - // all. - h.mtx.Lock() - defer h.mtx.Unlock() - - // Adding 1<<63 switches the hot index (from 0 to 1 or from 1 to 0) - // without touching the count bits. See the struct comments for a full - // description of the algorithm. - n := atomic.AddUint64(&h.countAndHotIdx, 1<<63) - // count is contained unchanged in the lower 63 bits. - count := n & ((1 << 63) - 1) - // The most significant bit tells us which counts is hot. The complement - // is thus the cold one. - hotCounts := h.counts[n>>63] - coldCounts := h.counts[(^n)>>63] - - waitForCooldown(count, coldCounts) - - his := &dto.Histogram{ - Bucket: make([]*dto.Bucket, len(h.upperBounds)), - SampleCount: proto.Uint64(count), - SampleSum: proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.sumBits))), - CreatedTimestamp: timestamppb.New(h.lastResetTime), - } - out.Histogram = his - out.Label = h.labelPairs - - var cumCount uint64 - for i, upperBound := range h.upperBounds { - cumCount += atomic.LoadUint64(&coldCounts.buckets[i]) - his.Bucket[i] = &dto.Bucket{ - CumulativeCount: proto.Uint64(cumCount), - UpperBound: proto.Float64(upperBound), - } - if e := h.exemplars[i].Load(); e != nil { - his.Bucket[i].Exemplar = e.(*dto.Exemplar) - } - } - // If there is an exemplar for the +Inf bucket, we have to add that bucket explicitly. - if e := h.exemplars[len(h.upperBounds)].Load(); e != nil { - b := &dto.Bucket{ - CumulativeCount: proto.Uint64(count), - UpperBound: proto.Float64(math.Inf(1)), - Exemplar: e.(*dto.Exemplar), - } - his.Bucket = append(his.Bucket, b) - } - if h.nativeHistogramSchema > math.MinInt32 { - his.ZeroThreshold = proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.nativeHistogramZeroThresholdBits))) - his.Schema = proto.Int32(atomic.LoadInt32(&coldCounts.nativeHistogramSchema)) - zeroBucket := atomic.LoadUint64(&coldCounts.nativeHistogramZeroBucket) - - defer func() { - coldCounts.nativeHistogramBucketsPositive.Range(addAndReset(&hotCounts.nativeHistogramBucketsPositive, &hotCounts.nativeHistogramBucketsNumber)) - coldCounts.nativeHistogramBucketsNegative.Range(addAndReset(&hotCounts.nativeHistogramBucketsNegative, &hotCounts.nativeHistogramBucketsNumber)) - }() - - his.ZeroCount = proto.Uint64(zeroBucket) - his.NegativeSpan, his.NegativeDelta = makeBuckets(&coldCounts.nativeHistogramBucketsNegative) - his.PositiveSpan, his.PositiveDelta = makeBuckets(&coldCounts.nativeHistogramBucketsPositive) - - // Add a no-op span to a histogram without observations and with - // a zero threshold of zero. Otherwise, a native histogram would - // look like a classic histogram to scrapers. - if *his.ZeroThreshold == 0 && *his.ZeroCount == 0 && len(his.PositiveSpan) == 0 && len(his.NegativeSpan) == 0 { - his.PositiveSpan = []*dto.BucketSpan{{ - Offset: proto.Int32(0), - Length: proto.Uint32(0), - }} - } - - if h.nativeExemplars.isEnabled() { - h.nativeExemplars.Lock() - his.Exemplars = append(his.Exemplars, h.nativeExemplars.exemplars...) - h.nativeExemplars.Unlock() - } - - } - addAndResetCounts(hotCounts, coldCounts) - return nil -} - -// findBucket returns the index of the bucket for the provided value, or -// len(h.upperBounds) for the +Inf bucket. -func (h *histogram) findBucket(v float64) int { - n := len(h.upperBounds) - if n == 0 { - return 0 - } - - // Early exit: if v is less than or equal to the first upper bound, return 0 - if v <= h.upperBounds[0] { - return 0 - } - - // Early exit: if v is greater than the last upper bound, return len(h.upperBounds) - if v > h.upperBounds[n-1] { - return n - } - - // For small arrays, use simple linear search - // "magic number" 35 is result of tests on couple different (AWS and baremetal) servers - // see more details here: https://github.com/prometheus/client_golang/pull/1662 - if n < 35 { - for i, bound := range h.upperBounds { - if v <= bound { - return i - } - } - // If v is greater than all upper bounds, return len(h.upperBounds) - return n - } - - // For larger arrays, use stdlib's binary search - return sort.SearchFloat64s(h.upperBounds, v) -} - -// observe is the implementation for Observe without the findBucket part. -func (h *histogram) observe(v float64, bucket int) { - // Do not add to sparse buckets for NaN observations. - doSparse := h.nativeHistogramSchema > math.MinInt32 && !math.IsNaN(v) - // We increment h.countAndHotIdx so that the counter in the lower - // 63 bits gets incremented. At the same time, we get the new value - // back, which we can use to find the currently-hot counts. - n := atomic.AddUint64(&h.countAndHotIdx, 1) - hotCounts := h.counts[n>>63] - hotCounts.observe(v, bucket, doSparse) - if doSparse { - h.limitBuckets(hotCounts, v, bucket) - } -} - -// limitBuckets applies a strategy to limit the number of populated sparse -// buckets. It's generally best effort, and there are situations where the -// number can go higher (if even the lowest resolution isn't enough to reduce -// the number sufficiently, or if the provided counts aren't fully updated yet -// by a concurrently happening Write call). -func (h *histogram) limitBuckets(counts *histogramCounts, value float64, bucket int) { - if h.nativeHistogramMaxBuckets == 0 { - return // No limit configured. - } - if h.nativeHistogramMaxBuckets >= atomic.LoadUint32(&counts.nativeHistogramBucketsNumber) { - return // Bucket limit not exceeded yet. - } - - h.mtx.Lock() - defer h.mtx.Unlock() - - // The hot counts might have been swapped just before we acquired the - // lock. Re-fetch the hot counts first... - n := atomic.LoadUint64(&h.countAndHotIdx) - hotIdx := n >> 63 - coldIdx := (^n) >> 63 - hotCounts := h.counts[hotIdx] - coldCounts := h.counts[coldIdx] - // ...and then check again if we really have to reduce the bucket count. - if h.nativeHistogramMaxBuckets >= atomic.LoadUint32(&hotCounts.nativeHistogramBucketsNumber) { - return // Bucket limit not exceeded after all. - } - // Try the various strategies in order. - if h.maybeReset(hotCounts, coldCounts, coldIdx, value, bucket) { - return - } - // One of the other strategies will happen. To undo what they will do as - // soon as enough time has passed to satisfy - // h.nativeHistogramMinResetDuration, schedule a reset at the right time - // if we haven't done so already. - if h.nativeHistogramMinResetDuration > 0 && !h.resetScheduled { - h.resetScheduled = true - h.afterFunc(h.nativeHistogramMinResetDuration-h.now().Sub(h.lastResetTime), h.reset) - } - - if h.maybeWidenZeroBucket(hotCounts, coldCounts) { - return - } - h.doubleBucketWidth(hotCounts, coldCounts) -} - -// maybeReset resets the whole histogram if at least -// h.nativeHistogramMinResetDuration has been passed. It returns true if the -// histogram has been reset. The caller must have locked h.mtx. -func (h *histogram) maybeReset( - hot, cold *histogramCounts, coldIdx uint64, value float64, bucket int, -) bool { - // We are using the possibly mocked h.now() rather than - // time.Since(h.lastResetTime) to enable testing. - if h.nativeHistogramMinResetDuration == 0 || // No reset configured. - h.resetScheduled || // Do not interefere if a reset is already scheduled. - h.now().Sub(h.lastResetTime) < h.nativeHistogramMinResetDuration { - return false - } - // Completely reset coldCounts. - h.resetCounts(cold) - // Repeat the latest observation to not lose it completely. - cold.observe(value, bucket, true) - // Make coldCounts the new hot counts while resetting countAndHotIdx. - n := atomic.SwapUint64(&h.countAndHotIdx, (coldIdx<<63)+1) - count := n & ((1 << 63) - 1) - waitForCooldown(count, hot) - // Finally, reset the formerly hot counts, too. - h.resetCounts(hot) - h.lastResetTime = h.now() - return true -} - -// reset resets the whole histogram. It locks h.mtx itself, i.e. it has to be -// called without having locked h.mtx. -func (h *histogram) reset() { - h.mtx.Lock() - defer h.mtx.Unlock() - - n := atomic.LoadUint64(&h.countAndHotIdx) - hotIdx := n >> 63 - coldIdx := (^n) >> 63 - hot := h.counts[hotIdx] - cold := h.counts[coldIdx] - // Completely reset coldCounts. - h.resetCounts(cold) - // Make coldCounts the new hot counts while resetting countAndHotIdx. - n = atomic.SwapUint64(&h.countAndHotIdx, coldIdx<<63) - count := n & ((1 << 63) - 1) - waitForCooldown(count, hot) - // Finally, reset the formerly hot counts, too. - h.resetCounts(hot) - h.lastResetTime = h.now() - h.resetScheduled = false -} - -// maybeWidenZeroBucket widens the zero bucket until it includes the existing -// buckets closest to the zero bucket (which could be two, if an equidistant -// negative and a positive bucket exists, but usually it's only one bucket to be -// merged into the new wider zero bucket). h.nativeHistogramMaxZeroThreshold -// limits how far the zero bucket can be extended, and if that's not enough to -// include an existing bucket, the method returns false. The caller must have -// locked h.mtx. -func (h *histogram) maybeWidenZeroBucket(hot, cold *histogramCounts) bool { - currentZeroThreshold := math.Float64frombits(atomic.LoadUint64(&hot.nativeHistogramZeroThresholdBits)) - if currentZeroThreshold >= h.nativeHistogramMaxZeroThreshold { - return false - } - // Find the key of the bucket closest to zero. - smallestKey := findSmallestKey(&hot.nativeHistogramBucketsPositive) - smallestNegativeKey := findSmallestKey(&hot.nativeHistogramBucketsNegative) - if smallestNegativeKey < smallestKey { - smallestKey = smallestNegativeKey - } - if smallestKey == math.MaxInt32 { - return false - } - newZeroThreshold := getLe(smallestKey, atomic.LoadInt32(&hot.nativeHistogramSchema)) - if newZeroThreshold > h.nativeHistogramMaxZeroThreshold { - return false // New threshold would exceed the max threshold. - } - atomic.StoreUint64(&cold.nativeHistogramZeroThresholdBits, math.Float64bits(newZeroThreshold)) - // Remove applicable buckets. - if _, loaded := cold.nativeHistogramBucketsNegative.LoadAndDelete(smallestKey); loaded { - atomicDecUint32(&cold.nativeHistogramBucketsNumber) - } - if _, loaded := cold.nativeHistogramBucketsPositive.LoadAndDelete(smallestKey); loaded { - atomicDecUint32(&cold.nativeHistogramBucketsNumber) - } - // Make cold counts the new hot counts. - n := atomic.AddUint64(&h.countAndHotIdx, 1<<63) - count := n & ((1 << 63) - 1) - // Swap the pointer names to represent the new roles and make - // the rest less confusing. - hot, cold = cold, hot - waitForCooldown(count, cold) - // Add all the now cold counts to the new hot counts... - addAndResetCounts(hot, cold) - // ...adjust the new zero threshold in the cold counts, too... - atomic.StoreUint64(&cold.nativeHistogramZeroThresholdBits, math.Float64bits(newZeroThreshold)) - // ...and then merge the newly deleted buckets into the wider zero - // bucket. - mergeAndDeleteOrAddAndReset := func(hotBuckets, coldBuckets *sync.Map) func(k, v interface{}) bool { - return func(k, v interface{}) bool { - key := k.(int) - bucket := v.(*int64) - if key == smallestKey { - // Merge into hot zero bucket... - atomic.AddUint64(&hot.nativeHistogramZeroBucket, uint64(atomic.LoadInt64(bucket))) - // ...and delete from cold counts. - coldBuckets.Delete(key) - atomicDecUint32(&cold.nativeHistogramBucketsNumber) - } else { - // Add to corresponding hot bucket... - if addToBucket(hotBuckets, key, atomic.LoadInt64(bucket)) { - atomic.AddUint32(&hot.nativeHistogramBucketsNumber, 1) - } - // ...and reset cold bucket. - atomic.StoreInt64(bucket, 0) - } - return true - } - } - - cold.nativeHistogramBucketsPositive.Range(mergeAndDeleteOrAddAndReset(&hot.nativeHistogramBucketsPositive, &cold.nativeHistogramBucketsPositive)) - cold.nativeHistogramBucketsNegative.Range(mergeAndDeleteOrAddAndReset(&hot.nativeHistogramBucketsNegative, &cold.nativeHistogramBucketsNegative)) - return true -} - -// doubleBucketWidth doubles the bucket width (by decrementing the schema -// number). Note that very sparse buckets could lead to a low reduction of the -// bucket count (or even no reduction at all). The method does nothing if the -// schema is already -4. -func (h *histogram) doubleBucketWidth(hot, cold *histogramCounts) { - coldSchema := atomic.LoadInt32(&cold.nativeHistogramSchema) - if coldSchema == -4 { - return // Already at lowest resolution. - } - coldSchema-- - atomic.StoreInt32(&cold.nativeHistogramSchema, coldSchema) - // Play it simple and just delete all cold buckets. - atomic.StoreUint32(&cold.nativeHistogramBucketsNumber, 0) - deleteSyncMap(&cold.nativeHistogramBucketsNegative) - deleteSyncMap(&cold.nativeHistogramBucketsPositive) - // Make coldCounts the new hot counts. - n := atomic.AddUint64(&h.countAndHotIdx, 1<<63) - count := n & ((1 << 63) - 1) - // Swap the pointer names to represent the new roles and make - // the rest less confusing. - hot, cold = cold, hot - waitForCooldown(count, cold) - // Add all the now cold counts to the new hot counts... - addAndResetCounts(hot, cold) - // ...adjust the schema in the cold counts, too... - atomic.StoreInt32(&cold.nativeHistogramSchema, coldSchema) - // ...and then merge the cold buckets into the wider hot buckets. - merge := func(hotBuckets *sync.Map) func(k, v interface{}) bool { - return func(k, v interface{}) bool { - key := k.(int) - bucket := v.(*int64) - // Adjust key to match the bucket to merge into. - if key > 0 { - key++ - } - key /= 2 - // Add to corresponding hot bucket. - if addToBucket(hotBuckets, key, atomic.LoadInt64(bucket)) { - atomic.AddUint32(&hot.nativeHistogramBucketsNumber, 1) - } - return true - } - } - - cold.nativeHistogramBucketsPositive.Range(merge(&hot.nativeHistogramBucketsPositive)) - cold.nativeHistogramBucketsNegative.Range(merge(&hot.nativeHistogramBucketsNegative)) - // Play it simple again and just delete all cold buckets. - atomic.StoreUint32(&cold.nativeHistogramBucketsNumber, 0) - deleteSyncMap(&cold.nativeHistogramBucketsNegative) - deleteSyncMap(&cold.nativeHistogramBucketsPositive) -} - -func (h *histogram) resetCounts(counts *histogramCounts) { - atomic.StoreUint64(&counts.sumBits, 0) - atomic.StoreUint64(&counts.count, 0) - atomic.StoreUint64(&counts.nativeHistogramZeroBucket, 0) - atomic.StoreUint64(&counts.nativeHistogramZeroThresholdBits, math.Float64bits(h.nativeHistogramZeroThreshold)) - atomic.StoreInt32(&counts.nativeHistogramSchema, h.nativeHistogramSchema) - atomic.StoreUint32(&counts.nativeHistogramBucketsNumber, 0) - for i := range h.upperBounds { - atomic.StoreUint64(&counts.buckets[i], 0) - } - deleteSyncMap(&counts.nativeHistogramBucketsNegative) - deleteSyncMap(&counts.nativeHistogramBucketsPositive) -} - -// updateExemplar replaces the exemplar for the provided classic bucket. -// With empty labels, it's a no-op. It panics if any of the labels is invalid. -// If histogram is native, the exemplar will be cached into nativeExemplars, -// which has a limit, and will remove one exemplar when limit is reached. -func (h *histogram) updateExemplar(v float64, bucket int, l Labels) { - if l == nil { - return - } - e, err := newExemplar(v, h.now(), l) - if err != nil { - panic(err) - } - h.exemplars[bucket].Store(e) - doSparse := h.nativeHistogramSchema > math.MinInt32 && !math.IsNaN(v) - if doSparse { - h.nativeExemplars.addExemplar(e) - } -} - -// HistogramVec is a Collector that bundles a set of Histograms that all share the -// same Desc, but have different values for their variable labels. This is used -// if you want to count the same thing partitioned by various dimensions -// (e.g. HTTP request latencies, partitioned by status code and method). Create -// instances with NewHistogramVec. -type HistogramVec struct { - *MetricVec -} - -// NewHistogramVec creates a new HistogramVec based on the provided HistogramOpts and -// partitioned by the given label names. -func NewHistogramVec(opts HistogramOpts, labelNames []string) *HistogramVec { - return V2.NewHistogramVec(HistogramVecOpts{ - HistogramOpts: opts, - VariableLabels: UnconstrainedLabels(labelNames), - }) -} - -// NewHistogramVec creates a new HistogramVec based on the provided HistogramVecOpts. -func (v2) NewHistogramVec(opts HistogramVecOpts) *HistogramVec { - desc := V2.NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - opts.VariableLabels, - opts.ConstLabels, - ) - return &HistogramVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { - return newHistogram(desc, opts.HistogramOpts, lvs...) - }), - } -} - -// GetMetricWithLabelValues returns the Histogram for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Histogram is created. -// -// It is possible to call this method without using the returned Histogram to only -// create the new Histogram but leave it at its starting value, a Histogram without -// any observations. -// -// Keeping the Histogram for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Histogram from the HistogramVec. In that case, the -// Histogram will still exist, but it will not be exported anymore, even if a -// Histogram with the same label values is created later. See also the CounterVec -// example. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// See also the GaugeVec example. -func (v *HistogramVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(Observer), err - } - return nil, err -} - -// GetMetricWith returns the Histogram for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Histogram is created. Implications of -// creating a Histogram without using it and keeping the Histogram for later use -// are the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -func (v *HistogramVec) GetMetricWith(labels Labels) (Observer, error) { - metric, err := v.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(Observer), err - } - return nil, err -} - -// WithLabelValues works as GetMetricWithLabelValues, but panics where -// GetMetricWithLabelValues would have returned an error. Not returning an -// error allows shortcuts like -// -// myVec.WithLabelValues("404", "GET").Observe(42.21) -func (v *HistogramVec) WithLabelValues(lvs ...string) Observer { - h, err := v.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return h -} - -// With works as GetMetricWith but panics where GetMetricWithLabels would have -// returned an error. Not returning an error allows shortcuts like -// -// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21) -func (v *HistogramVec) With(labels Labels) Observer { - h, err := v.GetMetricWith(labels) - if err != nil { - panic(err) - } - return h -} - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the HistogramVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -func (v *HistogramVec) CurryWith(labels Labels) (ObserverVec, error) { - vec, err := v.MetricVec.CurryWith(labels) - if vec != nil { - return &HistogramVec{vec}, err - } - return nil, err -} - -// MustCurryWith works as CurryWith but panics where CurryWith would have -// returned an error. -func (v *HistogramVec) MustCurryWith(labels Labels) ObserverVec { - vec, err := v.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} - -type constHistogram struct { - desc *Desc - count uint64 - sum float64 - buckets map[float64]uint64 - labelPairs []*dto.LabelPair - createdTs *timestamppb.Timestamp -} - -func (h *constHistogram) Desc() *Desc { - return h.desc -} - -func (h *constHistogram) Write(out *dto.Metric) error { - his := &dto.Histogram{ - CreatedTimestamp: h.createdTs, - } - - buckets := make([]*dto.Bucket, 0, len(h.buckets)) - - his.SampleCount = proto.Uint64(h.count) - his.SampleSum = proto.Float64(h.sum) - for upperBound, count := range h.buckets { - buckets = append(buckets, &dto.Bucket{ - CumulativeCount: proto.Uint64(count), - UpperBound: proto.Float64(upperBound), - }) - } - - if len(buckets) > 0 { - sort.Sort(buckSort(buckets)) - } - his.Bucket = buckets - - out.Histogram = his - out.Label = h.labelPairs - - return nil -} - -// NewConstHistogram returns a metric representing a Prometheus histogram with -// fixed values for the count, sum, and bucket counts. As those parameters -// cannot be changed, the returned value does not implement the Histogram -// interface (but only the Metric interface). Users of this package will not -// have much use for it in regular operations. However, when implementing custom -// Collectors, it is useful as a throw-away metric that is generated on the fly -// to send it to Prometheus in the Collect method. -// -// buckets is a map of upper bounds to cumulative counts, excluding the +Inf -// bucket. The +Inf bucket is implicit, and its value is equal to the provided count. -// -// NewConstHistogram returns an error if the length of labelValues is not -// consistent with the variable labels in Desc or if Desc is invalid. -func NewConstHistogram( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constHistogram{ - desc: desc, - count: count, - sum: sum, - buckets: buckets, - labelPairs: MakeLabelPairs(desc, labelValues), - }, nil -} - -// MustNewConstHistogram is a version of NewConstHistogram that panics where -// NewConstHistogram would have returned an error. -func MustNewConstHistogram( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - labelValues ...string, -) Metric { - m, err := NewConstHistogram(desc, count, sum, buckets, labelValues...) - if err != nil { - panic(err) - } - return m -} - -// NewConstHistogramWithCreatedTimestamp does the same thing as NewConstHistogram but sets the created timestamp. -func NewConstHistogramWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - ct time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constHistogram{ - desc: desc, - count: count, - sum: sum, - buckets: buckets, - labelPairs: MakeLabelPairs(desc, labelValues), - createdTs: timestamppb.New(ct), - }, nil -} - -// MustNewConstHistogramWithCreatedTimestamp is a version of NewConstHistogramWithCreatedTimestamp that panics where -// NewConstHistogramWithCreatedTimestamp would have returned an error. -func MustNewConstHistogramWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - buckets map[float64]uint64, - ct time.Time, - labelValues ...string, -) Metric { - m, err := NewConstHistogramWithCreatedTimestamp(desc, count, sum, buckets, ct, labelValues...) - if err != nil { - panic(err) - } - return m -} - -type buckSort []*dto.Bucket - -func (s buckSort) Len() int { - return len(s) -} - -func (s buckSort) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s buckSort) Less(i, j int) bool { - return s[i].GetUpperBound() < s[j].GetUpperBound() -} - -// pickSchema returns the largest number n between -4 and 8 such that -// 2^(2^-n) is less or equal the provided bucketFactor. -// -// Special cases: -// - bucketFactor <= 1: panics. -// - bucketFactor < 2^(2^-8) (but > 1): still returns 8. -func pickSchema(bucketFactor float64) int32 { - if bucketFactor <= 1 { - panic(fmt.Errorf("bucketFactor %f is <=1", bucketFactor)) - } - floor := math.Floor(math.Log2(math.Log2(bucketFactor))) - switch { - case floor <= -8: - return nativeHistogramSchemaMaximum - case floor >= 4: - return nativeHistogramSchemaMinimum - default: - return -int32(floor) - } -} - -func makeBuckets(buckets *sync.Map) ([]*dto.BucketSpan, []int64) { - var ii []int - buckets.Range(func(k, v interface{}) bool { - ii = append(ii, k.(int)) - return true - }) - sort.Ints(ii) - - if len(ii) == 0 { - return nil, nil - } - - var ( - spans []*dto.BucketSpan - deltas []int64 - prevCount int64 - nextI int - ) - - appendDelta := func(count int64) { - *spans[len(spans)-1].Length++ - deltas = append(deltas, count-prevCount) - prevCount = count - } - - for n, i := range ii { - v, _ := buckets.Load(i) - count := atomic.LoadInt64(v.(*int64)) - // Multiple spans with only small gaps in between are probably - // encoded more efficiently as one larger span with a few empty - // buckets. Needs some research to find the sweet spot. For now, - // we assume that gaps of one or two buckets should not create - // a new span. - iDelta := int32(i - nextI) - if n == 0 || iDelta > 2 { - // We have to create a new span, either because we are - // at the very beginning, or because we have found a gap - // of more than two buckets. - spans = append(spans, &dto.BucketSpan{ - Offset: proto.Int32(iDelta), - Length: proto.Uint32(0), - }) - } else { - // We have found a small gap (or no gap at all). - // Insert empty buckets as needed. - for j := int32(0); j < iDelta; j++ { - appendDelta(0) - } - } - appendDelta(count) - nextI = i + 1 - } - return spans, deltas -} - -// addToBucket increments the sparse bucket at key by the provided amount. It -// returns true if a new sparse bucket had to be created for that. -func addToBucket(buckets *sync.Map, key int, increment int64) bool { - if existingBucket, ok := buckets.Load(key); ok { - // Fast path without allocation. - atomic.AddInt64(existingBucket.(*int64), increment) - return false - } - // Bucket doesn't exist yet. Slow path allocating new counter. - newBucket := increment // TODO(beorn7): Check if this is sufficient to not let increment escape. - if actualBucket, loaded := buckets.LoadOrStore(key, &newBucket); loaded { - // The bucket was created concurrently in another goroutine. - // Have to increment after all. - atomic.AddInt64(actualBucket.(*int64), increment) - return false - } - return true -} - -// addAndReset returns a function to be used with sync.Map.Range of spare -// buckets in coldCounts. It increments the buckets in the provided hotBuckets -// according to the buckets ranged through. It then resets all buckets ranged -// through to 0 (but leaves them in place so that they don't need to get -// recreated on the next scrape). -func addAndReset(hotBuckets *sync.Map, bucketNumber *uint32) func(k, v interface{}) bool { - return func(k, v interface{}) bool { - bucket := v.(*int64) - if addToBucket(hotBuckets, k.(int), atomic.LoadInt64(bucket)) { - atomic.AddUint32(bucketNumber, 1) - } - atomic.StoreInt64(bucket, 0) - return true - } -} - -func deleteSyncMap(m *sync.Map) { - m.Range(func(k, v interface{}) bool { - m.Delete(k) - return true - }) -} - -func findSmallestKey(m *sync.Map) int { - result := math.MaxInt32 - m.Range(func(k, v interface{}) bool { - key := k.(int) - if key < result { - result = key - } - return true - }) - return result -} - -func getLe(key int, schema int32) float64 { - // Here a bit of context about the behavior for the last bucket counting - // regular numbers (called simply "last bucket" below) and the bucket - // counting observations of ±Inf (called "inf bucket" below, with a key - // one higher than that of the "last bucket"): - // - // If we apply the usual formula to the last bucket, its upper bound - // would be calculated as +Inf. The reason is that the max possible - // regular float64 number (math.MaxFloat64) doesn't coincide with one of - // the calculated bucket boundaries. So the calculated boundary has to - // be larger than math.MaxFloat64, and the only float64 larger than - // math.MaxFloat64 is +Inf. However, we want to count actual - // observations of ±Inf in the inf bucket. Therefore, we have to treat - // the upper bound of the last bucket specially and set it to - // math.MaxFloat64. (The upper bound of the inf bucket, with its key - // being one higher than that of the last bucket, naturally comes out as - // +Inf by the usual formula. So that's fine.) - // - // math.MaxFloat64 has a frac of 0.9999999999999999 and an exp of - // 1024. If there were a float64 number following math.MaxFloat64, it - // would have a frac of 1.0 and an exp of 1024, or equivalently a frac - // of 0.5 and an exp of 1025. However, since frac must be smaller than - // 1, and exp must be smaller than 1025, either representation overflows - // a float64. (Which, in turn, is the reason that math.MaxFloat64 is the - // largest possible float64. Q.E.D.) However, the formula for - // calculating the upper bound from the idx and schema of the last - // bucket results in precisely that. It is either frac=1.0 & exp=1024 - // (for schema < 0) or frac=0.5 & exp=1025 (for schema >=0). (This is, - // by the way, a power of two where the exponent itself is a power of - // two, 2¹⁰ in fact, which coinicides with a bucket boundary in all - // schemas.) So these are the special cases we have to catch below. - if schema < 0 { - exp := key << -schema - if exp == 1024 { - // This is the last bucket before the overflow bucket - // (for ±Inf observations). Return math.MaxFloat64 as - // explained above. - return math.MaxFloat64 - } - return math.Ldexp(1, exp) - } - - fracIdx := key & ((1 << schema) - 1) - frac := nativeHistogramBounds[schema][fracIdx] - exp := (key >> schema) + 1 - if frac == 0.5 && exp == 1025 { - // This is the last bucket before the overflow bucket (for ±Inf - // observations). Return math.MaxFloat64 as explained above. - return math.MaxFloat64 - } - return math.Ldexp(frac, exp) -} - -// waitForCooldown returns after the count field in the provided histogramCounts -// has reached the provided count value. -func waitForCooldown(count uint64, counts *histogramCounts) { - for count != atomic.LoadUint64(&counts.count) { - runtime.Gosched() // Let observations get work done. - } -} - -// atomicAddFloat adds the provided float atomically to another float -// represented by the bit pattern the bits pointer is pointing to. -func atomicAddFloat(bits *uint64, v float64) { - for { - loadedBits := atomic.LoadUint64(bits) - newBits := math.Float64bits(math.Float64frombits(loadedBits) + v) - if atomic.CompareAndSwapUint64(bits, loadedBits, newBits) { - break - } - } -} - -// atomicDecUint32 atomically decrements the uint32 p points to. See -// https://pkg.go.dev/sync/atomic#AddUint32 to understand how this is done. -func atomicDecUint32(p *uint32) { - atomic.AddUint32(p, ^uint32(0)) -} - -// addAndResetCounts adds certain fields (count, sum, conventional buckets, zero -// bucket) from the cold counts to the corresponding fields in the hot -// counts. Those fields are then reset to 0 in the cold counts. -func addAndResetCounts(hot, cold *histogramCounts) { - atomic.AddUint64(&hot.count, atomic.LoadUint64(&cold.count)) - atomic.StoreUint64(&cold.count, 0) - coldSum := math.Float64frombits(atomic.LoadUint64(&cold.sumBits)) - atomicAddFloat(&hot.sumBits, coldSum) - atomic.StoreUint64(&cold.sumBits, 0) - for i := range hot.buckets { - atomic.AddUint64(&hot.buckets[i], atomic.LoadUint64(&cold.buckets[i])) - atomic.StoreUint64(&cold.buckets[i], 0) - } - atomic.AddUint64(&hot.nativeHistogramZeroBucket, atomic.LoadUint64(&cold.nativeHistogramZeroBucket)) - atomic.StoreUint64(&cold.nativeHistogramZeroBucket, 0) -} - -type nativeExemplars struct { - sync.Mutex - - // Time-to-live for exemplars, it is set to -1 if exemplars are disabled, that is NativeHistogramMaxExemplars is below 0. - // The ttl is used on insertion to remove an exemplar that is older than ttl, if present. - ttl time.Duration - - exemplars []*dto.Exemplar -} - -func (n *nativeExemplars) isEnabled() bool { - return n.ttl != -1 -} - -func makeNativeExemplars(ttl time.Duration, maxCount int) nativeExemplars { - if ttl == 0 { - ttl = 5 * time.Minute - } - - if maxCount == 0 { - maxCount = 10 - } - - if maxCount < 0 { - maxCount = 0 - ttl = -1 - } - - return nativeExemplars{ - ttl: ttl, - exemplars: make([]*dto.Exemplar, 0, maxCount), - } -} - -func (n *nativeExemplars) addExemplar(e *dto.Exemplar) { - if !n.isEnabled() { - return - } - - n.Lock() - defer n.Unlock() - - // When the number of exemplars has not yet exceeded or - // is equal to cap(n.exemplars), then - // insert the new exemplar directly. - if len(n.exemplars) < cap(n.exemplars) { - var nIdx int - for nIdx = 0; nIdx < len(n.exemplars); nIdx++ { - if *e.Value < *n.exemplars[nIdx].Value { - break - } - } - n.exemplars = append(n.exemplars[:nIdx], append([]*dto.Exemplar{e}, n.exemplars[nIdx:]...)...) - return - } - - if len(n.exemplars) == 1 { - // When the number of exemplars is 1, then - // replace the existing exemplar with the new exemplar. - n.exemplars[0] = e - return - } - // From this point on, the number of exemplars is greater than 1. - - // When the number of exemplars exceeds the limit, remove one exemplar. - var ( - ot = time.Time{} // Oldest timestamp seen. Initial value doesn't matter as we replace it due to otIdx == -1 in the loop. - otIdx = -1 // Index of the exemplar with the oldest timestamp. - - md = -1.0 // Logarithm of the delta of the closest pair of exemplars. - - // The insertion point of the new exemplar in the exemplars slice after insertion. - // This is calculated purely based on the order of the exemplars by value. - // nIdx == len(n.exemplars) means the new exemplar is to be inserted after the end. - nIdx = -1 - - // rIdx is ultimately the index for the exemplar that we are replacing with the new exemplar. - // The aim is to keep a good spread of exemplars by value and not let them bunch up too much. - // It is calculated in 3 steps: - // 1. First we set rIdx to the index of the older exemplar within the closest pair by value. - // That is the following will be true (on log scale): - // either the exemplar pair on index (rIdx-1, rIdx) or (rIdx, rIdx+1) will have - // the closest values to each other from all pairs. - // For example, suppose the values are distributed like this: - // |-----------x-------------x----------------x----x-----| - // ^--rIdx as this is older. - // Or like this: - // |-----------x-------------x----------------x----x-----| - // ^--rIdx as this is older. - // 2. If there is an exemplar that expired, then we simple reset rIdx to that index. - // 3. We check if by inserting the new exemplar we would create a closer pair at - // (nIdx-1, nIdx) or (nIdx, nIdx+1) and set rIdx to nIdx-1 or nIdx accordingly to - // keep the spread of exemplars by value; otherwise we keep rIdx as it is. - rIdx = -1 - cLog float64 // Logarithm of the current exemplar. - pLog float64 // Logarithm of the previous exemplar. - ) - - for i, exemplar := range n.exemplars { - // Find the exemplar with the oldest timestamp. - if otIdx == -1 || exemplar.Timestamp.AsTime().Before(ot) { - ot = exemplar.Timestamp.AsTime() - otIdx = i - } - - // Find the index at which to insert new the exemplar. - if nIdx == -1 && *e.Value <= *exemplar.Value { - nIdx = i - } - - // Find the two closest exemplars and pick the one the with older timestamp. - pLog = cLog - cLog = math.Log(exemplar.GetValue()) - if i == 0 { - continue - } - diff := math.Abs(cLog - pLog) - if md == -1 || diff < md { - // The closest exemplar pair is at index: i-1, i. - // Choose the exemplar with the older timestamp for replacement. - md = diff - if n.exemplars[i].Timestamp.AsTime().Before(n.exemplars[i-1].Timestamp.AsTime()) { - rIdx = i - } else { - rIdx = i - 1 - } - } - - } - - // If all existing exemplar are smaller than new exemplar, - // then the exemplar should be inserted at the end. - if nIdx == -1 { - nIdx = len(n.exemplars) - } - // Here, we have the following relationships: - // n.exemplars[nIdx-1].Value < e.Value (if nIdx > 0) - // e.Value <= n.exemplars[nIdx].Value (if nIdx < len(n.exemplars)) - - if otIdx != -1 && e.Timestamp.AsTime().Sub(ot) > n.ttl { - // If the oldest exemplar has expired, then replace it with the new exemplar. - rIdx = otIdx - } else { - // In the previous for loop, when calculating the closest pair of exemplars, - // we did not take into account the newly inserted exemplar. - // So we need to calculate with the newly inserted exemplar again. - elog := math.Log(e.GetValue()) - if nIdx > 0 { - diff := math.Abs(elog - math.Log(n.exemplars[nIdx-1].GetValue())) - if diff < md { - // The value we are about to insert is closer to the previous exemplar at the insertion point than what we calculated before in rIdx. - // v--rIdx - // |-----------x-n-----------x----------------x----x-----| - // nIdx-1--^ ^--new exemplar value - // Do not make the spread worse, replace nIdx-1 and not rIdx. - md = diff - rIdx = nIdx - 1 - } - } - if nIdx < len(n.exemplars) { - diff := math.Abs(math.Log(n.exemplars[nIdx].GetValue()) - elog) - if diff < md { - // The value we are about to insert is closer to the next exemplar at the insertion point than what we calculated before in rIdx. - // v--rIdx - // |-----------x-----------n-x----------------x----x-----| - // new exemplar value--^ ^--nIdx - // Do not make the spread worse, replace nIdx-1 and not rIdx. - rIdx = nIdx - } - } - } - - // Adjust the slice according to rIdx and nIdx. - switch { - case rIdx == nIdx: - n.exemplars[nIdx] = e - case rIdx < nIdx: - n.exemplars = append(n.exemplars[:rIdx], append(n.exemplars[rIdx+1:nIdx], append([]*dto.Exemplar{e}, n.exemplars[nIdx:]...)...)...) - case rIdx > nIdx: - n.exemplars = append(n.exemplars[:nIdx], append([]*dto.Exemplar{e}, append(n.exemplars[nIdx:rIdx], n.exemplars[rIdx+1:]...)...)...) - } -} - -type constNativeHistogram struct { - desc *Desc - dto.Histogram - labelPairs []*dto.LabelPair -} - -func validateCount(sum float64, count uint64, negativeBuckets, positiveBuckets map[int]int64, zeroBucket uint64) error { - var bucketPopulationSum int64 - for _, v := range positiveBuckets { - bucketPopulationSum += v - } - for _, v := range negativeBuckets { - bucketPopulationSum += v - } - bucketPopulationSum += int64(zeroBucket) - - // If the sum of observations is NaN, the number of observations must be greater or equal to the sum of all bucket counts. - // Otherwise, the number of observations must be equal to the sum of all bucket counts . - - if math.IsNaN(sum) && bucketPopulationSum > int64(count) || - !math.IsNaN(sum) && bucketPopulationSum != int64(count) { - return errors.New("the sum of all bucket populations exceeds the count of observations") - } - return nil -} - -// NewConstNativeHistogram returns a metric representing a Prometheus native histogram with -// fixed values for the count, sum, and positive/negative/zero bucket counts. As those parameters -// cannot be changed, the returned value does not implement the Histogram -// interface (but only the Metric interface). Users of this package will not -// have much use for it in regular operations. However, when implementing custom -// OpenTelemetry Collectors, it is useful as a throw-away metric that is generated on the fly -// to send it to Prometheus in the Collect method. -// -// zeroBucket counts all (positive and negative) -// observations in the zero bucket (with an absolute value less or equal -// the current threshold). -// positiveBuckets and negativeBuckets are separate maps for negative and positive -// observations. The map's value is an int64, counting observations in -// that bucket. The map's key is the -// index of the bucket according to the used -// Schema. Index 0 is for an upper bound of 1 in positive buckets and for a lower bound of -1 in negative buckets. -// NewConstNativeHistogram returns an error if -// - the length of labelValues is not consistent with the variable labels in Desc or if Desc is invalid. -// - the schema passed is not between 8 and -4 -// - the sum of counts in all buckets including the zero bucket does not equal the count if sum is not NaN (or exceeds the count if sum is NaN) -// -// See https://opentelemetry.io/docs/specs/otel/compatibility/prometheus_and_openmetrics/#exponential-histograms for more details about the conversion from OTel to Prometheus. -func NewConstNativeHistogram( - desc *Desc, - count uint64, - sum float64, - positiveBuckets, negativeBuckets map[int]int64, - zeroBucket uint64, - schema int32, - zeroThreshold float64, - createdTimestamp time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - if schema > nativeHistogramSchemaMaximum || schema < nativeHistogramSchemaMinimum { - return nil, errors.New("invalid native histogram schema") - } - if err := validateCount(sum, count, negativeBuckets, positiveBuckets, zeroBucket); err != nil { - return nil, err - } - - NegativeSpan, NegativeDelta := makeBucketsFromMap(negativeBuckets) - PositiveSpan, PositiveDelta := makeBucketsFromMap(positiveBuckets) - ret := &constNativeHistogram{ - desc: desc, - Histogram: dto.Histogram{ - CreatedTimestamp: timestamppb.New(createdTimestamp), - Schema: &schema, - ZeroThreshold: &zeroThreshold, - SampleCount: &count, - SampleSum: &sum, - - NegativeSpan: NegativeSpan, - NegativeDelta: NegativeDelta, - - PositiveSpan: PositiveSpan, - PositiveDelta: PositiveDelta, - - ZeroCount: proto.Uint64(zeroBucket), - }, - labelPairs: MakeLabelPairs(desc, labelValues), - } - if *ret.ZeroThreshold == 0 && *ret.ZeroCount == 0 && len(ret.PositiveSpan) == 0 && len(ret.NegativeSpan) == 0 { - ret.PositiveSpan = []*dto.BucketSpan{{ - Offset: proto.Int32(0), - Length: proto.Uint32(0), - }} - } - return ret, nil -} - -// MustNewConstNativeHistogram is a version of NewConstNativeHistogram that panics where -// NewConstNativeHistogram would have returned an error. -func MustNewConstNativeHistogram( - desc *Desc, - count uint64, - sum float64, - positiveBuckets, negativeBuckets map[int]int64, - zeroBucket uint64, - nativeHistogramSchema int32, - nativeHistogramZeroThreshold float64, - createdTimestamp time.Time, - labelValues ...string, -) Metric { - nativehistogram, err := NewConstNativeHistogram(desc, - count, - sum, - positiveBuckets, - negativeBuckets, - zeroBucket, - nativeHistogramSchema, - nativeHistogramZeroThreshold, - createdTimestamp, - labelValues...) - if err != nil { - panic(err) - } - return nativehistogram -} - -func (h *constNativeHistogram) Desc() *Desc { - return h.desc -} - -func (h *constNativeHistogram) Write(out *dto.Metric) error { - out.Histogram = &h.Histogram - out.Label = h.labelPairs - return nil -} - -func makeBucketsFromMap(buckets map[int]int64) ([]*dto.BucketSpan, []int64) { - if len(buckets) == 0 { - return nil, nil - } - var ii []int - for k := range buckets { - ii = append(ii, k) - } - sort.Ints(ii) - - var ( - spans []*dto.BucketSpan - deltas []int64 - prevCount int64 - nextI int - ) - - appendDelta := func(count int64) { - *spans[len(spans)-1].Length++ - deltas = append(deltas, count-prevCount) - prevCount = count - } - - for n, i := range ii { - count := buckets[i] - // Multiple spans with only small gaps in between are probably - // encoded more efficiently as one larger span with a few empty - // buckets. Needs some research to find the sweet spot. For now, - // we assume that gaps of one or two buckets should not create - // a new span. - iDelta := int32(i - nextI) - if n == 0 || iDelta > 2 { - // We have to create a new span, either because we are - // at the very beginning, or because we have found a gap - // of more than two buckets. - spans = append(spans, &dto.BucketSpan{ - Offset: proto.Int32(iDelta), - Length: proto.Uint32(0), - }) - } else { - // We have found a small gap (or no gap at all). - // Insert empty buckets as needed. - for j := int32(0); j < iDelta; j++ { - appendDelta(0) - } - } - appendDelta(count) - nextI = i + 1 - } - return spans, deltas -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/almost_equal.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/almost_equal.go deleted file mode 100644 index 1ed5abe74..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/internal/almost_equal.go +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) 2015 Björn Rabenstein -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -// SOFTWARE. -// -// The code in this package is copy/paste to avoid a dependency. Hence this file -// carries the copyright of the original repo. -// https://github.com/beorn7/floats -package internal - -import ( - "math" -) - -// minNormalFloat64 is the smallest positive normal value of type float64. -var minNormalFloat64 = math.Float64frombits(0x0010000000000000) - -// AlmostEqualFloat64 returns true if a and b are equal within a relative error -// of epsilon. See http://floating-point-gui.de/errors/comparison/ for the -// details of the applied method. -func AlmostEqualFloat64(a, b, epsilon float64) bool { - if a == b { - return true - } - absA := math.Abs(a) - absB := math.Abs(b) - diff := math.Abs(a - b) - if a == 0 || b == 0 || absA+absB < minNormalFloat64 { - return diff < epsilon*minNormalFloat64 - } - return diff/math.Min(absA+absB, math.MaxFloat64) < epsilon -} - -// AlmostEqualFloat64s is the slice form of AlmostEqualFloat64. -func AlmostEqualFloat64s(a, b []float64, epsilon float64) bool { - if len(a) != len(b) { - return false - } - for i := range a { - if !AlmostEqualFloat64(a[i], b[i], epsilon) { - return false - } - } - return true -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go deleted file mode 100644 index 7bac0da33..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/internal/difflib.go +++ /dev/null @@ -1,655 +0,0 @@ -// Copyright 2022 The Prometheus 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. -// -// It provides tools to compare sequences of strings and generate textual diffs. -// -// Maintaining `GetUnifiedDiffString` here because original repository -// (https://github.com/pmezard/go-difflib) is no longer maintained. -package internal - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" -) - -func minInt(a, b int) int { - if a < b { - return a - } - return b -} - -func maxInt(a, b int) int { - if a > b { - return a - } - return b -} - -func calculateRatio(matches, length int) float64 { - if length > 0 { - return 2.0 * float64(matches) / float64(length) - } - return 1.0 -} - -type Match struct { - A int - B int - Size int -} - -type OpCode struct { - Tag byte - I1 int - I2 int - J1 int - J2 int -} - -// SequenceMatcher compares sequence of strings. The basic -// algorithm predates, and is a little fancier than, an algorithm -// published in the late 1980's by Ratcliff and Obershelp under the -// hyperbolic name "gestalt pattern matching". The basic idea is to find -// the longest contiguous matching subsequence that contains no "junk" -// elements (R-O doesn't address junk). The same idea is then applied -// recursively to the pieces of the sequences to the left and to the right -// of the matching subsequence. This does not yield minimal edit -// sequences, but does tend to yield matches that "look right" to people. -// -// SequenceMatcher tries to compute a "human-friendly diff" between two -// sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the -// longest *contiguous* & junk-free matching subsequence. That's what -// catches peoples' eyes. The Windows(tm) windiff has another interesting -// notion, pairing up elements that appear uniquely in each sequence. -// That, and the method here, appear to yield more intuitive difference -// reports than does diff. This method appears to be the least vulnerable -// to synching up on blocks of "junk lines", though (like blank lines in -// ordinary text files, or maybe "

" lines in HTML files). That may be -// because this is the only method of the 3 that has a *concept* of -// "junk" . -// -// Timing: Basic R-O is cubic time worst case and quadratic time expected -// case. SequenceMatcher is quadratic time for the worst case and has -// expected-case behavior dependent in a complicated way on how many -// elements the sequences have in common; best case time is linear. -type SequenceMatcher struct { - a []string - b []string - b2j map[string][]int - IsJunk func(string) bool - autoJunk bool - bJunk map[string]struct{} - matchingBlocks []Match - fullBCount map[string]int - bPopular map[string]struct{} - opCodes []OpCode -} - -func NewMatcher(a, b []string) *SequenceMatcher { - m := SequenceMatcher{autoJunk: true} - m.SetSeqs(a, b) - return &m -} - -func NewMatcherWithJunk(a, b []string, autoJunk bool, - isJunk func(string) bool, -) *SequenceMatcher { - m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} - m.SetSeqs(a, b) - return &m -} - -// Set two sequences to be compared. -func (m *SequenceMatcher) SetSeqs(a, b []string) { - m.SetSeq1(a) - m.SetSeq2(b) -} - -// Set the first sequence to be compared. The second sequence to be compared is -// not changed. -// -// SequenceMatcher computes and caches detailed information about the second -// sequence, so if you want to compare one sequence S against many sequences, -// use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other -// sequences. -// -// See also SetSeqs() and SetSeq2(). -func (m *SequenceMatcher) SetSeq1(a []string) { - if &a == &m.a { - return - } - m.a = a - m.matchingBlocks = nil - m.opCodes = nil -} - -// Set the second sequence to be compared. The first sequence to be compared is -// not changed. -func (m *SequenceMatcher) SetSeq2(b []string) { - if &b == &m.b { - return - } - m.b = b - m.matchingBlocks = nil - m.opCodes = nil - m.fullBCount = nil - m.chainB() -} - -func (m *SequenceMatcher) chainB() { - // Populate line -> index mapping - b2j := map[string][]int{} - for i, s := range m.b { - indices := b2j[s] - indices = append(indices, i) - b2j[s] = indices - } - - // Purge junk elements - m.bJunk = map[string]struct{}{} - if m.IsJunk != nil { - junk := m.bJunk - for s := range b2j { - if m.IsJunk(s) { - junk[s] = struct{}{} - } - } - for s := range junk { - delete(b2j, s) - } - } - - // Purge remaining popular elements - popular := map[string]struct{}{} - n := len(m.b) - if m.autoJunk && n >= 200 { - ntest := n/100 + 1 - for s, indices := range b2j { - if len(indices) > ntest { - popular[s] = struct{}{} - } - } - for s := range popular { - delete(b2j, s) - } - } - m.bPopular = popular - m.b2j = b2j -} - -func (m *SequenceMatcher) isBJunk(s string) bool { - _, ok := m.bJunk[s] - return ok -} - -// Find longest matching block in a[alo:ahi] and b[blo:bhi]. -// -// If IsJunk is not defined: -// -// Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where -// -// alo <= i <= i+k <= ahi -// blo <= j <= j+k <= bhi -// -// and for all (i',j',k') meeting those conditions, -// -// k >= k' -// i <= i' -// and if i == i', j <= j' -// -// In other words, of all maximal matching blocks, return one that -// starts earliest in a, and of all those maximal matching blocks that -// start earliest in a, return the one that starts earliest in b. -// -// If IsJunk is defined, first the longest matching block is -// determined as above, but with the additional restriction that no -// junk element appears in the block. Then that block is extended as -// far as possible by matching (only) junk elements on both sides. So -// the resulting block never matches on junk except as identical junk -// happens to be adjacent to an "interesting" match. -// -// If no blocks match, return (alo, blo, 0). -func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { - // CAUTION: stripping common prefix or suffix would be incorrect. - // E.g., - // ab - // acab - // Longest matching block is "ab", but if common prefix is - // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so - // strip, so ends up claiming that ab is changed to acab by - // inserting "ca" in the middle. That's minimal but unintuitive: - // "it's obvious" that someone inserted "ac" at the front. - // Windiff ends up at the same place as diff, but by pairing up - // the unique 'b's and then matching the first two 'a's. - besti, bestj, bestsize := alo, blo, 0 - - // find longest junk-free match - // during an iteration of the loop, j2len[j] = length of longest - // junk-free match ending with a[i-1] and b[j] - j2len := map[int]int{} - for i := alo; i != ahi; i++ { - // look at all instances of a[i] in b; note that because - // b2j has no junk keys, the loop is skipped if a[i] is junk - newj2len := map[int]int{} - for _, j := range m.b2j[m.a[i]] { - // a[i] matches b[j] - if j < blo { - continue - } - if j >= bhi { - break - } - k := j2len[j-1] + 1 - newj2len[j] = k - if k > bestsize { - besti, bestj, bestsize = i-k+1, j-k+1, k - } - } - j2len = newj2len - } - - // Extend the best by non-junk elements on each end. In particular, - // "popular" non-junk elements aren't in b2j, which greatly speeds - // the inner loop above, but also means "the best" match so far - // doesn't contain any junk *or* popular non-junk elements. - for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - !m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize++ - } - - // Now that we have a wholly interesting match (albeit possibly - // empty!), we may as well suck up the matching junk on each - // side of it too. Can't think of a good reason not to, and it - // saves post-processing the (possibly considerable) expense of - // figuring out what to do with it. In the case of an empty - // interesting match, this is clearly the right thing to do, - // because no other kind of match is possible in the regions. - for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && - m.a[besti-1] == m.b[bestj-1] { - besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 - } - for besti+bestsize < ahi && bestj+bestsize < bhi && - m.isBJunk(m.b[bestj+bestsize]) && - m.a[besti+bestsize] == m.b[bestj+bestsize] { - bestsize++ - } - - return Match{A: besti, B: bestj, Size: bestsize} -} - -// Return list of triples describing matching subsequences. -// -// Each triple is of the form (i, j, n), and means that -// a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in -// i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are -// adjacent triples in the list, and the second is not the last triple in the -// list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe -// adjacent equal blocks. -// -// The last triple is a dummy, (len(a), len(b), 0), and is the only -// triple with n==0. -func (m *SequenceMatcher) GetMatchingBlocks() []Match { - if m.matchingBlocks != nil { - return m.matchingBlocks - } - - var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match - matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { - match := m.findLongestMatch(alo, ahi, blo, bhi) - i, j, k := match.A, match.B, match.Size - if match.Size > 0 { - if alo < i && blo < j { - matched = matchBlocks(alo, i, blo, j, matched) - } - matched = append(matched, match) - if i+k < ahi && j+k < bhi { - matched = matchBlocks(i+k, ahi, j+k, bhi, matched) - } - } - return matched - } - matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) - - // It's possible that we have adjacent equal blocks in the - // matching_blocks list now. - nonAdjacent := []Match{} - i1, j1, k1 := 0, 0, 0 - for _, b := range matched { - // Is this block adjacent to i1, j1, k1? - i2, j2, k2 := b.A, b.B, b.Size - if i1+k1 == i2 && j1+k1 == j2 { - // Yes, so collapse them -- this just increases the length of - // the first block by the length of the second, and the first - // block so lengthened remains the block to compare against. - k1 += k2 - } else { - // Not adjacent. Remember the first block (k1==0 means it's - // the dummy we started with), and make the second block the - // new block to compare against. - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - i1, j1, k1 = i2, j2, k2 - } - } - if k1 > 0 { - nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) - } - - nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) - m.matchingBlocks = nonAdjacent - return m.matchingBlocks -} - -// Return list of 5-tuples describing how to turn a into b. -// -// Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple -// has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the -// tuple preceding it, and likewise for j1 == the previous j2. -// -// The tags are characters, with these meanings: -// -// 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] -// -// 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. -// -// 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. -// -// 'e' (equal): a[i1:i2] == b[j1:j2] -func (m *SequenceMatcher) GetOpCodes() []OpCode { - if m.opCodes != nil { - return m.opCodes - } - i, j := 0, 0 - matching := m.GetMatchingBlocks() - opCodes := make([]OpCode, 0, len(matching)) - for _, m := range matching { - // invariant: we've pumped out correct diffs to change - // a[:i] into b[:j], and the next matching block is - // a[ai:ai+size] == b[bj:bj+size]. So we need to pump - // out a diff to change a[i:ai] into b[j:bj], pump out - // the matching block, and move (i,j) beyond the match - ai, bj, size := m.A, m.B, m.Size - tag := byte(0) - if i < ai && j < bj { - tag = 'r' - } else if i < ai { - tag = 'd' - } else if j < bj { - tag = 'i' - } - if tag > 0 { - opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) - } - i, j = ai+size, bj+size - // the list of matching blocks is terminated by a - // sentinel with size 0 - if size > 0 { - opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) - } - } - m.opCodes = opCodes - return m.opCodes -} - -// Isolate change clusters by eliminating ranges with no changes. -// -// Return a generator of groups with up to n lines of context. -// Each group is in the same format as returned by GetOpCodes(). -func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { - if n < 0 { - n = 3 - } - codes := m.GetOpCodes() - if len(codes) == 0 { - codes = []OpCode{{'e', 0, 1, 0, 1}} - } - // Fixup leading and trailing groups if they show no changes. - if codes[0].Tag == 'e' { - c := codes[0] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[0] = OpCode{c.Tag, maxInt(i1, i2-n), i2, maxInt(j1, j2-n), j2} - } - if codes[len(codes)-1].Tag == 'e' { - c := codes[len(codes)-1] - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - codes[len(codes)-1] = OpCode{c.Tag, i1, minInt(i2, i1+n), j1, minInt(j2, j1+n)} - } - nn := n + n - groups := [][]OpCode{} - group := []OpCode{} - for _, c := range codes { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - // End the current group and start a new one whenever - // there is a large range with no changes. - if c.Tag == 'e' && i2-i1 > nn { - group = append(group, OpCode{ - c.Tag, i1, minInt(i2, i1+n), - j1, minInt(j2, j1+n), - }) - groups = append(groups, group) - group = []OpCode{} - i1, j1 = maxInt(i1, i2-n), maxInt(j1, j2-n) - } - group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) - } - if len(group) > 0 && (len(group) != 1 || group[0].Tag != 'e') { - groups = append(groups, group) - } - return groups -} - -// Return a measure of the sequences' similarity (float in [0,1]). -// -// Where T is the total number of elements in both sequences, and -// M is the number of matches, this is 2.0*M / T. -// Note that this is 1 if the sequences are identical, and 0 if -// they have nothing in common. -// -// .Ratio() is expensive to compute if you haven't already computed -// .GetMatchingBlocks() or .GetOpCodes(), in which case you may -// want to try .QuickRatio() or .RealQuickRation() first to get an -// upper bound. -func (m *SequenceMatcher) Ratio() float64 { - matches := 0 - for _, m := range m.GetMatchingBlocks() { - matches += m.Size - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() relatively quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute. -func (m *SequenceMatcher) QuickRatio() float64 { - // viewing a and b as multisets, set matches to the cardinality - // of their intersection; this counts the number of matches - // without regard to order, so is clearly an upper bound - if m.fullBCount == nil { - m.fullBCount = map[string]int{} - for _, s := range m.b { - m.fullBCount[s]++ - } - } - - // avail[x] is the number of times x appears in 'b' less the - // number of times we've seen it in 'a' so far ... kinda - avail := map[string]int{} - matches := 0 - for _, s := range m.a { - n, ok := avail[s] - if !ok { - n = m.fullBCount[s] - } - avail[s] = n - 1 - if n > 0 { - matches++ - } - } - return calculateRatio(matches, len(m.a)+len(m.b)) -} - -// Return an upper bound on ratio() very quickly. -// -// This isn't defined beyond that it is an upper bound on .Ratio(), and -// is faster to compute than either .Ratio() or .QuickRatio(). -func (m *SequenceMatcher) RealQuickRatio() float64 { - la, lb := len(m.a), len(m.b) - return calculateRatio(minInt(la, lb), la+lb) -} - -// Convert range to the "ed" format -func formatRangeUnified(start, stop int) string { - // Per the diff spec at http://www.unix.org/single_unix_specification/ - beginning := start + 1 // lines start numbering with one - length := stop - start - if length == 1 { - return strconv.Itoa(beginning) - } - if length == 0 { - beginning-- // empty ranges begin at line just before the range - } - return fmt.Sprintf("%d,%d", beginning, length) -} - -// Unified diff parameters -type UnifiedDiff struct { - A []string // First sequence lines - FromFile string // First file name - FromDate string // First file time - B []string // Second sequence lines - ToFile string // Second file name - ToDate string // Second file time - Eol string // Headers end of line, defaults to LF - Context int // Number of context lines -} - -// Compare two sequences of lines; generate the delta as a unified diff. -// -// Unified diffs are a compact way of showing line changes and a few -// lines of context. The number of context lines is set by 'n' which -// defaults to three. -// -// By default, the diff control lines (those with ---, +++, or @@) are -// created with a trailing newline. This is helpful so that inputs -// created from file.readlines() result in diffs that are suitable for -// file.writelines() since both the inputs and outputs have trailing -// newlines. -// -// For inputs that do not have trailing newlines, set the lineterm -// argument to "" so that the output will be uniformly newline free. -// -// The unidiff format normally has a header for filenames and modification -// times. Any or all of these may be specified using strings for -// 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. -// The modification times are normally expressed in the ISO 8601 format. -func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { - buf := bufio.NewWriter(writer) - defer buf.Flush() - wf := func(format string, args ...interface{}) error { - _, err := fmt.Fprintf(buf, format, args...) - return err - } - ws := func(s string) error { - _, err := buf.WriteString(s) - return err - } - - if len(diff.Eol) == 0 { - diff.Eol = "\n" - } - - started := false - m := NewMatcher(diff.A, diff.B) - for _, g := range m.GetGroupedOpCodes(diff.Context) { - if !started { - started = true - fromDate := "" - if len(diff.FromDate) > 0 { - fromDate = "\t" + diff.FromDate - } - toDate := "" - if len(diff.ToDate) > 0 { - toDate = "\t" + diff.ToDate - } - if diff.FromFile != "" || diff.ToFile != "" { - err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) - if err != nil { - return err - } - err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) - if err != nil { - return err - } - } - } - first, last := g[0], g[len(g)-1] - range1 := formatRangeUnified(first.I1, last.I2) - range2 := formatRangeUnified(first.J1, last.J2) - if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { - return err - } - for _, c := range g { - i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 - if c.Tag == 'e' { - for _, line := range diff.A[i1:i2] { - if err := ws(" " + line); err != nil { - return err - } - } - continue - } - if c.Tag == 'r' || c.Tag == 'd' { - for _, line := range diff.A[i1:i2] { - if err := ws("-" + line); err != nil { - return err - } - } - } - if c.Tag == 'r' || c.Tag == 'i' { - for _, line := range diff.B[j1:j2] { - if err := ws("+" + line); err != nil { - return err - } - } - } - } - } - return nil -} - -// Like WriteUnifiedDiff but returns the diff a string. -func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { - w := &bytes.Buffer{} - err := WriteUnifiedDiff(w, diff) - return w.String(), err -} - -// Split a string on "\n" while preserving them. The output can be used -// as input for UnifiedDiff and ContextDiff structures. -func SplitLines(s string) []string { - lines := strings.SplitAfter(s, "\n") - lines[len(lines)-1] += "\n" - return lines -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go deleted file mode 100644 index a4fa6eabd..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_collector_options.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2021 The Prometheus 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 internal - -import "regexp" - -type GoCollectorRule struct { - Matcher *regexp.Regexp - Deny bool -} - -// GoCollectorOptions should not be used be directly by anything, except `collectors` package. -// Use it via collectors package instead. See issue -// https://github.com/prometheus/client_golang/issues/1030. -// -// This is internal, so external users only can use it via `collector.WithGoCollector*` methods -type GoCollectorOptions struct { - DisableMemStatsLikeMetrics bool - RuntimeMetricSumForHist map[string]string - RuntimeMetricRules []GoCollectorRule -} - -var GoCollectorDefaultRuntimeMetrics = regexp.MustCompile(`/gc/gogc:percent|/gc/gomemlimit:bytes|/sched/gomaxprocs:threads`) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go deleted file mode 100644 index d273b6640..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/internal/go_runtime_metrics.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright 2021 The Prometheus 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. - -//go:build go1.17 -// +build go1.17 - -package internal - -import ( - "math" - "path" - "runtime/metrics" - "strings" - - "github.com/prometheus/common/model" -) - -// RuntimeMetricsToProm produces a Prometheus metric name from a runtime/metrics -// metric description and validates whether the metric is suitable for integration -// with Prometheus. -// -// Returns false if a name could not be produced, or if Prometheus does not understand -// the runtime/metrics Kind. -// -// Note that the main reason a name couldn't be produced is if the runtime/metrics -// package exports a name with characters outside the valid Prometheus metric name -// character set. This is theoretically possible, but should never happen in practice. -// Still, don't rely on it. -func RuntimeMetricsToProm(d *metrics.Description) (string, string, string, bool) { - namespace := "go" - - comp := strings.SplitN(d.Name, ":", 2) - key := comp[0] - unit := comp[1] - - // The last path element in the key is the name, - // the rest is the subsystem. - subsystem := path.Dir(key[1:] /* remove leading / */) - name := path.Base(key) - - // subsystem is translated by replacing all / and - with _. - subsystem = strings.ReplaceAll(subsystem, "/", "_") - subsystem = strings.ReplaceAll(subsystem, "-", "_") - - // unit is translated assuming that the unit contains no - // non-ASCII characters. - unit = strings.ReplaceAll(unit, "-", "_") - unit = strings.ReplaceAll(unit, "*", "_") - unit = strings.ReplaceAll(unit, "/", "_per_") - - // name has - replaced with _ and is concatenated with the unit and - // other data. - name = strings.ReplaceAll(name, "-", "_") - name += "_" + unit - if d.Cumulative && d.Kind != metrics.KindFloat64Histogram { - name += "_total" - } - - // Our current conversion moves to legacy naming, so use legacy validation. - valid := model.LegacyValidation.IsValidMetricName(namespace + "_" + subsystem + "_" + name) - switch d.Kind { - case metrics.KindUint64: - case metrics.KindFloat64: - case metrics.KindFloat64Histogram: - default: - valid = false - } - return namespace, subsystem, name, valid -} - -// RuntimeMetricsBucketsForUnit takes a set of buckets obtained for a runtime/metrics histogram -// type (so, lower-bound inclusive) and a unit from a runtime/metrics name, and produces -// a reduced set of buckets. This function always removes any -Inf bucket as it's represented -// as the bottom-most upper-bound inclusive bucket in Prometheus. -func RuntimeMetricsBucketsForUnit(buckets []float64, unit string) []float64 { - switch unit { - case "bytes": - // Re-bucket as powers of 2. - return reBucketExp(buckets, 2) - case "seconds": - // Re-bucket as powers of 10 and then merge all buckets greater - // than 1 second into the +Inf bucket. - b := reBucketExp(buckets, 10) - for i := range b { - if b[i] <= 1 { - continue - } - b[i] = math.Inf(1) - b = b[:i+1] - break - } - return b - } - return buckets -} - -// reBucketExp takes a list of bucket boundaries (lower bound inclusive) and -// downsamples the buckets to those a multiple of base apart. The end result -// is a roughly exponential (in many cases, perfectly exponential) bucketing -// scheme. -func reBucketExp(buckets []float64, base float64) []float64 { - bucket := buckets[0] - var newBuckets []float64 - // We may see a -Inf here, in which case, add it and skip it - // since we risk producing NaNs otherwise. - // - // We need to preserve -Inf values to maintain runtime/metrics - // conventions. We'll strip it out later. - if bucket == math.Inf(-1) { - newBuckets = append(newBuckets, bucket) - buckets = buckets[1:] - bucket = buckets[0] - } - // From now on, bucket should always have a non-Inf value because - // Infs are only ever at the ends of the bucket lists, so - // arithmetic operations on it are non-NaN. - for i := 1; i < len(buckets); i++ { - if bucket >= 0 && buckets[i] < bucket*base { - // The next bucket we want to include is at least bucket*base. - continue - } else if bucket < 0 && buckets[i] < bucket/base { - // In this case the bucket we're targeting is negative, and since - // we're ascending through buckets here, we need to divide to get - // closer to zero exponentially. - continue - } - // The +Inf bucket will always be the last one, and we'll always - // end up including it here because bucket - newBuckets = append(newBuckets, bucket) - bucket = buckets[i] - } - return append(newBuckets, bucket) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/internal/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/internal/metric.go deleted file mode 100644 index 6515c1148..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/internal/metric.go +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2018 The Prometheus 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 internal - -import ( - "sort" - - dto "github.com/prometheus/client_model/go" -) - -// LabelPairSorter implements sort.Interface. It is used to sort a slice of -// dto.LabelPair pointers. -type LabelPairSorter []*dto.LabelPair - -func (s LabelPairSorter) Len() int { - return len(s) -} - -func (s LabelPairSorter) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s LabelPairSorter) Less(i, j int) bool { - return s[i].GetName() < s[j].GetName() -} - -// MetricSorter is a sortable slice of *dto.Metric. -type MetricSorter []*dto.Metric - -func (s MetricSorter) Len() int { - return len(s) -} - -func (s MetricSorter) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s MetricSorter) Less(i, j int) bool { - if len(s[i].Label) != len(s[j].Label) { - // This should not happen. The metrics are - // inconsistent. However, we have to deal with the fact, as - // people might use custom collectors or metric family injection - // to create inconsistent metrics. So let's simply compare the - // number of labels in this case. That will still yield - // reproducible sorting. - return len(s[i].Label) < len(s[j].Label) - } - for n, lp := range s[i].Label { - vi := lp.GetValue() - vj := s[j].Label[n].GetValue() - if vi != vj { - return vi < vj - } - } - - // We should never arrive here. Multiple metrics with the same - // label set in the same scrape will lead to undefined ingestion - // behavior. However, as above, we have to provide stable sorting - // here, even for inconsistent metrics. So sort equal metrics - // by their timestamp, with missing timestamps (implying "now") - // coming last. - if s[i].TimestampMs == nil { - return false - } - if s[j].TimestampMs == nil { - return true - } - return s[i].GetTimestampMs() < s[j].GetTimestampMs() -} - -// NormalizeMetricFamilies returns a MetricFamily slice with empty -// MetricFamilies pruned and the remaining MetricFamilies sorted by name within -// the slice, with the contained Metrics sorted within each MetricFamily. -func NormalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily) []*dto.MetricFamily { - for _, mf := range metricFamiliesByName { - sort.Sort(MetricSorter(mf.Metric)) - } - names := make([]string, 0, len(metricFamiliesByName)) - for name, mf := range metricFamiliesByName { - if len(mf.Metric) > 0 { - names = append(names, name) - } - } - sort.Strings(names) - result := make([]*dto.MetricFamily, 0, len(names)) - for _, name := range names { - result = append(result, metricFamiliesByName[name]) - } - return result -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/labels.go b/vendor/github.com/prometheus/client_golang/prometheus/labels.go deleted file mode 100644 index 5fe8d3b4d..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/labels.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright 2018 The Prometheus 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 prometheus - -import ( - "errors" - "fmt" - "strings" - "unicode/utf8" - - "github.com/prometheus/common/model" -) - -// Labels represents a collection of label name -> value mappings. This type is -// commonly used with the With(Labels) and GetMetricWith(Labels) methods of -// metric vector Collectors, e.g.: -// -// myVec.With(Labels{"code": "404", "method": "GET"}).Add(42) -// -// The other use-case is the specification of constant label pairs in Opts or to -// create a Desc. -type Labels map[string]string - -// LabelConstraint normalizes label values. -type LabelConstraint func(string) string - -// ConstrainedLabels represents a label name and its constrain function -// to normalize label values. This type is commonly used when constructing -// metric vector Collectors. -type ConstrainedLabel struct { - Name string - Constraint LabelConstraint -} - -// ConstrainableLabels is an interface that allows creating of labels that can -// be optionally constrained. -// -// prometheus.V2().NewCounterVec(CounterVecOpts{ -// CounterOpts: {...}, // Usual CounterOpts fields -// VariableLabels: []ConstrainedLabels{ -// {Name: "A"}, -// {Name: "B", Constraint: func(v string) string { ... }}, -// }, -// }) -type ConstrainableLabels interface { - compile() *compiledLabels - labelNames() []string -} - -// ConstrainedLabels represents a collection of label name -> constrain function -// to normalize label values. This type is commonly used when constructing -// metric vector Collectors. -type ConstrainedLabels []ConstrainedLabel - -func (cls ConstrainedLabels) compile() *compiledLabels { - compiled := &compiledLabels{ - names: make([]string, len(cls)), - labelConstraints: map[string]LabelConstraint{}, - } - - for i, label := range cls { - compiled.names[i] = label.Name - if label.Constraint != nil { - compiled.labelConstraints[label.Name] = label.Constraint - } - } - - return compiled -} - -func (cls ConstrainedLabels) labelNames() []string { - names := make([]string, len(cls)) - for i, label := range cls { - names[i] = label.Name - } - return names -} - -// UnconstrainedLabels represents collection of label without any constraint on -// their value. Thus, it is simply a collection of label names. -// -// UnconstrainedLabels([]string{ "A", "B" }) -// -// is equivalent to -// -// ConstrainedLabels { -// { Name: "A" }, -// { Name: "B" }, -// } -type UnconstrainedLabels []string - -func (uls UnconstrainedLabels) compile() *compiledLabels { - return &compiledLabels{ - names: uls, - } -} - -func (uls UnconstrainedLabels) labelNames() []string { - return uls -} - -type compiledLabels struct { - names []string - labelConstraints map[string]LabelConstraint -} - -func (cls *compiledLabels) compile() *compiledLabels { - return cls -} - -func (cls *compiledLabels) labelNames() []string { - return cls.names -} - -func (cls *compiledLabels) constrain(labelName, value string) string { - if fn, ok := cls.labelConstraints[labelName]; ok && fn != nil { - return fn(value) - } - return value -} - -// reservedLabelPrefix is a prefix which is not legal in user-supplied -// label names. -const reservedLabelPrefix = "__" - -var errInconsistentCardinality = errors.New("inconsistent label cardinality") - -func makeInconsistentCardinalityError(fqName string, labels, labelValues []string) error { - return fmt.Errorf( - "%w: %q has %d variable labels named %q but %d values %q were provided", - errInconsistentCardinality, fqName, - len(labels), labels, - len(labelValues), labelValues, - ) -} - -func validateValuesInLabels(labels Labels, expectedNumberOfValues int) error { - if len(labels) != expectedNumberOfValues { - return fmt.Errorf( - "%w: expected %d label values but got %d in %#v", - errInconsistentCardinality, expectedNumberOfValues, - len(labels), labels, - ) - } - - for name, val := range labels { - if !utf8.ValidString(val) { - return fmt.Errorf("label %s: value %q is not valid UTF-8", name, val) - } - } - - return nil -} - -func validateLabelValues(vals []string, expectedNumberOfValues int) error { - if len(vals) != expectedNumberOfValues { - // The call below makes vals escape, copy them to avoid that. - vals := append([]string(nil), vals...) - return fmt.Errorf( - "%w: expected %d label values but got %d in %#v", - errInconsistentCardinality, expectedNumberOfValues, - len(vals), vals, - ) - } - - for _, val := range vals { - if !utf8.ValidString(val) { - return fmt.Errorf("label value %q is not valid UTF-8", val) - } - } - - return nil -} - -func checkLabelName(l string) bool { - //nolint:staticcheck // TODO: Don't use deprecated model.NameValidationScheme. - return model.NameValidationScheme.IsValidLabelName(l) && !strings.HasPrefix(l, reservedLabelPrefix) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/metric.go b/vendor/github.com/prometheus/client_golang/prometheus/metric.go deleted file mode 100644 index 76e59f128..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/metric.go +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "errors" - "math" - "sort" - "strings" - "time" - - dto "github.com/prometheus/client_model/go" - "github.com/prometheus/common/model" - "google.golang.org/protobuf/proto" -) - -var separatorByteSlice = []byte{model.SeparatorByte} // For convenient use with xxhash. - -// A Metric models a single sample value with its meta data being exported to -// Prometheus. Implementations of Metric in this package are Gauge, Counter, -// Histogram, Summary, and Untyped. -type Metric interface { - // Desc returns the descriptor for the Metric. This method idempotently - // returns the same descriptor throughout the lifetime of the - // Metric. The returned descriptor is immutable by contract. A Metric - // unable to describe itself must return an invalid descriptor (created - // with NewInvalidDesc). - Desc() *Desc - // Write encodes the Metric into a "Metric" Protocol Buffer data - // transmission object. - // - // Metric implementations must observe concurrency safety as reads of - // this metric may occur at any time, and any blocking occurs at the - // expense of total performance of rendering all registered - // metrics. Ideally, Metric implementations should support concurrent - // readers. - // - // While populating dto.Metric, it is the responsibility of the - // implementation to ensure validity of the Metric protobuf (like valid - // UTF-8 strings or syntactically valid metric and label names). It is - // recommended to sort labels lexicographically. Callers of Write should - // still make sure of sorting if they depend on it. - Write(*dto.Metric) error - // TODO(beorn7): The original rationale of passing in a pre-allocated - // dto.Metric protobuf to save allocations has disappeared. The - // signature of this method should be changed to "Write() (*dto.Metric, - // error)". -} - -// Opts bundles the options for creating most Metric types. Each metric -// implementation XXX has its own XXXOpts type, but in most cases, it is just -// an alias of this type (which might change when the requirement arises.) -// -// It is mandatory to set Name to a non-empty string. All other fields are -// optional and can safely be left at their zero value, although it is strongly -// encouraged to set a Help string. -type Opts struct { - // Namespace, Subsystem, and Name are components of the fully-qualified - // name of the Metric (created by joining these components with - // "_"). Only Name is mandatory, the others merely help structuring the - // name. Note that the fully-qualified name of the metric must be a - // valid Prometheus metric name. - Namespace string - Subsystem string - Name string - - // Help provides information about this metric. - // - // Metrics with the same fully-qualified name must have the same Help - // string. - Help string - - // ConstLabels are used to attach fixed labels to this metric. Metrics - // with the same fully-qualified name must have the same label names in - // their ConstLabels. - // - // ConstLabels are only used rarely. In particular, do not use them to - // attach the same labels to all your metrics. Those use cases are - // better covered by target labels set by the scraping Prometheus - // server, or by one specific metric (e.g. a build_info or a - // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels - ConstLabels Labels - - // now is for testing purposes, by default it's time.Now. - now func() time.Time -} - -// BuildFQName joins the given three name components by "_". Empty name -// components are ignored. If the name parameter itself is empty, an empty -// string is returned, no matter what. Metric implementations included in this -// library use this function internally to generate the fully-qualified metric -// name from the name component in their Opts. Users of the library will only -// need this function if they implement their own Metric or instantiate a Desc -// (with NewDesc) directly. -func BuildFQName(namespace, subsystem, name string) string { - if name == "" { - return "" - } - - sb := strings.Builder{} - sb.Grow(len(namespace) + len(subsystem) + len(name) + 2) - - if namespace != "" { - sb.WriteString(namespace) - sb.WriteString("_") - } - - if subsystem != "" { - sb.WriteString(subsystem) - sb.WriteString("_") - } - - sb.WriteString(name) - - return sb.String() -} - -type invalidMetric struct { - desc *Desc - err error -} - -// NewInvalidMetric returns a metric whose Write method always returns the -// provided error. It is useful if a Collector finds itself unable to collect -// a metric and wishes to report an error to the registry. -func NewInvalidMetric(desc *Desc, err error) Metric { - return &invalidMetric{desc, err} -} - -func (m *invalidMetric) Desc() *Desc { return m.desc } - -func (m *invalidMetric) Write(*dto.Metric) error { return m.err } - -type timestampedMetric struct { - Metric - t time.Time -} - -func (m timestampedMetric) Write(pb *dto.Metric) error { - e := m.Metric.Write(pb) - pb.TimestampMs = proto.Int64(m.t.Unix()*1000 + int64(m.t.Nanosecond()/1000000)) - return e -} - -// NewMetricWithTimestamp returns a new Metric wrapping the provided Metric in a -// way that it has an explicit timestamp set to the provided Time. This is only -// useful in rare cases as the timestamp of a Prometheus metric should usually -// be set by the Prometheus server during scraping. Exceptions include mirroring -// metrics with given timestamps from other metric -// sources. -// -// NewMetricWithTimestamp works best with MustNewConstMetric, -// MustNewConstHistogram, and MustNewConstSummary, see example. -// -// Currently, the exposition formats used by Prometheus are limited to -// millisecond resolution. Thus, the provided time will be rounded down to the -// next full millisecond value. -func NewMetricWithTimestamp(t time.Time, m Metric) Metric { - return timestampedMetric{Metric: m, t: t} -} - -type withExemplarsMetric struct { - Metric - - exemplars []*dto.Exemplar -} - -func (m *withExemplarsMetric) Write(pb *dto.Metric) error { - if err := m.Metric.Write(pb); err != nil { - return err - } - - switch { - case pb.Counter != nil: - pb.Counter.Exemplar = m.exemplars[len(m.exemplars)-1] - case pb.Histogram != nil: - h := pb.Histogram - for _, e := range m.exemplars { - if (h.GetZeroThreshold() != 0 || h.GetZeroCount() != 0 || - len(h.PositiveSpan) != 0 || len(h.NegativeSpan) != 0) && - e.GetTimestamp() != nil { - h.Exemplars = append(h.Exemplars, e) - if len(h.Bucket) == 0 { - // Don't proceed to classic buckets if there are none. - continue - } - } - // h.Bucket are sorted by UpperBound. - i := sort.Search(len(h.Bucket), func(i int) bool { - return h.Bucket[i].GetUpperBound() >= e.GetValue() - }) - if i < len(h.Bucket) { - h.Bucket[i].Exemplar = e - } else { - // The +Inf bucket should be explicitly added if there is an exemplar for it, similar to non-const histogram logic in https://github.com/prometheus/client_golang/blob/main/prometheus/histogram.go#L357-L365. - b := &dto.Bucket{ - CumulativeCount: proto.Uint64(h.GetSampleCount()), - UpperBound: proto.Float64(math.Inf(1)), - Exemplar: e, - } - h.Bucket = append(h.Bucket, b) - } - } - default: - // TODO(bwplotka): Implement Gauge? - return errors.New("cannot inject exemplar into Gauge, Summary or Untyped") - } - - return nil -} - -// Exemplar is easier to use, user-facing representation of *dto.Exemplar. -type Exemplar struct { - Value float64 - Labels Labels - // Optional. - // Default value (time.Time{}) indicates its empty, which should be - // understood as time.Now() time at the moment of creation of metric. - Timestamp time.Time -} - -// NewMetricWithExemplars returns a new Metric wrapping the provided Metric with given -// exemplars. Exemplars are validated. -// -// Only last applicable exemplar is injected from the list. -// For example for Counter it means last exemplar is injected. -// For Histogram, it means last applicable exemplar for each bucket is injected. -// For a Native Histogram, all valid exemplars are injected. -// -// NewMetricWithExemplars works best with MustNewConstMetric and -// MustNewConstHistogram, see example. -func NewMetricWithExemplars(m Metric, exemplars ...Exemplar) (Metric, error) { - if len(exemplars) == 0 { - return nil, errors.New("no exemplar was passed for NewMetricWithExemplars") - } - - var ( - now = time.Now() - exs = make([]*dto.Exemplar, len(exemplars)) - err error - ) - for i, e := range exemplars { - ts := e.Timestamp - if ts.IsZero() { - ts = now - } - exs[i], err = newExemplar(e.Value, ts, e.Labels) - if err != nil { - return nil, err - } - } - - return &withExemplarsMetric{Metric: m, exemplars: exs}, nil -} - -// MustNewMetricWithExemplars is a version of NewMetricWithExemplars that panics where -// NewMetricWithExemplars would have returned an error. -func MustNewMetricWithExemplars(m Metric, exemplars ...Exemplar) Metric { - ret, err := NewMetricWithExemplars(m, exemplars...) - if err != nil { - panic(err) - } - return ret -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/num_threads.go b/vendor/github.com/prometheus/client_golang/prometheus/num_threads.go deleted file mode 100644 index 7c12b2108..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/num_threads.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright 2018 The Prometheus 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. - -//go:build !js || wasm -// +build !js wasm - -package prometheus - -import "runtime" - -// getRuntimeNumThreads returns the number of open OS threads. -func getRuntimeNumThreads() float64 { - n, _ := runtime.ThreadCreateProfile(nil) - return float64(n) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go b/vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go deleted file mode 100644 index 7348df01d..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/num_threads_gopherjs.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2018 The Prometheus 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. - -//go:build js && !wasm -// +build js,!wasm - -package prometheus - -// getRuntimeNumThreads returns the number of open OS threads. -func getRuntimeNumThreads() float64 { - return 1 -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/observer.go b/vendor/github.com/prometheus/client_golang/prometheus/observer.go deleted file mode 100644 index 03773b21f..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/observer.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2017 The Prometheus 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 prometheus - -// Observer is the interface that wraps the Observe method, which is used by -// Histogram and Summary to add observations. -type Observer interface { - Observe(float64) -} - -// The ObserverFunc type is an adapter to allow the use of ordinary -// functions as Observers. If f is a function with the appropriate -// signature, ObserverFunc(f) is an Observer that calls f. -// -// This adapter is usually used in connection with the Timer type, and there are -// two general use cases: -// -// The most common one is to use a Gauge as the Observer for a Timer. -// See the "Gauge" Timer example. -// -// The more advanced use case is to create a function that dynamically decides -// which Observer to use for observing the duration. See the "Complex" Timer -// example. -type ObserverFunc func(float64) - -// Observe calls f(value). It implements Observer. -func (f ObserverFunc) Observe(value float64) { - f(value) -} - -// ObserverVec is an interface implemented by `HistogramVec` and `SummaryVec`. -type ObserverVec interface { - GetMetricWith(Labels) (Observer, error) - GetMetricWithLabelValues(lvs ...string) (Observer, error) - With(Labels) Observer - WithLabelValues(...string) Observer - CurryWith(Labels) (ObserverVec, error) - MustCurryWith(Labels) ObserverVec - - Collector -} - -// ExemplarObserver is implemented by Observers that offer the option of -// observing a value together with an exemplar. Its ObserveWithExemplar method -// works like the Observe method of an Observer but also replaces the currently -// saved exemplar (if any) with a new one, created from the provided value, the -// current time as timestamp, and the provided Labels. Empty Labels will lead to -// a valid (label-less) exemplar. But if Labels is nil, the current exemplar is -// left in place. ObserveWithExemplar panics if any of the provided labels are -// invalid or if the provided labels contain more than 128 runes in total. -type ExemplarObserver interface { - ObserveWithExemplar(value float64, exemplar Labels) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go deleted file mode 100644 index e7bce8b58..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector.go +++ /dev/null @@ -1,180 +0,0 @@ -// Copyright 2015 The Prometheus 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 prometheus - -import ( - "errors" - "fmt" - "os" - "strconv" - "strings" -) - -type processCollector struct { - collectFn func(chan<- Metric) - describeFn func(chan<- *Desc) - pidFn func() (int, error) - reportErrors bool - cpuTotal *Desc - openFDs, maxFDs *Desc - vsize, maxVsize *Desc - rss *Desc - startTime *Desc - inBytes, outBytes *Desc -} - -// ProcessCollectorOpts defines the behavior of a process metrics collector -// created with NewProcessCollector. -type ProcessCollectorOpts struct { - // PidFn returns the PID of the process the collector collects metrics - // for. It is called upon each collection. By default, the PID of the - // current process is used, as determined on construction time by - // calling os.Getpid(). - PidFn func() (int, error) - // If non-empty, each of the collected metrics is prefixed by the - // provided string and an underscore ("_"). - Namespace string - // If true, any error encountered during collection is reported as an - // invalid metric (see NewInvalidMetric). Otherwise, errors are ignored - // and the collected metrics will be incomplete. (Possibly, no metrics - // will be collected at all.) While that's usually not desired, it is - // appropriate for the common "mix-in" of process metrics, where process - // metrics are nice to have, but failing to collect them should not - // disrupt the collection of the remaining metrics. - ReportErrors bool -} - -// NewProcessCollector is the obsolete version of collectors.NewProcessCollector. -// See there for documentation. -// -// Deprecated: Use collectors.NewProcessCollector instead. -func NewProcessCollector(opts ProcessCollectorOpts) Collector { - ns := "" - if len(opts.Namespace) > 0 { - ns = opts.Namespace + "_" - } - - c := &processCollector{ - reportErrors: opts.ReportErrors, - cpuTotal: NewDesc( - ns+"process_cpu_seconds_total", - "Total user and system CPU time spent in seconds.", - nil, nil, - ), - openFDs: NewDesc( - ns+"process_open_fds", - "Number of open file descriptors.", - nil, nil, - ), - maxFDs: NewDesc( - ns+"process_max_fds", - "Maximum number of open file descriptors.", - nil, nil, - ), - vsize: NewDesc( - ns+"process_virtual_memory_bytes", - "Virtual memory size in bytes.", - nil, nil, - ), - maxVsize: NewDesc( - ns+"process_virtual_memory_max_bytes", - "Maximum amount of virtual memory available in bytes.", - nil, nil, - ), - rss: NewDesc( - ns+"process_resident_memory_bytes", - "Resident memory size in bytes.", - nil, nil, - ), - startTime: NewDesc( - ns+"process_start_time_seconds", - "Start time of the process since unix epoch in seconds.", - nil, nil, - ), - inBytes: NewDesc( - ns+"process_network_receive_bytes_total", - "Number of bytes received by the process over the network.", - nil, nil, - ), - outBytes: NewDesc( - ns+"process_network_transmit_bytes_total", - "Number of bytes sent by the process over the network.", - nil, nil, - ), - } - - if opts.PidFn == nil { - c.pidFn = getPIDFn() - } else { - c.pidFn = opts.PidFn - } - - // Set up process metric collection if supported by the runtime. - if canCollectProcess() { - c.collectFn = c.processCollect - c.describeFn = c.describe - } else { - c.collectFn = c.errorCollectFn - c.describeFn = c.errorDescribeFn - } - - return c -} - -func (c *processCollector) errorCollectFn(ch chan<- Metric) { - c.reportError(ch, nil, errors.New("process metrics not supported on this platform")) -} - -func (c *processCollector) errorDescribeFn(ch chan<- *Desc) { - if c.reportErrors { - ch <- NewInvalidDesc(errors.New("process metrics not supported on this platform")) - } -} - -// Collect returns the current state of all metrics of the collector. -func (c *processCollector) Collect(ch chan<- Metric) { - c.collectFn(ch) -} - -// Describe returns all descriptions of the collector. -func (c *processCollector) Describe(ch chan<- *Desc) { - c.describeFn(ch) -} - -func (c *processCollector) reportError(ch chan<- Metric, desc *Desc, err error) { - if !c.reportErrors { - return - } - if desc == nil { - desc = NewInvalidDesc(err) - } - ch <- NewInvalidMetric(desc, err) -} - -// NewPidFileFn returns a function that retrieves a pid from the specified file. -// It is meant to be used for the PidFn field in ProcessCollectorOpts. -func NewPidFileFn(pidFilePath string) func() (int, error) { - return func() (int, error) { - content, err := os.ReadFile(pidFilePath) - if err != nil { - return 0, fmt.Errorf("can't read pid file %q: %w", pidFilePath, err) - } - pid, err := strconv.Atoi(strings.TrimSpace(string(content))) - if err != nil { - return 0, fmt.Errorf("can't parse pid file %q: %w", pidFilePath, err) - } - - return pid, nil - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go deleted file mode 100644 index b32c95fa3..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_darwin.go +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios - -package prometheus - -import ( - "errors" - "fmt" - "os" - "syscall" - "time" - - "golang.org/x/sys/unix" -) - -// errNotImplemented is returned by stub functions that replace cgo functions, when cgo -// isn't available. -var errNotImplemented = errors.New("not implemented") - -type memoryInfo struct { - vsize uint64 // Virtual memory size in bytes - rss uint64 // Resident memory size in bytes -} - -func canCollectProcess() bool { - return true -} - -func getSoftLimit(which int) (uint64, error) { - rlimit := syscall.Rlimit{} - - if err := syscall.Getrlimit(which, &rlimit); err != nil { - return 0, err - } - - return rlimit.Cur, nil -} - -func getOpenFileCount() (float64, error) { - // Alternately, the undocumented proc_pidinfo(PROC_PIDLISTFDS) can be used to - // return a list of open fds, but that requires a way to call C APIs. The - // benefits, however, include fewer system calls and not failing when at the - // open file soft limit. - - if dir, err := os.Open("/dev/fd"); err != nil { - return 0.0, err - } else { - defer dir.Close() - - // Avoid ReadDir(), as it calls stat(2) on each descriptor. Not only is - // that info not used, but KQUEUE descriptors fail stat(2), which causes - // the whole method to fail. - if names, err := dir.Readdirnames(0); err != nil { - return 0.0, err - } else { - // Subtract 1 to ignore the open /dev/fd descriptor above. - return float64(len(names) - 1), nil - } - } -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - if procs, err := unix.SysctlKinfoProcSlice("kern.proc.pid", os.Getpid()); err == nil { - if len(procs) == 1 { - startTime := float64(procs[0].Proc.P_starttime.Nano() / 1e9) - ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) - } else { - err = fmt.Errorf("sysctl() returned %d proc structs (expected 1)", len(procs)) - c.reportError(ch, c.startTime, err) - } - } else { - c.reportError(ch, c.startTime, err) - } - - // The proc structure returned by kern.proc.pid above has an Rusage member, - // but it is not filled in, so it needs to be fetched by getrusage(2). For - // that call, the UTime, STime, and Maxrss members are filled out, but not - // Ixrss, Idrss, or Isrss for the memory usage. Memory stats will require - // access to the C API to call task_info(TASK_BASIC_INFO). - rusage := unix.Rusage{} - - if err := unix.Getrusage(syscall.RUSAGE_SELF, &rusage); err == nil { - cpuTime := time.Duration(rusage.Stime.Nano() + rusage.Utime.Nano()).Seconds() - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, cpuTime) - } else { - c.reportError(ch, c.cpuTotal, err) - } - - if memInfo, err := getMemory(); err == nil { - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(memInfo.rss)) - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(memInfo.vsize)) - } else if !errors.Is(err, errNotImplemented) { - // Don't report an error when support is not compiled in. - c.reportError(ch, c.rss, err) - c.reportError(ch, c.vsize, err) - } - - if fds, err := getOpenFileCount(); err == nil { - ch <- MustNewConstMetric(c.openFDs, GaugeValue, fds) - } else { - c.reportError(ch, c.openFDs, err) - } - - if openFiles, err := getSoftLimit(syscall.RLIMIT_NOFILE); err == nil { - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(openFiles)) - } else { - c.reportError(ch, c.maxFDs, err) - } - - if addressSpace, err := getSoftLimit(syscall.RLIMIT_AS); err == nil { - ch <- MustNewConstMetric(c.maxVsize, GaugeValue, float64(addressSpace)) - } else { - c.reportError(ch, c.maxVsize, err) - } - - // TODO: socket(PF_SYSTEM) to fetch "com.apple.network.statistics" might - // be able to get the per-process network send/receive counts. -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c deleted file mode 100644 index d00a24315..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.c +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && cgo - -#include -#include -#include - -// The compiler warns that mach/shared_memory_server.h is deprecated, and to use -// mach/shared_region.h instead. But that doesn't define -// SHARED_DATA_REGION_SIZE or SHARED_TEXT_REGION_SIZE, so redefine them here and -// avoid a warning message when running tests. -#define GLOBAL_SHARED_TEXT_SEGMENT 0x90000000U -#define SHARED_DATA_REGION_SIZE 0x10000000 -#define SHARED_TEXT_REGION_SIZE 0x10000000 - - -int get_memory_info(unsigned long long *rss, unsigned long long *vsize) -{ - // This is lightly adapted from how ps(1) obtains its memory info. - // https://github.com/apple-oss-distributions/adv_cmds/blob/8744084ea0ff41ca4bb96b0f9c22407d0e48e9b7/ps/tasks.c#L109 - - kern_return_t error; - task_t task = MACH_PORT_NULL; - mach_task_basic_info_data_t info; - mach_msg_type_number_t info_count = MACH_TASK_BASIC_INFO_COUNT; - - error = task_info( - mach_task_self(), - MACH_TASK_BASIC_INFO, - (task_info_t) &info, - &info_count ); - - if( error != KERN_SUCCESS ) - { - return error; - } - - *rss = info.resident_size; - *vsize = info.virtual_size; - - { - vm_region_basic_info_data_64_t b_info; - mach_vm_address_t address = GLOBAL_SHARED_TEXT_SEGMENT; - mach_vm_size_t size; - mach_port_t object_name; - - /* - * try to determine if this task has the split libraries - * mapped in... if so, adjust its virtual size down by - * the 2 segments that are used for split libraries - */ - info_count = VM_REGION_BASIC_INFO_COUNT_64; - - error = mach_vm_region( - mach_task_self(), - &address, - &size, - VM_REGION_BASIC_INFO_64, - (vm_region_info_t) &b_info, - &info_count, - &object_name); - - if (error == KERN_SUCCESS) { - if (b_info.reserved && size == (SHARED_TEXT_REGION_SIZE) && - *vsize > (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE)) { - *vsize -= (SHARED_TEXT_REGION_SIZE + SHARED_DATA_REGION_SIZE); - } - } - } - - return 0; -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go deleted file mode 100644 index 9ac53f999..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_cgo_darwin.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && cgo - -package prometheus - -/* -int get_memory_info(unsigned long long *rss, unsigned long long *vs); -*/ -import "C" -import "fmt" - -func getMemory() (*memoryInfo, error) { - var rss, vsize C.ulonglong - - if err := C.get_memory_info(&rss, &vsize); err != 0 { - return nil, fmt.Errorf("task_info() failed with 0x%x", int(err)) - } - - return &memoryInfo{vsize: uint64(vsize), rss: uint64(rss)}, nil -} - -// describe returns all descriptions of the collector for Darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.maxVsize - ch <- c.startTime - ch <- c.rss - ch <- c.vsize - - /* the process could be collected but not implemented yet - ch <- c.inBytes - ch <- c.outBytes - */ -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go deleted file mode 100644 index 378865129..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_mem_nocgo_darwin.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2024 The Prometheus 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. - -//go:build darwin && !ios && !cgo - -package prometheus - -func getMemory() (*memoryInfo, error) { - return nil, errNotImplemented -} - -// describe returns all descriptions of the collector for Darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.maxVsize - ch <- c.startTime - - /* the process could be collected but not implemented yet - ch <- c.rss - ch <- c.vsize - ch <- c.inBytes - ch <- c.outBytes - */ -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go deleted file mode 100644 index 7732b7f37..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_not_supported.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2023 The Prometheus 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. - -//go:build wasip1 || js || ios -// +build wasip1 js ios - -package prometheus - -func canCollectProcess() bool { - return false -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - c.errorCollectFn(ch) -} - -// describe returns all descriptions of the collector for wasip1 and js. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - c.errorDescribeFn(ch) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go deleted file mode 100644 index 8074f70f5..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_procfsenabled.go +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright 2019 The Prometheus 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. - -//go:build !windows && !js && !wasip1 && !darwin -// +build !windows,!js,!wasip1,!darwin - -package prometheus - -import ( - "github.com/prometheus/procfs" -) - -func canCollectProcess() bool { - _, err := procfs.NewDefaultFS() - return err == nil -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - pid, err := c.pidFn() - if err != nil { - c.reportError(ch, nil, err) - return - } - - p, err := procfs.NewProc(pid) - if err != nil { - c.reportError(ch, nil, err) - return - } - - if stat, err := p.Stat(); err == nil { - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, stat.CPUTime()) - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(stat.VirtualMemory())) - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(stat.ResidentMemory())) - if startTime, err := stat.StartTime(); err == nil { - ch <- MustNewConstMetric(c.startTime, GaugeValue, startTime) - } else { - c.reportError(ch, c.startTime, err) - } - } else { - c.reportError(ch, nil, err) - } - - if fds, err := p.FileDescriptorsLen(); err == nil { - ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(fds)) - } else { - c.reportError(ch, c.openFDs, err) - } - - if limits, err := p.Limits(); err == nil { - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(limits.OpenFiles)) - ch <- MustNewConstMetric(c.maxVsize, GaugeValue, float64(limits.AddressSpace)) - } else { - c.reportError(ch, nil, err) - } - - if netstat, err := p.Netstat(); err == nil { - var inOctets, outOctets float64 - if netstat.InOctets != nil { - inOctets = *netstat.InOctets - } - if netstat.OutOctets != nil { - outOctets = *netstat.OutOctets - } - ch <- MustNewConstMetric(c.inBytes, CounterValue, inOctets) - ch <- MustNewConstMetric(c.outBytes, CounterValue, outOctets) - } else { - c.reportError(ch, nil, err) - } -} - -// describe returns all descriptions of the collector for others than windows, js, wasip1 and darwin. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.vsize - ch <- c.maxVsize - ch <- c.rss - ch <- c.startTime - ch <- c.inBytes - ch <- c.outBytes -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go b/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go deleted file mode 100644 index fa474289e..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/process_collector_windows.go +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright 2019 The Prometheus 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 prometheus - -import ( - "syscall" - "unsafe" - - "golang.org/x/sys/windows" -) - -func canCollectProcess() bool { - return true -} - -var ( - modpsapi = syscall.NewLazyDLL("psapi.dll") - modkernel32 = syscall.NewLazyDLL("kernel32.dll") - - procGetProcessMemoryInfo = modpsapi.NewProc("GetProcessMemoryInfo") - procGetProcessHandleCount = modkernel32.NewProc("GetProcessHandleCount") -) - -type processMemoryCounters struct { - // System interface description - // https://docs.microsoft.com/en-us/windows/desktop/api/psapi/ns-psapi-process_memory_counters_ex - - // Refer to the Golang internal implementation - // https://golang.org/src/internal/syscall/windows/psapi_windows.go - _ uint32 - PageFaultCount uint32 - PeakWorkingSetSize uintptr - WorkingSetSize uintptr - QuotaPeakPagedPoolUsage uintptr - QuotaPagedPoolUsage uintptr - QuotaPeakNonPagedPoolUsage uintptr - QuotaNonPagedPoolUsage uintptr - PagefileUsage uintptr - PeakPagefileUsage uintptr - PrivateUsage uintptr -} - -func getProcessMemoryInfo(handle windows.Handle) (processMemoryCounters, error) { - mem := processMemoryCounters{} - r1, _, err := procGetProcessMemoryInfo.Call( - uintptr(handle), - uintptr(unsafe.Pointer(&mem)), - uintptr(unsafe.Sizeof(mem)), - ) - if r1 != 1 { - return mem, err - } else { - return mem, nil - } -} - -func getProcessHandleCount(handle windows.Handle) (uint32, error) { - var count uint32 - r1, _, err := procGetProcessHandleCount.Call( - uintptr(handle), - uintptr(unsafe.Pointer(&count)), - ) - if r1 != 1 { - return 0, err - } else { - return count, nil - } -} - -func (c *processCollector) processCollect(ch chan<- Metric) { - h := windows.CurrentProcess() - - var startTime, exitTime, kernelTime, userTime windows.Filetime - err := windows.GetProcessTimes(h, &startTime, &exitTime, &kernelTime, &userTime) - if err != nil { - c.reportError(ch, nil, err) - return - } - ch <- MustNewConstMetric(c.startTime, GaugeValue, float64(startTime.Nanoseconds()/1e9)) - ch <- MustNewConstMetric(c.cpuTotal, CounterValue, fileTimeToSeconds(kernelTime)+fileTimeToSeconds(userTime)) - - mem, err := getProcessMemoryInfo(h) - if err != nil { - c.reportError(ch, nil, err) - return - } - ch <- MustNewConstMetric(c.vsize, GaugeValue, float64(mem.PrivateUsage)) - ch <- MustNewConstMetric(c.rss, GaugeValue, float64(mem.WorkingSetSize)) - - handles, err := getProcessHandleCount(h) - if err != nil { - c.reportError(ch, nil, err) - return - } - ch <- MustNewConstMetric(c.openFDs, GaugeValue, float64(handles)) - ch <- MustNewConstMetric(c.maxFDs, GaugeValue, float64(16*1024*1024)) // Windows has a hard-coded max limit, not per-process. -} - -// describe returns all descriptions of the collector for windows. -// Ensure that this list of descriptors is kept in sync with the metrics collected -// in the processCollect method. Any changes to the metrics in processCollect -// (such as adding or removing metrics) should be reflected in this list of descriptors. -func (c *processCollector) describe(ch chan<- *Desc) { - ch <- c.cpuTotal - ch <- c.openFDs - ch <- c.maxFDs - ch <- c.vsize - ch <- c.rss - ch <- c.startTime -} - -func fileTimeToSeconds(ft windows.Filetime) float64 { - return float64(uint64(ft.HighDateTime)<<32+uint64(ft.LowDateTime)) / 1e7 -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go deleted file mode 100644 index 315eab5f1..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/delegator.go +++ /dev/null @@ -1,380 +0,0 @@ -// Copyright 2017 The Prometheus 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 promhttp - -import ( - "bufio" - "io" - "net" - "net/http" -) - -const ( - closeNotifier = 1 << iota - flusher - hijacker - readerFrom - pusher -) - -type delegator interface { - http.ResponseWriter - - Status() int - Written() int64 -} - -type responseWriterDelegator struct { - http.ResponseWriter - - status int - written int64 - wroteHeader bool - observeWriteHeader func(int) -} - -func (r *responseWriterDelegator) Status() int { - return r.status -} - -func (r *responseWriterDelegator) Written() int64 { - return r.written -} - -func (r *responseWriterDelegator) WriteHeader(code int) { - if r.observeWriteHeader != nil && !r.wroteHeader { - // Only call observeWriteHeader for the 1st time. It's a bug if - // WriteHeader is called more than once, but we want to protect - // against it here. Note that we still delegate the WriteHeader - // to the original ResponseWriter to not mask the bug from it. - r.observeWriteHeader(code) - } - r.status = code - r.wroteHeader = true - r.ResponseWriter.WriteHeader(code) -} - -func (r *responseWriterDelegator) Write(b []byte) (int, error) { - // If applicable, call WriteHeader here so that observeWriteHeader is - // handled appropriately. - if !r.wroteHeader { - r.WriteHeader(http.StatusOK) - } - n, err := r.ResponseWriter.Write(b) - r.written += int64(n) - return n, err -} - -// Unwrap lets http.ResponseController get the underlying http.ResponseWriter, -// by implementing the [rwUnwrapper](https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/net/http/responsecontroller.go;l=42-44) interface. -func (r *responseWriterDelegator) Unwrap() http.ResponseWriter { - return r.ResponseWriter -} - -type ( - closeNotifierDelegator struct{ *responseWriterDelegator } - flusherDelegator struct{ *responseWriterDelegator } - hijackerDelegator struct{ *responseWriterDelegator } - readerFromDelegator struct{ *responseWriterDelegator } - pusherDelegator struct{ *responseWriterDelegator } -) - -func (d closeNotifierDelegator) CloseNotify() <-chan bool { - //nolint:staticcheck // Ignore SA1019. http.CloseNotifier is deprecated but we keep it here to not break existing users. - return d.ResponseWriter.(http.CloseNotifier).CloseNotify() -} - -func (d flusherDelegator) Flush() { - // If applicable, call WriteHeader here so that observeWriteHeader is - // handled appropriately. - if !d.wroteHeader { - d.WriteHeader(http.StatusOK) - } - d.ResponseWriter.(http.Flusher).Flush() -} - -func (d hijackerDelegator) Hijack() (net.Conn, *bufio.ReadWriter, error) { - return d.ResponseWriter.(http.Hijacker).Hijack() -} - -func (d readerFromDelegator) ReadFrom(re io.Reader) (int64, error) { - // If applicable, call WriteHeader here so that observeWriteHeader is - // handled appropriately. - if !d.wroteHeader { - d.WriteHeader(http.StatusOK) - } - n, err := d.ResponseWriter.(io.ReaderFrom).ReadFrom(re) - d.written += n - return n, err -} - -func (d pusherDelegator) Push(target string, opts *http.PushOptions) error { - return d.ResponseWriter.(http.Pusher).Push(target, opts) -} - -var pickDelegator = make([]func(*responseWriterDelegator) delegator, 32) - -func init() { - // TODO(beorn7): Code generation would help here. - pickDelegator[0] = func(d *responseWriterDelegator) delegator { // 0 - return d - } - pickDelegator[closeNotifier] = func(d *responseWriterDelegator) delegator { // 1 - return closeNotifierDelegator{d} - } - pickDelegator[flusher] = func(d *responseWriterDelegator) delegator { // 2 - return flusherDelegator{d} - } - pickDelegator[flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 3 - return struct { - *responseWriterDelegator - http.Flusher - http.CloseNotifier - }{d, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[hijacker] = func(d *responseWriterDelegator) delegator { // 4 - return hijackerDelegator{d} - } - pickDelegator[hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 5 - return struct { - *responseWriterDelegator - http.Hijacker - http.CloseNotifier - }{d, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 6 - return struct { - *responseWriterDelegator - http.Hijacker - http.Flusher - }{d, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 7 - return struct { - *responseWriterDelegator - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[readerFrom] = func(d *responseWriterDelegator) delegator { // 8 - return readerFromDelegator{d} - } - pickDelegator[readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 9 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.CloseNotifier - }{d, readerFromDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 10 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Flusher - }{d, readerFromDelegator{d}, flusherDelegator{d}} - } - pickDelegator[readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 11 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Flusher - http.CloseNotifier - }{d, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 12 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Hijacker - }{d, readerFromDelegator{d}, hijackerDelegator{d}} - } - pickDelegator[readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 13 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Hijacker - http.CloseNotifier - }{d, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 14 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Hijacker - http.Flusher - }{d, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 15 - return struct { - *responseWriterDelegator - io.ReaderFrom - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher] = func(d *responseWriterDelegator) delegator { // 16 - return pusherDelegator{d} - } - pickDelegator[pusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 17 - return struct { - *responseWriterDelegator - http.Pusher - http.CloseNotifier - }{d, pusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+flusher] = func(d *responseWriterDelegator) delegator { // 18 - return struct { - *responseWriterDelegator - http.Pusher - http.Flusher - }{d, pusherDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 19 - return struct { - *responseWriterDelegator - http.Pusher - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+hijacker] = func(d *responseWriterDelegator) delegator { // 20 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - }{d, pusherDelegator{d}, hijackerDelegator{d}} - } - pickDelegator[pusher+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 21 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.CloseNotifier - }{d, pusherDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 22 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.Flusher - }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 23 - return struct { - *responseWriterDelegator - http.Pusher - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom] = func(d *responseWriterDelegator) delegator { // 24 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - }{d, pusherDelegator{d}, readerFromDelegator{d}} - } - pickDelegator[pusher+readerFrom+closeNotifier] = func(d *responseWriterDelegator) delegator { // 25 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+flusher] = func(d *responseWriterDelegator) delegator { // 26 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Flusher - }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+readerFrom+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 27 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker] = func(d *responseWriterDelegator) delegator { // 28 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+closeNotifier] = func(d *responseWriterDelegator) delegator { // 29 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, closeNotifierDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+flusher] = func(d *responseWriterDelegator) delegator { // 30 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.Flusher - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}} - } - pickDelegator[pusher+readerFrom+hijacker+flusher+closeNotifier] = func(d *responseWriterDelegator) delegator { // 31 - return struct { - *responseWriterDelegator - http.Pusher - io.ReaderFrom - http.Hijacker - http.Flusher - http.CloseNotifier - }{d, pusherDelegator{d}, readerFromDelegator{d}, hijackerDelegator{d}, flusherDelegator{d}, closeNotifierDelegator{d}} - } -} - -func newDelegator(w http.ResponseWriter, observeWriteHeaderFunc func(int)) delegator { - d := &responseWriterDelegator{ - ResponseWriter: w, - observeWriteHeader: observeWriteHeaderFunc, - } - - id := 0 - //nolint:staticcheck // Ignore SA1019. http.CloseNotifier is deprecated but we keep it here to not break existing users. - if _, ok := w.(http.CloseNotifier); ok { - id += closeNotifier - } - if _, ok := w.(http.Flusher); ok { - id += flusher - } - if _, ok := w.(http.Hijacker); ok { - id += hijacker - } - if _, ok := w.(io.ReaderFrom); ok { - id += readerFrom - } - if _, ok := w.(http.Pusher); ok { - id += pusher - } - - return pickDelegator[id](d) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go deleted file mode 100644 index 763d99e36..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/http.go +++ /dev/null @@ -1,492 +0,0 @@ -// Copyright 2016 The Prometheus 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 promhttp provides tooling around HTTP servers and clients. -// -// First, the package allows the creation of http.Handler instances to expose -// Prometheus metrics via HTTP. promhttp.Handler acts on the -// prometheus.DefaultGatherer. With HandlerFor, you can create a handler for a -// custom registry or anything that implements the Gatherer interface. It also -// allows the creation of handlers that act differently on errors or allow to -// log errors. -// -// Second, the package provides tooling to instrument instances of http.Handler -// via middleware. Middleware wrappers follow the naming scheme -// InstrumentHandlerX, where X describes the intended use of the middleware. -// See each function's doc comment for specific details. -// -// Finally, the package allows for an http.RoundTripper to be instrumented via -// middleware. Middleware wrappers follow the naming scheme -// InstrumentRoundTripperX, where X describes the intended use of the -// middleware. See each function's doc comment for specific details. -package promhttp - -import ( - "compress/gzip" - "errors" - "fmt" - "io" - "net/http" - "strconv" - "sync" - "time" - - "github.com/prometheus/common/expfmt" - - "github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil" - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/promhttp/internal" -) - -const ( - contentTypeHeader = "Content-Type" - contentEncodingHeader = "Content-Encoding" - acceptEncodingHeader = "Accept-Encoding" - processStartTimeHeader = "Process-Start-Time-Unix" -) - -// Compression represents the content encodings handlers support for the HTTP -// responses. -type Compression string - -const ( - Identity Compression = "identity" - Gzip Compression = "gzip" - Zstd Compression = "zstd" -) - -func defaultCompressionFormats() []Compression { - if internal.NewZstdWriter != nil { - return []Compression{Identity, Gzip, Zstd} - } else { - return []Compression{Identity, Gzip} - } -} - -var gzipPool = sync.Pool{ - New: func() interface{} { - return gzip.NewWriter(nil) - }, -} - -// Handler returns an http.Handler for the prometheus.DefaultGatherer, using -// default HandlerOpts, i.e. it reports the first error as an HTTP error, it has -// no error logging, and it applies compression if requested by the client. -// -// The returned http.Handler is already instrumented using the -// InstrumentMetricHandler function and the prometheus.DefaultRegisterer. If you -// create multiple http.Handlers by separate calls of the Handler function, the -// metrics used for instrumentation will be shared between them, providing -// global scrape counts. -// -// This function is meant to cover the bulk of basic use cases. If you are doing -// anything that requires more customization (including using a non-default -// Gatherer, different instrumentation, and non-default HandlerOpts), use the -// HandlerFor function. See there for details. -func Handler() http.Handler { - return InstrumentMetricHandler( - prometheus.DefaultRegisterer, HandlerFor(prometheus.DefaultGatherer, HandlerOpts{}), - ) -} - -// HandlerFor returns an uninstrumented http.Handler for the provided -// Gatherer. The behavior of the Handler is defined by the provided -// HandlerOpts. Thus, HandlerFor is useful to create http.Handlers for custom -// Gatherers, with non-default HandlerOpts, and/or with custom (or no) -// instrumentation. Use the InstrumentMetricHandler function to apply the same -// kind of instrumentation as it is used by the Handler function. -func HandlerFor(reg prometheus.Gatherer, opts HandlerOpts) http.Handler { - return HandlerForTransactional(prometheus.ToTransactionalGatherer(reg), opts) -} - -// HandlerForTransactional is like HandlerFor, but it uses transactional gather, which -// can safely change in-place returned *dto.MetricFamily before call to `Gather` and after -// call to `done` of that `Gather`. -func HandlerForTransactional(reg prometheus.TransactionalGatherer, opts HandlerOpts) http.Handler { - var ( - inFlightSem chan struct{} - errCnt = prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "promhttp_metric_handler_errors_total", - Help: "Total number of internal errors encountered by the promhttp metric handler.", - }, - []string{"cause"}, - ) - ) - - if opts.MaxRequestsInFlight > 0 { - inFlightSem = make(chan struct{}, opts.MaxRequestsInFlight) - } - if opts.Registry != nil { - // Initialize all possibilities that can occur below. - errCnt.WithLabelValues("gathering") - errCnt.WithLabelValues("encoding") - if err := opts.Registry.Register(errCnt); err != nil { - are := &prometheus.AlreadyRegisteredError{} - if errors.As(err, are) { - errCnt = are.ExistingCollector.(*prometheus.CounterVec) - } else { - panic(err) - } - } - } - - // Select compression formats to offer based on default or user choice. - var compressions []string - if !opts.DisableCompression { - offers := defaultCompressionFormats() - if len(opts.OfferedCompressions) > 0 { - offers = opts.OfferedCompressions - } - for _, comp := range offers { - compressions = append(compressions, string(comp)) - } - } - - h := http.HandlerFunc(func(rsp http.ResponseWriter, req *http.Request) { - if !opts.ProcessStartTime.IsZero() { - rsp.Header().Set(processStartTimeHeader, strconv.FormatInt(opts.ProcessStartTime.Unix(), 10)) - } - if inFlightSem != nil { - select { - case inFlightSem <- struct{}{}: // All good, carry on. - defer func() { <-inFlightSem }() - default: - http.Error(rsp, fmt.Sprintf( - "Limit of concurrent requests reached (%d), try again later.", opts.MaxRequestsInFlight, - ), http.StatusServiceUnavailable) - return - } - } - mfs, done, err := reg.Gather() - defer done() - if err != nil { - if opts.ErrorLog != nil { - opts.ErrorLog.Println("error gathering metrics:", err) - } - errCnt.WithLabelValues("gathering").Inc() - switch opts.ErrorHandling { - case PanicOnError: - panic(err) - case ContinueOnError: - if len(mfs) == 0 { - // Still report the error if no metrics have been gathered. - httpError(rsp, err) - return - } - case HTTPErrorOnError: - httpError(rsp, err) - return - } - } - - var contentType expfmt.Format - if opts.EnableOpenMetrics { - contentType = expfmt.NegotiateIncludingOpenMetrics(req.Header) - } else { - contentType = expfmt.Negotiate(req.Header) - } - rsp.Header().Set(contentTypeHeader, string(contentType)) - - w, encodingHeader, closeWriter, err := negotiateEncodingWriter(req, rsp, compressions) - if err != nil { - if opts.ErrorLog != nil { - opts.ErrorLog.Println("error getting writer", err) - } - w = io.Writer(rsp) - encodingHeader = string(Identity) - } - - defer closeWriter() - - // Set Content-Encoding only when data is compressed - if encodingHeader != string(Identity) { - rsp.Header().Set(contentEncodingHeader, encodingHeader) - } - - var enc expfmt.Encoder - if opts.EnableOpenMetricsTextCreatedSamples { - enc = expfmt.NewEncoder(w, contentType, expfmt.WithCreatedLines()) - } else { - enc = expfmt.NewEncoder(w, contentType) - } - - // handleError handles the error according to opts.ErrorHandling - // and returns true if we have to abort after the handling. - handleError := func(err error) bool { - if err == nil { - return false - } - if opts.ErrorLog != nil { - opts.ErrorLog.Println("error encoding and sending metric family:", err) - } - errCnt.WithLabelValues("encoding").Inc() - switch opts.ErrorHandling { - case PanicOnError: - panic(err) - case HTTPErrorOnError: - // We cannot really send an HTTP error at this - // point because we most likely have written - // something to rsp already. But at least we can - // stop sending. - return true - } - // Do nothing in all other cases, including ContinueOnError. - return false - } - - for _, mf := range mfs { - if handleError(enc.Encode(mf)) { - return - } - } - if closer, ok := enc.(expfmt.Closer); ok { - // This in particular takes care of the final "# EOF\n" line for OpenMetrics. - if handleError(closer.Close()) { - return - } - } - }) - - if opts.Timeout <= 0 { - return h - } - return http.TimeoutHandler(h, opts.Timeout, fmt.Sprintf( - "Exceeded configured timeout of %v.\n", - opts.Timeout, - )) -} - -// InstrumentMetricHandler is usually used with an http.Handler returned by the -// HandlerFor function. It instruments the provided http.Handler with two -// metrics: A counter vector "promhttp_metric_handler_requests_total" to count -// scrapes partitioned by HTTP status code, and a gauge -// "promhttp_metric_handler_requests_in_flight" to track the number of -// simultaneous scrapes. This function idempotently registers collectors for -// both metrics with the provided Registerer. It panics if the registration -// fails. The provided metrics are useful to see how many scrapes hit the -// monitored target (which could be from different Prometheus servers or other -// scrapers), and how often they overlap (which would result in more than one -// scrape in flight at the same time). Note that the scrapes-in-flight gauge -// will contain the scrape by which it is exposed, while the scrape counter will -// only get incremented after the scrape is complete (as only then the status -// code is known). For tracking scrape durations, use the -// "scrape_duration_seconds" gauge created by the Prometheus server upon each -// scrape. -func InstrumentMetricHandler(reg prometheus.Registerer, handler http.Handler) http.Handler { - cnt := prometheus.NewCounterVec( - prometheus.CounterOpts{ - Name: "promhttp_metric_handler_requests_total", - Help: "Total number of scrapes by HTTP status code.", - }, - []string{"code"}, - ) - // Initialize the most likely HTTP status codes. - cnt.WithLabelValues("200") - cnt.WithLabelValues("500") - cnt.WithLabelValues("503") - if err := reg.Register(cnt); err != nil { - are := &prometheus.AlreadyRegisteredError{} - if errors.As(err, are) { - cnt = are.ExistingCollector.(*prometheus.CounterVec) - } else { - panic(err) - } - } - - gge := prometheus.NewGauge(prometheus.GaugeOpts{ - Name: "promhttp_metric_handler_requests_in_flight", - Help: "Current number of scrapes being served.", - }) - if err := reg.Register(gge); err != nil { - are := &prometheus.AlreadyRegisteredError{} - if errors.As(err, are) { - gge = are.ExistingCollector.(prometheus.Gauge) - } else { - panic(err) - } - } - - return InstrumentHandlerCounter(cnt, InstrumentHandlerInFlight(gge, handler)) -} - -// HandlerErrorHandling defines how a Handler serving metrics will handle -// errors. -type HandlerErrorHandling int - -// These constants cause handlers serving metrics to behave as described if -// errors are encountered. -const ( - // Serve an HTTP status code 500 upon the first error - // encountered. Report the error message in the body. Note that HTTP - // errors cannot be served anymore once the beginning of a regular - // payload has been sent. Thus, in the (unlikely) case that encoding the - // payload into the negotiated wire format fails, serving the response - // will simply be aborted. Set an ErrorLog in HandlerOpts to detect - // those errors. - HTTPErrorOnError HandlerErrorHandling = iota - // Ignore errors and try to serve as many metrics as possible. However, - // if no metrics can be served, serve an HTTP status code 500 and the - // last error message in the body. Only use this in deliberate "best - // effort" metrics collection scenarios. In this case, it is highly - // recommended to provide other means of detecting errors: By setting an - // ErrorLog in HandlerOpts, the errors are logged. By providing a - // Registry in HandlerOpts, the exposed metrics include an error counter - // "promhttp_metric_handler_errors_total", which can be used for - // alerts. - ContinueOnError - // Panic upon the first error encountered (useful for "crash only" apps). - PanicOnError -) - -// Logger is the minimal interface HandlerOpts needs for logging. Note that -// log.Logger from the standard library implements this interface, and it is -// easy to implement by custom loggers, if they don't do so already anyway. -type Logger interface { - Println(v ...interface{}) -} - -// HandlerOpts specifies options how to serve metrics via an http.Handler. The -// zero value of HandlerOpts is a reasonable default. -type HandlerOpts struct { - // ErrorLog specifies an optional Logger for errors collecting and - // serving metrics. If nil, errors are not logged at all. Note that the - // type of a reported error is often prometheus.MultiError, which - // formats into a multi-line error string. If you want to avoid the - // latter, create a Logger implementation that detects a - // prometheus.MultiError and formats the contained errors into one line. - ErrorLog Logger - // ErrorHandling defines how errors are handled. Note that errors are - // logged regardless of the configured ErrorHandling provided ErrorLog - // is not nil. - ErrorHandling HandlerErrorHandling - // If Registry is not nil, it is used to register a metric - // "promhttp_metric_handler_errors_total", partitioned by "cause". A - // failed registration causes a panic. Note that this error counter is - // different from the instrumentation you get from the various - // InstrumentHandler... helpers. It counts errors that don't necessarily - // result in a non-2xx HTTP status code. There are two typical cases: - // (1) Encoding errors that only happen after streaming of the HTTP body - // has already started (and the status code 200 has been sent). This - // should only happen with custom collectors. (2) Collection errors with - // no effect on the HTTP status code because ErrorHandling is set to - // ContinueOnError. - Registry prometheus.Registerer - // DisableCompression disables the response encoding (compression) and - // encoding negotiation. If true, the handler will - // never compress the response, even if requested - // by the client and the OfferedCompressions field is set. - DisableCompression bool - // OfferedCompressions is a set of encodings (compressions) handler will - // try to offer when negotiating with the client. This defaults to identity, gzip - // and zstd. - // NOTE: If handler can't agree with the client on the encodings or - // unsupported or empty encodings are set in OfferedCompressions, - // handler always fallbacks to no compression (identity), for - // compatibility reasons. In such cases ErrorLog will be used if set. - OfferedCompressions []Compression - // The number of concurrent HTTP requests is limited to - // MaxRequestsInFlight. Additional requests are responded to with 503 - // Service Unavailable and a suitable message in the body. If - // MaxRequestsInFlight is 0 or negative, no limit is applied. - MaxRequestsInFlight int - // If handling a request takes longer than Timeout, it is responded to - // with 503 ServiceUnavailable and a suitable Message. No timeout is - // applied if Timeout is 0 or negative. Note that with the current - // implementation, reaching the timeout simply ends the HTTP requests as - // described above (and even that only if sending of the body hasn't - // started yet), while the bulk work of gathering all the metrics keeps - // running in the background (with the eventual result to be thrown - // away). Until the implementation is improved, it is recommended to - // implement a separate timeout in potentially slow Collectors. - Timeout time.Duration - // If true, the experimental OpenMetrics encoding is added to the - // possible options during content negotiation. Note that Prometheus - // 2.5.0+ will negotiate OpenMetrics as first priority. OpenMetrics is - // the only way to transmit exemplars. However, the move to OpenMetrics - // is not completely transparent. Most notably, the values of "quantile" - // labels of Summaries and "le" labels of Histograms are formatted with - // a trailing ".0" if they would otherwise look like integer numbers - // (which changes the identity of the resulting series on the Prometheus - // server). - EnableOpenMetrics bool - // EnableOpenMetricsTextCreatedSamples specifies if this handler should add, extra, synthetic - // Created Timestamps for counters, histograms and summaries, which for the current - // version of OpenMetrics are defined as extra series with the same name and "_created" - // suffix. See also the OpenMetrics specification for more details - // https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#counter-1 - // - // Created timestamps are used to improve the accuracy of reset detection, - // but the way it's designed in OpenMetrics 1.0 it also dramatically increases cardinality - // if the scraper does not handle those metrics correctly (converting to created timestamp - // instead of leaving those series as-is). New OpenMetrics versions might improve - // this situation. - // - // Prometheus introduced the feature flag 'created-timestamp-zero-ingestion' - // in version 2.50.0 to handle this situation. - EnableOpenMetricsTextCreatedSamples bool - // ProcessStartTime allows setting process start timevalue that will be exposed - // with "Process-Start-Time-Unix" response header along with the metrics - // payload. This allow callers to have efficient transformations to cumulative - // counters (e.g. OpenTelemetry) or generally _created timestamp estimation per - // scrape target. - // NOTE: This feature is experimental and not covered by OpenMetrics or Prometheus - // exposition format. - ProcessStartTime time.Time -} - -// httpError removes any content-encoding header and then calls http.Error with -// the provided error and http.StatusInternalServerError. Error contents is -// supposed to be uncompressed plain text. Same as with a plain http.Error, this -// must not be called if the header or any payload has already been sent. -func httpError(rsp http.ResponseWriter, err error) { - rsp.Header().Del(contentEncodingHeader) - http.Error( - rsp, - "An error has occurred while serving metrics:\n\n"+err.Error(), - http.StatusInternalServerError, - ) -} - -// negotiateEncodingWriter reads the Accept-Encoding header from a request and -// selects the right compression based on an allow-list of supported -// compressions. It returns a writer implementing the compression and an the -// correct value that the caller can set in the response header. -func negotiateEncodingWriter(r *http.Request, rw io.Writer, compressions []string) (_ io.Writer, encodingHeaderValue string, closeWriter func(), _ error) { - if len(compressions) == 0 { - return rw, string(Identity), func() {}, nil - } - - // TODO(mrueg): Replace internal/github.com/gddo once https://github.com/golang/go/issues/19307 is implemented. - selected := httputil.NegotiateContentEncoding(r, compressions) - - switch selected { - case "zstd": - if internal.NewZstdWriter == nil { - // The content encoding was not implemented yet. - return nil, "", func() {}, fmt.Errorf("content compression format not recognized: %s. Valid formats are: %s", selected, defaultCompressionFormats()) - } - writer, closeWriter, err := internal.NewZstdWriter(rw) - return writer, selected, closeWriter, err - case "gzip": - gz := gzipPool.Get().(*gzip.Writer) - gz.Reset(rw) - return gz, selected, func() { _ = gz.Close(); gzipPool.Put(gz) }, nil - case "identity": - // This means the content is not compressed. - return rw, selected, func() {}, nil - default: - // The content encoding was not implemented yet. - return nil, "", func() {}, fmt.Errorf("content compression format not recognized: %s. Valid formats are: %s", selected, defaultCompressionFormats()) - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go deleted file mode 100644 index d3482c40c..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_client.go +++ /dev/null @@ -1,249 +0,0 @@ -// Copyright 2017 The Prometheus 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 promhttp - -import ( - "crypto/tls" - "net/http" - "net/http/httptrace" - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -// The RoundTripperFunc type is an adapter to allow the use of ordinary -// functions as RoundTrippers. If f is a function with the appropriate -// signature, RountTripperFunc(f) is a RoundTripper that calls f. -type RoundTripperFunc func(req *http.Request) (*http.Response, error) - -// RoundTrip implements the RoundTripper interface. -func (rt RoundTripperFunc) RoundTrip(r *http.Request) (*http.Response, error) { - return rt(r) -} - -// InstrumentRoundTripperInFlight is a middleware that wraps the provided -// http.RoundTripper. It sets the provided prometheus.Gauge to the number of -// requests currently handled by the wrapped http.RoundTripper. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperInFlight(gauge prometheus.Gauge, next http.RoundTripper) RoundTripperFunc { - return func(r *http.Request) (*http.Response, error) { - gauge.Inc() - defer gauge.Dec() - return next.RoundTrip(r) - } -} - -// InstrumentRoundTripperCounter is a middleware that wraps the provided -// http.RoundTripper to observe the request result with the provided CounterVec. -// The CounterVec must have zero, one, or two non-const non-curried labels. For -// those, the only allowed label names are "code" and "method". The function -// panics otherwise. For the "method" label a predefined default label value set -// is used to filter given values. Values besides predefined values will count -// as `unknown` method.`WithExtraMethods` can be used to add more -// methods to the set. Partitioning of the CounterVec happens by HTTP status code -// and/or HTTP method if the respective instance label names are present in the -// CounterVec. For unpartitioned counting, use a CounterVec with zero labels. -// -// If the wrapped RoundTripper panics or returns a non-nil error, the Counter -// is not incremented. -// -// Use with WithExemplarFromContext to instrument the exemplars on the counter of requests. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperCounter(counter *prometheus.CounterVec, next http.RoundTripper, opts ...Option) RoundTripperFunc { - rtOpts := defaultOptions() - for _, o := range opts { - o.apply(rtOpts) - } - - // Curry the counter with dynamic labels before checking the remaining labels. - code, method := checkLabels(counter.MustCurryWith(rtOpts.emptyDynamicLabels())) - - return func(r *http.Request) (*http.Response, error) { - resp, err := next.RoundTrip(r) - if err == nil { - l := labels(code, method, r.Method, resp.StatusCode, rtOpts.extraMethods...) - for label, resolve := range rtOpts.extraLabelsFromCtx { - l[label] = resolve(resp.Request.Context()) - } - addWithExemplar(counter.With(l), 1, rtOpts.getExemplarFn(r.Context())) - } - return resp, err - } -} - -// InstrumentRoundTripperDuration is a middleware that wraps the provided -// http.RoundTripper to observe the request duration with the provided -// ObserverVec. The ObserverVec must have zero, one, or two non-const -// non-curried labels. For those, the only allowed label names are "code" and -// "method". The function panics otherwise. For the "method" label a predefined -// default label value set is used to filter given values. Values besides -// predefined values will count as `unknown` method. `WithExtraMethods` -// can be used to add more methods to the set. The Observe method of the Observer -// in the ObserverVec is called with the request duration in -// seconds. Partitioning happens by HTTP status code and/or HTTP method if the -// respective instance label names are present in the ObserverVec. For -// unpartitioned observations, use an ObserverVec with zero labels. Note that -// partitioning of Histograms is expensive and should be used judiciously. -// -// If the wrapped RoundTripper panics or returns a non-nil error, no values are -// reported. -// -// Use with WithExemplarFromContext to instrument the exemplars on the duration histograms. -// -// Note that this method is only guaranteed to never observe negative durations -// if used with Go1.9+. -func InstrumentRoundTripperDuration(obs prometheus.ObserverVec, next http.RoundTripper, opts ...Option) RoundTripperFunc { - rtOpts := defaultOptions() - for _, o := range opts { - o.apply(rtOpts) - } - - // Curry the observer with dynamic labels before checking the remaining labels. - code, method := checkLabels(obs.MustCurryWith(rtOpts.emptyDynamicLabels())) - - return func(r *http.Request) (*http.Response, error) { - start := time.Now() - resp, err := next.RoundTrip(r) - if err == nil { - l := labels(code, method, r.Method, resp.StatusCode, rtOpts.extraMethods...) - for label, resolve := range rtOpts.extraLabelsFromCtx { - l[label] = resolve(resp.Request.Context()) - } - observeWithExemplar(obs.With(l), time.Since(start).Seconds(), rtOpts.getExemplarFn(r.Context())) - } - return resp, err - } -} - -// InstrumentTrace is used to offer flexibility in instrumenting the available -// httptrace.ClientTrace hook functions. Each function is passed a float64 -// representing the time in seconds since the start of the http request. A user -// may choose to use separately buckets Histograms, or implement custom -// instance labels on a per function basis. -type InstrumentTrace struct { - GotConn func(float64) - PutIdleConn func(float64) - GotFirstResponseByte func(float64) - Got100Continue func(float64) - DNSStart func(float64) - DNSDone func(float64) - ConnectStart func(float64) - ConnectDone func(float64) - TLSHandshakeStart func(float64) - TLSHandshakeDone func(float64) - WroteHeaders func(float64) - Wait100Continue func(float64) - WroteRequest func(float64) -} - -// InstrumentRoundTripperTrace is a middleware that wraps the provided -// RoundTripper and reports times to hook functions provided in the -// InstrumentTrace struct. Hook functions that are not present in the provided -// InstrumentTrace struct are ignored. Times reported to the hook functions are -// time since the start of the request. Only with Go1.9+, those times are -// guaranteed to never be negative. (Earlier Go versions are not using a -// monotonic clock.) Note that partitioning of Histograms is expensive and -// should be used judiciously. -// -// For hook functions that receive an error as an argument, no observations are -// made in the event of a non-nil error value. -// -// See the example for ExampleInstrumentRoundTripperDuration for example usage. -func InstrumentRoundTripperTrace(it *InstrumentTrace, next http.RoundTripper) RoundTripperFunc { - return func(r *http.Request) (*http.Response, error) { - start := time.Now() - - trace := &httptrace.ClientTrace{ - GotConn: func(_ httptrace.GotConnInfo) { - if it.GotConn != nil { - it.GotConn(time.Since(start).Seconds()) - } - }, - PutIdleConn: func(err error) { - if err != nil { - return - } - if it.PutIdleConn != nil { - it.PutIdleConn(time.Since(start).Seconds()) - } - }, - DNSStart: func(_ httptrace.DNSStartInfo) { - if it.DNSStart != nil { - it.DNSStart(time.Since(start).Seconds()) - } - }, - DNSDone: func(_ httptrace.DNSDoneInfo) { - if it.DNSDone != nil { - it.DNSDone(time.Since(start).Seconds()) - } - }, - ConnectStart: func(_, _ string) { - if it.ConnectStart != nil { - it.ConnectStart(time.Since(start).Seconds()) - } - }, - ConnectDone: func(_, _ string, err error) { - if err != nil { - return - } - if it.ConnectDone != nil { - it.ConnectDone(time.Since(start).Seconds()) - } - }, - GotFirstResponseByte: func() { - if it.GotFirstResponseByte != nil { - it.GotFirstResponseByte(time.Since(start).Seconds()) - } - }, - Got100Continue: func() { - if it.Got100Continue != nil { - it.Got100Continue(time.Since(start).Seconds()) - } - }, - TLSHandshakeStart: func() { - if it.TLSHandshakeStart != nil { - it.TLSHandshakeStart(time.Since(start).Seconds()) - } - }, - TLSHandshakeDone: func(_ tls.ConnectionState, err error) { - if err != nil { - return - } - if it.TLSHandshakeDone != nil { - it.TLSHandshakeDone(time.Since(start).Seconds()) - } - }, - WroteHeaders: func() { - if it.WroteHeaders != nil { - it.WroteHeaders(time.Since(start).Seconds()) - } - }, - Wait100Continue: func() { - if it.Wait100Continue != nil { - it.Wait100Continue(time.Since(start).Seconds()) - } - }, - WroteRequest: func(_ httptrace.WroteRequestInfo) { - if it.WroteRequest != nil { - it.WroteRequest(time.Since(start).Seconds()) - } - }, - } - r = r.WithContext(httptrace.WithClientTrace(r.Context(), trace)) - - return next.RoundTrip(r) - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go deleted file mode 100644 index 9332b0249..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/instrument_server.go +++ /dev/null @@ -1,576 +0,0 @@ -// Copyright 2017 The Prometheus 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 promhttp - -import ( - "errors" - "net/http" - "strconv" - "strings" - "time" - - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/client_golang/prometheus" -) - -// magicString is used for the hacky label test in checkLabels. Remove once fixed. -const magicString = "zZgWfBxLqvG8kc8IMv3POi2Bb0tZI3vAnBx+gBaFi9FyPzB/CzKUer1yufDa" - -// observeWithExemplar is a wrapper for [prometheus.ExemplarAdder.ExemplarObserver], -// which falls back to [prometheus.Observer.Observe] if no labels are provided. -func observeWithExemplar(obs prometheus.Observer, val float64, labels map[string]string) { - if labels == nil { - obs.Observe(val) - return - } - obs.(prometheus.ExemplarObserver).ObserveWithExemplar(val, labels) -} - -// addWithExemplar is a wrapper for [prometheus.ExemplarAdder.AddWithExemplar], -// which falls back to [prometheus.Counter.Add] if no labels are provided. -func addWithExemplar(obs prometheus.Counter, val float64, labels map[string]string) { - if labels == nil { - obs.Add(val) - return - } - obs.(prometheus.ExemplarAdder).AddWithExemplar(val, labels) -} - -// InstrumentHandlerInFlight is a middleware that wraps the provided -// http.Handler. It sets the provided prometheus.Gauge to the number of -// requests currently handled by the wrapped http.Handler. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerInFlight(g prometheus.Gauge, next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - g.Inc() - defer g.Dec() - next.ServeHTTP(w, r) - }) -} - -// InstrumentHandlerDuration is a middleware that wraps the provided -// http.Handler to observe the request duration with the provided ObserverVec. -// The ObserverVec must have valid metric and label names and must have zero, -// one, or two non-const non-curried labels. For those, the only allowed label -// names are "code" and "method". The function panics otherwise. For the "method" -// label a predefined default label value set is used to filter given values. -// Values besides predefined values will count as `unknown` method. -// `WithExtraMethods` can be used to add more methods to the set. The Observe -// method of the Observer in the ObserverVec is called with the request duration -// in seconds. Partitioning happens by HTTP status code and/or HTTP method if -// the respective instance label names are present in the ObserverVec. For -// unpartitioned observations, use an ObserverVec with zero labels. Note that -// partitioning of Histograms is expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -// -// Note that this method is only guaranteed to never observe negative durations -// if used with Go1.9+. -func InstrumentHandlerDuration(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc { - hOpts := defaultOptions() - for _, o := range opts { - o.apply(hOpts) - } - - // Curry the observer with dynamic labels before checking the remaining labels. - code, method := checkLabels(obs.MustCurryWith(hOpts.emptyDynamicLabels())) - - if code { - return func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - - l := labels(code, method, r.Method, d.Status(), hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), time.Since(now).Seconds(), hOpts.getExemplarFn(r.Context())) - } - } - - return func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - next.ServeHTTP(w, r) - l := labels(code, method, r.Method, 0, hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), time.Since(now).Seconds(), hOpts.getExemplarFn(r.Context())) - } -} - -// InstrumentHandlerCounter is a middleware that wraps the provided http.Handler -// to observe the request result with the provided CounterVec. The CounterVec -// must have valid metric and label names and must have zero, one, or two -// non-const non-curried labels. For those, the only allowed label names are -// "code" and "method". The function panics otherwise. For the "method" -// label a predefined default label value set is used to filter given values. -// Values besides predefined values will count as `unknown` method. -// `WithExtraMethods` can be used to add more methods to the set. Partitioning of the -// CounterVec happens by HTTP status code and/or HTTP method if the respective -// instance label names are present in the CounterVec. For unpartitioned -// counting, use a CounterVec with zero labels. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, the Counter is not incremented. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerCounter(counter *prometheus.CounterVec, next http.Handler, opts ...Option) http.HandlerFunc { - hOpts := defaultOptions() - for _, o := range opts { - o.apply(hOpts) - } - - // Curry the counter with dynamic labels before checking the remaining labels. - code, method := checkLabels(counter.MustCurryWith(hOpts.emptyDynamicLabels())) - - if code { - return func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - - l := labels(code, method, r.Method, d.Status(), hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - addWithExemplar(counter.With(l), 1, hOpts.getExemplarFn(r.Context())) - } - } - - return func(w http.ResponseWriter, r *http.Request) { - next.ServeHTTP(w, r) - - l := labels(code, method, r.Method, 0, hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - addWithExemplar(counter.With(l), 1, hOpts.getExemplarFn(r.Context())) - } -} - -// InstrumentHandlerTimeToWriteHeader is a middleware that wraps the provided -// http.Handler to observe with the provided ObserverVec the request duration -// until the response headers are written. The ObserverVec must have valid -// metric and label names and must have zero, one, or two non-const non-curried -// labels. For those, the only allowed label names are "code" and "method". The -// function panics otherwise. For the "method" label a predefined default label -// value set is used to filter given values. Values besides predefined values -// will count as `unknown` method.`WithExtraMethods` can be used to add more -// methods to the set. The Observe method of the Observer in the -// ObserverVec is called with the request duration in seconds. Partitioning -// happens by HTTP status code and/or HTTP method if the respective instance -// label names are present in the ObserverVec. For unpartitioned observations, -// use an ObserverVec with zero labels. Note that partitioning of Histograms is -// expensive and should be used judiciously. -// -// If the wrapped Handler panics before calling WriteHeader, no value is -// reported. -// -// Note that this method is only guaranteed to never observe negative durations -// if used with Go1.9+. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerTimeToWriteHeader(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc { - hOpts := defaultOptions() - for _, o := range opts { - o.apply(hOpts) - } - - // Curry the observer with dynamic labels before checking the remaining labels. - code, method := checkLabels(obs.MustCurryWith(hOpts.emptyDynamicLabels())) - - return func(w http.ResponseWriter, r *http.Request) { - now := time.Now() - d := newDelegator(w, func(status int) { - l := labels(code, method, r.Method, status, hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), time.Since(now).Seconds(), hOpts.getExemplarFn(r.Context())) - }) - next.ServeHTTP(d, r) - } -} - -// InstrumentHandlerRequestSize is a middleware that wraps the provided -// http.Handler to observe the request size with the provided ObserverVec. The -// ObserverVec must have valid metric and label names and must have zero, one, -// or two non-const non-curried labels. For those, the only allowed label names -// are "code" and "method". The function panics otherwise. For the "method" -// label a predefined default label value set is used to filter given values. -// Values besides predefined values will count as `unknown` method. -// `WithExtraMethods` can be used to add more methods to the set. The Observe -// method of the Observer in the ObserverVec is called with the request size in -// bytes. Partitioning happens by HTTP status code and/or HTTP method if the -// respective instance label names are present in the ObserverVec. For -// unpartitioned observations, use an ObserverVec with zero labels. Note that -// partitioning of Histograms is expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerRequestSize(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.HandlerFunc { - hOpts := defaultOptions() - for _, o := range opts { - o.apply(hOpts) - } - - // Curry the observer with dynamic labels before checking the remaining labels. - code, method := checkLabels(obs.MustCurryWith(hOpts.emptyDynamicLabels())) - - if code { - return func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - size := computeApproximateRequestSize(r) - - l := labels(code, method, r.Method, d.Status(), hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), float64(size), hOpts.getExemplarFn(r.Context())) - } - } - - return func(w http.ResponseWriter, r *http.Request) { - next.ServeHTTP(w, r) - size := computeApproximateRequestSize(r) - - l := labels(code, method, r.Method, 0, hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), float64(size), hOpts.getExemplarFn(r.Context())) - } -} - -// InstrumentHandlerResponseSize is a middleware that wraps the provided -// http.Handler to observe the response size with the provided ObserverVec. The -// ObserverVec must have valid metric and label names and must have zero, one, -// or two non-const non-curried labels. For those, the only allowed label names -// are "code" and "method". The function panics otherwise. For the "method" -// label a predefined default label value set is used to filter given values. -// Values besides predefined values will count as `unknown` method. -// `WithExtraMethods` can be used to add more methods to the set. The Observe -// method of the Observer in the ObserverVec is called with the response size in -// bytes. Partitioning happens by HTTP status code and/or HTTP method if the -// respective instance label names are present in the ObserverVec. For -// unpartitioned observations, use an ObserverVec with zero labels. Note that -// partitioning of Histograms is expensive and should be used judiciously. -// -// If the wrapped Handler does not set a status code, a status code of 200 is assumed. -// -// If the wrapped Handler panics, no values are reported. -// -// See the example for InstrumentHandlerDuration for example usage. -func InstrumentHandlerResponseSize(obs prometheus.ObserverVec, next http.Handler, opts ...Option) http.Handler { - hOpts := defaultOptions() - for _, o := range opts { - o.apply(hOpts) - } - - // Curry the observer with dynamic labels before checking the remaining labels. - code, method := checkLabels(obs.MustCurryWith(hOpts.emptyDynamicLabels())) - - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - d := newDelegator(w, nil) - next.ServeHTTP(d, r) - - l := labels(code, method, r.Method, d.Status(), hOpts.extraMethods...) - for label, resolve := range hOpts.extraLabelsFromCtx { - l[label] = resolve(r.Context()) - } - observeWithExemplar(obs.With(l), float64(d.Written()), hOpts.getExemplarFn(r.Context())) - }) -} - -// checkLabels returns whether the provided Collector has a non-const, -// non-curried label named "code" and/or "method". It panics if the provided -// Collector does not have a Desc or has more than one Desc or its Desc is -// invalid. It also panics if the Collector has any non-const, non-curried -// labels that are not named "code" or "method". -func checkLabels(c prometheus.Collector) (code, method bool) { - // TODO(beorn7): Remove this hacky way to check for instance labels - // once Descriptors can have their dimensionality queried. - var ( - desc *prometheus.Desc - m prometheus.Metric - pm dto.Metric - lvs []string - ) - - // Get the Desc from the Collector. - descc := make(chan *prometheus.Desc, 1) - c.Describe(descc) - - select { - case desc = <-descc: - default: - panic("no description provided by collector") - } - select { - case <-descc: - panic("more than one description provided by collector") - default: - } - - close(descc) - - // Make sure the Collector has a valid Desc by registering it with a - // temporary registry. - prometheus.NewRegistry().MustRegister(c) - - // Create a ConstMetric with the Desc. Since we don't know how many - // variable labels there are, try for as long as it needs. - for err := errors.New("dummy"); err != nil; lvs = append(lvs, magicString) { - m, err = prometheus.NewConstMetric(desc, prometheus.UntypedValue, 0, lvs...) - } - - // Write out the metric into a proto message and look at the labels. - // If the value is not the magicString, it is a constLabel, which doesn't interest us. - // If the label is curried, it doesn't interest us. - // In all other cases, only "code" or "method" is allowed. - if err := m.Write(&pm); err != nil { - panic("error checking metric for labels") - } - for _, label := range pm.Label { - name, value := label.GetName(), label.GetValue() - if value != magicString || isLabelCurried(c, name) { - continue - } - switch name { - case "code": - code = true - case "method": - method = true - default: - panic("metric partitioned with non-supported labels") - } - } - return -} - -func isLabelCurried(c prometheus.Collector, label string) bool { - // This is even hackier than the label test above. - // We essentially try to curry again and see if it works. - // But for that, we need to type-convert to the two - // types we use here, ObserverVec or *CounterVec. - switch v := c.(type) { - case *prometheus.CounterVec: - if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil { - return false - } - case prometheus.ObserverVec: - if _, err := v.CurryWith(prometheus.Labels{label: "dummy"}); err == nil { - return false - } - default: - panic("unsupported metric vec type") - } - return true -} - -func labels(code, method bool, reqMethod string, status int, extraMethods ...string) prometheus.Labels { - labels := prometheus.Labels{} - - if !code && !method { - return labels - } - - if code { - labels["code"] = sanitizeCode(status) - } - if method { - labels["method"] = sanitizeMethod(reqMethod, extraMethods...) - } - - return labels -} - -func computeApproximateRequestSize(r *http.Request) int { - s := 0 - if r.URL != nil { - s += len(r.URL.String()) - } - - s += len(r.Method) - s += len(r.Proto) - for name, values := range r.Header { - s += len(name) - for _, value := range values { - s += len(value) - } - } - s += len(r.Host) - - // N.B. r.Form and r.MultipartForm are assumed to be included in r.URL. - - if r.ContentLength != -1 { - s += int(r.ContentLength) - } - return s -} - -// If the wrapped http.Handler has a known method, it will be sanitized and returned. -// Otherwise, "unknown" will be returned. The known method list can be extended -// as needed by using extraMethods parameter. -func sanitizeMethod(m string, extraMethods ...string) string { - // See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for - // the methods chosen as default. - switch m { - case "GET", "get": - return "get" - case "PUT", "put": - return "put" - case "HEAD", "head": - return "head" - case "POST", "post": - return "post" - case "DELETE", "delete": - return "delete" - case "CONNECT", "connect": - return "connect" - case "OPTIONS", "options": - return "options" - case "NOTIFY", "notify": - return "notify" - case "TRACE", "trace": - return "trace" - case "PATCH", "patch": - return "patch" - default: - for _, method := range extraMethods { - if strings.EqualFold(m, method) { - return strings.ToLower(m) - } - } - return "unknown" - } -} - -// If the wrapped http.Handler has not set a status code, i.e. the value is -// currently 0, sanitizeCode will return 200, for consistency with behavior in -// the stdlib. -func sanitizeCode(s int) string { - // See for accepted codes https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml - switch s { - case 100: - return "100" - case 101: - return "101" - - case 200, 0: - return "200" - case 201: - return "201" - case 202: - return "202" - case 203: - return "203" - case 204: - return "204" - case 205: - return "205" - case 206: - return "206" - - case 300: - return "300" - case 301: - return "301" - case 302: - return "302" - case 304: - return "304" - case 305: - return "305" - case 307: - return "307" - - case 400: - return "400" - case 401: - return "401" - case 402: - return "402" - case 403: - return "403" - case 404: - return "404" - case 405: - return "405" - case 406: - return "406" - case 407: - return "407" - case 408: - return "408" - case 409: - return "409" - case 410: - return "410" - case 411: - return "411" - case 412: - return "412" - case 413: - return "413" - case 414: - return "414" - case 415: - return "415" - case 416: - return "416" - case 417: - return "417" - case 418: - return "418" - - case 500: - return "500" - case 501: - return "501" - case 502: - return "502" - case 503: - return "503" - case 504: - return "504" - case 505: - return "505" - - case 428: - return "428" - case 429: - return "429" - case 431: - return "431" - case 511: - return "511" - - default: - if s >= 100 && s <= 599 { - return strconv.Itoa(s) - } - return "unknown" - } -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go deleted file mode 100644 index c5039590f..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/internal/compression.go +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright 2025 The Prometheus 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 internal - -import ( - "io" -) - -// NewZstdWriter enables zstd write support if non-nil. -var NewZstdWriter func(rw io.Writer) (_ io.Writer, closeWriter func(), _ error) diff --git a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/option.go b/vendor/github.com/prometheus/client_golang/prometheus/promhttp/option.go deleted file mode 100644 index 5d4383aa1..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/promhttp/option.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2022 The Prometheus 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 promhttp - -import ( - "context" - - "github.com/prometheus/client_golang/prometheus" -) - -// Option are used to configure both handler (middleware) or round tripper. -type Option interface { - apply(*options) -} - -// LabelValueFromCtx are used to compute the label value from request context. -// Context can be filled with values from request through middleware. -type LabelValueFromCtx func(ctx context.Context) string - -// options store options for both a handler or round tripper. -type options struct { - extraMethods []string - getExemplarFn func(requestCtx context.Context) prometheus.Labels - extraLabelsFromCtx map[string]LabelValueFromCtx -} - -func defaultOptions() *options { - return &options{ - getExemplarFn: func(ctx context.Context) prometheus.Labels { return nil }, - extraLabelsFromCtx: map[string]LabelValueFromCtx{}, - } -} - -func (o *options) emptyDynamicLabels() prometheus.Labels { - labels := prometheus.Labels{} - - for label := range o.extraLabelsFromCtx { - labels[label] = "" - } - - return labels -} - -type optionApplyFunc func(*options) - -func (o optionApplyFunc) apply(opt *options) { o(opt) } - -// WithExtraMethods adds additional HTTP methods to the list of allowed methods. -// See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for the default list. -// -// See the example for ExampleInstrumentHandlerWithExtraMethods for example usage. -func WithExtraMethods(methods ...string) Option { - return optionApplyFunc(func(o *options) { - o.extraMethods = methods - }) -} - -// WithExemplarFromContext allows to inject function that will get exemplar from context that will be put to counter and histogram metrics. -// If the function returns nil labels or the metric does not support exemplars, no exemplar will be added (noop), but -// metric will continue to observe/increment. -func WithExemplarFromContext(getExemplarFn func(requestCtx context.Context) prometheus.Labels) Option { - return optionApplyFunc(func(o *options) { - o.getExemplarFn = getExemplarFn - }) -} - -// WithLabelFromCtx registers a label for dynamic resolution with access to context. -// See the example for ExampleInstrumentHandlerWithLabelResolver for example usage -func WithLabelFromCtx(name string, valueFn LabelValueFromCtx) Option { - return optionApplyFunc(func(o *options) { - o.extraLabelsFromCtx[name] = valueFn - }) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/registry.go b/vendor/github.com/prometheus/client_golang/prometheus/registry.go deleted file mode 100644 index c6fd2f58b..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/registry.go +++ /dev/null @@ -1,1076 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "bytes" - "errors" - "fmt" - "os" - "path/filepath" - "runtime" - "sort" - "strconv" - "strings" - "sync" - "unicode/utf8" - - "github.com/prometheus/client_golang/prometheus/internal" - - "github.com/cespare/xxhash/v2" - dto "github.com/prometheus/client_model/go" - "github.com/prometheus/common/expfmt" - "google.golang.org/protobuf/proto" -) - -const ( - // Capacity for the channel to collect metrics and descriptors. - capMetricChan = 1000 - capDescChan = 10 -) - -// DefaultRegisterer and DefaultGatherer are the implementations of the -// Registerer and Gatherer interface a number of convenience functions in this -// package act on. Initially, both variables point to the same Registry, which -// has a process collector (currently on Linux only, see NewProcessCollector) -// and a Go collector (see NewGoCollector, in particular the note about -// stop-the-world implication with Go versions older than 1.9) already -// registered. This approach to keep default instances as global state mirrors -// the approach of other packages in the Go standard library. Note that there -// are caveats. Change the variables with caution and only if you understand the -// consequences. Users who want to avoid global state altogether should not use -// the convenience functions and act on custom instances instead. -var ( - defaultRegistry = NewRegistry() - DefaultRegisterer Registerer = defaultRegistry - DefaultGatherer Gatherer = defaultRegistry -) - -func init() { - MustRegister(NewProcessCollector(ProcessCollectorOpts{})) - MustRegister(NewGoCollector()) -} - -// NewRegistry creates a new vanilla Registry without any Collectors -// pre-registered. -func NewRegistry() *Registry { - return &Registry{ - collectorsByID: map[uint64]Collector{}, - descIDs: map[uint64]struct{}{}, - dimHashesByName: map[string]uint64{}, - } -} - -// NewPedanticRegistry returns a registry that checks during collection if each -// collected Metric is consistent with its reported Desc, and if the Desc has -// actually been registered with the registry. Unchecked Collectors (those whose -// Describe method does not yield any descriptors) are excluded from the check. -// -// Usually, a Registry will be happy as long as the union of all collected -// Metrics is consistent and valid even if some metrics are not consistent with -// their own Desc or a Desc provided by their registered Collector. Well-behaved -// Collectors and Metrics will only provide consistent Descs. This Registry is -// useful to test the implementation of Collectors and Metrics. -func NewPedanticRegistry() *Registry { - r := NewRegistry() - r.pedanticChecksEnabled = true - return r -} - -// Registerer is the interface for the part of a registry in charge of -// registering and unregistering. Users of custom registries should use -// Registerer as type for registration purposes (rather than the Registry type -// directly). In that way, they are free to use custom Registerer implementation -// (e.g. for testing purposes). -type Registerer interface { - // Register registers a new Collector to be included in metrics - // collection. It returns an error if the descriptors provided by the - // Collector are invalid or if they — in combination with descriptors of - // already registered Collectors — do not fulfill the consistency and - // uniqueness criteria described in the documentation of metric.Desc. - // - // If the provided Collector is equal to a Collector already registered - // (which includes the case of re-registering the same Collector), the - // returned error is an instance of AlreadyRegisteredError, which - // contains the previously registered Collector. - // - // A Collector whose Describe method does not yield any Desc is treated - // as unchecked. Registration will always succeed. No check for - // re-registering (see previous paragraph) is performed. Thus, the - // caller is responsible for not double-registering the same unchecked - // Collector, and for providing a Collector that will not cause - // inconsistent metrics on collection. (This would lead to scrape - // errors.) - Register(Collector) error - // MustRegister works like Register but registers any number of - // Collectors and panics upon the first registration that causes an - // error. - MustRegister(...Collector) - // Unregister unregisters the Collector that equals the Collector passed - // in as an argument. (Two Collectors are considered equal if their - // Describe method yields the same set of descriptors.) The function - // returns whether a Collector was unregistered. Note that an unchecked - // Collector cannot be unregistered (as its Describe method does not - // yield any descriptor). - // - // Note that even after unregistering, it will not be possible to - // register a new Collector that is inconsistent with the unregistered - // Collector, e.g. a Collector collecting metrics with the same name but - // a different help string. The rationale here is that the same registry - // instance must only collect consistent metrics throughout its - // lifetime. - Unregister(Collector) bool -} - -// Gatherer is the interface for the part of a registry in charge of gathering -// the collected metrics into a number of MetricFamilies. The Gatherer interface -// comes with the same general implication as described for the Registerer -// interface. -type Gatherer interface { - // Gather calls the Collect method of the registered Collectors and then - // gathers the collected metrics into a lexicographically sorted slice - // of uniquely named MetricFamily protobufs. Gather ensures that the - // returned slice is valid and self-consistent so that it can be used - // for valid exposition. As an exception to the strict consistency - // requirements described for metric.Desc, Gather will tolerate - // different sets of label names for metrics of the same metric family. - // - // Even if an error occurs, Gather attempts to gather as many metrics as - // possible. Hence, if a non-nil error is returned, the returned - // MetricFamily slice could be nil (in case of a fatal error that - // prevented any meaningful metric collection) or contain a number of - // MetricFamily protobufs, some of which might be incomplete, and some - // might be missing altogether. The returned error (which might be a - // MultiError) explains the details. Note that this is mostly useful for - // debugging purposes. If the gathered protobufs are to be used for - // exposition in actual monitoring, it is almost always better to not - // expose an incomplete result and instead disregard the returned - // MetricFamily protobufs in case the returned error is non-nil. - Gather() ([]*dto.MetricFamily, error) -} - -// Register registers the provided Collector with the DefaultRegisterer. -// -// Register is a shortcut for DefaultRegisterer.Register(c). See there for more -// details. -func Register(c Collector) error { - return DefaultRegisterer.Register(c) -} - -// MustRegister registers the provided Collectors with the DefaultRegisterer and -// panics if any error occurs. -// -// MustRegister is a shortcut for DefaultRegisterer.MustRegister(cs...). See -// there for more details. -func MustRegister(cs ...Collector) { - DefaultRegisterer.MustRegister(cs...) -} - -// Unregister removes the registration of the provided Collector from the -// DefaultRegisterer. -// -// Unregister is a shortcut for DefaultRegisterer.Unregister(c). See there for -// more details. -func Unregister(c Collector) bool { - return DefaultRegisterer.Unregister(c) -} - -// GathererFunc turns a function into a Gatherer. -type GathererFunc func() ([]*dto.MetricFamily, error) - -// Gather implements Gatherer. -func (gf GathererFunc) Gather() ([]*dto.MetricFamily, error) { - return gf() -} - -// AlreadyRegisteredError is returned by the Register method if the Collector to -// be registered has already been registered before, or a different Collector -// that collects the same metrics has been registered before. Registration fails -// in that case, but you can detect from the kind of error what has -// happened. The error contains fields for the existing Collector and the -// (rejected) new Collector that equals the existing one. This can be used to -// find out if an equal Collector has been registered before and switch over to -// using the old one, as demonstrated in the example. -type AlreadyRegisteredError struct { - ExistingCollector, NewCollector Collector -} - -func (err AlreadyRegisteredError) Error() string { - return "duplicate metrics collector registration attempted" -} - -// MultiError is a slice of errors implementing the error interface. It is used -// by a Gatherer to report multiple errors during MetricFamily gathering. -type MultiError []error - -// Error formats the contained errors as a bullet point list, preceded by the -// total number of errors. Note that this results in a multi-line string. -func (errs MultiError) Error() string { - if len(errs) == 0 { - return "" - } - buf := &bytes.Buffer{} - fmt.Fprintf(buf, "%d error(s) occurred:", len(errs)) - for _, err := range errs { - fmt.Fprintf(buf, "\n* %s", err) - } - return buf.String() -} - -// Append appends the provided error if it is not nil. -func (errs *MultiError) Append(err error) { - if err != nil { - *errs = append(*errs, err) - } -} - -// MaybeUnwrap returns nil if len(errs) is 0. It returns the first and only -// contained error as error if len(errs is 1). In all other cases, it returns -// the MultiError directly. This is helpful for returning a MultiError in a way -// that only uses the MultiError if needed. -func (errs MultiError) MaybeUnwrap() error { - switch len(errs) { - case 0: - return nil - case 1: - return errs[0] - default: - return errs - } -} - -// Registry registers Prometheus collectors, collects their metrics, and gathers -// them into MetricFamilies for exposition. It implements Registerer, Gatherer, -// and Collector. The zero value is not usable. Create instances with -// NewRegistry or NewPedanticRegistry. -// -// Registry implements Collector to allow it to be used for creating groups of -// metrics. See the Grouping example for how this can be done. -type Registry struct { - mtx sync.RWMutex - collectorsByID map[uint64]Collector // ID is a hash of the descIDs. - descIDs map[uint64]struct{} - dimHashesByName map[string]uint64 - uncheckedCollectors []Collector - pedanticChecksEnabled bool -} - -// Register implements Registerer. -func (r *Registry) Register(c Collector) error { - var ( - descChan = make(chan *Desc, capDescChan) - newDescIDs = map[uint64]struct{}{} - newDimHashesByName = map[string]uint64{} - collectorID uint64 // All desc IDs XOR'd together. - duplicateDescErr error - ) - go func() { - c.Describe(descChan) - close(descChan) - }() - r.mtx.Lock() - defer func() { - // Drain channel in case of premature return to not leak a goroutine. - for range descChan { - } - r.mtx.Unlock() - }() - // Conduct various tests... - for desc := range descChan { - - // Is the descriptor valid at all? - if desc.err != nil { - return fmt.Errorf("descriptor %s is invalid: %w", desc, desc.err) - } - - // Is the descID unique? - // (In other words: Is the fqName + constLabel combination unique?) - if _, exists := r.descIDs[desc.id]; exists { - duplicateDescErr = fmt.Errorf("descriptor %s already exists with the same fully-qualified name and const label values", desc) - } - // If it is not a duplicate desc in this collector, XOR it to - // the collectorID. (We allow duplicate descs within the same - // collector, but their existence must be a no-op.) - if _, exists := newDescIDs[desc.id]; !exists { - newDescIDs[desc.id] = struct{}{} - collectorID ^= desc.id - } - - // Are all the label names and the help string consistent with - // previous descriptors of the same name? - // First check existing descriptors... - if dimHash, exists := r.dimHashesByName[desc.fqName]; exists { - if dimHash != desc.dimHash { - return fmt.Errorf("a previously registered descriptor with the same fully-qualified name as %s has different label names or a different help string", desc) - } - continue - } - - // ...then check the new descriptors already seen. - if dimHash, exists := newDimHashesByName[desc.fqName]; exists { - if dimHash != desc.dimHash { - return fmt.Errorf("descriptors reported by collector have inconsistent label names or help strings for the same fully-qualified name, offender is %s", desc) - } - continue - } - newDimHashesByName[desc.fqName] = desc.dimHash - } - // A Collector yielding no Desc at all is considered unchecked. - if len(newDescIDs) == 0 { - r.uncheckedCollectors = append(r.uncheckedCollectors, c) - return nil - } - if existing, exists := r.collectorsByID[collectorID]; exists { - switch e := existing.(type) { - case *wrappingCollector: - return AlreadyRegisteredError{ - ExistingCollector: e.unwrapRecursively(), - NewCollector: c, - } - default: - return AlreadyRegisteredError{ - ExistingCollector: e, - NewCollector: c, - } - } - } - // If the collectorID is new, but at least one of the descs existed - // before, we are in trouble. - if duplicateDescErr != nil { - return duplicateDescErr - } - - // Only after all tests have passed, actually register. - r.collectorsByID[collectorID] = c - for hash := range newDescIDs { - r.descIDs[hash] = struct{}{} - } - for name, dimHash := range newDimHashesByName { - r.dimHashesByName[name] = dimHash - } - return nil -} - -// Unregister implements Registerer. -func (r *Registry) Unregister(c Collector) bool { - var ( - descChan = make(chan *Desc, capDescChan) - descIDs = map[uint64]struct{}{} - collectorID uint64 // All desc IDs XOR'd together. - ) - go func() { - c.Describe(descChan) - close(descChan) - }() - for desc := range descChan { - if _, exists := descIDs[desc.id]; !exists { - collectorID ^= desc.id - descIDs[desc.id] = struct{}{} - } - } - - r.mtx.RLock() - if _, exists := r.collectorsByID[collectorID]; !exists { - r.mtx.RUnlock() - return false - } - r.mtx.RUnlock() - - r.mtx.Lock() - defer r.mtx.Unlock() - - delete(r.collectorsByID, collectorID) - for id := range descIDs { - delete(r.descIDs, id) - } - // dimHashesByName is left untouched as those must be consistent - // throughout the lifetime of a program. - return true -} - -// MustRegister implements Registerer. -func (r *Registry) MustRegister(cs ...Collector) { - for _, c := range cs { - if err := r.Register(c); err != nil { - panic(err) - } - } -} - -// Gather implements Gatherer. -func (r *Registry) Gather() ([]*dto.MetricFamily, error) { - r.mtx.RLock() - - if len(r.collectorsByID) == 0 && len(r.uncheckedCollectors) == 0 { - // Fast path. - r.mtx.RUnlock() - return nil, nil - } - - var ( - checkedMetricChan = make(chan Metric, capMetricChan) - uncheckedMetricChan = make(chan Metric, capMetricChan) - metricHashes = map[uint64]struct{}{} - wg sync.WaitGroup - errs MultiError // The collected errors to return in the end. - registeredDescIDs map[uint64]struct{} // Only used for pedantic checks - ) - - goroutineBudget := len(r.collectorsByID) + len(r.uncheckedCollectors) - metricFamiliesByName := make(map[string]*dto.MetricFamily, len(r.dimHashesByName)) - checkedCollectors := make(chan Collector, len(r.collectorsByID)) - uncheckedCollectors := make(chan Collector, len(r.uncheckedCollectors)) - for _, collector := range r.collectorsByID { - checkedCollectors <- collector - } - for _, collector := range r.uncheckedCollectors { - uncheckedCollectors <- collector - } - // In case pedantic checks are enabled, we have to copy the map before - // giving up the RLock. - if r.pedanticChecksEnabled { - registeredDescIDs = make(map[uint64]struct{}, len(r.descIDs)) - for id := range r.descIDs { - registeredDescIDs[id] = struct{}{} - } - } - r.mtx.RUnlock() - - wg.Add(goroutineBudget) - - collectWorker := func() { - for { - select { - case collector := <-checkedCollectors: - collector.Collect(checkedMetricChan) - case collector := <-uncheckedCollectors: - collector.Collect(uncheckedMetricChan) - default: - return - } - wg.Done() - } - } - - // Start the first worker now to make sure at least one is running. - go collectWorker() - goroutineBudget-- - - // Close checkedMetricChan and uncheckedMetricChan once all collectors - // are collected. - go func() { - wg.Wait() - close(checkedMetricChan) - close(uncheckedMetricChan) - }() - - // Drain checkedMetricChan and uncheckedMetricChan in case of premature return. - defer func() { - if checkedMetricChan != nil { - for range checkedMetricChan { - } - } - if uncheckedMetricChan != nil { - for range uncheckedMetricChan { - } - } - }() - - // Copy the channel references so we can nil them out later to remove - // them from the select statements below. - cmc := checkedMetricChan - umc := uncheckedMetricChan - - for { - select { - case metric, ok := <-cmc: - if !ok { - cmc = nil - break - } - errs.Append(processMetric( - metric, metricFamiliesByName, - metricHashes, - registeredDescIDs, - )) - case metric, ok := <-umc: - if !ok { - umc = nil - break - } - errs.Append(processMetric( - metric, metricFamiliesByName, - metricHashes, - nil, - )) - default: - if goroutineBudget <= 0 || len(checkedCollectors)+len(uncheckedCollectors) == 0 { - // All collectors are already being worked on or - // we have already as many goroutines started as - // there are collectors. Do the same as above, - // just without the default. - select { - case metric, ok := <-cmc: - if !ok { - cmc = nil - break - } - errs.Append(processMetric( - metric, metricFamiliesByName, - metricHashes, - registeredDescIDs, - )) - case metric, ok := <-umc: - if !ok { - umc = nil - break - } - errs.Append(processMetric( - metric, metricFamiliesByName, - metricHashes, - nil, - )) - } - break - } - // Start more workers. - go collectWorker() - goroutineBudget-- - runtime.Gosched() - } - // Once both checkedMetricChan and uncheckedMetricChan are closed - // and drained, the contraption above will nil out cmc and umc, - // and then we can leave the collect loop here. - if cmc == nil && umc == nil { - break - } - } - return internal.NormalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() -} - -// Describe implements Collector. -func (r *Registry) Describe(ch chan<- *Desc) { - r.mtx.RLock() - defer r.mtx.RUnlock() - - // Only report the checked Collectors; unchecked collectors don't report any - // Desc. - for _, c := range r.collectorsByID { - c.Describe(ch) - } -} - -// Collect implements Collector. -func (r *Registry) Collect(ch chan<- Metric) { - r.mtx.RLock() - defer r.mtx.RUnlock() - - for _, c := range r.collectorsByID { - c.Collect(ch) - } - for _, c := range r.uncheckedCollectors { - c.Collect(ch) - } -} - -// WriteToTextfile calls Gather on the provided Gatherer, encodes the result in the -// Prometheus text format, and writes it to a temporary file. Upon success, the -// temporary file is renamed to the provided filename. -// -// This is intended for use with the textfile collector of the node exporter. -// Note that the node exporter expects the filename to be suffixed with ".prom". -func WriteToTextfile(filename string, g Gatherer) error { - tmp, err := os.CreateTemp(filepath.Dir(filename), filepath.Base(filename)) - if err != nil { - return err - } - defer os.Remove(tmp.Name()) - - mfs, err := g.Gather() - if err != nil { - return err - } - for _, mf := range mfs { - if _, err := expfmt.MetricFamilyToText(tmp, mf); err != nil { - return err - } - } - if err := tmp.Close(); err != nil { - return err - } - - if err := os.Chmod(tmp.Name(), 0o644); err != nil { - return err - } - return os.Rename(tmp.Name(), filename) -} - -// processMetric is an internal helper method only used by the Gather method. -func processMetric( - metric Metric, - metricFamiliesByName map[string]*dto.MetricFamily, - metricHashes map[uint64]struct{}, - registeredDescIDs map[uint64]struct{}, -) error { - desc := metric.Desc() - // Wrapped metrics collected by an unchecked Collector can have an - // invalid Desc. - if desc.err != nil { - return desc.err - } - dtoMetric := &dto.Metric{} - if err := metric.Write(dtoMetric); err != nil { - return fmt.Errorf("error collecting metric %v: %w", desc, err) - } - metricFamily, ok := metricFamiliesByName[desc.fqName] - if ok { // Existing name. - if metricFamily.GetHelp() != desc.help { - return fmt.Errorf( - "collected metric %s %s has help %q but should have %q", - desc.fqName, dtoMetric, desc.help, metricFamily.GetHelp(), - ) - } - // TODO(beorn7): Simplify switch once Desc has type. - switch metricFamily.GetType() { - case dto.MetricType_COUNTER: - if dtoMetric.Counter == nil { - return fmt.Errorf( - "collected metric %s %s should be a Counter", - desc.fqName, dtoMetric, - ) - } - case dto.MetricType_GAUGE: - if dtoMetric.Gauge == nil { - return fmt.Errorf( - "collected metric %s %s should be a Gauge", - desc.fqName, dtoMetric, - ) - } - case dto.MetricType_SUMMARY: - if dtoMetric.Summary == nil { - return fmt.Errorf( - "collected metric %s %s should be a Summary", - desc.fqName, dtoMetric, - ) - } - case dto.MetricType_UNTYPED: - if dtoMetric.Untyped == nil { - return fmt.Errorf( - "collected metric %s %s should be Untyped", - desc.fqName, dtoMetric, - ) - } - case dto.MetricType_HISTOGRAM: - if dtoMetric.Histogram == nil { - return fmt.Errorf( - "collected metric %s %s should be a Histogram", - desc.fqName, dtoMetric, - ) - } - default: - panic("encountered MetricFamily with invalid type") - } - } else { // New name. - metricFamily = &dto.MetricFamily{} - metricFamily.Name = proto.String(desc.fqName) - metricFamily.Help = proto.String(desc.help) - // TODO(beorn7): Simplify switch once Desc has type. - switch { - case dtoMetric.Gauge != nil: - metricFamily.Type = dto.MetricType_GAUGE.Enum() - case dtoMetric.Counter != nil: - metricFamily.Type = dto.MetricType_COUNTER.Enum() - case dtoMetric.Summary != nil: - metricFamily.Type = dto.MetricType_SUMMARY.Enum() - case dtoMetric.Untyped != nil: - metricFamily.Type = dto.MetricType_UNTYPED.Enum() - case dtoMetric.Histogram != nil: - metricFamily.Type = dto.MetricType_HISTOGRAM.Enum() - default: - return fmt.Errorf("empty metric collected: %s", dtoMetric) - } - if err := checkSuffixCollisions(metricFamily, metricFamiliesByName); err != nil { - return err - } - metricFamiliesByName[desc.fqName] = metricFamily - } - if err := checkMetricConsistency(metricFamily, dtoMetric, metricHashes); err != nil { - return err - } - if registeredDescIDs != nil { - // Is the desc registered at all? - if _, exist := registeredDescIDs[desc.id]; !exist { - return fmt.Errorf( - "collected metric %s %s with unregistered descriptor %s", - metricFamily.GetName(), dtoMetric, desc, - ) - } - if err := checkDescConsistency(metricFamily, dtoMetric, desc); err != nil { - return err - } - } - metricFamily.Metric = append(metricFamily.Metric, dtoMetric) - return nil -} - -// Gatherers is a slice of Gatherer instances that implements the Gatherer -// interface itself. Its Gather method calls Gather on all Gatherers in the -// slice in order and returns the merged results. Errors returned from the -// Gather calls are all returned in a flattened MultiError. Duplicate and -// inconsistent Metrics are skipped (first occurrence in slice order wins) and -// reported in the returned error. -// -// Gatherers can be used to merge the Gather results from multiple -// Registries. It also provides a way to directly inject existing MetricFamily -// protobufs into the gathering by creating a custom Gatherer with a Gather -// method that simply returns the existing MetricFamily protobufs. Note that no -// registration is involved (in contrast to Collector registration), so -// obviously registration-time checks cannot happen. Any inconsistencies between -// the gathered MetricFamilies are reported as errors by the Gather method, and -// inconsistent Metrics are dropped. Invalid parts of the MetricFamilies -// (e.g. syntactically invalid metric or label names) will go undetected. -type Gatherers []Gatherer - -// Gather implements Gatherer. -func (gs Gatherers) Gather() ([]*dto.MetricFamily, error) { - var ( - metricFamiliesByName = map[string]*dto.MetricFamily{} - metricHashes = map[uint64]struct{}{} - errs MultiError // The collected errors to return in the end. - ) - - for i, g := range gs { - mfs, err := g.Gather() - if err != nil { - multiErr := MultiError{} - if errors.As(err, &multiErr) { - for _, err := range multiErr { - errs = append(errs, fmt.Errorf("[from Gatherer #%d] %w", i+1, err)) - } - } else { - errs = append(errs, fmt.Errorf("[from Gatherer #%d] %w", i+1, err)) - } - } - for _, mf := range mfs { - existingMF, exists := metricFamiliesByName[mf.GetName()] - if exists { - if existingMF.GetHelp() != mf.GetHelp() { - errs = append(errs, fmt.Errorf( - "gathered metric family %s has help %q but should have %q", - mf.GetName(), mf.GetHelp(), existingMF.GetHelp(), - )) - continue - } - if existingMF.GetType() != mf.GetType() { - errs = append(errs, fmt.Errorf( - "gathered metric family %s has type %s but should have %s", - mf.GetName(), mf.GetType(), existingMF.GetType(), - )) - continue - } - } else { - existingMF = &dto.MetricFamily{} - existingMF.Name = mf.Name - existingMF.Help = mf.Help - existingMF.Type = mf.Type - if err := checkSuffixCollisions(existingMF, metricFamiliesByName); err != nil { - errs = append(errs, err) - continue - } - metricFamiliesByName[mf.GetName()] = existingMF - } - for _, m := range mf.Metric { - if err := checkMetricConsistency(existingMF, m, metricHashes); err != nil { - errs = append(errs, err) - continue - } - existingMF.Metric = append(existingMF.Metric, m) - } - } - } - return internal.NormalizeMetricFamilies(metricFamiliesByName), errs.MaybeUnwrap() -} - -// checkSuffixCollisions checks for collisions with the “magic” suffixes the -// Prometheus text format and the internal metric representation of the -// Prometheus server add while flattening Summaries and Histograms. -func checkSuffixCollisions(mf *dto.MetricFamily, mfs map[string]*dto.MetricFamily) error { - var ( - newName = mf.GetName() - newType = mf.GetType() - newNameWithoutSuffix = "" - ) - switch { - case strings.HasSuffix(newName, "_count"): - newNameWithoutSuffix = newName[:len(newName)-6] - case strings.HasSuffix(newName, "_sum"): - newNameWithoutSuffix = newName[:len(newName)-4] - case strings.HasSuffix(newName, "_bucket"): - newNameWithoutSuffix = newName[:len(newName)-7] - } - if newNameWithoutSuffix != "" { - if existingMF, ok := mfs[newNameWithoutSuffix]; ok { - switch existingMF.GetType() { - case dto.MetricType_SUMMARY: - if !strings.HasSuffix(newName, "_bucket") { - return fmt.Errorf( - "collected metric named %q collides with previously collected summary named %q", - newName, newNameWithoutSuffix, - ) - } - case dto.MetricType_HISTOGRAM: - return fmt.Errorf( - "collected metric named %q collides with previously collected histogram named %q", - newName, newNameWithoutSuffix, - ) - } - } - } - if newType == dto.MetricType_SUMMARY || newType == dto.MetricType_HISTOGRAM { - if _, ok := mfs[newName+"_count"]; ok { - return fmt.Errorf( - "collected histogram or summary named %q collides with previously collected metric named %q", - newName, newName+"_count", - ) - } - if _, ok := mfs[newName+"_sum"]; ok { - return fmt.Errorf( - "collected histogram or summary named %q collides with previously collected metric named %q", - newName, newName+"_sum", - ) - } - } - if newType == dto.MetricType_HISTOGRAM { - if _, ok := mfs[newName+"_bucket"]; ok { - return fmt.Errorf( - "collected histogram named %q collides with previously collected metric named %q", - newName, newName+"_bucket", - ) - } - } - return nil -} - -// checkMetricConsistency checks if the provided Metric is consistent with the -// provided MetricFamily. It also hashes the Metric labels and the MetricFamily -// name. If the resulting hash is already in the provided metricHashes, an error -// is returned. If not, it is added to metricHashes. -func checkMetricConsistency( - metricFamily *dto.MetricFamily, - dtoMetric *dto.Metric, - metricHashes map[uint64]struct{}, -) error { - name := metricFamily.GetName() - - // Type consistency with metric family. - if metricFamily.GetType() == dto.MetricType_GAUGE && dtoMetric.Gauge == nil || - metricFamily.GetType() == dto.MetricType_COUNTER && dtoMetric.Counter == nil || - metricFamily.GetType() == dto.MetricType_SUMMARY && dtoMetric.Summary == nil || - metricFamily.GetType() == dto.MetricType_HISTOGRAM && dtoMetric.Histogram == nil || - metricFamily.GetType() == dto.MetricType_UNTYPED && dtoMetric.Untyped == nil { - return fmt.Errorf( - "collected metric %q { %s} is not a %s", - name, dtoMetric, metricFamily.GetType(), - ) - } - - previousLabelName := "" - for _, labelPair := range dtoMetric.GetLabel() { - labelName := labelPair.GetName() - if labelName == previousLabelName { - return fmt.Errorf( - "collected metric %q { %s} has two or more labels with the same name: %s", - name, dtoMetric, labelName, - ) - } - if !checkLabelName(labelName) { - return fmt.Errorf( - "collected metric %q { %s} has a label with an invalid name: %s", - name, dtoMetric, labelName, - ) - } - if dtoMetric.Summary != nil && labelName == quantileLabel { - return fmt.Errorf( - "collected metric %q { %s} must not have an explicit %q label", - name, dtoMetric, quantileLabel, - ) - } - if !utf8.ValidString(labelPair.GetValue()) { - return fmt.Errorf( - "collected metric %q { %s} has a label named %q whose value is not utf8: %#v", - name, dtoMetric, labelName, labelPair.GetValue()) - } - previousLabelName = labelName - } - - // Is the metric unique (i.e. no other metric with the same name and the same labels)? - h := xxhash.New() - h.WriteString(name) - h.Write(separatorByteSlice) - // Make sure label pairs are sorted. We depend on it for the consistency - // check. - if !sort.IsSorted(internal.LabelPairSorter(dtoMetric.Label)) { - // We cannot sort dtoMetric.Label in place as it is immutable by contract. - copiedLabels := make([]*dto.LabelPair, len(dtoMetric.Label)) - copy(copiedLabels, dtoMetric.Label) - sort.Sort(internal.LabelPairSorter(copiedLabels)) - dtoMetric.Label = copiedLabels - } - for _, lp := range dtoMetric.Label { - h.WriteString(lp.GetName()) - h.Write(separatorByteSlice) - h.WriteString(lp.GetValue()) - h.Write(separatorByteSlice) - } - if dtoMetric.TimestampMs != nil { - h.WriteString(strconv.FormatInt(*(dtoMetric.TimestampMs), 10)) - h.Write(separatorByteSlice) - } - hSum := h.Sum64() - if _, exists := metricHashes[hSum]; exists { - return fmt.Errorf( - "collected metric %q { %s} was collected before with the same name and label values", - name, dtoMetric, - ) - } - metricHashes[hSum] = struct{}{} - return nil -} - -func checkDescConsistency( - metricFamily *dto.MetricFamily, - dtoMetric *dto.Metric, - desc *Desc, -) error { - // Desc help consistency with metric family help. - if metricFamily.GetHelp() != desc.help { - return fmt.Errorf( - "collected metric %s %s has help %q but should have %q", - metricFamily.GetName(), dtoMetric, metricFamily.GetHelp(), desc.help, - ) - } - - // Is the desc consistent with the content of the metric? - lpsFromDesc := make([]*dto.LabelPair, len(desc.constLabelPairs), len(dtoMetric.Label)) - copy(lpsFromDesc, desc.constLabelPairs) - for _, l := range desc.variableLabels.names { - lpsFromDesc = append(lpsFromDesc, &dto.LabelPair{ - Name: proto.String(l), - }) - } - if len(lpsFromDesc) != len(dtoMetric.Label) { - return fmt.Errorf( - "labels in collected metric %s %s are inconsistent with descriptor %s", - metricFamily.GetName(), dtoMetric, desc, - ) - } - sort.Sort(internal.LabelPairSorter(lpsFromDesc)) - for i, lpFromDesc := range lpsFromDesc { - lpFromMetric := dtoMetric.Label[i] - if lpFromDesc.GetName() != lpFromMetric.GetName() || - lpFromDesc.Value != nil && lpFromDesc.GetValue() != lpFromMetric.GetValue() { - return fmt.Errorf( - "labels in collected metric %s %s are inconsistent with descriptor %s", - metricFamily.GetName(), dtoMetric, desc, - ) - } - } - return nil -} - -var _ TransactionalGatherer = &MultiTRegistry{} - -// MultiTRegistry is a TransactionalGatherer that joins gathered metrics from multiple -// transactional gatherers. -// -// It is caller responsibility to ensure two registries have mutually exclusive metric families, -// no deduplication will happen. -type MultiTRegistry struct { - tGatherers []TransactionalGatherer -} - -// NewMultiTRegistry creates MultiTRegistry. -func NewMultiTRegistry(tGatherers ...TransactionalGatherer) *MultiTRegistry { - return &MultiTRegistry{ - tGatherers: tGatherers, - } -} - -// Gather implements TransactionalGatherer interface. -func (r *MultiTRegistry) Gather() (mfs []*dto.MetricFamily, done func(), err error) { - errs := MultiError{} - - dFns := make([]func(), 0, len(r.tGatherers)) - // TODO(bwplotka): Implement concurrency for those? - for _, g := range r.tGatherers { - // TODO(bwplotka): Check for duplicates? - m, d, err := g.Gather() - errs.Append(err) - - mfs = append(mfs, m...) - dFns = append(dFns, d) - } - - // TODO(bwplotka): Consider sort in place, given metric family in gather is sorted already. - sort.Slice(mfs, func(i, j int) bool { - return *mfs[i].Name < *mfs[j].Name - }) - return mfs, func() { - for _, d := range dFns { - d() - } - }, errs.MaybeUnwrap() -} - -// TransactionalGatherer represents transactional gatherer that can be triggered to notify gatherer that memory -// used by metric family is no longer used by a caller. This allows implementations with cache. -type TransactionalGatherer interface { - // Gather returns metrics in a lexicographically sorted slice - // of uniquely named MetricFamily protobufs. Gather ensures that the - // returned slice is valid and self-consistent so that it can be used - // for valid exposition. As an exception to the strict consistency - // requirements described for metric.Desc, Gather will tolerate - // different sets of label names for metrics of the same metric family. - // - // Even if an error occurs, Gather attempts to gather as many metrics as - // possible. Hence, if a non-nil error is returned, the returned - // MetricFamily slice could be nil (in case of a fatal error that - // prevented any meaningful metric collection) or contain a number of - // MetricFamily protobufs, some of which might be incomplete, and some - // might be missing altogether. The returned error (which might be a - // MultiError) explains the details. Note that this is mostly useful for - // debugging purposes. If the gathered protobufs are to be used for - // exposition in actual monitoring, it is almost always better to not - // expose an incomplete result and instead disregard the returned - // MetricFamily protobufs in case the returned error is non-nil. - // - // Important: done is expected to be triggered (even if the error occurs!) - // once caller does not need returned slice of dto.MetricFamily. - Gather() (_ []*dto.MetricFamily, done func(), err error) -} - -// ToTransactionalGatherer transforms Gatherer to transactional one with noop as done function. -func ToTransactionalGatherer(g Gatherer) TransactionalGatherer { - return &noTransactionGatherer{g: g} -} - -type noTransactionGatherer struct { - g Gatherer -} - -// Gather implements TransactionalGatherer interface. -func (g *noTransactionGatherer) Gather() (_ []*dto.MetricFamily, done func(), err error) { - mfs, err := g.g.Gather() - return mfs, func() {}, err -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/summary.go b/vendor/github.com/prometheus/client_golang/prometheus/summary.go deleted file mode 100644 index ac5203c6f..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/summary.go +++ /dev/null @@ -1,830 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "fmt" - "math" - "runtime" - "sort" - "sync" - "sync/atomic" - "time" - - dto "github.com/prometheus/client_model/go" - - "github.com/beorn7/perks/quantile" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// quantileLabel is used for the label that defines the quantile in a -// summary. -const quantileLabel = "quantile" - -// A Summary captures individual observations from an event or sample stream and -// summarizes them in a manner similar to traditional summary statistics: 1. sum -// of observations, 2. observation count, 3. rank estimations. -// -// A typical use-case is the observation of request latencies. By default, a -// Summary provides the median, the 90th and the 99th percentile of the latency -// as rank estimations. However, the default behavior will change in the -// upcoming v1.0.0 of the library. There will be no rank estimations at all by -// default. For a sane transition, it is recommended to set the desired rank -// estimations explicitly. -// -// Note that the rank estimations cannot be aggregated in a meaningful way with -// the Prometheus query language (i.e. you cannot average or add them). If you -// need aggregatable quantiles (e.g. you want the 99th percentile latency of all -// queries served across all instances of a service), consider the Histogram -// metric type. See the Prometheus documentation for more details. -// -// To create Summary instances, use NewSummary. -type Summary interface { - Metric - Collector - - // Observe adds a single observation to the summary. Observations are - // usually positive or zero. Negative observations are accepted but - // prevent current versions of Prometheus from properly detecting - // counter resets in the sum of observations. See - // https://prometheus.io/docs/practices/histograms/#count-and-sum-of-observations - // for details. - Observe(float64) -} - -var errQuantileLabelNotAllowed = fmt.Errorf( - "%q is not allowed as label name in summaries", quantileLabel, -) - -// Default values for SummaryOpts. -const ( - // DefMaxAge is the default duration for which observations stay - // relevant. - DefMaxAge time.Duration = 10 * time.Minute - // DefAgeBuckets is the default number of buckets used to calculate the - // age of observations. - DefAgeBuckets = 5 - // DefBufCap is the standard buffer size for collecting Summary observations. - DefBufCap = 500 -) - -// SummaryOpts bundles the options for creating a Summary metric. It is -// mandatory to set Name to a non-empty string. While all other fields are -// optional and can safely be left at their zero value, it is recommended to set -// a help string and to explicitly set the Objectives field to the desired value -// as the default value will change in the upcoming v1.0.0 of the library. -type SummaryOpts struct { - // Namespace, Subsystem, and Name are components of the fully-qualified - // name of the Summary (created by joining these components with - // "_"). Only Name is mandatory, the others merely help structuring the - // name. Note that the fully-qualified name of the Summary must be a - // valid Prometheus metric name. - Namespace string - Subsystem string - Name string - - // Help provides information about this Summary. - // - // Metrics with the same fully-qualified name must have the same Help - // string. - Help string - - // ConstLabels are used to attach fixed labels to this metric. Metrics - // with the same fully-qualified name must have the same label names in - // their ConstLabels. - // - // Due to the way a Summary is represented in the Prometheus text format - // and how it is handled by the Prometheus server internally, “quantile” - // is an illegal label name. Construction of a Summary or SummaryVec - // will panic if this label name is used in ConstLabels. - // - // ConstLabels are only used rarely. In particular, do not use them to - // attach the same labels to all your metrics. Those use cases are - // better covered by target labels set by the scraping Prometheus - // server, or by one specific metric (e.g. a build_info or a - // machine_role metric). See also - // https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels - ConstLabels Labels - - // Objectives defines the quantile rank estimates with their respective - // absolute error. If Objectives[q] = e, then the value reported for q - // will be the φ-quantile value for some φ between q-e and q+e. The - // default value is an empty map, resulting in a summary without - // quantiles. - Objectives map[float64]float64 - - // MaxAge defines the duration for which an observation stays relevant - // for the summary. Only applies to pre-calculated quantiles, does not - // apply to _sum and _count. Must be positive. The default value is - // DefMaxAge. - MaxAge time.Duration - - // AgeBuckets is the number of buckets used to exclude observations that - // are older than MaxAge from the summary. A higher number has a - // resource penalty, so only increase it if the higher resolution is - // really required. For very high observation rates, you might want to - // reduce the number of age buckets. With only one age bucket, you will - // effectively see a complete reset of the summary each time MaxAge has - // passed. The default value is DefAgeBuckets. - AgeBuckets uint32 - - // BufCap defines the default sample stream buffer size. The default - // value of DefBufCap should suffice for most uses. If there is a need - // to increase the value, a multiple of 500 is recommended (because that - // is the internal buffer size of the underlying package - // "github.com/bmizerany/perks/quantile"). - BufCap uint32 - - // now is for testing purposes, by default it's time.Now. - now func() time.Time -} - -// SummaryVecOpts bundles the options to create a SummaryVec metric. -// It is mandatory to set SummaryOpts, see there for mandatory fields. VariableLabels -// is optional and can safely be left to its default value. -type SummaryVecOpts struct { - SummaryOpts - - // VariableLabels are used to partition the metric vector by the given set - // of labels. Each label value will be constrained with the optional Constraint - // function, if provided. - VariableLabels ConstrainableLabels -} - -// Problem with the sliding-window decay algorithm... The Merge method of -// perk/quantile is actually not working as advertised - and it might be -// unfixable, as the underlying algorithm is apparently not capable of merging -// summaries in the first place. To avoid using Merge, we are currently adding -// observations to _each_ age bucket, i.e. the effort to add a sample is -// essentially multiplied by the number of age buckets. When rotating age -// buckets, we empty the previous head stream. On scrape time, we simply take -// the quantiles from the head stream (no merging required). Result: More effort -// on observation time, less effort on scrape time, which is exactly the -// opposite of what we try to accomplish, but at least the results are correct. -// -// The quite elegant previous contraption to merge the age buckets efficiently -// on scrape time (see code up commit 6b9530d72ea715f0ba612c0120e6e09fbf1d49d0) -// can't be used anymore. - -// NewSummary creates a new Summary based on the provided SummaryOpts. -func NewSummary(opts SummaryOpts) Summary { - return newSummary( - NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ), - opts, - ) -} - -func newSummary(desc *Desc, opts SummaryOpts, labelValues ...string) Summary { - if len(desc.variableLabels.names) != len(labelValues) { - panic(makeInconsistentCardinalityError(desc.fqName, desc.variableLabels.names, labelValues)) - } - - for _, n := range desc.variableLabels.names { - if n == quantileLabel { - panic(errQuantileLabelNotAllowed) - } - } - for _, lp := range desc.constLabelPairs { - if lp.GetName() == quantileLabel { - panic(errQuantileLabelNotAllowed) - } - } - - if opts.Objectives == nil { - opts.Objectives = map[float64]float64{} - } - - if opts.MaxAge < 0 { - panic(fmt.Errorf("illegal max age MaxAge=%v", opts.MaxAge)) - } - if opts.MaxAge == 0 { - opts.MaxAge = DefMaxAge - } - - if opts.AgeBuckets == 0 { - opts.AgeBuckets = DefAgeBuckets - } - - if opts.BufCap == 0 { - opts.BufCap = DefBufCap - } - - if opts.now == nil { - opts.now = time.Now - } - if len(opts.Objectives) == 0 { - // Use the lock-free implementation of a Summary without objectives. - s := &noObjectivesSummary{ - desc: desc, - labelPairs: MakeLabelPairs(desc, labelValues), - counts: [2]*summaryCounts{{}, {}}, - } - s.init(s) // Init self-collection. - s.createdTs = timestamppb.New(opts.now()) - return s - } - - s := &summary{ - desc: desc, - now: opts.now, - - objectives: opts.Objectives, - sortedObjectives: make([]float64, 0, len(opts.Objectives)), - - labelPairs: MakeLabelPairs(desc, labelValues), - - hotBuf: make([]float64, 0, opts.BufCap), - coldBuf: make([]float64, 0, opts.BufCap), - streamDuration: opts.MaxAge / time.Duration(opts.AgeBuckets), - } - s.headStreamExpTime = opts.now().Add(s.streamDuration) - s.hotBufExpTime = s.headStreamExpTime - - for i := uint32(0); i < opts.AgeBuckets; i++ { - s.streams = append(s.streams, s.newStream()) - } - s.headStream = s.streams[0] - - for qu := range s.objectives { - s.sortedObjectives = append(s.sortedObjectives, qu) - } - sort.Float64s(s.sortedObjectives) - - s.init(s) // Init self-collection. - s.createdTs = timestamppb.New(opts.now()) - return s -} - -type summary struct { - selfCollector - - bufMtx sync.Mutex // Protects hotBuf and hotBufExpTime. - mtx sync.Mutex // Protects every other moving part. - // Lock bufMtx before mtx if both are needed. - - desc *Desc - - now func() time.Time - - objectives map[float64]float64 - sortedObjectives []float64 - - labelPairs []*dto.LabelPair - - sum float64 - cnt uint64 - - hotBuf, coldBuf []float64 - - streams []*quantile.Stream - streamDuration time.Duration - headStream *quantile.Stream - headStreamIdx int - headStreamExpTime, hotBufExpTime time.Time - - createdTs *timestamppb.Timestamp -} - -func (s *summary) Desc() *Desc { - return s.desc -} - -func (s *summary) Observe(v float64) { - s.bufMtx.Lock() - defer s.bufMtx.Unlock() - - now := s.now() - if now.After(s.hotBufExpTime) { - s.asyncFlush(now) - } - s.hotBuf = append(s.hotBuf, v) - if len(s.hotBuf) == cap(s.hotBuf) { - s.asyncFlush(now) - } -} - -func (s *summary) Write(out *dto.Metric) error { - sum := &dto.Summary{ - CreatedTimestamp: s.createdTs, - } - qs := make([]*dto.Quantile, 0, len(s.objectives)) - - s.bufMtx.Lock() - s.mtx.Lock() - // Swap bufs even if hotBuf is empty to set new hotBufExpTime. - s.swapBufs(s.now()) - s.bufMtx.Unlock() - - s.flushColdBuf() - sum.SampleCount = proto.Uint64(s.cnt) - sum.SampleSum = proto.Float64(s.sum) - - for _, rank := range s.sortedObjectives { - var q float64 - if s.headStream.Count() == 0 { - q = math.NaN() - } else { - q = s.headStream.Query(rank) - } - qs = append(qs, &dto.Quantile{ - Quantile: proto.Float64(rank), - Value: proto.Float64(q), - }) - } - - s.mtx.Unlock() - - if len(qs) > 0 { - sort.Sort(quantSort(qs)) - } - sum.Quantile = qs - - out.Summary = sum - out.Label = s.labelPairs - return nil -} - -func (s *summary) newStream() *quantile.Stream { - return quantile.NewTargeted(s.objectives) -} - -// asyncFlush needs bufMtx locked. -func (s *summary) asyncFlush(now time.Time) { - s.mtx.Lock() - s.swapBufs(now) - - // Unblock the original goroutine that was responsible for the mutation - // that triggered the compaction. But hold onto the global non-buffer - // state mutex until the operation finishes. - go func() { - s.flushColdBuf() - s.mtx.Unlock() - }() -} - -// rotateStreams needs mtx AND bufMtx locked. -func (s *summary) maybeRotateStreams() { - for !s.hotBufExpTime.Equal(s.headStreamExpTime) { - s.headStream.Reset() - s.headStreamIdx++ - if s.headStreamIdx >= len(s.streams) { - s.headStreamIdx = 0 - } - s.headStream = s.streams[s.headStreamIdx] - s.headStreamExpTime = s.headStreamExpTime.Add(s.streamDuration) - } -} - -// flushColdBuf needs mtx locked. -func (s *summary) flushColdBuf() { - for _, v := range s.coldBuf { - for _, stream := range s.streams { - stream.Insert(v) - } - s.cnt++ - s.sum += v - } - s.coldBuf = s.coldBuf[0:0] - s.maybeRotateStreams() -} - -// swapBufs needs mtx AND bufMtx locked, coldBuf must be empty. -func (s *summary) swapBufs(now time.Time) { - if len(s.coldBuf) != 0 { - panic("coldBuf is not empty") - } - s.hotBuf, s.coldBuf = s.coldBuf, s.hotBuf - // hotBuf is now empty and gets new expiration set. - for now.After(s.hotBufExpTime) { - s.hotBufExpTime = s.hotBufExpTime.Add(s.streamDuration) - } -} - -type summaryCounts struct { - // sumBits contains the bits of the float64 representing the sum of all - // observations. sumBits and count have to go first in the struct to - // guarantee alignment for atomic operations. - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG - sumBits uint64 - count uint64 -} - -type noObjectivesSummary struct { - // countAndHotIdx enables lock-free writes with use of atomic updates. - // The most significant bit is the hot index [0 or 1] of the count field - // below. Observe calls update the hot one. All remaining bits count the - // number of Observe calls. Observe starts by incrementing this counter, - // and finish by incrementing the count field in the respective - // summaryCounts, as a marker for completion. - // - // Calls of the Write method (which are non-mutating reads from the - // perspective of the summary) swap the hot–cold under the writeMtx - // lock. A cooldown is awaited (while locked) by comparing the number of - // observations with the initiation count. Once they match, then the - // last observation on the now cool one has completed. All cool fields must - // be merged into the new hot before releasing writeMtx. - - // Fields with atomic access first! See alignment constraint: - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG - countAndHotIdx uint64 - - selfCollector - desc *Desc - writeMtx sync.Mutex // Only used in the Write method. - - // Two counts, one is "hot" for lock-free observations, the other is - // "cold" for writing out a dto.Metric. It has to be an array of - // pointers to guarantee 64bit alignment of the histogramCounts, see - // http://golang.org/pkg/sync/atomic/#pkg-note-BUG. - counts [2]*summaryCounts - - labelPairs []*dto.LabelPair - - createdTs *timestamppb.Timestamp -} - -func (s *noObjectivesSummary) Desc() *Desc { - return s.desc -} - -func (s *noObjectivesSummary) Observe(v float64) { - // We increment h.countAndHotIdx so that the counter in the lower - // 63 bits gets incremented. At the same time, we get the new value - // back, which we can use to find the currently-hot counts. - n := atomic.AddUint64(&s.countAndHotIdx, 1) - hotCounts := s.counts[n>>63] - - for { - oldBits := atomic.LoadUint64(&hotCounts.sumBits) - newBits := math.Float64bits(math.Float64frombits(oldBits) + v) - if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { - break - } - } - // Increment count last as we take it as a signal that the observation - // is complete. - atomic.AddUint64(&hotCounts.count, 1) -} - -func (s *noObjectivesSummary) Write(out *dto.Metric) error { - // For simplicity, we protect this whole method by a mutex. It is not in - // the hot path, i.e. Observe is called much more often than Write. The - // complication of making Write lock-free isn't worth it, if possible at - // all. - s.writeMtx.Lock() - defer s.writeMtx.Unlock() - - // Adding 1<<63 switches the hot index (from 0 to 1 or from 1 to 0) - // without touching the count bits. See the struct comments for a full - // description of the algorithm. - n := atomic.AddUint64(&s.countAndHotIdx, 1<<63) - // count is contained unchanged in the lower 63 bits. - count := n & ((1 << 63) - 1) - // The most significant bit tells us which counts is hot. The complement - // is thus the cold one. - hotCounts := s.counts[n>>63] - coldCounts := s.counts[(^n)>>63] - - // Await cooldown. - for count != atomic.LoadUint64(&coldCounts.count) { - runtime.Gosched() // Let observations get work done. - } - - sum := &dto.Summary{ - SampleCount: proto.Uint64(count), - SampleSum: proto.Float64(math.Float64frombits(atomic.LoadUint64(&coldCounts.sumBits))), - CreatedTimestamp: s.createdTs, - } - - out.Summary = sum - out.Label = s.labelPairs - - // Finally add all the cold counts to the new hot counts and reset the cold counts. - atomic.AddUint64(&hotCounts.count, count) - atomic.StoreUint64(&coldCounts.count, 0) - for { - oldBits := atomic.LoadUint64(&hotCounts.sumBits) - newBits := math.Float64bits(math.Float64frombits(oldBits) + sum.GetSampleSum()) - if atomic.CompareAndSwapUint64(&hotCounts.sumBits, oldBits, newBits) { - atomic.StoreUint64(&coldCounts.sumBits, 0) - break - } - } - return nil -} - -type quantSort []*dto.Quantile - -func (s quantSort) Len() int { - return len(s) -} - -func (s quantSort) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s quantSort) Less(i, j int) bool { - return s[i].GetQuantile() < s[j].GetQuantile() -} - -// SummaryVec is a Collector that bundles a set of Summaries that all share the -// same Desc, but have different values for their variable labels. This is used -// if you want to count the same thing partitioned by various dimensions -// (e.g. HTTP request latencies, partitioned by status code and method). Create -// instances with NewSummaryVec. -type SummaryVec struct { - *MetricVec -} - -// NewSummaryVec creates a new SummaryVec based on the provided SummaryOpts and -// partitioned by the given label names. -// -// Due to the way a Summary is represented in the Prometheus text format and how -// it is handled by the Prometheus server internally, “quantile” is an illegal -// label name. NewSummaryVec will panic if this label name is used. -func NewSummaryVec(opts SummaryOpts, labelNames []string) *SummaryVec { - return V2.NewSummaryVec(SummaryVecOpts{ - SummaryOpts: opts, - VariableLabels: UnconstrainedLabels(labelNames), - }) -} - -// NewSummaryVec creates a new SummaryVec based on the provided SummaryVecOpts. -func (v2) NewSummaryVec(opts SummaryVecOpts) *SummaryVec { - for _, ln := range opts.VariableLabels.labelNames() { - if ln == quantileLabel { - panic(errQuantileLabelNotAllowed) - } - } - desc := V2.NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - opts.VariableLabels, - opts.ConstLabels, - ) - return &SummaryVec{ - MetricVec: NewMetricVec(desc, func(lvs ...string) Metric { - return newSummary(desc, opts.SummaryOpts, lvs...) - }), - } -} - -// GetMetricWithLabelValues returns the Summary for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Summary is created. -// -// It is possible to call this method without using the returned Summary to only -// create the new Summary but leave it at its starting value, a Summary without -// any observations. -// -// Keeping the Summary for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Summary from the SummaryVec. In that case, -// the Summary will still exist, but it will not be exported anymore, even if a -// Summary with the same label values is created later. See also the CounterVec -// example. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// See also the GaugeVec example. -func (v *SummaryVec) GetMetricWithLabelValues(lvs ...string) (Observer, error) { - metric, err := v.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(Observer), err - } - return nil, err -} - -// GetMetricWith returns the Summary for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Summary is created. Implications of -// creating a Summary without using it and keeping the Summary for later use are -// the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -func (v *SummaryVec) GetMetricWith(labels Labels) (Observer, error) { - metric, err := v.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(Observer), err - } - return nil, err -} - -// WithLabelValues works as GetMetricWithLabelValues, but panics where -// GetMetricWithLabelValues would have returned an error. Not returning an -// error allows shortcuts like -// -// myVec.WithLabelValues("404", "GET").Observe(42.21) -func (v *SummaryVec) WithLabelValues(lvs ...string) Observer { - s, err := v.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return s -} - -// With works as GetMetricWith, but panics where GetMetricWithLabels would have -// returned an error. Not returning an error allows shortcuts like -// -// myVec.With(prometheus.Labels{"code": "404", "method": "GET"}).Observe(42.21) -func (v *SummaryVec) With(labels Labels) Observer { - s, err := v.GetMetricWith(labels) - if err != nil { - panic(err) - } - return s -} - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the SummaryVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -func (v *SummaryVec) CurryWith(labels Labels) (ObserverVec, error) { - vec, err := v.MetricVec.CurryWith(labels) - if vec != nil { - return &SummaryVec{vec}, err - } - return nil, err -} - -// MustCurryWith works as CurryWith but panics where CurryWith would have -// returned an error. -func (v *SummaryVec) MustCurryWith(labels Labels) ObserverVec { - vec, err := v.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} - -type constSummary struct { - desc *Desc - count uint64 - sum float64 - quantiles map[float64]float64 - labelPairs []*dto.LabelPair - createdTs *timestamppb.Timestamp -} - -func (s *constSummary) Desc() *Desc { - return s.desc -} - -func (s *constSummary) Write(out *dto.Metric) error { - sum := &dto.Summary{ - CreatedTimestamp: s.createdTs, - } - qs := make([]*dto.Quantile, 0, len(s.quantiles)) - - sum.SampleCount = proto.Uint64(s.count) - sum.SampleSum = proto.Float64(s.sum) - - for rank, q := range s.quantiles { - qs = append(qs, &dto.Quantile{ - Quantile: proto.Float64(rank), - Value: proto.Float64(q), - }) - } - - if len(qs) > 0 { - sort.Sort(quantSort(qs)) - } - sum.Quantile = qs - - out.Summary = sum - out.Label = s.labelPairs - - return nil -} - -// NewConstSummary returns a metric representing a Prometheus summary with fixed -// values for the count, sum, and quantiles. As those parameters cannot be -// changed, the returned value does not implement the Summary interface (but -// only the Metric interface). Users of this package will not have much use for -// it in regular operations. However, when implementing custom Collectors, it is -// useful as a throw-away metric that is generated on the fly to send it to -// Prometheus in the Collect method. -// -// quantiles maps ranks to quantile values. For example, a median latency of -// 0.23s and a 99th percentile latency of 0.56s would be expressed as: -// -// map[float64]float64{0.5: 0.23, 0.99: 0.56} -// -// NewConstSummary returns an error if the length of labelValues is not -// consistent with the variable labels in Desc or if Desc is invalid. -func NewConstSummary( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constSummary{ - desc: desc, - count: count, - sum: sum, - quantiles: quantiles, - labelPairs: MakeLabelPairs(desc, labelValues), - }, nil -} - -// MustNewConstSummary is a version of NewConstSummary that panics where -// NewConstMetric would have returned an error. -func MustNewConstSummary( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - labelValues ...string, -) Metric { - m, err := NewConstSummary(desc, count, sum, quantiles, labelValues...) - if err != nil { - panic(err) - } - return m -} - -// NewConstSummaryWithCreatedTimestamp does the same thing as NewConstSummary but sets the created timestamp. -func NewConstSummaryWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - ct time.Time, - labelValues ...string, -) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - return &constSummary{ - desc: desc, - count: count, - sum: sum, - quantiles: quantiles, - labelPairs: MakeLabelPairs(desc, labelValues), - createdTs: timestamppb.New(ct), - }, nil -} - -// MustNewConstSummaryWithCreatedTimestamp is a version of NewConstSummaryWithCreatedTimestamp that panics where -// NewConstSummaryWithCreatedTimestamp would have returned an error. -func MustNewConstSummaryWithCreatedTimestamp( - desc *Desc, - count uint64, - sum float64, - quantiles map[float64]float64, - ct time.Time, - labelValues ...string, -) Metric { - m, err := NewConstSummaryWithCreatedTimestamp(desc, count, sum, quantiles, ct, labelValues...) - if err != nil { - panic(err) - } - return m -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/timer.go b/vendor/github.com/prometheus/client_golang/prometheus/timer.go deleted file mode 100644 index 52344fef5..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/timer.go +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2016 The Prometheus 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 prometheus - -import "time" - -// Timer is a helper type to time functions. Use NewTimer to create new -// instances. -type Timer struct { - begin time.Time - observer Observer -} - -// NewTimer creates a new Timer. The provided Observer is used to observe a -// duration in seconds. If the Observer implements ExemplarObserver, passing exemplar -// later on will be also supported. -// Timer is usually used to time a function call in the -// following way: -// -// func TimeMe() { -// timer := NewTimer(myHistogram) -// defer timer.ObserveDuration() -// // Do actual work. -// } -// -// or -// -// func TimeMeWithExemplar() { -// timer := NewTimer(myHistogram) -// defer timer.ObserveDurationWithExemplar(exemplar) -// // Do actual work. -// } -func NewTimer(o Observer) *Timer { - return &Timer{ - begin: time.Now(), - observer: o, - } -} - -// ObserveDuration records the duration passed since the Timer was created with -// NewTimer. It calls the Observe method of the Observer provided during -// construction with the duration in seconds as an argument. The observed -// duration is also returned. ObserveDuration is usually called with a defer -// statement. -// -// Note that this method is only guaranteed to never observe negative durations -// if used with Go1.9+. -func (t *Timer) ObserveDuration() time.Duration { - d := time.Since(t.begin) - if t.observer != nil { - t.observer.Observe(d.Seconds()) - } - return d -} - -// ObserveDurationWithExemplar is like ObserveDuration, but it will also -// observe exemplar with the duration unless exemplar is nil or provided Observer can't -// be casted to ExemplarObserver. -func (t *Timer) ObserveDurationWithExemplar(exemplar Labels) time.Duration { - d := time.Since(t.begin) - eo, ok := t.observer.(ExemplarObserver) - if ok && exemplar != nil { - eo.ObserveWithExemplar(d.Seconds(), exemplar) - return d - } - if t.observer != nil { - t.observer.Observe(d.Seconds()) - } - return d -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go b/vendor/github.com/prometheus/client_golang/prometheus/untyped.go deleted file mode 100644 index 0f9ce63f4..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/untyped.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -// UntypedOpts is an alias for Opts. See there for doc comments. -type UntypedOpts Opts - -// UntypedFunc works like GaugeFunc but the collected metric is of type -// "Untyped". UntypedFunc is useful to mirror an external metric of unknown -// type. -// -// To create UntypedFunc instances, use NewUntypedFunc. -type UntypedFunc interface { - Metric - Collector -} - -// NewUntypedFunc creates a new UntypedFunc based on the provided -// UntypedOpts. The value reported is determined by calling the given function -// from within the Write method. Take into account that metric collection may -// happen concurrently. If that results in concurrent calls to Write, like in -// the case where an UntypedFunc is directly registered with Prometheus, the -// provided function must be concurrency-safe. -func NewUntypedFunc(opts UntypedOpts, function func() float64) UntypedFunc { - return newValueFunc(NewDesc( - BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - opts.Help, - nil, - opts.ConstLabels, - ), UntypedValue, function) -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/value.go b/vendor/github.com/prometheus/client_golang/prometheus/value.go deleted file mode 100644 index cc23011fa..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/value.go +++ /dev/null @@ -1,274 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "errors" - "fmt" - "sort" - "time" - "unicode/utf8" - - "github.com/prometheus/client_golang/prometheus/internal" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/proto" - "google.golang.org/protobuf/types/known/timestamppb" -) - -// ValueType is an enumeration of metric types that represent a simple value. -type ValueType int - -// Possible values for the ValueType enum. Use UntypedValue to mark a metric -// with an unknown type. -const ( - _ ValueType = iota - CounterValue - GaugeValue - UntypedValue -) - -var ( - CounterMetricTypePtr = func() *dto.MetricType { d := dto.MetricType_COUNTER; return &d }() - GaugeMetricTypePtr = func() *dto.MetricType { d := dto.MetricType_GAUGE; return &d }() - UntypedMetricTypePtr = func() *dto.MetricType { d := dto.MetricType_UNTYPED; return &d }() -) - -func (v ValueType) ToDTO() *dto.MetricType { - switch v { - case CounterValue: - return CounterMetricTypePtr - case GaugeValue: - return GaugeMetricTypePtr - default: - return UntypedMetricTypePtr - } -} - -// valueFunc is a generic metric for simple values retrieved on collect time -// from a function. It implements Metric and Collector. Its effective type is -// determined by ValueType. This is a low-level building block used by the -// library to back the implementations of CounterFunc, GaugeFunc, and -// UntypedFunc. -type valueFunc struct { - selfCollector - - desc *Desc - valType ValueType - function func() float64 - labelPairs []*dto.LabelPair -} - -// newValueFunc returns a newly allocated valueFunc with the given Desc and -// ValueType. The value reported is determined by calling the given function -// from within the Write method. Take into account that metric collection may -// happen concurrently. If that results in concurrent calls to Write, like in -// the case where a valueFunc is directly registered with Prometheus, the -// provided function must be concurrency-safe. -func newValueFunc(desc *Desc, valueType ValueType, function func() float64) *valueFunc { - result := &valueFunc{ - desc: desc, - valType: valueType, - function: function, - labelPairs: MakeLabelPairs(desc, nil), - } - result.init(result) - return result -} - -func (v *valueFunc) Desc() *Desc { - return v.desc -} - -func (v *valueFunc) Write(out *dto.Metric) error { - return populateMetric(v.valType, v.function(), v.labelPairs, nil, out, nil) -} - -// NewConstMetric returns a metric with one fixed value that cannot be -// changed. Users of this package will not have much use for it in regular -// operations. However, when implementing custom Collectors, it is useful as a -// throw-away metric that is generated on the fly to send it to Prometheus in -// the Collect method. NewConstMetric returns an error if the length of -// labelValues is not consistent with the variable labels in Desc or if Desc is -// invalid. -func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - - metric := &dto.Metric{} - if err := populateMetric(valueType, value, MakeLabelPairs(desc, labelValues), nil, metric, nil); err != nil { - return nil, err - } - - return &constMetric{ - desc: desc, - metric: metric, - }, nil -} - -// MustNewConstMetric is a version of NewConstMetric that panics where -// NewConstMetric would have returned an error. -func MustNewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) Metric { - m, err := NewConstMetric(desc, valueType, value, labelValues...) - if err != nil { - panic(err) - } - return m -} - -// NewConstMetricWithCreatedTimestamp does the same thing as NewConstMetric, but generates Counters -// with created timestamp set and returns an error for other metric types. -func NewConstMetricWithCreatedTimestamp(desc *Desc, valueType ValueType, value float64, ct time.Time, labelValues ...string) (Metric, error) { - if desc.err != nil { - return nil, desc.err - } - if err := validateLabelValues(labelValues, len(desc.variableLabels.names)); err != nil { - return nil, err - } - switch valueType { - case CounterValue: - break - default: - return nil, errors.New("created timestamps are only supported for counters") - } - - metric := &dto.Metric{} - if err := populateMetric(valueType, value, MakeLabelPairs(desc, labelValues), nil, metric, timestamppb.New(ct)); err != nil { - return nil, err - } - - return &constMetric{ - desc: desc, - metric: metric, - }, nil -} - -// MustNewConstMetricWithCreatedTimestamp is a version of NewConstMetricWithCreatedTimestamp that panics where -// NewConstMetricWithCreatedTimestamp would have returned an error. -func MustNewConstMetricWithCreatedTimestamp(desc *Desc, valueType ValueType, value float64, ct time.Time, labelValues ...string) Metric { - m, err := NewConstMetricWithCreatedTimestamp(desc, valueType, value, ct, labelValues...) - if err != nil { - panic(err) - } - return m -} - -type constMetric struct { - desc *Desc - metric *dto.Metric -} - -func (m *constMetric) Desc() *Desc { - return m.desc -} - -func (m *constMetric) Write(out *dto.Metric) error { - out.Label = m.metric.Label - out.Counter = m.metric.Counter - out.Gauge = m.metric.Gauge - out.Untyped = m.metric.Untyped - return nil -} - -func populateMetric( - t ValueType, - v float64, - labelPairs []*dto.LabelPair, - e *dto.Exemplar, - m *dto.Metric, - ct *timestamppb.Timestamp, -) error { - m.Label = labelPairs - switch t { - case CounterValue: - m.Counter = &dto.Counter{Value: proto.Float64(v), Exemplar: e, CreatedTimestamp: ct} - case GaugeValue: - m.Gauge = &dto.Gauge{Value: proto.Float64(v)} - case UntypedValue: - m.Untyped = &dto.Untyped{Value: proto.Float64(v)} - default: - return fmt.Errorf("encountered unknown type %v", t) - } - return nil -} - -// MakeLabelPairs is a helper function to create protobuf LabelPairs from the -// variable and constant labels in the provided Desc. The values for the -// variable labels are defined by the labelValues slice, which must be in the -// same order as the corresponding variable labels in the Desc. -// -// This function is only needed for custom Metric implementations. See MetricVec -// example. -func MakeLabelPairs(desc *Desc, labelValues []string) []*dto.LabelPair { - totalLen := len(desc.variableLabels.names) + len(desc.constLabelPairs) - if totalLen == 0 { - // Super fast path. - return nil - } - if len(desc.variableLabels.names) == 0 { - // Moderately fast path. - return desc.constLabelPairs - } - labelPairs := make([]*dto.LabelPair, 0, totalLen) - for i, l := range desc.variableLabels.names { - labelPairs = append(labelPairs, &dto.LabelPair{ - Name: proto.String(l), - Value: proto.String(labelValues[i]), - }) - } - labelPairs = append(labelPairs, desc.constLabelPairs...) - sort.Sort(internal.LabelPairSorter(labelPairs)) - return labelPairs -} - -// ExemplarMaxRunes is the max total number of runes allowed in exemplar labels. -const ExemplarMaxRunes = 128 - -// newExemplar creates a new dto.Exemplar from the provided values. An error is -// returned if any of the label names or values are invalid or if the total -// number of runes in the label names and values exceeds ExemplarMaxRunes. -func newExemplar(value float64, ts time.Time, l Labels) (*dto.Exemplar, error) { - e := &dto.Exemplar{} - e.Value = proto.Float64(value) - tsProto := timestamppb.New(ts) - if err := tsProto.CheckValid(); err != nil { - return nil, err - } - e.Timestamp = tsProto - labelPairs := make([]*dto.LabelPair, 0, len(l)) - var runes int - for name, value := range l { - if !checkLabelName(name) { - return nil, fmt.Errorf("exemplar label name %q is invalid", name) - } - runes += utf8.RuneCountInString(name) - if !utf8.ValidString(value) { - return nil, fmt.Errorf("exemplar label value %q is not valid UTF-8", value) - } - runes += utf8.RuneCountInString(value) - labelPairs = append(labelPairs, &dto.LabelPair{ - Name: proto.String(name), - Value: proto.String(value), - }) - } - if runes > ExemplarMaxRunes { - return nil, fmt.Errorf("exemplar labels have %d runes, exceeding the limit of %d", runes, ExemplarMaxRunes) - } - e.Label = labelPairs - return e, nil -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vec.go b/vendor/github.com/prometheus/client_golang/prometheus/vec.go deleted file mode 100644 index 487b46656..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/vec.go +++ /dev/null @@ -1,709 +0,0 @@ -// Copyright 2014 The Prometheus 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 prometheus - -import ( - "fmt" - "sync" - - "github.com/prometheus/common/model" -) - -// MetricVec is a Collector to bundle metrics of the same name that differ in -// their label values. MetricVec is not used directly but as a building block -// for implementations of vectors of a given metric type, like GaugeVec, -// CounterVec, SummaryVec, and HistogramVec. It is exported so that it can be -// used for custom Metric implementations. -// -// To create a FooVec for custom Metric Foo, embed a pointer to MetricVec in -// FooVec and initialize it with NewMetricVec. Implement wrappers for -// GetMetricWithLabelValues and GetMetricWith that return (Foo, error) rather -// than (Metric, error). Similarly, create a wrapper for CurryWith that returns -// (*FooVec, error) rather than (*MetricVec, error). It is recommended to also -// add the convenience methods WithLabelValues, With, and MustCurryWith, which -// panic instead of returning errors. See also the MetricVec example. -type MetricVec struct { - *metricMap - - curry []curriedLabelValue - - // hashAdd and hashAddByte can be replaced for testing collision handling. - hashAdd func(h uint64, s string) uint64 - hashAddByte func(h uint64, b byte) uint64 -} - -// NewMetricVec returns an initialized metricVec. -func NewMetricVec(desc *Desc, newMetric func(lvs ...string) Metric) *MetricVec { - return &MetricVec{ - metricMap: &metricMap{ - metrics: map[uint64][]metricWithLabelValues{}, - desc: desc, - newMetric: newMetric, - }, - hashAdd: hashAdd, - hashAddByte: hashAddByte, - } -} - -// DeleteLabelValues removes the metric where the variable labels are the same -// as those passed in as labels (same order as the VariableLabels in Desc). It -// returns true if a metric was deleted. -// -// It is not an error if the number of label values is not the same as the -// number of VariableLabels in Desc. However, such inconsistent label count can -// never match an actual metric, so the method will always return false in that -// case. -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider Delete(Labels) as an -// alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// See also the CounterVec example. -func (m *MetricVec) DeleteLabelValues(lvs ...string) bool { - lvs = constrainLabelValues(m.desc, lvs, m.curry) - - h, err := m.hashLabelValues(lvs) - if err != nil { - return false - } - - return m.deleteByHashWithLabelValues(h, lvs, m.curry) -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -// -// This method is used for the same purpose as DeleteLabelValues(...string). See -// there for pros and cons of the two methods. -func (m *MetricVec) Delete(labels Labels) bool { - labels, closer := constrainLabels(m.desc, labels) - defer closer() - - h, err := m.hashLabels(labels) - if err != nil { - return false - } - - return m.deleteByHashWithLabels(h, labels, m.curry) -} - -// DeletePartialMatch deletes all metrics where the variable labels contain all of those -// passed in as labels. The order of the labels does not matter. -// It returns the number of metrics deleted. -// -// Note that curried labels will never be matched if deleting from the curried vector. -// To match curried labels with DeletePartialMatch, it must be called on the base vector. -func (m *MetricVec) DeletePartialMatch(labels Labels) int { - labels, closer := constrainLabels(m.desc, labels) - defer closer() - - return m.deleteByLabels(labels, m.curry) -} - -// Without explicit forwarding of Describe, Collect, Reset, those methods won't -// show up in GoDoc. - -// Describe implements Collector. -func (m *MetricVec) Describe(ch chan<- *Desc) { m.metricMap.Describe(ch) } - -// Collect implements Collector. -func (m *MetricVec) Collect(ch chan<- Metric) { m.metricMap.Collect(ch) } - -// Reset deletes all metrics in this vector. -func (m *MetricVec) Reset() { m.metricMap.Reset() } - -// CurryWith returns a vector curried with the provided labels, i.e. the -// returned vector has those labels pre-set for all labeled operations performed -// on it. The cardinality of the curried vector is reduced accordingly. The -// order of the remaining labels stays the same (just with the curried labels -// taken out of the sequence – which is relevant for the -// (GetMetric)WithLabelValues methods). It is possible to curry a curried -// vector, but only with labels not yet used for currying before. -// -// The metrics contained in the MetricVec are shared between the curried and -// uncurried vectors. They are just accessed differently. Curried and uncurried -// vectors behave identically in terms of collection. Only one must be -// registered with a given registry (usually the uncurried version). The Reset -// method deletes all metrics, even if called on a curried vector. -// -// Note that CurryWith is usually not called directly but through a wrapper -// around MetricVec, implementing a vector for a specific Metric -// implementation, for example GaugeVec. -func (m *MetricVec) CurryWith(labels Labels) (*MetricVec, error) { - var ( - newCurry []curriedLabelValue - oldCurry = m.curry - iCurry int - ) - for i, labelName := range m.desc.variableLabels.names { - val, ok := labels[labelName] - if iCurry < len(oldCurry) && oldCurry[iCurry].index == i { - if ok { - return nil, fmt.Errorf("label name %q is already curried", labelName) - } - newCurry = append(newCurry, oldCurry[iCurry]) - iCurry++ - } else { - if !ok { - continue // Label stays uncurried. - } - newCurry = append(newCurry, curriedLabelValue{ - i, - m.desc.variableLabels.constrain(labelName, val), - }) - } - } - if l := len(oldCurry) + len(labels) - len(newCurry); l > 0 { - return nil, fmt.Errorf("%d unknown label(s) found during currying", l) - } - - return &MetricVec{ - metricMap: m.metricMap, - curry: newCurry, - hashAdd: m.hashAdd, - hashAddByte: m.hashAddByte, - }, nil -} - -// GetMetricWithLabelValues returns the Metric for the given slice of label -// values (same order as the variable labels in Desc). If that combination of -// label values is accessed for the first time, a new Metric is created (by -// calling the newMetric function provided during construction of the -// MetricVec). -// -// It is possible to call this method without using the returned Metric to only -// create the new Metric but leave it in its initial state. -// -// Keeping the Metric for later use is possible (and should be considered if -// performance is critical), but keep in mind that Reset, DeleteLabelValues and -// Delete can be used to delete the Metric from the MetricVec. In that case, the -// Metric will still exist, but it will not be exported anymore, even if a -// Metric with the same label values is created later. -// -// An error is returned if the number of label values is not the same as the -// number of variable labels in Desc (minus any curried labels). -// -// Note that for more than one label value, this method is prone to mistakes -// caused by an incorrect order of arguments. Consider GetMetricWith(Labels) as -// an alternative to avoid that type of mistake. For higher label numbers, the -// latter has a much more readable (albeit more verbose) syntax, but it comes -// with a performance overhead (for creating and processing the Labels map). -// -// Note that GetMetricWithLabelValues is usually not called directly but through -// a wrapper around MetricVec, implementing a vector for a specific Metric -// implementation, for example GaugeVec. -func (m *MetricVec) GetMetricWithLabelValues(lvs ...string) (Metric, error) { - lvs = constrainLabelValues(m.desc, lvs, m.curry) - h, err := m.hashLabelValues(lvs) - if err != nil { - return nil, err - } - - return m.getOrCreateMetricWithLabelValues(h, lvs, m.curry), nil -} - -// GetMetricWith returns the Metric for the given Labels map (the label names -// must match those of the variable labels in Desc). If that label map is -// accessed for the first time, a new Metric is created. Implications of -// creating a Metric without using it and keeping the Metric for later use -// are the same as for GetMetricWithLabelValues. -// -// An error is returned if the number and names of the Labels are inconsistent -// with those of the variable labels in Desc (minus any curried labels). -// -// This method is used for the same purpose as -// GetMetricWithLabelValues(...string). See there for pros and cons of the two -// methods. -// -// Note that GetMetricWith is usually not called directly but through a wrapper -// around MetricVec, implementing a vector for a specific Metric implementation, -// for example GaugeVec. -func (m *MetricVec) GetMetricWith(labels Labels) (Metric, error) { - labels, closer := constrainLabels(m.desc, labels) - defer closer() - - h, err := m.hashLabels(labels) - if err != nil { - return nil, err - } - - return m.getOrCreateMetricWithLabels(h, labels, m.curry), nil -} - -func (m *MetricVec) hashLabelValues(vals []string) (uint64, error) { - if err := validateLabelValues(vals, len(m.desc.variableLabels.names)-len(m.curry)); err != nil { - return 0, err - } - - var ( - h = hashNew() - curry = m.curry - iVals, iCurry int - ) - for i := 0; i < len(m.desc.variableLabels.names); i++ { - if iCurry < len(curry) && curry[iCurry].index == i { - h = m.hashAdd(h, curry[iCurry].value) - iCurry++ - } else { - h = m.hashAdd(h, vals[iVals]) - iVals++ - } - h = m.hashAddByte(h, model.SeparatorByte) - } - return h, nil -} - -func (m *MetricVec) hashLabels(labels Labels) (uint64, error) { - if err := validateValuesInLabels(labels, len(m.desc.variableLabels.names)-len(m.curry)); err != nil { - return 0, err - } - - var ( - h = hashNew() - curry = m.curry - iCurry int - ) - for i, labelName := range m.desc.variableLabels.names { - val, ok := labels[labelName] - if iCurry < len(curry) && curry[iCurry].index == i { - if ok { - return 0, fmt.Errorf("label name %q is already curried", labelName) - } - h = m.hashAdd(h, curry[iCurry].value) - iCurry++ - } else { - if !ok { - return 0, fmt.Errorf("label name %q missing in label map", labelName) - } - h = m.hashAdd(h, val) - } - h = m.hashAddByte(h, model.SeparatorByte) - } - return h, nil -} - -// metricWithLabelValues provides the metric and its label values for -// disambiguation on hash collision. -type metricWithLabelValues struct { - values []string - metric Metric -} - -// curriedLabelValue sets the curried value for a label at the given index. -type curriedLabelValue struct { - index int - value string -} - -// metricMap is a helper for metricVec and shared between differently curried -// metricVecs. -type metricMap struct { - mtx sync.RWMutex // Protects metrics. - metrics map[uint64][]metricWithLabelValues - desc *Desc - newMetric func(labelValues ...string) Metric -} - -// Describe implements Collector. It will send exactly one Desc to the provided -// channel. -func (m *metricMap) Describe(ch chan<- *Desc) { - ch <- m.desc -} - -// Collect implements Collector. -func (m *metricMap) Collect(ch chan<- Metric) { - m.mtx.RLock() - defer m.mtx.RUnlock() - - for _, metrics := range m.metrics { - for _, metric := range metrics { - ch <- metric.metric - } - } -} - -// Reset deletes all metrics in this vector. -func (m *metricMap) Reset() { - m.mtx.Lock() - defer m.mtx.Unlock() - - for h := range m.metrics { - delete(m.metrics, h) - } -} - -// deleteByHashWithLabelValues removes the metric from the hash bucket h. If -// there are multiple matches in the bucket, use lvs to select a metric and -// remove only that metric. -func (m *metricMap) deleteByHashWithLabelValues( - h uint64, lvs []string, curry []curriedLabelValue, -) bool { - m.mtx.Lock() - defer m.mtx.Unlock() - - metrics, ok := m.metrics[h] - if !ok { - return false - } - - i := findMetricWithLabelValues(metrics, lvs, curry) - if i >= len(metrics) { - return false - } - - if len(metrics) > 1 { - old := metrics - m.metrics[h] = append(metrics[:i], metrics[i+1:]...) - old[len(old)-1] = metricWithLabelValues{} - } else { - delete(m.metrics, h) - } - return true -} - -// deleteByHashWithLabels removes the metric from the hash bucket h. If there -// are multiple matches in the bucket, use lvs to select a metric and remove -// only that metric. -func (m *metricMap) deleteByHashWithLabels( - h uint64, labels Labels, curry []curriedLabelValue, -) bool { - m.mtx.Lock() - defer m.mtx.Unlock() - - metrics, ok := m.metrics[h] - if !ok { - return false - } - i := findMetricWithLabels(m.desc, metrics, labels, curry) - if i >= len(metrics) { - return false - } - - if len(metrics) > 1 { - old := metrics - m.metrics[h] = append(metrics[:i], metrics[i+1:]...) - old[len(old)-1] = metricWithLabelValues{} - } else { - delete(m.metrics, h) - } - return true -} - -// deleteByLabels deletes a metric if the given labels are present in the metric. -func (m *metricMap) deleteByLabels(labels Labels, curry []curriedLabelValue) int { - m.mtx.Lock() - defer m.mtx.Unlock() - - var numDeleted int - - for h, metrics := range m.metrics { - i := findMetricWithPartialLabels(m.desc, metrics, labels, curry) - if i >= len(metrics) { - // Didn't find matching labels in this metric slice. - continue - } - delete(m.metrics, h) - numDeleted++ - } - - return numDeleted -} - -// findMetricWithPartialLabel returns the index of the matching metric or -// len(metrics) if not found. -func findMetricWithPartialLabels( - desc *Desc, metrics []metricWithLabelValues, labels Labels, curry []curriedLabelValue, -) int { - for i, metric := range metrics { - if matchPartialLabels(desc, metric.values, labels, curry) { - return i - } - } - return len(metrics) -} - -// indexOf searches the given slice of strings for the target string and returns -// the index or len(items) as well as a boolean whether the search succeeded. -func indexOf(target string, items []string) (int, bool) { - for i, l := range items { - if l == target { - return i, true - } - } - return len(items), false -} - -// valueMatchesVariableOrCurriedValue determines if a value was previously curried, -// and returns whether it matches either the "base" value or the curried value accordingly. -// It also indicates whether the match is against a curried or uncurried value. -func valueMatchesVariableOrCurriedValue(targetValue string, index int, values []string, curry []curriedLabelValue) (bool, bool) { - for _, curriedValue := range curry { - if curriedValue.index == index { - // This label was curried. See if the curried value matches our target. - return curriedValue.value == targetValue, true - } - } - // This label was not curried. See if the current value matches our target label. - return values[index] == targetValue, false -} - -// matchPartialLabels searches the current metric and returns whether all of the target label:value pairs are present. -func matchPartialLabels(desc *Desc, values []string, labels Labels, curry []curriedLabelValue) bool { - for l, v := range labels { - // Check if the target label exists in our metrics and get the index. - varLabelIndex, validLabel := indexOf(l, desc.variableLabels.names) - if validLabel { - // Check the value of that label against the target value. - // We don't consider curried values in partial matches. - matches, curried := valueMatchesVariableOrCurriedValue(v, varLabelIndex, values, curry) - if matches && !curried { - continue - } - } - return false - } - return true -} - -// getOrCreateMetricWithLabelValues retrieves the metric by hash and label value -// or creates it and returns the new one. -// -// This function holds the mutex. -func (m *metricMap) getOrCreateMetricWithLabelValues( - hash uint64, lvs []string, curry []curriedLabelValue, -) Metric { - m.mtx.RLock() - metric, ok := m.getMetricWithHashAndLabelValues(hash, lvs, curry) - m.mtx.RUnlock() - if ok { - return metric - } - - m.mtx.Lock() - defer m.mtx.Unlock() - metric, ok = m.getMetricWithHashAndLabelValues(hash, lvs, curry) - if !ok { - inlinedLVs := inlineLabelValues(lvs, curry) - metric = m.newMetric(inlinedLVs...) - m.metrics[hash] = append(m.metrics[hash], metricWithLabelValues{values: inlinedLVs, metric: metric}) - } - return metric -} - -// getOrCreateMetricWithLabels retrieves the metric by hash and label value -// or creates it and returns the new one. -// -// This function holds the mutex. -func (m *metricMap) getOrCreateMetricWithLabels( - hash uint64, labels Labels, curry []curriedLabelValue, -) Metric { - m.mtx.RLock() - metric, ok := m.getMetricWithHashAndLabels(hash, labels, curry) - m.mtx.RUnlock() - if ok { - return metric - } - - m.mtx.Lock() - defer m.mtx.Unlock() - metric, ok = m.getMetricWithHashAndLabels(hash, labels, curry) - if !ok { - lvs := extractLabelValues(m.desc, labels, curry) - metric = m.newMetric(lvs...) - m.metrics[hash] = append(m.metrics[hash], metricWithLabelValues{values: lvs, metric: metric}) - } - return metric -} - -// getMetricWithHashAndLabelValues gets a metric while handling possible -// collisions in the hash space. Must be called while holding the read mutex. -func (m *metricMap) getMetricWithHashAndLabelValues( - h uint64, lvs []string, curry []curriedLabelValue, -) (Metric, bool) { - metrics, ok := m.metrics[h] - if ok { - if i := findMetricWithLabelValues(metrics, lvs, curry); i < len(metrics) { - return metrics[i].metric, true - } - } - return nil, false -} - -// getMetricWithHashAndLabels gets a metric while handling possible collisions in -// the hash space. Must be called while holding read mutex. -func (m *metricMap) getMetricWithHashAndLabels( - h uint64, labels Labels, curry []curriedLabelValue, -) (Metric, bool) { - metrics, ok := m.metrics[h] - if ok { - if i := findMetricWithLabels(m.desc, metrics, labels, curry); i < len(metrics) { - return metrics[i].metric, true - } - } - return nil, false -} - -// findMetricWithLabelValues returns the index of the matching metric or -// len(metrics) if not found. -func findMetricWithLabelValues( - metrics []metricWithLabelValues, lvs []string, curry []curriedLabelValue, -) int { - for i, metric := range metrics { - if matchLabelValues(metric.values, lvs, curry) { - return i - } - } - return len(metrics) -} - -// findMetricWithLabels returns the index of the matching metric or len(metrics) -// if not found. -func findMetricWithLabels( - desc *Desc, metrics []metricWithLabelValues, labels Labels, curry []curriedLabelValue, -) int { - for i, metric := range metrics { - if matchLabels(desc, metric.values, labels, curry) { - return i - } - } - return len(metrics) -} - -func matchLabelValues(values, lvs []string, curry []curriedLabelValue) bool { - if len(values) != len(lvs)+len(curry) { - return false - } - var iLVs, iCurry int - for i, v := range values { - if iCurry < len(curry) && curry[iCurry].index == i { - if v != curry[iCurry].value { - return false - } - iCurry++ - continue - } - if v != lvs[iLVs] { - return false - } - iLVs++ - } - return true -} - -func matchLabels(desc *Desc, values []string, labels Labels, curry []curriedLabelValue) bool { - if len(values) != len(labels)+len(curry) { - return false - } - iCurry := 0 - for i, k := range desc.variableLabels.names { - if iCurry < len(curry) && curry[iCurry].index == i { - if values[i] != curry[iCurry].value { - return false - } - iCurry++ - continue - } - if values[i] != labels[k] { - return false - } - } - return true -} - -func extractLabelValues(desc *Desc, labels Labels, curry []curriedLabelValue) []string { - labelValues := make([]string, len(labels)+len(curry)) - iCurry := 0 - for i, k := range desc.variableLabels.names { - if iCurry < len(curry) && curry[iCurry].index == i { - labelValues[i] = curry[iCurry].value - iCurry++ - continue - } - labelValues[i] = labels[k] - } - return labelValues -} - -func inlineLabelValues(lvs []string, curry []curriedLabelValue) []string { - labelValues := make([]string, len(lvs)+len(curry)) - var iCurry, iLVs int - for i := range labelValues { - if iCurry < len(curry) && curry[iCurry].index == i { - labelValues[i] = curry[iCurry].value - iCurry++ - continue - } - labelValues[i] = lvs[iLVs] - iLVs++ - } - return labelValues -} - -var labelsPool = &sync.Pool{ - New: func() interface{} { - return make(Labels) - }, -} - -func constrainLabels(desc *Desc, labels Labels) (Labels, func()) { - if len(desc.variableLabels.labelConstraints) == 0 { - // Fast path when there's no constraints - return labels, func() {} - } - - constrainedLabels := labelsPool.Get().(Labels) - for l, v := range labels { - constrainedLabels[l] = desc.variableLabels.constrain(l, v) - } - - return constrainedLabels, func() { - for k := range constrainedLabels { - delete(constrainedLabels, k) - } - labelsPool.Put(constrainedLabels) - } -} - -func constrainLabelValues(desc *Desc, lvs []string, curry []curriedLabelValue) []string { - if len(desc.variableLabels.labelConstraints) == 0 { - // Fast path when there's no constraints - return lvs - } - - constrainedValues := make([]string, len(lvs)) - var iCurry, iLVs int - for i := 0; i < len(lvs)+len(curry); i++ { - if iCurry < len(curry) && curry[iCurry].index == i { - iCurry++ - continue - } - - if i < len(desc.variableLabels.names) { - constrainedValues[iLVs] = desc.variableLabels.constrain( - desc.variableLabels.names[i], - lvs[iLVs], - ) - } else { - constrainedValues[iLVs] = lvs[iLVs] - } - iLVs++ - } - return constrainedValues -} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/vnext.go b/vendor/github.com/prometheus/client_golang/prometheus/vnext.go deleted file mode 100644 index 42bc3a8f0..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/vnext.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 The Prometheus 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 prometheus - -type v2 struct{} - -// V2 is a struct that can be referenced to access experimental API that might -// be present in v2 of client golang someday. It offers extended functionality -// of v1 with slightly changed API. It is acceptable to use some pieces from v1 -// and e.g `prometheus.NewGauge` and some from v2 e.g. `prometheus.V2.NewDesc` -// in the same codebase. -var V2 = v2{} diff --git a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go b/vendor/github.com/prometheus/client_golang/prometheus/wrap.go deleted file mode 100644 index 2ed128506..000000000 --- a/vendor/github.com/prometheus/client_golang/prometheus/wrap.go +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright 2018 The Prometheus 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 prometheus - -import ( - "fmt" - "sort" - - "github.com/prometheus/client_golang/prometheus/internal" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/proto" -) - -// WrapRegistererWith returns a Registerer wrapping the provided -// Registerer. Collectors registered with the returned Registerer will be -// registered with the wrapped Registerer in a modified way. The modified -// Collector adds the provided Labels to all Metrics it collects (as -// ConstLabels). The Metrics collected by the unmodified Collector must not -// duplicate any of those labels. Wrapping a nil value is valid, resulting -// in a no-op Registerer. -// -// WrapRegistererWith provides a way to add fixed labels to a subset of -// Collectors. It should not be used to add fixed labels to all metrics -// exposed. See also -// https://prometheus.io/docs/instrumenting/writing_exporters/#target-labels-not-static-scraped-labels -// -// Conflicts between Collectors registered through the original Registerer with -// Collectors registered through the wrapping Registerer will still be -// detected. Any AlreadyRegisteredError returned by the Register method of -// either Registerer will contain the ExistingCollector in the form it was -// provided to the respective registry. -// -// The Collector example demonstrates a use of WrapRegistererWith. -func WrapRegistererWith(labels Labels, reg Registerer) Registerer { - return &wrappingRegisterer{ - wrappedRegisterer: reg, - labels: labels, - } -} - -// WrapRegistererWithPrefix returns a Registerer wrapping the provided -// Registerer. Collectors registered with the returned Registerer will be -// registered with the wrapped Registerer in a modified way. The modified -// Collector adds the provided prefix to the name of all Metrics it collects. -// Wrapping a nil value is valid, resulting in a no-op Registerer. -// -// WrapRegistererWithPrefix is useful to have one place to prefix all metrics of -// a sub-system. To make this work, register metrics of the sub-system with the -// wrapping Registerer returned by WrapRegistererWithPrefix. It is rarely useful -// to use the same prefix for all metrics exposed. In particular, do not prefix -// metric names that are standardized across applications, as that would break -// horizontal monitoring, for example the metrics provided by the Go collector -// (see NewGoCollector) and the process collector (see NewProcessCollector). (In -// fact, those metrics are already prefixed with "go_" or "process_", -// respectively.) -// -// Conflicts between Collectors registered through the original Registerer with -// Collectors registered through the wrapping Registerer will still be -// detected. Any AlreadyRegisteredError returned by the Register method of -// either Registerer will contain the ExistingCollector in the form it was -// provided to the respective registry. -func WrapRegistererWithPrefix(prefix string, reg Registerer) Registerer { - return &wrappingRegisterer{ - wrappedRegisterer: reg, - prefix: prefix, - } -} - -// WrapCollectorWith returns a Collector wrapping the provided Collector. The -// wrapped Collector will add the provided Labels to all Metrics it collects (as -// ConstLabels). The Metrics collected by the unmodified Collector must not -// duplicate any of those labels. -// -// WrapCollectorWith can be useful to work with multiple instances of a third -// party library that does not expose enough flexibility on the lifecycle of its -// registered metrics. -// For example, let's say you have a foo.New(reg Registerer) constructor that -// registers metrics but never unregisters them, and you want to create multiple -// instances of foo.Foo with different labels. -// The way to achieve that, is to create a new Registry, pass it to foo.New, -// then use WrapCollectorWith to wrap that Registry with the desired labels and -// register that as a collector in your main Registry. -// Then you can un-register the wrapped collector effectively un-registering the -// metrics registered by foo.New. -func WrapCollectorWith(labels Labels, c Collector) Collector { - return &wrappingCollector{ - wrappedCollector: c, - labels: labels, - } -} - -// WrapCollectorWithPrefix returns a Collector wrapping the provided Collector. The -// wrapped Collector will add the provided prefix to the name of all Metrics it collects. -// -// See the documentation of WrapCollectorWith for more details on the use case. -func WrapCollectorWithPrefix(prefix string, c Collector) Collector { - return &wrappingCollector{ - wrappedCollector: c, - prefix: prefix, - } -} - -type wrappingRegisterer struct { - wrappedRegisterer Registerer - prefix string - labels Labels -} - -func (r *wrappingRegisterer) Register(c Collector) error { - if r.wrappedRegisterer == nil { - return nil - } - return r.wrappedRegisterer.Register(&wrappingCollector{ - wrappedCollector: c, - prefix: r.prefix, - labels: r.labels, - }) -} - -func (r *wrappingRegisterer) MustRegister(cs ...Collector) { - if r.wrappedRegisterer == nil { - return - } - for _, c := range cs { - if err := r.Register(c); err != nil { - panic(err) - } - } -} - -func (r *wrappingRegisterer) Unregister(c Collector) bool { - if r.wrappedRegisterer == nil { - return false - } - return r.wrappedRegisterer.Unregister(&wrappingCollector{ - wrappedCollector: c, - prefix: r.prefix, - labels: r.labels, - }) -} - -type wrappingCollector struct { - wrappedCollector Collector - prefix string - labels Labels -} - -func (c *wrappingCollector) Collect(ch chan<- Metric) { - wrappedCh := make(chan Metric) - go func() { - c.wrappedCollector.Collect(wrappedCh) - close(wrappedCh) - }() - for m := range wrappedCh { - ch <- &wrappingMetric{ - wrappedMetric: m, - prefix: c.prefix, - labels: c.labels, - } - } -} - -func (c *wrappingCollector) Describe(ch chan<- *Desc) { - wrappedCh := make(chan *Desc) - go func() { - c.wrappedCollector.Describe(wrappedCh) - close(wrappedCh) - }() - for desc := range wrappedCh { - ch <- wrapDesc(desc, c.prefix, c.labels) - } -} - -func (c *wrappingCollector) unwrapRecursively() Collector { - switch wc := c.wrappedCollector.(type) { - case *wrappingCollector: - return wc.unwrapRecursively() - default: - return wc - } -} - -type wrappingMetric struct { - wrappedMetric Metric - prefix string - labels Labels -} - -func (m *wrappingMetric) Desc() *Desc { - return wrapDesc(m.wrappedMetric.Desc(), m.prefix, m.labels) -} - -func (m *wrappingMetric) Write(out *dto.Metric) error { - if err := m.wrappedMetric.Write(out); err != nil { - return err - } - if len(m.labels) == 0 { - // No wrapping labels. - return nil - } - for ln, lv := range m.labels { - out.Label = append(out.Label, &dto.LabelPair{ - Name: proto.String(ln), - Value: proto.String(lv), - }) - } - sort.Sort(internal.LabelPairSorter(out.Label)) - return nil -} - -func wrapDesc(desc *Desc, prefix string, labels Labels) *Desc { - constLabels := Labels{} - for _, lp := range desc.constLabelPairs { - constLabels[*lp.Name] = *lp.Value - } - for ln, lv := range labels { - if _, alreadyUsed := constLabels[ln]; alreadyUsed { - return &Desc{ - fqName: desc.fqName, - help: desc.help, - variableLabels: desc.variableLabels, - constLabelPairs: desc.constLabelPairs, - err: fmt.Errorf("attempted wrapping with already existing label name %q", ln), - } - } - constLabels[ln] = lv - } - // NewDesc will do remaining validations. - newDesc := V2.NewDesc(prefix+desc.fqName, desc.help, desc.variableLabels, constLabels) - // Propagate errors if there was any. This will override any errer - // created by NewDesc above, i.e. earlier errors get precedence. - if desc.err != nil { - newDesc.err = desc.err - } - return newDesc -} diff --git a/vendor/github.com/prometheus/client_model/LICENSE b/vendor/github.com/prometheus/client_model/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/client_model/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/prometheus/client_model/NOTICE b/vendor/github.com/prometheus/client_model/NOTICE deleted file mode 100644 index 20110e410..000000000 --- a/vendor/github.com/prometheus/client_model/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Data model artifacts for Prometheus. -Copyright 2012-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/client_model/go/metrics.pb.go b/vendor/github.com/prometheus/client_model/go/metrics.pb.go deleted file mode 100644 index 2f1549075..000000000 --- a/vendor/github.com/prometheus/client_model/go/metrics.pb.go +++ /dev/null @@ -1,1399 +0,0 @@ -// Copyright 2013 Prometheus Team -// 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. - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v3.20.3 -// source: io/prometheus/client/metrics.proto - -package io_prometheus_client - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type MetricType int32 - -const ( - // COUNTER must use the Metric field "counter". - MetricType_COUNTER MetricType = 0 - // GAUGE must use the Metric field "gauge". - MetricType_GAUGE MetricType = 1 - // SUMMARY must use the Metric field "summary". - MetricType_SUMMARY MetricType = 2 - // UNTYPED must use the Metric field "untyped". - MetricType_UNTYPED MetricType = 3 - // HISTOGRAM must use the Metric field "histogram". - MetricType_HISTOGRAM MetricType = 4 - // GAUGE_HISTOGRAM must use the Metric field "histogram". - MetricType_GAUGE_HISTOGRAM MetricType = 5 -) - -// Enum value maps for MetricType. -var ( - MetricType_name = map[int32]string{ - 0: "COUNTER", - 1: "GAUGE", - 2: "SUMMARY", - 3: "UNTYPED", - 4: "HISTOGRAM", - 5: "GAUGE_HISTOGRAM", - } - MetricType_value = map[string]int32{ - "COUNTER": 0, - "GAUGE": 1, - "SUMMARY": 2, - "UNTYPED": 3, - "HISTOGRAM": 4, - "GAUGE_HISTOGRAM": 5, - } -) - -func (x MetricType) Enum() *MetricType { - p := new(MetricType) - *p = x - return p -} - -func (x MetricType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (MetricType) Descriptor() protoreflect.EnumDescriptor { - return file_io_prometheus_client_metrics_proto_enumTypes[0].Descriptor() -} - -func (MetricType) Type() protoreflect.EnumType { - return &file_io_prometheus_client_metrics_proto_enumTypes[0] -} - -func (x MetricType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Do not use. -func (x *MetricType) UnmarshalJSON(b []byte) error { - num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) - if err != nil { - return err - } - *x = MetricType(num) - return nil -} - -// Deprecated: Use MetricType.Descriptor instead. -func (MetricType) EnumDescriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{0} -} - -type LabelPair struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` -} - -func (x *LabelPair) Reset() { - *x = LabelPair{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LabelPair) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LabelPair) ProtoMessage() {} - -func (x *LabelPair) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use LabelPair.ProtoReflect.Descriptor instead. -func (*LabelPair) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{0} -} - -func (x *LabelPair) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *LabelPair) GetValue() string { - if x != nil && x.Value != nil { - return *x.Value - } - return "" -} - -type Gauge struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` -} - -func (x *Gauge) Reset() { - *x = Gauge{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Gauge) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Gauge) ProtoMessage() {} - -func (x *Gauge) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Gauge.ProtoReflect.Descriptor instead. -func (*Gauge) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{1} -} - -func (x *Gauge) GetValue() float64 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -type Counter struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` - Exemplar *Exemplar `protobuf:"bytes,2,opt,name=exemplar" json:"exemplar,omitempty"` - CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` -} - -func (x *Counter) Reset() { - *x = Counter{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Counter) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Counter) ProtoMessage() {} - -func (x *Counter) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Counter.ProtoReflect.Descriptor instead. -func (*Counter) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{2} -} - -func (x *Counter) GetValue() float64 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *Counter) GetExemplar() *Exemplar { - if x != nil { - return x.Exemplar - } - return nil -} - -func (x *Counter) GetCreatedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimestamp - } - return nil -} - -type Quantile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Quantile *float64 `protobuf:"fixed64,1,opt,name=quantile" json:"quantile,omitempty"` - Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` -} - -func (x *Quantile) Reset() { - *x = Quantile{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Quantile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Quantile) ProtoMessage() {} - -func (x *Quantile) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Quantile.ProtoReflect.Descriptor instead. -func (*Quantile) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{3} -} - -func (x *Quantile) GetQuantile() float64 { - if x != nil && x.Quantile != nil { - return *x.Quantile - } - return 0 -} - -func (x *Quantile) GetValue() float64 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -type Summary struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"` - SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"` - Quantile []*Quantile `protobuf:"bytes,3,rep,name=quantile" json:"quantile,omitempty"` - CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` -} - -func (x *Summary) Reset() { - *x = Summary{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Summary) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Summary) ProtoMessage() {} - -func (x *Summary) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Summary.ProtoReflect.Descriptor instead. -func (*Summary) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{4} -} - -func (x *Summary) GetSampleCount() uint64 { - if x != nil && x.SampleCount != nil { - return *x.SampleCount - } - return 0 -} - -func (x *Summary) GetSampleSum() float64 { - if x != nil && x.SampleSum != nil { - return *x.SampleSum - } - return 0 -} - -func (x *Summary) GetQuantile() []*Quantile { - if x != nil { - return x.Quantile - } - return nil -} - -func (x *Summary) GetCreatedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimestamp - } - return nil -} - -type Untyped struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Value *float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"` -} - -func (x *Untyped) Reset() { - *x = Untyped{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Untyped) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Untyped) ProtoMessage() {} - -func (x *Untyped) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Untyped.ProtoReflect.Descriptor instead. -func (*Untyped) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{5} -} - -func (x *Untyped) GetValue() float64 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -type Histogram struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SampleCount *uint64 `protobuf:"varint,1,opt,name=sample_count,json=sampleCount" json:"sample_count,omitempty"` - SampleCountFloat *float64 `protobuf:"fixed64,4,opt,name=sample_count_float,json=sampleCountFloat" json:"sample_count_float,omitempty"` // Overrides sample_count if > 0. - SampleSum *float64 `protobuf:"fixed64,2,opt,name=sample_sum,json=sampleSum" json:"sample_sum,omitempty"` - // Buckets for the conventional histogram. - Bucket []*Bucket `protobuf:"bytes,3,rep,name=bucket" json:"bucket,omitempty"` // Ordered in increasing order of upper_bound, +Inf bucket is optional. - CreatedTimestamp *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=created_timestamp,json=createdTimestamp" json:"created_timestamp,omitempty"` - // schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8. - // They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and - // then each power of two is divided into 2^n logarithmic buckets. - // Or in other words, each bucket boundary is the previous boundary times 2^(2^-n). - // In the future, more bucket schemas may be added using numbers < -4 or > 8. - Schema *int32 `protobuf:"zigzag32,5,opt,name=schema" json:"schema,omitempty"` - ZeroThreshold *float64 `protobuf:"fixed64,6,opt,name=zero_threshold,json=zeroThreshold" json:"zero_threshold,omitempty"` // Breadth of the zero bucket. - ZeroCount *uint64 `protobuf:"varint,7,opt,name=zero_count,json=zeroCount" json:"zero_count,omitempty"` // Count in zero bucket. - ZeroCountFloat *float64 `protobuf:"fixed64,8,opt,name=zero_count_float,json=zeroCountFloat" json:"zero_count_float,omitempty"` // Overrides sb_zero_count if > 0. - // Negative buckets for the native histogram. - NegativeSpan []*BucketSpan `protobuf:"bytes,9,rep,name=negative_span,json=negativeSpan" json:"negative_span,omitempty"` - // Use either "negative_delta" or "negative_count", the former for - // regular histograms with integer counts, the latter for float - // histograms. - NegativeDelta []int64 `protobuf:"zigzag64,10,rep,name=negative_delta,json=negativeDelta" json:"negative_delta,omitempty"` // Count delta of each bucket compared to previous one (or to zero for 1st bucket). - NegativeCount []float64 `protobuf:"fixed64,11,rep,name=negative_count,json=negativeCount" json:"negative_count,omitempty"` // Absolute count of each bucket. - // Positive buckets for the native histogram. - // Use a no-op span (offset 0, length 0) for a native histogram without any - // observations yet and with a zero_threshold of 0. Otherwise, it would be - // indistinguishable from a classic histogram. - PositiveSpan []*BucketSpan `protobuf:"bytes,12,rep,name=positive_span,json=positiveSpan" json:"positive_span,omitempty"` - // Use either "positive_delta" or "positive_count", the former for - // regular histograms with integer counts, the latter for float - // histograms. - PositiveDelta []int64 `protobuf:"zigzag64,13,rep,name=positive_delta,json=positiveDelta" json:"positive_delta,omitempty"` // Count delta of each bucket compared to previous one (or to zero for 1st bucket). - PositiveCount []float64 `protobuf:"fixed64,14,rep,name=positive_count,json=positiveCount" json:"positive_count,omitempty"` // Absolute count of each bucket. - // Only used for native histograms. These exemplars MUST have a timestamp. - Exemplars []*Exemplar `protobuf:"bytes,16,rep,name=exemplars" json:"exemplars,omitempty"` -} - -func (x *Histogram) Reset() { - *x = Histogram{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Histogram) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Histogram) ProtoMessage() {} - -func (x *Histogram) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Histogram.ProtoReflect.Descriptor instead. -func (*Histogram) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{6} -} - -func (x *Histogram) GetSampleCount() uint64 { - if x != nil && x.SampleCount != nil { - return *x.SampleCount - } - return 0 -} - -func (x *Histogram) GetSampleCountFloat() float64 { - if x != nil && x.SampleCountFloat != nil { - return *x.SampleCountFloat - } - return 0 -} - -func (x *Histogram) GetSampleSum() float64 { - if x != nil && x.SampleSum != nil { - return *x.SampleSum - } - return 0 -} - -func (x *Histogram) GetBucket() []*Bucket { - if x != nil { - return x.Bucket - } - return nil -} - -func (x *Histogram) GetCreatedTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.CreatedTimestamp - } - return nil -} - -func (x *Histogram) GetSchema() int32 { - if x != nil && x.Schema != nil { - return *x.Schema - } - return 0 -} - -func (x *Histogram) GetZeroThreshold() float64 { - if x != nil && x.ZeroThreshold != nil { - return *x.ZeroThreshold - } - return 0 -} - -func (x *Histogram) GetZeroCount() uint64 { - if x != nil && x.ZeroCount != nil { - return *x.ZeroCount - } - return 0 -} - -func (x *Histogram) GetZeroCountFloat() float64 { - if x != nil && x.ZeroCountFloat != nil { - return *x.ZeroCountFloat - } - return 0 -} - -func (x *Histogram) GetNegativeSpan() []*BucketSpan { - if x != nil { - return x.NegativeSpan - } - return nil -} - -func (x *Histogram) GetNegativeDelta() []int64 { - if x != nil { - return x.NegativeDelta - } - return nil -} - -func (x *Histogram) GetNegativeCount() []float64 { - if x != nil { - return x.NegativeCount - } - return nil -} - -func (x *Histogram) GetPositiveSpan() []*BucketSpan { - if x != nil { - return x.PositiveSpan - } - return nil -} - -func (x *Histogram) GetPositiveDelta() []int64 { - if x != nil { - return x.PositiveDelta - } - return nil -} - -func (x *Histogram) GetPositiveCount() []float64 { - if x != nil { - return x.PositiveCount - } - return nil -} - -func (x *Histogram) GetExemplars() []*Exemplar { - if x != nil { - return x.Exemplars - } - return nil -} - -// A Bucket of a conventional histogram, each of which is treated as -// an individual counter-like time series by Prometheus. -type Bucket struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - CumulativeCount *uint64 `protobuf:"varint,1,opt,name=cumulative_count,json=cumulativeCount" json:"cumulative_count,omitempty"` // Cumulative in increasing order. - CumulativeCountFloat *float64 `protobuf:"fixed64,4,opt,name=cumulative_count_float,json=cumulativeCountFloat" json:"cumulative_count_float,omitempty"` // Overrides cumulative_count if > 0. - UpperBound *float64 `protobuf:"fixed64,2,opt,name=upper_bound,json=upperBound" json:"upper_bound,omitempty"` // Inclusive. - Exemplar *Exemplar `protobuf:"bytes,3,opt,name=exemplar" json:"exemplar,omitempty"` -} - -func (x *Bucket) Reset() { - *x = Bucket{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Bucket) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Bucket) ProtoMessage() {} - -func (x *Bucket) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Bucket.ProtoReflect.Descriptor instead. -func (*Bucket) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{7} -} - -func (x *Bucket) GetCumulativeCount() uint64 { - if x != nil && x.CumulativeCount != nil { - return *x.CumulativeCount - } - return 0 -} - -func (x *Bucket) GetCumulativeCountFloat() float64 { - if x != nil && x.CumulativeCountFloat != nil { - return *x.CumulativeCountFloat - } - return 0 -} - -func (x *Bucket) GetUpperBound() float64 { - if x != nil && x.UpperBound != nil { - return *x.UpperBound - } - return 0 -} - -func (x *Bucket) GetExemplar() *Exemplar { - if x != nil { - return x.Exemplar - } - return nil -} - -// A BucketSpan defines a number of consecutive buckets in a native -// histogram with their offset. Logically, it would be more -// straightforward to include the bucket counts in the Span. However, -// the protobuf representation is more compact in the way the data is -// structured here (with all the buckets in a single array separate -// from the Spans). -type BucketSpan struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Offset *int32 `protobuf:"zigzag32,1,opt,name=offset" json:"offset,omitempty"` // Gap to previous span, or starting point for 1st span (which can be negative). - Length *uint32 `protobuf:"varint,2,opt,name=length" json:"length,omitempty"` // Length of consecutive buckets. -} - -func (x *BucketSpan) Reset() { - *x = BucketSpan{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *BucketSpan) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*BucketSpan) ProtoMessage() {} - -func (x *BucketSpan) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use BucketSpan.ProtoReflect.Descriptor instead. -func (*BucketSpan) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{8} -} - -func (x *BucketSpan) GetOffset() int32 { - if x != nil && x.Offset != nil { - return *x.Offset - } - return 0 -} - -func (x *BucketSpan) GetLength() uint32 { - if x != nil && x.Length != nil { - return *x.Length - } - return 0 -} - -type Exemplar struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` - Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` - Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"` // OpenMetrics-style. -} - -func (x *Exemplar) Reset() { - *x = Exemplar{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Exemplar) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Exemplar) ProtoMessage() {} - -func (x *Exemplar) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Exemplar.ProtoReflect.Descriptor instead. -func (*Exemplar) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{9} -} - -func (x *Exemplar) GetLabel() []*LabelPair { - if x != nil { - return x.Label - } - return nil -} - -func (x *Exemplar) GetValue() float64 { - if x != nil && x.Value != nil { - return *x.Value - } - return 0 -} - -func (x *Exemplar) GetTimestamp() *timestamppb.Timestamp { - if x != nil { - return x.Timestamp - } - return nil -} - -type Metric struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Label []*LabelPair `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` - Gauge *Gauge `protobuf:"bytes,2,opt,name=gauge" json:"gauge,omitempty"` - Counter *Counter `protobuf:"bytes,3,opt,name=counter" json:"counter,omitempty"` - Summary *Summary `protobuf:"bytes,4,opt,name=summary" json:"summary,omitempty"` - Untyped *Untyped `protobuf:"bytes,5,opt,name=untyped" json:"untyped,omitempty"` - Histogram *Histogram `protobuf:"bytes,7,opt,name=histogram" json:"histogram,omitempty"` - TimestampMs *int64 `protobuf:"varint,6,opt,name=timestamp_ms,json=timestampMs" json:"timestamp_ms,omitempty"` -} - -func (x *Metric) Reset() { - *x = Metric{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Metric) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Metric) ProtoMessage() {} - -func (x *Metric) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Metric.ProtoReflect.Descriptor instead. -func (*Metric) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{10} -} - -func (x *Metric) GetLabel() []*LabelPair { - if x != nil { - return x.Label - } - return nil -} - -func (x *Metric) GetGauge() *Gauge { - if x != nil { - return x.Gauge - } - return nil -} - -func (x *Metric) GetCounter() *Counter { - if x != nil { - return x.Counter - } - return nil -} - -func (x *Metric) GetSummary() *Summary { - if x != nil { - return x.Summary - } - return nil -} - -func (x *Metric) GetUntyped() *Untyped { - if x != nil { - return x.Untyped - } - return nil -} - -func (x *Metric) GetHistogram() *Histogram { - if x != nil { - return x.Histogram - } - return nil -} - -func (x *Metric) GetTimestampMs() int64 { - if x != nil && x.TimestampMs != nil { - return *x.TimestampMs - } - return 0 -} - -type MetricFamily struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` - Help *string `protobuf:"bytes,2,opt,name=help" json:"help,omitempty"` - Type *MetricType `protobuf:"varint,3,opt,name=type,enum=io.prometheus.client.MetricType" json:"type,omitempty"` - Metric []*Metric `protobuf:"bytes,4,rep,name=metric" json:"metric,omitempty"` - Unit *string `protobuf:"bytes,5,opt,name=unit" json:"unit,omitempty"` -} - -func (x *MetricFamily) Reset() { - *x = MetricFamily{} - if protoimpl.UnsafeEnabled { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MetricFamily) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MetricFamily) ProtoMessage() {} - -func (x *MetricFamily) ProtoReflect() protoreflect.Message { - mi := &file_io_prometheus_client_metrics_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MetricFamily.ProtoReflect.Descriptor instead. -func (*MetricFamily) Descriptor() ([]byte, []int) { - return file_io_prometheus_client_metrics_proto_rawDescGZIP(), []int{11} -} - -func (x *MetricFamily) GetName() string { - if x != nil && x.Name != nil { - return *x.Name - } - return "" -} - -func (x *MetricFamily) GetHelp() string { - if x != nil && x.Help != nil { - return *x.Help - } - return "" -} - -func (x *MetricFamily) GetType() MetricType { - if x != nil && x.Type != nil { - return *x.Type - } - return MetricType_COUNTER -} - -func (x *MetricFamily) GetMetric() []*Metric { - if x != nil { - return x.Metric - } - return nil -} - -func (x *MetricFamily) GetUnit() string { - if x != nil && x.Unit != nil { - return *x.Unit - } - return "" -} - -var File_io_prometheus_client_metrics_proto protoreflect.FileDescriptor - -var file_io_prometheus_client_metrics_proto_rawDesc = []byte{ - 0x0a, 0x22, 0x69, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2f, - 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, - 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x35, 0x0a, 0x09, 0x4c, - 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x1d, 0x0a, 0x05, 0x47, 0x61, 0x75, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0xa4, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, - 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x12, - 0x47, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x3c, 0x0a, 0x08, 0x51, 0x75, 0x61, 0x6e, - 0x74, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd0, 0x01, 0x0a, 0x07, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, - 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x73, 0x61, 0x6d, 0x70, 0x6c, - 0x65, 0x53, 0x75, 0x6d, 0x12, 0x3a, 0x0a, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, - 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x51, 0x75, - 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, 0x52, 0x08, 0x71, 0x75, 0x61, 0x6e, 0x74, 0x69, 0x6c, 0x65, - 0x12, 0x47, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x1f, 0x0a, 0x07, 0x55, 0x6e, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xea, 0x05, 0x0a, 0x09, 0x48, - 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x61, 0x6d, 0x70, - 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x61, 0x6d, - 0x70, 0x6c, 0x65, 0x5f, 0x73, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x73, - 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x53, 0x75, 0x6d, 0x12, 0x34, 0x0a, 0x06, 0x62, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, - 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x52, 0x06, 0x62, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x12, 0x47, - 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, - 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, - 0x25, 0x0a, 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x7a, 0x65, 0x72, 0x6f, 0x54, 0x68, 0x72, - 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x7a, 0x65, 0x72, 0x6f, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x0e, 0x7a, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x12, - 0x45, 0x0a, 0x0d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x73, 0x70, 0x61, 0x6e, - 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, - 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x42, 0x75, - 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x0c, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x12, 0x52, 0x0d, - 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x25, 0x0a, - 0x0e, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x73, 0x70, 0x61, 0x6e, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x69, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2e, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x52, 0x0c, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x0d, 0x20, - 0x03, 0x28, 0x12, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x44, 0x65, 0x6c, - 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x01, 0x52, 0x0d, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3c, 0x0a, 0x09, 0x65, 0x78, 0x65, - 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x09, 0x65, 0x78, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x73, 0x22, 0xc6, 0x01, 0x0a, 0x06, 0x42, 0x75, 0x63, 0x6b, - 0x65, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, - 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x63, 0x75, - 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x34, 0x0a, - 0x16, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x63, - 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x46, 0x6c, - 0x6f, 0x61, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x70, 0x65, 0x72, 0x5f, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0a, 0x75, 0x70, 0x70, 0x65, 0x72, 0x42, - 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, - 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x45, 0x78, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x52, 0x08, 0x65, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, - 0x22, 0x3c, 0x0a, 0x0a, 0x42, 0x75, 0x63, 0x6b, 0x65, 0x74, 0x53, 0x70, 0x61, 0x6e, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x22, 0x91, - 0x01, 0x0a, 0x08, 0x45, 0x78, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x72, 0x12, 0x35, 0x0a, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x22, 0xff, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x35, 0x0a, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x61, 0x69, 0x72, 0x52, 0x05, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x12, 0x31, 0x0a, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, - 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x47, 0x61, 0x75, 0x67, 0x65, - 0x52, 0x05, 0x67, 0x61, 0x75, 0x67, 0x65, 0x12, 0x37, 0x0a, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, - 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x52, 0x07, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, - 0x12, 0x37, 0x0a, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, - 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, - 0x52, 0x07, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x37, 0x0a, 0x07, 0x75, 0x6e, 0x74, - 0x79, 0x70, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x69, 0x6f, 0x2e, - 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x2e, 0x55, 0x6e, 0x74, 0x79, 0x70, 0x65, 0x64, 0x52, 0x07, 0x75, 0x6e, 0x74, 0x79, 0x70, - 0x65, 0x64, 0x12, 0x3d, 0x0a, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, - 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x48, 0x69, 0x73, - 0x74, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x52, 0x09, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x67, 0x72, 0x61, - 0x6d, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x5f, 0x6d, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x4d, 0x73, 0x22, 0xb6, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, - 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x65, 0x6c, - 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x65, 0x6c, 0x70, 0x12, 0x34, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x69, 0x6f, - 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, - 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, - 0x63, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x6e, 0x69, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x2a, 0x62, 0x0a, - 0x0a, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x43, - 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x47, 0x41, 0x55, 0x47, - 0x45, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x4d, 0x4d, 0x41, 0x52, 0x59, 0x10, 0x02, - 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x54, 0x59, 0x50, 0x45, 0x44, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, - 0x47, 0x41, 0x55, 0x47, 0x45, 0x5f, 0x48, 0x49, 0x53, 0x54, 0x4f, 0x47, 0x52, 0x41, 0x4d, 0x10, - 0x05, 0x42, 0x52, 0x0a, 0x14, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, - 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5a, 0x3a, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, - 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x2f, 0x67, 0x6f, - 0x3b, 0x69, 0x6f, 0x5f, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, -} - -var ( - file_io_prometheus_client_metrics_proto_rawDescOnce sync.Once - file_io_prometheus_client_metrics_proto_rawDescData = file_io_prometheus_client_metrics_proto_rawDesc -) - -func file_io_prometheus_client_metrics_proto_rawDescGZIP() []byte { - file_io_prometheus_client_metrics_proto_rawDescOnce.Do(func() { - file_io_prometheus_client_metrics_proto_rawDescData = protoimpl.X.CompressGZIP(file_io_prometheus_client_metrics_proto_rawDescData) - }) - return file_io_prometheus_client_metrics_proto_rawDescData -} - -var file_io_prometheus_client_metrics_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_io_prometheus_client_metrics_proto_msgTypes = make([]protoimpl.MessageInfo, 12) -var file_io_prometheus_client_metrics_proto_goTypes = []interface{}{ - (MetricType)(0), // 0: io.prometheus.client.MetricType - (*LabelPair)(nil), // 1: io.prometheus.client.LabelPair - (*Gauge)(nil), // 2: io.prometheus.client.Gauge - (*Counter)(nil), // 3: io.prometheus.client.Counter - (*Quantile)(nil), // 4: io.prometheus.client.Quantile - (*Summary)(nil), // 5: io.prometheus.client.Summary - (*Untyped)(nil), // 6: io.prometheus.client.Untyped - (*Histogram)(nil), // 7: io.prometheus.client.Histogram - (*Bucket)(nil), // 8: io.prometheus.client.Bucket - (*BucketSpan)(nil), // 9: io.prometheus.client.BucketSpan - (*Exemplar)(nil), // 10: io.prometheus.client.Exemplar - (*Metric)(nil), // 11: io.prometheus.client.Metric - (*MetricFamily)(nil), // 12: io.prometheus.client.MetricFamily - (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp -} -var file_io_prometheus_client_metrics_proto_depIdxs = []int32{ - 10, // 0: io.prometheus.client.Counter.exemplar:type_name -> io.prometheus.client.Exemplar - 13, // 1: io.prometheus.client.Counter.created_timestamp:type_name -> google.protobuf.Timestamp - 4, // 2: io.prometheus.client.Summary.quantile:type_name -> io.prometheus.client.Quantile - 13, // 3: io.prometheus.client.Summary.created_timestamp:type_name -> google.protobuf.Timestamp - 8, // 4: io.prometheus.client.Histogram.bucket:type_name -> io.prometheus.client.Bucket - 13, // 5: io.prometheus.client.Histogram.created_timestamp:type_name -> google.protobuf.Timestamp - 9, // 6: io.prometheus.client.Histogram.negative_span:type_name -> io.prometheus.client.BucketSpan - 9, // 7: io.prometheus.client.Histogram.positive_span:type_name -> io.prometheus.client.BucketSpan - 10, // 8: io.prometheus.client.Histogram.exemplars:type_name -> io.prometheus.client.Exemplar - 10, // 9: io.prometheus.client.Bucket.exemplar:type_name -> io.prometheus.client.Exemplar - 1, // 10: io.prometheus.client.Exemplar.label:type_name -> io.prometheus.client.LabelPair - 13, // 11: io.prometheus.client.Exemplar.timestamp:type_name -> google.protobuf.Timestamp - 1, // 12: io.prometheus.client.Metric.label:type_name -> io.prometheus.client.LabelPair - 2, // 13: io.prometheus.client.Metric.gauge:type_name -> io.prometheus.client.Gauge - 3, // 14: io.prometheus.client.Metric.counter:type_name -> io.prometheus.client.Counter - 5, // 15: io.prometheus.client.Metric.summary:type_name -> io.prometheus.client.Summary - 6, // 16: io.prometheus.client.Metric.untyped:type_name -> io.prometheus.client.Untyped - 7, // 17: io.prometheus.client.Metric.histogram:type_name -> io.prometheus.client.Histogram - 0, // 18: io.prometheus.client.MetricFamily.type:type_name -> io.prometheus.client.MetricType - 11, // 19: io.prometheus.client.MetricFamily.metric:type_name -> io.prometheus.client.Metric - 20, // [20:20] is the sub-list for method output_type - 20, // [20:20] is the sub-list for method input_type - 20, // [20:20] is the sub-list for extension type_name - 20, // [20:20] is the sub-list for extension extendee - 0, // [0:20] is the sub-list for field type_name -} - -func init() { file_io_prometheus_client_metrics_proto_init() } -func file_io_prometheus_client_metrics_proto_init() { - if File_io_prometheus_client_metrics_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_io_prometheus_client_metrics_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LabelPair); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Gauge); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Counter); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Quantile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Summary); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Untyped); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Histogram); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Bucket); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BucketSpan); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Exemplar); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metric); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_io_prometheus_client_metrics_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MetricFamily); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_io_prometheus_client_metrics_proto_rawDesc, - NumEnums: 1, - NumMessages: 12, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_io_prometheus_client_metrics_proto_goTypes, - DependencyIndexes: file_io_prometheus_client_metrics_proto_depIdxs, - EnumInfos: file_io_prometheus_client_metrics_proto_enumTypes, - MessageInfos: file_io_prometheus_client_metrics_proto_msgTypes, - }.Build() - File_io_prometheus_client_metrics_proto = out.File - file_io_prometheus_client_metrics_proto_rawDesc = nil - file_io_prometheus_client_metrics_proto_goTypes = nil - file_io_prometheus_client_metrics_proto_depIdxs = nil -} diff --git a/vendor/github.com/prometheus/common/LICENSE b/vendor/github.com/prometheus/common/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/common/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/prometheus/common/NOTICE b/vendor/github.com/prometheus/common/NOTICE deleted file mode 100644 index 636a2c1a5..000000000 --- a/vendor/github.com/prometheus/common/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -Common libraries shared by Prometheus Go components. -Copyright 2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/common/expfmt/decode.go b/vendor/github.com/prometheus/common/expfmt/decode.go deleted file mode 100644 index 8f8dc65d3..000000000 --- a/vendor/github.com/prometheus/common/expfmt/decode.go +++ /dev/null @@ -1,464 +0,0 @@ -// Copyright 2015 The Prometheus 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 expfmt - -import ( - "bufio" - "fmt" - "io" - "math" - "mime" - "net/http" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/encoding/protodelim" - - "github.com/prometheus/common/model" -) - -// Decoder types decode an input stream into metric families. -type Decoder interface { - Decode(*dto.MetricFamily) error -} - -// DecodeOptions contains options used by the Decoder and in sample extraction. -type DecodeOptions struct { - // Timestamp is added to each value from the stream that has no explicit timestamp set. - Timestamp model.Time -} - -// ResponseFormat extracts the correct format from a HTTP response header. -// If no matching format can be found FormatUnknown is returned. -func ResponseFormat(h http.Header) Format { - ct := h.Get(hdrContentType) - - mediatype, params, err := mime.ParseMediaType(ct) - if err != nil { - return FmtUnknown - } - - const textType = "text/plain" - - switch mediatype { - case ProtoType: - if p, ok := params["proto"]; ok && p != ProtoProtocol { - return FmtUnknown - } - if e, ok := params["encoding"]; ok && e != "delimited" { - return FmtUnknown - } - return FmtProtoDelim - - case textType: - if v, ok := params["version"]; ok && v != TextVersion { - return FmtUnknown - } - return FmtText - } - - return FmtUnknown -} - -// NewDecoder returns a new decoder based on the given input format. Metric -// names are validated based on the provided Format -- if the format requires -// escaping, raditional Prometheues validity checking is used. Otherwise, names -// are checked for UTF-8 validity. Supported formats include delimited protobuf -// and Prometheus text format. For historical reasons, this decoder fallbacks -// to classic text decoding for any other format. This decoder does not fully -// support OpenMetrics although it may often succeed due to the similarities -// between the formats. This decoder may not support the latest features of -// Prometheus text format and is not intended for high-performance applications. -// See: https://github.com/prometheus/common/issues/812 -func NewDecoder(r io.Reader, format Format) Decoder { - scheme := model.LegacyValidation - if format.ToEscapingScheme() == model.NoEscaping { - scheme = model.UTF8Validation - } - switch format.FormatType() { - case TypeProtoDelim: - return &protoDecoder{r: bufio.NewReader(r), s: scheme} - case TypeProtoText, TypeProtoCompact: - return &errDecoder{err: fmt.Errorf("format %s not supported for decoding", format)} - } - return &textDecoder{r: r, s: scheme} -} - -// protoDecoder implements the Decoder interface for protocol buffers. -type protoDecoder struct { - r protodelim.Reader - s model.ValidationScheme -} - -// Decode implements the Decoder interface. -func (d *protoDecoder) Decode(v *dto.MetricFamily) error { - opts := protodelim.UnmarshalOptions{ - MaxSize: -1, - } - if err := opts.UnmarshalFrom(d.r, v); err != nil { - return err - } - if !d.s.IsValidMetricName(v.GetName()) { - return fmt.Errorf("invalid metric name %q", v.GetName()) - } - for _, m := range v.GetMetric() { - if m == nil { - continue - } - for _, l := range m.GetLabel() { - if l == nil { - continue - } - if !model.LabelValue(l.GetValue()).IsValid() { - return fmt.Errorf("invalid label value %q", l.GetValue()) - } - if !d.s.IsValidLabelName(l.GetName()) { - return fmt.Errorf("invalid label name %q", l.GetName()) - } - } - } - return nil -} - -// errDecoder is an error-state decoder that always returns the same error. -type errDecoder struct { - err error -} - -func (d *errDecoder) Decode(*dto.MetricFamily) error { - return d.err -} - -// textDecoder implements the Decoder interface for the text protocol. -type textDecoder struct { - r io.Reader - fams map[string]*dto.MetricFamily - s model.ValidationScheme - err error -} - -// Decode implements the Decoder interface. -func (d *textDecoder) Decode(v *dto.MetricFamily) error { - if d.err == nil { - // Read all metrics in one shot. - p := NewTextParser(d.s) - d.fams, d.err = p.TextToMetricFamilies(d.r) - // If we don't get an error, store io.EOF for the end. - if d.err == nil { - d.err = io.EOF - } - } - // Pick off one MetricFamily per Decode until there's nothing left. - for key, fam := range d.fams { - v.Name = fam.Name - v.Help = fam.Help - v.Type = fam.Type - v.Metric = fam.Metric - delete(d.fams, key) - return nil - } - return d.err -} - -// SampleDecoder wraps a Decoder to extract samples from the metric families -// decoded by the wrapped Decoder. -type SampleDecoder struct { - Dec Decoder - Opts *DecodeOptions - - f dto.MetricFamily -} - -// Decode calls the Decode method of the wrapped Decoder and then extracts the -// samples from the decoded MetricFamily into the provided model.Vector. -func (sd *SampleDecoder) Decode(s *model.Vector) error { - err := sd.Dec.Decode(&sd.f) - if err != nil { - return err - } - *s, err = extractSamples(&sd.f, sd.Opts) - return err -} - -// ExtractSamples builds a slice of samples from the provided metric -// families. If an error occurs during sample extraction, it continues to -// extract from the remaining metric families. The returned error is the last -// error that has occurred. -func ExtractSamples(o *DecodeOptions, fams ...*dto.MetricFamily) (model.Vector, error) { - var ( - all model.Vector - lastErr error - ) - for _, f := range fams { - some, err := extractSamples(f, o) - if err != nil { - lastErr = err - continue - } - all = append(all, some...) - } - return all, lastErr -} - -func extractSamples(f *dto.MetricFamily, o *DecodeOptions) (model.Vector, error) { - switch f.GetType() { - case dto.MetricType_COUNTER: - return extractCounter(o, f), nil - case dto.MetricType_GAUGE: - return extractGauge(o, f), nil - case dto.MetricType_SUMMARY: - return extractSummary(o, f), nil - case dto.MetricType_UNTYPED: - return extractUntyped(o, f), nil - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - return extractHistogram(o, f), nil - } - return nil, fmt.Errorf("expfmt.extractSamples: unknown metric family type %v", f.GetType()) -} - -func extractCounter(o *DecodeOptions, f *dto.MetricFamily) model.Vector { - samples := make(model.Vector, 0, len(f.Metric)) - - for _, m := range f.Metric { - if m.Counter == nil { - continue - } - - lset := make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) - - smpl := &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Counter.GetValue()), - } - - if m.TimestampMs != nil { - smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) - } else { - smpl.Timestamp = o.Timestamp - } - - samples = append(samples, smpl) - } - - return samples -} - -func extractGauge(o *DecodeOptions, f *dto.MetricFamily) model.Vector { - samples := make(model.Vector, 0, len(f.Metric)) - - for _, m := range f.Metric { - if m.Gauge == nil { - continue - } - - lset := make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) - - smpl := &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Gauge.GetValue()), - } - - if m.TimestampMs != nil { - smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) - } else { - smpl.Timestamp = o.Timestamp - } - - samples = append(samples, smpl) - } - - return samples -} - -func extractUntyped(o *DecodeOptions, f *dto.MetricFamily) model.Vector { - samples := make(model.Vector, 0, len(f.Metric)) - - for _, m := range f.Metric { - if m.Untyped == nil { - continue - } - - lset := make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) - - smpl := &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Untyped.GetValue()), - } - - if m.TimestampMs != nil { - smpl.Timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) - } else { - smpl.Timestamp = o.Timestamp - } - - samples = append(samples, smpl) - } - - return samples -} - -func extractSummary(o *DecodeOptions, f *dto.MetricFamily) model.Vector { - samples := make(model.Vector, 0, len(f.Metric)) - - for _, m := range f.Metric { - if m.Summary == nil { - continue - } - - timestamp := o.Timestamp - if m.TimestampMs != nil { - timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) - } - - for _, q := range m.Summary.Quantile { - lset := make(model.LabelSet, len(m.Label)+2) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - // BUG(matt): Update other names to "quantile". - lset[model.LabelName(model.QuantileLabel)] = model.LabelValue(fmt.Sprint(q.GetQuantile())) - lset[model.MetricNameLabel] = model.LabelValue(f.GetName()) - - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(q.GetValue()), - Timestamp: timestamp, - }) - } - - lset := make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_sum") - - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Summary.GetSampleSum()), - Timestamp: timestamp, - }) - - lset = make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_count") - - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Summary.GetSampleCount()), - Timestamp: timestamp, - }) - } - - return samples -} - -func extractHistogram(o *DecodeOptions, f *dto.MetricFamily) model.Vector { - samples := make(model.Vector, 0, len(f.Metric)) - - for _, m := range f.Metric { - if m.Histogram == nil { - continue - } - - timestamp := o.Timestamp - if m.TimestampMs != nil { - timestamp = model.TimeFromUnixNano(*m.TimestampMs * 1000000) - } - - infSeen := false - - for _, q := range m.Histogram.Bucket { - lset := make(model.LabelSet, len(m.Label)+2) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.LabelName(model.BucketLabel)] = model.LabelValue(fmt.Sprint(q.GetUpperBound())) - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_bucket") - - if math.IsInf(q.GetUpperBound(), +1) { - infSeen = true - } - - v := q.GetCumulativeCountFloat() - if v <= 0 { - v = float64(q.GetCumulativeCount()) - } - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(v), - Timestamp: timestamp, - }) - } - - lset := make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_sum") - - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(m.Histogram.GetSampleSum()), - Timestamp: timestamp, - }) - - lset = make(model.LabelSet, len(m.Label)+1) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_count") - - v := m.Histogram.GetSampleCountFloat() - if v <= 0 { - v = float64(m.Histogram.GetSampleCount()) - } - count := &model.Sample{ - Metric: model.Metric(lset), - Value: model.SampleValue(v), - Timestamp: timestamp, - } - samples = append(samples, count) - - if !infSeen { - // Append an infinity bucket sample. - lset := make(model.LabelSet, len(m.Label)+2) - for _, p := range m.Label { - lset[model.LabelName(p.GetName())] = model.LabelValue(p.GetValue()) - } - lset[model.LabelName(model.BucketLabel)] = model.LabelValue("+Inf") - lset[model.MetricNameLabel] = model.LabelValue(f.GetName() + "_bucket") - - samples = append(samples, &model.Sample{ - Metric: model.Metric(lset), - Value: count.Value, - Timestamp: timestamp, - }) - } - } - - return samples -} diff --git a/vendor/github.com/prometheus/common/expfmt/encode.go b/vendor/github.com/prometheus/common/expfmt/encode.go deleted file mode 100644 index 73c24dfbc..000000000 --- a/vendor/github.com/prometheus/common/expfmt/encode.go +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2015 The Prometheus 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 expfmt - -import ( - "fmt" - "io" - "net/http" - - "github.com/munnerz/goautoneg" - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/encoding/protodelim" - "google.golang.org/protobuf/encoding/prototext" - - "github.com/prometheus/common/model" -) - -// Encoder types encode metric families into an underlying wire protocol. -type Encoder interface { - Encode(*dto.MetricFamily) error -} - -// Closer is implemented by Encoders that need to be closed to finalize -// encoding. (For example, OpenMetrics needs a final `# EOF` line.) -// -// Note that all Encoder implementations returned from this package implement -// Closer, too, even if the Close call is a no-op. This happens in preparation -// for adding a Close method to the Encoder interface directly in a (mildly -// breaking) release in the future. -type Closer interface { - Close() error -} - -type encoderCloser struct { - encode func(*dto.MetricFamily) error - close func() error -} - -func (ec encoderCloser) Encode(v *dto.MetricFamily) error { - return ec.encode(v) -} - -func (ec encoderCloser) Close() error { - return ec.close() -} - -// Negotiate returns the Content-Type based on the given Accept header. If no -// appropriate accepted type is found, FmtText is returned (which is the -// Prometheus text format). This function will never negotiate FmtOpenMetrics, -// as the support is still experimental. To include the option to negotiate -// FmtOpenMetrics, use NegotiateIncludingOpenMetrics. -func Negotiate(h http.Header) Format { - escapingScheme := Format(fmt.Sprintf("; escaping=%s", Format(model.NameEscapingScheme.String()))) - for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { - if escapeParam := ac.Params[model.EscapingKey]; escapeParam != "" { - switch Format(escapeParam) { - case model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues: - escapingScheme = Format("; escaping=" + escapeParam) - default: - // If the escaping parameter is unknown, ignore it. - } - } - ver := ac.Params["version"] - if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { - switch ac.Params["encoding"] { - case "delimited": - return FmtProtoDelim + escapingScheme - case "text": - return FmtProtoText + escapingScheme - case "compact-text": - return FmtProtoCompact + escapingScheme - } - } - if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { - return FmtText + escapingScheme - } - } - return FmtText + escapingScheme -} - -// NegotiateIncludingOpenMetrics works like Negotiate but includes -// FmtOpenMetrics as an option for the result. Note that this function is -// temporary and will disappear once FmtOpenMetrics is fully supported and as -// such may be negotiated by the normal Negotiate function. -func NegotiateIncludingOpenMetrics(h http.Header) Format { - escapingScheme := Format(fmt.Sprintf("; escaping=%s", Format(model.NameEscapingScheme.String()))) - for _, ac := range goautoneg.ParseAccept(h.Get(hdrAccept)) { - if escapeParam := ac.Params[model.EscapingKey]; escapeParam != "" { - switch Format(escapeParam) { - case model.AllowUTF8, model.EscapeUnderscores, model.EscapeDots, model.EscapeValues: - escapingScheme = Format("; escaping=" + escapeParam) - default: - // If the escaping parameter is unknown, ignore it. - } - } - ver := ac.Params["version"] - if ac.Type+"/"+ac.SubType == ProtoType && ac.Params["proto"] == ProtoProtocol { - switch ac.Params["encoding"] { - case "delimited": - return FmtProtoDelim + escapingScheme - case "text": - return FmtProtoText + escapingScheme - case "compact-text": - return FmtProtoCompact + escapingScheme - } - } - if ac.Type == "text" && ac.SubType == "plain" && (ver == TextVersion || ver == "") { - return FmtText + escapingScheme - } - if ac.Type+"/"+ac.SubType == OpenMetricsType && (ver == OpenMetricsVersion_0_0_1 || ver == OpenMetricsVersion_1_0_0 || ver == "") { - switch ver { - case OpenMetricsVersion_1_0_0: - return FmtOpenMetrics_1_0_0 + escapingScheme - default: - return FmtOpenMetrics_0_0_1 + escapingScheme - } - } - } - return FmtText + escapingScheme -} - -// NewEncoder returns a new encoder based on content type negotiation. All -// Encoder implementations returned by NewEncoder also implement Closer, and -// callers should always call the Close method. It is currently only required -// for FmtOpenMetrics, but a future (breaking) release will add the Close method -// to the Encoder interface directly. The current version of the Encoder -// interface is kept for backwards compatibility. -// In cases where the Format does not allow for UTF-8 names, the global -// NameEscapingScheme will be applied. -// -// NewEncoder can be called with additional options to customize the OpenMetrics text output. -// For example: -// NewEncoder(w, FmtOpenMetrics_1_0_0, WithCreatedLines()) -// -// Extra options are ignored for all other formats. -func NewEncoder(w io.Writer, format Format, options ...EncoderOption) Encoder { - escapingScheme := format.ToEscapingScheme() - - switch format.FormatType() { - case TypeProtoDelim: - return encoderCloser{ - encode: func(v *dto.MetricFamily) error { - _, err := protodelim.MarshalTo(w, model.EscapeMetricFamily(v, escapingScheme)) - return err - }, - close: func() error { return nil }, - } - case TypeProtoCompact: - return encoderCloser{ - encode: func(v *dto.MetricFamily) error { - _, err := fmt.Fprintln(w, model.EscapeMetricFamily(v, escapingScheme).String()) - return err - }, - close: func() error { return nil }, - } - case TypeProtoText: - return encoderCloser{ - encode: func(v *dto.MetricFamily) error { - _, err := fmt.Fprintln(w, prototext.Format(model.EscapeMetricFamily(v, escapingScheme))) - return err - }, - close: func() error { return nil }, - } - case TypeTextPlain: - return encoderCloser{ - encode: func(v *dto.MetricFamily) error { - _, err := MetricFamilyToText(w, model.EscapeMetricFamily(v, escapingScheme)) - return err - }, - close: func() error { return nil }, - } - case TypeOpenMetrics: - return encoderCloser{ - encode: func(v *dto.MetricFamily) error { - _, err := MetricFamilyToOpenMetrics(w, model.EscapeMetricFamily(v, escapingScheme), options...) - return err - }, - close: func() error { - _, err := FinalizeOpenMetrics(w) - return err - }, - } - } - panic(fmt.Errorf("expfmt.NewEncoder: unknown format %q", format)) -} diff --git a/vendor/github.com/prometheus/common/expfmt/expfmt.go b/vendor/github.com/prometheus/common/expfmt/expfmt.go deleted file mode 100644 index 10bf35708..000000000 --- a/vendor/github.com/prometheus/common/expfmt/expfmt.go +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright 2015 The Prometheus 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 expfmt contains tools for reading and writing Prometheus metrics. -package expfmt - -import ( - "errors" - "strings" - - "github.com/prometheus/common/model" -) - -// Format specifies the HTTP content type of the different wire protocols. -type Format string - -// Constants to assemble the Content-Type values for the different wire -// protocols. The Content-Type strings here are all for the legacy exposition -// formats, where valid characters for metric names and label names are limited. -// Support for arbitrary UTF-8 characters in those names is already partially -// implemented in this module (see model.ValidationScheme), but to actually use -// it on the wire, new content-type strings will have to be agreed upon and -// added here. -const ( - TextVersion = "0.0.4" - ProtoType = `application/vnd.google.protobuf` - ProtoProtocol = `io.prometheus.client.MetricFamily` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead. - ProtoFmt = ProtoType + "; proto=" + ProtoProtocol + ";" - OpenMetricsType = `application/openmetrics-text` - //nolint:revive // Allow for underscores. - OpenMetricsVersion_0_0_1 = "0.0.1" - //nolint:revive // Allow for underscores. - OpenMetricsVersion_1_0_0 = "1.0.0" - - // The Content-Type values for the different wire protocols. Do not do direct - // comparisons to these constants, instead use the comparison functions. - // - // Deprecated: Use expfmt.NewFormat(expfmt.TypeUnknown) instead. - FmtUnknown Format = `` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeTextPlain) instead. - FmtText Format = `text/plain; version=` + TextVersion + `; charset=utf-8` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoDelim) instead. - FmtProtoDelim Format = ProtoFmt + ` encoding=delimited` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoText) instead. - FmtProtoText Format = ProtoFmt + ` encoding=text` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeProtoCompact) instead. - FmtProtoCompact Format = ProtoFmt + ` encoding=compact-text` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead. - //nolint:revive // Allow for underscores. - FmtOpenMetrics_1_0_0 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_1_0_0 + `; charset=utf-8` - // Deprecated: Use expfmt.NewFormat(expfmt.TypeOpenMetrics) instead. - //nolint:revive // Allow for underscores. - FmtOpenMetrics_0_0_1 Format = OpenMetricsType + `; version=` + OpenMetricsVersion_0_0_1 + `; charset=utf-8` -) - -const ( - hdrContentType = "Content-Type" - hdrAccept = "Accept" -) - -// FormatType is a Go enum representing the overall category for the given -// Format. As the number of Format permutations increases, doing basic string -// comparisons are not feasible, so this enum captures the most useful -// high-level attribute of the Format string. -type FormatType int - -const ( - TypeUnknown FormatType = iota - TypeProtoCompact - TypeProtoDelim - TypeProtoText - TypeTextPlain - TypeOpenMetrics -) - -// NewFormat generates a new Format from the type provided. Mostly used for -// tests, most Formats should be generated as part of content negotiation in -// encode.go. If a type has more than one version, the latest version will be -// returned. -func NewFormat(t FormatType) Format { - switch t { - case TypeProtoCompact: - return FmtProtoCompact - case TypeProtoDelim: - return FmtProtoDelim - case TypeProtoText: - return FmtProtoText - case TypeTextPlain: - return FmtText - case TypeOpenMetrics: - return FmtOpenMetrics_1_0_0 - default: - return FmtUnknown - } -} - -// NewOpenMetricsFormat generates a new OpenMetrics format matching the -// specified version number. -func NewOpenMetricsFormat(version string) (Format, error) { - if version == OpenMetricsVersion_0_0_1 { - return FmtOpenMetrics_0_0_1, nil - } - if version == OpenMetricsVersion_1_0_0 { - return FmtOpenMetrics_1_0_0, nil - } - return FmtUnknown, errors.New("unknown open metrics version string") -} - -// WithEscapingScheme returns a copy of Format with the specified escaping -// scheme appended to the end. If an escaping scheme already exists it is -// removed. -func (f Format) WithEscapingScheme(s model.EscapingScheme) Format { - var terms []string - for p := range strings.SplitSeq(string(f), ";") { - toks := strings.Split(p, "=") - if len(toks) != 2 { - trimmed := strings.TrimSpace(p) - if len(trimmed) > 0 { - terms = append(terms, trimmed) - } - continue - } - key := strings.TrimSpace(toks[0]) - if key != model.EscapingKey { - terms = append(terms, strings.TrimSpace(p)) - } - } - terms = append(terms, model.EscapingKey+"="+s.String()) - return Format(strings.Join(terms, "; ")) -} - -// FormatType deduces an overall FormatType for the given format. -func (f Format) FormatType() FormatType { - toks := strings.Split(string(f), ";") - params := make(map[string]string) - for i, t := range toks { - if i == 0 { - continue - } - args := strings.Split(t, "=") - if len(args) != 2 { - continue - } - params[strings.TrimSpace(args[0])] = strings.TrimSpace(args[1]) - } - - switch strings.TrimSpace(toks[0]) { - case ProtoType: - if params["proto"] != ProtoProtocol { - return TypeUnknown - } - switch params["encoding"] { - case "delimited": - return TypeProtoDelim - case "text": - return TypeProtoText - case "compact-text": - return TypeProtoCompact - default: - return TypeUnknown - } - case OpenMetricsType: - if params["charset"] != "utf-8" { - return TypeUnknown - } - return TypeOpenMetrics - case "text/plain": - v, ok := params["version"] - if !ok { - return TypeTextPlain - } - if v == TextVersion { - return TypeTextPlain - } - return TypeUnknown - default: - return TypeUnknown - } -} - -// ToEscapingScheme returns an EscapingScheme depending on the Format. Iff the -// Format contains a escaping=allow-utf-8 term, it will select NoEscaping. If a valid -// "escaping" term exists, that will be used. Otherwise, the global default will -// be returned. -func (f Format) ToEscapingScheme() model.EscapingScheme { - for p := range strings.SplitSeq(string(f), ";") { - toks := strings.Split(p, "=") - if len(toks) != 2 { - continue - } - key, value := strings.TrimSpace(toks[0]), strings.TrimSpace(toks[1]) - if key == model.EscapingKey { - scheme, err := model.ToEscapingScheme(value) - if err != nil { - return model.NameEscapingScheme - } - return scheme - } - } - return model.NameEscapingScheme -} diff --git a/vendor/github.com/prometheus/common/expfmt/fuzz.go b/vendor/github.com/prometheus/common/expfmt/fuzz.go deleted file mode 100644 index 872c0c15b..000000000 --- a/vendor/github.com/prometheus/common/expfmt/fuzz.go +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright 2014 The Prometheus 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. - -// Build only when actually fuzzing -//go:build gofuzz - -package expfmt - -import ( - "bytes" - - "github.com/prometheus/common/model" -) - -// Fuzz text metric parser with with github.com/dvyukov/go-fuzz: -// -// go-fuzz-build github.com/prometheus/common/expfmt -// go-fuzz -bin expfmt-fuzz.zip -workdir fuzz -// -// Further input samples should go in the folder fuzz/corpus. -func Fuzz(in []byte) int { - parser := NewTextParser(model.UTF8Validation) - _, err := parser.TextToMetricFamilies(bytes.NewReader(in)) - if err != nil { - return 0 - } - - return 1 -} diff --git a/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go b/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go deleted file mode 100644 index 0480e7af5..000000000 --- a/vendor/github.com/prometheus/common/expfmt/openmetrics_create.go +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright 2020 The Prometheus 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 expfmt - -import ( - "bufio" - "bytes" - "fmt" - "io" - "math" - "strconv" - "strings" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/types/known/timestamppb" - - "github.com/prometheus/common/model" -) - -type encoderOption struct { - withCreatedLines bool -} - -type EncoderOption func(*encoderOption) - -// WithCreatedLines is an EncoderOption that configures the OpenMetrics encoder -// to include _created lines (See -// https://github.com/prometheus/OpenMetrics/blob/v1.0.0/specification/OpenMetrics.md#counter-1). -// Created timestamps can improve the accuracy of series reset detection, but -// come with a bandwidth cost. -// -// At the time of writing, created timestamp ingestion is still experimental in -// Prometheus and need to be enabled with the feature-flag -// `--feature-flag=created-timestamp-zero-ingestion`, and breaking changes are -// still possible. Therefore, it is recommended to use this feature with caution. -func WithCreatedLines() EncoderOption { - return func(t *encoderOption) { - t.withCreatedLines = true - } -} - -// MetricFamilyToOpenMetrics converts a MetricFamily proto message into the -// OpenMetrics text format and writes the resulting lines to 'out'. It returns -// the number of bytes written and any error encountered. The output will have -// the same order as the input, no further sorting is performed. Furthermore, -// this function assumes the input is already sanitized and does not perform any -// sanity checks. If the input contains duplicate metrics or invalid metric or -// label names, the conversion will result in invalid text format output. -// -// If metric names conform to the legacy validation pattern, they will be placed -// outside the brackets in the traditional way, like `foo{}`. If the metric name -// fails the legacy validation check, it will be placed quoted inside the -// brackets: `{"foo"}`. As stated above, the input is assumed to be santized and -// no error will be thrown in this case. -// -// Similar to metric names, if label names conform to the legacy validation -// pattern, they will be unquoted as normal, like `foo{bar="baz"}`. If the label -// name fails the legacy validation check, it will be quoted: -// `foo{"bar"="baz"}`. As stated above, the input is assumed to be santized and -// no error will be thrown in this case. -// -// This function fulfills the type 'expfmt.encoder'. -// -// Note that OpenMetrics requires a final `# EOF` line. Since this function acts -// on individual metric families, it is the responsibility of the caller to -// append this line to 'out' once all metric families have been written. -// Conveniently, this can be done by calling FinalizeOpenMetrics. -// -// The output should be fully OpenMetrics compliant. However, there are a few -// missing features and peculiarities to avoid complications when switching from -// Prometheus to OpenMetrics or vice versa: -// -// - Counters are expected to have the `_total` suffix in their metric name. In -// the output, the suffix will be truncated from the `# TYPE`, `# HELP` and `# UNIT` -// lines. A counter with a missing `_total` suffix is not an error. However, -// its type will be set to `unknown` in that case to avoid invalid OpenMetrics -// output. -// -// - No support for the following (optional) features: info type, -// stateset type, gaugehistogram type. -// -// - The size of exemplar labels is not checked (i.e. it's possible to create -// exemplars that are larger than allowed by the OpenMetrics specification). -// -// - The value of Counters is not checked. (OpenMetrics doesn't allow counters -// with a `NaN` value.) -func MetricFamilyToOpenMetrics(out io.Writer, in *dto.MetricFamily, options ...EncoderOption) (written int, err error) { - toOM := encoderOption{} - for _, option := range options { - option(&toOM) - } - - name := in.GetName() - if name == "" { - return 0, fmt.Errorf("MetricFamily has no name: %s", in) - } - - // Try the interface upgrade. If it doesn't work, we'll use a - // bufio.Writer from the sync.Pool. - w, ok := out.(enhancedWriter) - if !ok { - b := bufPool.Get().(*bufio.Writer) - b.Reset(out) - w = b - defer func() { - bErr := b.Flush() - if err == nil { - err = bErr - } - bufPool.Put(b) - }() - } - - var ( - n int - metricType = in.GetType() - compliantName = name - ) - if metricType == dto.MetricType_COUNTER && strings.HasSuffix(compliantName, "_total") { - compliantName = name[:len(name)-6] - } - - // Comments, first HELP, then TYPE. - if in.Help != nil { - n, err = w.WriteString("# HELP ") - written += n - if err != nil { - return written, err - } - n, err = writeName(w, compliantName) - written += n - if err != nil { - return written, err - } - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeEscapedString(w, *in.Help, true) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - } - n, err = w.WriteString("# TYPE ") - written += n - if err != nil { - return written, err - } - n, err = writeName(w, compliantName) - written += n - if err != nil { - return written, err - } - switch metricType { - case dto.MetricType_COUNTER: - if strings.HasSuffix(name, "_total") { - n, err = w.WriteString(" counter\n") - } else { - n, err = w.WriteString(" unknown\n") - } - case dto.MetricType_GAUGE: - n, err = w.WriteString(" gauge\n") - case dto.MetricType_SUMMARY: - n, err = w.WriteString(" summary\n") - case dto.MetricType_UNTYPED: - n, err = w.WriteString(" unknown\n") - case dto.MetricType_HISTOGRAM: - n, err = w.WriteString(" histogram\n") - case dto.MetricType_GAUGE_HISTOGRAM: - n, err = w.WriteString(" gaugehistogram\n") - default: - return written, fmt.Errorf("unknown metric type %s", metricType.String()) - } - written += n - if err != nil { - return written, err - } - if in.Unit != nil { - n, err = w.WriteString("# UNIT ") - written += n - if err != nil { - return written, err - } - n, err = writeName(w, compliantName) - written += n - if err != nil { - return written, err - } - - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeEscapedString(w, *in.Unit, true) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - } - - var createdTsBytesWritten int - - // Finally the samples, one line for each. - if metricType == dto.MetricType_COUNTER && strings.HasSuffix(name, "_total") { - compliantName += "_total" - } - for _, metric := range in.Metric { - switch metricType { - case dto.MetricType_COUNTER: - if metric.Counter == nil { - return written, fmt.Errorf( - "expected counter in metric %s %s", compliantName, metric, - ) - } - n, err = writeOpenMetricsSample( - w, compliantName, "", metric, "", 0, - metric.Counter.GetValue(), 0, false, - metric.Counter.Exemplar, - ) - if toOM.withCreatedLines && metric.Counter.CreatedTimestamp != nil { - createdTsBytesWritten, err = writeOpenMetricsCreated(w, compliantName, "_total", metric, "", 0, metric.Counter.GetCreatedTimestamp()) - n += createdTsBytesWritten - } - case dto.MetricType_GAUGE: - if metric.Gauge == nil { - return written, fmt.Errorf( - "expected gauge in metric %s %s", compliantName, metric, - ) - } - n, err = writeOpenMetricsSample( - w, compliantName, "", metric, "", 0, - metric.Gauge.GetValue(), 0, false, - nil, - ) - case dto.MetricType_UNTYPED: - if metric.Untyped == nil { - return written, fmt.Errorf( - "expected untyped in metric %s %s", compliantName, metric, - ) - } - n, err = writeOpenMetricsSample( - w, compliantName, "", metric, "", 0, - metric.Untyped.GetValue(), 0, false, - nil, - ) - case dto.MetricType_SUMMARY: - if metric.Summary == nil { - return written, fmt.Errorf( - "expected summary in metric %s %s", compliantName, metric, - ) - } - for _, q := range metric.Summary.Quantile { - n, err = writeOpenMetricsSample( - w, compliantName, "", metric, - model.QuantileLabel, q.GetQuantile(), - q.GetValue(), 0, false, - nil, - ) - written += n - if err != nil { - return written, err - } - } - n, err = writeOpenMetricsSample( - w, compliantName, "_sum", metric, "", 0, - metric.Summary.GetSampleSum(), 0, false, - nil, - ) - written += n - if err != nil { - return written, err - } - n, err = writeOpenMetricsSample( - w, compliantName, "_count", metric, "", 0, - 0, metric.Summary.GetSampleCount(), true, - nil, - ) - if toOM.withCreatedLines && metric.Summary.CreatedTimestamp != nil { - createdTsBytesWritten, err = writeOpenMetricsCreated(w, compliantName, "", metric, "", 0, metric.Summary.GetCreatedTimestamp()) - n += createdTsBytesWritten - } - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - if metric.Histogram == nil { - return written, fmt.Errorf( - "expected histogram in metric %s %s", compliantName, metric, - ) - } - infSeen := false - for _, b := range metric.Histogram.Bucket { - if b.GetCumulativeCountFloat() > 0 { - return written, fmt.Errorf( - "OpenMetrics v1.0 does not support float histogram %s %s", - compliantName, metric, - ) - } - n, err = writeOpenMetricsSample( - w, compliantName, "_bucket", metric, - model.BucketLabel, b.GetUpperBound(), - 0, b.GetCumulativeCount(), true, - b.Exemplar, - ) - written += n - if err != nil { - return written, err - } - if math.IsInf(b.GetUpperBound(), +1) { - infSeen = true - } - } - if !infSeen { - n, err = writeOpenMetricsSample( - w, compliantName, "_bucket", metric, - model.BucketLabel, math.Inf(+1), - 0, metric.Histogram.GetSampleCount(), true, - nil, - ) - // We do not check for a float sample count here - // because we will check for it below (and error - // out if needed). - written += n - if err != nil { - return written, err - } - } - n, err = writeOpenMetricsSample( - w, compliantName, "_sum", metric, "", 0, - metric.Histogram.GetSampleSum(), 0, false, - nil, - ) - written += n - if err != nil { - return written, err - } - if metric.Histogram.GetSampleCountFloat() > 0 { - return written, fmt.Errorf( - "OpenMetrics v1.0 does not support float histogram %s %s", - compliantName, metric, - ) - } - n, err = writeOpenMetricsSample( - w, compliantName, "_count", metric, "", 0, - 0, metric.Histogram.GetSampleCount(), true, - nil, - ) - if toOM.withCreatedLines && metric.Histogram.CreatedTimestamp != nil { - createdTsBytesWritten, err = writeOpenMetricsCreated(w, compliantName, "", metric, "", 0, metric.Histogram.GetCreatedTimestamp()) - n += createdTsBytesWritten - } - default: - return written, fmt.Errorf( - "unexpected type in metric %s %s", compliantName, metric, - ) - } - written += n - if err != nil { - return written, err - } - } - return written, err -} - -// FinalizeOpenMetrics writes the final `# EOF\n` line required by OpenMetrics. -func FinalizeOpenMetrics(w io.Writer) (written int, err error) { - return w.Write([]byte("# EOF\n")) -} - -// writeOpenMetricsSample writes a single sample in OpenMetrics text format to -// w, given the metric name, the metric proto message itself, optionally an -// additional label name with a float64 value (use empty string as label name if -// not required), the value (optionally as float64 or uint64, determined by -// useIntValue), and optionally an exemplar (use nil if not required). The -// function returns the number of bytes written and any error encountered. -func writeOpenMetricsSample( - w enhancedWriter, - name, suffix string, - metric *dto.Metric, - additionalLabelName string, additionalLabelValue float64, - floatValue float64, intValue uint64, useIntValue bool, - exemplar *dto.Exemplar, -) (int, error) { - written := 0 - n, err := writeOpenMetricsNameAndLabelPairs( - w, name+suffix, metric.Label, additionalLabelName, additionalLabelValue, - ) - written += n - if err != nil { - return written, err - } - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - if useIntValue { - n, err = writeUint(w, intValue) - } else { - n, err = writeOpenMetricsFloat(w, floatValue) - } - written += n - if err != nil { - return written, err - } - if metric.TimestampMs != nil { - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - // TODO(beorn7): Format this directly without converting to a float first. - n, err = writeOpenMetricsFloat(w, float64(*metric.TimestampMs)/1000) - written += n - if err != nil { - return written, err - } - } - if exemplar != nil && len(exemplar.Label) > 0 { - n, err = writeExemplar(w, exemplar) - written += n - if err != nil { - return written, err - } - } - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - return written, nil -} - -// writeOpenMetricsNameAndLabelPairs works like writeOpenMetricsSample but -// formats the float in OpenMetrics style. -func writeOpenMetricsNameAndLabelPairs( - w enhancedWriter, - name string, - in []*dto.LabelPair, - additionalLabelName string, additionalLabelValue float64, -) (int, error) { - var ( - written int - separator byte = '{' - metricInsideBraces = false - ) - - if name != "" { - // If the name does not pass the legacy validity check, we must put the - // metric name inside the braces, quoted. - if !model.LegacyValidation.IsValidMetricName(name) { - metricInsideBraces = true - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - separator = ',' - } - - n, err := writeName(w, name) - written += n - if err != nil { - return written, err - } - } - - if len(in) == 0 && additionalLabelName == "" { - if metricInsideBraces { - err := w.WriteByte('}') - written++ - if err != nil { - return written, err - } - } - return written, nil - } - - for _, lp := range in { - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - n, err := writeName(w, lp.GetName()) - written += n - if err != nil { - return written, err - } - n, err = w.WriteString(`="`) - written += n - if err != nil { - return written, err - } - n, err = writeEscapedString(w, lp.GetValue(), true) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('"') - written++ - if err != nil { - return written, err - } - separator = ',' - } - if additionalLabelName != "" { - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - n, err := w.WriteString(additionalLabelName) - written += n - if err != nil { - return written, err - } - n, err = w.WriteString(`="`) - written += n - if err != nil { - return written, err - } - n, err = writeOpenMetricsFloat(w, additionalLabelValue) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('"') - written++ - if err != nil { - return written, err - } - } - err := w.WriteByte('}') - written++ - if err != nil { - return written, err - } - return written, nil -} - -// writeOpenMetricsCreated writes the created timestamp for a single time series -// following OpenMetrics text format to w, given the metric name, the metric proto -// message itself, optionally a suffix to be removed, e.g. '_total' for counters, -// an additional label name with a float64 value (use empty string as label name if -// not required) and the timestamp that represents the created timestamp. -// The function returns the number of bytes written and any error encountered. -func writeOpenMetricsCreated(w enhancedWriter, - name, suffixToTrim string, metric *dto.Metric, - additionalLabelName string, additionalLabelValue float64, - createdTimestamp *timestamppb.Timestamp, -) (int, error) { - written := 0 - n, err := writeOpenMetricsNameAndLabelPairs( - w, strings.TrimSuffix(name, suffixToTrim)+"_created", metric.Label, additionalLabelName, additionalLabelValue, - ) - written += n - if err != nil { - return written, err - } - - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - - // TODO(beorn7): Format this directly from components of ts to - // avoid overflow/underflow and precision issues of the float - // conversion. - n, err = writeOpenMetricsFloat(w, float64(createdTimestamp.AsTime().UnixNano())/1e9) - written += n - if err != nil { - return written, err - } - - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - return written, nil -} - -// writeExemplar writes the provided exemplar in OpenMetrics format to w. The -// function returns the number of bytes written and any error encountered. -func writeExemplar(w enhancedWriter, e *dto.Exemplar) (int, error) { - written := 0 - n, err := w.WriteString(" # ") - written += n - if err != nil { - return written, err - } - n, err = writeOpenMetricsNameAndLabelPairs(w, "", e.Label, "", 0) - written += n - if err != nil { - return written, err - } - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeOpenMetricsFloat(w, e.GetValue()) - written += n - if err != nil { - return written, err - } - if e.Timestamp != nil { - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - err = e.Timestamp.CheckValid() - if err != nil { - return written, err - } - ts := e.Timestamp.AsTime() - // TODO(beorn7): Format this directly from components of ts to - // avoid overflow/underflow and precision issues of the float - // conversion. - n, err = writeOpenMetricsFloat(w, float64(ts.UnixNano())/1e9) - written += n - if err != nil { - return written, err - } - } - return written, nil -} - -// writeOpenMetricsFloat works like writeFloat but appends ".0" if the resulting -// number would otherwise contain neither a "." nor an "e". -func writeOpenMetricsFloat(w enhancedWriter, f float64) (int, error) { - switch { - case f == 1: - return w.WriteString("1.0") - case f == 0: - return w.WriteString("0.0") - case f == -1: - return w.WriteString("-1.0") - case math.IsNaN(f): - return w.WriteString("NaN") - case math.IsInf(f, +1): - return w.WriteString("+Inf") - case math.IsInf(f, -1): - return w.WriteString("-Inf") - default: - bp := numBufPool.Get().(*[]byte) - *bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64) - if !bytes.ContainsAny(*bp, "e.") { - *bp = append(*bp, '.', '0') - } - written, err := w.Write(*bp) - numBufPool.Put(bp) - return written, err - } -} - -// writeUint is like writeInt just for uint64. -func writeUint(w enhancedWriter, u uint64) (int, error) { - bp := numBufPool.Get().(*[]byte) - *bp = strconv.AppendUint((*bp)[:0], u, 10) - written, err := w.Write(*bp) - numBufPool.Put(bp) - return written, err -} diff --git a/vendor/github.com/prometheus/common/expfmt/text_create.go b/vendor/github.com/prometheus/common/expfmt/text_create.go deleted file mode 100644 index f4074ae9a..000000000 --- a/vendor/github.com/prometheus/common/expfmt/text_create.go +++ /dev/null @@ -1,532 +0,0 @@ -// Copyright 2014 The Prometheus 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 expfmt - -import ( - "bufio" - "fmt" - "io" - "math" - "strconv" - "strings" - "sync" - - dto "github.com/prometheus/client_model/go" - - "github.com/prometheus/common/model" -) - -// enhancedWriter has all the enhanced write functions needed here. bufio.Writer -// implements it. -type enhancedWriter interface { - io.Writer - WriteRune(r rune) (n int, err error) - WriteString(s string) (n int, err error) - WriteByte(c byte) error -} - -const ( - initialNumBufSize = 24 -) - -var ( - bufPool = sync.Pool{ - New: func() any { - return bufio.NewWriter(io.Discard) - }, - } - numBufPool = sync.Pool{ - New: func() any { - b := make([]byte, 0, initialNumBufSize) - return &b - }, - } -) - -// MetricFamilyToText converts a MetricFamily proto message into text format and -// writes the resulting lines to 'out'. It returns the number of bytes written -// and any error encountered. The output will have the same order as the input, -// no further sorting is performed. Furthermore, this function assumes the input -// is already sanitized and does not perform any sanity checks. If the input -// contains duplicate metrics or invalid metric or label names, the conversion -// will result in invalid text format output. -// -// If metric names conform to the legacy validation pattern, they will be placed -// outside the brackets in the traditional way, like `foo{}`. If the metric name -// fails the legacy validation check, it will be placed quoted inside the -// brackets: `{"foo"}`. As stated above, the input is assumed to be santized and -// no error will be thrown in this case. -// -// Similar to metric names, if label names conform to the legacy validation -// pattern, they will be unquoted as normal, like `foo{bar="baz"}`. If the label -// name fails the legacy validation check, it will be quoted: -// `foo{"bar"="baz"}`. As stated above, the input is assumed to be santized and -// no error will be thrown in this case. -// -// This method fulfills the type 'prometheus.encoder'. -func MetricFamilyToText(out io.Writer, in *dto.MetricFamily) (written int, err error) { - // Fail-fast checks. - if len(in.Metric) == 0 { - return 0, fmt.Errorf("MetricFamily has no metrics: %s", in) - } - name := in.GetName() - if name == "" { - return 0, fmt.Errorf("MetricFamily has no name: %s", in) - } - - // Try the interface upgrade. If it doesn't work, we'll use a - // bufio.Writer from the sync.Pool. - w, ok := out.(enhancedWriter) - if !ok { - b := bufPool.Get().(*bufio.Writer) - b.Reset(out) - w = b - defer func() { - bErr := b.Flush() - if err == nil { - err = bErr - } - bufPool.Put(b) - }() - } - - var n int - - // Comments, first HELP, then TYPE. - if in.Help != nil { - n, err = w.WriteString("# HELP ") - written += n - if err != nil { - return written, err - } - n, err = writeName(w, name) - written += n - if err != nil { - return written, err - } - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeEscapedString(w, *in.Help, false) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - } - n, err = w.WriteString("# TYPE ") - written += n - if err != nil { - return written, err - } - n, err = writeName(w, name) - written += n - if err != nil { - return written, err - } - metricType := in.GetType() - switch metricType { - case dto.MetricType_COUNTER: - n, err = w.WriteString(" counter\n") - case dto.MetricType_GAUGE: - n, err = w.WriteString(" gauge\n") - case dto.MetricType_SUMMARY: - n, err = w.WriteString(" summary\n") - case dto.MetricType_UNTYPED: - n, err = w.WriteString(" untyped\n") - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - // The classic Prometheus text format has no notion of a gauge - // histogram. We render a gauge histogram in the same way as a - // regular histogram. - n, err = w.WriteString(" histogram\n") - default: - return written, fmt.Errorf("unknown metric type %s", metricType.String()) - } - written += n - if err != nil { - return written, err - } - - // Finally the samples, one line for each. - for _, metric := range in.Metric { - switch metricType { - case dto.MetricType_COUNTER: - if metric.Counter == nil { - return written, fmt.Errorf( - "expected counter in metric %s %s", name, metric, - ) - } - n, err = writeSample( - w, name, "", metric, "", 0, - metric.Counter.GetValue(), - ) - case dto.MetricType_GAUGE: - if metric.Gauge == nil { - return written, fmt.Errorf( - "expected gauge in metric %s %s", name, metric, - ) - } - n, err = writeSample( - w, name, "", metric, "", 0, - metric.Gauge.GetValue(), - ) - case dto.MetricType_UNTYPED: - if metric.Untyped == nil { - return written, fmt.Errorf( - "expected untyped in metric %s %s", name, metric, - ) - } - n, err = writeSample( - w, name, "", metric, "", 0, - metric.Untyped.GetValue(), - ) - case dto.MetricType_SUMMARY: - if metric.Summary == nil { - return written, fmt.Errorf( - "expected summary in metric %s %s", name, metric, - ) - } - for _, q := range metric.Summary.Quantile { - n, err = writeSample( - w, name, "", metric, - model.QuantileLabel, q.GetQuantile(), - q.GetValue(), - ) - written += n - if err != nil { - return written, err - } - } - n, err = writeSample( - w, name, "_sum", metric, "", 0, - metric.Summary.GetSampleSum(), - ) - written += n - if err != nil { - return written, err - } - n, err = writeSample( - w, name, "_count", metric, "", 0, - float64(metric.Summary.GetSampleCount()), - ) - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - if metric.Histogram == nil { - return written, fmt.Errorf( - "expected histogram in metric %s %s", name, metric, - ) - } - infSeen := false - for _, b := range metric.Histogram.Bucket { - v := b.GetCumulativeCountFloat() - if v == 0 { - v = float64(b.GetCumulativeCount()) - } - n, err = writeSample( - w, name, "_bucket", metric, - model.BucketLabel, b.GetUpperBound(), - v, - ) - written += n - if err != nil { - return written, err - } - if math.IsInf(b.GetUpperBound(), +1) { - infSeen = true - } - } - if !infSeen { - v := metric.Histogram.GetSampleCountFloat() - if v == 0 { - v = float64(metric.Histogram.GetSampleCount()) - } - n, err = writeSample( - w, name, "_bucket", metric, - model.BucketLabel, math.Inf(+1), - v, - ) - written += n - if err != nil { - return written, err - } - } - n, err = writeSample( - w, name, "_sum", metric, "", 0, - metric.Histogram.GetSampleSum(), - ) - written += n - if err != nil { - return written, err - } - v := metric.Histogram.GetSampleCountFloat() - if v == 0 { - v = float64(metric.Histogram.GetSampleCount()) - } - n, err = writeSample(w, name, "_count", metric, "", 0, v) - default: - return written, fmt.Errorf( - "unexpected type in metric %s %s", name, metric, - ) - } - written += n - if err != nil { - return written, err - } - } - return written, err -} - -// writeSample writes a single sample in text format to w, given the metric -// name, the metric proto message itself, optionally an additional label name -// with a float64 value (use empty string as label name if not required), and -// the value. The function returns the number of bytes written and any error -// encountered. -func writeSample( - w enhancedWriter, - name, suffix string, - metric *dto.Metric, - additionalLabelName string, additionalLabelValue float64, - value float64, -) (int, error) { - written := 0 - n, err := writeNameAndLabelPairs( - w, name+suffix, metric.Label, additionalLabelName, additionalLabelValue, - ) - written += n - if err != nil { - return written, err - } - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeFloat(w, value) - written += n - if err != nil { - return written, err - } - if metric.TimestampMs != nil { - err = w.WriteByte(' ') - written++ - if err != nil { - return written, err - } - n, err = writeInt(w, *metric.TimestampMs) - written += n - if err != nil { - return written, err - } - } - err = w.WriteByte('\n') - written++ - if err != nil { - return written, err - } - return written, nil -} - -// writeNameAndLabelPairs converts a slice of LabelPair proto messages plus the -// explicitly given metric name and additional label pair into text formatted as -// required by the text format and writes it to 'w'. An empty slice in -// combination with an empty string 'additionalLabelName' results in nothing -// being written. Otherwise, the label pairs are written, escaped as required by -// the text format, and enclosed in '{...}'. The function returns the number of -// bytes written and any error encountered. If the metric name is not -// legacy-valid, it will be put inside the brackets as well. Legacy-invalid -// label names will also be quoted. -func writeNameAndLabelPairs( - w enhancedWriter, - name string, - in []*dto.LabelPair, - additionalLabelName string, additionalLabelValue float64, -) (int, error) { - var ( - written int - separator byte = '{' - metricInsideBraces = false - ) - - if name != "" { - // If the name does not pass the legacy validity check, we must put the - // metric name inside the braces. - if !model.LegacyValidation.IsValidMetricName(name) { - metricInsideBraces = true - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - separator = ',' - } - n, err := writeName(w, name) - written += n - if err != nil { - return written, err - } - } - - if len(in) == 0 && additionalLabelName == "" { - if metricInsideBraces { - err := w.WriteByte('}') - written++ - if err != nil { - return written, err - } - } - return written, nil - } - - for _, lp := range in { - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - n, err := writeName(w, lp.GetName()) - written += n - if err != nil { - return written, err - } - n, err = w.WriteString(`="`) - written += n - if err != nil { - return written, err - } - n, err = writeEscapedString(w, lp.GetValue(), true) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('"') - written++ - if err != nil { - return written, err - } - separator = ',' - } - if additionalLabelName != "" { - err := w.WriteByte(separator) - written++ - if err != nil { - return written, err - } - n, err := w.WriteString(additionalLabelName) - written += n - if err != nil { - return written, err - } - n, err = w.WriteString(`="`) - written += n - if err != nil { - return written, err - } - n, err = writeFloat(w, additionalLabelValue) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('"') - written++ - if err != nil { - return written, err - } - } - err := w.WriteByte('}') - written++ - if err != nil { - return written, err - } - return written, nil -} - -// writeEscapedString replaces '\' by '\\', new line character by '\n', and - if -// includeDoubleQuote is true - '"' by '\"'. -var ( - escaper = strings.NewReplacer("\\", `\\`, "\n", `\n`) - quotedEscaper = strings.NewReplacer("\\", `\\`, "\n", `\n`, "\"", `\"`) -) - -func writeEscapedString(w enhancedWriter, v string, includeDoubleQuote bool) (int, error) { - if includeDoubleQuote { - return quotedEscaper.WriteString(w, v) - } - return escaper.WriteString(w, v) -} - -// writeFloat is equivalent to fmt.Fprint with a float64 argument but hardcodes -// a few common cases for increased efficiency. For non-hardcoded cases, it uses -// strconv.AppendFloat to avoid allocations, similar to writeInt. -func writeFloat(w enhancedWriter, f float64) (int, error) { - switch { - case f == 1: - return 1, w.WriteByte('1') - case f == 0: - return 1, w.WriteByte('0') - case f == -1: - return w.WriteString("-1") - case math.IsNaN(f): - return w.WriteString("NaN") - case math.IsInf(f, +1): - return w.WriteString("+Inf") - case math.IsInf(f, -1): - return w.WriteString("-Inf") - default: - bp := numBufPool.Get().(*[]byte) - *bp = strconv.AppendFloat((*bp)[:0], f, 'g', -1, 64) - written, err := w.Write(*bp) - numBufPool.Put(bp) - return written, err - } -} - -// writeInt is equivalent to fmt.Fprint with an int64 argument but uses -// strconv.AppendInt with a byte slice taken from a sync.Pool to avoid -// allocations. -func writeInt(w enhancedWriter, i int64) (int, error) { - bp := numBufPool.Get().(*[]byte) - *bp = strconv.AppendInt((*bp)[:0], i, 10) - written, err := w.Write(*bp) - numBufPool.Put(bp) - return written, err -} - -// writeName writes a string as-is if it complies with the legacy naming -// scheme, or escapes it in double quotes if not. -func writeName(w enhancedWriter, name string) (int, error) { - if model.LegacyValidation.IsValidMetricName(name) { - return w.WriteString(name) - } - var written int - var err error - err = w.WriteByte('"') - written++ - if err != nil { - return written, err - } - var n int - n, err = writeEscapedString(w, name, true) - written += n - if err != nil { - return written, err - } - err = w.WriteByte('"') - written++ - return written, err -} diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go deleted file mode 100644 index 4ce1f40b8..000000000 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ /dev/null @@ -1,1007 +0,0 @@ -// Copyright 2014 The Prometheus 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 expfmt - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "math" - "strconv" - "strings" - "unicode/utf8" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/proto" - - "github.com/prometheus/common/model" -) - -// A stateFn is a function that represents a state in a state machine. By -// executing it, the state is progressed to the next state. The stateFn returns -// another stateFn, which represents the new state. The end state is represented -// by nil. -type stateFn func() stateFn - -// ParseError signals errors while parsing the simple and flat text-based -// exchange format. -type ParseError struct { - Line int - Msg string -} - -// Error implements the error interface. -func (e ParseError) Error() string { - return fmt.Sprintf("text format parsing error in line %d: %s", e.Line, e.Msg) -} - -// TextParser is used to parse the simple and flat text-based exchange format. -// -// TextParser instances must be created with NewTextParser, the zero value of -// TextParser is invalid. -type TextParser struct { - metricFamiliesByName map[string]*dto.MetricFamily - buf *bufio.Reader // Where the parsed input is read through. - err error // Most recent error. - lineCount int // Tracks the line count for error messages. - currentByte byte // The most recent byte read. - currentToken bytes.Buffer // Re-used each time a token has to be gathered from multiple bytes. - currentMF *dto.MetricFamily - currentMetric *dto.Metric - currentLabelPair *dto.LabelPair - currentLabelPairs []*dto.LabelPair // Temporarily stores label pairs while parsing a metric line. - - // The remaining member variables are only used for summaries/histograms. - currentLabels map[string]string // All labels including '__name__' but excluding 'quantile'/'le' - // Summary specific. - summaries map[uint64]*dto.Metric // Key is created with LabelsToSignature. - currentQuantile float64 - // Histogram specific. - histograms map[uint64]*dto.Metric // Key is created with LabelsToSignature. - currentBucket float64 - // These tell us if the currently processed line ends on '_count' or - // '_sum' respectively and belong to a summary/histogram, representing the sample - // count and sum of that summary/histogram. - currentIsSummaryCount, currentIsSummarySum bool - currentIsHistogramCount, currentIsHistogramSum bool - // These indicate if the metric name from the current line being parsed is inside - // braces and if that metric name was found respectively. - currentMetricIsInsideBraces, currentMetricInsideBracesIsPresent bool - // scheme sets the desired ValidationScheme for names. Defaults to the invalid - // UnsetValidation. - scheme model.ValidationScheme -} - -// NewTextParser returns a new TextParser with the provided nameValidationScheme. -func NewTextParser(nameValidationScheme model.ValidationScheme) TextParser { - return TextParser{scheme: nameValidationScheme} -} - -// TextToMetricFamilies reads 'in' as the simple and flat text-based exchange -// format and creates MetricFamily proto messages. It returns the MetricFamily -// proto messages in a map where the metric names are the keys, along with any -// error encountered. -// -// If the input contains duplicate metrics (i.e. lines with the same metric name -// and exactly the same label set), the resulting MetricFamily will contain -// duplicate Metric proto messages. Similar is true for duplicate label -// names. Checks for duplicates have to be performed separately, if required. -// Also note that neither the metrics within each MetricFamily are sorted nor -// the label pairs within each Metric. Sorting is not required for the most -// frequent use of this method, which is sample ingestion in the Prometheus -// server. However, for presentation purposes, you might want to sort the -// metrics, and in some cases, you must sort the labels, e.g. for consumption by -// the metric family injection hook of the Prometheus registry. -// -// Summaries and histograms are rather special beasts. You would probably not -// use them in the simple text format anyway. This method can deal with -// summaries and histograms if they are presented in exactly the way the -// text.Create function creates them. -// -// This method must not be called concurrently. If you want to parse different -// input concurrently, instantiate a separate Parser for each goroutine. -func (p *TextParser) TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricFamily, error) { - p.reset(in) - for nextState := p.startOfLine; nextState != nil; nextState = nextState() { - // Magic happens here... - } - // Get rid of empty metric families. - for k, mf := range p.metricFamiliesByName { - if len(mf.GetMetric()) == 0 { - delete(p.metricFamiliesByName, k) - } - } - // If p.err is io.EOF now, we have run into a premature end of the input - // stream. Turn this error into something nicer and more - // meaningful. (io.EOF is often used as a signal for the legitimate end - // of an input stream.) - if p.err != nil && errors.Is(p.err, io.EOF) { - p.parseError("unexpected end of input stream") - } - for _, histogramMetric := range p.histograms { - normalizeHistogram(histogramMetric.GetHistogram()) - } - return p.metricFamiliesByName, p.err -} - -// normalizeHistogram makes sure that all the buckets and the count in each -// histogram is either completely float or completely integer. -func normalizeHistogram(histogram *dto.Histogram) { - if histogram == nil { - return - } - anyFloats := false - if histogram.GetSampleCountFloat() != 0 { - anyFloats = true - } else { - for _, b := range histogram.GetBucket() { - if b.GetCumulativeCountFloat() != 0 { - anyFloats = true - break - } - } - } - if !anyFloats { - return - } - if histogram.GetSampleCountFloat() == 0 { - histogram.SampleCountFloat = proto.Float64(float64(histogram.GetSampleCount())) - histogram.SampleCount = nil - } - for _, b := range histogram.GetBucket() { - if b.GetCumulativeCountFloat() == 0 { - b.CumulativeCountFloat = proto.Float64(float64(b.GetCumulativeCount())) - b.CumulativeCount = nil - } - } -} - -func (p *TextParser) reset(in io.Reader) { - p.metricFamiliesByName = map[string]*dto.MetricFamily{} - p.currentLabelPairs = nil - if p.buf == nil { - p.buf = bufio.NewReader(in) - } else { - p.buf.Reset(in) - } - p.err = nil - p.lineCount = 0 - if p.summaries == nil || len(p.summaries) > 0 { - p.summaries = map[uint64]*dto.Metric{} - } - if p.histograms == nil || len(p.histograms) > 0 { - p.histograms = map[uint64]*dto.Metric{} - } - p.currentQuantile = math.NaN() - p.currentBucket = math.NaN() - p.currentMF = nil -} - -// startOfLine represents the state where the next byte read from p.buf is the -// start of a line (or whitespace leading up to it). -func (p *TextParser) startOfLine() stateFn { - p.lineCount++ - p.currentMetricIsInsideBraces = false - p.currentMetricInsideBracesIsPresent = false - if p.skipBlankTab(); p.err != nil { - // This is the only place that we expect to see io.EOF, - // which is not an error but the signal that we are done. - // Any other error that happens to align with the start of - // a line is still an error. - if errors.Is(p.err, io.EOF) { - p.err = nil - } - return nil - } - switch p.currentByte { - case '#': - return p.startComment - case '\n': - return p.startOfLine // Empty line, start the next one. - case '{': - p.currentMetricIsInsideBraces = true - return p.readingLabels - } - return p.readingMetricName -} - -// startComment represents the state where the next byte read from p.buf is the -// start of a comment (or whitespace leading up to it). -func (p *TextParser) startComment() stateFn { - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte == '\n' { - return p.startOfLine - } - if p.readTokenUntilWhitespace(); p.err != nil { - return nil // Unexpected end of input. - } - // If we have hit the end of line already, there is nothing left - // to do. This is not considered a syntax error. - if p.currentByte == '\n' { - return p.startOfLine - } - keyword := p.currentToken.String() - if keyword != "HELP" && keyword != "TYPE" { - // Generic comment, ignore by fast forwarding to end of line. - for p.currentByte != '\n' { - if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { - return nil // Unexpected end of input. - } - } - return p.startOfLine - } - // There is something. Next has to be a metric name. - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.readTokenAsMetricName(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte == '\n' { - // At the end of the line already. - // Again, this is not considered a syntax error. - return p.startOfLine - } - if !isBlankOrTab(p.currentByte) { - p.parseError("invalid metric name in comment") - return nil - } - p.setOrCreateCurrentMF() - if p.err != nil { - return nil - } - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte == '\n' { - // At the end of the line already. - // Again, this is not considered a syntax error. - return p.startOfLine - } - switch keyword { - case "HELP": - return p.readingHelp - case "TYPE": - return p.readingType - } - panic(fmt.Sprintf("code error: unexpected keyword %q", keyword)) -} - -// readingMetricName represents the state where the last byte read (now in -// p.currentByte) is the first byte of a metric name. -func (p *TextParser) readingMetricName() stateFn { - if p.readTokenAsMetricName(); p.err != nil { - return nil - } - if p.currentToken.Len() == 0 { - p.parseError("invalid metric name") - return nil - } - p.setOrCreateCurrentMF() - if p.err != nil { - return nil - } - // Now is the time to fix the type if it hasn't happened yet. - if p.currentMF.Type == nil { - p.currentMF.Type = dto.MetricType_UNTYPED.Enum() - } - p.currentMetric = &dto.Metric{} - // Do not append the newly created currentMetric to - // currentMF.Metric right now. First wait if this is a summary, - // and the metric exists already, which we can only know after - // having read all the labels. - if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - return p.readingLabels -} - -// readingLabels represents the state where the last byte read (now in -// p.currentByte) is either the first byte of the label set (i.e. a '{'), or the -// first byte of the value (otherwise). -func (p *TextParser) readingLabels() stateFn { - // Summaries/histograms are special. We have to reset the - // currentLabels map, currentQuantile and currentBucket before starting to - // read labels. - if p.currentMF.GetType() == dto.MetricType_SUMMARY || - p.currentMF.GetType() == dto.MetricType_HISTOGRAM || - p.currentMF.GetType() == dto.MetricType_GAUGE_HISTOGRAM { - p.currentLabels = map[string]string{} - p.currentLabels[string(model.MetricNameLabel)] = p.currentMF.GetName() - p.currentQuantile = math.NaN() - p.currentBucket = math.NaN() - } - if p.currentByte != '{' { - return p.readingValue - } - return p.startLabelName -} - -// startLabelName represents the state where the next byte read from p.buf is -// the start of a label name (or whitespace leading up to it). -func (p *TextParser) startLabelName() stateFn { - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte == '}' { - if p.currentMF == nil { - // The closing brace was reached before any metric name was read, - // e.g. for the input "{}". There is no metric to attach labels to, - // so this is a malformed exposition. This mirrors the guard in - // startLabelValue. currentMF (not currentMetric) is checked because - // reset only clears currentMF between parses. - p.parseError("invalid metric name") - p.currentLabelPairs = nil - return nil - } - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - return p.readingValue - } - if p.readTokenAsLabelName(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentToken.Len() == 0 { - p.parseError(fmt.Sprintf("invalid label name for metric %q", p.currentMF.GetName())) - return nil - } - if p.skipBlankTabIfCurrentBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte != '=' { - if p.currentMetricIsInsideBraces { - if p.currentMetricInsideBracesIsPresent { - p.parseError(fmt.Sprintf("multiple metric names for metric %q", p.currentMF.GetName())) - return nil - } - switch p.currentByte { - case ',': - p.setOrCreateCurrentMF() - if p.err != nil { - return nil - } - if p.currentMF.Type == nil { - p.currentMF.Type = dto.MetricType_UNTYPED.Enum() - } - p.currentMetric = &dto.Metric{} - p.currentMetricInsideBracesIsPresent = true - return p.startLabelName - case '}': - p.setOrCreateCurrentMF() - if p.err != nil { - p.currentLabelPairs = nil - return nil - } - if p.currentMF.Type == nil { - p.currentMF.Type = dto.MetricType_UNTYPED.Enum() - } - p.currentMetric = &dto.Metric{} - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - return p.readingValue - default: - p.parseError(fmt.Sprintf("unexpected end of metric name %q", p.currentByte)) - return nil - } - } - p.parseError(fmt.Sprintf("expected '=' after label name, found %q", p.currentByte)) - p.currentLabelPairs = nil - return nil - } - p.currentLabelPair = &dto.LabelPair{Name: proto.String(p.currentToken.String())} - if p.currentLabelPair.GetName() == string(model.MetricNameLabel) { - p.parseError(fmt.Sprintf("label name %q is reserved", model.MetricNameLabel)) - p.currentLabelPairs = nil - return nil - } - if !p.scheme.IsValidLabelName(p.currentLabelPair.GetName()) { - p.parseError(fmt.Sprintf("invalid label name %q", p.currentLabelPair.GetName())) - p.currentLabelPairs = nil - return nil - } - // Special summary/histogram treatment. Don't add 'quantile' and 'le' - // labels to 'real' labels. - if (p.currentMF.GetType() != dto.MetricType_SUMMARY || p.currentLabelPair.GetName() != model.QuantileLabel) && - ((p.currentMF.GetType() != dto.MetricType_HISTOGRAM && - p.currentMF.GetType() != dto.MetricType_GAUGE_HISTOGRAM) || - p.currentLabelPair.GetName() != model.BucketLabel) { - p.currentLabelPairs = append(p.currentLabelPairs, p.currentLabelPair) - } - // Check for duplicate label names. - labels := make(map[string]struct{}) - for _, l := range p.currentLabelPairs { - lName := l.GetName() - if _, exists := labels[lName]; exists { - p.parseError(fmt.Sprintf("duplicate label names for metric %q", p.currentMF.GetName())) - p.currentLabelPairs = nil - return nil - } - labels[lName] = struct{}{} - } - return p.startLabelValue -} - -// startLabelValue represents the state where the next byte read from p.buf is -// the start of a (quoted) label value (or whitespace leading up to it). -func (p *TextParser) startLabelValue() stateFn { - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentByte != '"' { - p.parseError(fmt.Sprintf("expected '\"' at start of label value, found %q", p.currentByte)) - return nil - } - if p.readTokenAsLabelValue(); p.err != nil { - return nil - } - if !model.LabelValue(p.currentToken.String()).IsValid() { - p.parseError(fmt.Sprintf("invalid label value %q", p.currentToken.String())) - return nil - } - p.currentLabelPair.Value = proto.String(p.currentToken.String()) - // Special treatment of summaries: - // - Quantile labels are special, will result in dto.Quantile later. - // - Other labels have to be added to currentLabels for signature calculation. - if p.currentMF.GetType() == dto.MetricType_SUMMARY { - if p.currentLabelPair.GetName() == model.QuantileLabel { - if p.currentQuantile, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { - // Create a more helpful error message. - p.parseError(fmt.Sprintf("expected float as value for 'quantile' label, got %q", p.currentLabelPair.GetValue())) - p.currentLabelPairs = nil - return nil - } - } else { - p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() - } - } - // Similar special treatment of histograms. - if p.currentMF.GetType() == dto.MetricType_HISTOGRAM || p.currentMF.GetType() == dto.MetricType_GAUGE_HISTOGRAM { - if p.currentLabelPair.GetName() == model.BucketLabel { - if p.currentBucket, p.err = parseFloat(p.currentLabelPair.GetValue()); p.err != nil { - // Create a more helpful error message. - p.parseError(fmt.Sprintf("expected float as value for 'le' label, got %q", p.currentLabelPair.GetValue())) - return nil - } - } else { - p.currentLabels[p.currentLabelPair.GetName()] = p.currentLabelPair.GetValue() - } - } - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - switch p.currentByte { - case ',': - return p.startLabelName - - case '}': - if p.currentMF == nil { - p.parseError("invalid metric name") - return nil - } - p.currentMetric.Label = append(p.currentMetric.Label, p.currentLabelPairs...) - p.currentLabelPairs = nil - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - return p.readingValue - default: - p.parseError(fmt.Sprintf("unexpected end of label value %q", p.currentLabelPair.GetValue())) - p.currentLabelPairs = nil - return nil - } -} - -// readingValue represents the state where the last byte read (now in -// p.currentByte) is the first byte of the sample value (i.e. a float). -func (p *TextParser) readingValue() stateFn { - // When we are here, we have read all the labels, so for the - // special case of a summary/histogram, we can finally find out - // if the metric already exists. - switch p.currentMF.GetType() { - case dto.MetricType_SUMMARY: - signature := model.LabelsToSignature(p.currentLabels) - if summary := p.summaries[signature]; summary != nil { - p.currentMetric = summary - } else { - p.summaries[signature] = p.currentMetric - p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) - } - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - signature := model.LabelsToSignature(p.currentLabels) - if histogram := p.histograms[signature]; histogram != nil { - p.currentMetric = histogram - } else { - p.histograms[signature] = p.currentMetric - p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) - } - default: - p.currentMF.Metric = append(p.currentMF.Metric, p.currentMetric) - } - if p.readTokenUntilWhitespace(); p.err != nil { - return nil // Unexpected end of input. - } - value, err := parseFloat(p.currentToken.String()) - if err != nil { - // Create a more helpful error message. - p.parseError(fmt.Sprintf("expected float as value, got %q", p.currentToken.String())) - return nil - } - switch p.currentMF.GetType() { - case dto.MetricType_COUNTER: - p.currentMetric.Counter = &dto.Counter{Value: proto.Float64(value)} - case dto.MetricType_GAUGE: - p.currentMetric.Gauge = &dto.Gauge{Value: proto.Float64(value)} - case dto.MetricType_UNTYPED: - p.currentMetric.Untyped = &dto.Untyped{Value: proto.Float64(value)} - case dto.MetricType_SUMMARY: - // *sigh* - if p.currentMetric.Summary == nil { - p.currentMetric.Summary = &dto.Summary{} - } - switch { - case p.currentIsSummaryCount: - p.currentMetric.Summary.SampleCount = proto.Uint64(uint64(value)) - case p.currentIsSummarySum: - p.currentMetric.Summary.SampleSum = proto.Float64(value) - case !math.IsNaN(p.currentQuantile): - p.currentMetric.Summary.Quantile = append( - p.currentMetric.Summary.Quantile, - &dto.Quantile{ - Quantile: proto.Float64(p.currentQuantile), - Value: proto.Float64(value), - }, - ) - } - case dto.MetricType_HISTOGRAM, dto.MetricType_GAUGE_HISTOGRAM: - // *sigh* - if p.currentMetric.Histogram == nil { - p.currentMetric.Histogram = &dto.Histogram{} - } - switch { - case p.currentIsHistogramCount: - if uintValue := uint64(value); value == float64(uintValue) { - p.currentMetric.Histogram.SampleCount = proto.Uint64(uintValue) - } else { - if value < 0 { - p.parseError(fmt.Sprintf("negative count for histogram %q", p.currentMF.GetName())) - return nil - } - p.currentMetric.Histogram.SampleCountFloat = proto.Float64(value) - } - case p.currentIsHistogramSum: - p.currentMetric.Histogram.SampleSum = proto.Float64(value) - case !math.IsNaN(p.currentBucket): - b := &dto.Bucket{ - UpperBound: proto.Float64(p.currentBucket), - } - if uintValue := uint64(value); value == float64(uintValue) { - b.CumulativeCount = proto.Uint64(uintValue) - } else { - if value < 0 { - p.parseError(fmt.Sprintf("negative bucket population for histogram %q", p.currentMF.GetName())) - return nil - } - b.CumulativeCountFloat = proto.Float64(value) - } - p.currentMetric.Histogram.Bucket = append(p.currentMetric.Histogram.Bucket, b) - } - default: - p.err = fmt.Errorf("unexpected type for metric name %q", p.currentMF.GetName()) - } - if p.currentByte == '\n' { - return p.startOfLine - } - return p.startTimestamp -} - -// startTimestamp represents the state where the next byte read from p.buf is -// the start of the timestamp (or whitespace leading up to it). -func (p *TextParser) startTimestamp() stateFn { - if p.skipBlankTab(); p.err != nil { - return nil // Unexpected end of input. - } - if p.readTokenUntilWhitespace(); p.err != nil { - return nil // Unexpected end of input. - } - timestamp, err := strconv.ParseInt(p.currentToken.String(), 10, 64) - if err != nil { - // Create a more helpful error message. - p.parseError(fmt.Sprintf("expected integer as timestamp, got %q", p.currentToken.String())) - return nil - } - p.currentMetric.TimestampMs = proto.Int64(timestamp) - if p.readTokenUntilNewline(false); p.err != nil { - return nil // Unexpected end of input. - } - if p.currentToken.Len() > 0 { - p.parseError(fmt.Sprintf("spurious string after timestamp: %q", p.currentToken.String())) - return nil - } - return p.startOfLine -} - -// readingHelp represents the state where the last byte read (now in -// p.currentByte) is the first byte of the docstring after 'HELP'. -func (p *TextParser) readingHelp() stateFn { - if p.currentMF.Help != nil { - p.parseError(fmt.Sprintf("second HELP line for metric name %q", p.currentMF.GetName())) - return nil - } - // Rest of line is the docstring. - if p.readTokenUntilNewline(true); p.err != nil { - return nil // Unexpected end of input. - } - p.currentMF.Help = proto.String(p.currentToken.String()) - return p.startOfLine -} - -// readingType represents the state where the last byte read (now in -// p.currentByte) is the first byte of the type hint after 'HELP'. -func (p *TextParser) readingType() stateFn { - if p.currentMF.Type != nil { - p.parseError(fmt.Sprintf("second TYPE line for metric name %q, or TYPE reported after samples", p.currentMF.GetName())) - return nil - } - // Rest of line is the type. - if p.readTokenUntilNewline(false); p.err != nil { - return nil // Unexpected end of input. - } - typ := strings.ToUpper(p.currentToken.String()) // Tolerate any combination of upper and lower case. - metricType, ok := dto.MetricType_value[typ] // Tolerate "gauge_histogram" (not originally part of the text format). - if !ok { - // We also want to tolerate "gaugehistogram" to mark a gauge - // histogram, because that string is used in OpenMetrics. Note, - // however, that gauge histograms do not officially exist in the - // classic text format. - if typ != "GAUGEHISTOGRAM" { - p.parseError(fmt.Sprintf("unknown metric type %q", p.currentToken.String())) - return nil - } - metricType = int32(dto.MetricType_GAUGE_HISTOGRAM) - } - p.currentMF.Type = dto.MetricType(metricType).Enum() - return p.startOfLine -} - -// parseError sets p.err to a ParseError at the current line with the given -// message. -func (p *TextParser) parseError(msg string) { - p.err = ParseError{ - Line: p.lineCount, - Msg: msg, - } -} - -// skipBlankTab reads (and discards) bytes from p.buf until it encounters a byte -// that is neither ' ' nor '\t'. That byte is left in p.currentByte. -func (p *TextParser) skipBlankTab() { - for { - if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil || !isBlankOrTab(p.currentByte) { - return - } - } -} - -// skipBlankTabIfCurrentBlankTab works exactly as skipBlankTab but doesn't do -// anything if p.currentByte is neither ' ' nor '\t'. -func (p *TextParser) skipBlankTabIfCurrentBlankTab() { - if isBlankOrTab(p.currentByte) { - p.skipBlankTab() - } -} - -// readTokenUntilWhitespace copies bytes from p.buf into p.currentToken. The -// first byte considered is the byte already read (now in p.currentByte). The -// first whitespace byte encountered is still copied into p.currentByte, but not -// into p.currentToken. -func (p *TextParser) readTokenUntilWhitespace() { - p.currentToken.Reset() - for p.err == nil && !isBlankOrTab(p.currentByte) && p.currentByte != '\n' { - p.currentToken.WriteByte(p.currentByte) - p.currentByte, p.err = p.buf.ReadByte() - } -} - -// readTokenUntilNewline copies bytes from p.buf into p.currentToken. The first -// byte considered is the byte already read (now in p.currentByte). The first -// newline byte encountered is still copied into p.currentByte, but not into -// p.currentToken. If recognizeEscapeSequence is true, two escape sequences are -// recognized: '\\' translates into '\', and '\n' into a line-feed character. -// All other escape sequences are invalid and cause an error. -func (p *TextParser) readTokenUntilNewline(recognizeEscapeSequence bool) { - p.currentToken.Reset() - escaped := false - for p.err == nil { - if recognizeEscapeSequence && escaped { - switch p.currentByte { - case '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - return - } - escaped = false - } else { - switch p.currentByte { - case '\n': - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } - p.currentByte, p.err = p.buf.ReadByte() - } -} - -// readTokenAsMetricName copies a metric name from p.buf into p.currentToken. -// The first byte considered is the byte already read (now in p.currentByte). -// The first byte not part of a metric name is still copied into p.currentByte, -// but not into p.currentToken. -func (p *TextParser) readTokenAsMetricName() { - p.currentToken.Reset() - // A UTF-8 metric name must be quoted and may have escaped characters. - quoted := false - escaped := false - if !isValidMetricNameStart(p.currentByte) { - return - } - for p.err == nil { - if escaped { - switch p.currentByte { - case '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - return - } - escaped = false - } else { - switch p.currentByte { - case '"': - quoted = !quoted - if !quoted { - p.currentByte, p.err = p.buf.ReadByte() - return - } - case '\n': - p.parseError(fmt.Sprintf("metric name %q contains unescaped new-line", p.currentToken.String())) - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } - p.currentByte, p.err = p.buf.ReadByte() - if !isValidMetricNameContinuation(p.currentByte, quoted) || (!quoted && p.currentByte == ' ') { - return - } - } -} - -// readTokenAsLabelName copies a label name from p.buf into p.currentToken. -// The first byte considered is the byte already read (now in p.currentByte). -// The first byte not part of a label name is still copied into p.currentByte, -// but not into p.currentToken. -func (p *TextParser) readTokenAsLabelName() { - p.currentToken.Reset() - // A UTF-8 label name must be quoted and may have escaped characters. - quoted := false - escaped := false - if !isValidLabelNameStart(p.currentByte) { - return - } - for p.err == nil { - if escaped { - switch p.currentByte { - case '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - case '"': - p.currentToken.WriteByte('"') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - return - } - escaped = false - } else { - switch p.currentByte { - case '"': - quoted = !quoted - if !quoted { - p.currentByte, p.err = p.buf.ReadByte() - return - } - case '\n': - p.parseError(fmt.Sprintf("label name %q contains unescaped new-line", p.currentToken.String())) - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } - p.currentByte, p.err = p.buf.ReadByte() - if !isValidLabelNameContinuation(p.currentByte, quoted) || (!quoted && p.currentByte == '=') { - return - } - } -} - -// readTokenAsLabelValue copies a label value from p.buf into p.currentToken. -// In contrast to the other 'readTokenAs...' functions, which start with the -// last read byte in p.currentByte, this method ignores p.currentByte and starts -// with reading a new byte from p.buf. The first byte not part of a label value -// is still copied into p.currentByte, but not into p.currentToken. -func (p *TextParser) readTokenAsLabelValue() { - p.currentToken.Reset() - escaped := false - for { - if p.currentByte, p.err = p.buf.ReadByte(); p.err != nil { - return - } - if escaped { - switch p.currentByte { - case '"', '\\': - p.currentToken.WriteByte(p.currentByte) - case 'n': - p.currentToken.WriteByte('\n') - default: - p.parseError(fmt.Sprintf("invalid escape sequence '\\%c'", p.currentByte)) - p.currentLabelPairs = nil - return - } - escaped = false - continue - } - switch p.currentByte { - case '"': - return - case '\n': - p.parseError(fmt.Sprintf("label value %q contains unescaped new-line", p.currentToken.String())) - return - case '\\': - escaped = true - default: - p.currentToken.WriteByte(p.currentByte) - } - } -} - -func (p *TextParser) setOrCreateCurrentMF() { - p.currentIsSummaryCount = false - p.currentIsSummarySum = false - p.currentIsHistogramCount = false - p.currentIsHistogramSum = false - name := p.currentToken.String() - if !p.scheme.IsValidMetricName(name) { - p.parseError(fmt.Sprintf("invalid metric name %q", name)) - return - } - if p.currentMF = p.metricFamiliesByName[name]; p.currentMF != nil { - return - } - // Try out if this is a _sum or _count for a summary/histogram. - summaryName := summaryMetricName(name) - if p.currentMF = p.metricFamiliesByName[summaryName]; p.currentMF != nil { - if p.currentMF.GetType() == dto.MetricType_SUMMARY { - if isCount(name) { - p.currentIsSummaryCount = true - } - if isSum(name) { - p.currentIsSummarySum = true - } - return - } - } - histogramName := histogramMetricName(name) - if p.currentMF = p.metricFamiliesByName[histogramName]; p.currentMF != nil { - if p.currentMF.GetType() == dto.MetricType_HISTOGRAM || - p.currentMF.GetType() == dto.MetricType_GAUGE_HISTOGRAM { - if isCount(name) { - p.currentIsHistogramCount = true - } - if isSum(name) { - p.currentIsHistogramSum = true - } - return - } - } - p.currentMF = &dto.MetricFamily{Name: proto.String(name)} - p.metricFamiliesByName[name] = p.currentMF -} - -func isValidLabelNameStart(b byte) bool { - return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == '"' -} - -func isValidLabelNameContinuation(b byte, quoted bool) bool { - return isValidLabelNameStart(b) || (b >= '0' && b <= '9') || (quoted && utf8.ValidString(string(b))) -} - -func isValidMetricNameStart(b byte) bool { - return isValidLabelNameStart(b) || b == ':' -} - -func isValidMetricNameContinuation(b byte, quoted bool) bool { - return isValidLabelNameContinuation(b, quoted) || b == ':' -} - -func isBlankOrTab(b byte) bool { - return b == ' ' || b == '\t' -} - -func isCount(name string) bool { - return len(name) > 6 && name[len(name)-6:] == "_count" -} - -func isSum(name string) bool { - return len(name) > 4 && name[len(name)-4:] == "_sum" -} - -func isBucket(name string) bool { - return len(name) > 7 && name[len(name)-7:] == "_bucket" -} - -func summaryMetricName(name string) string { - switch { - case isCount(name): - return name[:len(name)-6] - case isSum(name): - return name[:len(name)-4] - default: - return name - } -} - -func histogramMetricName(name string) string { - switch { - case isCount(name): - return name[:len(name)-6] - case isSum(name): - return name[:len(name)-4] - case isBucket(name): - return name[:len(name)-7] - default: - return name - } -} - -func parseFloat(s string) (float64, error) { - if strings.ContainsAny(s, "pP_") { - return 0, errors.New("unsupported character in float") - } - return strconv.ParseFloat(s, 64) -} diff --git a/vendor/github.com/prometheus/common/model/alert.go b/vendor/github.com/prometheus/common/model/alert.go deleted file mode 100644 index 460f554f2..000000000 --- a/vendor/github.com/prometheus/common/model/alert.go +++ /dev/null @@ -1,162 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "errors" - "fmt" - "time" -) - -type AlertStatus string - -const ( - AlertFiring AlertStatus = "firing" - AlertResolved AlertStatus = "resolved" -) - -// Alert is a generic representation of an alert in the Prometheus eco-system. -type Alert struct { - // Label value pairs for purpose of aggregation, matching, and disposition - // dispatching. This must minimally include an "alertname" label. - Labels LabelSet `json:"labels"` - - // Extra key/value information which does not define alert identity. - Annotations LabelSet `json:"annotations"` - - // The known time range for this alert. Both ends are optional. - StartsAt time.Time `json:"startsAt,omitempty"` - EndsAt time.Time `json:"endsAt,omitempty"` - GeneratorURL string `json:"generatorURL"` -} - -// Name returns the name of the alert. It is equivalent to the "alertname" label. -func (a *Alert) Name() string { - return string(a.Labels[AlertNameLabel]) -} - -// Fingerprint returns a unique hash for the alert. It is equivalent to -// the fingerprint of the alert's label set. -func (a *Alert) Fingerprint() Fingerprint { - return a.Labels.Fingerprint() -} - -func (a *Alert) String() string { - s := fmt.Sprintf("%s[%s]", a.Name(), a.Fingerprint().String()[:7]) - if a.Resolved() { - return s + "[resolved]" - } - return s + "[active]" -} - -// Resolved returns true iff the activity interval ended in the past. -func (a *Alert) Resolved() bool { - return a.ResolvedAt(time.Now()) -} - -// ResolvedAt returns true iff the activity interval ended before -// the given timestamp. -func (a *Alert) ResolvedAt(ts time.Time) bool { - if a.EndsAt.IsZero() { - return false - } - return !a.EndsAt.After(ts) -} - -// Status returns the status of the alert. -func (a *Alert) Status() AlertStatus { - return a.StatusAt(time.Now()) -} - -// StatusAt returns the status of the alert at the given timestamp. -func (a *Alert) StatusAt(ts time.Time) AlertStatus { - if a.ResolvedAt(ts) { - return AlertResolved - } - return AlertFiring -} - -// Validate checks whether the alert data is inconsistent. -func (a *Alert) Validate() error { - if a.StartsAt.IsZero() { - return errors.New("start time missing") - } - if !a.EndsAt.IsZero() && a.EndsAt.Before(a.StartsAt) { - return errors.New("start time must be before end time") - } - if err := a.Labels.Validate(); err != nil { - return fmt.Errorf("invalid label set: %w", err) - } - if len(a.Labels) == 0 { - return errors.New("at least one label pair required") - } - if err := a.Annotations.Validate(); err != nil { - return fmt.Errorf("invalid annotations: %w", err) - } - return nil -} - -// Alert is a list of alerts that can be sorted in chronological order. -type Alerts []*Alert - -func (as Alerts) Len() int { return len(as) } -func (as Alerts) Swap(i, j int) { as[i], as[j] = as[j], as[i] } - -func (as Alerts) Less(i, j int) bool { - if as[i].StartsAt.Before(as[j].StartsAt) { - return true - } - if as[i].EndsAt.Before(as[j].EndsAt) { - return true - } - return as[i].Fingerprint() < as[j].Fingerprint() -} - -// HasFiring returns true iff one of the alerts is not resolved. -func (as Alerts) HasFiring() bool { - for _, a := range as { - if !a.Resolved() { - return true - } - } - return false -} - -// HasFiringAt returns true iff one of the alerts is not resolved -// at the time ts. -func (as Alerts) HasFiringAt(ts time.Time) bool { - for _, a := range as { - if !a.ResolvedAt(ts) { - return true - } - } - return false -} - -// Status returns StatusFiring iff at least one of the alerts is firing. -func (as Alerts) Status() AlertStatus { - if as.HasFiring() { - return AlertFiring - } - return AlertResolved -} - -// StatusAt returns StatusFiring iff at least one of the alerts is firing -// at the time ts. -func (as Alerts) StatusAt(ts time.Time) AlertStatus { - if as.HasFiringAt(ts) { - return AlertFiring - } - return AlertResolved -} diff --git a/vendor/github.com/prometheus/common/model/fingerprinting.go b/vendor/github.com/prometheus/common/model/fingerprinting.go deleted file mode 100644 index fc4de4106..000000000 --- a/vendor/github.com/prometheus/common/model/fingerprinting.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "fmt" - "strconv" -) - -// Fingerprint provides a hash-capable representation of a Metric. -// For our purposes, FNV-1A 64-bit is used. -type Fingerprint uint64 - -// FingerprintFromString transforms a string representation into a Fingerprint. -func FingerprintFromString(s string) (Fingerprint, error) { - num, err := strconv.ParseUint(s, 16, 64) - return Fingerprint(num), err -} - -// ParseFingerprint parses the input string into a fingerprint. -func ParseFingerprint(s string) (Fingerprint, error) { - num, err := strconv.ParseUint(s, 16, 64) - if err != nil { - return 0, err - } - return Fingerprint(num), nil -} - -func (f Fingerprint) String() string { - return fmt.Sprintf("%016x", uint64(f)) -} - -// Fingerprints represents a collection of Fingerprint subject to a given -// natural sorting scheme. It implements sort.Interface. -type Fingerprints []Fingerprint - -// Len implements sort.Interface. -func (f Fingerprints) Len() int { - return len(f) -} - -// Less implements sort.Interface. -func (f Fingerprints) Less(i, j int) bool { - return f[i] < f[j] -} - -// Swap implements sort.Interface. -func (f Fingerprints) Swap(i, j int) { - f[i], f[j] = f[j], f[i] -} - -// FingerprintSet is a set of Fingerprints. -type FingerprintSet map[Fingerprint]struct{} - -// Equal returns true if both sets contain the same elements (and not more). -func (s FingerprintSet) Equal(o FingerprintSet) bool { - if len(s) != len(o) { - return false - } - - for k := range s { - if _, ok := o[k]; !ok { - return false - } - } - - return true -} - -// Intersection returns the elements contained in both sets. -func (s FingerprintSet) Intersection(o FingerprintSet) FingerprintSet { - myLength, otherLength := len(s), len(o) - if myLength == 0 || otherLength == 0 { - return FingerprintSet{} - } - - subSet := s - superSet := o - - if otherLength < myLength { - subSet = o - superSet = s - } - - out := FingerprintSet{} - - for k := range subSet { - if _, ok := superSet[k]; ok { - out[k] = struct{}{} - } - } - - return out -} diff --git a/vendor/github.com/prometheus/common/model/fnv.go b/vendor/github.com/prometheus/common/model/fnv.go deleted file mode 100644 index 367afecd3..000000000 --- a/vendor/github.com/prometheus/common/model/fnv.go +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2015 The Prometheus 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 model - -// Inline and byte-free variant of hash/fnv's fnv64a. - -const ( - offset64 = 14695981039346656037 - prime64 = 1099511628211 -) - -// hashNew initializes a new fnv64a hash value. -func hashNew() uint64 { - return offset64 -} - -// hashAdd adds a string to a fnv64a hash value, returning the updated hash. -func hashAdd(h uint64, s string) uint64 { - for i := 0; i < len(s); i++ { - h ^= uint64(s[i]) - h *= prime64 - } - return h -} - -// hashAddByte adds a byte to a fnv64a hash value, returning the updated hash. -func hashAddByte(h uint64, b byte) uint64 { - h ^= uint64(b) - h *= prime64 - return h -} diff --git a/vendor/github.com/prometheus/common/model/labels.go b/vendor/github.com/prometheus/common/model/labels.go deleted file mode 100644 index 29688a13c..000000000 --- a/vendor/github.com/prometheus/common/model/labels.go +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "regexp" - "strings" - "unicode/utf8" -) - -const ( - // AlertNameLabel is the name of the label containing the alert's name. - AlertNameLabel = "alertname" - - // ExportedLabelPrefix is the prefix to prepend to the label names present in - // exported metrics if a label of the same name is added by the server. - ExportedLabelPrefix = "exported_" - - // MetricNameLabel is the label name indicating the metric name of a - // timeseries. - MetricNameLabel = "__name__" - // MetricTypeLabel is the label name indicating the metric type of - // timeseries as per the PROM-39 proposal. - MetricTypeLabel = "__type__" - // MetricUnitLabel is the label name indicating the metric unit of - // timeseries as per the PROM-39 proposal. - MetricUnitLabel = "__unit__" - - // SchemeLabel is the name of the label that holds the scheme on which to - // scrape a target. - SchemeLabel = "__scheme__" - - // AddressLabel is the name of the label that holds the address of - // a scrape target. - AddressLabel = "__address__" - - // MetricsPathLabel is the name of the label that holds the path on which to - // scrape a target. - MetricsPathLabel = "__metrics_path__" - - // ScrapeIntervalLabel is the name of the label that holds the scrape interval - // used to scrape a target. - ScrapeIntervalLabel = "__scrape_interval__" - - // ScrapeTimeoutLabel is the name of the label that holds the scrape - // timeout used to scrape a target. - ScrapeTimeoutLabel = "__scrape_timeout__" - - // ReservedLabelPrefix is a prefix which is not legal in user-supplied - // label names. - ReservedLabelPrefix = "__" - - // MetaLabelPrefix is a prefix for labels that provide meta information. - // Labels with this prefix are used for intermediate label processing and - // will not be attached to time series. - MetaLabelPrefix = "__meta_" - - // TmpLabelPrefix is a prefix for temporary labels as part of relabelling. - // Labels with this prefix are used for intermediate label processing and - // will not be attached to time series. This is reserved for use in - // Prometheus configuration files by users. - TmpLabelPrefix = "__tmp_" - - // ParamLabelPrefix is a prefix for labels that provide URL parameters - // used to scrape a target. - ParamLabelPrefix = "__param_" - - // JobLabel is the label name indicating the job from which a timeseries - // was scraped. - JobLabel = "job" - - // InstanceLabel is the label name used for the instance label. - InstanceLabel = "instance" - - // BucketLabel is used for the label that defines the upper bound of a - // bucket of a histogram ("le" -> "less or equal"). - BucketLabel = "le" - - // QuantileLabel is used for the label that defines the quantile in a - // summary. - QuantileLabel = "quantile" -) - -// LabelNameRE is a regular expression matching valid label names. Note that the -// IsValid method of LabelName performs the same check but faster than a match -// with this regular expression. -var LabelNameRE = regexp.MustCompile("^[a-zA-Z_][a-zA-Z0-9_]*$") - -// A LabelName is a key for a LabelSet or Metric. It has a value associated -// therewith. -type LabelName string - -// IsValid returns true iff the name matches the pattern of LabelNameRE when -// NameValidationScheme is set to LegacyValidation, or valid UTF-8 if -// NameValidationScheme is set to UTF8Validation. -// -// Deprecated: This method should not be used and may be removed in the future. -// Use [ValidationScheme.IsValidLabelName] instead. -func (ln LabelName) IsValid() bool { - return NameValidationScheme.IsValidLabelName(string(ln)) -} - -// IsValidLegacy returns true iff name matches the pattern of LabelNameRE for -// legacy names. It does not use LabelNameRE for the check but a much faster -// hardcoded implementation. -// -// Deprecated: This method should not be used and may be removed in the future. -// Use [LegacyValidation.IsValidLabelName] instead. -func (ln LabelName) IsValidLegacy() bool { - return LegacyValidation.IsValidLabelName(string(ln)) -} - -// UnmarshalYAML implements the yaml.Unmarshaler interface. -func (ln *LabelName) UnmarshalYAML(unmarshal func(any) error) error { - var s string - if err := unmarshal(&s); err != nil { - return err - } - if !LabelName(s).IsValid() { - return fmt.Errorf("%q is not a valid label name", s) - } - *ln = LabelName(s) - return nil -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (ln *LabelName) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - if !LabelName(s).IsValid() { - return fmt.Errorf("%q is not a valid label name", s) - } - *ln = LabelName(s) - return nil -} - -// LabelNames is a sortable LabelName slice. In implements sort.Interface. -type LabelNames []LabelName - -func (l LabelNames) Len() int { - return len(l) -} - -func (l LabelNames) Less(i, j int) bool { - return l[i] < l[j] -} - -func (l LabelNames) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} - -func (l LabelNames) String() string { - labelStrings := make([]string, 0, len(l)) - for _, label := range l { - labelStrings = append(labelStrings, string(label)) - } - return strings.Join(labelStrings, ", ") -} - -// A LabelValue is an associated value for a LabelName. -type LabelValue string - -// IsValid returns true iff the string is a valid UTF-8. -func (lv LabelValue) IsValid() bool { - return utf8.ValidString(string(lv)) -} - -// LabelValues is a sortable LabelValue slice. It implements sort.Interface. -type LabelValues []LabelValue - -func (l LabelValues) Len() int { - return len(l) -} - -func (l LabelValues) Less(i, j int) bool { - return string(l[i]) < string(l[j]) -} - -func (l LabelValues) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} - -// LabelPair pairs a name with a value. -type LabelPair struct { - Name LabelName - Value LabelValue -} - -// LabelPairs is a sortable slice of LabelPair pointers. It implements -// sort.Interface. -type LabelPairs []*LabelPair - -func (l LabelPairs) Len() int { - return len(l) -} - -func (l LabelPairs) Less(i, j int) bool { - switch { - case l[i].Name > l[j].Name: - return false - case l[i].Name < l[j].Name: - return true - case l[i].Value > l[j].Value: - return false - case l[i].Value < l[j].Value: - return true - default: - return false - } -} - -func (l LabelPairs) Swap(i, j int) { - l[i], l[j] = l[j], l[i] -} diff --git a/vendor/github.com/prometheus/common/model/labelset.go b/vendor/github.com/prometheus/common/model/labelset.go deleted file mode 100644 index 6010b26a8..000000000 --- a/vendor/github.com/prometheus/common/model/labelset.go +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "maps" - "sort" -) - -// A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet -// may be fully-qualified down to the point where it may resolve to a single -// Metric in the data store or not. All operations that occur within the realm -// of a LabelSet can emit a vector of Metric entities to which the LabelSet may -// match. -type LabelSet map[LabelName]LabelValue - -// Validate checks whether all names and values in the label set -// are valid. -func (ls LabelSet) Validate() error { - for ln, lv := range ls { - if !ln.IsValid() { - return fmt.Errorf("invalid name %q", ln) - } - if !lv.IsValid() { - return fmt.Errorf("invalid value %q", lv) - } - } - return nil -} - -// Equal returns true iff both label sets have exactly the same key/value pairs. -func (ls LabelSet) Equal(o LabelSet) bool { - if len(ls) != len(o) { - return false - } - for ln, lv := range ls { - olv, ok := o[ln] - if !ok { - return false - } - if olv != lv { - return false - } - } - return true -} - -// Before compares the metrics, using the following criteria: -// -// If m has fewer labels than o, it is before o. If it has more, it is not. -// -// If the number of labels is the same, the superset of all label names is -// sorted alphanumerically. The first differing label pair found in that order -// determines the outcome: If the label does not exist at all in m, then m is -// before o, and vice versa. Otherwise the label value is compared -// alphanumerically. -// -// If m and o are equal, the method returns false. -func (ls LabelSet) Before(o LabelSet) bool { - if len(ls) < len(o) { - return true - } - if len(ls) > len(o) { - return false - } - - lns := make(LabelNames, 0, len(ls)+len(o)) - for ln := range ls { - lns = append(lns, ln) - } - for ln := range o { - lns = append(lns, ln) - } - // It's probably not worth it to de-dup lns. - sort.Sort(lns) - for _, ln := range lns { - mlv, ok := ls[ln] - if !ok { - return true - } - olv, ok := o[ln] - if !ok { - return false - } - if mlv < olv { - return true - } - if mlv > olv { - return false - } - } - return false -} - -// Clone returns a copy of the label set. -func (ls LabelSet) Clone() LabelSet { - lsn := make(LabelSet, len(ls)) - maps.Copy(lsn, ls) - return lsn -} - -// Merge is a helper function to non-destructively merge two label sets. -func (ls LabelSet) Merge(other LabelSet) LabelSet { - result := make(LabelSet, len(ls)) - - maps.Copy(result, ls) - - maps.Copy(result, other) - - return result -} - -// Fingerprint returns the LabelSet's fingerprint. -func (ls LabelSet) Fingerprint() Fingerprint { - return labelSetToFingerprint(ls) -} - -// FastFingerprint returns the LabelSet's Fingerprint calculated by a faster hashing -// algorithm, which is, however, more susceptible to hash collisions. -func (ls LabelSet) FastFingerprint() Fingerprint { - return labelSetToFastFingerprint(ls) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (ls *LabelSet) UnmarshalJSON(b []byte) error { - var m map[LabelName]LabelValue - if err := json.Unmarshal(b, &m); err != nil { - return err - } - // encoding/json only unmarshals maps of the form map[string]T. It treats - // LabelName as a string and does not call its UnmarshalJSON method. - // Thus, we have to replicate the behavior here. - for ln := range m { - if !ln.IsValid() { - return fmt.Errorf("%q is not a valid label name", ln) - } - } - *ls = LabelSet(m) - return nil -} diff --git a/vendor/github.com/prometheus/common/model/labelset_string.go b/vendor/github.com/prometheus/common/model/labelset_string.go deleted file mode 100644 index abb2c9001..000000000 --- a/vendor/github.com/prometheus/common/model/labelset_string.go +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2024 The Prometheus 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 model - -import ( - "bytes" - "slices" - "strconv" -) - -// String will look like `{foo="bar", more="less"}`. Names are sorted alphabetically. -func (l LabelSet) String() string { - var lna [32]string // On stack to avoid memory allocation for sorting names. - labelNames := lna[:0] - for name := range l { - labelNames = append(labelNames, string(name)) - } - slices.Sort(labelNames) - var bytea [1024]byte // On stack to avoid memory allocation while building the output. - b := bytes.NewBuffer(bytea[:0]) - b.WriteByte('{') - for i, name := range labelNames { - if i > 0 { - b.WriteString(", ") - } - b.WriteString(name) - b.WriteByte('=') - b.Write(strconv.AppendQuote(b.AvailableBuffer(), string(l[LabelName(name)]))) - } - b.WriteByte('}') - return b.String() -} diff --git a/vendor/github.com/prometheus/common/model/metadata.go b/vendor/github.com/prometheus/common/model/metadata.go deleted file mode 100644 index 447ab8ad6..000000000 --- a/vendor/github.com/prometheus/common/model/metadata.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2023 The Prometheus 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 model - -// MetricType represents metric type values. -type MetricType string - -const ( - MetricTypeCounter = MetricType("counter") - MetricTypeGauge = MetricType("gauge") - MetricTypeHistogram = MetricType("histogram") - MetricTypeGaugeHistogram = MetricType("gaugehistogram") - MetricTypeSummary = MetricType("summary") - MetricTypeInfo = MetricType("info") - MetricTypeStateset = MetricType("stateset") - MetricTypeUnknown = MetricType("unknown") -) diff --git a/vendor/github.com/prometheus/common/model/metric.go b/vendor/github.com/prometheus/common/model/metric.go deleted file mode 100644 index 2fe461511..000000000 --- a/vendor/github.com/prometheus/common/model/metric.go +++ /dev/null @@ -1,583 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "maps" - "regexp" - "sort" - "strconv" - "strings" - "unicode/utf8" - - dto "github.com/prometheus/client_model/go" - "google.golang.org/protobuf/proto" -) - -var ( - // NameValidationScheme determines the global default method of the name - // validation to be used by all calls to IsValidMetricName() and LabelName - // IsValid(). - // - // Deprecated: This variable should not be used and might be removed in the - // far future. If you wish to stick to the legacy name validation use - // `IsValidLegacyMetricName()` and `LabelName.IsValidLegacy()` methods - // instead. This variable is here as an escape hatch for emergency cases, - // given the recent change from `LegacyValidation` to `UTF8Validation`, e.g., - // to delay UTF-8 migrations in time or aid in debugging unforeseen results of - // the change. In such a case, a temporary assignment to `LegacyValidation` - // value in the `init()` function in your main.go or so, could be considered. - // - // Historically we opted for a global variable for feature gating different - // validation schemes in operations that were not otherwise easily adjustable - // (e.g. Labels yaml unmarshaling). That could have been a mistake, a separate - // Labels structure or package might have been a better choice. Given the - // change was made and many upgraded the common already, we live this as-is - // with this warning and learning for the future. - NameValidationScheme = UTF8Validation - - // NameEscapingScheme defines the default way that names will be escaped when - // presented to systems that do not support UTF-8 names. If the Content-Type - // "escaping" term is specified, that will override this value. - // NameEscapingScheme should not be set to the NoEscaping value. That string - // is used in content negotiation to indicate that a system supports UTF-8 and - // has that feature enabled. - NameEscapingScheme = UnderscoreEscaping -) - -// ValidationScheme is a Go enum for determining how metric and label names will -// be validated by this library. -type ValidationScheme int - -const ( - // UnsetValidation represents an undefined ValidationScheme. - // Should not be used in practice. - UnsetValidation ValidationScheme = iota - - // LegacyValidation is a setting that requires that all metric and label names - // conform to the original Prometheus character requirements described by - // MetricNameRE and LabelNameRE. - LegacyValidation - - // UTF8Validation only requires that metric and label names be valid UTF-8 - // strings. - UTF8Validation -) - -// String returns the string representation of s. -func (s ValidationScheme) String() string { - switch s { - case UnsetValidation: - return "unset" - case LegacyValidation: - return "legacy" - case UTF8Validation: - return "utf8" - default: - panic(fmt.Errorf("unhandled ValidationScheme: %d", s)) - } -} - -// MarshalYAML implements the yaml.Marshaler interface. -func (s ValidationScheme) MarshalYAML() (any, error) { - switch s { - case UnsetValidation: - return "", nil - case LegacyValidation, UTF8Validation: - return s.String(), nil - default: - panic(fmt.Errorf("unhandled ValidationScheme: %d", s)) - } -} - -// UnmarshalYAML implements the yaml.Unmarshaler interface. -func (s *ValidationScheme) UnmarshalYAML(unmarshal func(any) error) error { - var scheme string - if err := unmarshal(&scheme); err != nil { - return err - } - return s.Set(scheme) -} - -// MarshalJSON implements the json.Marshaler interface. -func (s ValidationScheme) MarshalJSON() ([]byte, error) { - switch s { - case UnsetValidation: - return json.Marshal("") - case UTF8Validation, LegacyValidation: - return json.Marshal(s.String()) - default: - return nil, fmt.Errorf("unhandled ValidationScheme: %d", s) - } -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (s *ValidationScheme) UnmarshalJSON(bytes []byte) error { - var repr string - if err := json.Unmarshal(bytes, &repr); err != nil { - return err - } - return s.Set(repr) -} - -// Set implements the pflag.Value interface. -func (s *ValidationScheme) Set(text string) error { - switch text { - case "": - // Don't change the value. - case LegacyValidation.String(): - *s = LegacyValidation - case UTF8Validation.String(): - *s = UTF8Validation - default: - return fmt.Errorf("unrecognized ValidationScheme: %q", text) - } - return nil -} - -// IsValidMetricName returns whether metricName is valid according to s. -func (s ValidationScheme) IsValidMetricName(metricName string) bool { - switch s { - case LegacyValidation: - if len(metricName) == 0 { - return false - } - for i, b := range metricName { - if !isValidLegacyRune(b, i) { - return false - } - } - return true - case UTF8Validation: - if len(metricName) == 0 { - return false - } - return utf8.ValidString(metricName) - default: - panic(fmt.Sprintf("Invalid name validation scheme requested: %s", s.String())) - } -} - -// IsValidLabelName returns whether labelName is valid according to s. -func (s ValidationScheme) IsValidLabelName(labelName string) bool { - switch s { - case LegacyValidation: - if len(labelName) == 0 { - return false - } - for i, b := range labelName { - // TODO: Apply De Morgan's law. Make sure there are tests for this. - if !((b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || (b >= '0' && b <= '9' && i > 0)) { //nolint:staticcheck - return false - } - } - return true - case UTF8Validation: - if len(labelName) == 0 { - return false - } - return utf8.ValidString(labelName) - default: - panic(fmt.Sprintf("Invalid name validation scheme requested: %s", s)) - } -} - -// Type implements the pflag.Value interface. -func (ValidationScheme) Type() string { - return "validationScheme" -} - -type EscapingScheme int - -const ( - // NoEscaping indicates that a name will not be escaped. Unescaped names that - // do not conform to the legacy validity check will use a new exposition - // format syntax that will be officially standardized in future versions. - NoEscaping EscapingScheme = iota - - // UnderscoreEscaping replaces all legacy-invalid characters with underscores. - UnderscoreEscaping - - // DotsEscaping is similar to UnderscoreEscaping, except that dots are - // converted to `_dot_` and pre-existing underscores are converted to `__`. - DotsEscaping - - // ValueEncodingEscaping prepends the name with `U__` and replaces all invalid - // characters with the unicode value, surrounded by underscores. Single - // underscores are replaced with double underscores. - ValueEncodingEscaping -) - -const ( - // EscapingKey is the key in an Accept or Content-Type header that defines how - // metric and label names that do not conform to the legacy character - // requirements should be escaped when being scraped by a legacy prometheus - // system. If a system does not explicitly pass an escaping parameter in the - // Accept header, the default NameEscapingScheme will be used. - EscapingKey = "escaping" - - // Possible values for Escaping Key. - AllowUTF8 = "allow-utf-8" // No escaping required. - EscapeUnderscores = "underscores" - EscapeDots = "dots" - EscapeValues = "values" -) - -// MetricNameRE is a regular expression matching valid metric -// names. Note that the IsValidMetricName function performs the same -// check but faster than a match with this regular expression. -var MetricNameRE = regexp.MustCompile(`^[a-zA-Z_:][a-zA-Z0-9_:]*$`) - -// A Metric is similar to a LabelSet, but the key difference is that a Metric is -// a singleton and refers to one and only one stream of samples. -type Metric LabelSet - -// Equal compares the metrics. -func (m Metric) Equal(o Metric) bool { - return LabelSet(m).Equal(LabelSet(o)) -} - -// Before compares the metrics' underlying label sets. -func (m Metric) Before(o Metric) bool { - return LabelSet(m).Before(LabelSet(o)) -} - -// Clone returns a copy of the Metric. -func (m Metric) Clone() Metric { - clone := make(Metric, len(m)) - maps.Copy(clone, m) - return clone -} - -func (m Metric) String() string { - metricName, hasName := m[MetricNameLabel] - numLabels := len(m) - 1 - if !hasName { - numLabels = len(m) - } - labelStrings := make([]string, 0, numLabels) - for label, value := range m { - if label != MetricNameLabel { - labelStrings = append(labelStrings, fmt.Sprintf("%s=%q", label, value)) - } - } - - switch numLabels { - case 0: - if hasName { - return string(metricName) - } - return "{}" - default: - sort.Strings(labelStrings) - return fmt.Sprintf("%s{%s}", metricName, strings.Join(labelStrings, ", ")) - } -} - -// Fingerprint returns a Metric's Fingerprint. -func (m Metric) Fingerprint() Fingerprint { - return LabelSet(m).Fingerprint() -} - -// FastFingerprint returns a Metric's Fingerprint calculated by a faster hashing -// algorithm, which is, however, more susceptible to hash collisions. -func (m Metric) FastFingerprint() Fingerprint { - return LabelSet(m).FastFingerprint() -} - -// IsValidMetricName returns true iff name matches the pattern of MetricNameRE -// for legacy names, and iff it's valid UTF-8 if the UTF8Validation scheme is -// selected. -// -// Deprecated: This function should not be used and might be removed in the future. -// Use [ValidationScheme.IsValidMetricName] instead. -func IsValidMetricName(n LabelValue) bool { - return NameValidationScheme.IsValidMetricName(string(n)) -} - -// IsValidLegacyMetricName is similar to IsValidMetricName but always uses the -// legacy validation scheme regardless of the value of NameValidationScheme. -// This function, however, does not use MetricNameRE for the check but a much -// faster hardcoded implementation. -// -// Deprecated: This function should not be used and might be removed in the future. -// Use [LegacyValidation.IsValidMetricName] instead. -func IsValidLegacyMetricName(n string) bool { - return LegacyValidation.IsValidMetricName(n) -} - -// EscapeMetricFamily escapes the given metric names and labels with the given -// escaping scheme. Returns a new object that uses the same pointers to fields -// when possible and creates new escaped versions so as not to mutate the -// input. -func EscapeMetricFamily(v *dto.MetricFamily, scheme EscapingScheme) *dto.MetricFamily { - if v == nil { - return nil - } - - if scheme == NoEscaping { - return v - } - - out := &dto.MetricFamily{ - Help: v.Help, - Type: v.Type, - Unit: v.Unit, - } - - // If the name is nil, copy as-is, don't try to escape. - if v.Name == nil || IsValidLegacyMetricName(v.GetName()) { - out.Name = v.Name - } else { - out.Name = proto.String(EscapeName(v.GetName(), scheme)) - } - for _, m := range v.Metric { - if !metricNeedsEscaping(m) { - out.Metric = append(out.Metric, m) - continue - } - - escaped := &dto.Metric{ - Gauge: m.Gauge, - Counter: m.Counter, - Summary: m.Summary, - Untyped: m.Untyped, - Histogram: m.Histogram, - TimestampMs: m.TimestampMs, - } - - for _, l := range m.Label { - if l.GetName() == MetricNameLabel { - if l.Value == nil || IsValidLegacyMetricName(l.GetValue()) { - escaped.Label = append(escaped.Label, l) - continue - } - escaped.Label = append(escaped.Label, &dto.LabelPair{ - Name: proto.String(MetricNameLabel), - Value: proto.String(EscapeName(l.GetValue(), scheme)), - }) - continue - } - if l.Name == nil || IsValidLegacyMetricName(l.GetName()) { - escaped.Label = append(escaped.Label, l) - continue - } - escaped.Label = append(escaped.Label, &dto.LabelPair{ - Name: proto.String(EscapeName(l.GetName(), scheme)), - Value: l.Value, - }) - } - out.Metric = append(out.Metric, escaped) - } - return out -} - -func metricNeedsEscaping(m *dto.Metric) bool { - for _, l := range m.Label { - if l.GetName() == MetricNameLabel && !IsValidLegacyMetricName(l.GetValue()) { - return true - } - if !IsValidLegacyMetricName(l.GetName()) { - return true - } - } - return false -} - -// EscapeName escapes the incoming name according to the provided escaping -// scheme. Depending on the rules of escaping, this may cause no change in the -// string that is returned. (Especially NoEscaping, which by definition is a -// noop). This function does not do any validation of the name. -func EscapeName(name string, scheme EscapingScheme) string { - if len(name) == 0 { - return name - } - var escaped strings.Builder - switch scheme { - case NoEscaping: - return name - case UnderscoreEscaping: - if IsValidLegacyMetricName(name) { - return name - } - for i, b := range name { - if isValidLegacyRune(b, i) { - escaped.WriteRune(b) - } else { - escaped.WriteRune('_') - } - } - return escaped.String() - case DotsEscaping: - // Do not early return for legacy valid names, we still escape underscores. - for i, b := range name { - switch { - case b == '_': - escaped.WriteString("__") - case b == '.': - escaped.WriteString("_dot_") - case isValidLegacyRune(b, i): - escaped.WriteRune(b) - default: - escaped.WriteString("__") - } - } - return escaped.String() - case ValueEncodingEscaping: - if IsValidLegacyMetricName(name) { - return name - } - escaped.WriteString("U__") - for i, b := range name { - switch { - case b == '_': - escaped.WriteString("__") - case isValidLegacyRune(b, i): - escaped.WriteRune(b) - case !utf8.ValidRune(b): - escaped.WriteString("_FFFD_") - default: - escaped.WriteRune('_') - escaped.WriteString(strconv.FormatInt(int64(b), 16)) - escaped.WriteRune('_') - } - } - return escaped.String() - default: - panic(fmt.Sprintf("invalid escaping scheme %d", scheme)) - } -} - -// lower function taken from strconv.atoi. -func lower(c byte) byte { - return c | ('x' - 'X') -} - -// UnescapeName unescapes the incoming name according to the provided escaping -// scheme if possible. Some schemes are partially or totally non-roundtripable. -// If any error is enountered, returns the original input. -func UnescapeName(name string, scheme EscapingScheme) string { - if len(name) == 0 { - return name - } - switch scheme { - case NoEscaping: - return name - case UnderscoreEscaping: - // It is not possible to unescape from underscore replacement. - return name - case DotsEscaping: - name = strings.ReplaceAll(name, "_dot_", ".") - name = strings.ReplaceAll(name, "__", "_") - return name - case ValueEncodingEscaping: - escapedName, found := strings.CutPrefix(name, "U__") - if !found { - return name - } - - var unescaped strings.Builder - TOP: - for i := 0; i < len(escapedName); i++ { - // All non-underscores are treated normally. - if escapedName[i] != '_' { - unescaped.WriteByte(escapedName[i]) - continue - } - i++ - if i >= len(escapedName) { - return name - } - // A double underscore is a single underscore. - if escapedName[i] == '_' { - unescaped.WriteByte('_') - continue - } - // We think we are in a UTF-8 code, process it. - var utf8Val uint - for j := 0; i < len(escapedName); j++ { - // This is too many characters for a utf8 value based on the MaxRune - // value of '\U0010FFFF'. - if j >= 6 { - return name - } - // Found a closing underscore, convert to a rune, check validity, and append. - if escapedName[i] == '_' { - utf8Rune := rune(utf8Val) - if !utf8.ValidRune(utf8Rune) { - return name - } - unescaped.WriteRune(utf8Rune) - continue TOP - } - r := lower(escapedName[i]) - utf8Val *= 16 - switch { - case r >= '0' && r <= '9': - utf8Val += uint(r) - '0' - case r >= 'a' && r <= 'f': - utf8Val += uint(r) - 'a' + 10 - default: - return name - } - i++ - } - // Didn't find closing underscore, invalid. - return name - } - return unescaped.String() - default: - panic(fmt.Sprintf("invalid escaping scheme %d", scheme)) - } -} - -func isValidLegacyRune(b rune, i int) bool { - return (b >= 'a' && b <= 'z') || (b >= 'A' && b <= 'Z') || b == '_' || b == ':' || (b >= '0' && b <= '9' && i > 0) -} - -func (e EscapingScheme) String() string { - switch e { - case NoEscaping: - return AllowUTF8 - case UnderscoreEscaping: - return EscapeUnderscores - case DotsEscaping: - return EscapeDots - case ValueEncodingEscaping: - return EscapeValues - default: - panic(fmt.Sprintf("unknown format scheme %d", e)) - } -} - -func ToEscapingScheme(s string) (EscapingScheme, error) { - if s == "" { - return NoEscaping, errors.New("got empty string instead of escaping scheme") - } - switch s { - case AllowUTF8: - return NoEscaping, nil - case EscapeUnderscores: - return UnderscoreEscaping, nil - case EscapeDots: - return DotsEscaping, nil - case EscapeValues: - return ValueEncodingEscaping, nil - default: - return NoEscaping, fmt.Errorf("unknown format scheme %s", s) - } -} diff --git a/vendor/github.com/prometheus/common/model/model.go b/vendor/github.com/prometheus/common/model/model.go deleted file mode 100644 index a7b969170..000000000 --- a/vendor/github.com/prometheus/common/model/model.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2013 The Prometheus 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 model contains common data structures that are shared across -// Prometheus components and libraries. -package model diff --git a/vendor/github.com/prometheus/common/model/signature.go b/vendor/github.com/prometheus/common/model/signature.go deleted file mode 100644 index dc8a0026c..000000000 --- a/vendor/github.com/prometheus/common/model/signature.go +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright 2014 The Prometheus 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 model - -import ( - "sort" -) - -// SeparatorByte is a byte that cannot occur in valid UTF-8 sequences and is -// used to separate label names, label values, and other strings from each other -// when calculating their combined hash value (aka signature aka fingerprint). -const SeparatorByte byte = 255 - -// cache the signature of an empty label set. -var emptyLabelSignature = hashNew() - -// LabelsToSignature returns a quasi-unique signature (i.e., fingerprint) for a -// given label set. (Collisions are possible but unlikely if the number of label -// sets the function is applied to is small.) -func LabelsToSignature(labels map[string]string) uint64 { - if len(labels) == 0 { - return emptyLabelSignature - } - - labelNames := make([]string, 0, len(labels)) - for labelName := range labels { - labelNames = append(labelNames, labelName) - } - sort.Strings(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, labelName) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, labels[labelName]) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} - -// labelSetToFingerprint works exactly as LabelsToSignature but takes a LabelSet as -// parameter (rather than a label map) and returns a Fingerprint. -func labelSetToFingerprint(ls LabelSet) Fingerprint { - if len(ls) == 0 { - return Fingerprint(emptyLabelSignature) - } - - labelNames := make(LabelNames, 0, len(ls)) - for labelName := range ls { - labelNames = append(labelNames, labelName) - } - sort.Sort(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(ls[labelName])) - sum = hashAddByte(sum, SeparatorByte) - } - return Fingerprint(sum) -} - -// labelSetToFastFingerprint works similar to labelSetToFingerprint but uses a -// faster and less allocation-heavy hash function, which is more susceptible to -// create hash collisions. Therefore, collision detection should be applied. -func labelSetToFastFingerprint(ls LabelSet) Fingerprint { - if len(ls) == 0 { - return Fingerprint(emptyLabelSignature) - } - - var result uint64 - for labelName, labelValue := range ls { - sum := hashNew() - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(labelValue)) - result ^= sum - } - return Fingerprint(result) -} - -// SignatureForLabels works like LabelsToSignature but takes a Metric as -// parameter (rather than a label map) and only includes the labels with the -// specified LabelNames into the signature calculation. The labels passed in -// will be sorted by this function. -func SignatureForLabels(m Metric, labels ...LabelName) uint64 { - if len(labels) == 0 { - return emptyLabelSignature - } - - sort.Sort(LabelNames(labels)) - - sum := hashNew() - for _, label := range labels { - sum = hashAdd(sum, string(label)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(m[label])) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} - -// SignatureWithoutLabels works like LabelsToSignature but takes a Metric as -// parameter (rather than a label map) and excludes the labels with any of the -// specified LabelNames from the signature calculation. -func SignatureWithoutLabels(m Metric, labels map[LabelName]struct{}) uint64 { - if len(m) == 0 { - return emptyLabelSignature - } - - labelNames := make(LabelNames, 0, len(m)) - for labelName := range m { - if _, exclude := labels[labelName]; !exclude { - labelNames = append(labelNames, labelName) - } - } - if len(labelNames) == 0 { - return emptyLabelSignature - } - sort.Sort(labelNames) - - sum := hashNew() - for _, labelName := range labelNames { - sum = hashAdd(sum, string(labelName)) - sum = hashAddByte(sum, SeparatorByte) - sum = hashAdd(sum, string(m[labelName])) - sum = hashAddByte(sum, SeparatorByte) - } - return sum -} diff --git a/vendor/github.com/prometheus/common/model/silence.go b/vendor/github.com/prometheus/common/model/silence.go deleted file mode 100644 index 8f91a9702..000000000 --- a/vendor/github.com/prometheus/common/model/silence.go +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2015 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "regexp" - "time" -) - -// Matcher describes a matches the value of a given label. -type Matcher struct { - Name LabelName `json:"name"` - Value string `json:"value"` - IsRegex bool `json:"isRegex"` -} - -func (m *Matcher) UnmarshalJSON(b []byte) error { - type plain Matcher - if err := json.Unmarshal(b, (*plain)(m)); err != nil { - return err - } - - if len(m.Name) == 0 { - return errors.New("label name in matcher must not be empty") - } - if m.IsRegex { - if _, err := regexp.Compile(m.Value); err != nil { - return err - } - } - return nil -} - -// Validate returns true iff all fields of the matcher have valid values. -func (m *Matcher) Validate() error { - if !m.Name.IsValid() { - return fmt.Errorf("invalid name %q", m.Name) - } - if m.IsRegex { - if _, err := regexp.Compile(m.Value); err != nil { - return fmt.Errorf("invalid regular expression %q", m.Value) - } - } else if !LabelValue(m.Value).IsValid() || len(m.Value) == 0 { - return fmt.Errorf("invalid value %q", m.Value) - } - return nil -} - -// Silence defines the representation of a silence definition in the Prometheus -// eco-system. -type Silence struct { - ID uint64 `json:"id,omitempty"` - - Matchers []*Matcher `json:"matchers"` - - StartsAt time.Time `json:"startsAt"` - EndsAt time.Time `json:"endsAt"` - - CreatedAt time.Time `json:"createdAt,omitempty"` - CreatedBy string `json:"createdBy"` - Comment string `json:"comment,omitempty"` -} - -// Validate returns true iff all fields of the silence have valid values. -func (s *Silence) Validate() error { - if len(s.Matchers) == 0 { - return errors.New("at least one matcher required") - } - for _, m := range s.Matchers { - if err := m.Validate(); err != nil { - return fmt.Errorf("invalid matcher: %w", err) - } - } - if s.StartsAt.IsZero() { - return errors.New("start time missing") - } - if s.EndsAt.IsZero() { - return errors.New("end time missing") - } - if s.EndsAt.Before(s.StartsAt) { - return errors.New("start time must be before end time") - } - if s.CreatedBy == "" { - return errors.New("creator information missing") - } - if s.Comment == "" { - return errors.New("comment missing") - } - if s.CreatedAt.IsZero() { - return errors.New("creation timestamp missing") - } - return nil -} diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go deleted file mode 100644 index 0854753f4..000000000 --- a/vendor/github.com/prometheus/common/model/time.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "strconv" - "strings" - "time" -) - -const ( - // MinimumTick is the minimum supported time resolution. This has to be - // at least time.Second in order for the code below to work. - minimumTick = time.Millisecond - // second is the Time duration equivalent to one second. - second = int64(time.Second / minimumTick) - // The number of nanoseconds per minimum tick. - nanosPerTick = int64(minimumTick / time.Nanosecond) - - // Earliest is the earliest Time representable. Handy for - // initializing a high watermark. - Earliest = Time(math.MinInt64) - // Latest is the latest Time representable. Handy for initializing - // a low watermark. - Latest = Time(math.MaxInt64) -) - -// Time is the number of milliseconds since the epoch -// (1970-01-01 00:00 UTC) excluding leap seconds. -type Time int64 - -// Interval describes an interval between two timestamps. -type Interval struct { - Start, End Time -} - -// Now returns the current time as a Time. -func Now() Time { - return TimeFromUnixNano(time.Now().UnixNano()) -} - -// TimeFromUnix returns the Time equivalent to the Unix Time t -// provided in seconds. -func TimeFromUnix(t int64) Time { - return Time(t * second) -} - -// TimeFromUnixNano returns the Time equivalent to the Unix Time -// t provided in nanoseconds. -func TimeFromUnixNano(t int64) Time { - return Time(t / nanosPerTick) -} - -// Equal reports whether two Times represent the same instant. -func (t Time) Equal(o Time) bool { - return t == o -} - -// Before reports whether the Time t is before o. -func (t Time) Before(o Time) bool { - return t < o -} - -// After reports whether the Time t is after o. -func (t Time) After(o Time) bool { - return t > o -} - -// Add returns the Time t + d. -func (t Time) Add(d time.Duration) Time { - return t + Time(d/minimumTick) -} - -// Sub returns the Duration t - o. -func (t Time) Sub(o Time) time.Duration { - return time.Duration(t-o) * minimumTick -} - -// Time returns the time.Time representation of t. -func (t Time) Time() time.Time { - return time.Unix(int64(t)/second, (int64(t)%second)*nanosPerTick) -} - -// Unix returns t as a Unix time, the number of seconds elapsed -// since January 1, 1970 UTC. -func (t Time) Unix() int64 { - return int64(t) / second -} - -// UnixNano returns t as a Unix time, the number of nanoseconds elapsed -// since January 1, 1970 UTC. -func (t Time) UnixNano() int64 { - return int64(t) * nanosPerTick -} - -// The number of digits after the dot. -var dotPrecision = int(math.Log10(float64(second))) - -// String returns a string representation of the Time. -func (t Time) String() string { - return strconv.FormatFloat(float64(t)/float64(second), 'f', -1, 64) -} - -// MarshalJSON implements the json.Marshaler interface. -func (t Time) MarshalJSON() ([]byte, error) { - return []byte(t.String()), nil -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (t *Time) UnmarshalJSON(b []byte) error { - base, frac, found := strings.Cut(string(b), ".") - if !found { - v, err := strconv.ParseInt(base, 10, 64) - if err != nil { - return err - } - *t = Time(v * second) - } else { - v, err := strconv.ParseInt(base, 10, 64) - if err != nil { - return err - } - - prec := dotPrecision - len(frac) - if prec < 0 { - frac = frac[:dotPrecision] - } - va, err := strconv.ParseInt(frac, 10, 32) - if err != nil { - return err - } - switch prec { - case 1: - va *= 10 - case 2: - va *= 100 - } - - if len(base) > 0 && base[0] == '-' { - va = -va - } - *t = Time(v*second + va) - } - return nil -} - -// Duration wraps time.Duration. It is used to parse the custom duration format -// from YAML. -// This type should not propagate beyond the scope of input/output processing. -type Duration time.Duration - -// Set implements pflag/flag.Value. -func (d *Duration) Set(s string) error { - var err error - *d, err = ParseDuration(s) - return err -} - -// Type implements pflag.Value. -func (*Duration) Type() string { - return "duration" -} - -func isdigit(c byte) bool { return c >= '0' && c <= '9' } - -// Units are required to go in order from biggest to smallest. -// This guards against confusion from "1m1d" being 1 minute + 1 day, not 1 month + 1 day. -var unitMap = map[string]struct { - pos int - mult uint64 -}{ - "ms": {7, uint64(time.Millisecond)}, - "s": {6, uint64(time.Second)}, - "m": {5, uint64(time.Minute)}, - "h": {4, uint64(time.Hour)}, - "d": {3, uint64(24 * time.Hour)}, - "w": {2, uint64(7 * 24 * time.Hour)}, - "y": {1, uint64(365 * 24 * time.Hour)}, -} - -// ParseDuration parses a string into a time.Duration, assuming that a year -// always has 365d, a week always has 7d, and a day always has 24h. -// Negative durations are not supported. -func ParseDuration(s string) (Duration, error) { - switch s { - case "0": - // Allow 0 without a unit. - return 0, nil - case "": - return 0, errors.New("empty duration string") - } - - orig := s - var dur uint64 - lastUnitPos := 0 - - for s != "" { - if !isdigit(s[0]) { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - // Consume [0-9]* - i := 0 - for ; i < len(s) && isdigit(s[i]); i++ { - } - v, err := strconv.ParseUint(s[:i], 10, 0) - if err != nil { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - s = s[i:] - - // Consume unit. - for i = 0; i < len(s) && !isdigit(s[i]); i++ { - } - if i == 0 { - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - u := s[:i] - s = s[i:] - unit, ok := unitMap[u] - if !ok { - return 0, fmt.Errorf("unknown unit %q in duration %q", u, orig) - } - if unit.pos <= lastUnitPos { // Units must go in order from biggest to smallest. - return 0, fmt.Errorf("not a valid duration string: %q", orig) - } - lastUnitPos = unit.pos - // Check if the provided duration overflows time.Duration (> ~ 290years). - if v > 1<<63/unit.mult { - return 0, errors.New("duration out of range") - } - dur += v * unit.mult - if dur > 1<<63-1 { - return 0, errors.New("duration out of range") - } - } - - return Duration(dur), nil -} - -// ParseDurationAllowNegative is like ParseDuration but also accepts negative durations. -func ParseDurationAllowNegative(s string) (Duration, error) { - if s == "" || s[0] != '-' { - return ParseDuration(s) - } - - d, err := ParseDuration(s[1:]) - - return -d, err -} - -func (d Duration) String() string { - var ( - ms = int64(time.Duration(d) / time.Millisecond) - r = "" - sign = "" - ) - - if ms == 0 { - return "0s" - } - - if ms < 0 { - sign, ms = "-", -ms - } - - f := func(unit string, mult int64, exact bool) { - if exact && ms%mult != 0 { - return - } - if v := ms / mult; v > 0 { - r += fmt.Sprintf("%d%s", v, unit) - ms -= v * mult - } - } - - // Only format years and weeks if the remainder is zero, as it is often - // easier to read 90d than 12w6d. - f("y", 1000*60*60*24*365, true) - f("w", 1000*60*60*24*7, true) - - f("d", 1000*60*60*24, false) - f("h", 1000*60*60, false) - f("m", 1000*60, false) - f("s", 1000, false) - f("ms", 1, false) - - return sign + r -} - -// MarshalJSON implements the json.Marshaler interface. -func (d Duration) MarshalJSON() ([]byte, error) { - return json.Marshal(d.String()) -} - -// UnmarshalJSON implements the json.Unmarshaler interface. -func (d *Duration) UnmarshalJSON(bytes []byte) error { - var s string - if err := json.Unmarshal(bytes, &s); err != nil { - return err - } - dur, err := ParseDuration(s) - if err != nil { - return err - } - *d = dur - return nil -} - -// MarshalText implements the encoding.TextMarshaler interface. -func (d *Duration) MarshalText() ([]byte, error) { - return []byte(d.String()), nil -} - -// UnmarshalText implements the encoding.TextUnmarshaler interface. -func (d *Duration) UnmarshalText(text []byte) error { - var err error - *d, err = ParseDuration(string(text)) - return err -} - -// MarshalYAML implements the yaml.Marshaler interface. -func (d Duration) MarshalYAML() (any, error) { - return d.String(), nil -} - -// UnmarshalYAML implements the yaml.Unmarshaler interface. -func (d *Duration) UnmarshalYAML(unmarshal func(any) error) error { - var s string - if err := unmarshal(&s); err != nil { - return err - } - dur, err := ParseDuration(s) - if err != nil { - return err - } - *d = dur - return nil -} diff --git a/vendor/github.com/prometheus/common/model/value.go b/vendor/github.com/prometheus/common/model/value.go deleted file mode 100644 index 8dffd9c4a..000000000 --- a/vendor/github.com/prometheus/common/model/value.go +++ /dev/null @@ -1,365 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" - "sort" - "strconv" - "strings" -) - -// ZeroSample is the pseudo zero-value of Sample used to signal a -// non-existing sample. It is a Sample with timestamp Earliest, value 0.0, -// and metric nil. Note that the natural zero value of Sample has a timestamp -// of 0, which is possible to appear in a real Sample and thus not suitable -// to signal a non-existing Sample. -var ZeroSample = Sample{Timestamp: Earliest} - -// Sample is a sample pair associated with a metric. A single sample must either -// define Value or Histogram but not both. Histogram == nil implies the Value -// field is used, otherwise it should be ignored. -type Sample struct { - Metric Metric `json:"metric"` - Value SampleValue `json:"value"` - Timestamp Time `json:"timestamp"` - Histogram *SampleHistogram `json:"histogram"` -} - -// Equal compares first the metrics, then the timestamp, then the value. The -// semantics of value equality is defined by SampleValue.Equal. -func (s *Sample) Equal(o *Sample) bool { - if s == o { - return true - } - - if !s.Metric.Equal(o.Metric) { - return false - } - if !s.Timestamp.Equal(o.Timestamp) { - return false - } - if s.Histogram != nil { - return s.Histogram.Equal(o.Histogram) - } - return s.Value.Equal(o.Value) -} - -func (s Sample) String() string { - if s.Histogram != nil { - return fmt.Sprintf("%s => %s", s.Metric, SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }) - } - return fmt.Sprintf("%s => %s", s.Metric, SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }) -} - -// MarshalJSON implements json.Marshaler. -func (s Sample) MarshalJSON() ([]byte, error) { - if s.Histogram != nil { - v := struct { - Metric Metric `json:"metric"` - Histogram SampleHistogramPair `json:"histogram"` - }{ - Metric: s.Metric, - Histogram: SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }, - } - return json.Marshal(&v) - } - v := struct { - Metric Metric `json:"metric"` - Value SamplePair `json:"value"` - }{ - Metric: s.Metric, - Value: SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }, - } - return json.Marshal(&v) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *Sample) UnmarshalJSON(b []byte) error { - v := struct { - Metric Metric `json:"metric"` - Value SamplePair `json:"value"` - Histogram SampleHistogramPair `json:"histogram"` - }{ - Metric: s.Metric, - Value: SamplePair{ - Timestamp: s.Timestamp, - Value: s.Value, - }, - Histogram: SampleHistogramPair{ - Timestamp: s.Timestamp, - Histogram: s.Histogram, - }, - } - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - s.Metric = v.Metric - if v.Histogram.Histogram != nil { - s.Timestamp = v.Histogram.Timestamp - s.Histogram = v.Histogram.Histogram - } else { - s.Timestamp = v.Value.Timestamp - s.Value = v.Value.Value - } - - return nil -} - -// Samples is a sortable Sample slice. It implements sort.Interface. -type Samples []*Sample - -func (s Samples) Len() int { - return len(s) -} - -// Less compares first the metrics, then the timestamp. -func (s Samples) Less(i, j int) bool { - switch { - case s[i].Metric.Before(s[j].Metric): - return true - case s[j].Metric.Before(s[i].Metric): - return false - case s[i].Timestamp.Before(s[j].Timestamp): - return true - default: - return false - } -} - -func (s Samples) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -// Equal compares two sets of samples and returns true if they are equal. -func (s Samples) Equal(o Samples) bool { - if len(s) != len(o) { - return false - } - - for i, sample := range s { - if !sample.Equal(o[i]) { - return false - } - } - return true -} - -// SampleStream is a stream of Values belonging to an attached COWMetric. -type SampleStream struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` -} - -func (ss SampleStream) String() string { - valuesLength := len(ss.Values) - vals := make([]string, valuesLength+len(ss.Histograms)) - for i, v := range ss.Values { - vals[i] = v.String() - } - for i, v := range ss.Histograms { - vals[i+valuesLength] = v.String() - } - return fmt.Sprintf("%s =>\n%s", ss.Metric, strings.Join(vals, "\n")) -} - -func (ss SampleStream) MarshalJSON() ([]byte, error) { - switch { - case len(ss.Histograms) > 0 && len(ss.Values) > 0: - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Values: ss.Values, - Histograms: ss.Histograms, - } - return json.Marshal(&v) - case len(ss.Histograms) > 0: - v := struct { - Metric Metric `json:"metric"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Histograms: ss.Histograms, - } - return json.Marshal(&v) - default: - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - }{ - Metric: ss.Metric, - Values: ss.Values, - } - return json.Marshal(&v) - } -} - -func (ss *SampleStream) UnmarshalJSON(b []byte) error { - v := struct { - Metric Metric `json:"metric"` - Values []SamplePair `json:"values"` - Histograms []SampleHistogramPair `json:"histograms"` - }{ - Metric: ss.Metric, - Values: ss.Values, - Histograms: ss.Histograms, - } - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - ss.Metric = v.Metric - ss.Values = v.Values - ss.Histograms = v.Histograms - - return nil -} - -// Scalar is a scalar value evaluated at the set timestamp. -type Scalar struct { - Value SampleValue `json:"value"` - Timestamp Time `json:"timestamp"` -} - -func (s Scalar) String() string { - return fmt.Sprintf("scalar: %v @[%v]", s.Value, s.Timestamp) -} - -// MarshalJSON implements json.Marshaler. -func (s Scalar) MarshalJSON() ([]byte, error) { - v := strconv.FormatFloat(float64(s.Value), 'f', -1, 64) - return json.Marshal([...]any{s.Timestamp, v}) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *Scalar) UnmarshalJSON(b []byte) error { - var f string - v := [...]any{&s.Timestamp, &f} - - if err := json.Unmarshal(b, &v); err != nil { - return err - } - - value, err := strconv.ParseFloat(f, 64) - if err != nil { - return fmt.Errorf("error parsing sample value: %w", err) - } - s.Value = SampleValue(value) - return nil -} - -// String is a string value evaluated at the set timestamp. -type String struct { - Value string `json:"value"` - Timestamp Time `json:"timestamp"` -} - -func (s *String) String() string { - return s.Value -} - -// MarshalJSON implements json.Marshaler. -func (s String) MarshalJSON() ([]byte, error) { - return json.Marshal([]any{s.Timestamp, s.Value}) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *String) UnmarshalJSON(b []byte) error { - v := [...]any{&s.Timestamp, &s.Value} - return json.Unmarshal(b, &v) -} - -// Vector is basically only an alias for Samples, but the -// contract is that in a Vector, all Samples have the same timestamp. -type Vector []*Sample - -func (vec Vector) String() string { - entries := make([]string, len(vec)) - for i, s := range vec { - entries[i] = s.String() - } - return strings.Join(entries, "\n") -} - -func (vec Vector) Len() int { return len(vec) } -func (vec Vector) Swap(i, j int) { vec[i], vec[j] = vec[j], vec[i] } - -// Less compares first the metrics, then the timestamp. -func (vec Vector) Less(i, j int) bool { - switch { - case vec[i].Metric.Before(vec[j].Metric): - return true - case vec[j].Metric.Before(vec[i].Metric): - return false - case vec[i].Timestamp.Before(vec[j].Timestamp): - return true - default: - return false - } -} - -// Equal compares two sets of samples and returns true if they are equal. -func (vec Vector) Equal(o Vector) bool { - if len(vec) != len(o) { - return false - } - - for i, sample := range vec { - if !sample.Equal(o[i]) { - return false - } - } - return true -} - -// Matrix is a list of time series. -type Matrix []*SampleStream - -func (m Matrix) Len() int { return len(m) } -func (m Matrix) Less(i, j int) bool { return m[i].Metric.Before(m[j].Metric) } -func (m Matrix) Swap(i, j int) { m[i], m[j] = m[j], m[i] } - -func (m Matrix) String() string { - matCp := make(Matrix, len(m)) - copy(matCp, m) - sort.Sort(matCp) - - strs := make([]string, len(matCp)) - - for i, ss := range matCp { - strs[i] = ss.String() - } - - return strings.Join(strs, "\n") -} diff --git a/vendor/github.com/prometheus/common/model/value_float.go b/vendor/github.com/prometheus/common/model/value_float.go deleted file mode 100644 index b7d93615e..000000000 --- a/vendor/github.com/prometheus/common/model/value_float.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "math" - "strconv" -) - -// ZeroSamplePair is the pseudo zero-value of SamplePair used to signal a -// non-existing sample pair. It is a SamplePair with timestamp Earliest and -// value 0.0. Note that the natural zero value of SamplePair has a timestamp -// of 0, which is possible to appear in a real SamplePair and thus not -// suitable to signal a non-existing SamplePair. -var ZeroSamplePair = SamplePair{Timestamp: Earliest} - -// A SampleValue is a representation of a value for a given sample at a given -// time. -type SampleValue float64 - -// MarshalJSON implements json.Marshaler. -func (v SampleValue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -// UnmarshalJSON implements json.Unmarshaler. -func (v *SampleValue) UnmarshalJSON(b []byte) error { - if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return errors.New("sample value must be a quoted string") - } - f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) - if err != nil { - return err - } - *v = SampleValue(f) - return nil -} - -// Equal returns true if the value of v and o is equal or if both are NaN. Note -// that v==o is false if both are NaN. If you want the conventional float -// behavior, use == to compare two SampleValues. -func (v SampleValue) Equal(o SampleValue) bool { - if v == o { - return true - } - return math.IsNaN(float64(v)) && math.IsNaN(float64(o)) -} - -func (v SampleValue) String() string { - return strconv.FormatFloat(float64(v), 'f', -1, 64) -} - -// SamplePair pairs a SampleValue with a Timestamp. -type SamplePair struct { - Timestamp Time - Value SampleValue -} - -func (s SamplePair) MarshalJSON() ([]byte, error) { - t, err := json.Marshal(s.Timestamp) - if err != nil { - return nil, err - } - v, err := json.Marshal(s.Value) - if err != nil { - return nil, err - } - return fmt.Appendf(nil, "[%s,%s]", t, v), nil -} - -// UnmarshalJSON implements json.Unmarshaler. -func (s *SamplePair) UnmarshalJSON(b []byte) error { - v := [...]json.Unmarshaler{&s.Timestamp, &s.Value} - return json.Unmarshal(b, &v) -} - -// Equal returns true if this SamplePair and o have equal Values and equal -// Timestamps. The semantics of Value equality is defined by SampleValue.Equal. -func (s *SamplePair) Equal(o *SamplePair) bool { - return s == o || (s.Value.Equal(o.Value) && s.Timestamp.Equal(o.Timestamp)) -} - -func (s SamplePair) String() string { - return fmt.Sprintf("%s @[%s]", s.Value, s.Timestamp) -} diff --git a/vendor/github.com/prometheus/common/model/value_histogram.go b/vendor/github.com/prometheus/common/model/value_histogram.go deleted file mode 100644 index f27856ccc..000000000 --- a/vendor/github.com/prometheus/common/model/value_histogram.go +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "errors" - "fmt" - "strconv" - "strings" -) - -type FloatString float64 - -func (v FloatString) String() string { - return strconv.FormatFloat(float64(v), 'f', -1, 64) -} - -func (v FloatString) MarshalJSON() ([]byte, error) { - return json.Marshal(v.String()) -} - -func (v *FloatString) UnmarshalJSON(b []byte) error { - if len(b) < 2 || b[0] != '"' || b[len(b)-1] != '"' { - return errors.New("float value must be a quoted string") - } - f, err := strconv.ParseFloat(string(b[1:len(b)-1]), 64) - if err != nil { - return err - } - *v = FloatString(f) - return nil -} - -type HistogramBucket struct { - Boundaries int32 - Lower FloatString - Upper FloatString - Count FloatString -} - -func (s HistogramBucket) MarshalJSON() ([]byte, error) { - b, err := json.Marshal(s.Boundaries) - if err != nil { - return nil, err - } - l, err := json.Marshal(s.Lower) - if err != nil { - return nil, err - } - u, err := json.Marshal(s.Upper) - if err != nil { - return nil, err - } - c, err := json.Marshal(s.Count) - if err != nil { - return nil, err - } - return fmt.Appendf(nil, "[%s,%s,%s,%s]", b, l, u, c), nil -} - -func (s *HistogramBucket) UnmarshalJSON(buf []byte) error { - tmp := []any{&s.Boundaries, &s.Lower, &s.Upper, &s.Count} - wantLen := len(tmp) - if err := json.Unmarshal(buf, &tmp); err != nil { - return err - } - if gotLen := len(tmp); gotLen != wantLen { - return fmt.Errorf("wrong number of fields: %d != %d", gotLen, wantLen) - } - return nil -} - -func (s *HistogramBucket) Equal(o *HistogramBucket) bool { - return s == o || (s.Boundaries == o.Boundaries && s.Lower == o.Lower && s.Upper == o.Upper && s.Count == o.Count) -} - -func (s HistogramBucket) String() string { - var sb strings.Builder - lowerInclusive := s.Boundaries == 1 || s.Boundaries == 3 - upperInclusive := s.Boundaries == 0 || s.Boundaries == 3 - if lowerInclusive { - sb.WriteRune('[') - } else { - sb.WriteRune('(') - } - fmt.Fprintf(&sb, "%g,%g", s.Lower, s.Upper) - if upperInclusive { - sb.WriteRune(']') - } else { - sb.WriteRune(')') - } - fmt.Fprintf(&sb, ":%v", s.Count) - return sb.String() -} - -type HistogramBuckets []*HistogramBucket - -func (s HistogramBuckets) Equal(o HistogramBuckets) bool { - if len(s) != len(o) { - return false - } - - for i, bucket := range s { - if !bucket.Equal(o[i]) { - return false - } - } - return true -} - -type SampleHistogram struct { - Count FloatString `json:"count"` - Sum FloatString `json:"sum"` - Buckets HistogramBuckets `json:"buckets"` -} - -func (s SampleHistogram) String() string { - return fmt.Sprintf("Count: %f, Sum: %f, Buckets: %v", s.Count, s.Sum, s.Buckets) -} - -func (s *SampleHistogram) Equal(o *SampleHistogram) bool { - return s == o || (s.Count == o.Count && s.Sum == o.Sum && s.Buckets.Equal(o.Buckets)) -} - -type SampleHistogramPair struct { - Timestamp Time - // Histogram should never be nil, it's only stored as pointer for efficiency. - Histogram *SampleHistogram -} - -func (s SampleHistogramPair) MarshalJSON() ([]byte, error) { - if s.Histogram == nil { - return nil, errors.New("histogram is nil") - } - t, err := json.Marshal(s.Timestamp) - if err != nil { - return nil, err - } - v, err := json.Marshal(s.Histogram) - if err != nil { - return nil, err - } - return fmt.Appendf(nil, "[%s,%s]", t, v), nil -} - -func (s *SampleHistogramPair) UnmarshalJSON(buf []byte) error { - tmp := []any{&s.Timestamp, &s.Histogram} - wantLen := len(tmp) - if err := json.Unmarshal(buf, &tmp); err != nil { - return err - } - if gotLen := len(tmp); gotLen != wantLen { - return fmt.Errorf("wrong number of fields: %d != %d", gotLen, wantLen) - } - if s.Histogram == nil { - return errors.New("histogram is null") - } - return nil -} - -func (s SampleHistogramPair) String() string { - return fmt.Sprintf("%s @[%s]", s.Histogram, s.Timestamp) -} - -func (s *SampleHistogramPair) Equal(o *SampleHistogramPair) bool { - return s == o || (s.Histogram.Equal(o.Histogram) && s.Timestamp.Equal(o.Timestamp)) -} diff --git a/vendor/github.com/prometheus/common/model/value_type.go b/vendor/github.com/prometheus/common/model/value_type.go deleted file mode 100644 index 078910f46..000000000 --- a/vendor/github.com/prometheus/common/model/value_type.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2013 The Prometheus 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 model - -import ( - "encoding/json" - "fmt" -) - -// Value is a generic interface for values resulting from a query evaluation. -type Value interface { - Type() ValueType - String() string -} - -func (Matrix) Type() ValueType { return ValMatrix } -func (Vector) Type() ValueType { return ValVector } -func (*Scalar) Type() ValueType { return ValScalar } -func (*String) Type() ValueType { return ValString } - -type ValueType int - -const ( - ValNone ValueType = iota - ValScalar - ValVector - ValMatrix - ValString -) - -// MarshalJSON implements json.Marshaler. -func (et ValueType) MarshalJSON() ([]byte, error) { - return json.Marshal(et.String()) -} - -func (et *ValueType) UnmarshalJSON(b []byte) error { - var s string - if err := json.Unmarshal(b, &s); err != nil { - return err - } - switch s { - case "": - *et = ValNone - case "scalar": - *et = ValScalar - case "vector": - *et = ValVector - case "matrix": - *et = ValMatrix - case "string": - *et = ValString - default: - return fmt.Errorf("unknown value type %q", s) - } - return nil -} - -func (et ValueType) String() string { - switch et { - case ValNone: - return "" - case ValScalar: - return "scalar" - case ValVector: - return "vector" - case ValMatrix: - return "matrix" - case ValString: - return "string" - } - panic("ValueType.String: unhandled value type") -} diff --git a/vendor/github.com/prometheus/procfs/.gitignore b/vendor/github.com/prometheus/procfs/.gitignore deleted file mode 100644 index 7cc33ae4a..000000000 --- a/vendor/github.com/prometheus/procfs/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/testdata/fixtures/ -/fixtures diff --git a/vendor/github.com/prometheus/procfs/.golangci.yml b/vendor/github.com/prometheus/procfs/.golangci.yml deleted file mode 100644 index eac920ba8..000000000 --- a/vendor/github.com/prometheus/procfs/.golangci.yml +++ /dev/null @@ -1,59 +0,0 @@ -version: "2" -linters: - enable: - - errorlint - - forbidigo - - gocritic - - godot - - misspell - - revive - - testifylint - settings: - forbidigo: - forbid: - - pattern: ^fmt\.Print.*$ - msg: Do not commit print statements. - gocritic: - enable-all: true - disabled-checks: - - commentFormatting - - commentedOutCode - - deferInLoop - - filepathJoin - - hugeParam - - importShadow - - paramTypeCombine - - rangeValCopy - - tooManyResultsChecker - - unnamedResult - - whyNoLint - godot: - exclude: - # Ignore "See: URL". - - 'See:' - capital: true - misspell: - locale: US - revive: - rules: - - name: var-naming - # TODO(SuperQ): See: https://github.com/prometheus/prometheus/issues/17766 - arguments: - - [] - - [] - - - skip-package-name-checks: true - exclusions: - presets: - - comments - - common-false-positives - - legacy - - std-error-handling - warn-unused: true -formatters: - enable: - - gofmt - - goimports - settings: - goimports: - local-prefixes: - - github.com/prometheus/procfs diff --git a/vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md b/vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md deleted file mode 100644 index d325872bd..000000000 --- a/vendor/github.com/prometheus/procfs/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,3 +0,0 @@ -# Prometheus Community Code of Conduct - -Prometheus follows the [CNCF Code of Conduct](https://github.com/cncf/foundation/blob/main/code-of-conduct.md). diff --git a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md deleted file mode 100644 index 853eb9d49..000000000 --- a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md +++ /dev/null @@ -1,121 +0,0 @@ -# Contributing - -Prometheus uses GitHub to manage reviews of pull requests. - -* If you are a new contributor see: [Steps to Contribute](#steps-to-contribute) - -* If you have a trivial fix or improvement, go ahead and create a pull request, - addressing (with `@...`) a suitable maintainer of this repository (see - [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. - -* If you plan to do something more involved, first discuss your ideas - on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). - This will avoid unnecessary work and surely give you and us a good deal - of inspiration. Also please see our [non-goals issue](https://github.com/prometheus/docs/issues/149) on areas that the Prometheus community doesn't plan to work on. - -* Relevant coding style guidelines are the [Go Code Review - Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) - and the _Formatting and style_ section of Peter Bourgon's [Go: Best - Practices for Production - Environments](https://peter.bourgon.org/go-in-production/#formatting-and-style). - -* Be sure to sign off on the [DCO](https://github.com/probot/dco#how-it-works) - -## Steps to Contribute - -Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on it. This is to prevent duplicated efforts from contributors on the same issue. - -Please check the [`help-wanted`](https://github.com/prometheus/procfs/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label to find issues that are good for getting started. If you have questions about one of the issues, with or without the tag, please comment on them and one of the maintainers will clarify it. For a quicker response, contact us over [IRC](https://prometheus.io/community). - -For quickly compiling and testing your changes do: -``` -make test # Make sure all the tests pass before you commit and push :) -``` - -We use [`golangci-lint`](https://github.com/golangci/golangci-lint) for linting the code. If it reports an issue and you think that the warning needs to be disregarded or is a false-positive, you can add a special comment `//nolint:linter1[,linter2,...]` before the offending line. Use this sparingly though, fixing the code to comply with the linter's recommendation is in general the preferred course of action. - -## Pull Request Checklist - -* Branch from the master branch and, if needed, rebase to the current master branch before submitting your pull request. If it doesn't merge cleanly with master you may be asked to rebase your changes. - -* Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests). - -* If your patch is not getting reviewed or you need a specific person to review it, you can @-reply a reviewer asking for a review in the pull request or a comment, or you can ask for a review on IRC channel [#prometheus](https://webchat.freenode.net/?channels=#prometheus) on irc.freenode.net (for the easiest start, [join via Riot](https://riot.im/app/#/room/#prometheus:matrix.org)). - -* Add tests relevant to the fixed bug or new feature. - -## Dependency management - -The Prometheus project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.12 or greater installed. - -All dependencies are vendored in the `vendor/` directory. - -To add or update a new dependency, use the `go get` command: - -```bash -# Pick the latest tagged release. -go get example.com/some/module/pkg - -# Pick a specific version. -go get example.com/some/module/pkg@vX.Y.Z -``` - -Tidy up the `go.mod` and `go.sum` files and copy the new/updated dependency to the `vendor/` directory: - - -```bash -# The GO111MODULE variable can be omitted when the code isn't located in GOPATH. -GO111MODULE=on go mod tidy - -GO111MODULE=on go mod vendor -``` - -You have to commit the changes to `go.mod`, `go.sum` and the `vendor/` directory before submitting the pull request. - - -## API Implementation Guidelines - -### Naming and Documentation - -Public functions and structs should normally be named according to the file(s) being read and parsed. For example, -the `fs.BuddyInfo()` function reads the file `/proc/buddyinfo`. In addition, the godoc for each public function -should contain the path to the file(s) being read and a URL of the linux kernel documentation describing the file(s). - -### Reading vs. Parsing - -Most functionality in this library consists of reading files and then parsing the text into structured data. In most -cases reading and parsing should be separated into different functions/methods with a public `fs.Thing()` method and -a private `parseThing(r Reader)` function. This provides a logical separation and allows parsing to be tested -directly without the need to read from the filesystem. Using a `Reader` argument is preferred over other data types -such as `string` or `*File` because it provides the most flexibility regarding the data source. When a set of files -in a directory needs to be parsed, then a `path` string parameter to the parse function can be used instead. - -### /proc and /sys filesystem I/O - -The `proc` and `sys` filesystems are pseudo file systems and work a bit differently from standard disk I/O. -Many of the files are changing continuously and the data being read can in some cases change between subsequent -reads in the same file. Also, most of the files are relatively small (less than a few KBs), and system calls -to the `stat` function will often return the wrong size. Therefore, for most files it's recommended to read the -full file in a single operation using an internal utility function called `util.ReadFileNoStat`. -This function is similar to `os.ReadFile`, but it avoids the system call to `stat` to get the current size of -the file. - -Note that parsing the file's contents can still be performed one line at a time. This is done by first reading -the full file, and then using a scanner on the `[]byte` or `string` containing the data. - -``` - data, err := util.ReadFileNoStat("/proc/cpuinfo") - if err != nil { - return err - } - reader := bytes.NewReader(data) - scanner := bufio.NewScanner(reader) -``` - -The `/sys` filesystem contains many very small files which contain only a single numeric or text value. These files -can be read using an internal function called `util.SysReadFile` which is similar to `os.ReadFile` but does -not bother to check the size of the file before reading. -``` - data, err := util.SysReadFile("/sys/class/power_supply/BAT0/capacity") -``` - diff --git a/vendor/github.com/prometheus/procfs/LICENSE b/vendor/github.com/prometheus/procfs/LICENSE deleted file mode 100644 index 261eeb9e9..000000000 --- a/vendor/github.com/prometheus/procfs/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - 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/prometheus/procfs/MAINTAINERS.md b/vendor/github.com/prometheus/procfs/MAINTAINERS.md deleted file mode 100644 index e00f3b365..000000000 --- a/vendor/github.com/prometheus/procfs/MAINTAINERS.md +++ /dev/null @@ -1,3 +0,0 @@ -* Johannes 'fish' Ziemke @discordianfish -* Paul Gier @pgier -* Ben Kochie @SuperQ diff --git a/vendor/github.com/prometheus/procfs/Makefile b/vendor/github.com/prometheus/procfs/Makefile deleted file mode 100644 index bce50a19c..000000000 --- a/vendor/github.com/prometheus/procfs/Makefile +++ /dev/null @@ -1,31 +0,0 @@ -# Copyright The Prometheus 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. - -include Makefile.common - -%/.unpacked: %.ttar - @echo ">> extracting fixtures $*" - ./ttar -C $(dir $*) -x -f $*.ttar - touch $@ - -fixtures: testdata/fixtures/.unpacked - -update_fixtures: - rm -vf testdata/fixtures/.unpacked - ./ttar -c -f testdata/fixtures.ttar -C testdata/ fixtures/ - -.PHONY: build -build: - -.PHONY: test -test: testdata/fixtures/.unpacked common-test diff --git a/vendor/github.com/prometheus/procfs/Makefile.common b/vendor/github.com/prometheus/procfs/Makefile.common deleted file mode 100644 index a7c5f553e..000000000 --- a/vendor/github.com/prometheus/procfs/Makefile.common +++ /dev/null @@ -1,427 +0,0 @@ -# Copyright The Prometheus 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. - - -# A common Makefile that includes rules to be reused in different prometheus projects. -# !!! Open PRs only against the prometheus/prometheus/Makefile.common repository! - -# Example usage : -# Create the main Makefile in the root project directory. -# include Makefile.common -# customTarget: -# @echo ">> Running customTarget" -# - -# Ensure GOBIN is not set during build so that promu is installed to the correct path -unexport GOBIN - -GO ?= go -GOFMT ?= $(GO)fmt -FIRST_GOPATH := $(firstword $(subst :, ,$(shell $(GO) env GOPATH))) -GOOPTS ?= -GOHOSTOS ?= $(shell $(GO) env GOHOSTOS) -GOHOSTARCH ?= $(shell $(GO) env GOHOSTARCH) - -GO_VERSION ?= $(shell $(GO) version) -GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION)) -PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.') - -PROMU := $(FIRST_GOPATH)/bin/promu -pkgs = ./... - -ifeq (arm, $(GOHOSTARCH)) - GOHOSTARM ?= $(shell GOARM= $(GO) env GOARM) - GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH)v$(GOHOSTARM) -else - GO_BUILD_PLATFORM ?= $(GOHOSTOS)-$(GOHOSTARCH) -endif - -GOTEST := $(GO) test -GOTEST_DIR := -ifneq ($(CIRCLE_JOB),) -ifneq ($(shell command -v gotestsum 2> /dev/null),) - GOTEST_DIR := test-results - GOTEST := gotestsum --junitfile $(GOTEST_DIR)/unit-tests.xml -- -endif -endif - -PROMU_VERSION ?= 0.20.0 -PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz - -SKIP_GOLANGCI_LINT := -GOLANGCI_LINT := -GOLANGCI_LINT_OPTS ?= -GOLANGCI_LINT_VERSION ?= v2.11.4 -GOLANGCI_FMT_OPTS ?= -# golangci-lint only supports linux, darwin and windows platforms on i386/amd64/arm64. -# windows isn't included here because of the path separator being different. -ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux darwin)) - ifeq ($(GOHOSTARCH),$(filter $(GOHOSTARCH),amd64 i386 arm64)) - # If we're in CI and there is an Actions file, that means the linter - # is being run in Actions, so we don't need to run it here. - ifneq (,$(SKIP_GOLANGCI_LINT)) - GOLANGCI_LINT := - else ifeq (,$(CIRCLE_JOB)) - GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint - else ifeq (,$(wildcard .github/workflows/golangci-lint.yml)) - GOLANGCI_LINT := $(FIRST_GOPATH)/bin/golangci-lint - endif - endif -endif - -PREFIX ?= $(shell pwd) -BIN_DIR ?= $(shell pwd) -DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) -DOCKERBUILD_CONTEXT ?= ./ -DOCKER_REPO ?= prom - -# Check if deprecated DOCKERFILE_PATH is set -ifdef DOCKERFILE_PATH -$(error DOCKERFILE_PATH is deprecated. Use DOCKERFILE_VARIANTS ?= $(DOCKERFILE_PATH) in the Makefile) -endif - -DOCKER_ARCHS ?= amd64 arm64 armv7 ppc64le riscv64 s390x -DOCKERFILE_VARIANTS ?= $(wildcard Dockerfile Dockerfile.*) - -# Function to extract variant from Dockerfile label. -# Returns the variant name from io.prometheus.image.variant label, or "default" if not found. -define dockerfile_variant -$(strip $(or $(shell sed -n 's/.*io\.prometheus\.image\.variant="\([^"]*\)".*/\1/p' $(1)),default)) -endef - -# Check for duplicate variant names (including default for Dockerfiles without labels). -DOCKERFILE_VARIANT_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df))) -DOCKERFILE_VARIANT_NAMES_SORTED := $(sort $(DOCKERFILE_VARIANT_NAMES)) -ifneq ($(words $(DOCKERFILE_VARIANT_NAMES)),$(words $(DOCKERFILE_VARIANT_NAMES_SORTED))) -$(error Duplicate variant names found. Each Dockerfile must have a unique io.prometheus.image.variant label, and only one can be without a label (default)) -endif - -# Build variant:dockerfile pairs for shell iteration. -DOCKERFILE_VARIANTS_WITH_NAMES := $(foreach df,$(DOCKERFILE_VARIANTS),$(call dockerfile_variant,$(df)):$(df)) - -BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS)) -PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS)) -TAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS)) - -SANITIZED_DOCKER_IMAGE_TAG := $(subst +,-,$(DOCKER_IMAGE_TAG)) - -ifeq ($(GOHOSTARCH),amd64) - ifeq ($(GOHOSTOS),$(filter $(GOHOSTOS),linux freebsd darwin windows)) - # Only supported on amd64 - test-flags := -race - endif -endif - -# This rule is used to forward a target like "build" to "common-build". This -# allows a new "build" target to be defined in a Makefile which includes this -# one and override "common-build" without override warnings. -%: common-% ; - -.PHONY: common-all -common-all: precheck style check_license lint yamllint unused build test - -.PHONY: common-style -common-style: - @echo ">> checking code style" - @fmtRes=$$($(GOFMT) -d $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -name '*.go' -print)); \ - if [ -n "$${fmtRes}" ]; then \ - echo "gofmt checking failed!"; echo "$${fmtRes}"; echo; \ - echo "Please ensure you are using $$($(GO) version) for formatting code."; \ - exit 1; \ - fi - -.PHONY: common-check_license -common-check_license: - @echo ">> checking license header" - @licRes=$$(for file in $$(git ls-files '*.go' ':!:vendor/*' || find . -path ./vendor -prune -o -type f -iname '*.go' -print) ; do \ - awk 'NR<=3' $$file | grep -Eq "(Copyright|generated|GENERATED)" || echo $$file; \ - done); \ - if [ -n "$${licRes}" ]; then \ - echo "license header checking failed:"; echo "$${licRes}"; \ - exit 1; \ - fi - @echo ">> checking for copyright years 2026 or later" - @futureYearRes=$$(git grep -E 'Copyright (202[6-9]|20[3-9][0-9])' -- '*.go' ':!:vendor/*' || true); \ - if [ -n "$${futureYearRes}" ]; then \ - echo "Files with copyright year 2026 or later found (should use 'Copyright The Prometheus Authors'):"; echo "$${futureYearRes}"; \ - exit 1; \ - fi - -.PHONY: common-deps -common-deps: - @echo ">> getting dependencies" - $(GO) mod download - -.PHONY: update-go-deps -update-go-deps: - @echo ">> updating Go dependencies" - @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ - $(GO) get $$m; \ - done - $(GO) mod tidy - -.PHONY: common-test-short -common-test-short: $(GOTEST_DIR) - @echo ">> running short tests" - $(GOTEST) -short $(GOOPTS) $(pkgs) - -.PHONY: common-test -common-test: $(GOTEST_DIR) - @echo ">> running all tests" - $(GOTEST) $(test-flags) $(GOOPTS) $(pkgs) - -$(GOTEST_DIR): - @mkdir -p $@ - -.PHONY: common-format -common-format: $(GOLANGCI_LINT) - @echo ">> formatting code" - $(GO) fmt $(pkgs) -ifdef GOLANGCI_LINT - @echo ">> formatting code with golangci-lint" - $(GOLANGCI_LINT) fmt $(GOLANGCI_FMT_OPTS) -endif - -.PHONY: common-vet -common-vet: - @echo ">> vetting code" - $(GO) vet $(GOOPTS) $(pkgs) - -.PHONY: common-lint -common-lint: $(GOLANGCI_LINT) -ifdef GOLANGCI_LINT - @echo ">> running golangci-lint" - $(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs) -endif - -.PHONY: common-lint-fix -common-lint-fix: $(GOLANGCI_LINT) -ifdef GOLANGCI_LINT - @echo ">> running golangci-lint fix" - $(GOLANGCI_LINT) run --fix $(GOLANGCI_LINT_OPTS) $(pkgs) -endif - -.PHONY: common-yamllint -common-yamllint: - @echo ">> running yamllint on all YAML files in the repository" -ifeq (, $(shell command -v yamllint 2> /dev/null)) - @echo "yamllint not installed so skipping" -else - yamllint . -endif - -# For backward-compatibility. -.PHONY: common-staticcheck -common-staticcheck: lint - -.PHONY: common-unused -common-unused: - @echo ">> running check for unused/missing packages in go.mod" - $(GO) mod tidy - @git diff --exit-code -- go.sum go.mod - -.PHONY: common-build -common-build: promu - @echo ">> building binaries" - $(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES) - -.PHONY: common-tarball -common-tarball: promu - @echo ">> building release tarball" - $(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) - -.PHONY: common-docker-repo-name -common-docker-repo-name: - @echo "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)" - -.PHONY: common-docker $(BUILD_DOCKER_ARCHS) -common-docker: $(BUILD_DOCKER_ARCHS) -$(BUILD_DOCKER_ARCHS): common-docker-%: - @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \ - dockerfile=$${variant#*:}; \ - variant_name=$${variant%%:*}; \ - distroless_arch="$*"; \ - if [ "$*" = "armv7" ]; then \ - distroless_arch="arm"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Building default variant ($$variant_name) for linux-$* using $$dockerfile"; \ - docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \ - -f $$dockerfile \ - --build-arg ARCH="$*" \ - --build-arg OS="linux" \ - --build-arg DISTROLESS_ARCH="$$distroless_arch" \ - $(DOCKERBUILD_CONTEXT); \ - if [ "$$variant_name" != "default" ]; then \ - echo "Tagging default variant with $$variant_name suffix"; \ - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" \ - "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \ - fi; \ - else \ - echo "Building $$variant_name variant for linux-$* using $$dockerfile"; \ - docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" \ - -f $$dockerfile \ - --build-arg ARCH="$*" \ - --build-arg OS="linux" \ - --build-arg DISTROLESS_ARCH="$$distroless_arch" \ - $(DOCKERBUILD_CONTEXT); \ - fi; \ - done - -.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS) -common-docker-publish: $(PUBLISH_DOCKER_ARCHS) -$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%: - @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \ - dockerfile=$${variant#*:}; \ - variant_name=$${variant%%:*}; \ - if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \ - echo "Pushing $$variant_name variant for linux-$*"; \ - docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Pushing default variant ($$variant_name) for linux-$*"; \ - docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)"; \ - fi; \ - if [ "$(DOCKER_IMAGE_TAG)" = "latest" ]; then \ - if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \ - echo "Pushing $$variant_name variant version tags for linux-$*"; \ - docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Pushing default variant version tag for linux-$*"; \ - docker push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"; \ - fi; \ - fi; \ - done - -DOCKER_MAJOR_VERSION_TAG = $(firstword $(subst ., ,$(shell cat VERSION))) -.PHONY: common-docker-tag-latest $(TAG_DOCKER_ARCHS) -common-docker-tag-latest: $(TAG_DOCKER_ARCHS) -$(TAG_DOCKER_ARCHS): common-docker-tag-latest-%: - @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \ - dockerfile=$${variant#*:}; \ - variant_name=$${variant%%:*}; \ - if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \ - echo "Tagging $$variant_name variant for linux-$* as latest"; \ - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest-$$variant_name"; \ - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Tagging default variant ($$variant_name) for linux-$* as latest"; \ - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:latest"; \ - docker tag "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:$(SANITIZED_DOCKER_IMAGE_TAG)" "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:v$(DOCKER_MAJOR_VERSION_TAG)"; \ - fi; \ - done - -.PHONY: common-docker-manifest -common-docker-manifest: - @for variant in $(DOCKERFILE_VARIANTS_WITH_NAMES); do \ - dockerfile=$${variant#*:}; \ - variant_name=$${variant%%:*}; \ - if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \ - echo "Creating manifest for $$variant_name variant"; \ - refs=""; \ - for arch in $(DOCKER_ARCHS); do \ - refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \ - done; \ - if [ -z "$$refs" ]; then \ - echo "Skipping manifest for $$variant_name variant (no supported architectures)"; \ - continue; \ - fi; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name" $$refs; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)-$$variant_name"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Creating default variant ($$variant_name) manifest"; \ - refs=""; \ - for arch in $(DOCKER_ARCHS); do \ - refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:$(SANITIZED_DOCKER_IMAGE_TAG)"; \ - done; \ - if [ -z "$$refs" ]; then \ - echo "Skipping default variant manifest (no supported architectures)"; \ - continue; \ - fi; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)" $$refs; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):$(SANITIZED_DOCKER_IMAGE_TAG)"; \ - fi; \ - if [ "$(DOCKER_IMAGE_TAG)" = "latest" ]; then \ - if [ "$$dockerfile" != "Dockerfile" ] || [ "$$variant_name" != "default" ]; then \ - echo "Creating manifest for $$variant_name variant version tag"; \ - refs=""; \ - for arch in $(DOCKER_ARCHS); do \ - refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \ - done; \ - if [ -z "$$refs" ]; then \ - echo "Skipping version-tag manifest for $$variant_name variant (no supported architectures)"; \ - continue; \ - fi; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name" $$refs; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)-$$variant_name"; \ - fi; \ - if [ "$$dockerfile" = "Dockerfile" ]; then \ - echo "Creating default variant version tag manifest"; \ - refs=""; \ - for arch in $(DOCKER_ARCHS); do \ - refs="$$refs $(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$$arch:v$(DOCKER_MAJOR_VERSION_TAG)"; \ - done; \ - if [ -z "$$refs" ]; then \ - echo "Skipping default variant version-tag manifest (no supported architectures)"; \ - continue; \ - fi; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest create -a "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)" $$refs; \ - DOCKER_CLI_EXPERIMENTAL=enabled docker manifest push "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME):v$(DOCKER_MAJOR_VERSION_TAG)"; \ - fi; \ - fi; \ - done - -.PHONY: promu -promu: $(PROMU) - -$(PROMU): - $(eval PROMU_TMP := $(shell mktemp -d)) - curl -s -L $(PROMU_URL) | tar -xvzf - -C $(PROMU_TMP) - mkdir -p $(FIRST_GOPATH)/bin - cp $(PROMU_TMP)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM)/promu $(FIRST_GOPATH)/bin/promu - rm -r $(PROMU_TMP) - -.PHONY: common-proto -common-proto: - @echo ">> generating code from proto files" - @./scripts/genproto.sh - -ifdef GOLANGCI_LINT -$(GOLANGCI_LINT): - mkdir -p $(FIRST_GOPATH)/bin - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/$(GOLANGCI_LINT_VERSION)/install.sh \ - | sed -e '/install -d/d' \ - | sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION) -endif - -.PHONY: common-print-golangci-lint-version -common-print-golangci-lint-version: - @echo $(GOLANGCI_LINT_VERSION) - -.PHONY: precheck -precheck:: - -define PRECHECK_COMMAND_template = -precheck:: $(1)_precheck - -PRECHECK_COMMAND_$(1) ?= $(1) $$(strip $$(PRECHECK_OPTIONS_$(1))) -.PHONY: $(1)_precheck -$(1)_precheck: - @if ! $$(PRECHECK_COMMAND_$(1)) 1>/dev/null 2>&1; then \ - echo "Execution of '$$(PRECHECK_COMMAND_$(1))' command failed. Is $(1) installed?"; \ - exit 1; \ - fi -endef diff --git a/vendor/github.com/prometheus/procfs/NOTICE b/vendor/github.com/prometheus/procfs/NOTICE deleted file mode 100644 index 53c5e9aa1..000000000 --- a/vendor/github.com/prometheus/procfs/NOTICE +++ /dev/null @@ -1,7 +0,0 @@ -procfs provides functions to retrieve system, kernel and process -metrics from the pseudo-filesystem proc. - -Copyright 2014-2015 The Prometheus Authors - -This product includes software developed at -SoundCloud Ltd. (http://soundcloud.com/). diff --git a/vendor/github.com/prometheus/procfs/README.md b/vendor/github.com/prometheus/procfs/README.md deleted file mode 100644 index 363524094..000000000 --- a/vendor/github.com/prometheus/procfs/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# procfs - -This package provides functions to retrieve system, kernel, and process -metrics from the pseudo-filesystems /proc and /sys. - -*WARNING*: This package is a work in progress. Its API may still break in -backwards-incompatible ways without warnings. Use it at your own risk. - -[![Go Reference](https://pkg.go.dev/badge/github.com/prometheus/procfs.svg)](https://pkg.go.dev/github.com/prometheus/procfs) -[![Build Status](https://github.com/prometheus/procfs/actions/workflows/ci.yml/badge.svg)](https://github.com/prometheus/procfs/actions/workflows/ci.yml) -[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs) - -## Usage - -The procfs library is organized by packages based on whether the gathered data is coming from -/proc, /sys, or both. Each package contains an `FS` type which represents the path to either /proc, -/sys, or both. For example, cpu statistics are gathered from -`/proc/stat` and are available via the root procfs package. First, the proc filesystem mount -point is initialized, and then the stat information is read. - -```go -fs, err := procfs.NewFS("/proc") -stats, err := fs.Stat() -``` - -Some sub-packages such as `blockdevice`, require access to both the proc and sys filesystems. - -```go - fs, err := blockdevice.NewFS("/proc", "/sys") - stats, err := fs.ProcDiskstats() -``` - -## Package Organization - -The packages in this project are organized according to (1) whether the data comes from the `/proc` or -`/sys` filesystem and (2) the type of information being retrieved. For example, most process information -can be gathered from the functions in the root `procfs` package. Information about block devices such as disk drives -is available in the `blockdevices` sub-package. - -## Building and Testing - -The procfs library is intended to be built as part of another application, so there are no distributable binaries. -However, most of the API includes unit tests which can be run with `make test`. - -### Updating Test Fixtures - -The procfs library includes a set of test fixtures which include many example files from -the `/proc` and `/sys` filesystems. These fixtures are included as a [ttar](https://github.com/ideaship/ttar) file -which is extracted automatically during testing. To add/update the test fixtures, first -ensure the `testdata/fixtures` directory is up to date by removing the existing directory and then -extracting the ttar file using `make testdata/fixtures/.unpacked` or just `make test`. - -```bash -rm -rf testdata/fixtures -make test -``` - -Next, make the required changes to the extracted files in the `testdata/fixtures` directory. When -the changes are complete, run `make update_fixtures` to create a new `fixtures.ttar` file -based on the updated `fixtures` directory. And finally, verify the changes using -`git diff testdata/fixtures.ttar`. diff --git a/vendor/github.com/prometheus/procfs/SECURITY.md b/vendor/github.com/prometheus/procfs/SECURITY.md deleted file mode 100644 index 5e6f976db..000000000 --- a/vendor/github.com/prometheus/procfs/SECURITY.md +++ /dev/null @@ -1,6 +0,0 @@ -# Reporting a security issue - -The Prometheus security policy, including how to report vulnerabilities, can be -found here: - -[https://prometheus.io/docs/operating/security/](https://prometheus.io/docs/operating/security/) diff --git a/vendor/github.com/prometheus/procfs/arp.go b/vendor/github.com/prometheus/procfs/arp.go deleted file mode 100644 index 716bdef10..000000000 --- a/vendor/github.com/prometheus/procfs/arp.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "net" - "os" - "strconv" - "strings" -) - -// Learned from include/uapi/linux/if_arp.h. -const ( - // Completed entry (ha valid). - ATFComplete = 0x02 - // Permanent entry. - ATFPermanent = 0x04 - // Publish entry. - ATFPublish = 0x08 - // Has requested trailers. - ATFUseTrailers = 0x10 - // Obsoleted: Want to use a netmask (only for proxy entries). - ATFNetmask = 0x20 - // Don't answer this addresses. - ATFDontPublish = 0x40 -) - -// ARPEntry contains a single row of the columnar data represented in -// /proc/net/arp. -type ARPEntry struct { - // IP address - IPAddr net.IP - // MAC address - HWAddr net.HardwareAddr - // Name of the device - Device string - // Flags - Flags byte -} - -// GatherARPEntries retrieves all the ARP entries, parse the relevant columns, -// and then return a slice of ARPEntry's. -func (fs FS) GatherARPEntries() ([]ARPEntry, error) { - data, err := os.ReadFile(fs.proc.Path("net/arp")) - if err != nil { - return nil, fmt.Errorf("%w: error reading arp %s: %w", ErrFileRead, fs.proc.Path("net/arp"), err) - } - - return parseARPEntries(data) -} - -func parseARPEntries(data []byte) ([]ARPEntry, error) { - lines := strings.Split(string(data), "\n") - entries := make([]ARPEntry, 0) - var err error - const ( - expectedDataWidth = 6 - expectedHeaderWidth = 9 - ) - for _, line := range lines { - columns := strings.Fields(line) - width := len(columns) - - switch width { - case expectedHeaderWidth, 0: - continue - case expectedDataWidth: - entry, err := parseARPEntry(columns) - if err != nil { - return []ARPEntry{}, fmt.Errorf("%w: Failed to parse ARP entry: %v: %w", ErrFileParse, entry, err) - } - entries = append(entries, entry) - default: - return []ARPEntry{}, fmt.Errorf("%w: %d columns found, but expected %d: %w", ErrFileParse, width, expectedDataWidth, err) - } - - } - - return entries, err -} - -func parseARPEntry(columns []string) (ARPEntry, error) { - entry := ARPEntry{Device: columns[5]} - ip := net.ParseIP(columns[0]) - entry.IPAddr = ip - - if mac, err := net.ParseMAC(columns[3]); err == nil { - entry.HWAddr = mac - } else { - return ARPEntry{}, err - } - - if flags, err := strconv.ParseUint(columns[2], 0, 8); err == nil { - entry.Flags = byte(flags) - } else { - return ARPEntry{}, err - } - - return entry, nil -} - -// IsComplete returns true if ARP entry is marked with complete flag. -func (entry *ARPEntry) IsComplete() bool { - return entry.Flags&ATFComplete != 0 -} diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go deleted file mode 100644 index 53243e687..000000000 --- a/vendor/github.com/prometheus/procfs/buddyinfo.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "fmt" - "io" - "os" - "strconv" - "strings" -) - -// A BuddyInfo is the details parsed from /proc/buddyinfo. -// The data is comprised of an array of free fragments of each size. -// The sizes are 2^n*PAGE_SIZE, where n is the array index. -type BuddyInfo struct { - Node string - Zone string - Sizes []float64 -} - -// BuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem. -func (fs FS) BuddyInfo() ([]BuddyInfo, error) { - file, err := os.Open(fs.proc.Path("buddyinfo")) - if err != nil { - return nil, err - } - defer file.Close() - - return parseBuddyInfo(file) -} - -func parseBuddyInfo(r io.Reader) ([]BuddyInfo, error) { - var ( - buddyInfo = []BuddyInfo{} - scanner = bufio.NewScanner(r) - bucketCount = -1 - ) - - for scanner.Scan() { - var err error - line := scanner.Text() - parts := strings.Fields(line) - - if len(parts) < 4 { - return nil, fmt.Errorf("%w: Invalid number of fields, found: %v", ErrFileParse, parts) - } - - node := strings.TrimSuffix(parts[1], ",") - zone := strings.TrimSuffix(parts[3], ",") - arraySize := len(parts[4:]) - - if bucketCount == -1 { - bucketCount = arraySize - } else if bucketCount != arraySize { - return nil, fmt.Errorf("%w: mismatch in number of buddyinfo buckets, previous count %d, new count %d", ErrFileParse, bucketCount, arraySize) - } - - sizes := make([]float64, arraySize) - for i := range arraySize { - sizes[i], err = strconv.ParseFloat(parts[i+4], 64) - if err != nil { - return nil, fmt.Errorf("%w: Invalid valid in buddyinfo: %f: %w", ErrFileParse, sizes[i], err) - } - } - - buddyInfo = append(buddyInfo, BuddyInfo{node, zone, sizes}) - } - - return buddyInfo, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/cmdline.go b/vendor/github.com/prometheus/procfs/cmdline.go deleted file mode 100644 index 4f1cac1f0..000000000 --- a/vendor/github.com/prometheus/procfs/cmdline.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// CmdLine returns the command line of the kernel. -func (fs FS) CmdLine() ([]string, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("cmdline")) - if err != nil { - return nil, err - } - - return strings.Fields(string(data)), nil -} diff --git a/vendor/github.com/prometheus/procfs/cpuinfo.go b/vendor/github.com/prometheus/procfs/cpuinfo.go deleted file mode 100644 index 4b23d8d6b..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo.go +++ /dev/null @@ -1,518 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux - -package procfs - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// CPUInfo contains general information about a system CPU found in /proc/cpuinfo. -type CPUInfo struct { - Processor uint - VendorID string - CPUFamily string - Model string - ModelName string - Stepping string - Microcode string - CPUMHz float64 - CacheSize string - PhysicalID string - Siblings uint - CoreID string - CPUCores uint - APICID string - InitialAPICID string - FPU string - FPUException string - CPUIDLevel uint - WP string - Flags []string - Bugs []string - BogoMips float64 - CLFlushSize uint - CacheAlignment uint - AddressSizes string - PowerManagement string -} - -var ( - cpuinfoClockRegexp = regexp.MustCompile(`([\d.]+)`) - cpuinfoS390XProcessorRegexp = regexp.MustCompile(`^processor\s+(\d+):.*`) -) - -// CPUInfo returns information about current system CPUs. -// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt -func (fs FS) CPUInfo() ([]CPUInfo, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("cpuinfo")) - if err != nil { - return nil, err - } - return parseCPUInfo(data) -} - -func parseCPUInfoX86(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - // find the first "processor" line - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: Cannot parse line: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - firstcpu := CPUInfo{Processor: uint(v)} - cpuinfo := []CPUInfo{firstcpu} - i := 0 - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor - i++ - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].Processor = uint(v) - case "vendor", "vendor_id": - cpuinfo[i].VendorID = field[1] - case "cpu family": - cpuinfo[i].CPUFamily = field[1] - case "model": - cpuinfo[i].Model = field[1] - case "model name": - cpuinfo[i].ModelName = field[1] - case "stepping": - cpuinfo[i].Stepping = field[1] - case "microcode": - cpuinfo[i].Microcode = field[1] - case "cpu MHz": - v, err := strconv.ParseFloat(field[1], 64) - if err != nil { - return nil, err - } - cpuinfo[i].CPUMHz = v - case "cache size": - cpuinfo[i].CacheSize = field[1] - case "physical id": - cpuinfo[i].PhysicalID = field[1] - case "siblings": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].Siblings = uint(v) - case "core id": - cpuinfo[i].CoreID = field[1] - case "cpu cores": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].CPUCores = uint(v) - case "apicid": - cpuinfo[i].APICID = field[1] - case "initial apicid": - cpuinfo[i].InitialAPICID = field[1] - case "fpu": - cpuinfo[i].FPU = field[1] - case "fpu_exception": - cpuinfo[i].FPUException = field[1] - case "cpuid level": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].CPUIDLevel = uint(v) - case "wp": - cpuinfo[i].WP = field[1] - case "flags": - cpuinfo[i].Flags = strings.Fields(field[1]) - case "bugs": - cpuinfo[i].Bugs = strings.Fields(field[1]) - case "bogomips": - v, err := strconv.ParseFloat(field[1], 64) - if err != nil { - return nil, err - } - cpuinfo[i].BogoMips = v - case "clflush size": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].CLFlushSize = uint(v) - case "cache_alignment": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].CacheAlignment = uint(v) - case "address sizes": - cpuinfo[i].AddressSizes = field[1] - case "power management": - cpuinfo[i].PowerManagement = field[1] - } - } - return cpuinfo, nil -} - -func parseCPUInfoARM(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - firstLine := firstNonEmptyLine(scanner) - match, err := regexp.MatchString("^[Pp]rocessor", firstLine) - if !match || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: Cannot parse line: %q: %w", ErrFileParse, firstLine, err) - - } - field := strings.SplitN(firstLine, ": ", 2) - cpuinfo := []CPUInfo{} - featuresLine := "" - commonCPUInfo := CPUInfo{} - i := 0 - if strings.TrimSpace(field[0]) == "Processor" { - commonCPUInfo = CPUInfo{ModelName: field[1]} - i = -1 - } else { - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - firstcpu := CPUInfo{Processor: uint(v)} - cpuinfo = []CPUInfo{firstcpu} - } - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - cpuinfo = append(cpuinfo, commonCPUInfo) // start of the next processor - i++ - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].Processor = uint(v) - case "BogoMIPS": - if i == -1 { - cpuinfo = append(cpuinfo, commonCPUInfo) // There is only one processor - i++ - cpuinfo[i].Processor = 0 - } - v, err := strconv.ParseFloat(field[1], 64) - if err != nil { - return nil, err - } - cpuinfo[i].BogoMips = v - case "Features": - featuresLine = line - case "model name": - cpuinfo[i].ModelName = field[1] - } - } - fields := strings.SplitN(featuresLine, ": ", 2) - for i := range cpuinfo { - cpuinfo[i].Flags = strings.Fields(fields[1]) - } - return cpuinfo, nil - -} - -func parseCPUInfoS390X(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "vendor_id") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: Cannot parse line: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - cpuinfo := []CPUInfo{} - commonCPUInfo := CPUInfo{VendorID: field[1]} - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "bogomips per cpu": - v, err := strconv.ParseFloat(field[1], 64) - if err != nil { - return nil, err - } - commonCPUInfo.BogoMips = v - case "features": - commonCPUInfo.Flags = strings.Fields(field[1]) - } - if strings.HasPrefix(line, "processor") { - match := cpuinfoS390XProcessorRegexp.FindStringSubmatch(line) - if len(match) < 2 { - return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine) - } - cpu := commonCPUInfo - v, err := strconv.ParseUint(match[1], 0, 32) - if err != nil { - return nil, err - } - cpu.Processor = uint(v) - cpuinfo = append(cpuinfo, cpu) - } - if strings.HasPrefix(line, "cpu number") { - break - } - } - - i := 0 - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "cpu number": - i++ - case "cpu MHz dynamic": - clock := cpuinfoClockRegexp.FindString(strings.TrimSpace(field[1])) - v, err := strconv.ParseFloat(clock, 64) - if err != nil { - return nil, err - } - cpuinfo[i].CPUMHz = v - case "physical id": - cpuinfo[i].PhysicalID = field[1] - case "core id": - cpuinfo[i].CoreID = field[1] - case "cpu cores": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].CPUCores = uint(v) - case "siblings": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].Siblings = uint(v) - } - } - - return cpuinfo, nil -} - -func parseCPUInfoMips(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - // find the first "processor" line - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - cpuinfo := []CPUInfo{} - systemType := field[1] - - i := 0 - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - i = int(v) - cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor - cpuinfo[i].Processor = uint(v) - cpuinfo[i].VendorID = systemType - case "cpu model": - cpuinfo[i].ModelName = field[1] - case "BogoMIPS": - v, err := strconv.ParseFloat(field[1], 64) - if err != nil { - return nil, err - } - cpuinfo[i].BogoMips = v - } - } - return cpuinfo, nil -} - -func parseCPUInfoLoong(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - // find the first "processor" line - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "system type") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - cpuinfo := []CPUInfo{} - systemType := field[1] - i := 0 - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - i = int(v) - cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor - cpuinfo[i].Processor = uint(v) - cpuinfo[i].VendorID = systemType - case "CPU Family": - cpuinfo[i].CPUFamily = field[1] - case "Model Name": - cpuinfo[i].ModelName = field[1] - } - } - return cpuinfo, nil -} - -func parseCPUInfoPPC(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - firstcpu := CPUInfo{Processor: uint(v)} - cpuinfo := []CPUInfo{firstcpu} - i := 0 - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor - i++ - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - cpuinfo[i].Processor = uint(v) - case "cpu": - cpuinfo[i].VendorID = field[1] - case "clock": - clock := cpuinfoClockRegexp.FindString(strings.TrimSpace(field[1])) - v, err := strconv.ParseFloat(clock, 64) - if err != nil { - return nil, err - } - cpuinfo[i].CPUMHz = v - } - } - return cpuinfo, nil -} - -func parseCPUInfoRISCV(info []byte) ([]CPUInfo, error) { - scanner := bufio.NewScanner(bytes.NewReader(info)) - - firstLine := firstNonEmptyLine(scanner) - if !strings.HasPrefix(firstLine, "processor") || !strings.Contains(firstLine, ":") { - return nil, fmt.Errorf("%w: %q", ErrFileParse, firstLine) - } - field := strings.SplitN(firstLine, ": ", 2) - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - firstcpu := CPUInfo{Processor: uint(v)} - cpuinfo := []CPUInfo{firstcpu} - i := 0 - - for scanner.Scan() { - line := scanner.Text() - if !strings.Contains(line, ":") { - continue - } - field := strings.SplitN(line, ": ", 2) - switch strings.TrimSpace(field[0]) { - case "processor": - v, err := strconv.ParseUint(field[1], 0, 32) - if err != nil { - return nil, err - } - i = int(v) - cpuinfo = append(cpuinfo, CPUInfo{}) // start of the next processor - cpuinfo[i].Processor = uint(v) - case "hart": - cpuinfo[i].CoreID = field[1] - case "isa": - cpuinfo[i].ModelName = field[1] - } - } - return cpuinfo, nil -} - -func parseCPUInfoDummy(_ []byte) ([]CPUInfo, error) { //nolint:unused - return nil, errors.New("not implemented") -} - -// firstNonEmptyLine advances the scanner to the first non-empty line -// and returns the contents of that line. -func firstNonEmptyLine(scanner *bufio.Scanner) string { - for scanner.Scan() { - line := scanner.Text() - if strings.TrimSpace(line) != "" { - return line - } - } - return "" -} diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go b/vendor/github.com/prometheus/procfs/cpuinfo_armx.go deleted file mode 100644 index b09035ff3..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_armx.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && (arm || arm64) - -package procfs - -var parseCPUInfo = parseCPUInfoARM diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go b/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go deleted file mode 100644 index 7bb20211f..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_loong64.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux - -package procfs - -var parseCPUInfo = parseCPUInfoLoong diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go b/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go deleted file mode 100644 index fd75d0f79..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_mipsx.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && (mips || mipsle || mips64 || mips64le) - -package procfs - -var parseCPUInfo = parseCPUInfoMips diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_others.go b/vendor/github.com/prometheus/procfs/cpuinfo_others.go deleted file mode 100644 index 3d36ba0e6..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_others.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && !386 && !amd64 && !arm && !arm64 && !loong64 && !mips && !mips64 && !mips64le && !mipsle && !ppc64 && !ppc64le && !riscv64 && !s390x - -package procfs - -var parseCPUInfo = parseCPUInfoDummy diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go b/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go deleted file mode 100644 index b3425051e..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_ppcx.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && (ppc64 || ppc64le) - -package procfs - -var parseCPUInfo = parseCPUInfoPPC diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go b/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go deleted file mode 100644 index 72598230c..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_riscvx.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && (riscv || riscv64) - -package procfs - -var parseCPUInfo = parseCPUInfoRISCV diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go b/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go deleted file mode 100644 index 50a8239cb..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_s390x.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux - -package procfs - -var parseCPUInfo = parseCPUInfoS390X diff --git a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go b/vendor/github.com/prometheus/procfs/cpuinfo_x86.go deleted file mode 100644 index 00edb30a5..000000000 --- a/vendor/github.com/prometheus/procfs/cpuinfo_x86.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build linux && (386 || amd64) - -package procfs - -var parseCPUInfo = parseCPUInfoX86 diff --git a/vendor/github.com/prometheus/procfs/crypto.go b/vendor/github.com/prometheus/procfs/crypto.go deleted file mode 100644 index d93b712e0..000000000 --- a/vendor/github.com/prometheus/procfs/crypto.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Crypto holds info parsed from /proc/crypto. -type Crypto struct { - Alignmask *uint64 - Async bool - Blocksize *uint64 - Chunksize *uint64 - Ctxsize *uint64 - Digestsize *uint64 - Driver string - Geniv string - Internal string - Ivsize *uint64 - Maxauthsize *uint64 - MaxKeysize *uint64 - MinKeysize *uint64 - Module string - Name string - Priority *int64 - Refcnt *int64 - Seedsize *uint64 - Selftest string - Type string - Walksize *uint64 -} - -var cryptoFile = "crypto" - -// Crypto parses an crypto-file (/proc/crypto) and returns a slice of -// structs containing the relevant info. More information available here: -// https://kernel.readthedocs.io/en/sphinx-samples/crypto-API.html -func (fs FS) Crypto() ([]Crypto, error) { - path := fs.proc.Path(cryptoFile) - b, err := util.ReadFileNoStat(path) - if err != nil { - return nil, fmt.Errorf("%w: Cannot read file %v: %w", ErrFileRead, b, err) - - } - - crypto, err := parseCrypto(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse %v: %w", ErrFileParse, crypto, err) - } - - return crypto, nil -} - -// parseCrypto parses a /proc/crypto stream into Crypto elements. -func parseCrypto(r io.Reader) ([]Crypto, error) { - var out []Crypto - - s := bufio.NewScanner(r) - for s.Scan() { - text := s.Text() - switch { - case strings.HasPrefix(text, "name"): - // Each crypto element begins with its name. - out = append(out, Crypto{}) - case text == "": - continue - } - - if len(out) == 0 { - return nil, fmt.Errorf("%w: parsed invalid line before name parsed: %q", ErrFileParse, text) - } - - kv := strings.Split(text, ":") - if len(kv) != 2 { - return nil, fmt.Errorf("%w: Cannot parse line: %q", ErrFileParse, text) - } - - k := strings.TrimSpace(kv[0]) - v := strings.TrimSpace(kv[1]) - - // Parse the key/value pair into the currently focused element. - c := &out[len(out)-1] - if err := c.parseKV(k, v); err != nil { - return nil, err - } - } - - if err := s.Err(); err != nil { - return nil, err - } - - return out, nil -} - -// parseKV parses a key/value pair into the appropriate field of c. -func (c *Crypto) parseKV(k, v string) error { - vp := util.NewValueParser(v) - - switch k { - case "async": - // Interpret literal yes as true. - c.Async = v == "yes" - case "blocksize": - c.Blocksize = vp.PUInt64() - case "chunksize": - c.Chunksize = vp.PUInt64() - case "digestsize": - c.Digestsize = vp.PUInt64() - case "driver": - c.Driver = v - case "geniv": - c.Geniv = v - case "internal": - c.Internal = v - case "ivsize": - c.Ivsize = vp.PUInt64() - case "maxauthsize": - c.Maxauthsize = vp.PUInt64() - case "max keysize": - c.MaxKeysize = vp.PUInt64() - case "min keysize": - c.MinKeysize = vp.PUInt64() - case "module": - c.Module = v - case "name": - c.Name = v - case "priority": - c.Priority = vp.PInt64() - case "refcnt": - c.Refcnt = vp.PInt64() - case "seedsize": - c.Seedsize = vp.PUInt64() - case "selftest": - c.Selftest = v - case "type": - c.Type = v - case "walksize": - c.Walksize = vp.PUInt64() - } - - return vp.Err() -} diff --git a/vendor/github.com/prometheus/procfs/doc.go b/vendor/github.com/prometheus/procfs/doc.go deleted file mode 100644 index 26bfea071..000000000 --- a/vendor/github.com/prometheus/procfs/doc.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright The Prometheus 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 procfs provides functions to retrieve system, kernel and process -// metrics from the pseudo-filesystem proc. -// -// Example: -// -// package main -// -// import ( -// "fmt" -// "log" -// -// "github.com/prometheus/procfs" -// ) -// -// func main() { -// p, err := procfs.Self() -// if err != nil { -// log.Fatalf("could not get process: %s", err) -// } -// -// stat, err := p.Stat() -// if err != nil { -// log.Fatalf("could not get process stat: %s", err) -// } -// -// fmt.Printf("command: %s\n", stat.Comm) -// fmt.Printf("cpu time: %fs\n", stat.CPUTime()) -// fmt.Printf("vsize: %dB\n", stat.VirtualMemory()) -// fmt.Printf("rss: %dB\n", stat.ResidentMemory()) -// } -package procfs diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go deleted file mode 100644 index 8f27912a1..000000000 --- a/vendor/github.com/prometheus/procfs/fs.go +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "github.com/prometheus/procfs/internal/fs" -) - -// FS represents the pseudo-filesystem sys, which provides an interface to -// kernel data structures. -type FS struct { - proc fs.FS - isReal bool -} - -const ( - // DefaultMountPoint is the common mount point of the proc filesystem. - DefaultMountPoint = fs.DefaultProcMountPoint - - // SectorSize represents the size of a sector in bytes. - // It is specific to Linux block I/O operations. - SectorSize = 512 -) - -// NewDefaultFS returns a new proc FS mounted under the default proc mountPoint. -// It will error if the mount point directory can't be read or is a file. -func NewDefaultFS() (FS, error) { - return NewFS(DefaultMountPoint) -} - -// NewFS returns a new proc FS mounted under the given proc mountPoint. It will error -// if the mount point directory can't be read or is a file. -func NewFS(mountPoint string) (FS, error) { - fs, err := fs.NewFS(mountPoint) - if err != nil { - return FS{}, err - } - - isReal, err := isRealProc(mountPoint) - if err != nil { - return FS{}, err - } - - return FS{fs, isReal}, nil -} diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go b/vendor/github.com/prometheus/procfs/fs_statfs_notype.go deleted file mode 100644 index 0bef25bdd..000000000 --- a/vendor/github.com/prometheus/procfs/fs_statfs_notype.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !freebsd && !linux - -package procfs - -// isRealProc returns true on architectures that don't have a Type argument -// in their Statfs_t struct. -func isRealProc(_ string) (bool, error) { - return true, nil -} diff --git a/vendor/github.com/prometheus/procfs/fs_statfs_type.go b/vendor/github.com/prometheus/procfs/fs_statfs_type.go deleted file mode 100644 index d18333039..000000000 --- a/vendor/github.com/prometheus/procfs/fs_statfs_type.go +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build freebsd || linux - -package procfs - -import ( - "syscall" -) - -// isRealProc determines whether supplied mountpoint is really a proc filesystem. -func isRealProc(mountPoint string) (bool, error) { - stat := syscall.Statfs_t{} - err := syscall.Statfs(mountPoint, &stat) - if err != nil { - return false, err - } - - // 0x9fa0 is PROC_SUPER_MAGIC: https://elixir.bootlin.com/linux/v6.1/source/include/uapi/linux/magic.h#L87 - return stat.Type == 0x9fa0, nil -} diff --git a/vendor/github.com/prometheus/procfs/fscache.go b/vendor/github.com/prometheus/procfs/fscache.go deleted file mode 100644 index 9dde85707..000000000 --- a/vendor/github.com/prometheus/procfs/fscache.go +++ /dev/null @@ -1,423 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Fscacheinfo represents fscache statistics. -type Fscacheinfo struct { - // Number of index cookies allocated - IndexCookiesAllocated uint64 - // data storage cookies allocated - DataStorageCookiesAllocated uint64 - // Number of special cookies allocated - SpecialCookiesAllocated uint64 - // Number of objects allocated - ObjectsAllocated uint64 - // Number of object allocation failures - ObjectAllocationsFailure uint64 - // Number of objects that reached the available state - ObjectsAvailable uint64 - // Number of objects that reached the dead state - ObjectsDead uint64 - // Number of objects that didn't have a coherency check - ObjectsWithoutCoherencyCheck uint64 - // Number of objects that passed a coherency check - ObjectsWithCoherencyCheck uint64 - // Number of objects that needed a coherency data update - ObjectsNeedCoherencyCheckUpdate uint64 - // Number of objects that were declared obsolete - ObjectsDeclaredObsolete uint64 - // Number of pages marked as being cached - PagesMarkedAsBeingCached uint64 - // Number of uncache page requests seen - UncachePagesRequestSeen uint64 - // Number of acquire cookie requests seen - AcquireCookiesRequestSeen uint64 - // Number of acq reqs given a NULL parent - AcquireRequestsWithNullParent uint64 - // Number of acq reqs rejected due to no cache available - AcquireRequestsRejectedNoCacheAvailable uint64 - // Number of acq reqs succeeded - AcquireRequestsSucceeded uint64 - // Number of acq reqs rejected due to error - AcquireRequestsRejectedDueToError uint64 - // Number of acq reqs failed on ENOMEM - AcquireRequestsFailedDueToEnomem uint64 - // Number of lookup calls made on cache backends - LookupsNumber uint64 - // Number of negative lookups made - LookupsNegative uint64 - // Number of positive lookups made - LookupsPositive uint64 - // Number of objects created by lookup - ObjectsCreatedByLookup uint64 - // Number of lookups timed out and requeued - LookupsTimedOutAndRequed uint64 - InvalidationsNumber uint64 - InvalidationsRunning uint64 - // Number of update cookie requests seen - UpdateCookieRequestSeen uint64 - // Number of upd reqs given a NULL parent - UpdateRequestsWithNullParent uint64 - // Number of upd reqs granted CPU time - UpdateRequestsRunning uint64 - // Number of relinquish cookie requests seen - RelinquishCookiesRequestSeen uint64 - // Number of rlq reqs given a NULL parent - RelinquishCookiesWithNullParent uint64 - // Number of rlq reqs waited on completion of creation - RelinquishRequestsWaitingCompleteCreation uint64 - // Relinqs rtr - RelinquishRetries uint64 - // Number of attribute changed requests seen - AttributeChangedRequestsSeen uint64 - // Number of attr changed requests queued - AttributeChangedRequestsQueued uint64 - // Number of attr changed rejected -ENOBUFS - AttributeChangedRejectDueToEnobufs uint64 - // Number of attr changed failed -ENOMEM - AttributeChangedFailedDueToEnomem uint64 - // Number of attr changed ops given CPU time - AttributeChangedOps uint64 - // Number of allocation requests seen - AllocationRequestsSeen uint64 - // Number of successful alloc reqs - AllocationOkRequests uint64 - // Number of alloc reqs that waited on lookup completion - AllocationWaitingOnLookup uint64 - // Number of alloc reqs rejected -ENOBUFS - AllocationsRejectedDueToEnobufs uint64 - // Number of alloc reqs aborted -ERESTARTSYS - AllocationsAbortedDueToErestartsys uint64 - // Number of alloc reqs submitted - AllocationOperationsSubmitted uint64 - // Number of alloc reqs waited for CPU time - AllocationsWaitedForCPU uint64 - // Number of alloc reqs aborted due to object death - AllocationsAbortedDueToObjectDeath uint64 - // Number of retrieval (read) requests seen - RetrievalsReadRequests uint64 - // Number of successful retr reqs - RetrievalsOk uint64 - // Number of retr reqs that waited on lookup completion - RetrievalsWaitingLookupCompletion uint64 - // Number of retr reqs returned -ENODATA - RetrievalsReturnedEnodata uint64 - // Number of retr reqs rejected -ENOBUFS - RetrievalsRejectedDueToEnobufs uint64 - // Number of retr reqs aborted -ERESTARTSYS - RetrievalsAbortedDueToErestartsys uint64 - // Number of retr reqs failed -ENOMEM - RetrievalsFailedDueToEnomem uint64 - // Number of retr reqs submitted - RetrievalsRequests uint64 - // Number of retr reqs waited for CPU time - RetrievalsWaitingCPU uint64 - // Number of retr reqs aborted due to object death - RetrievalsAbortedDueToObjectDeath uint64 - // Number of storage (write) requests seen - StoreWriteRequests uint64 - // Number of successful store reqs - StoreSuccessfulRequests uint64 - // Number of store reqs on a page already pending storage - StoreRequestsOnPendingStorage uint64 - // Number of store reqs rejected -ENOBUFS - StoreRequestsRejectedDueToEnobufs uint64 - // Number of store reqs failed -ENOMEM - StoreRequestsFailedDueToEnomem uint64 - // Number of store reqs submitted - StoreRequestsSubmitted uint64 - // Number of store reqs granted CPU time - StoreRequestsRunning uint64 - // Number of pages given store req processing time - StorePagesWithRequestsProcessing uint64 - // Number of store reqs deleted from tracking tree - StoreRequestsDeleted uint64 - // Number of store reqs over store limit - StoreRequestsOverStoreLimit uint64 - // Number of release reqs against pages with no pending store - ReleaseRequestsAgainstPagesWithNoPendingStorage uint64 - // Number of release reqs against pages stored by time lock granted - ReleaseRequestsAgainstPagesStoredByTimeLockGranted uint64 - // Number of release reqs ignored due to in-progress store - ReleaseRequestsIgnoredDueToInProgressStore uint64 - // Number of page stores canceled due to release req - PageStoresCancelledByReleaseRequests uint64 - VmscanWaiting uint64 - // Number of times async ops added to pending queues - OpsPending uint64 - // Number of times async ops given CPU time - OpsRunning uint64 - // Number of times async ops queued for processing - OpsEnqueued uint64 - // Number of async ops canceled - OpsCancelled uint64 - // Number of async ops rejected due to object lookup/create failure - OpsRejected uint64 - // Number of async ops initialized - OpsInitialised uint64 - // Number of async ops queued for deferred release - OpsDeferred uint64 - // Number of async ops released (should equal ini=N when idle) - OpsReleased uint64 - // Number of deferred-release async ops garbage collected - OpsGarbageCollected uint64 - // Number of in-progress alloc_object() cache ops - CacheopAllocationsinProgress uint64 - // Number of in-progress lookup_object() cache ops - CacheopLookupObjectInProgress uint64 - // Number of in-progress lookup_complete() cache ops - CacheopLookupCompleteInPorgress uint64 - // Number of in-progress grab_object() cache ops - CacheopGrabObjectInProgress uint64 - CacheopInvalidations uint64 - // Number of in-progress update_object() cache ops - CacheopUpdateObjectInProgress uint64 - // Number of in-progress drop_object() cache ops - CacheopDropObjectInProgress uint64 - // Number of in-progress put_object() cache ops - CacheopPutObjectInProgress uint64 - // Number of in-progress attr_changed() cache ops - CacheopAttributeChangeInProgress uint64 - // Number of in-progress sync_cache() cache ops - CacheopSyncCacheInProgress uint64 - // Number of in-progress read_or_alloc_page() cache ops - CacheopReadOrAllocPageInProgress uint64 - // Number of in-progress read_or_alloc_pages() cache ops - CacheopReadOrAllocPagesInProgress uint64 - // Number of in-progress allocate_page() cache ops - CacheopAllocatePageInProgress uint64 - // Number of in-progress allocate_pages() cache ops - CacheopAllocatePagesInProgress uint64 - // Number of in-progress write_page() cache ops - CacheopWritePagesInProgress uint64 - // Number of in-progress uncache_page() cache ops - CacheopUncachePagesInProgress uint64 - // Number of in-progress dissociate_pages() cache ops - CacheopDissociatePagesInProgress uint64 - // Number of object lookups/creations rejected due to lack of space - CacheevLookupsAndCreationsRejectedLackSpace uint64 - // Number of stale objects deleted - CacheevStaleObjectsDeleted uint64 - // Number of objects retired when relinquished - CacheevRetiredWhenReliquished uint64 - // Number of objects culled - CacheevObjectsCulled uint64 -} - -// Fscacheinfo returns information about current fscache statistics. -// See https://www.kernel.org/doc/Documentation/filesystems/caching/fscache.txt -func (fs FS) Fscacheinfo() (Fscacheinfo, error) { - b, err := util.ReadFileNoStat(fs.proc.Path("fs/fscache/stats")) - if err != nil { - return Fscacheinfo{}, err - } - - m, err := parseFscacheinfo(bytes.NewReader(b)) - if err != nil { - return Fscacheinfo{}, fmt.Errorf("%w: Cannot parse %v: %w", ErrFileParse, m, err) - } - - return *m, nil -} - -func setFSCacheFields(fields []string, setFields ...*uint64) error { - var err error - if len(fields) < len(setFields) { - return fmt.Errorf("%w: Expected %d, but got %d: %w", ErrFileParse, len(setFields), len(fields), err) - } - - for i := range setFields { - *setFields[i], err = strconv.ParseUint(strings.Split(fields[i], "=")[1], 0, 64) - if err != nil { - return err - } - } - return nil -} - -func parseFscacheinfo(r io.Reader) (*Fscacheinfo, error) { - var m Fscacheinfo - s := bufio.NewScanner(r) - for s.Scan() { - fields := strings.Fields(s.Text()) - if len(fields) < 2 { - return nil, fmt.Errorf("%w: malformed Fscacheinfo line: %q", ErrFileParse, s.Text()) - } - - switch fields[0] { - case "Cookies:": - err := setFSCacheFields(fields[1:], &m.IndexCookiesAllocated, &m.DataStorageCookiesAllocated, - &m.SpecialCookiesAllocated) - if err != nil { - return &m, err - } - case "Objects:": - err := setFSCacheFields(fields[1:], &m.ObjectsAllocated, &m.ObjectAllocationsFailure, - &m.ObjectsAvailable, &m.ObjectsDead) - if err != nil { - return &m, err - } - case "ChkAux": - err := setFSCacheFields(fields[2:], &m.ObjectsWithoutCoherencyCheck, &m.ObjectsWithCoherencyCheck, - &m.ObjectsNeedCoherencyCheckUpdate, &m.ObjectsDeclaredObsolete) - if err != nil { - return &m, err - } - case "Pages": - err := setFSCacheFields(fields[2:], &m.PagesMarkedAsBeingCached, &m.UncachePagesRequestSeen) - if err != nil { - return &m, err - } - case "Acquire:": - err := setFSCacheFields(fields[1:], &m.AcquireCookiesRequestSeen, &m.AcquireRequestsWithNullParent, - &m.AcquireRequestsRejectedNoCacheAvailable, &m.AcquireRequestsSucceeded, &m.AcquireRequestsRejectedDueToError, - &m.AcquireRequestsFailedDueToEnomem) - if err != nil { - return &m, err - } - case "Lookups:": - err := setFSCacheFields(fields[1:], &m.LookupsNumber, &m.LookupsNegative, &m.LookupsPositive, - &m.ObjectsCreatedByLookup, &m.LookupsTimedOutAndRequed) - if err != nil { - return &m, err - } - case "Invals": - err := setFSCacheFields(fields[2:], &m.InvalidationsNumber, &m.InvalidationsRunning) - if err != nil { - return &m, err - } - case "Updates:": - err := setFSCacheFields(fields[1:], &m.UpdateCookieRequestSeen, &m.UpdateRequestsWithNullParent, - &m.UpdateRequestsRunning) - if err != nil { - return &m, err - } - case "Relinqs:": - err := setFSCacheFields(fields[1:], &m.RelinquishCookiesRequestSeen, &m.RelinquishCookiesWithNullParent, - &m.RelinquishRequestsWaitingCompleteCreation, &m.RelinquishRetries) - if err != nil { - return &m, err - } - case "AttrChg:": - err := setFSCacheFields(fields[1:], &m.AttributeChangedRequestsSeen, &m.AttributeChangedRequestsQueued, - &m.AttributeChangedRejectDueToEnobufs, &m.AttributeChangedFailedDueToEnomem, &m.AttributeChangedOps) - if err != nil { - return &m, err - } - case "Allocs": - if strings.Split(fields[2], "=")[0] == "n" { - err := setFSCacheFields(fields[2:], &m.AllocationRequestsSeen, &m.AllocationOkRequests, - &m.AllocationWaitingOnLookup, &m.AllocationsRejectedDueToEnobufs, &m.AllocationsAbortedDueToErestartsys) - if err != nil { - return &m, err - } - } else { - err := setFSCacheFields(fields[2:], &m.AllocationOperationsSubmitted, &m.AllocationsWaitedForCPU, - &m.AllocationsAbortedDueToObjectDeath) - if err != nil { - return &m, err - } - } - case "Retrvls:": - if strings.Split(fields[1], "=")[0] == "n" { - err := setFSCacheFields(fields[1:], &m.RetrievalsReadRequests, &m.RetrievalsOk, &m.RetrievalsWaitingLookupCompletion, - &m.RetrievalsReturnedEnodata, &m.RetrievalsRejectedDueToEnobufs, &m.RetrievalsAbortedDueToErestartsys, - &m.RetrievalsFailedDueToEnomem) - if err != nil { - return &m, err - } - } else { - err := setFSCacheFields(fields[1:], &m.RetrievalsRequests, &m.RetrievalsWaitingCPU, &m.RetrievalsAbortedDueToObjectDeath) - if err != nil { - return &m, err - } - } - case "Stores": - if strings.Split(fields[2], "=")[0] == "n" { - err := setFSCacheFields(fields[2:], &m.StoreWriteRequests, &m.StoreSuccessfulRequests, - &m.StoreRequestsOnPendingStorage, &m.StoreRequestsRejectedDueToEnobufs, &m.StoreRequestsFailedDueToEnomem) - if err != nil { - return &m, err - } - } else { - err := setFSCacheFields(fields[2:], &m.StoreRequestsSubmitted, &m.StoreRequestsRunning, - &m.StorePagesWithRequestsProcessing, &m.StoreRequestsDeleted, &m.StoreRequestsOverStoreLimit) - if err != nil { - return &m, err - } - } - case "VmScan": - err := setFSCacheFields(fields[2:], &m.ReleaseRequestsAgainstPagesWithNoPendingStorage, - &m.ReleaseRequestsAgainstPagesStoredByTimeLockGranted, &m.ReleaseRequestsIgnoredDueToInProgressStore, - &m.PageStoresCancelledByReleaseRequests, &m.VmscanWaiting) - if err != nil { - return &m, err - } - case "Ops": - if strings.Split(fields[2], "=")[0] == "pend" { - err := setFSCacheFields(fields[2:], &m.OpsPending, &m.OpsRunning, &m.OpsEnqueued, &m.OpsCancelled, &m.OpsRejected) - if err != nil { - return &m, err - } - } else { - err := setFSCacheFields(fields[2:], &m.OpsInitialised, &m.OpsDeferred, &m.OpsReleased, &m.OpsGarbageCollected) - if err != nil { - return &m, err - } - } - case "CacheOp:": - switch strings.Split(fields[1], "=")[0] { - case "alo": - err := setFSCacheFields(fields[1:], &m.CacheopAllocationsinProgress, &m.CacheopLookupObjectInProgress, - &m.CacheopLookupCompleteInPorgress, &m.CacheopGrabObjectInProgress) - if err != nil { - return &m, err - } - case "inv": - err := setFSCacheFields(fields[1:], &m.CacheopInvalidations, &m.CacheopUpdateObjectInProgress, - &m.CacheopDropObjectInProgress, &m.CacheopPutObjectInProgress, &m.CacheopAttributeChangeInProgress, - &m.CacheopSyncCacheInProgress) - if err != nil { - return &m, err - } - default: - err := setFSCacheFields(fields[1:], &m.CacheopReadOrAllocPageInProgress, &m.CacheopReadOrAllocPagesInProgress, - &m.CacheopAllocatePageInProgress, &m.CacheopAllocatePagesInProgress, &m.CacheopWritePagesInProgress, - &m.CacheopUncachePagesInProgress, &m.CacheopDissociatePagesInProgress) - if err != nil { - return &m, err - } - } - case "CacheEv:": - err := setFSCacheFields(fields[1:], &m.CacheevLookupsAndCreationsRejectedLackSpace, &m.CacheevStaleObjectsDeleted, - &m.CacheevRetiredWhenReliquished, &m.CacheevObjectsCulled) - if err != nil { - return &m, err - } - } - } - - return &m, nil -} diff --git a/vendor/github.com/prometheus/procfs/internal/fs/fs.go b/vendor/github.com/prometheus/procfs/internal/fs/fs.go deleted file mode 100644 index e7ccad66b..000000000 --- a/vendor/github.com/prometheus/procfs/internal/fs/fs.go +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright The Prometheus 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 fs - -import ( - "fmt" - "os" - "path/filepath" -) - -const ( - // DefaultProcMountPoint is the common mount point of the proc filesystem. - DefaultProcMountPoint = "/proc" - - // DefaultSysMountPoint is the common mount point of the sys filesystem. - DefaultSysMountPoint = "/sys" - - // DefaultConfigfsMountPoint is the common mount point of the configfs. - DefaultConfigfsMountPoint = "/sys/kernel/config" - - // DefaultSelinuxMountPoint is the common mount point of the selinuxfs. - DefaultSelinuxMountPoint = "/sys/fs/selinux" -) - -// FS represents a pseudo-filesystem, normally /proc or /sys, which provides an -// interface to kernel data structures. -type FS string - -// NewFS returns a new FS mounted under the given mountPoint. It will error -// if the mount point can't be read. -func NewFS(mountPoint string) (FS, error) { - info, err := os.Stat(mountPoint) - if err != nil { - return "", fmt.Errorf("could not read %q: %w", mountPoint, err) - } - if !info.IsDir() { - return "", fmt.Errorf("mount point %q is not a directory", mountPoint) - } - - return FS(mountPoint), nil -} - -// Path appends the given path elements to the filesystem path, adding separators -// as necessary. -func (fs FS) Path(p ...string) string { - return filepath.Join(append([]string{string(fs)}, p...)...) -} diff --git a/vendor/github.com/prometheus/procfs/internal/util/parse.go b/vendor/github.com/prometheus/procfs/internal/util/parse.go deleted file mode 100644 index 30c587201..000000000 --- a/vendor/github.com/prometheus/procfs/internal/util/parse.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright The Prometheus 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 util - -import ( - "errors" - "os" - "strconv" - "strings" -) - -// ParseUint32s parses a slice of strings into a slice of uint32s. -func ParseUint32s(ss []string) ([]uint32, error) { - us := make([]uint32, 0, len(ss)) - for _, s := range ss { - u, err := strconv.ParseUint(s, 10, 32) - if err != nil { - return nil, err - } - - us = append(us, uint32(u)) - } - - return us, nil -} - -// ParseUint64s parses a slice of strings into a slice of uint64s. -func ParseUint64s(ss []string) ([]uint64, error) { - us := make([]uint64, 0, len(ss)) - for _, s := range ss { - u, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return nil, err - } - - us = append(us, u) - } - - return us, nil -} - -// ParsePInt64s parses a slice of strings into a slice of int64 pointers. -func ParsePInt64s(ss []string) ([]*int64, error) { - us := make([]*int64, 0, len(ss)) - for _, s := range ss { - u, err := strconv.ParseInt(s, 10, 64) - if err != nil { - return nil, err - } - - us = append(us, &u) - } - - return us, nil -} - -// Parses a uint64 from given hex in string. -func ParseHexUint64s(ss []string) ([]*uint64, error) { - us := make([]*uint64, 0, len(ss)) - for _, s := range ss { - u, err := strconv.ParseUint(s, 16, 64) - if err != nil { - return nil, err - } - - us = append(us, &u) - } - - return us, nil -} - -// ReadUintFromFile reads a file and attempts to parse a uint64 from it. -func ReadUintFromFile(path string) (uint64, error) { - data, err := os.ReadFile(path) - if err != nil { - return 0, err - } - return strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) -} - -// ReadIntFromFile reads a file and attempts to parse a int64 from it. -func ReadIntFromFile(path string) (int64, error) { - data, err := os.ReadFile(path) - if err != nil { - return 0, err - } - return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64) -} - -// ParseBool parses a string into a boolean pointer. -func ParseBool(b string) *bool { - var truth bool - switch b { - case "enabled": - truth = true - case "disabled": - truth = false - default: - return nil - } - return &truth -} - -// ReadHexFromFile reads a file and attempts to parse a uint64 from a hexadecimal format 0xXX. -func ReadHexFromFile(path string) (uint64, error) { - data, err := os.ReadFile(path) - if err != nil { - return 0, err - } - hexString := strings.TrimSpace(string(data)) - if !strings.HasPrefix(hexString, "0x") { - return 0, errors.New("invalid format: hex string does not start with '0x'") - } - return strconv.ParseUint(hexString[2:], 16, 64) -} diff --git a/vendor/github.com/prometheus/procfs/internal/util/readfile.go b/vendor/github.com/prometheus/procfs/internal/util/readfile.go deleted file mode 100644 index 0e41f71af..000000000 --- a/vendor/github.com/prometheus/procfs/internal/util/readfile.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The Prometheus 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 util - -import ( - "io" - "os" -) - -// ReadFileNoStat uses io.ReadAll to read contents of entire file. -// This is similar to os.ReadFile but without the call to os.Stat, because -// many files in /proc and /sys report incorrect file sizes (either 0 or 4096). -// Reads a max file size of 1024kB. For files larger than this, a scanner -// should be used. -func ReadFileNoStat(filename string) ([]byte, error) { - const maxBufferSize = 1024 * 1024 - - f, err := os.Open(filename) - if err != nil { - return nil, err - } - defer f.Close() - - reader := io.LimitReader(f, maxBufferSize) - return io.ReadAll(reader) -} diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go deleted file mode 100644 index f6a4a4de6..000000000 --- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build (linux || darwin) && !appengine - -package util - -import ( - "bytes" - "os" - "strconv" - "strings" - "syscall" -) - -// SysReadFile is a simplified os.ReadFile that invokes syscall.Read directly. -// https://github.com/prometheus/node_exporter/pull/728/files -// -// Note that this function will not read files larger than 128 bytes. -func SysReadFile(file string) (string, error) { - f, err := os.Open(file) - if err != nil { - return "", err - } - defer f.Close() - - // On some machines, hwmon drivers are broken and return EAGAIN. This causes - // Go's os.ReadFile implementation to poll forever. - // - // Since we either want to read data or bail immediately, do the simplest - // possible read using syscall directly. - const sysFileBufferSize = 128 - b := make([]byte, sysFileBufferSize) - n, err := syscall.Read(int(f.Fd()), b) - if err != nil { - return "", err - } - - return string(bytes.TrimSpace(b[:n])), nil -} - -// SysReadUintFromFile reads a file using SysReadFile and attempts to parse a uint64 from it. -func SysReadUintFromFile(path string) (uint64, error) { - data, err := SysReadFile(path) - if err != nil { - return 0, err - } - return strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) -} - -// SysReadIntFromFile reads a file using SysReadFile and attempts to parse a int64 from it. -func SysReadIntFromFile(path string) (int64, error) { - data, err := SysReadFile(path) - if err != nil { - return 0, err - } - return strconv.ParseInt(strings.TrimSpace(string(data)), 10, 64) -} diff --git a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go b/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go deleted file mode 100644 index c80e082cb..000000000 --- a/vendor/github.com/prometheus/procfs/internal/util/sysreadfile_compat.go +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build (linux && appengine) || (!linux && !darwin) - -package util - -import ( - "fmt" -) - -// SysReadFile is here implemented as a noop for builds that do not support -// the read syscall. For example Windows, or Linux on Google App Engine. -func SysReadFile(file string) (string, error) { - return "", fmt.Errorf("not supported on this platform") -} diff --git a/vendor/github.com/prometheus/procfs/internal/util/valueparser.go b/vendor/github.com/prometheus/procfs/internal/util/valueparser.go deleted file mode 100644 index e0ed671ea..000000000 --- a/vendor/github.com/prometheus/procfs/internal/util/valueparser.go +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright The Prometheus 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 util - -import ( - "strconv" -) - -// TODO(mdlayher): util packages are an anti-pattern and this should be moved -// somewhere else that is more focused in the future. - -// A ValueParser enables parsing a single string into a variety of data types -// in a concise and safe way. The Err method must be invoked after invoking -// any other methods to ensure a value was successfully parsed. -type ValueParser struct { - v string - err error -} - -// NewValueParser creates a ValueParser using the input string. -func NewValueParser(v string) *ValueParser { - return &ValueParser{v: v} -} - -// Int interprets the underlying value as an int and returns that value. -func (vp *ValueParser) Int() int { return int(vp.int64()) } - -// PInt64 interprets the underlying value as an int64 and returns a pointer to -// that value. -func (vp *ValueParser) PInt64() *int64 { - if vp.err != nil { - return nil - } - - v := vp.int64() - return &v -} - -// int64 interprets the underlying value as an int64 and returns that value. -// TODO: export if/when necessary. -func (vp *ValueParser) int64() int64 { - if vp.err != nil { - return 0 - } - - // A base value of zero makes ParseInt infer the correct base using the - // string's prefix, if any. - const base = 0 - v, err := strconv.ParseInt(vp.v, base, 64) - if err != nil { - vp.err = err - return 0 - } - - return v -} - -// PUInt64 interprets the underlying value as an uint64 and returns a pointer to -// that value. -func (vp *ValueParser) PUInt64() *uint64 { - if vp.err != nil { - return nil - } - - // A base value of zero makes ParseInt infer the correct base using the - // string's prefix, if any. - const base = 0 - v, err := strconv.ParseUint(vp.v, base, 64) - if err != nil { - vp.err = err - return nil - } - - return &v -} - -// Err returns the last error, if any, encountered by the ValueParser. -func (vp *ValueParser) Err() error { - return vp.err -} diff --git a/vendor/github.com/prometheus/procfs/ipvs.go b/vendor/github.com/prometheus/procfs/ipvs.go deleted file mode 100644 index 5374da9fa..000000000 --- a/vendor/github.com/prometheus/procfs/ipvs.go +++ /dev/null @@ -1,241 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "encoding/hex" - "errors" - "fmt" - "io" - "net" - "os" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// IPVSStats holds IPVS statistics, as exposed by the kernel in `/proc/net/ip_vs_stats`. -type IPVSStats struct { - // Total count of connections. - Connections uint64 - // Total incoming packages processed. - IncomingPackets uint64 - // Total outgoing packages processed. - OutgoingPackets uint64 - // Total incoming traffic. - IncomingBytes uint64 - // Total outgoing traffic. - OutgoingBytes uint64 -} - -// IPVSBackendStatus holds current metrics of one virtual / real address pair. -type IPVSBackendStatus struct { - // The local (virtual) IP address. - LocalAddress net.IP - // The remote (real) IP address. - RemoteAddress net.IP - // The local (virtual) port. - LocalPort uint16 - // The remote (real) port. - RemotePort uint16 - // The local firewall mark - LocalMark string - // The transport protocol (TCP, UDP). - Proto string - // The current number of active connections for this virtual/real address pair. - ActiveConn uint64 - // The current number of inactive connections for this virtual/real address pair. - InactConn uint64 - // The current weight of this virtual/real address pair. - Weight uint64 -} - -// IPVSStats reads the IPVS statistics from the specified `proc` filesystem. -func (fs FS) IPVSStats() (IPVSStats, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("net/ip_vs_stats")) - if err != nil { - return IPVSStats{}, err - } - - return parseIPVSStats(bytes.NewReader(data)) -} - -// parseIPVSStats performs the actual parsing of `ip_vs_stats`. -func parseIPVSStats(r io.Reader) (IPVSStats, error) { - var ( - statContent []byte - statLines []string - statFields []string - stats IPVSStats - ) - - statContent, err := io.ReadAll(r) - if err != nil { - return IPVSStats{}, err - } - - statLines = strings.SplitN(string(statContent), "\n", 4) - if len(statLines) != 4 { - return IPVSStats{}, errors.New("ip_vs_stats corrupt: too short") - } - - statFields = strings.Fields(statLines[2]) - if len(statFields) != 5 { - return IPVSStats{}, errors.New("ip_vs_stats corrupt: unexpected number of fields") - } - - stats.Connections, err = strconv.ParseUint(statFields[0], 16, 64) - if err != nil { - return IPVSStats{}, err - } - stats.IncomingPackets, err = strconv.ParseUint(statFields[1], 16, 64) - if err != nil { - return IPVSStats{}, err - } - stats.OutgoingPackets, err = strconv.ParseUint(statFields[2], 16, 64) - if err != nil { - return IPVSStats{}, err - } - stats.IncomingBytes, err = strconv.ParseUint(statFields[3], 16, 64) - if err != nil { - return IPVSStats{}, err - } - stats.OutgoingBytes, err = strconv.ParseUint(statFields[4], 16, 64) - if err != nil { - return IPVSStats{}, err - } - - return stats, nil -} - -// IPVSBackendStatus reads and returns the status of all (virtual,real) server pairs from the specified `proc` filesystem. -func (fs FS) IPVSBackendStatus() ([]IPVSBackendStatus, error) { - file, err := os.Open(fs.proc.Path("net/ip_vs")) - if err != nil { - return nil, err - } - defer file.Close() - - return parseIPVSBackendStatus(file) -} - -func parseIPVSBackendStatus(file io.Reader) ([]IPVSBackendStatus, error) { - var ( - status []IPVSBackendStatus - scanner = bufio.NewScanner(file) - proto string - localMark string - localAddress net.IP - localPort uint16 - err error - ) - - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - if len(fields) == 0 { - continue - } - switch { - case fields[0] == "IP" || fields[0] == "Prot" || fields[1] == "RemoteAddress:Port": - continue - case fields[0] == "TCP" || fields[0] == "UDP": - if len(fields) < 2 { - continue - } - proto = fields[0] - localMark = "" - localAddress, localPort, err = parseIPPort(fields[1]) - if err != nil { - return nil, err - } - case fields[0] == "FWM": - if len(fields) < 2 { - continue - } - proto = fields[0] - localMark = fields[1] - localAddress = nil - localPort = 0 - case fields[0] == "->": - if len(fields) < 6 { - continue - } - remoteAddress, remotePort, err := parseIPPort(fields[1]) - if err != nil { - return nil, err - } - weight, err := strconv.ParseUint(fields[3], 10, 64) - if err != nil { - return nil, err - } - activeConn, err := strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, err - } - inactConn, err := strconv.ParseUint(fields[5], 10, 64) - if err != nil { - return nil, err - } - status = append(status, IPVSBackendStatus{ - LocalAddress: localAddress, - LocalPort: localPort, - LocalMark: localMark, - RemoteAddress: remoteAddress, - RemotePort: remotePort, - Proto: proto, - Weight: weight, - ActiveConn: activeConn, - InactConn: inactConn, - }) - } - } - return status, nil -} - -func parseIPPort(s string) (net.IP, uint16, error) { - var ( - ip net.IP - err error - ) - - switch len(s) { - case 13: - ip, err = hex.DecodeString(s[0:8]) - if err != nil { - return nil, 0, err - } - case 46: - ip = net.ParseIP(s[1:40]) - if ip == nil { - return nil, 0, fmt.Errorf("%w: Invalid IPv6 addr %s: %w", ErrFileParse, s[1:40], err) - } - default: - return nil, 0, fmt.Errorf("%w: Unexpected IP:Port %s: %w", ErrFileParse, s, err) - } - - portString := s[len(s)-4:] - if len(portString) != 4 { - return nil, 0, - fmt.Errorf("%w: Unexpected port string format %s: %w", ErrFileParse, portString, err) - } - port, err := strconv.ParseUint(portString, 16, 16) - if err != nil { - return nil, 0, err - } - - return ip, uint16(port), nil -} diff --git a/vendor/github.com/prometheus/procfs/kernel_hung.go b/vendor/github.com/prometheus/procfs/kernel_hung.go deleted file mode 100644 index 0c7a69f99..000000000 --- a/vendor/github.com/prometheus/procfs/kernel_hung.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !windows - -package procfs - -import ( - "os" - "strconv" - "strings" -) - -// KernelHung contains information about to the kernel's hung_task_detect_count number. -type KernelHung struct { - // Indicates the total number of tasks that have been detected as hung since the system boot. - // This file shows up if `CONFIG_DETECT_HUNG_TASK` is enabled. - HungTaskDetectCount *uint64 -} - -// KernelHung returns values from /proc/sys/kernel/hung_task_detect_count. -func (fs FS) KernelHung() (KernelHung, error) { - data, err := os.ReadFile(fs.proc.Path("sys", "kernel", "hung_task_detect_count")) - if err != nil { - return KernelHung{}, err - } - val, err := strconv.ParseUint(strings.TrimSpace(string(data)), 10, 64) - if err != nil { - return KernelHung{}, err - } - return KernelHung{ - HungTaskDetectCount: &val, - }, nil -} diff --git a/vendor/github.com/prometheus/procfs/kernel_random.go b/vendor/github.com/prometheus/procfs/kernel_random.go deleted file mode 100644 index e7c5b8cf2..000000000 --- a/vendor/github.com/prometheus/procfs/kernel_random.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !windows - -package procfs - -import ( - "os" - - "github.com/prometheus/procfs/internal/util" -) - -// KernelRandom contains information about to the kernel's random number generator. -type KernelRandom struct { - // EntropyAvaliable gives the available entropy, in bits. - EntropyAvaliable *uint64 - // PoolSize gives the size of the entropy pool, in bits. - PoolSize *uint64 - // URandomMinReseedSeconds is the number of seconds after which the DRNG will be reseeded. - URandomMinReseedSeconds *uint64 - // WriteWakeupThreshold the number of bits of entropy below which we wake up processes - // that do a select(2) or poll(2) for write access to /dev/random. - WriteWakeupThreshold *uint64 - // ReadWakeupThreshold is the number of bits of entropy required for waking up processes that sleep - // waiting for entropy from /dev/random. - ReadWakeupThreshold *uint64 -} - -// KernelRandom returns values from /proc/sys/kernel/random. -func (fs FS) KernelRandom() (KernelRandom, error) { - random := KernelRandom{} - - for file, p := range map[string]**uint64{ - "entropy_avail": &random.EntropyAvaliable, - "poolsize": &random.PoolSize, - "urandom_min_reseed_secs": &random.URandomMinReseedSeconds, - "write_wakeup_threshold": &random.WriteWakeupThreshold, - "read_wakeup_threshold": &random.ReadWakeupThreshold, - } { - val, err := util.ReadUintFromFile(fs.proc.Path("sys", "kernel", "random", file)) - if os.IsNotExist(err) { - continue - } - if err != nil { - return random, err - } - *p = &val - } - - return random, nil -} diff --git a/vendor/github.com/prometheus/procfs/loadavg.go b/vendor/github.com/prometheus/procfs/loadavg.go deleted file mode 100644 index c8c78a65e..000000000 --- a/vendor/github.com/prometheus/procfs/loadavg.go +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// LoadAvg represents an entry in /proc/loadavg. -type LoadAvg struct { - Load1 float64 - Load5 float64 - Load15 float64 -} - -// LoadAvg returns loadavg from /proc. -func (fs FS) LoadAvg() (*LoadAvg, error) { - path := fs.proc.Path("loadavg") - - data, err := util.ReadFileNoStat(path) - if err != nil { - return nil, err - } - return parseLoad(data) -} - -// Parse /proc loadavg and return 1m, 5m and 15m. -func parseLoad(loadavgBytes []byte) (*LoadAvg, error) { - loads := make([]float64, 3) - parts := strings.Fields(string(loadavgBytes)) - if len(parts) < 3 { - return nil, fmt.Errorf("%w: Malformed line %q", ErrFileParse, string(loadavgBytes)) - } - - var err error - for i, load := range parts[0:3] { - loads[i], err = strconv.ParseFloat(load, 64) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse load: %f: %w", ErrFileParse, loads[i], err) - } - } - return &LoadAvg{ - Load1: loads[0], - Load5: loads[1], - Load15: loads[2], - }, nil -} diff --git a/vendor/github.com/prometheus/procfs/mdstat.go b/vendor/github.com/prometheus/procfs/mdstat.go deleted file mode 100644 index d66eeda82..000000000 --- a/vendor/github.com/prometheus/procfs/mdstat.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "os" - "regexp" - "strconv" - "strings" -) - -var ( - statusLineRE = regexp.MustCompile(`(\d+) blocks .*\[(\d+)/(\d+)\] \[([U_]+)\]`) - recoveryLineBlocksRE = regexp.MustCompile(`\((\d+/\d+)\)`) - recoveryLinePctRE = regexp.MustCompile(`= (.+)%`) - recoveryLineFinishRE = regexp.MustCompile(`finish=(.+)min`) - recoveryLineSpeedRE = regexp.MustCompile(`speed=(.+)[A-Z]`) - componentDeviceRE = regexp.MustCompile(`(.*)\[(\d+)\](\([SF]+\))?`) - personalitiesPrefix = "Personalities : " -) - -type MDStatComponent struct { - // Name of the component device. - Name string - // DescriptorIndex number of component device, e.g. the order in the superblock. - DescriptorIndex int32 - // Flags per Linux drivers/md/md.[ch] as of v6.12-rc1 - // Subset that are exposed in mdstat - WriteMostly bool - Journal bool - Faulty bool // "Faulty" is what kernel source uses for "(F)" - Spare bool - Replacement bool - // Some additional flags that are NOT exposed in procfs today; they may - // be available via sysfs. - // In_sync, Bitmap_sync, Blocked, WriteErrorSeen, FaultRecorded, - // BlockedBadBlocks, WantReplacement, Candidate, ... -} - -// MDStat holds info parsed from /proc/mdstat. -type MDStat struct { - // Name of the device. - Name string - // raid type of the device. - Type string - // activity-state of the device. - ActivityState string - // Number of active disks. - DisksActive int64 - // Total number of disks the device requires. - DisksTotal int64 - // Number of failed disks. - DisksFailed int64 - // Number of "down" disks. (the _ indicator in the status line) - DisksDown int64 - // Spare disks in the device. - DisksSpare int64 - // Number of blocks the device holds. - BlocksTotal int64 - // Number of blocks on the device that are in sync. - BlocksSynced int64 - // Number of blocks on the device that need to be synced. - BlocksToBeSynced int64 - // progress percentage of current sync - BlocksSyncedPct float64 - // estimated finishing time for current sync (in minutes) - BlocksSyncedFinishTime float64 - // current sync speed (in Kilobytes/sec) - BlocksSyncedSpeed float64 - // component devices - Devices []MDStatComponent -} - -// MDStat parses an mdstat-file (/proc/mdstat) and returns a slice of -// structs containing the relevant info. More information available here: -// https://raid.wiki.kernel.org/index.php/Mdstat -func (fs FS) MDStat() ([]MDStat, error) { - data, err := os.ReadFile(fs.proc.Path("mdstat")) - if err != nil { - return nil, err - } - mdstat, err := parseMDStat(data) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse %v: %w", ErrFileParse, fs.proc.Path("mdstat"), err) - } - return mdstat, nil -} - -// parseMDStat parses data from mdstat file (/proc/mdstat) and returns a slice of -// structs containing the relevant info. -func parseMDStat(mdStatData []byte) ([]MDStat, error) { - // TODO: - // - parse global hotspares from the "unused devices" line. - mdStats := []MDStat{} - lines := strings.Split(string(mdStatData), "\n") - knownRaidTypes := make(map[string]bool) - - for i, line := range lines { - if strings.TrimSpace(line) == "" || line[0] == ' ' || - strings.HasPrefix(line, "unused") { - continue - } - // Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] - if len(knownRaidTypes) == 0 && strings.HasPrefix(line, personalitiesPrefix) { - personalities := strings.Fields(line[len(personalitiesPrefix):]) - for _, word := range personalities { - word := word[1 : len(word)-1] - knownRaidTypes[word] = true - } - continue - } - - deviceFields := strings.Fields(line) - if len(deviceFields) < 3 { - return nil, fmt.Errorf("%w: Expected 3+ lines, got %q", ErrFileParse, line) - } - mdName := deviceFields[0] // mdx - state := deviceFields[2] // active, inactive, broken - - mdType := "unknown" // raid1, raid5, etc. - var deviceStartIndex int - if len(deviceFields) > 3 { // mdType may be in the 3rd or 4th field - if isRaidType(deviceFields[3], knownRaidTypes) { - mdType = deviceFields[3] - deviceStartIndex = 4 - } else if len(deviceFields) > 4 && isRaidType(deviceFields[4], knownRaidTypes) { - // if the 3rd field is (...), the 4th field is the mdType - mdType = deviceFields[4] - deviceStartIndex = 5 - } - } - - if len(lines) <= i+3 { - return nil, fmt.Errorf("%w: Too few lines for md device: %q", ErrFileParse, mdName) - } - - // Failed (Faulty) disks have the suffix (F) & Spare disks have the suffix (S). - fail := int64(strings.Count(line, "(F)")) - spare := int64(strings.Count(line, "(S)")) - active, total, down, size, err := evalStatusLine(lines[i], lines[i+1]) - - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse md device lines: %v: %w", ErrFileParse, active, err) - } - - syncLineIdx := i + 2 - if strings.Contains(lines[i+2], "bitmap") { // skip bitmap line - syncLineIdx++ - } - - // If device is syncing at the moment, get the number of currently - // synced bytes, otherwise that number equals the size of the device. - blocksSynced := size - blocksToBeSynced := size - speed := float64(0) - finish := float64(0) - pct := float64(0) - recovering := strings.Contains(lines[syncLineIdx], "recovery") - reshaping := strings.Contains(lines[syncLineIdx], "reshape") - resyncing := strings.Contains(lines[syncLineIdx], "resync") - checking := strings.Contains(lines[syncLineIdx], "check") - - // Append recovery and resyncing state info. - if recovering || resyncing || checking || reshaping { - switch { - case recovering: - state = "recovering" - case reshaping: - state = "reshaping" - case checking: - state = "checking" - default: - state = "resyncing" - } - - // Handle case when resync=PENDING or resync=DELAYED. - if strings.Contains(lines[syncLineIdx], "PENDING") || - strings.Contains(lines[syncLineIdx], "DELAYED") { - blocksSynced = 0 - } else { - blocksSynced, blocksToBeSynced, pct, finish, speed, err = evalRecoveryLine(lines[syncLineIdx]) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse sync line in md device: %q: %w", ErrFileParse, mdName, err) - } - } - } - - devices, err := evalComponentDevices(deviceFields[deviceStartIndex:]) - if err != nil { - return nil, fmt.Errorf("error parsing components in md device %q: %w", mdName, err) - } - - mdStats = append(mdStats, MDStat{ - Name: mdName, - Type: mdType, - ActivityState: state, - DisksActive: active, - DisksFailed: fail, - DisksDown: down, - DisksSpare: spare, - DisksTotal: total, - BlocksTotal: size, - BlocksSynced: blocksSynced, - BlocksToBeSynced: blocksToBeSynced, - BlocksSyncedPct: pct, - BlocksSyncedFinishTime: finish, - BlocksSyncedSpeed: speed, - Devices: devices, - }) - } - - return mdStats, nil -} - -// check if a string's format is like the mdType -// Rule 1: mdType should not be like (...) -// Rule 2: mdType should not be like sda[0] -// . -func isRaidType(mdType string, knownRaidTypes map[string]bool) bool { - _, ok := knownRaidTypes[mdType] - return !strings.ContainsAny(mdType, "([") && ok -} - -func evalStatusLine(deviceLine, statusLine string) (active, total, down, size int64, err error) { - // e.g. 523968 blocks super 1.2 [4/4] [UUUU] - statusFields := strings.Fields(statusLine) - if len(statusFields) < 1 { - return 0, 0, 0, 0, fmt.Errorf("%w: Unexpected statusline %q: %w", ErrFileParse, statusLine, err) - } - - sizeStr := statusFields[0] - size, err = strconv.ParseInt(sizeStr, 10, 64) - if err != nil { - return 0, 0, 0, 0, fmt.Errorf("%w: Unexpected statusline %q: %w", ErrFileParse, statusLine, err) - } - - if strings.Contains(deviceLine, "raid0") || strings.Contains(deviceLine, "linear") { - // In the device deviceLine, only disks have a number associated with them in []. - total = int64(strings.Count(deviceLine, "[")) - return total, total, 0, size, nil - } - - if strings.Contains(deviceLine, "inactive") { - return 0, 0, 0, size, nil - } - - matches := statusLineRE.FindStringSubmatch(statusLine) - if len(matches) != 5 { - return 0, 0, 0, 0, fmt.Errorf("%w: Could not fild all substring matches %s: %w", ErrFileParse, statusLine, err) - } - - total, err = strconv.ParseInt(matches[2], 10, 64) - if err != nil { - return 0, 0, 0, 0, fmt.Errorf("%w: Unexpected statusline %q: %w", ErrFileParse, statusLine, err) - } - - active, err = strconv.ParseInt(matches[3], 10, 64) - if err != nil { - return 0, 0, 0, 0, fmt.Errorf("%w: Unexpected active %d: %w", ErrFileParse, active, err) - } - down = int64(strings.Count(matches[4], "_")) - - return active, total, down, size, nil -} - -func evalRecoveryLine(recoveryLine string) (blocksSynced int64, blocksToBeSynced int64, pct float64, finish float64, speed float64, err error) { - matches := recoveryLineBlocksRE.FindStringSubmatch(recoveryLine) - if len(matches) != 2 { - return 0, 0, 0, 0, 0, fmt.Errorf("%w: Unexpected recoveryLine blocks %s: %w", ErrFileParse, recoveryLine, err) - } - - blocks := strings.Split(matches[1], "/") - blocksSynced, err = strconv.ParseInt(blocks[0], 10, 64) - if err != nil { - return 0, 0, 0, 0, 0, fmt.Errorf("%w: Unable to parse recovery blocks synced %q: %w", ErrFileParse, matches[1], err) - } - - blocksToBeSynced, err = strconv.ParseInt(blocks[1], 10, 64) - if err != nil { - return blocksSynced, 0, 0, 0, 0, fmt.Errorf("%w: Unable to parse recovery to be synced blocks %q: %w", ErrFileParse, matches[2], err) - } - - // Get percentage complete - matches = recoveryLinePctRE.FindStringSubmatch(recoveryLine) - if len(matches) != 2 { - return blocksSynced, blocksToBeSynced, 0, 0, 0, fmt.Errorf("%w: Unexpected recoveryLine matching percentage %s", ErrFileParse, recoveryLine) - } - pct, err = strconv.ParseFloat(strings.TrimSpace(matches[1]), 64) - if err != nil { - return blocksSynced, blocksToBeSynced, 0, 0, 0, fmt.Errorf("%w: Error parsing float from recoveryLine %q", ErrFileParse, recoveryLine) - } - - // Get time expected left to complete - matches = recoveryLineFinishRE.FindStringSubmatch(recoveryLine) - if len(matches) != 2 { - return blocksSynced, blocksToBeSynced, pct, 0, 0, fmt.Errorf("%w: Unexpected recoveryLine matching est. finish time: %s", ErrFileParse, recoveryLine) - } - finish, err = strconv.ParseFloat(matches[1], 64) - if err != nil { - return blocksSynced, blocksToBeSynced, pct, 0, 0, fmt.Errorf("%w: Unable to parse float from recoveryLine: %q", ErrFileParse, recoveryLine) - } - - // Get recovery speed - matches = recoveryLineSpeedRE.FindStringSubmatch(recoveryLine) - if len(matches) != 2 { - return blocksSynced, blocksToBeSynced, pct, finish, 0, fmt.Errorf("%w: Unexpected recoveryLine value: %s", ErrFileParse, recoveryLine) - } - speed, err = strconv.ParseFloat(matches[1], 64) - if err != nil { - return blocksSynced, blocksToBeSynced, pct, finish, 0, fmt.Errorf("%w: Error parsing float from recoveryLine: %q: %w", ErrFileParse, recoveryLine, err) - } - - return blocksSynced, blocksToBeSynced, pct, finish, speed, nil -} - -func evalComponentDevices(deviceFields []string) ([]MDStatComponent, error) { - mdComponentDevices := make([]MDStatComponent, 0) - for _, field := range deviceFields { - match := componentDeviceRE.FindStringSubmatch(field) - if match == nil { - continue - } - descriptorIndex, err := strconv.ParseInt(match[2], 10, 32) - if err != nil { - return mdComponentDevices, fmt.Errorf("error parsing int from device %q: %w", match[2], err) - } - mdComponentDevices = append(mdComponentDevices, MDStatComponent{ - Name: match[1], - DescriptorIndex: int32(descriptorIndex), - // match may contain one or more of these - // https://github.com/torvalds/linux/blob/7ec462100ef9142344ddbf86f2c3008b97acddbe/drivers/md/md.c#L8376-L8392 - Faulty: strings.Contains(match[3], "(F)"), - Spare: strings.Contains(match[3], "(S)"), - Journal: strings.Contains(match[3], "(J)"), - Replacement: strings.Contains(match[3], "(R)"), - WriteMostly: strings.Contains(match[3], "(W)"), - }) - } - - return mdComponentDevices, nil -} diff --git a/vendor/github.com/prometheus/procfs/meminfo.go b/vendor/github.com/prometheus/procfs/meminfo.go deleted file mode 100644 index 342038318..000000000 --- a/vendor/github.com/prometheus/procfs/meminfo.go +++ /dev/null @@ -1,422 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Meminfo represents memory statistics. -type Meminfo struct { - // Total usable ram (i.e. physical ram minus a few reserved - // bits and the kernel binary code) - MemTotal *uint64 - // The sum of LowFree+HighFree - MemFree *uint64 - // An estimate of how much memory is available for starting - // new applications, without swapping. Calculated from - // MemFree, SReclaimable, the size of the file LRU lists, and - // the low watermarks in each zone. The estimate takes into - // account that the system needs some page cache to function - // well, and that not all reclaimable slab will be - // reclaimable, due to items being in use. The impact of those - // factors will vary from system to system. - MemAvailable *uint64 - // Relatively temporary storage for raw disk blocks shouldn't - // get tremendously large (20MB or so) - Buffers *uint64 - Cached *uint64 - // Memory that once was swapped out, is swapped back in but - // still also is in the swapfile (if memory is needed it - // doesn't need to be swapped out AGAIN because it is already - // in the swapfile. This saves I/O) - SwapCached *uint64 - // Memory that has been used more recently and usually not - // reclaimed unless absolutely necessary. - Active *uint64 - // Memory which has been less recently used. It is more - // eligible to be reclaimed for other purposes - Inactive *uint64 - ActiveAnon *uint64 - InactiveAnon *uint64 - ActiveFile *uint64 - InactiveFile *uint64 - Unevictable *uint64 - Mlocked *uint64 - // total amount of swap space available - SwapTotal *uint64 - // Memory which has been evicted from RAM, and is temporarily - // on the disk - SwapFree *uint64 - // Memory consumed by the zswap backend (compressed size) - Zswap *uint64 - // Amount of anonymous memory stored in zswap (original size) - Zswapped *uint64 - // Memory which is waiting to get written back to the disk - Dirty *uint64 - // Memory which is actively being written back to the disk - Writeback *uint64 - // Non-file backed pages mapped into userspace page tables - AnonPages *uint64 - // files which have been mapped, such as libraries - Mapped *uint64 - Shmem *uint64 - // in-kernel data structures cache - Slab *uint64 - // Part of Slab, that might be reclaimed, such as caches - SReclaimable *uint64 - // Part of Slab, that cannot be reclaimed on memory pressure - SUnreclaim *uint64 - KernelStack *uint64 - // amount of memory dedicated to the lowest level of page - // tables. - PageTables *uint64 - // secondary page tables. - SecPageTables *uint64 - // NFS pages sent to the server, but not yet committed to - // stable storage - NFSUnstable *uint64 - // Memory used for block device "bounce buffers" - Bounce *uint64 - // Memory used by FUSE for temporary writeback buffers - WritebackTmp *uint64 - // Based on the overcommit ratio ('vm.overcommit_ratio'), - // this is the total amount of memory currently available to - // be allocated on the system. This limit is only adhered to - // if strict overcommit accounting is enabled (mode 2 in - // 'vm.overcommit_memory'). - // The CommitLimit is calculated with the following formula: - // CommitLimit = ([total RAM pages] - [total huge TLB pages]) * - // overcommit_ratio / 100 + [total swap pages] - // For example, on a system with 1G of physical RAM and 7G - // of swap with a `vm.overcommit_ratio` of 30 it would - // yield a CommitLimit of 7.3G. - // For more details, see the memory overcommit documentation - // in vm/overcommit-accounting. - CommitLimit *uint64 - // The amount of memory presently allocated on the system. - // The committed memory is a sum of all of the memory which - // has been allocated by processes, even if it has not been - // "used" by them as of yet. A process which malloc()'s 1G - // of memory, but only touches 300M of it will show up as - // using 1G. This 1G is memory which has been "committed" to - // by the VM and can be used at any time by the allocating - // application. With strict overcommit enabled on the system - // (mode 2 in 'vm.overcommit_memory'),allocations which would - // exceed the CommitLimit (detailed above) will not be permitted. - // This is useful if one needs to guarantee that processes will - // not fail due to lack of memory once that memory has been - // successfully allocated. - CommittedAS *uint64 - // total size of vmalloc memory area - VmallocTotal *uint64 - // amount of vmalloc area which is used - VmallocUsed *uint64 - // largest contiguous block of vmalloc area which is free - VmallocChunk *uint64 - Percpu *uint64 - HardwareCorrupted *uint64 - AnonHugePages *uint64 - FileHugePages *uint64 - ShmemHugePages *uint64 - ShmemPmdMapped *uint64 - CmaTotal *uint64 - CmaFree *uint64 - Unaccepted *uint64 - HugePagesTotal *uint64 - HugePagesFree *uint64 - HugePagesRsvd *uint64 - HugePagesSurp *uint64 - Hugepagesize *uint64 - Hugetlb *uint64 - DirectMap4k *uint64 - DirectMap2M *uint64 - DirectMap1G *uint64 - - // The struct fields below are the byte-normalized counterparts to the - // existing struct fields. Values are normalized using the optional - // unit field in the meminfo line. - MemTotalBytes *uint64 - MemFreeBytes *uint64 - MemAvailableBytes *uint64 - BuffersBytes *uint64 - CachedBytes *uint64 - SwapCachedBytes *uint64 - ActiveBytes *uint64 - InactiveBytes *uint64 - ActiveAnonBytes *uint64 - InactiveAnonBytes *uint64 - ActiveFileBytes *uint64 - InactiveFileBytes *uint64 - UnevictableBytes *uint64 - MlockedBytes *uint64 - SwapTotalBytes *uint64 - SwapFreeBytes *uint64 - ZswapBytes *uint64 - ZswappedBytes *uint64 - DirtyBytes *uint64 - WritebackBytes *uint64 - AnonPagesBytes *uint64 - MappedBytes *uint64 - ShmemBytes *uint64 - SlabBytes *uint64 - SReclaimableBytes *uint64 - SUnreclaimBytes *uint64 - KernelStackBytes *uint64 - PageTablesBytes *uint64 - SecPageTablesBytes *uint64 - NFSUnstableBytes *uint64 - BounceBytes *uint64 - WritebackTmpBytes *uint64 - CommitLimitBytes *uint64 - CommittedASBytes *uint64 - VmallocTotalBytes *uint64 - VmallocUsedBytes *uint64 - VmallocChunkBytes *uint64 - PercpuBytes *uint64 - HardwareCorruptedBytes *uint64 - AnonHugePagesBytes *uint64 - FileHugePagesBytes *uint64 - ShmemHugePagesBytes *uint64 - ShmemPmdMappedBytes *uint64 - CmaTotalBytes *uint64 - CmaFreeBytes *uint64 - UnacceptedBytes *uint64 - HugepagesizeBytes *uint64 - HugetlbBytes *uint64 - DirectMap4kBytes *uint64 - DirectMap2MBytes *uint64 - DirectMap1GBytes *uint64 -} - -// Meminfo returns an information about current kernel/system memory statistics. -// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt -func (fs FS) Meminfo() (Meminfo, error) { - b, err := util.ReadFileNoStat(fs.proc.Path("meminfo")) - if err != nil { - return Meminfo{}, err - } - - m, err := parseMemInfo(bytes.NewReader(b)) - if err != nil { - return Meminfo{}, fmt.Errorf("%w: %w", ErrFileParse, err) - } - - return *m, nil -} - -func parseMemInfo(r io.Reader) (*Meminfo, error) { - var m Meminfo - s := bufio.NewScanner(r) - for s.Scan() { - fields := strings.Fields(s.Text()) - var val, valBytes uint64 - - val, err := strconv.ParseUint(fields[1], 0, 64) - if err != nil { - return nil, err - } - - switch len(fields) { - case 2: - // No unit present, use the parsed the value as bytes directly. - valBytes = val - case 3: - // Unit present in optional 3rd field, convert it to - // bytes. The only unit supported within the Linux - // kernel is `kB`. - if fields[2] != "kB" { - return nil, fmt.Errorf("%w: Unsupported unit in optional 3rd field %q", ErrFileParse, fields[2]) - } - - valBytes = 1024 * val - - default: - return nil, fmt.Errorf("%w: Malformed line %q", ErrFileParse, s.Text()) - } - - switch fields[0] { - case "MemTotal:": - m.MemTotal = &val - m.MemTotalBytes = &valBytes - case "MemFree:": - m.MemFree = &val - m.MemFreeBytes = &valBytes - case "MemAvailable:": - m.MemAvailable = &val - m.MemAvailableBytes = &valBytes - case "Buffers:": - m.Buffers = &val - m.BuffersBytes = &valBytes - case "Cached:": - m.Cached = &val - m.CachedBytes = &valBytes - case "SwapCached:": - m.SwapCached = &val - m.SwapCachedBytes = &valBytes - case "Active:": - m.Active = &val - m.ActiveBytes = &valBytes - case "Inactive:": - m.Inactive = &val - m.InactiveBytes = &valBytes - case "Active(anon):": - m.ActiveAnon = &val - m.ActiveAnonBytes = &valBytes - case "Inactive(anon):": - m.InactiveAnon = &val - m.InactiveAnonBytes = &valBytes - case "Active(file):": - m.ActiveFile = &val - m.ActiveFileBytes = &valBytes - case "Inactive(file):": - m.InactiveFile = &val - m.InactiveFileBytes = &valBytes - case "Unevictable:": - m.Unevictable = &val - m.UnevictableBytes = &valBytes - case "Mlocked:": - m.Mlocked = &val - m.MlockedBytes = &valBytes - case "SwapTotal:": - m.SwapTotal = &val - m.SwapTotalBytes = &valBytes - case "SwapFree:": - m.SwapFree = &val - m.SwapFreeBytes = &valBytes - case "Zswap:": - m.Zswap = &val - m.ZswapBytes = &valBytes - case "Zswapped:": - m.Zswapped = &val - m.ZswappedBytes = &valBytes - case "Dirty:": - m.Dirty = &val - m.DirtyBytes = &valBytes - case "Writeback:": - m.Writeback = &val - m.WritebackBytes = &valBytes - case "AnonPages:": - m.AnonPages = &val - m.AnonPagesBytes = &valBytes - case "Mapped:": - m.Mapped = &val - m.MappedBytes = &valBytes - case "Shmem:": - m.Shmem = &val - m.ShmemBytes = &valBytes - case "Slab:": - m.Slab = &val - m.SlabBytes = &valBytes - case "SReclaimable:": - m.SReclaimable = &val - m.SReclaimableBytes = &valBytes - case "SUnreclaim:": - m.SUnreclaim = &val - m.SUnreclaimBytes = &valBytes - case "KernelStack:": - m.KernelStack = &val - m.KernelStackBytes = &valBytes - case "PageTables:": - m.PageTables = &val - m.PageTablesBytes = &valBytes - case "SecPageTables:": - m.SecPageTables = &val - m.SecPageTablesBytes = &valBytes - case "NFS_Unstable:": - m.NFSUnstable = &val - m.NFSUnstableBytes = &valBytes - case "Bounce:": - m.Bounce = &val - m.BounceBytes = &valBytes - case "WritebackTmp:": - m.WritebackTmp = &val - m.WritebackTmpBytes = &valBytes - case "CommitLimit:": - m.CommitLimit = &val - m.CommitLimitBytes = &valBytes - case "Committed_AS:": - m.CommittedAS = &val - m.CommittedASBytes = &valBytes - case "VmallocTotal:": - m.VmallocTotal = &val - m.VmallocTotalBytes = &valBytes - case "VmallocUsed:": - m.VmallocUsed = &val - m.VmallocUsedBytes = &valBytes - case "VmallocChunk:": - m.VmallocChunk = &val - m.VmallocChunkBytes = &valBytes - case "Percpu:": - m.Percpu = &val - m.PercpuBytes = &valBytes - case "HardwareCorrupted:": - m.HardwareCorrupted = &val - m.HardwareCorruptedBytes = &valBytes - case "AnonHugePages:": - m.AnonHugePages = &val - m.AnonHugePagesBytes = &valBytes - case "FileHugePages:": - m.FileHugePages = &val - m.FileHugePagesBytes = &valBytes - case "ShmemHugePages:": - m.ShmemHugePages = &val - m.ShmemHugePagesBytes = &valBytes - case "ShmemPmdMapped:": - m.ShmemPmdMapped = &val - m.ShmemPmdMappedBytes = &valBytes - case "CmaTotal:": - m.CmaTotal = &val - m.CmaTotalBytes = &valBytes - case "CmaFree:": - m.CmaFree = &val - m.CmaFreeBytes = &valBytes - case "Unaccepted:": - m.Unaccepted = &val - m.UnacceptedBytes = &valBytes - case "HugePages_Total:": - m.HugePagesTotal = &val - case "HugePages_Free:": - m.HugePagesFree = &val - case "HugePages_Rsvd:": - m.HugePagesRsvd = &val - case "HugePages_Surp:": - m.HugePagesSurp = &val - case "Hugepagesize:": - m.Hugepagesize = &val - m.HugepagesizeBytes = &valBytes - case "Hugetlb:": - m.Hugetlb = &val - m.HugetlbBytes = &valBytes - case "DirectMap4k:": - m.DirectMap4k = &val - m.DirectMap4kBytes = &valBytes - case "DirectMap2M:": - m.DirectMap2M = &val - m.DirectMap2MBytes = &valBytes - case "DirectMap1G:": - m.DirectMap1G = &val - m.DirectMap1GBytes = &valBytes - } - } - - return &m, nil -} diff --git a/vendor/github.com/prometheus/procfs/mountinfo.go b/vendor/github.com/prometheus/procfs/mountinfo.go deleted file mode 100644 index 8594ae7f1..000000000 --- a/vendor/github.com/prometheus/procfs/mountinfo.go +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "os" - "strconv" - "strings" -) - -// A MountInfo is a type that describes the details, options -// for each mount, parsed from /proc/self/mountinfo. -// The fields described in each entry of /proc/self/mountinfo -// is described in the following man page. -// http://man7.org/linux/man-pages/man5/proc.5.html -type MountInfo struct { - // Unique ID for the mount - MountID int - // The ID of the parent mount - ParentID int - // The value of `st_dev` for the files on this FS - MajorMinorVer string - // The pathname of the directory in the FS that forms - // the root for this mount - Root string - // The pathname of the mount point relative to the root - MountPoint string - // Mount options - Options map[string]string - // Zero or more optional fields - OptionalFields map[string]string - // The Filesystem type - FSType string - // FS specific information or "none" - Source string - // Superblock options - SuperOptions map[string]string -} - -// Reads each line of the mountinfo file, and returns a list of formatted MountInfo structs. -func parseMountInfo(info []byte) ([]*MountInfo, error) { - mounts := []*MountInfo{} - scanner := bufio.NewScanner(bytes.NewReader(info)) - for scanner.Scan() { - mountString := scanner.Text() - parsedMounts, err := parseMountInfoString(mountString) - if err != nil { - return nil, err - } - mounts = append(mounts, parsedMounts) - } - - err := scanner.Err() - return mounts, err -} - -// Parses a mountinfo file line, and converts it to a MountInfo struct. -// An important check here is to see if the hyphen separator, as if it does not exist, -// it means that the line is malformed. -func parseMountInfoString(mountString string) (*MountInfo, error) { - var err error - - mountInfo := strings.Split(mountString, " ") - mountInfoLength := len(mountInfo) - if mountInfoLength < 10 { - return nil, fmt.Errorf("%w: Too few fields in mount string: %s", ErrFileParse, mountString) - } - - if mountInfo[mountInfoLength-4] != "-" { - return nil, fmt.Errorf("%w: couldn't find separator in expected field: %s", ErrFileParse, mountInfo[mountInfoLength-4]) - } - - mount := &MountInfo{ - MajorMinorVer: mountInfo[2], - Root: mountInfo[3], - MountPoint: mountInfo[4], - Options: mountOptionsParser(mountInfo[5]), - OptionalFields: nil, - FSType: mountInfo[mountInfoLength-3], - Source: mountInfo[mountInfoLength-2], - SuperOptions: mountOptionsParser(mountInfo[mountInfoLength-1]), - } - - mount.MountID, err = strconv.Atoi(mountInfo[0]) - if err != nil { - return nil, fmt.Errorf("%w: mount ID: %q", ErrFileParse, mount.MountID) - } - mount.ParentID, err = strconv.Atoi(mountInfo[1]) - if err != nil { - return nil, fmt.Errorf("%w: parent ID: %q", ErrFileParse, mount.ParentID) - } - // Has optional fields, which is a space separated list of values. - // Example: shared:2 master:7 - if mountInfo[6] != "" { - mount.OptionalFields, err = mountOptionsParseOptionalFields(mountInfo[6 : mountInfoLength-4]) - if err != nil { - return nil, fmt.Errorf("%w: %w", ErrFileParse, err) - } - } - return mount, nil -} - -// mountOptionsIsValidField checks a string against a valid list of optional fields keys. -func mountOptionsIsValidField(s string) bool { - switch s { - case - "shared", - "master", - "propagate_from", - "unbindable": - return true - } - return false -} - -// mountOptionsParseOptionalFields parses a list of optional fields strings into a double map of strings. -func mountOptionsParseOptionalFields(o []string) (map[string]string, error) { - optionalFields := make(map[string]string) - for _, field := range o { - optionSplit := strings.SplitN(field, ":", 2) - value := "" - if len(optionSplit) == 2 { - value = optionSplit[1] - } - if mountOptionsIsValidField(optionSplit[0]) { - optionalFields[optionSplit[0]] = value - } - } - return optionalFields, nil -} - -// mountOptionsParser parses the mount options, superblock options. -func mountOptionsParser(mountOptions string) map[string]string { - opts := make(map[string]string) - for opt := range strings.SplitSeq(mountOptions, ",") { - splitOption := strings.Split(opt, "=") - if len(splitOption) < 2 { - key := splitOption[0] - opts[key] = "" - } else { - key, value := splitOption[0], splitOption[1] - opts[key] = value - } - } - return opts -} - -// readMountInfo reads a full mountinfo file (no 1 MiB cap, unlike util.ReadFileNoStat). -func readMountInfo(path string) ([]byte, error) { - f, err := os.Open(path) - if err != nil { - return nil, err - } - defer f.Close() - return io.ReadAll(f) -} - -// GetMounts retrieves mountinfo information from `/proc/self/mountinfo`. -func GetMounts() ([]*MountInfo, error) { - data, err := readMountInfo("/proc/self/mountinfo") - if err != nil { - return nil, err - } - return parseMountInfo(data) -} - -// GetProcMounts retrieves mountinfo information from a processes' `/proc//mountinfo`. -func GetProcMounts(pid int) ([]*MountInfo, error) { - data, err := readMountInfo(fmt.Sprintf("/proc/%d/mountinfo", pid)) - if err != nil { - return nil, err - } - return parseMountInfo(data) -} - -// GetMounts retrieves mountinfo information from `/proc/self/mountinfo`. -func (fs FS) GetMounts() ([]*MountInfo, error) { - data, err := readMountInfo(fs.proc.Path("self/mountinfo")) - if err != nil { - return nil, err - } - return parseMountInfo(data) -} - -// GetProcMounts retrieves mountinfo information from a processes' `/proc//mountinfo`. -func (fs FS) GetProcMounts(pid int) ([]*MountInfo, error) { - data, err := readMountInfo(fs.proc.Path(fmt.Sprintf("%d/mountinfo", pid))) - if err != nil { - return nil, err - } - return parseMountInfo(data) -} diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go deleted file mode 100644 index e503cb3a6..000000000 --- a/vendor/github.com/prometheus/procfs/mountstats.go +++ /dev/null @@ -1,710 +0,0 @@ -// Copyright The Prometheus 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 procfs - -// While implementing parsing of /proc/[pid]/mountstats, this blog was used -// heavily as a reference: -// https://utcc.utoronto.ca/~cks/space/blog/linux/NFSMountstatsIndex -// -// Special thanks to Chris Siebenmann for all of his posts explaining the -// various statistics available for NFS. - -import ( - "bufio" - "fmt" - "io" - "strconv" - "strings" - "time" -) - -// Constants shared between multiple functions. -const ( - deviceEntryLen = 8 - - fieldBytesLen = 8 - fieldEventsLen = 27 - - statVersion10 = "1.0" - statVersion11 = "1.1" - - fieldTransport10TCPLen = 10 - fieldTransport10UDPLen = 7 - - fieldTransport11TCPLen = 13 - fieldTransport11UDPLen = 10 - - // Kernel version >= 4.14 MaxLen - // See: https://elixir.bootlin.com/linux/v6.4.8/source/net/sunrpc/xprtrdma/xprt_rdma.h#L393 - fieldTransport11RDMAMaxLen = 28 - - // Kernel version <= 4.2 MinLen - // See: https://elixir.bootlin.com/linux/v4.2.8/source/net/sunrpc/xprtrdma/xprt_rdma.h#L331 - fieldTransport11RDMAMinLen = 20 -) - -// A Mount is a device mount parsed from /proc/[pid]/mountstats. -type Mount struct { - // Name of the device. - Device string - // The mount point of the device. - Mount string - // The filesystem type used by the device. - Type string - // If available additional statistics related to this Mount. - // Use a type assertion to determine if additional statistics are available. - Stats MountStats -} - -// A MountStats is a type which contains detailed statistics for a specific -// type of Mount. -type MountStats interface { - mountStats() -} - -// A MountStatsNFS is a MountStats implementation for NFSv3 and v4 mounts. -type MountStatsNFS struct { - // The version of statistics provided. - StatVersion string - // The mount options of the NFS mount. - Opts map[string]string - // The age of the NFS mount. - Age time.Duration - // Statistics related to byte counters for various operations. - Bytes NFSBytesStats - // Statistics related to various NFS event occurrences. - Events NFSEventsStats - // Statistics broken down by filesystem operation. - Operations []NFSOperationStats - // Statistics about the NFS RPC transport. - Transport []NFSTransportStats -} - -// mountStats implements MountStats. -func (m MountStatsNFS) mountStats() {} - -// A NFSBytesStats contains statistics about the number of bytes read and written -// by an NFS client to and from an NFS server. -type NFSBytesStats struct { - // Number of bytes read using the read() syscall. - Read uint64 - // Number of bytes written using the write() syscall. - Write uint64 - // Number of bytes read using the read() syscall in O_DIRECT mode. - DirectRead uint64 - // Number of bytes written using the write() syscall in O_DIRECT mode. - DirectWrite uint64 - // Number of bytes read from the NFS server, in total. - ReadTotal uint64 - // Number of bytes written to the NFS server, in total. - WriteTotal uint64 - // Number of pages read directly via mmap()'d files. - ReadPages uint64 - // Number of pages written directly via mmap()'d files. - WritePages uint64 -} - -// A NFSEventsStats contains statistics about NFS event occurrences. -type NFSEventsStats struct { - // Number of times cached inode attributes are re-validated from the server. - InodeRevalidate uint64 - // Number of times cached dentry nodes are re-validated from the server. - DnodeRevalidate uint64 - // Number of times an inode cache is cleared. - DataInvalidate uint64 - // Number of times cached inode attributes are invalidated. - AttributeInvalidate uint64 - // Number of times files or directories have been open()'d. - VFSOpen uint64 - // Number of times a directory lookup has occurred. - VFSLookup uint64 - // Number of times permissions have been checked. - VFSAccess uint64 - // Number of updates (and potential writes) to pages. - VFSUpdatePage uint64 - // Number of pages read directly via mmap()'d files. - VFSReadPage uint64 - // Number of times a group of pages have been read. - VFSReadPages uint64 - // Number of pages written directly via mmap()'d files. - VFSWritePage uint64 - // Number of times a group of pages have been written. - VFSWritePages uint64 - // Number of times directory entries have been read with getdents(). - VFSGetdents uint64 - // Number of times attributes have been set on inodes. - VFSSetattr uint64 - // Number of pending writes that have been forcefully flushed to the server. - VFSFlush uint64 - // Number of times fsync() has been called on directories and files. - VFSFsync uint64 - // Number of times locking has been attempted on a file. - VFSLock uint64 - // Number of times files have been closed and released. - VFSFileRelease uint64 - // Unknown. Possibly unused. - CongestionWait uint64 - // Number of times files have been truncated. - Truncation uint64 - // Number of times a file has been grown due to writes beyond its existing end. - WriteExtension uint64 - // Number of times a file was removed while still open by another process. - SillyRename uint64 - // Number of times the NFS server gave less data than expected while reading. - ShortRead uint64 - // Number of times the NFS server wrote less data than expected while writing. - ShortWrite uint64 - // Number of times the NFS server indicated EJUKEBOX; retrieving data from - // offline storage. - JukeboxDelay uint64 - // Number of NFS v4.1+ pNFS reads. - PNFSRead uint64 - // Number of NFS v4.1+ pNFS writes. - PNFSWrite uint64 -} - -// A NFSOperationStats contains statistics for a single operation. -type NFSOperationStats struct { - // The name of the operation. - Operation string - // Number of requests performed for this operation. - Requests uint64 - // Number of times an actual RPC request has been transmitted for this operation. - Transmissions uint64 - // Number of times a request has had a major timeout. - MajorTimeouts uint64 - // Number of bytes sent for this operation, including RPC headers and payload. - BytesSent uint64 - // Number of bytes received for this operation, including RPC headers and payload. - BytesReceived uint64 - // Duration all requests spent queued for transmission before they were sent. - CumulativeQueueMilliseconds uint64 - // Duration it took to get a reply back after the request was transmitted. - CumulativeTotalResponseMilliseconds uint64 - // Duration from when a request was enqueued to when it was completely handled. - CumulativeTotalRequestMilliseconds uint64 - // The count of operations that complete with tk_status < 0. These statuses usually indicate error conditions. - Errors uint64 -} - -// A NFSTransportStats contains statistics for the NFS mount RPC requests and -// responses. -type NFSTransportStats struct { - // The transport protocol used for the NFS mount. - Protocol string - // The local port used for the NFS mount. - Port uint64 - // Number of times the client has had to establish a connection from scratch - // to the NFS server. - Bind uint64 - // Number of times the client has made a TCP connection to the NFS server. - Connect uint64 - // Duration (in jiffies, a kernel internal unit of time) the NFS mount has - // spent waiting for connections to the server to be established. - ConnectIdleTime uint64 - // Duration since the NFS mount last saw any RPC traffic. - IdleTimeSeconds uint64 - // Number of RPC requests for this mount sent to the NFS server. - Sends uint64 - // Number of RPC responses for this mount received from the NFS server. - Receives uint64 - // Number of times the NFS server sent a response with a transaction ID - // unknown to this client. - BadTransactionIDs uint64 - // A running counter, incremented on each request as the current difference - // ebetween sends and receives. - CumulativeActiveRequests uint64 - // A running counter, incremented on each request by the current backlog - // queue size. - CumulativeBacklog uint64 - - // Stats below only available with stat version 1.1. - - // Maximum number of simultaneously active RPC requests ever used. - MaximumRPCSlotsUsed uint64 - // A running counter, incremented on each request as the current size of the - // sending queue. - CumulativeSendingQueue uint64 - // A running counter, incremented on each request as the current size of the - // pending queue. - CumulativePendingQueue uint64 - - // Stats below only available with stat version 1.1. - // Transport over RDMA - - // accessed when sending a call - ReadChunkCount uint64 - WriteChunkCount uint64 - ReplyChunkCount uint64 - TotalRdmaRequest uint64 - - // rarely accessed error counters - PullupCopyCount uint64 - HardwayRegisterCount uint64 - FailedMarshalCount uint64 - BadReplyCount uint64 - MrsRecovered uint64 - MrsOrphaned uint64 - MrsAllocated uint64 - EmptySendctxQ uint64 - - // accessed when receiving a reply - TotalRdmaReply uint64 - FixupCopyCount uint64 - ReplyWaitsForSend uint64 - LocalInvNeeded uint64 - NomsgCallCount uint64 - BcallCount uint64 -} - -// parseMountStats parses a /proc/[pid]/mountstats file and returns a slice -// of Mount structures containing detailed information about each mount. -// If available, statistics for each mount are parsed as well. -func parseMountStats(r io.Reader) ([]*Mount, error) { - const ( - device = "device" - statVersionPrefix = "statvers=" - - nfs3Type = "nfs" - nfs4Type = "nfs4" - ) - - var mounts []*Mount - - s := bufio.NewScanner(r) - for s.Scan() { - // Only look for device entries in this function - ss := strings.Fields(string(s.Bytes())) - if len(ss) == 0 || ss[0] != device { - continue - } - - m, err := parseMount(ss) - if err != nil { - return nil, err - } - - // Does this mount also possess statistics information? - if len(ss) > deviceEntryLen { - // Only NFSv3 and v4 are supported for parsing statistics - if m.Type != nfs3Type && m.Type != nfs4Type { - return nil, fmt.Errorf("%w: Cannot parse MountStats for %q", ErrFileParse, m.Type) - } - - statVersion := strings.TrimPrefix(ss[8], statVersionPrefix) - - stats, err := parseMountStatsNFS(s, statVersion) - if err != nil { - return nil, err - } - - m.Stats = stats - } - - mounts = append(mounts, m) - } - - return mounts, s.Err() -} - -// parseMount parses an entry in /proc/[pid]/mountstats in the format: -// -// device [device] mounted on [mount] with fstype [type] -func parseMount(ss []string) (*Mount, error) { - if len(ss) < deviceEntryLen { - return nil, fmt.Errorf("%w: Invalid device %q", ErrFileParse, ss) - } - - // Check for specific words appearing at specific indices to ensure - // the format is consistent with what we expect - format := []struct { - i int - s string - }{ - {i: 0, s: "device"}, - {i: 2, s: "mounted"}, - {i: 3, s: "on"}, - {i: 5, s: "with"}, - {i: 6, s: "fstype"}, - } - - for _, f := range format { - if ss[f.i] != f.s { - return nil, fmt.Errorf("%w: Invalid device %q", ErrFileParse, ss) - } - } - - return &Mount{ - Device: ss[1], - Mount: ss[4], - Type: ss[7], - }, nil -} - -// parseMountStatsNFS parses a MountStatsNFS by scanning additional information -// related to NFS statistics. -func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, error) { - // Field indicators for parsing specific types of data - const ( - fieldOpts = "opts:" - fieldAge = "age:" - fieldBytes = "bytes:" - fieldEvents = "events:" - fieldPerOpStats = "per-op" - fieldTransport = "xprt:" - ) - - stats := &MountStatsNFS{ - StatVersion: statVersion, - } - - for s.Scan() { - ss := strings.Fields(string(s.Bytes())) - if len(ss) == 0 { - break - } - - switch ss[0] { - case fieldOpts: - if len(ss) < 2 { - return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss) - } - if stats.Opts == nil { - stats.Opts = map[string]string{} - } - for opt := range strings.SplitSeq(ss[1], ",") { - split := strings.Split(opt, "=") - if len(split) == 2 { - stats.Opts[split[0]] = split[1] - } else { - stats.Opts[opt] = "" - } - } - case fieldAge: - if len(ss) < 2 { - return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss) - } - // Age integer is in seconds - d, err := time.ParseDuration(ss[1] + "s") - if err != nil { - return nil, err - } - - stats.Age = d - case fieldBytes: - if len(ss) < 2 { - return nil, fmt.Errorf("%w: Incomplete information for NFS stats: %v", ErrFileParse, ss) - } - bstats, err := parseNFSBytesStats(ss[1:]) - if err != nil { - return nil, err - } - - stats.Bytes = *bstats - case fieldEvents: - if len(ss) < 2 { - return nil, fmt.Errorf("%w: Incomplete information for NFS events: %v", ErrFileParse, ss) - } - estats, err := parseNFSEventsStats(ss[1:]) - if err != nil { - return nil, err - } - - stats.Events = *estats - case fieldTransport: - if len(ss) < 3 { - return nil, fmt.Errorf("%w: Incomplete information for NFS transport stats: %v", ErrFileParse, ss) - } - - tstats, err := parseNFSTransportStats(ss[1:], statVersion) - if err != nil { - return nil, err - } - - stats.Transport = append(stats.Transport, *tstats) - } - - // When encountering "per-operation statistics", we must break this - // loop and parse them separately to ensure we can terminate parsing - // before reaching another device entry; hence why this 'if' statement - // is not just another switch case - if ss[0] == fieldPerOpStats { - break - } - } - - if err := s.Err(); err != nil { - return nil, err - } - - // NFS per-operation stats appear last before the next device entry - perOpStats, err := parseNFSOperationStats(s) - if err != nil { - return nil, err - } - - stats.Operations = perOpStats - - return stats, nil -} - -// parseNFSBytesStats parses a NFSBytesStats line using an input set of -// integer fields. -func parseNFSBytesStats(ss []string) (*NFSBytesStats, error) { - if len(ss) != fieldBytesLen { - return nil, fmt.Errorf("%w: Invalid NFS bytes stats: %v", ErrFileParse, ss) - } - - ns := make([]uint64, 0, fieldBytesLen) - for _, s := range ss { - n, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return nil, err - } - - ns = append(ns, n) - } - - return &NFSBytesStats{ - Read: ns[0], - Write: ns[1], - DirectRead: ns[2], - DirectWrite: ns[3], - ReadTotal: ns[4], - WriteTotal: ns[5], - ReadPages: ns[6], - WritePages: ns[7], - }, nil -} - -// parseNFSEventsStats parses a NFSEventsStats line using an input set of -// integer fields. -func parseNFSEventsStats(ss []string) (*NFSEventsStats, error) { - if len(ss) != fieldEventsLen { - return nil, fmt.Errorf("%w: invalid NFS events stats: %v", ErrFileParse, ss) - } - - ns := make([]uint64, 0, fieldEventsLen) - for _, s := range ss { - n, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return nil, err - } - - ns = append(ns, n) - } - - return &NFSEventsStats{ - InodeRevalidate: ns[0], - DnodeRevalidate: ns[1], - DataInvalidate: ns[2], - AttributeInvalidate: ns[3], - VFSOpen: ns[4], - VFSLookup: ns[5], - VFSAccess: ns[6], - VFSUpdatePage: ns[7], - VFSReadPage: ns[8], - VFSReadPages: ns[9], - VFSWritePage: ns[10], - VFSWritePages: ns[11], - VFSGetdents: ns[12], - VFSSetattr: ns[13], - VFSFlush: ns[14], - VFSFsync: ns[15], - VFSLock: ns[16], - VFSFileRelease: ns[17], - CongestionWait: ns[18], - Truncation: ns[19], - WriteExtension: ns[20], - SillyRename: ns[21], - ShortRead: ns[22], - ShortWrite: ns[23], - JukeboxDelay: ns[24], - PNFSRead: ns[25], - PNFSWrite: ns[26], - }, nil -} - -// parseNFSOperationStats parses a slice of NFSOperationStats by scanning -// additional information about per-operation statistics until an empty -// line is reached. -func parseNFSOperationStats(s *bufio.Scanner) ([]NFSOperationStats, error) { - const ( - // Minimum number of expected fields in each per-operation statistics set - minFields = 9 - ) - - var ops []NFSOperationStats - - for s.Scan() { - ss := strings.Fields(string(s.Bytes())) - if len(ss) == 0 { - // Must break when reading a blank line after per-operation stats to - // enable top-level function to parse the next device entry - break - } - - if len(ss) < minFields { - return nil, fmt.Errorf("%w: invalid NFS per-operations stats: %v", ErrFileParse, ss) - } - - // Skip string operation name for integers - ns := make([]uint64, 0, minFields-1) - for _, st := range ss[1:] { - n, err := strconv.ParseUint(st, 10, 64) - if err != nil { - return nil, err - } - - ns = append(ns, n) - } - opStats := NFSOperationStats{ - Operation: strings.TrimSuffix(ss[0], ":"), - Requests: ns[0], - Transmissions: ns[1], - MajorTimeouts: ns[2], - BytesSent: ns[3], - BytesReceived: ns[4], - CumulativeQueueMilliseconds: ns[5], - CumulativeTotalResponseMilliseconds: ns[6], - CumulativeTotalRequestMilliseconds: ns[7], - } - - if len(ns) > 8 { - opStats.Errors = ns[8] - } - - ops = append(ops, opStats) - } - - return ops, s.Err() -} - -// parseNFSTransportStats parses a NFSTransportStats line using an input set of -// integer fields matched to a specific stats version. -func parseNFSTransportStats(ss []string, statVersion string) (*NFSTransportStats, error) { - // Extract the protocol field. It is the only string value in the line - protocol := ss[0] - ss = ss[1:] - - switch statVersion { - case statVersion10: - var expectedLength int - switch protocol { - case "tcp": - expectedLength = fieldTransport10TCPLen - case "udp": - expectedLength = fieldTransport10UDPLen - default: - return nil, fmt.Errorf("%w: Invalid NFS protocol \"%s\" in stats 1.0 statement: %v", ErrFileParse, protocol, ss) - } - if len(ss) != expectedLength { - return nil, fmt.Errorf("%w: Invalid NFS transport stats 1.0 statement: %v", ErrFileParse, ss) - } - case statVersion11: - var expectedLength int - switch protocol { - case "tcp": - expectedLength = fieldTransport11TCPLen - case "udp": - expectedLength = fieldTransport11UDPLen - case "rdma": - expectedLength = fieldTransport11RDMAMinLen - default: - return nil, fmt.Errorf("%w: invalid NFS protocol \"%s\" in stats 1.1 statement: %v", ErrFileParse, protocol, ss) - } - if (len(ss) != expectedLength && (protocol == "tcp" || protocol == "udp")) || - (protocol == "rdma" && len(ss) < expectedLength) { - return nil, fmt.Errorf("%w: invalid NFS transport stats 1.1 statement: %v, protocol: %v", ErrFileParse, ss, protocol) - } - default: - return nil, fmt.Errorf("%w: Unrecognized NFS transport stats version: %q, protocol: %v", ErrFileParse, statVersion, protocol) - } - - // Allocate enough for v1.1 stats since zero value for v1.1 stats will be okay - // in a v1.0 response. Since the stat length is bigger for TCP stats, we use - // the TCP length here. - // - // Note: slice length must be set to length of v1.1 stats to avoid a panic when - // only v1.0 stats are present. - // See: https://github.com/prometheus/node_exporter/issues/571. - // - // Note: NFS Over RDMA slice length is fieldTransport11RDMAMaxLen - ns := make([]uint64, fieldTransport11RDMAMaxLen+3) - for i, s := range ss { - n, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return nil, err - } - - ns[i] = n - } - - // The fields differ depending on the transport protocol (TCP or UDP) - // From https://utcc.utoronto.ca/%7Ecks/space/blog/linux/NFSMountstatsXprt - // - // For the udp RPC transport there is no connection count, connect idle time, - // or idle time (fields #3, #4, and #5); all other fields are the same. So - // we set them to 0 here. - switch protocol { - case "udp": - ns = append(ns[:2], append(make([]uint64, 3), ns[2:]...)...) - case "tcp": - ns = append(ns[:fieldTransport11TCPLen], make([]uint64, fieldTransport11RDMAMaxLen-fieldTransport11TCPLen+3)...) - case "rdma": - ns = append(ns[:fieldTransport10TCPLen], append(make([]uint64, 3), ns[fieldTransport10TCPLen:]...)...) - } - - return &NFSTransportStats{ - // NFS xprt over tcp or udp - Protocol: protocol, - Port: ns[0], - Bind: ns[1], - Connect: ns[2], - ConnectIdleTime: ns[3], - IdleTimeSeconds: ns[4], - Sends: ns[5], - Receives: ns[6], - BadTransactionIDs: ns[7], - CumulativeActiveRequests: ns[8], - CumulativeBacklog: ns[9], - - // NFS xprt over tcp or udp - // And statVersion 1.1 - MaximumRPCSlotsUsed: ns[10], - CumulativeSendingQueue: ns[11], - CumulativePendingQueue: ns[12], - - // NFS xprt over rdma - // And stat Version 1.1 - ReadChunkCount: ns[13], - WriteChunkCount: ns[14], - ReplyChunkCount: ns[15], - TotalRdmaRequest: ns[16], - PullupCopyCount: ns[17], - HardwayRegisterCount: ns[18], - FailedMarshalCount: ns[19], - BadReplyCount: ns[20], - MrsRecovered: ns[21], - MrsOrphaned: ns[22], - MrsAllocated: ns[23], - EmptySendctxQ: ns[24], - TotalRdmaReply: ns[25], - FixupCopyCount: ns[26], - ReplyWaitsForSend: ns[27], - LocalInvNeeded: ns[28], - NomsgCallCount: ns[29], - BcallCount: ns[30], - }, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_conntrackstat.go b/vendor/github.com/prometheus/procfs/net_conntrackstat.go deleted file mode 100644 index e9ca35707..000000000 --- a/vendor/github.com/prometheus/procfs/net_conntrackstat.go +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// A ConntrackStatEntry represents one line from net/stat/nf_conntrack -// and contains netfilter conntrack statistics at one CPU core. -type ConntrackStatEntry struct { - Entries uint64 - Searched uint64 - Found uint64 - New uint64 - Invalid uint64 - Ignore uint64 - Delete uint64 - DeleteList uint64 - Insert uint64 - InsertFailed uint64 - Drop uint64 - EarlyDrop uint64 - SearchRestart uint64 -} - -// ConntrackStat retrieves netfilter's conntrack statistics, split by CPU cores. -func (fs FS) ConntrackStat() ([]ConntrackStatEntry, error) { - return readConntrackStat(fs.proc.Path("net", "stat", "nf_conntrack")) -} - -// Parses a slice of ConntrackStatEntries from the given filepath. -func readConntrackStat(path string) ([]ConntrackStatEntry, error) { - // This file is small and can be read with one syscall. - b, err := util.ReadFileNoStat(path) - if err != nil { - // Do not wrap this error so the caller can detect os.IsNotExist and - // similar conditions. - return nil, err - } - - stat, err := parseConntrackStat(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("%w: Cannot read file: %v: %w", ErrFileRead, path, err) - } - - return stat, nil -} - -// Reads the contents of a conntrack statistics file and parses a slice of ConntrackStatEntries. -func parseConntrackStat(r io.Reader) ([]ConntrackStatEntry, error) { - var entries []ConntrackStatEntry - - scanner := bufio.NewScanner(r) - scanner.Scan() - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - conntrackEntry, err := parseConntrackStatEntry(fields) - if err != nil { - return nil, err - } - entries = append(entries, *conntrackEntry) - } - - return entries, nil -} - -// Parses a ConntrackStatEntry from given array of fields. -func parseConntrackStatEntry(fields []string) (*ConntrackStatEntry, error) { - entries, err := util.ParseHexUint64s(fields) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse entry: %d: %w", ErrFileParse, entries, err) - } - numEntries := len(entries) - if numEntries < 16 || numEntries > 17 { - return nil, - fmt.Errorf("%w: invalid conntrackstat entry, invalid number of fields: %d", ErrFileParse, numEntries) - } - - stats := &ConntrackStatEntry{ - Entries: *entries[0], - Searched: *entries[1], - Found: *entries[2], - New: *entries[3], - Invalid: *entries[4], - Ignore: *entries[5], - Delete: *entries[6], - DeleteList: *entries[7], - Insert: *entries[8], - InsertFailed: *entries[9], - Drop: *entries[10], - EarlyDrop: *entries[11], - } - - // Ignore missing search_restart on Linux < 2.6.35. - if numEntries == 17 { - stats.SearchRestart = *entries[16] - } - - return stats, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_dev.go b/vendor/github.com/prometheus/procfs/net_dev.go deleted file mode 100644 index 7b3e1d61c..000000000 --- a/vendor/github.com/prometheus/procfs/net_dev.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "errors" - "os" - "sort" - "strconv" - "strings" -) - -// NetDevLine is single line parsed from /proc/net/dev or /proc/[pid]/net/dev. -type NetDevLine struct { - Name string `json:"name"` // The name of the interface. - RxBytes uint64 `json:"rx_bytes"` // Cumulative count of bytes received. - RxPackets uint64 `json:"rx_packets"` // Cumulative count of packets received. - RxErrors uint64 `json:"rx_errors"` // Cumulative count of receive errors encountered. - RxDropped uint64 `json:"rx_dropped"` // Cumulative count of packets dropped while receiving. - RxFIFO uint64 `json:"rx_fifo"` // Cumulative count of FIFO buffer errors. - RxFrame uint64 `json:"rx_frame"` // Cumulative count of packet framing errors. - RxCompressed uint64 `json:"rx_compressed"` // Cumulative count of compressed packets received by the device driver. - RxMulticast uint64 `json:"rx_multicast"` // Cumulative count of multicast frames received by the device driver. - TxBytes uint64 `json:"tx_bytes"` // Cumulative count of bytes transmitted. - TxPackets uint64 `json:"tx_packets"` // Cumulative count of packets transmitted. - TxErrors uint64 `json:"tx_errors"` // Cumulative count of transmit errors encountered. - TxDropped uint64 `json:"tx_dropped"` // Cumulative count of packets dropped while transmitting. - TxFIFO uint64 `json:"tx_fifo"` // Cumulative count of FIFO buffer errors. - TxCollisions uint64 `json:"tx_collisions"` // Cumulative count of collisions detected on the interface. - TxCarrier uint64 `json:"tx_carrier"` // Cumulative count of carrier losses detected by the device driver. - TxCompressed uint64 `json:"tx_compressed"` // Cumulative count of compressed packets transmitted by the device driver. -} - -// NetDev is parsed from /proc/net/dev or /proc/[pid]/net/dev. The map keys -// are interface names. -type NetDev map[string]NetDevLine - -// NetDev returns kernel/system statistics read from /proc/net/dev. -func (fs FS) NetDev() (NetDev, error) { - return newNetDev(fs.proc.Path("net/dev")) -} - -// NetDev returns kernel/system statistics read from /proc/[pid]/net/dev. -func (p Proc) NetDev() (NetDev, error) { - return newNetDev(p.path("net/dev")) -} - -// newNetDev creates a new NetDev from the contents of the given file. -func newNetDev(file string) (NetDev, error) { - f, err := os.Open(file) - if err != nil { - return NetDev{}, err - } - defer f.Close() - - netDev := NetDev{} - s := bufio.NewScanner(f) - for n := 0; s.Scan(); n++ { - // Skip the 2 header lines. - if n < 2 { - continue - } - - line, err := netDev.parseLine(s.Text()) - if err != nil { - return netDev, err - } - - netDev[line.Name] = *line - } - - return netDev, s.Err() -} - -// parseLine parses a single line from the /proc/net/dev file. Header lines -// must be filtered prior to calling this method. -func (netDev NetDev) parseLine(rawLine string) (*NetDevLine, error) { - idx := strings.LastIndex(rawLine, ":") - if idx == -1 { - return nil, errors.New("invalid net/dev line, missing colon") - } - fields := strings.Fields(strings.TrimSpace(rawLine[idx+1:])) - - var err error - line := &NetDevLine{} - - // Interface Name - line.Name = strings.TrimSpace(rawLine[:idx]) - if line.Name == "" { - return nil, errors.New("invalid net/dev line, empty interface name") - } - - // RX - line.RxBytes, err = strconv.ParseUint(fields[0], 10, 64) - if err != nil { - return nil, err - } - line.RxPackets, err = strconv.ParseUint(fields[1], 10, 64) - if err != nil { - return nil, err - } - line.RxErrors, err = strconv.ParseUint(fields[2], 10, 64) - if err != nil { - return nil, err - } - line.RxDropped, err = strconv.ParseUint(fields[3], 10, 64) - if err != nil { - return nil, err - } - line.RxFIFO, err = strconv.ParseUint(fields[4], 10, 64) - if err != nil { - return nil, err - } - line.RxFrame, err = strconv.ParseUint(fields[5], 10, 64) - if err != nil { - return nil, err - } - line.RxCompressed, err = strconv.ParseUint(fields[6], 10, 64) - if err != nil { - return nil, err - } - line.RxMulticast, err = strconv.ParseUint(fields[7], 10, 64) - if err != nil { - return nil, err - } - - // TX - line.TxBytes, err = strconv.ParseUint(fields[8], 10, 64) - if err != nil { - return nil, err - } - line.TxPackets, err = strconv.ParseUint(fields[9], 10, 64) - if err != nil { - return nil, err - } - line.TxErrors, err = strconv.ParseUint(fields[10], 10, 64) - if err != nil { - return nil, err - } - line.TxDropped, err = strconv.ParseUint(fields[11], 10, 64) - if err != nil { - return nil, err - } - line.TxFIFO, err = strconv.ParseUint(fields[12], 10, 64) - if err != nil { - return nil, err - } - line.TxCollisions, err = strconv.ParseUint(fields[13], 10, 64) - if err != nil { - return nil, err - } - line.TxCarrier, err = strconv.ParseUint(fields[14], 10, 64) - if err != nil { - return nil, err - } - line.TxCompressed, err = strconv.ParseUint(fields[15], 10, 64) - if err != nil { - return nil, err - } - - return line, nil -} - -// Total aggregates the values across interfaces and returns a new NetDevLine. -// The Name field will be a sorted comma separated list of interface names. -func (netDev NetDev) Total() NetDevLine { - total := NetDevLine{} - - names := make([]string, 0, len(netDev)) - for _, ifc := range netDev { - names = append(names, ifc.Name) - total.RxBytes += ifc.RxBytes - total.RxPackets += ifc.RxPackets - total.RxErrors += ifc.RxErrors - total.RxDropped += ifc.RxDropped - total.RxFIFO += ifc.RxFIFO - total.RxFrame += ifc.RxFrame - total.RxCompressed += ifc.RxCompressed - total.RxMulticast += ifc.RxMulticast - total.TxBytes += ifc.TxBytes - total.TxPackets += ifc.TxPackets - total.TxErrors += ifc.TxErrors - total.TxDropped += ifc.TxDropped - total.TxFIFO += ifc.TxFIFO - total.TxCollisions += ifc.TxCollisions - total.TxCarrier += ifc.TxCarrier - total.TxCompressed += ifc.TxCompressed - } - sort.Strings(names) - total.Name = strings.Join(names, ", ") - - return total -} diff --git a/vendor/github.com/prometheus/procfs/net_dev_snmp6.go b/vendor/github.com/prometheus/procfs/net_dev_snmp6.go deleted file mode 100644 index 2a0f60f29..000000000 --- a/vendor/github.com/prometheus/procfs/net_dev_snmp6.go +++ /dev/null @@ -1,99 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "errors" - "io" - "os" - "path/filepath" - "strconv" - "strings" -) - -// NetDevSNMP6 is parsed from files in /proc/net/dev_snmp6/ or /proc//net/dev_snmp6/. -// The outer map's keys are interface names and the inner map's keys are stat names. -// -// If you'd like a total across all interfaces, please use the Snmp6() method of the Proc type. -type NetDevSNMP6 map[string]map[string]uint64 - -// Returns kernel/system statistics read from interface files within the /proc/net/dev_snmp6/ -// directory. -func (fs FS) NetDevSNMP6() (NetDevSNMP6, error) { - return newNetDevSNMP6(fs.proc.Path("net/dev_snmp6")) -} - -// Returns kernel/system statistics read from interface files within the /proc//net/dev_snmp6/ -// directory. -func (p Proc) NetDevSNMP6() (NetDevSNMP6, error) { - return newNetDevSNMP6(p.path("net/dev_snmp6")) -} - -// newNetDevSNMP6 creates a new NetDevSNMP6 from the contents of the given directory. -func newNetDevSNMP6(dir string) (NetDevSNMP6, error) { - netDevSNMP6 := make(NetDevSNMP6) - - // The net/dev_snmp6 folders contain one file per interface - ifaceFiles, err := os.ReadDir(dir) - if err != nil { - // On systems with IPv6 disabled, this directory won't exist. - // Do nothing. - if errors.Is(err, os.ErrNotExist) { - return netDevSNMP6, err - } - return netDevSNMP6, err - } - - for _, iFaceFile := range ifaceFiles { - filePath := filepath.Join(dir, iFaceFile.Name()) - - f, err := os.Open(filePath) - if err != nil { - return netDevSNMP6, err - } - defer f.Close() - - netDevSNMP6[iFaceFile.Name()], err = parseNetDevSNMP6Stats(f) - if err != nil { - return netDevSNMP6, err - } - } - - return netDevSNMP6, nil -} - -func parseNetDevSNMP6Stats(r io.Reader) (map[string]uint64, error) { - m := make(map[string]uint64) - - scanner := bufio.NewScanner(r) - for scanner.Scan() { - stat := strings.Fields(scanner.Text()) - if len(stat) < 2 { - continue - } - key, val := stat[0], stat[1] - - // Expect stat name to contain "6" or be "ifIndex" - if strings.Contains(key, "6") || key == "ifIndex" { - v, err := strconv.ParseUint(val, 10, 64) - if err != nil { - return m, err - } - - m[key] = v - } - } - return m, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/net_ip_socket.go b/vendor/github.com/prometheus/procfs/net_ip_socket.go deleted file mode 100644 index 9291f8cd4..000000000 --- a/vendor/github.com/prometheus/procfs/net_ip_socket.go +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "encoding/hex" - "fmt" - "io" - "net" - "os" - "strconv" - "strings" -) - -const ( - // Maximum size limit used by io.LimitReader while reading the content of the - // /proc/net/udp{,6} files. The number of lines inside such a file is dynamic - // as each line represents a single used socket. - // In theory, the number of available sockets is 65535 (2^16 - 1) per IP. - // With e.g. 150 Byte per line and the maximum number of 65535, - // the reader needs to handle 150 Byte * 65535 =~ 10 MB for a single IP. - readLimit = 4294967296 // Byte -> 4 GiB -) - -// This contains generic data structures for both udp and tcp sockets. -type ( - // NetIPSocket represents the contents of /proc/net/{t,u}dp{,6} file without the header. - NetIPSocket []*netIPSocketLine - - // NetIPSocketSummary provides already computed values like the total queue lengths or - // the total number of used sockets. In contrast to NetIPSocket it does not collect - // the parsed lines into a slice. - NetIPSocketSummary struct { - // TxQueueLength shows the total queue length of all parsed tx_queue lengths. - TxQueueLength uint64 - // RxQueueLength shows the total queue length of all parsed rx_queue lengths. - RxQueueLength uint64 - // UsedSockets shows the total number of parsed lines representing the - // number of used sockets. - UsedSockets uint64 - // Drops shows the total number of dropped packets of all UDP sockets. - Drops *uint64 - } - - // A single line parser for fields from /proc/net/{t,u}dp{,6}. - // Fields which are not used by IPSocket are skipped. - // Drops is non-nil for udp{,6}, but nil for tcp{,6}. - // For the proc file format details, see https://linux.die.net/man/5/proc. - netIPSocketLine struct { - Sl uint64 - LocalAddr net.IP - LocalPort uint64 - RemAddr net.IP - RemPort uint64 - St uint64 - TxQueue uint64 - RxQueue uint64 - UID uint64 - Inode uint64 - Drops *uint64 - } -) - -func newNetIPSocket(file string) (NetIPSocket, error) { - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - var netIPSocket NetIPSocket - isUDP := strings.Contains(file, "udp") - - lr := io.LimitReader(f, readLimit) - s := bufio.NewScanner(lr) - s.Scan() // skip first line with headers - for s.Scan() { - fields := strings.Fields(s.Text()) - line, err := parseNetIPSocketLine(fields, isUDP) - if err != nil { - return nil, err - } - netIPSocket = append(netIPSocket, line) - } - if err := s.Err(); err != nil { - return nil, err - } - return netIPSocket, nil -} - -// newNetIPSocketSummary creates a new NetIPSocket{,6} from the contents of the given file. -func newNetIPSocketSummary(file string) (*NetIPSocketSummary, error) { - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - var netIPSocketSummary NetIPSocketSummary - var udpPacketDrops uint64 - isUDP := strings.Contains(file, "udp") - - lr := io.LimitReader(f, readLimit) - s := bufio.NewScanner(lr) - s.Scan() // skip first line with headers - for s.Scan() { - fields := strings.Fields(s.Text()) - line, err := parseNetIPSocketLine(fields, isUDP) - if err != nil { - return nil, err - } - netIPSocketSummary.TxQueueLength += line.TxQueue - netIPSocketSummary.RxQueueLength += line.RxQueue - netIPSocketSummary.UsedSockets++ - if isUDP { - udpPacketDrops += *line.Drops - netIPSocketSummary.Drops = &udpPacketDrops - } - } - if err := s.Err(); err != nil { - return nil, err - } - return &netIPSocketSummary, nil -} - -// the /proc/net/{t,u}dp{,6} files are network byte order for ipv4 and for ipv6 the address is four words consisting of four bytes each. In each of those four words the four bytes are written in reverse order. - -func parseIP(hexIP string) (net.IP, error) { - var byteIP []byte - byteIP, err := hex.DecodeString(hexIP) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse socket field in %q: %w", ErrFileParse, hexIP, err) - } - switch len(byteIP) { - case 4: - return net.IP{byteIP[3], byteIP[2], byteIP[1], byteIP[0]}, nil - case 16: - i := net.IP{ - byteIP[3], byteIP[2], byteIP[1], byteIP[0], - byteIP[7], byteIP[6], byteIP[5], byteIP[4], - byteIP[11], byteIP[10], byteIP[9], byteIP[8], - byteIP[15], byteIP[14], byteIP[13], byteIP[12], - } - return i, nil - default: - return nil, fmt.Errorf("%w: Unable to parse IP %s: %v", ErrFileParse, hexIP, nil) - } -} - -// parseNetIPSocketLine parses a single line, represented by a list of fields. -func parseNetIPSocketLine(fields []string, isUDP bool) (*netIPSocketLine, error) { - line := &netIPSocketLine{} - if len(fields) < 10 { - return nil, fmt.Errorf( - "%w: Less than 10 columns found %q", - ErrFileParse, - strings.Join(fields, " "), - ) - } - var err error // parse error - - // sl - s := strings.Split(fields[0], ":") - if len(s) != 2 { - return nil, fmt.Errorf("%w: Unable to parse sl field in line %q", ErrFileParse, fields[0]) - } - - if line.Sl, err = strconv.ParseUint(s[0], 0, 64); err != nil { - return nil, fmt.Errorf("%w: Unable to parse sl field in %q: %w", ErrFileParse, line.Sl, err) - } - // local_address - l := strings.Split(fields[1], ":") - if len(l) != 2 { - return nil, fmt.Errorf("%w: Unable to parse local_address field in %q", ErrFileParse, fields[1]) - } - if line.LocalAddr, err = parseIP(l[0]); err != nil { - return nil, err - } - if line.LocalPort, err = strconv.ParseUint(l[1], 16, 64); err != nil { - return nil, fmt.Errorf("%w: Unable to parse local_address port value line %q: %w", ErrFileParse, line.LocalPort, err) - } - - // remote_address - r := strings.Split(fields[2], ":") - if len(r) != 2 { - return nil, fmt.Errorf("%w: Unable to parse rem_address field in %q", ErrFileParse, fields[1]) - } - if line.RemAddr, err = parseIP(r[0]); err != nil { - return nil, err - } - if line.RemPort, err = strconv.ParseUint(r[1], 16, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse rem_address port value in %q: %w", ErrFileParse, line.RemPort, err) - } - - // st - if line.St, err = strconv.ParseUint(fields[3], 16, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse st value in %q: %w", ErrFileParse, line.St, err) - } - - // tx_queue and rx_queue - q := strings.Split(fields[4], ":") - if len(q) != 2 { - return nil, fmt.Errorf( - "%w: Missing colon for tx/rx queues in socket line %q", - ErrFileParse, - fields[4], - ) - } - if line.TxQueue, err = strconv.ParseUint(q[0], 16, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse tx_queue value in %q: %w", ErrFileParse, line.TxQueue, err) - } - if line.RxQueue, err = strconv.ParseUint(q[1], 16, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse trx_queue value in %q: %w", ErrFileParse, line.RxQueue, err) - } - - // uid - if line.UID, err = strconv.ParseUint(fields[7], 0, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse UID value in %q: %w", ErrFileParse, line.UID, err) - } - - // inode - if line.Inode, err = strconv.ParseUint(fields[9], 0, 64); err != nil { - return nil, fmt.Errorf("%w: Cannot parse inode value in %q: %w", ErrFileParse, line.Inode, err) - } - - // drops - if isUDP { - drops, err := strconv.ParseUint(fields[12], 0, 64) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse drops value in %q: %w", ErrFileParse, drops, err) - } - line.Drops = &drops - } - - return line, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_protocols.go b/vendor/github.com/prometheus/procfs/net_protocols.go deleted file mode 100644 index eaa996cbc..000000000 --- a/vendor/github.com/prometheus/procfs/net_protocols.go +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// NetProtocolStats stores the contents from /proc/net/protocols. -type NetProtocolStats map[string]NetProtocolStatLine - -// NetProtocolStatLine contains a single line parsed from /proc/net/protocols. We -// only care about the first six columns as the rest are not likely to change -// and only serve to provide a set of capabilities for each protocol. -type NetProtocolStatLine struct { - Name string // 0 The name of the protocol - Size uint64 // 1 The size, in bytes, of a given protocol structure. e.g. sizeof(struct tcp_sock) or sizeof(struct unix_sock) - Sockets int64 // 2 Number of sockets in use by this protocol - Memory int64 // 3 Number of 4KB pages allocated by all sockets of this protocol - Pressure int // 4 This is either yes, no, or NI (not implemented). For the sake of simplicity we treat NI as not experiencing memory pressure. - MaxHeader uint64 // 5 Protocol specific max header size - Slab bool // 6 Indicates whether or not memory is allocated from the SLAB - ModuleName string // 7 The name of the module that implemented this protocol or "kernel" if not from a module - Capabilities NetProtocolCapabilities -} - -// NetProtocolCapabilities contains a list of capabilities for each protocol. -type NetProtocolCapabilities struct { - Close bool // 8 - Connect bool // 9 - Disconnect bool // 10 - Accept bool // 11 - IoCtl bool // 12 - Init bool // 13 - Destroy bool // 14 - Shutdown bool // 15 - SetSockOpt bool // 16 - GetSockOpt bool // 17 - SendMsg bool // 18 - RecvMsg bool // 19 - SendPage bool // 20 - Bind bool // 21 - BacklogRcv bool // 22 - Hash bool // 23 - UnHash bool // 24 - GetPort bool // 25 - EnterMemoryPressure bool // 26 -} - -// NetProtocols reads stats from /proc/net/protocols and returns a map of -// PortocolStatLine entries. As of this writing no official Linux Documentation -// exists, however the source is fairly self-explanatory and the format seems -// stable since its introduction in 2.6.12-rc2 -// Linux 2.6.12-rc2 - https://elixir.bootlin.com/linux/v2.6.12-rc2/source/net/core/sock.c#L1452 -// Linux 5.10 - https://elixir.bootlin.com/linux/v5.10.4/source/net/core/sock.c#L3586 -func (fs FS) NetProtocols() (NetProtocolStats, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("net/protocols")) - if err != nil { - return NetProtocolStats{}, err - } - return parseNetProtocols(bufio.NewScanner(bytes.NewReader(data))) -} - -func parseNetProtocols(s *bufio.Scanner) (NetProtocolStats, error) { - nps := NetProtocolStats{} - - // Skip the header line - s.Scan() - - for s.Scan() { - line, err := nps.parseLine(s.Text()) - if err != nil { - return NetProtocolStats{}, err - } - - nps[line.Name] = *line - } - return nps, nil -} - -func (ps NetProtocolStats) parseLine(rawLine string) (*NetProtocolStatLine, error) { - line := &NetProtocolStatLine{Capabilities: NetProtocolCapabilities{}} - var err error - const enabled = "yes" - const disabled = "no" - - fields := strings.Fields(rawLine) - line.Name = fields[0] - line.Size, err = strconv.ParseUint(fields[1], 10, 64) - if err != nil { - return nil, err - } - line.Sockets, err = strconv.ParseInt(fields[2], 10, 64) - if err != nil { - return nil, err - } - line.Memory, err = strconv.ParseInt(fields[3], 10, 64) - if err != nil { - return nil, err - } - switch fields[4] { - case enabled: - line.Pressure = 1 - case disabled: - line.Pressure = 0 - default: - line.Pressure = -1 - } - line.MaxHeader, err = strconv.ParseUint(fields[5], 10, 64) - if err != nil { - return nil, err - } - switch fields[6] { - case enabled: - line.Slab = true - case disabled: - line.Slab = false - default: - return nil, fmt.Errorf("%w: capability for protocol: %s", ErrFileParse, line.Name) - } - line.ModuleName = fields[7] - - err = line.Capabilities.parseCapabilities(fields[8:]) - if err != nil { - return nil, err - } - - return line, nil -} - -func (pc *NetProtocolCapabilities) parseCapabilities(capabilities []string) error { - // The capabilities are all bools so we can loop over to map them - capabilityFields := [...]*bool{ - &pc.Close, - &pc.Connect, - &pc.Disconnect, - &pc.Accept, - &pc.IoCtl, - &pc.Init, - &pc.Destroy, - &pc.Shutdown, - &pc.SetSockOpt, - &pc.GetSockOpt, - &pc.SendMsg, - &pc.RecvMsg, - &pc.SendPage, - &pc.Bind, - &pc.BacklogRcv, - &pc.Hash, - &pc.UnHash, - &pc.GetPort, - &pc.EnterMemoryPressure, - } - - for i := range capabilities { - switch capabilities[i] { - case "y": - *capabilityFields[i] = true - case "n": - *capabilityFields[i] = false - default: - return fmt.Errorf("%w: capability block for protocol: position %d", ErrFileParse, i) - } - } - return nil -} diff --git a/vendor/github.com/prometheus/procfs/net_route.go b/vendor/github.com/prometheus/procfs/net_route.go deleted file mode 100644 index fa3812d9d..000000000 --- a/vendor/github.com/prometheus/procfs/net_route.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -const ( - blackholeRepresentation string = "*" - blackholeIfaceName string = "blackhole" - routeLineColumns int = 11 -) - -// A NetRouteLine represents one line from net/route. -type NetRouteLine struct { - Iface string - Destination uint32 - Gateway uint32 - Flags uint32 - RefCnt uint32 - Use uint32 - Metric uint32 - Mask uint32 - MTU uint32 - Window uint32 - IRTT uint32 -} - -func (fs FS) NetRoute() ([]NetRouteLine, error) { - return readNetRoute(fs.proc.Path("net", "route")) -} - -func readNetRoute(path string) ([]NetRouteLine, error) { - b, err := util.ReadFileNoStat(path) - if err != nil { - return nil, err - } - - routelines, err := parseNetRoute(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("failed to read net route from %s: %w", path, err) - } - return routelines, nil -} - -func parseNetRoute(r io.Reader) ([]NetRouteLine, error) { - var routelines []NetRouteLine - - scanner := bufio.NewScanner(r) - scanner.Scan() - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - routeline, err := parseNetRouteLine(fields) - if err != nil { - return nil, err - } - routelines = append(routelines, *routeline) - } - return routelines, nil -} - -func parseNetRouteLine(fields []string) (*NetRouteLine, error) { - if len(fields) != routeLineColumns { - return nil, fmt.Errorf("invalid routeline, num of digits: %d", len(fields)) - } - iface := fields[0] - if iface == blackholeRepresentation { - iface = blackholeIfaceName - } - destination, err := strconv.ParseUint(fields[1], 16, 32) - if err != nil { - return nil, err - } - gateway, err := strconv.ParseUint(fields[2], 16, 32) - if err != nil { - return nil, err - } - flags, err := strconv.ParseUint(fields[3], 10, 32) - if err != nil { - return nil, err - } - refcnt, err := strconv.ParseUint(fields[4], 10, 32) - if err != nil { - return nil, err - } - use, err := strconv.ParseUint(fields[5], 10, 32) - if err != nil { - return nil, err - } - metric, err := strconv.ParseUint(fields[6], 10, 32) - if err != nil { - return nil, err - } - mask, err := strconv.ParseUint(fields[7], 16, 32) - if err != nil { - return nil, err - } - mtu, err := strconv.ParseUint(fields[8], 10, 32) - if err != nil { - return nil, err - } - window, err := strconv.ParseUint(fields[9], 10, 32) - if err != nil { - return nil, err - } - irtt, err := strconv.ParseUint(fields[10], 10, 32) - if err != nil { - return nil, err - } - routeline := &NetRouteLine{ - Iface: iface, - Destination: uint32(destination), - Gateway: uint32(gateway), - Flags: uint32(flags), - RefCnt: uint32(refcnt), - Use: uint32(use), - Metric: uint32(metric), - Mask: uint32(mask), - MTU: uint32(mtu), - Window: uint32(window), - IRTT: uint32(irtt), - } - return routeline, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_sockstat.go b/vendor/github.com/prometheus/procfs/net_sockstat.go deleted file mode 100644 index 8b221ebff..000000000 --- a/vendor/github.com/prometheus/procfs/net_sockstat.go +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// A NetSockstat contains the output of /proc/net/sockstat{,6} for IPv4 or IPv6, -// respectively. -type NetSockstat struct { - // Used is non-nil for IPv4 sockstat results, but nil for IPv6. - Used *int - Protocols []NetSockstatProtocol -} - -// A NetSockstatProtocol contains statistics about a given socket protocol. -// Pointer fields indicate that the value may or may not be present on any -// given protocol. -type NetSockstatProtocol struct { - Protocol string - InUse int - Orphan *int - TW *int - Alloc *int - Mem *int - Memory *int -} - -// NetSockstat retrieves IPv4 socket statistics. -func (fs FS) NetSockstat() (*NetSockstat, error) { - return readSockstat(fs.proc.Path("net", "sockstat")) -} - -// NetSockstat6 retrieves IPv6 socket statistics. -// -// If IPv6 is disabled on this kernel, the returned error can be checked with -// os.IsNotExist. -func (fs FS) NetSockstat6() (*NetSockstat, error) { - return readSockstat(fs.proc.Path("net", "sockstat6")) -} - -// readSockstat opens and parses a NetSockstat from the input file. -func readSockstat(name string) (*NetSockstat, error) { - // This file is small and can be read with one syscall. - b, err := util.ReadFileNoStat(name) - if err != nil { - // Do not wrap this error so the caller can detect os.IsNotExist and - // similar conditions. - return nil, err - } - - stat, err := parseSockstat(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("%w: sockstats from %q: %w", ErrFileRead, name, err) - } - - return stat, nil -} - -// parseSockstat reads the contents of a sockstat file and parses a NetSockstat. -func parseSockstat(r io.Reader) (*NetSockstat, error) { - var stat NetSockstat - s := bufio.NewScanner(r) - for s.Scan() { - // Expect a minimum of a protocol and one key/value pair. - fields := strings.Split(s.Text(), " ") - if len(fields) < 3 { - return nil, fmt.Errorf("%w: Malformed sockstat line: %q", ErrFileParse, s.Text()) - } - - // The remaining fields are key/value pairs. - kvs, err := parseSockstatKVs(fields[1:]) - if err != nil { - return nil, fmt.Errorf("%w: sockstat key/value pairs from %q: %w", ErrFileParse, s.Text(), err) - } - - // The first field is the protocol. We must trim its colon suffix. - proto := strings.TrimSuffix(fields[0], ":") - switch proto { - case "sockets": - // Special case: IPv4 has a sockets "used" key/value pair that we - // embed at the top level of the structure. - used := kvs["used"] - stat.Used = &used - default: - // Parse all other lines as individual protocols. - nsp := parseSockstatProtocol(kvs) - nsp.Protocol = proto - stat.Protocols = append(stat.Protocols, nsp) - } - } - - if err := s.Err(); err != nil { - return nil, err - } - - return &stat, nil -} - -// parseSockstatKVs parses a string slice into a map of key/value pairs. -func parseSockstatKVs(kvs []string) (map[string]int, error) { - if len(kvs)%2 != 0 { - return nil, fmt.Errorf("%w:: Odd number of fields in key/value pairs %q", ErrFileParse, kvs) - } - - // Iterate two values at a time to gather key/value pairs. - out := make(map[string]int, len(kvs)/2) - for i := 0; i < len(kvs); i += 2 { - vp := util.NewValueParser(kvs[i+1]) - out[kvs[i]] = vp.Int() - - if err := vp.Err(); err != nil { - return nil, err - } - } - - return out, nil -} - -// parseSockstatProtocol parses a NetSockstatProtocol from the input kvs map. -func parseSockstatProtocol(kvs map[string]int) NetSockstatProtocol { - var nsp NetSockstatProtocol - for k, v := range kvs { - switch k { - case "inuse": - nsp.InUse = v - case "orphan": - nsp.Orphan = &v - case "tw": - nsp.TW = &v - case "alloc": - nsp.Alloc = &v - case "mem": - nsp.Mem = &v - case "memory": - nsp.Memory = &v - } - } - - return nsp -} diff --git a/vendor/github.com/prometheus/procfs/net_softnet.go b/vendor/github.com/prometheus/procfs/net_softnet.go deleted file mode 100644 index 4a2dfa18f..000000000 --- a/vendor/github.com/prometheus/procfs/net_softnet.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// For the proc file format details, -// See: -// * Linux 2.6.23 https://elixir.bootlin.com/linux/v2.6.23/source/net/core/dev.c#L2343 -// * Linux 2.6.39 https://elixir.bootlin.com/linux/v2.6.39/source/net/core/dev.c#L4086 -// * Linux 4.18 https://elixir.bootlin.com/linux/v4.18/source/net/core/net-procfs.c#L162 -// * Linux 5.14 https://elixir.bootlin.com/linux/v5.14/source/net/core/net-procfs.c#L169 - -// SoftnetStat contains a single row of data from /proc/net/softnet_stat. -type SoftnetStat struct { - // Number of processed packets. - Processed uint32 - // Number of dropped packets. - Dropped uint32 - // Number of times processing packets ran out of quota. - TimeSqueezed uint32 - // Number of collision occur while obtaining device lock while transmitting. - CPUCollision uint32 - // Number of times cpu woken up received_rps. - ReceivedRps uint32 - // number of times flow limit has been reached. - FlowLimitCount uint32 - // Softnet backlog status. - SoftnetBacklogLen uint32 - // CPU id owning this softnet_data. - Index uint32 - // softnet_data's Width. - Width int -} - -var softNetProcFile = "net/softnet_stat" - -// NetSoftnetStat reads data from /proc/net/softnet_stat. -func (fs FS) NetSoftnetStat() ([]SoftnetStat, error) { - b, err := util.ReadFileNoStat(fs.proc.Path(softNetProcFile)) - if err != nil { - return nil, err - } - - entries, err := parseSoftnet(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("%w: /proc/net/softnet_stat: %w", ErrFileParse, err) - } - - return entries, nil -} - -func parseSoftnet(r io.Reader) ([]SoftnetStat, error) { - const minColumns = 9 - - s := bufio.NewScanner(r) - - var stats []SoftnetStat - cpuIndex := 0 - for s.Scan() { - columns := strings.Fields(s.Text()) - width := len(columns) - softnetStat := SoftnetStat{} - - if width < minColumns { - return nil, fmt.Errorf("%w: detected %d columns, but expected at least %d", ErrFileParse, width, minColumns) - } - - // Linux 2.6.23 https://elixir.bootlin.com/linux/v2.6.23/source/net/core/dev.c#L2347 - if width >= minColumns { - us, err := parseHexUint32s(columns[0:9]) - if err != nil { - return nil, err - } - - softnetStat.Processed = us[0] - softnetStat.Dropped = us[1] - softnetStat.TimeSqueezed = us[2] - softnetStat.CPUCollision = us[8] - } - - // Linux 2.6.39 https://elixir.bootlin.com/linux/v2.6.39/source/net/core/dev.c#L4086 - if width >= 10 { - us, err := parseHexUint32s(columns[9:10]) - if err != nil { - return nil, err - } - - softnetStat.ReceivedRps = us[0] - } - - // Linux 4.18 https://elixir.bootlin.com/linux/v4.18/source/net/core/net-procfs.c#L162 - if width >= 11 { - us, err := parseHexUint32s(columns[10:11]) - if err != nil { - return nil, err - } - - softnetStat.FlowLimitCount = us[0] - } - - // Linux 5.14 https://elixir.bootlin.com/linux/v5.14/source/net/core/net-procfs.c#L169 - if width >= 13 { - us, err := parseHexUint32s(columns[11:13]) - if err != nil { - return nil, err - } - - softnetStat.SoftnetBacklogLen = us[0] - softnetStat.Index = us[1] - } else { - // For older kernels, create the Index based on the scan line number. - softnetStat.Index = uint32(cpuIndex) - } - softnetStat.Width = width - stats = append(stats, softnetStat) - cpuIndex++ - } - - return stats, nil -} - -func parseHexUint32s(ss []string) ([]uint32, error) { - us := make([]uint32, 0, len(ss)) - for _, s := range ss { - u, err := strconv.ParseUint(s, 16, 32) - if err != nil { - return nil, err - } - - us = append(us, uint32(u)) - } - - return us, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_tcp.go b/vendor/github.com/prometheus/procfs/net_tcp.go deleted file mode 100644 index 2c7f9bc7c..000000000 --- a/vendor/github.com/prometheus/procfs/net_tcp.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright The Prometheus 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 procfs - -type ( - // NetTCP represents the contents of /proc/net/tcp{,6} file without the header. - NetTCP []*netIPSocketLine - - // NetTCPSummary provides already computed values like the total queue lengths or - // the total number of used sockets. In contrast to NetTCP it does not collect - // the parsed lines into a slice. - NetTCPSummary NetIPSocketSummary -) - -// NetTCP returns the IPv4 kernel/networking statistics for TCP datagrams -// read from /proc/net/tcp. -// -// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead. -func (fs FS) NetTCP() (NetTCP, error) { - return newNetTCP(fs.proc.Path("net/tcp")) -} - -// NetTCP6 returns the IPv6 kernel/networking statistics for TCP datagrams -// read from /proc/net/tcp6. -// -// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead. -func (fs FS) NetTCP6() (NetTCP, error) { - return newNetTCP(fs.proc.Path("net/tcp6")) -} - -// NetTCPSummary returns already computed statistics like the total queue lengths -// for TCP datagrams read from /proc/net/tcp. -// -// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET) instead. -func (fs FS) NetTCPSummary() (*NetTCPSummary, error) { - return newNetTCPSummary(fs.proc.Path("net/tcp")) -} - -// NetTCP6Summary returns already computed statistics like the total queue lengths -// for TCP datagrams read from /proc/net/tcp6. -// -// Deprecated: Use github.com/mdlayher/netlink#Conn (with syscall.AF_INET6) instead. -func (fs FS) NetTCP6Summary() (*NetTCPSummary, error) { - return newNetTCPSummary(fs.proc.Path("net/tcp6")) -} - -// newNetTCP creates a new NetTCP{,6} from the contents of the given file. -func newNetTCP(file string) (NetTCP, error) { - n, err := newNetIPSocket(file) - n1 := NetTCP(n) - return n1, err -} - -func newNetTCPSummary(file string) (*NetTCPSummary, error) { - n, err := newNetIPSocketSummary(file) - if n == nil { - return nil, err - } - n1 := NetTCPSummary(*n) - return &n1, err -} diff --git a/vendor/github.com/prometheus/procfs/net_tls_stat.go b/vendor/github.com/prometheus/procfs/net_tls_stat.go deleted file mode 100644 index b1b3f6a6a..000000000 --- a/vendor/github.com/prometheus/procfs/net_tls_stat.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" -) - -// TLSStat struct represents data in /proc/net/tls_stat. -// See https://docs.kernel.org/networking/tls.html#statistics -type TLSStat struct { - // number of TX sessions currently installed where host handles cryptography - TLSCurrTxSw int - // number of RX sessions currently installed where host handles cryptography - TLSCurrRxSw int - // number of TX sessions currently installed where NIC handles cryptography - TLSCurrTxDevice int - // number of RX sessions currently installed where NIC handles cryptography - TLSCurrRxDevice int - //number of TX sessions opened with host cryptography - TLSTxSw int - //number of RX sessions opened with host cryptography - TLSRxSw int - // number of TX sessions opened with NIC cryptography - TLSTxDevice int - // number of RX sessions opened with NIC cryptography - TLSRxDevice int - // record decryption failed (e.g. due to incorrect authentication tag) - TLSDecryptError int - // number of RX resyncs sent to NICs handling cryptography - TLSRxDeviceResync int - // number of RX records which had to be re-decrypted due to TLS_RX_EXPECT_NO_PAD mis-prediction. Note that this counter will also increment for non-data records. - TLSDecryptRetry int - // number of data RX records which had to be re-decrypted due to TLS_RX_EXPECT_NO_PAD mis-prediction. - TLSRxNoPadViolation int -} - -// NewTLSStat reads the tls_stat statistics. -func NewTLSStat() (TLSStat, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return TLSStat{}, err - } - - return fs.NewTLSStat() -} - -// NewTLSStat reads the tls_stat statistics. -func (fs FS) NewTLSStat() (TLSStat, error) { - file, err := os.Open(fs.proc.Path("net/tls_stat")) - if err != nil { - return TLSStat{}, err - } - defer file.Close() - - var ( - tlsstat = TLSStat{} - s = bufio.NewScanner(file) - ) - - for s.Scan() { - fields := strings.Fields(s.Text()) - - if len(fields) != 2 { - return TLSStat{}, fmt.Errorf("%w: %q line %q", ErrFileParse, file.Name(), s.Text()) - } - - name := fields[0] - value, err := strconv.Atoi(fields[1]) - if err != nil { - return TLSStat{}, err - } - - switch name { - case "TlsCurrTxSw": - tlsstat.TLSCurrTxSw = value - case "TlsCurrRxSw": - tlsstat.TLSCurrRxSw = value - case "TlsCurrTxDevice": - tlsstat.TLSCurrTxDevice = value - case "TlsCurrRxDevice": - tlsstat.TLSCurrRxDevice = value - case "TlsTxSw": - tlsstat.TLSTxSw = value - case "TlsRxSw": - tlsstat.TLSRxSw = value - case "TlsTxDevice": - tlsstat.TLSTxDevice = value - case "TlsRxDevice": - tlsstat.TLSRxDevice = value - case "TlsDecryptError": - tlsstat.TLSDecryptError = value - case "TlsRxDeviceResync": - tlsstat.TLSRxDeviceResync = value - case "TlsDecryptRetry": - tlsstat.TLSDecryptRetry = value - case "TlsRxNoPadViolation": - tlsstat.TLSRxNoPadViolation = value - } - - } - - return tlsstat, s.Err() -} diff --git a/vendor/github.com/prometheus/procfs/net_udp.go b/vendor/github.com/prometheus/procfs/net_udp.go deleted file mode 100644 index 8a3277910..000000000 --- a/vendor/github.com/prometheus/procfs/net_udp.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright The Prometheus 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 procfs - -type ( - // NetUDP represents the contents of /proc/net/udp{,6} file without the header. - NetUDP []*netIPSocketLine - - // NetUDPSummary provides already computed values like the total queue lengths or - // the total number of used sockets. In contrast to NetUDP it does not collect - // the parsed lines into a slice. - NetUDPSummary NetIPSocketSummary -) - -// NetUDP returns the IPv4 kernel/networking statistics for UDP datagrams -// read from /proc/net/udp. -func (fs FS) NetUDP() (NetUDP, error) { - return newNetUDP(fs.proc.Path("net/udp")) -} - -// NetUDP6 returns the IPv6 kernel/networking statistics for UDP datagrams -// read from /proc/net/udp6. -func (fs FS) NetUDP6() (NetUDP, error) { - return newNetUDP(fs.proc.Path("net/udp6")) -} - -// NetUDPSummary returns already computed statistics like the total queue lengths -// for UDP datagrams read from /proc/net/udp. -func (fs FS) NetUDPSummary() (*NetUDPSummary, error) { - return newNetUDPSummary(fs.proc.Path("net/udp")) -} - -// NetUDP6Summary returns already computed statistics like the total queue lengths -// for UDP datagrams read from /proc/net/udp6. -func (fs FS) NetUDP6Summary() (*NetUDPSummary, error) { - return newNetUDPSummary(fs.proc.Path("net/udp6")) -} - -// newNetUDP creates a new NetUDP{,6} from the contents of the given file. -func newNetUDP(file string) (NetUDP, error) { - n, err := newNetIPSocket(file) - n1 := NetUDP(n) - return n1, err -} - -func newNetUDPSummary(file string) (*NetUDPSummary, error) { - n, err := newNetIPSocketSummary(file) - if n == nil { - return nil, err - } - n1 := NetUDPSummary(*n) - return &n1, err -} diff --git a/vendor/github.com/prometheus/procfs/net_unix.go b/vendor/github.com/prometheus/procfs/net_unix.go deleted file mode 100644 index e4d635923..000000000 --- a/vendor/github.com/prometheus/procfs/net_unix.go +++ /dev/null @@ -1,257 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "fmt" - "io" - "os" - "strconv" - "strings" -) - -// For the proc file format details, -// see https://elixir.bootlin.com/linux/v4.17/source/net/unix/af_unix.c#L2815 -// and https://elixir.bootlin.com/linux/latest/source/include/uapi/linux/net.h#L48. - -// Constants for the various /proc/net/unix enumerations. -// TODO: match against x/sys/unix or similar? -const ( - netUnixTypeStream = 1 - netUnixTypeDgram = 2 - netUnixTypeSeqpacket = 5 - - netUnixFlagDefault = 0 - netUnixFlagListen = 1 << 16 - - netUnixStateUnconnected = 1 - netUnixStateConnecting = 2 - netUnixStateConnected = 3 - netUnixStateDisconnected = 4 -) - -// NetUNIXType is the type of the type field. -type NetUNIXType uint64 - -// NetUNIXFlags is the type of the flags field. -type NetUNIXFlags uint64 - -// NetUNIXState is the type of the state field. -type NetUNIXState uint64 - -// NetUNIXLine represents a line of /proc/net/unix. -type NetUNIXLine struct { - KernelPtr string - RefCount uint64 - Protocol uint64 - Flags NetUNIXFlags - Type NetUNIXType - State NetUNIXState - Inode uint64 - Path string -} - -// NetUNIX holds the data read from /proc/net/unix. -type NetUNIX struct { - Rows []*NetUNIXLine -} - -// NetUNIX returns data read from /proc/net/unix. -func (fs FS) NetUNIX() (*NetUNIX, error) { - return readNetUNIX(fs.proc.Path("net/unix")) -} - -// readNetUNIX reads data in /proc/net/unix format from the specified file. -func readNetUNIX(file string) (*NetUNIX, error) { - // This file could be quite large and a streaming read is desirable versus - // reading the entire contents at once. - f, err := os.Open(file) - if err != nil { - return nil, err - } - defer f.Close() - - return parseNetUNIX(f) -} - -// parseNetUNIX creates a NetUnix structure from the incoming stream. -func parseNetUNIX(r io.Reader) (*NetUNIX, error) { - // Begin scanning by checking for the existence of Inode. - s := bufio.NewScanner(r) - s.Scan() - - // From the man page of proc(5), it does not contain an Inode field, - // but in actually it exists. This code works for both cases. - hasInode := strings.Contains(s.Text(), "Inode") - - // Expect a minimum number of fields, but Inode and Path are optional: - // Num RefCount Protocol Flags Type St Inode Path - minFields := 6 - if hasInode { - minFields++ - } - - var nu NetUNIX - for s.Scan() { - line := s.Text() - item, err := nu.parseLine(line, hasInode, minFields) - if err != nil { - return nil, fmt.Errorf("%w: /proc/net/unix encountered data %q: %w", ErrFileParse, line, err) - } - - nu.Rows = append(nu.Rows, item) - } - - if err := s.Err(); err != nil { - return nil, fmt.Errorf("%w: /proc/net/unix encountered data: %w", ErrFileParse, err) - } - - return &nu, nil -} - -func (u *NetUNIX) parseLine(line string, hasInode bool, minFields int) (*NetUNIXLine, error) { - fields := strings.Fields(line) - - l := len(fields) - if l < minFields { - return nil, fmt.Errorf("%w: expected at least %d fields but got %d", ErrFileParse, minFields, l) - } - - // Field offsets are as follows: - // Num RefCount Protocol Flags Type St Inode Path - - kernelPtr := strings.TrimSuffix(fields[0], ":") - - users, err := u.parseUsers(fields[1]) - if err != nil { - return nil, fmt.Errorf("%w: ref count %q: %w", ErrFileParse, fields[1], err) - } - - flags, err := u.parseFlags(fields[3]) - if err != nil { - return nil, fmt.Errorf("%w: Unable to parse flags %q: %w", ErrFileParse, fields[3], err) - } - - typ, err := u.parseType(fields[4]) - if err != nil { - return nil, fmt.Errorf("%w: Failed to parse type %q: %w", ErrFileParse, fields[4], err) - } - - state, err := u.parseState(fields[5]) - if err != nil { - return nil, fmt.Errorf("%w: Failed to parse state %q: %w", ErrFileParse, fields[5], err) - } - - var inode uint64 - if hasInode { - inode, err = u.parseInode(fields[6]) - if err != nil { - return nil, fmt.Errorf("%w failed to parse inode %q: %w", ErrFileParse, fields[6], err) - } - } - - n := &NetUNIXLine{ - KernelPtr: kernelPtr, - RefCount: users, - Type: typ, - Flags: flags, - State: state, - Inode: inode, - } - - // Path field is optional. - if l > minFields { - // Path occurs at either index 6 or 7 depending on whether inode is - // already present. - pathIdx := 7 - if !hasInode { - pathIdx-- - } - - n.Path = fields[pathIdx] - } - - return n, nil -} - -func (u NetUNIX) parseUsers(s string) (uint64, error) { - return strconv.ParseUint(s, 16, 32) -} - -func (u NetUNIX) parseType(s string) (NetUNIXType, error) { - typ, err := strconv.ParseUint(s, 16, 16) - if err != nil { - return 0, err - } - - return NetUNIXType(typ), nil -} - -func (u NetUNIX) parseFlags(s string) (NetUNIXFlags, error) { - flags, err := strconv.ParseUint(s, 16, 32) - if err != nil { - return 0, err - } - - return NetUNIXFlags(flags), nil -} - -func (u NetUNIX) parseState(s string) (NetUNIXState, error) { - st, err := strconv.ParseInt(s, 16, 8) - if err != nil { - return 0, err - } - - return NetUNIXState(st), nil -} - -func (u NetUNIX) parseInode(s string) (uint64, error) { - return strconv.ParseUint(s, 10, 64) -} - -func (t NetUNIXType) String() string { - switch t { - case netUnixTypeStream: - return "stream" - case netUnixTypeDgram: - return "dgram" - case netUnixTypeSeqpacket: - return "seqpacket" - } - return "unknown" -} - -func (f NetUNIXFlags) String() string { - switch f { - case netUnixFlagListen: - return "listen" - default: - return "default" - } -} - -func (s NetUNIXState) String() string { - switch s { - case netUnixStateUnconnected: - return "unconnected" - case netUnixStateConnecting: - return "connecting" - case netUnixStateConnected: - return "connected" - case netUnixStateDisconnected: - return "disconnected" - } - return "unknown" -} diff --git a/vendor/github.com/prometheus/procfs/net_wireless.go b/vendor/github.com/prometheus/procfs/net_wireless.go deleted file mode 100644 index f74dd3bed..000000000 --- a/vendor/github.com/prometheus/procfs/net_wireless.go +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Wireless models the content of /proc/net/wireless. -type Wireless struct { - Name string - - // Status is the current 4-digit hex value status of the interface. - Status uint64 - - // QualityLink is the link quality. - QualityLink int - - // QualityLevel is the signal gain (dBm). - QualityLevel int - - // QualityNoise is the signal noise baseline (dBm). - QualityNoise int - - // DiscardedNwid is the number of discarded packets with wrong nwid/essid. - DiscardedNwid int - - // DiscardedCrypt is the number of discarded packets with wrong code/decode (WEP). - DiscardedCrypt int - - // DiscardedFrag is the number of discarded packets that can't perform MAC reassembly. - DiscardedFrag int - - // DiscardedRetry is the number of discarded packets that reached max MAC retries. - DiscardedRetry int - - // DiscardedMisc is the number of discarded packets for other reasons. - DiscardedMisc int - - // MissedBeacon is the number of missed beacons/superframe. - MissedBeacon int -} - -// Wireless returns kernel wireless statistics. -func (fs FS) Wireless() ([]*Wireless, error) { - b, err := util.ReadFileNoStat(fs.proc.Path("net/wireless")) - if err != nil { - return nil, err - } - - m, err := parseWireless(bytes.NewReader(b)) - if err != nil { - return nil, fmt.Errorf("%w: wireless: %w", ErrFileParse, err) - } - - return m, nil -} - -// parseWireless parses the contents of /proc/net/wireless. -/* -Inter-| sta-| Quality | Discarded packets | Missed | WE -face | tus | link level noise | nwid crypt frag retry misc | beacon | 22 - eth1: 0000 5. -256. -10. 0 1 0 3 0 0 - eth2: 0000 5. -256. -20. 0 2 0 4 0 0 -*/ -func parseWireless(r io.Reader) ([]*Wireless, error) { - var ( - interfaces []*Wireless - scanner = bufio.NewScanner(r) - ) - - for n := 0; scanner.Scan(); n++ { - // Skip the 2 header lines. - if n < 2 { - continue - } - - line := scanner.Text() - - parts := strings.Split(line, ":") - if len(parts) != 2 { - return nil, fmt.Errorf("%w: expected 2 parts after splitting line by ':', got %d for line %q", ErrFileParse, len(parts), line) - } - - name := strings.TrimSpace(parts[0]) - stats := strings.Fields(parts[1]) - - if len(stats) < 10 { - return nil, fmt.Errorf("%w: invalid number of fields in line %d, expected 10+, got %d: %q", ErrFileParse, n, len(stats), line) - } - - status, err := strconv.ParseUint(stats[0], 16, 16) - if err != nil { - return nil, fmt.Errorf("%w: invalid status in line %d: %q", ErrFileParse, n, line) - } - - qlink, err := strconv.Atoi(strings.TrimSuffix(stats[1], ".")) - if err != nil { - return nil, fmt.Errorf("%w: parse Quality:link as integer %q: %w", ErrFileParse, stats[1], err) - } - - qlevel, err := strconv.Atoi(strings.TrimSuffix(stats[2], ".")) - if err != nil { - return nil, fmt.Errorf("%w: Quality:level as integer %q: %w", ErrFileParse, stats[2], err) - } - - qnoise, err := strconv.Atoi(strings.TrimSuffix(stats[3], ".")) - if err != nil { - return nil, fmt.Errorf("%w: Quality:noise as integer %q: %w", ErrFileParse, stats[3], err) - } - - dnwid, err := strconv.Atoi(stats[4]) - if err != nil { - return nil, fmt.Errorf("%w: Discarded:nwid as integer %q: %w", ErrFileParse, stats[4], err) - } - - dcrypt, err := strconv.Atoi(stats[5]) - if err != nil { - return nil, fmt.Errorf("%w: Discarded:crypt as integer %q: %w", ErrFileParse, stats[5], err) - } - - dfrag, err := strconv.Atoi(stats[6]) - if err != nil { - return nil, fmt.Errorf("%w: Discarded:frag as integer %q: %w", ErrFileParse, stats[6], err) - } - - dretry, err := strconv.Atoi(stats[7]) - if err != nil { - return nil, fmt.Errorf("%w: Discarded:retry as integer %q: %w", ErrFileParse, stats[7], err) - } - - dmisc, err := strconv.Atoi(stats[8]) - if err != nil { - return nil, fmt.Errorf("%w: Discarded:misc as integer %q: %w", ErrFileParse, stats[8], err) - } - - mbeacon, err := strconv.Atoi(stats[9]) - if err != nil { - return nil, fmt.Errorf("%w: Missed:beacon as integer %q: %w", ErrFileParse, stats[9], err) - } - - w := &Wireless{ - Name: name, - Status: status, - QualityLink: qlink, - QualityLevel: qlevel, - QualityNoise: qnoise, - DiscardedNwid: dnwid, - DiscardedCrypt: dcrypt, - DiscardedFrag: dfrag, - DiscardedRetry: dretry, - DiscardedMisc: dmisc, - MissedBeacon: mbeacon, - } - - interfaces = append(interfaces, w) - } - - if err := scanner.Err(); err != nil { - return nil, fmt.Errorf("%w: Failed to scan /proc/net/wireless: %w", ErrFileRead, err) - } - - return interfaces, nil -} diff --git a/vendor/github.com/prometheus/procfs/net_xfrm.go b/vendor/github.com/prometheus/procfs/net_xfrm.go deleted file mode 100644 index 5a9f497d1..000000000 --- a/vendor/github.com/prometheus/procfs/net_xfrm.go +++ /dev/null @@ -1,189 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" -) - -// XfrmStat models the contents of /proc/net/xfrm_stat. -type XfrmStat struct { - // All errors which are not matched by other - XfrmInError int - // No buffer is left - XfrmInBufferError int - // Header Error - XfrmInHdrError int - // No state found - // i.e. either inbound SPI, address, or IPSEC protocol at SA is wrong - XfrmInNoStates int - // Transformation protocol specific error - // e.g. SA Key is wrong - XfrmInStateProtoError int - // Transformation mode specific error - XfrmInStateModeError int - // Sequence error - // e.g. sequence number is out of window - XfrmInStateSeqError int - // State is expired - XfrmInStateExpired int - // State has mismatch option - // e.g. UDP encapsulation type is mismatched - XfrmInStateMismatch int - // State is invalid - XfrmInStateInvalid int - // No matching template for states - // e.g. Inbound SAs are correct but SP rule is wrong - XfrmInTmplMismatch int - // No policy is found for states - // e.g. Inbound SAs are correct but no SP is found - XfrmInNoPols int - // Policy discards - XfrmInPolBlock int - // Policy error - XfrmInPolError int - // All errors which are not matched by others - XfrmOutError int - // Bundle generation error - XfrmOutBundleGenError int - // Bundle check error - XfrmOutBundleCheckError int - // No state was found - XfrmOutNoStates int - // Transformation protocol specific error - XfrmOutStateProtoError int - // Transportation mode specific error - XfrmOutStateModeError int - // Sequence error - // i.e sequence number overflow - XfrmOutStateSeqError int - // State is expired - XfrmOutStateExpired int - // Policy discads - XfrmOutPolBlock int - // Policy is dead - XfrmOutPolDead int - // Policy Error - XfrmOutPolError int - // Forward routing of a packet is not allowed - XfrmFwdHdrError int - // State is invalid, perhaps expired - XfrmOutStateInvalid int - // State hasn’t been fully acquired before use - XfrmAcquireError int -} - -// NewXfrmStat reads the xfrm_stat statistics. -func NewXfrmStat() (XfrmStat, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return XfrmStat{}, err - } - - return fs.NewXfrmStat() -} - -// NewXfrmStat reads the xfrm_stat statistics from the 'proc' filesystem. -func (fs FS) NewXfrmStat() (XfrmStat, error) { - file, err := os.Open(fs.proc.Path("net/xfrm_stat")) - if err != nil { - return XfrmStat{}, err - } - defer file.Close() - - var ( - x = XfrmStat{} - s = bufio.NewScanner(file) - ) - - for s.Scan() { - fields := strings.Fields(s.Text()) - - if len(fields) != 2 { - return XfrmStat{}, fmt.Errorf("%w: %q line %q", ErrFileParse, file.Name(), s.Text()) - } - - name := fields[0] - value, err := strconv.Atoi(fields[1]) - if err != nil { - return XfrmStat{}, err - } - - switch name { - case "XfrmInError": - x.XfrmInError = value - case "XfrmInBufferError": - x.XfrmInBufferError = value - case "XfrmInHdrError": - x.XfrmInHdrError = value - case "XfrmInNoStates": - x.XfrmInNoStates = value - case "XfrmInStateProtoError": - x.XfrmInStateProtoError = value - case "XfrmInStateModeError": - x.XfrmInStateModeError = value - case "XfrmInStateSeqError": - x.XfrmInStateSeqError = value - case "XfrmInStateExpired": - x.XfrmInStateExpired = value - case "XfrmInStateInvalid": - x.XfrmInStateInvalid = value - case "XfrmInTmplMismatch": - x.XfrmInTmplMismatch = value - case "XfrmInNoPols": - x.XfrmInNoPols = value - case "XfrmInPolBlock": - x.XfrmInPolBlock = value - case "XfrmInPolError": - x.XfrmInPolError = value - case "XfrmOutError": - x.XfrmOutError = value - case "XfrmInStateMismatch": - x.XfrmInStateMismatch = value - case "XfrmOutBundleGenError": - x.XfrmOutBundleGenError = value - case "XfrmOutBundleCheckError": - x.XfrmOutBundleCheckError = value - case "XfrmOutNoStates": - x.XfrmOutNoStates = value - case "XfrmOutStateProtoError": - x.XfrmOutStateProtoError = value - case "XfrmOutStateModeError": - x.XfrmOutStateModeError = value - case "XfrmOutStateSeqError": - x.XfrmOutStateSeqError = value - case "XfrmOutStateExpired": - x.XfrmOutStateExpired = value - case "XfrmOutPolBlock": - x.XfrmOutPolBlock = value - case "XfrmOutPolDead": - x.XfrmOutPolDead = value - case "XfrmOutPolError": - x.XfrmOutPolError = value - case "XfrmFwdHdrError": - x.XfrmFwdHdrError = value - case "XfrmOutStateInvalid": - x.XfrmOutStateInvalid = value - case "XfrmAcquireError": - x.XfrmAcquireError = value - } - - } - - return x, s.Err() -} diff --git a/vendor/github.com/prometheus/procfs/netstat.go b/vendor/github.com/prometheus/procfs/netstat.go deleted file mode 100644 index dbdae4739..000000000 --- a/vendor/github.com/prometheus/procfs/netstat.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "os" - "path/filepath" - "strconv" - "strings" -) - -// NetStat contains statistics for all the counters from one file. -type NetStat struct { - Stats map[string][]uint64 - Filename string -} - -// NetStat retrieves stats from `/proc/net/stat/`. -func (fs FS) NetStat() ([]NetStat, error) { - statFiles, err := filepath.Glob(fs.proc.Path("net/stat/*")) - if err != nil { - return nil, err - } - - var netStatsTotal []NetStat - - for _, filePath := range statFiles { - procNetstat, err := parseNetstat(filePath) - if err != nil { - return nil, err - } - procNetstat.Filename = filepath.Base(filePath) - - netStatsTotal = append(netStatsTotal, procNetstat) - } - return netStatsTotal, nil -} - -// parseNetstat parses the metrics from `/proc/net/stat/` file -// and returns a NetStat structure. -func parseNetstat(filePath string) (NetStat, error) { - netStat := NetStat{ - Stats: make(map[string][]uint64), - } - file, err := os.Open(filePath) - if err != nil { - return netStat, err - } - defer file.Close() - - scanner := bufio.NewScanner(file) - scanner.Scan() - - // First string is always a header for stats - var headers []string - headers = append(headers, strings.Fields(scanner.Text())...) - - // Other strings represent per-CPU counters - for scanner.Scan() { - for num, counter := range strings.Fields(scanner.Text()) { - value, err := strconv.ParseUint(counter, 16, 64) - if err != nil { - return NetStat{}, err - } - netStat.Stats[headers[num]] = append(netStat.Stats[headers[num]], value) - } - } - - return netStat, nil -} diff --git a/vendor/github.com/prometheus/procfs/nfnetlink_queue.go b/vendor/github.com/prometheus/procfs/nfnetlink_queue.go deleted file mode 100644 index b0a73b11e..000000000 --- a/vendor/github.com/prometheus/procfs/nfnetlink_queue.go +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - - "github.com/prometheus/procfs/internal/util" -) - -const nfNetLinkQueueFormat = "%d %d %d %d %d %d %d %d %d" - -// NFNetLinkQueue contains general information about netfilter queues found in /proc/net/netfilter/nfnetlink_queue. -type NFNetLinkQueue struct { - // id of the queue - QueueID uint - // pid of process handling the queue - PeerPID uint - // number of packets waiting for a decision - QueueTotal uint - // indicate how userspace receive packets - CopyMode uint - // size of copy - CopyRange uint - // number of items dropped by the kernel because too many packets were waiting a decision. - // It queue_total is superior to queue_max_len (1024 per default) the packets are dropped. - QueueDropped uint - // number of packets dropped by userspace (due to kernel send failure on the netlink socket) - QueueUserDropped uint - // sequence number of packets queued. It gives a correct approximation of the number of queued packets. - SequenceID uint - // internal value (number of entity using the queue) - Use uint -} - -// NFNetLinkQueue returns information about current state of netfilter queues. -func (fs FS) NFNetLinkQueue() ([]NFNetLinkQueue, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("net/netfilter/nfnetlink_queue")) - if err != nil { - return nil, err - } - - queue := []NFNetLinkQueue{} - if len(data) == 0 { - return queue, nil - } - - scanner := bufio.NewScanner(bytes.NewReader(data)) - for scanner.Scan() { - line := scanner.Text() - nFNetLinkQueue, err := parseNFNetLinkQueueLine(line) - if err != nil { - return nil, err - } - queue = append(queue, *nFNetLinkQueue) - } - return queue, nil -} - -// parseNFNetLinkQueueLine parses each line of the /proc/net/netfilter/nfnetlink_queue file. -func parseNFNetLinkQueueLine(line string) (*NFNetLinkQueue, error) { - nFNetLinkQueue := NFNetLinkQueue{} - _, err := fmt.Sscanf( - line, nfNetLinkQueueFormat, - &nFNetLinkQueue.QueueID, &nFNetLinkQueue.PeerPID, &nFNetLinkQueue.QueueTotal, &nFNetLinkQueue.CopyMode, - &nFNetLinkQueue.CopyRange, &nFNetLinkQueue.QueueDropped, &nFNetLinkQueue.QueueUserDropped, &nFNetLinkQueue.SequenceID, &nFNetLinkQueue.Use, - ) - if err != nil { - return nil, err - } - return &nFNetLinkQueue, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc.go b/vendor/github.com/prometheus/procfs/proc.go deleted file mode 100644 index 39c14aa55..000000000 --- a/vendor/github.com/prometheus/procfs/proc.go +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bytes" - "errors" - "fmt" - "io" - "os" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Proc provides information about a running process. -type Proc struct { - // The process ID. - PID int - - fs FS -} - -// Procs represents a list of Proc structs. -type Procs []Proc - -var ( - ErrFileParse = errors.New("error parsing file") - ErrFileRead = errors.New("error reading file") - ErrMountPoint = errors.New("error accessing mount point") -) - -func (p Procs) Len() int { return len(p) } -func (p Procs) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p Procs) Less(i, j int) bool { return p[i].PID < p[j].PID } - -// Self returns a process for the current process read via /proc/self. -func Self() (Proc, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil || errors.Is(err, ErrMountPoint) { - return Proc{}, err - } - return fs.Self() -} - -// NewProc returns a process for the given pid under /proc. -func NewProc(pid int) (Proc, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return Proc{}, err - } - return fs.Proc(pid) -} - -// AllProcs returns a list of all currently available processes under /proc. -func AllProcs() (Procs, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return Procs{}, err - } - return fs.AllProcs() -} - -// Self returns a process for the current process. -func (fs FS) Self() (Proc, error) { - p, err := os.Readlink(fs.proc.Path("self")) - if err != nil { - return Proc{}, err - } - pid, err := strconv.Atoi(strings.ReplaceAll(p, string(fs.proc), "")) - if err != nil { - return Proc{}, err - } - return fs.Proc(pid) -} - -// NewProc returns a process for the given pid. -// -// Deprecated: Use fs.Proc() instead. -func (fs FS) NewProc(pid int) (Proc, error) { - return fs.Proc(pid) -} - -// Proc returns a process for the given pid. -func (fs FS) Proc(pid int) (Proc, error) { - if _, err := os.Stat(fs.proc.Path(strconv.Itoa(pid))); err != nil { - return Proc{}, err - } - return Proc{PID: pid, fs: fs}, nil -} - -// AllProcs returns a list of all currently available processes. -func (fs FS) AllProcs() (Procs, error) { - d, err := os.Open(fs.proc.Path()) - if err != nil { - return Procs{}, err - } - defer d.Close() - - names, err := d.Readdirnames(-1) - if err != nil { - return Procs{}, fmt.Errorf("%w: Cannot read file: %v: %w", ErrFileRead, names, err) - } - - p := Procs{} - for _, n := range names { - pid, err := strconv.ParseInt(n, 10, 64) - if err != nil { - continue - } - p = append(p, Proc{PID: int(pid), fs: fs}) - } - - return p, nil -} - -// CmdLine returns the command line of a process. -func (p Proc) CmdLine() ([]string, error) { - data, err := util.ReadFileNoStat(p.path("cmdline")) - if err != nil { - return nil, err - } - - if len(data) < 1 { - return []string{}, nil - } - - return strings.Split(string(bytes.TrimRight(data, "\x00")), "\x00"), nil -} - -// Wchan returns the wchan (wait channel) of a process. -func (p Proc) Wchan() (string, error) { - f, err := os.Open(p.path("wchan")) - if err != nil { - return "", err - } - defer f.Close() - - data, err := io.ReadAll(f) - if err != nil { - return "", err - } - - wchan := string(data) - if wchan == "" || wchan == "0" { - return "", nil - } - - return wchan, nil -} - -// Comm returns the command name of a process. -func (p Proc) Comm() (string, error) { - data, err := util.ReadFileNoStat(p.path("comm")) - if err != nil { - return "", err - } - - return strings.TrimSpace(string(data)), nil -} - -// Executable returns the absolute path of the executable command of a process. -func (p Proc) Executable() (string, error) { - exe, err := os.Readlink(p.path("exe")) - if os.IsNotExist(err) { - return "", nil - } - - return exe, err -} - -// Cwd returns the absolute path to the current working directory of the process. -func (p Proc) Cwd() (string, error) { - wd, err := os.Readlink(p.path("cwd")) - if os.IsNotExist(err) { - return "", nil - } - - return wd, err -} - -// RootDir returns the absolute path to the process's root directory (as set by chroot). -func (p Proc) RootDir() (string, error) { - rdir, err := os.Readlink(p.path("root")) - if os.IsNotExist(err) { - return "", nil - } - - return rdir, err -} - -// FileDescriptors returns the currently open file descriptors of a process. -func (p Proc) FileDescriptors() ([]uintptr, error) { - names, err := p.fileDescriptors() - if err != nil { - return nil, err - } - - fds := make([]uintptr, len(names)) - for i, n := range names { - fd, err := strconv.ParseInt(n, 10, 32) - if err != nil { - return nil, fmt.Errorf("%w: Cannot parse line: %v: %w", ErrFileParse, i, err) - } - fds[i] = uintptr(fd) - } - - return fds, nil -} - -// FileDescriptorTargets returns the targets of all file descriptors of a process. -// If a file descriptor is not a symlink to a file (like a socket), that value will be the empty string. -func (p Proc) FileDescriptorTargets() ([]string, error) { - names, err := p.fileDescriptors() - if err != nil { - return nil, err - } - - targets := make([]string, len(names)) - - for i, name := range names { - target, err := os.Readlink(p.path("fd", name)) - if err == nil { - targets[i] = target - } - } - - return targets, nil -} - -// FileDescriptorsLen returns the number of currently open file descriptors of -// a process. -func (p Proc) FileDescriptorsLen() (int, error) { - // Use fast path if available (Linux v6.2): https://github.com/torvalds/linux/commit/f1f1f2569901 - if p.fs.isReal { - stat, err := os.Stat(p.path("fd")) - if err != nil { - return 0, err - } - - size := stat.Size() - if size > 0 { - return int(size), nil - } - } - - fds, err := p.fileDescriptors() - if err != nil { - return 0, err - } - - return len(fds), nil -} - -// MountStats retrieves statistics and configuration for mount points in a -// process's namespace. -func (p Proc) MountStats() ([]*Mount, error) { - f, err := os.Open(p.path("mountstats")) - if err != nil { - return nil, err - } - defer f.Close() - - return parseMountStats(f) -} - -// MountInfo retrieves mount information for mount points in a -// process's namespace. -// It supplies information missing in `/proc/self/mounts` and -// fixes various other problems with that file too. -func (p Proc) MountInfo() ([]*MountInfo, error) { - data, err := util.ReadFileNoStat(p.path("mountinfo")) - if err != nil { - return nil, err - } - return parseMountInfo(data) -} - -func (p Proc) fileDescriptors() ([]string, error) { - d, err := os.Open(p.path("fd")) - if err != nil { - return nil, err - } - defer d.Close() - - names, err := d.Readdirnames(-1) - if err != nil { - return nil, fmt.Errorf("%w: Cannot read file: %v: %w", ErrFileRead, names, err) - } - - return names, nil -} - -func (p Proc) path(pa ...string) string { - return p.fs.proc.Path(append([]string{strconv.Itoa(p.PID)}, pa...)...) -} - -// FileDescriptorsInfo retrieves information about all file descriptors of -// the process. -func (p Proc) FileDescriptorsInfo() (ProcFDInfos, error) { - names, err := p.fileDescriptors() - if err != nil { - return nil, err - } - - var fdinfos ProcFDInfos - - for _, n := range names { - fdinfo, err := p.FDInfo(n) - if err != nil { - continue - } - fdinfos = append(fdinfos, *fdinfo) - } - - return fdinfos, nil -} - -// Schedstat returns task scheduling information for the process. -func (p Proc) Schedstat() (ProcSchedstat, error) { - contents, err := os.ReadFile(p.path("schedstat")) - if err != nil { - return ProcSchedstat{}, err - } - return parseProcSchedstat(string(contents)) -} diff --git a/vendor/github.com/prometheus/procfs/proc_cgroup.go b/vendor/github.com/prometheus/procfs/proc_cgroup.go deleted file mode 100644 index 7e8a12297..000000000 --- a/vendor/github.com/prometheus/procfs/proc_cgroup.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Cgroup models one line from /proc/[pid]/cgroup. Each Cgroup struct describes the placement of a PID inside a -// specific control hierarchy. The kernel has two cgroup APIs, v1 and v2. The v1 has one hierarchy per available resource -// controller, while v2 has one unified hierarchy shared by all controllers. Regardless of v1 or v2, all hierarchies -// contain all running processes, so the question answerable with a Cgroup struct is 'where is this process in -// this hierarchy' (where==what path on the specific cgroupfs). By prefixing this path with the mount point of -// *this specific* hierarchy, you can locate the relevant pseudo-files needed to read/set the data for this PID -// in this hierarchy -// -// Also see http://man7.org/linux/man-pages/man7/cgroups.7.html -type Cgroup struct { - // HierarchyID that can be matched to a named hierarchy using /proc/cgroups. Cgroups V2 only has one - // hierarchy, so HierarchyID is always 0. For cgroups v1 this is a unique ID number - HierarchyID int - // Controllers using this hierarchy of processes. Controllers are also known as subsystems. For - // Cgroups V2 this may be empty, as all active controllers use the same hierarchy - Controllers []string - // Path of this control group, relative to the mount point of the cgroupfs representing this specific - // hierarchy - Path string -} - -// parseCgroupString parses each line of the /proc/[pid]/cgroup file -// Line format is hierarchyID:[controller1,controller2]:path. -func parseCgroupString(cgroupStr string) (*Cgroup, error) { - var err error - - fields := strings.SplitN(cgroupStr, ":", 3) - if len(fields) < 3 { - return nil, fmt.Errorf("%w: 3+ fields required, found %d fields in cgroup string: %s", ErrFileParse, len(fields), cgroupStr) - } - - cgroup := &Cgroup{ - Path: fields[2], - Controllers: nil, - } - cgroup.HierarchyID, err = strconv.Atoi(fields[0]) - if err != nil { - return nil, fmt.Errorf("%w: hierarchy ID: %q", ErrFileParse, fields[0]) - } - if fields[1] != "" { - ssNames := strings.Split(fields[1], ",") - cgroup.Controllers = append(cgroup.Controllers, ssNames...) - } - return cgroup, nil -} - -// parseCgroups reads each line of the /proc/[pid]/cgroup file. -func parseCgroups(data []byte) ([]Cgroup, error) { - var cgroups []Cgroup - scanner := bufio.NewScanner(bytes.NewReader(data)) - for scanner.Scan() { - mountString := scanner.Text() - parsedMounts, err := parseCgroupString(mountString) - if err != nil { - return nil, err - } - cgroups = append(cgroups, *parsedMounts) - } - - err := scanner.Err() - return cgroups, err -} - -// Cgroups reads from /proc//cgroups and returns a []*Cgroup struct locating this PID in each process -// control hierarchy running on this system. On every system (v1 and v2), all hierarchies contain all processes, -// so the len of the returned struct is equal to the number of active hierarchies on this system. -func (p Proc) Cgroups() ([]Cgroup, error) { - data, err := util.ReadFileNoStat(p.path("cgroup")) - if err != nil { - return nil, err - } - return parseCgroups(data) -} diff --git a/vendor/github.com/prometheus/procfs/proc_cgroups.go b/vendor/github.com/prometheus/procfs/proc_cgroups.go deleted file mode 100644 index 0b275c3b1..000000000 --- a/vendor/github.com/prometheus/procfs/proc_cgroups.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// CgroupSummary models one line from /proc/cgroups. -// This file contains information about the controllers that are compiled into the kernel. -// -// Also see http://man7.org/linux/man-pages/man7/cgroups.7.html -type CgroupSummary struct { - // The name of the controller. controller is also known as subsystem. - SubsysName string - // The unique ID of the cgroup hierarchy on which this controller is mounted. - Hierarchy int - // The number of control groups in this hierarchy using this controller. - Cgroups int - // This field contains the value 1 if this controller is enabled, or 0 if it has been disabled - Enabled int -} - -// parseCgroupSummary parses each line of the /proc/cgroup file -// Line format is `subsys_name hierarchy num_cgroups enabled`. -func parseCgroupSummaryString(cgroupSummaryStr string) (*CgroupSummary, error) { - var err error - - fields := strings.Fields(cgroupSummaryStr) - // require at least 4 fields - if len(fields) < 4 { - return nil, fmt.Errorf("%w: 4+ fields required, found %d fields in cgroup info string: %s", ErrFileParse, len(fields), cgroupSummaryStr) - } - - CgroupSummary := &CgroupSummary{ - SubsysName: fields[0], - } - CgroupSummary.Hierarchy, err = strconv.Atoi(fields[1]) - if err != nil { - return nil, fmt.Errorf("%w: Unable to parse hierarchy ID from %q", ErrFileParse, fields[1]) - } - CgroupSummary.Cgroups, err = strconv.Atoi(fields[2]) - if err != nil { - return nil, fmt.Errorf("%w: Unable to parse Cgroup Num from %q", ErrFileParse, fields[2]) - } - CgroupSummary.Enabled, err = strconv.Atoi(fields[3]) - if err != nil { - return nil, fmt.Errorf("%w: Unable to parse Enabled from %q", ErrFileParse, fields[3]) - } - return CgroupSummary, nil -} - -// parseCgroupSummary reads each line of the /proc/cgroup file. -func parseCgroupSummary(data []byte) ([]CgroupSummary, error) { - var CgroupSummarys []CgroupSummary - scanner := bufio.NewScanner(bytes.NewReader(data)) - for scanner.Scan() { - CgroupSummaryString := scanner.Text() - // ignore comment lines - if strings.HasPrefix(CgroupSummaryString, "#") { - continue - } - CgroupSummary, err := parseCgroupSummaryString(CgroupSummaryString) - if err != nil { - return nil, err - } - CgroupSummarys = append(CgroupSummarys, *CgroupSummary) - } - - err := scanner.Err() - return CgroupSummarys, err -} - -// CgroupSummarys returns information about current /proc/cgroups. -func (fs FS) CgroupSummarys() ([]CgroupSummary, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("cgroups")) - if err != nil { - return nil, err - } - return parseCgroupSummary(data) -} diff --git a/vendor/github.com/prometheus/procfs/proc_environ.go b/vendor/github.com/prometheus/procfs/proc_environ.go deleted file mode 100644 index 5b941de04..000000000 --- a/vendor/github.com/prometheus/procfs/proc_environ.go +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Environ reads process environments from `/proc//environ`. -func (p Proc) Environ() ([]string, error) { - environments := make([]string, 0) - - data, err := util.ReadFileNoStat(p.path("environ")) - if err != nil { - return environments, err - } - - environments = strings.Split(string(data), "\000") - if len(environments) > 0 { - environments = environments[:len(environments)-1] - } - - return environments, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_fdinfo.go b/vendor/github.com/prometheus/procfs/proc_fdinfo.go deleted file mode 100644 index fa57761db..000000000 --- a/vendor/github.com/prometheus/procfs/proc_fdinfo.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "regexp" - - "github.com/prometheus/procfs/internal/util" -) - -var ( - rPos = regexp.MustCompile(`^pos:\s+(\d+)$`) - rFlags = regexp.MustCompile(`^flags:\s+(\d+)$`) - rMntID = regexp.MustCompile(`^mnt_id:\s+(\d+)$`) - rIno = regexp.MustCompile(`^ino:\s+(\d+)$`) - rInotify = regexp.MustCompile(`^inotify`) - rInotifyParts = regexp.MustCompile(`^inotify\s+wd:([0-9a-f]+)\s+ino:([0-9a-f]+)\s+sdev:([0-9a-f]+)(?:\s+mask:([0-9a-f]+))?`) -) - -// ProcFDInfo contains represents file descriptor information. -type ProcFDInfo struct { - // File descriptor - FD string - // File offset - Pos string - // File access mode and status flags - Flags string - // Mount point ID - MntID string - // Inode number - Ino string - // List of inotify lines (structured) in the fdinfo file (kernel 3.8+ only) - InotifyInfos []InotifyInfo -} - -// FDInfo constructor. On kernels older than 3.8, InotifyInfos will always be empty. -func (p Proc) FDInfo(fd string) (*ProcFDInfo, error) { - data, err := util.ReadFileNoStat(p.path("fdinfo", fd)) - if err != nil { - return nil, err - } - - var text, pos, flags, mntid, ino string - var inotify []InotifyInfo - - scanner := bufio.NewScanner(bytes.NewReader(data)) - for scanner.Scan() { - text = scanner.Text() - switch { - case rPos.MatchString(text): - pos = rPos.FindStringSubmatch(text)[1] - case rFlags.MatchString(text): - flags = rFlags.FindStringSubmatch(text)[1] - case rMntID.MatchString(text): - mntid = rMntID.FindStringSubmatch(text)[1] - case rIno.MatchString(text): - ino = rIno.FindStringSubmatch(text)[1] - case rInotify.MatchString(text): - newInotify, err := parseInotifyInfo(text) - if err != nil { - return nil, err - } - inotify = append(inotify, *newInotify) - } - } - - i := &ProcFDInfo{ - FD: fd, - Pos: pos, - Flags: flags, - MntID: mntid, - Ino: ino, - InotifyInfos: inotify, - } - - return i, nil -} - -// InotifyInfo represents a single inotify line in the fdinfo file. -type InotifyInfo struct { - // Watch descriptor number - WD string - // Inode number - Ino string - // Device ID - Sdev string - // Mask of events being monitored - Mask string -} - -// InotifyInfo constructor. Only available on kernel 3.8+. -func parseInotifyInfo(line string) (*InotifyInfo, error) { - m := rInotifyParts.FindStringSubmatch(line) - if len(m) >= 4 { - var mask string - if len(m) == 5 { - mask = m[4] - } - i := &InotifyInfo{ - WD: m[1], - Ino: m[2], - Sdev: m[3], - Mask: mask, - } - return i, nil - } - return nil, fmt.Errorf("%w: invalid inode entry: %q", ErrFileParse, line) -} - -// ProcFDInfos represents a list of ProcFDInfo structs. -type ProcFDInfos []ProcFDInfo - -func (p ProcFDInfos) Len() int { return len(p) } -func (p ProcFDInfos) Swap(i, j int) { p[i], p[j] = p[j], p[i] } -func (p ProcFDInfos) Less(i, j int) bool { return p[i].FD < p[j].FD } - -// InotifyWatchLen returns the total number of inotify watches. -func (p ProcFDInfos) InotifyWatchLen() (int, error) { - length := 0 - for _, f := range p { - length += len(f.InotifyInfos) - } - - return length, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_interrupts.go b/vendor/github.com/prometheus/procfs/proc_interrupts.go deleted file mode 100644 index 643b500d5..000000000 --- a/vendor/github.com/prometheus/procfs/proc_interrupts.go +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Interrupt represents a single interrupt line. -type Interrupt struct { - // Info is the type of interrupt. - Info string - // Devices is the name of the device that is located at that IRQ - Devices string - // Values is the number of interrupts per CPU. - Values []string -} - -// Interrupts models the content of /proc/interrupts. Key is the IRQ number. -// - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-interrupts -// - https://raspberrypi.stackexchange.com/questions/105802/explanation-of-proc-interrupts-output -type Interrupts map[string]Interrupt - -// Interrupts creates a new instance from a given Proc instance. -func (p Proc) Interrupts() (Interrupts, error) { - data, err := util.ReadFileNoStat(p.fs.proc.Path("interrupts")) - if err != nil { - return nil, err - } - return parseInterrupts(bytes.NewReader(data)) -} - -func parseInterrupts(r io.Reader) (Interrupts, error) { - var ( - interrupts = Interrupts{} - scanner = bufio.NewScanner(r) - ) - - if !scanner.Scan() { - return nil, errors.New("interrupts empty") - } - cpuNum := len(strings.Fields(scanner.Text())) // one header per cpu - - for scanner.Scan() { - parts := strings.Fields(scanner.Text()) - if len(parts) == 0 { // skip empty lines - continue - } - if len(parts) < 2 { - return nil, fmt.Errorf("%w: Not enough fields in interrupts (expected 2+ fields but got %d): %s", ErrFileParse, len(parts), parts) - } - intName := parts[0][:len(parts[0])-1] // remove trailing : - - if len(parts) == 2 { - interrupts[intName] = Interrupt{ - Info: "", - Devices: "", - Values: []string{ - parts[1], - }, - } - continue - } - - intr := Interrupt{ - Values: parts[1 : cpuNum+1], - } - - if _, err := strconv.Atoi(intName); err == nil { // numeral interrupt - intr.Info = parts[cpuNum+1] - intr.Devices = strings.Join(parts[cpuNum+2:], " ") - } else { - intr.Info = strings.Join(parts[cpuNum+1:], " ") - } - interrupts[intName] = intr - } - - return interrupts, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/proc_io.go b/vendor/github.com/prometheus/procfs/proc_io.go deleted file mode 100644 index dd8086ba2..000000000 --- a/vendor/github.com/prometheus/procfs/proc_io.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - - "github.com/prometheus/procfs/internal/util" -) - -// ProcIO models the content of /proc//io. -type ProcIO struct { - // Chars read. - RChar uint64 - // Chars written. - WChar uint64 - // Read syscalls. - SyscR uint64 - // Write syscalls. - SyscW uint64 - // Bytes read. - ReadBytes uint64 - // Bytes written. - WriteBytes uint64 - // Bytes written, but taking into account truncation. See - // Documentation/filesystems/proc.txt in the kernel sources for - // detailed explanation. - CancelledWriteBytes int64 -} - -// IO creates a new ProcIO instance from a given Proc instance. -func (p Proc) IO() (ProcIO, error) { - pio := ProcIO{} - - data, err := util.ReadFileNoStat(p.path("io")) - if err != nil { - return pio, err - } - - ioFormat := "rchar: %d\nwchar: %d\nsyscr: %d\nsyscw: %d\n" + - "read_bytes: %d\nwrite_bytes: %d\n" + - "cancelled_write_bytes: %d\n" //nolint:misspell - - _, err = fmt.Sscanf(string(data), ioFormat, &pio.RChar, &pio.WChar, &pio.SyscR, - &pio.SyscW, &pio.ReadBytes, &pio.WriteBytes, &pio.CancelledWriteBytes) - - return pio, err -} diff --git a/vendor/github.com/prometheus/procfs/proc_limits.go b/vendor/github.com/prometheus/procfs/proc_limits.go deleted file mode 100644 index 4b7d33784..000000000 --- a/vendor/github.com/prometheus/procfs/proc_limits.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "fmt" - "os" - "regexp" - "strconv" - "strings" -) - -// ProcLimits represents the soft limits for each of the process's resource -// limits. For more information see getrlimit(2): -// http://man7.org/linux/man-pages/man2/getrlimit.2.html. -type ProcLimits struct { - // CPU time limit in seconds. - CPUTime uint64 - // Maximum size of files that the process may create. - FileSize uint64 - // Maximum size of the process's data segment (initialized data, - // uninitialized data, and heap). - DataSize uint64 - // Maximum size of the process stack in bytes. - StackSize uint64 - // Maximum size of a core file. - CoreFileSize uint64 - // Limit of the process's resident set in pages. - ResidentSet uint64 - // Maximum number of processes that can be created for the real user ID of - // the calling process. - Processes uint64 - // Value one greater than the maximum file descriptor number that can be - // opened by this process. - OpenFiles uint64 - // Maximum number of bytes of memory that may be locked into RAM. - LockedMemory uint64 - // Maximum size of the process's virtual memory address space in bytes. - AddressSpace uint64 - // Limit on the combined number of flock(2) locks and fcntl(2) leases that - // this process may establish. - FileLocks uint64 - // Limit of signals that may be queued for the real user ID of the calling - // process. - PendingSignals uint64 - // Limit on the number of bytes that can be allocated for POSIX message - // queues for the real user ID of the calling process. - MsqqueueSize uint64 - // Limit of the nice priority set using setpriority(2) or nice(2). - NicePriority uint64 - // Limit of the real-time priority set using sched_setscheduler(2) or - // sched_setparam(2). - RealtimePriority uint64 - // Limit (in microseconds) on the amount of CPU time that a process - // scheduled under a real-time scheduling policy may consume without making - // a blocking system call. - RealtimeTimeout uint64 -} - -const ( - limitsFields = 4 - limitsUnlimited = "unlimited" -) - -var ( - limitsMatch = regexp.MustCompile(`(Max \w+\s??\w*\s?\w*)\s{2,}(\w+)\s+(\w+)`) -) - -// NewLimits returns the current soft limits of the process. -// -// Deprecated: Use p.Limits() instead. -func (p Proc) NewLimits() (ProcLimits, error) { - return p.Limits() -} - -// Limits returns the current soft limits of the process. -func (p Proc) Limits() (ProcLimits, error) { - f, err := os.Open(p.path("limits")) - if err != nil { - return ProcLimits{}, err - } - defer f.Close() - - var ( - l = ProcLimits{} - s = bufio.NewScanner(f) - ) - - s.Scan() // Skip limits header - - for s.Scan() { - //fields := limitsMatch.Split(s.Text(), limitsFields) - fields := limitsMatch.FindStringSubmatch(s.Text()) - if len(fields) != limitsFields { - return ProcLimits{}, fmt.Errorf("%w: couldn't parse %q line %q", ErrFileParse, f.Name(), s.Text()) - } - - switch strings.TrimSpace(fields[1]) { - case "Max cpu time": - l.CPUTime, err = parseUint(fields[2]) - case "Max file size": - l.FileSize, err = parseUint(fields[2]) - case "Max data size": - l.DataSize, err = parseUint(fields[2]) - case "Max stack size": - l.StackSize, err = parseUint(fields[2]) - case "Max core file size": - l.CoreFileSize, err = parseUint(fields[2]) - case "Max resident set": - l.ResidentSet, err = parseUint(fields[2]) - case "Max processes": - l.Processes, err = parseUint(fields[2]) - case "Max open files": - l.OpenFiles, err = parseUint(fields[2]) - case "Max locked memory": - l.LockedMemory, err = parseUint(fields[2]) - case "Max address space": - l.AddressSpace, err = parseUint(fields[2]) - case "Max file locks": - l.FileLocks, err = parseUint(fields[2]) - case "Max pending signals": - l.PendingSignals, err = parseUint(fields[2]) - case "Max msgqueue size": - l.MsqqueueSize, err = parseUint(fields[2]) - case "Max nice priority": - l.NicePriority, err = parseUint(fields[2]) - case "Max realtime priority": - l.RealtimePriority, err = parseUint(fields[2]) - case "Max realtime timeout": - l.RealtimeTimeout, err = parseUint(fields[2]) - } - if err != nil { - return ProcLimits{}, err - } - } - - return l, s.Err() -} - -func parseUint(s string) (uint64, error) { - if s == limitsUnlimited { - return 18446744073709551615, nil - } - i, err := strconv.ParseUint(s, 10, 64) - if err != nil { - return 0, fmt.Errorf("%w: couldn't parse value %q: %w", ErrFileParse, s, err) - } - return i, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_maps.go b/vendor/github.com/prometheus/procfs/proc_maps.go deleted file mode 100644 index 08b89a6eb..000000000 --- a/vendor/github.com/prometheus/procfs/proc_maps.go +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && !js - -package procfs - -import ( - "bufio" - "fmt" - "os" - "strconv" - "strings" - - "golang.org/x/sys/unix" -) - -// ProcMapPermissions contains permission settings read from `/proc/[pid]/maps`. -type ProcMapPermissions struct { - // mapping has the [R]ead flag set - Read bool - // mapping has the [W]rite flag set - Write bool - // mapping has the [X]ecutable flag set - Execute bool - // mapping has the [S]hared flag set - Shared bool - // mapping is marked as [P]rivate (copy on write) - Private bool -} - -// ProcMap contains the process memory-mappings of the process -// read from `/proc/[pid]/maps`. -type ProcMap struct { - // The start address of current mapping. - StartAddr uintptr - // The end address of the current mapping - EndAddr uintptr - // The permissions for this mapping - Perms *ProcMapPermissions - // The current offset into the file/fd (e.g., shared libs) - Offset int64 - // Device owner of this mapping (major:minor) in Mkdev format. - Dev uint64 - // The inode of the device above - Inode uint64 - // The file or psuedofile (or empty==anonymous) - Pathname string -} - -// parseDevice parses the device token of a line and converts it to a dev_t -// (mkdev) like structure. -func parseDevice(s string) (uint64, error) { - i := strings.Index(s, ":") - if i == -1 { - return 0, fmt.Errorf("%w: expected separator `:` in %s", ErrFileParse, s) - } - - major, err := strconv.ParseUint(s[0:i], 16, 0) - if err != nil { - return 0, err - } - - minor, err := strconv.ParseUint(s[i+1:], 16, 0) - if err != nil { - return 0, err - } - - return unix.Mkdev(uint32(major), uint32(minor)), nil -} - -// parseAddress converts a hex-string to a uintptr. -func parseAddress(s string) (uintptr, error) { - a, err := strconv.ParseUint(s, 16, 0) - if err != nil { - return 0, err - } - - return uintptr(a), nil -} - -// parseAddresses parses the start-end address. -func parseAddresses(s string) (uintptr, uintptr, error) { - idx := strings.Index(s, "-") - if idx == -1 { - return 0, 0, fmt.Errorf("%w: expected separator `-` in %s", ErrFileParse, s) - } - - saddr, err := parseAddress(s[0:idx]) - if err != nil { - return 0, 0, err - } - - eaddr, err := parseAddress(s[idx+1:]) - if err != nil { - return 0, 0, err - } - - return saddr, eaddr, nil -} - -// parsePermissions parses a token and returns any that are set. -func parsePermissions(s string) (*ProcMapPermissions, error) { - if len(s) < 4 { - return nil, fmt.Errorf("%w: invalid permissions token", ErrFileParse) - } - - perms := ProcMapPermissions{} - for _, ch := range s { - switch ch { - case 'r': - perms.Read = true - case 'w': - perms.Write = true - case 'x': - perms.Execute = true - case 'p': - perms.Private = true - case 's': - perms.Shared = true - } - } - - return &perms, nil -} - -// parseProcMap will attempt to parse a single line within a proc/[pid]/maps -// buffer. -func parseProcMap(text string) (*ProcMap, error) { - fields := strings.Fields(text) - if len(fields) < 5 { - return nil, fmt.Errorf("%w: truncated procmap entry", ErrFileParse) - } - - saddr, eaddr, err := parseAddresses(fields[0]) - if err != nil { - return nil, err - } - - perms, err := parsePermissions(fields[1]) - if err != nil { - return nil, err - } - - offset, err := strconv.ParseInt(fields[2], 16, 0) - if err != nil { - return nil, err - } - - device, err := parseDevice(fields[3]) - if err != nil { - return nil, err - } - - inode, err := strconv.ParseUint(fields[4], 10, 0) - if err != nil { - return nil, err - } - - pathname := "" - - if len(fields) >= 5 { - pathname = strings.Join(fields[5:], " ") - } - - return &ProcMap{ - StartAddr: saddr, - EndAddr: eaddr, - Perms: perms, - Offset: offset, - Dev: device, - Inode: inode, - Pathname: pathname, - }, nil -} - -// ProcMaps reads from /proc/[pid]/maps to get the memory-mappings of the -// process. -func (p Proc) ProcMaps() ([]*ProcMap, error) { - file, err := os.Open(p.path("maps")) - if err != nil { - return nil, err - } - defer file.Close() - - maps := []*ProcMap{} - scan := bufio.NewScanner(file) - - for scan.Scan() { - m, err := parseProcMap(scan.Text()) - if err != nil { - return nil, err - } - - maps = append(maps, m) - } - - return maps, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_netstat.go b/vendor/github.com/prometheus/procfs/proc_netstat.go deleted file mode 100644 index 7f94cc891..000000000 --- a/vendor/github.com/prometheus/procfs/proc_netstat.go +++ /dev/null @@ -1,443 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ProcNetstat models the content of /proc//net/netstat. -type ProcNetstat struct { - // The process ID. - PID int - TcpExt - IpExt -} - -type TcpExt struct { // nolint:revive - SyncookiesSent *float64 - SyncookiesRecv *float64 - SyncookiesFailed *float64 - EmbryonicRsts *float64 - PruneCalled *float64 - RcvPruned *float64 - OfoPruned *float64 - OutOfWindowIcmps *float64 - LockDroppedIcmps *float64 - ArpFilter *float64 - TW *float64 - TWRecycled *float64 - TWKilled *float64 - PAWSActive *float64 - PAWSEstab *float64 - DelayedACKs *float64 - DelayedACKLocked *float64 - DelayedACKLost *float64 - ListenOverflows *float64 - ListenDrops *float64 - TCPHPHits *float64 - TCPPureAcks *float64 - TCPHPAcks *float64 - TCPRenoRecovery *float64 - TCPSackRecovery *float64 - TCPSACKReneging *float64 - TCPSACKReorder *float64 - TCPRenoReorder *float64 - TCPTSReorder *float64 - TCPFullUndo *float64 - TCPPartialUndo *float64 - TCPDSACKUndo *float64 - TCPLossUndo *float64 - TCPLostRetransmit *float64 - TCPRenoFailures *float64 - TCPSackFailures *float64 - TCPLossFailures *float64 - TCPFastRetrans *float64 - TCPSlowStartRetrans *float64 - TCPTimeouts *float64 - TCPLossProbes *float64 - TCPLossProbeRecovery *float64 - TCPRenoRecoveryFail *float64 - TCPSackRecoveryFail *float64 - TCPRcvCollapsed *float64 - TCPDSACKOldSent *float64 - TCPDSACKOfoSent *float64 - TCPDSACKRecv *float64 - TCPDSACKOfoRecv *float64 - TCPAbortOnData *float64 - TCPAbortOnClose *float64 - TCPAbortOnMemory *float64 - TCPAbortOnTimeout *float64 - TCPAbortOnLinger *float64 - TCPAbortFailed *float64 - TCPMemoryPressures *float64 - TCPMemoryPressuresChrono *float64 - TCPSACKDiscard *float64 - TCPDSACKIgnoredOld *float64 - TCPDSACKIgnoredNoUndo *float64 - TCPSpuriousRTOs *float64 - TCPMD5NotFound *float64 - TCPMD5Unexpected *float64 - TCPMD5Failure *float64 - TCPSackShifted *float64 - TCPSackMerged *float64 - TCPSackShiftFallback *float64 - TCPBacklogDrop *float64 - PFMemallocDrop *float64 - TCPMinTTLDrop *float64 - TCPDeferAcceptDrop *float64 - IPReversePathFilter *float64 - TCPTimeWaitOverflow *float64 - TCPReqQFullDoCookies *float64 - TCPReqQFullDrop *float64 - TCPRetransFail *float64 - TCPRcvCoalesce *float64 - TCPRcvQDrop *float64 - TCPOFOQueue *float64 - TCPOFODrop *float64 - TCPOFOMerge *float64 - TCPChallengeACK *float64 - TCPSYNChallenge *float64 - TCPFastOpenActive *float64 - TCPFastOpenActiveFail *float64 - TCPFastOpenPassive *float64 - TCPFastOpenPassiveFail *float64 - TCPFastOpenListenOverflow *float64 - TCPFastOpenCookieReqd *float64 - TCPFastOpenBlackhole *float64 - TCPSpuriousRtxHostQueues *float64 - BusyPollRxPackets *float64 - TCPAutoCorking *float64 - TCPFromZeroWindowAdv *float64 - TCPToZeroWindowAdv *float64 - TCPWantZeroWindowAdv *float64 - TCPSynRetrans *float64 - TCPOrigDataSent *float64 - TCPHystartTrainDetect *float64 - TCPHystartTrainCwnd *float64 - TCPHystartDelayDetect *float64 - TCPHystartDelayCwnd *float64 - TCPACKSkippedSynRecv *float64 - TCPACKSkippedPAWS *float64 - TCPACKSkippedSeq *float64 - TCPACKSkippedFinWait2 *float64 - TCPACKSkippedTimeWait *float64 - TCPACKSkippedChallenge *float64 - TCPWinProbe *float64 - TCPKeepAlive *float64 - TCPMTUPFail *float64 - TCPMTUPSuccess *float64 - TCPWqueueTooBig *float64 -} - -type IpExt struct { // nolint:revive - InNoRoutes *float64 - InTruncatedPkts *float64 - InMcastPkts *float64 - OutMcastPkts *float64 - InBcastPkts *float64 - OutBcastPkts *float64 - InOctets *float64 - OutOctets *float64 - InMcastOctets *float64 - OutMcastOctets *float64 - InBcastOctets *float64 - OutBcastOctets *float64 - InCsumErrors *float64 - InNoECTPkts *float64 - InECT1Pkts *float64 - InECT0Pkts *float64 - InCEPkts *float64 - ReasmOverlaps *float64 -} - -func (p Proc) Netstat() (ProcNetstat, error) { - filename := p.path("net/netstat") - data, err := util.ReadFileNoStat(filename) - if err != nil { - return ProcNetstat{PID: p.PID}, err - } - procNetstat, err := parseProcNetstat(bytes.NewReader(data), filename) - procNetstat.PID = p.PID - return procNetstat, err -} - -// parseProcNetstat parses the metrics from proc//net/netstat file -// and returns a ProcNetstat structure. -func parseProcNetstat(r io.Reader, fileName string) (ProcNetstat, error) { - var ( - scanner = bufio.NewScanner(r) - procNetstat = ProcNetstat{} - ) - - for scanner.Scan() { - nameParts := strings.Split(scanner.Text(), " ") - scanner.Scan() - valueParts := strings.Split(scanner.Text(), " ") - // Remove trailing :. - protocol := strings.TrimSuffix(nameParts[0], ":") - if len(nameParts) != len(valueParts) { - return procNetstat, fmt.Errorf("%w: mismatch field count mismatch in %s: %s", - ErrFileParse, fileName, protocol) - } - for i := 1; i < len(nameParts); i++ { - value, err := strconv.ParseFloat(valueParts[i], 64) - if err != nil { - return procNetstat, err - } - key := nameParts[i] - - switch protocol { - case "TcpExt": - switch key { - case "SyncookiesSent": - procNetstat.SyncookiesSent = &value - case "SyncookiesRecv": - procNetstat.SyncookiesRecv = &value - case "SyncookiesFailed": - procNetstat.SyncookiesFailed = &value - case "EmbryonicRsts": - procNetstat.EmbryonicRsts = &value - case "PruneCalled": - procNetstat.PruneCalled = &value - case "RcvPruned": - procNetstat.RcvPruned = &value - case "OfoPruned": - procNetstat.OfoPruned = &value - case "OutOfWindowIcmps": - procNetstat.OutOfWindowIcmps = &value - case "LockDroppedIcmps": - procNetstat.LockDroppedIcmps = &value - case "ArpFilter": - procNetstat.ArpFilter = &value - case "TW": - procNetstat.TW = &value - case "TWRecycled": - procNetstat.TWRecycled = &value - case "TWKilled": - procNetstat.TWKilled = &value - case "PAWSActive": - procNetstat.PAWSActive = &value - case "PAWSEstab": - procNetstat.PAWSEstab = &value - case "DelayedACKs": - procNetstat.DelayedACKs = &value - case "DelayedACKLocked": - procNetstat.DelayedACKLocked = &value - case "DelayedACKLost": - procNetstat.DelayedACKLost = &value - case "ListenOverflows": - procNetstat.ListenOverflows = &value - case "ListenDrops": - procNetstat.ListenDrops = &value - case "TCPHPHits": - procNetstat.TCPHPHits = &value - case "TCPPureAcks": - procNetstat.TCPPureAcks = &value - case "TCPHPAcks": - procNetstat.TCPHPAcks = &value - case "TCPRenoRecovery": - procNetstat.TCPRenoRecovery = &value - case "TCPSackRecovery": - procNetstat.TCPSackRecovery = &value - case "TCPSACKReneging": - procNetstat.TCPSACKReneging = &value - case "TCPSACKReorder": - procNetstat.TCPSACKReorder = &value - case "TCPRenoReorder": - procNetstat.TCPRenoReorder = &value - case "TCPTSReorder": - procNetstat.TCPTSReorder = &value - case "TCPFullUndo": - procNetstat.TCPFullUndo = &value - case "TCPPartialUndo": - procNetstat.TCPPartialUndo = &value - case "TCPDSACKUndo": - procNetstat.TCPDSACKUndo = &value - case "TCPLossUndo": - procNetstat.TCPLossUndo = &value - case "TCPLostRetransmit": - procNetstat.TCPLostRetransmit = &value - case "TCPRenoFailures": - procNetstat.TCPRenoFailures = &value - case "TCPSackFailures": - procNetstat.TCPSackFailures = &value - case "TCPLossFailures": - procNetstat.TCPLossFailures = &value - case "TCPFastRetrans": - procNetstat.TCPFastRetrans = &value - case "TCPSlowStartRetrans": - procNetstat.TCPSlowStartRetrans = &value - case "TCPTimeouts": - procNetstat.TCPTimeouts = &value - case "TCPLossProbes": - procNetstat.TCPLossProbes = &value - case "TCPLossProbeRecovery": - procNetstat.TCPLossProbeRecovery = &value - case "TCPRenoRecoveryFail": - procNetstat.TCPRenoRecoveryFail = &value - case "TCPSackRecoveryFail": - procNetstat.TCPSackRecoveryFail = &value - case "TCPRcvCollapsed": - procNetstat.TCPRcvCollapsed = &value - case "TCPDSACKOldSent": - procNetstat.TCPDSACKOldSent = &value - case "TCPDSACKOfoSent": - procNetstat.TCPDSACKOfoSent = &value - case "TCPDSACKRecv": - procNetstat.TCPDSACKRecv = &value - case "TCPDSACKOfoRecv": - procNetstat.TCPDSACKOfoRecv = &value - case "TCPAbortOnData": - procNetstat.TCPAbortOnData = &value - case "TCPAbortOnClose": - procNetstat.TCPAbortOnClose = &value - case "TCPDeferAcceptDrop": - procNetstat.TCPDeferAcceptDrop = &value - case "IPReversePathFilter": - procNetstat.IPReversePathFilter = &value - case "TCPTimeWaitOverflow": - procNetstat.TCPTimeWaitOverflow = &value - case "TCPReqQFullDoCookies": - procNetstat.TCPReqQFullDoCookies = &value - case "TCPReqQFullDrop": - procNetstat.TCPReqQFullDrop = &value - case "TCPRetransFail": - procNetstat.TCPRetransFail = &value - case "TCPRcvCoalesce": - procNetstat.TCPRcvCoalesce = &value - case "TCPRcvQDrop": - procNetstat.TCPRcvQDrop = &value - case "TCPOFOQueue": - procNetstat.TCPOFOQueue = &value - case "TCPOFODrop": - procNetstat.TCPOFODrop = &value - case "TCPOFOMerge": - procNetstat.TCPOFOMerge = &value - case "TCPChallengeACK": - procNetstat.TCPChallengeACK = &value - case "TCPSYNChallenge": - procNetstat.TCPSYNChallenge = &value - case "TCPFastOpenActive": - procNetstat.TCPFastOpenActive = &value - case "TCPFastOpenActiveFail": - procNetstat.TCPFastOpenActiveFail = &value - case "TCPFastOpenPassive": - procNetstat.TCPFastOpenPassive = &value - case "TCPFastOpenPassiveFail": - procNetstat.TCPFastOpenPassiveFail = &value - case "TCPFastOpenListenOverflow": - procNetstat.TCPFastOpenListenOverflow = &value - case "TCPFastOpenCookieReqd": - procNetstat.TCPFastOpenCookieReqd = &value - case "TCPFastOpenBlackhole": - procNetstat.TCPFastOpenBlackhole = &value - case "TCPSpuriousRtxHostQueues": - procNetstat.TCPSpuriousRtxHostQueues = &value - case "BusyPollRxPackets": - procNetstat.BusyPollRxPackets = &value - case "TCPAutoCorking": - procNetstat.TCPAutoCorking = &value - case "TCPFromZeroWindowAdv": - procNetstat.TCPFromZeroWindowAdv = &value - case "TCPToZeroWindowAdv": - procNetstat.TCPToZeroWindowAdv = &value - case "TCPWantZeroWindowAdv": - procNetstat.TCPWantZeroWindowAdv = &value - case "TCPSynRetrans": - procNetstat.TCPSynRetrans = &value - case "TCPOrigDataSent": - procNetstat.TCPOrigDataSent = &value - case "TCPHystartTrainDetect": - procNetstat.TCPHystartTrainDetect = &value - case "TCPHystartTrainCwnd": - procNetstat.TCPHystartTrainCwnd = &value - case "TCPHystartDelayDetect": - procNetstat.TCPHystartDelayDetect = &value - case "TCPHystartDelayCwnd": - procNetstat.TCPHystartDelayCwnd = &value - case "TCPACKSkippedSynRecv": - procNetstat.TCPACKSkippedSynRecv = &value - case "TCPACKSkippedPAWS": - procNetstat.TCPACKSkippedPAWS = &value - case "TCPACKSkippedSeq": - procNetstat.TCPACKSkippedSeq = &value - case "TCPACKSkippedFinWait2": - procNetstat.TCPACKSkippedFinWait2 = &value - case "TCPACKSkippedTimeWait": - procNetstat.TCPACKSkippedTimeWait = &value - case "TCPACKSkippedChallenge": - procNetstat.TCPACKSkippedChallenge = &value - case "TCPWinProbe": - procNetstat.TCPWinProbe = &value - case "TCPKeepAlive": - procNetstat.TCPKeepAlive = &value - case "TCPMTUPFail": - procNetstat.TCPMTUPFail = &value - case "TCPMTUPSuccess": - procNetstat.TCPMTUPSuccess = &value - case "TCPWqueueTooBig": - procNetstat.TCPWqueueTooBig = &value - } - case "IpExt": - switch key { - case "InNoRoutes": - procNetstat.InNoRoutes = &value - case "InTruncatedPkts": - procNetstat.InTruncatedPkts = &value - case "InMcastPkts": - procNetstat.InMcastPkts = &value - case "OutMcastPkts": - procNetstat.OutMcastPkts = &value - case "InBcastPkts": - procNetstat.InBcastPkts = &value - case "OutBcastPkts": - procNetstat.OutBcastPkts = &value - case "InOctets": - procNetstat.InOctets = &value - case "OutOctets": - procNetstat.OutOctets = &value - case "InMcastOctets": - procNetstat.InMcastOctets = &value - case "OutMcastOctets": - procNetstat.OutMcastOctets = &value - case "InBcastOctets": - procNetstat.InBcastOctets = &value - case "OutBcastOctets": - procNetstat.OutBcastOctets = &value - case "InCsumErrors": - procNetstat.InCsumErrors = &value - case "InNoECTPkts": - procNetstat.InNoECTPkts = &value - case "InECT1Pkts": - procNetstat.InECT1Pkts = &value - case "InECT0Pkts": - procNetstat.InECT0Pkts = &value - case "InCEPkts": - procNetstat.InCEPkts = &value - case "ReasmOverlaps": - procNetstat.ReasmOverlaps = &value - } - } - } - } - return procNetstat, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/proc_ns.go b/vendor/github.com/prometheus/procfs/proc_ns.go deleted file mode 100644 index 5fc0eb9e2..000000000 --- a/vendor/github.com/prometheus/procfs/proc_ns.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "os" - "strconv" - "strings" -) - -// Namespace represents a single namespace of a process. -type Namespace struct { - Type string // Namespace type. - Inode uint32 // Inode number of the namespace. If two processes are in the same namespace their inodes will match. -} - -// Namespaces contains all of the namespaces that the process is contained in. -type Namespaces map[string]Namespace - -// Namespaces reads from /proc//ns/* to get the namespaces of which the -// process is a member. -func (p Proc) Namespaces() (Namespaces, error) { - d, err := os.Open(p.path("ns")) - if err != nil { - return nil, err - } - defer d.Close() - - names, err := d.Readdirnames(-1) - if err != nil { - return nil, fmt.Errorf("%w: failed to read contents of ns dir: %w", ErrFileRead, err) - } - - ns := make(Namespaces, len(names)) - for _, name := range names { - target, err := os.Readlink(p.path("ns", name)) - if err != nil { - return nil, err - } - - fields := strings.SplitN(target, ":", 2) - if len(fields) != 2 { - return nil, fmt.Errorf("%w: namespace type and inode from %q", ErrFileParse, target) - } - - typ := fields[0] - inode, err := strconv.ParseUint(strings.Trim(fields[1], "[]"), 10, 32) - if err != nil { - return nil, fmt.Errorf("%w: inode from %q: %w", ErrFileParse, fields[1], err) - } - - ns[name] = Namespace{typ, uint32(inode)} - } - - return ns, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_psi.go b/vendor/github.com/prometheus/procfs/proc_psi.go deleted file mode 100644 index cc2c5de87..000000000 --- a/vendor/github.com/prometheus/procfs/proc_psi.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright The Prometheus 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 procfs - -// The PSI / pressure interface is described at -// https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/accounting/psi.txt -// Each resource (cpu, io, memory, ...) is exposed as a single file. -// Each file may contain up to two lines, one for "some" pressure and one for "full" pressure. -// Each line contains several averages (over n seconds) and a total in µs. -// -// Example io pressure file: -// > some avg10=0.06 avg60=0.21 avg300=0.99 total=8537362 -// > full avg10=0.00 avg60=0.13 avg300=0.96 total=8183134 - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -const lineFormat = "avg10=%f avg60=%f avg300=%f total=%d" - -// PSILine is a single line of values as returned by `/proc/pressure/*`. -// -// The Avg entries are averages over n seconds, as a percentage. -// The Total line is in microseconds. -type PSILine struct { - Avg10 float64 - Avg60 float64 - Avg300 float64 - Total uint64 -} - -// PSIStats represent pressure stall information from /proc/pressure/* -// -// "Some" indicates the share of time in which at least some tasks are stalled. -// "Full" indicates the share of time in which all non-idle tasks are stalled simultaneously. -type PSIStats struct { - Some *PSILine - Full *PSILine -} - -// PSIStatsForResource reads pressure stall information for the specified -// resource from /proc/pressure/. At time of writing this can be -// either "cpu", "memory" or "io". -func (fs FS) PSIStatsForResource(resource string) (PSIStats, error) { - data, err := util.ReadFileNoStat(fs.proc.Path(fmt.Sprintf("%s/%s", "pressure", resource))) - if err != nil { - return PSIStats{}, fmt.Errorf("%w: psi_stats: unavailable for %q: %w", ErrFileRead, resource, err) - } - - return parsePSIStats(bytes.NewReader(data)) -} - -// parsePSIStats parses the specified file for pressure stall information. -func parsePSIStats(r io.Reader) (PSIStats, error) { - psiStats := PSIStats{} - - scanner := bufio.NewScanner(r) - for scanner.Scan() { - l := scanner.Text() - prefix := strings.Split(l, " ")[0] - switch prefix { - case "some": - psi := PSILine{} - _, err := fmt.Sscanf(l, fmt.Sprintf("some %s", lineFormat), &psi.Avg10, &psi.Avg60, &psi.Avg300, &psi.Total) - if err != nil { - return PSIStats{}, err - } - psiStats.Some = &psi - case "full": - psi := PSILine{} - _, err := fmt.Sscanf(l, fmt.Sprintf("full %s", lineFormat), &psi.Avg10, &psi.Avg60, &psi.Avg300, &psi.Total) - if err != nil { - return PSIStats{}, err - } - psiStats.Full = &psi - default: - // If we encounter a line with an unknown prefix, ignore it and move on - // Should new measurement types be added in the future we'll simply ignore them instead - // of erroring on retrieval - continue - } - } - - return psiStats, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_smaps.go b/vendor/github.com/prometheus/procfs/proc_smaps.go deleted file mode 100644 index f637309b3..000000000 --- a/vendor/github.com/prometheus/procfs/proc_smaps.go +++ /dev/null @@ -1,163 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !windows - -package procfs - -import ( - "bufio" - "errors" - "os" - "regexp" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -var ( - // Match the header line before each mapped zone in `/proc/pid/smaps`. - procSMapsHeaderLine = regexp.MustCompile(`^[a-f0-9].*$`) -) - -type ProcSMapsRollup struct { - // Amount of the mapping that is currently resident in RAM. - Rss uint64 - // Process's proportional share of this mapping. - Pss uint64 - // Size in bytes of clean shared pages. - SharedClean uint64 - // Size in bytes of dirty shared pages. - SharedDirty uint64 - // Size in bytes of clean private pages. - PrivateClean uint64 - // Size in bytes of dirty private pages. - PrivateDirty uint64 - // Amount of memory currently marked as referenced or accessed. - Referenced uint64 - // Amount of memory that does not belong to any file. - Anonymous uint64 - // Amount would-be-anonymous memory currently on swap. - Swap uint64 - // Process's proportional memory on swap. - SwapPss uint64 -} - -// ProcSMapsRollup reads from /proc/[pid]/smaps_rollup to get summed memory information of the -// process. -// -// If smaps_rollup does not exists (require kernel >= 4.15), the content of /proc/pid/smaps will -// we read and summed. -func (p Proc) ProcSMapsRollup() (ProcSMapsRollup, error) { - data, err := util.ReadFileNoStat(p.path("smaps_rollup")) - if err != nil && os.IsNotExist(err) { - return p.procSMapsRollupManual() - } - if err != nil { - return ProcSMapsRollup{}, err - } - - lines := strings.Split(string(data), "\n") - smaps := ProcSMapsRollup{} - - // skip first line which don't contains information we need - lines = lines[1:] - for _, line := range lines { - if line == "" { - continue - } - - if err := smaps.parseLine(line); err != nil { - return ProcSMapsRollup{}, err - } - } - - return smaps, nil -} - -// Read /proc/pid/smaps and do the roll-up in Go code. -func (p Proc) procSMapsRollupManual() (ProcSMapsRollup, error) { - file, err := os.Open(p.path("smaps")) - if err != nil { - return ProcSMapsRollup{}, err - } - defer file.Close() - - smaps := ProcSMapsRollup{} - scan := bufio.NewScanner(file) - - for scan.Scan() { - line := scan.Text() - - if procSMapsHeaderLine.MatchString(line) { - continue - } - - if err := smaps.parseLine(line); err != nil { - return ProcSMapsRollup{}, err - } - } - - return smaps, nil -} - -func (s *ProcSMapsRollup) parseLine(line string) error { - kv := strings.SplitN(line, ":", 2) - if len(kv) != 2 { - return errors.New("invalid net/dev line, missing colon") - } - - k := kv[0] - if k == "VmFlags" { - return nil - } - - v := strings.TrimSpace(kv[1]) - v = strings.TrimSuffix(v, " kB") - - vKBytes, err := strconv.ParseUint(v, 10, 64) - if err != nil { - return err - } - vBytes := vKBytes * 1024 - - s.addValue(k, vBytes) - - return nil -} - -func (s *ProcSMapsRollup) addValue(k string, vUintBytes uint64) { - switch k { - case "Rss": - s.Rss += vUintBytes - case "Pss": - s.Pss += vUintBytes - case "Shared_Clean": - s.SharedClean += vUintBytes - case "Shared_Dirty": - s.SharedDirty += vUintBytes - case "Private_Clean": - s.PrivateClean += vUintBytes - case "Private_Dirty": - s.PrivateDirty += vUintBytes - case "Referenced": - s.Referenced += vUintBytes - case "Anonymous": - s.Anonymous += vUintBytes - case "Swap": - s.Swap += vUintBytes - case "SwapPss": - s.SwapPss += vUintBytes - } -} diff --git a/vendor/github.com/prometheus/procfs/proc_snmp.go b/vendor/github.com/prometheus/procfs/proc_snmp.go deleted file mode 100644 index 8d9a9bcd6..000000000 --- a/vendor/github.com/prometheus/procfs/proc_snmp.go +++ /dev/null @@ -1,353 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ProcSnmp models the content of /proc//net/snmp. -type ProcSnmp struct { - // The process ID. - PID int - Ip - Icmp - IcmpMsg - Tcp - Udp - UdpLite -} - -type Ip struct { // nolint:revive - Forwarding *float64 - DefaultTTL *float64 - InReceives *float64 - InHdrErrors *float64 - InAddrErrors *float64 - ForwDatagrams *float64 - InUnknownProtos *float64 - InDiscards *float64 - InDelivers *float64 - OutRequests *float64 - OutDiscards *float64 - OutNoRoutes *float64 - ReasmTimeout *float64 - ReasmReqds *float64 - ReasmOKs *float64 - ReasmFails *float64 - FragOKs *float64 - FragFails *float64 - FragCreates *float64 -} - -type Icmp struct { // nolint:revive - InMsgs *float64 - InErrors *float64 - InCsumErrors *float64 - InDestUnreachs *float64 - InTimeExcds *float64 - InParmProbs *float64 - InSrcQuenchs *float64 - InRedirects *float64 - InEchos *float64 - InEchoReps *float64 - InTimestamps *float64 - InTimestampReps *float64 - InAddrMasks *float64 - InAddrMaskReps *float64 - OutMsgs *float64 - OutErrors *float64 - OutDestUnreachs *float64 - OutTimeExcds *float64 - OutParmProbs *float64 - OutSrcQuenchs *float64 - OutRedirects *float64 - OutEchos *float64 - OutEchoReps *float64 - OutTimestamps *float64 - OutTimestampReps *float64 - OutAddrMasks *float64 - OutAddrMaskReps *float64 -} - -type IcmpMsg struct { - InType3 *float64 - OutType3 *float64 -} - -type Tcp struct { // nolint:revive - RtoAlgorithm *float64 - RtoMin *float64 - RtoMax *float64 - MaxConn *float64 - ActiveOpens *float64 - PassiveOpens *float64 - AttemptFails *float64 - EstabResets *float64 - CurrEstab *float64 - InSegs *float64 - OutSegs *float64 - RetransSegs *float64 - InErrs *float64 - OutRsts *float64 - InCsumErrors *float64 -} - -type Udp struct { // nolint:revive - InDatagrams *float64 - NoPorts *float64 - InErrors *float64 - OutDatagrams *float64 - RcvbufErrors *float64 - SndbufErrors *float64 - InCsumErrors *float64 - IgnoredMulti *float64 -} - -type UdpLite struct { // nolint:revive - InDatagrams *float64 - NoPorts *float64 - InErrors *float64 - OutDatagrams *float64 - RcvbufErrors *float64 - SndbufErrors *float64 - InCsumErrors *float64 - IgnoredMulti *float64 -} - -func (p Proc) Snmp() (ProcSnmp, error) { - filename := p.path("net/snmp") - data, err := util.ReadFileNoStat(filename) - if err != nil { - return ProcSnmp{PID: p.PID}, err - } - procSnmp, err := parseSnmp(bytes.NewReader(data), filename) - procSnmp.PID = p.PID - return procSnmp, err -} - -// parseSnmp parses the metrics from proc//net/snmp file -// and returns a map contains those metrics (e.g. {"Ip": {"Forwarding": 2}}). -func parseSnmp(r io.Reader, fileName string) (ProcSnmp, error) { - var ( - scanner = bufio.NewScanner(r) - procSnmp = ProcSnmp{} - ) - - for scanner.Scan() { - nameParts := strings.Split(scanner.Text(), " ") - scanner.Scan() - valueParts := strings.Split(scanner.Text(), " ") - // Remove trailing :. - protocol := strings.TrimSuffix(nameParts[0], ":") - if len(nameParts) != len(valueParts) { - return procSnmp, fmt.Errorf("%w: mismatch field count mismatch in %s: %s", - ErrFileParse, fileName, protocol) - } - for i := 1; i < len(nameParts); i++ { - value, err := strconv.ParseFloat(valueParts[i], 64) - if err != nil { - return procSnmp, err - } - key := nameParts[i] - - switch protocol { - case "Ip": - switch key { - case "Forwarding": - procSnmp.Forwarding = &value - case "DefaultTTL": - procSnmp.DefaultTTL = &value - case "InReceives": - procSnmp.InReceives = &value - case "InHdrErrors": - procSnmp.InHdrErrors = &value - case "InAddrErrors": - procSnmp.InAddrErrors = &value - case "ForwDatagrams": - procSnmp.ForwDatagrams = &value - case "InUnknownProtos": - procSnmp.InUnknownProtos = &value - case "InDiscards": - procSnmp.InDiscards = &value - case "InDelivers": - procSnmp.InDelivers = &value - case "OutRequests": - procSnmp.OutRequests = &value - case "OutDiscards": - procSnmp.OutDiscards = &value - case "OutNoRoutes": - procSnmp.OutNoRoutes = &value - case "ReasmTimeout": - procSnmp.ReasmTimeout = &value - case "ReasmReqds": - procSnmp.ReasmReqds = &value - case "ReasmOKs": - procSnmp.ReasmOKs = &value - case "ReasmFails": - procSnmp.ReasmFails = &value - case "FragOKs": - procSnmp.FragOKs = &value - case "FragFails": - procSnmp.FragFails = &value - case "FragCreates": - procSnmp.FragCreates = &value - } - case "Icmp": - switch key { - case "InMsgs": - procSnmp.InMsgs = &value - case "InErrors": - procSnmp.Icmp.InErrors = &value - case "InCsumErrors": - procSnmp.Icmp.InCsumErrors = &value - case "InDestUnreachs": - procSnmp.InDestUnreachs = &value - case "InTimeExcds": - procSnmp.InTimeExcds = &value - case "InParmProbs": - procSnmp.InParmProbs = &value - case "InSrcQuenchs": - procSnmp.InSrcQuenchs = &value - case "InRedirects": - procSnmp.InRedirects = &value - case "InEchos": - procSnmp.InEchos = &value - case "InEchoReps": - procSnmp.InEchoReps = &value - case "InTimestamps": - procSnmp.InTimestamps = &value - case "InTimestampReps": - procSnmp.InTimestampReps = &value - case "InAddrMasks": - procSnmp.InAddrMasks = &value - case "InAddrMaskReps": - procSnmp.InAddrMaskReps = &value - case "OutMsgs": - procSnmp.OutMsgs = &value - case "OutErrors": - procSnmp.OutErrors = &value - case "OutDestUnreachs": - procSnmp.OutDestUnreachs = &value - case "OutTimeExcds": - procSnmp.OutTimeExcds = &value - case "OutParmProbs": - procSnmp.OutParmProbs = &value - case "OutSrcQuenchs": - procSnmp.OutSrcQuenchs = &value - case "OutRedirects": - procSnmp.OutRedirects = &value - case "OutEchos": - procSnmp.OutEchos = &value - case "OutEchoReps": - procSnmp.OutEchoReps = &value - case "OutTimestamps": - procSnmp.OutTimestamps = &value - case "OutTimestampReps": - procSnmp.OutTimestampReps = &value - case "OutAddrMasks": - procSnmp.OutAddrMasks = &value - case "OutAddrMaskReps": - procSnmp.OutAddrMaskReps = &value - } - case "IcmpMsg": - switch key { - case "InType3": - procSnmp.InType3 = &value - case "OutType3": - procSnmp.OutType3 = &value - } - case "Tcp": - switch key { - case "RtoAlgorithm": - procSnmp.RtoAlgorithm = &value - case "RtoMin": - procSnmp.RtoMin = &value - case "RtoMax": - procSnmp.RtoMax = &value - case "MaxConn": - procSnmp.MaxConn = &value - case "ActiveOpens": - procSnmp.ActiveOpens = &value - case "PassiveOpens": - procSnmp.PassiveOpens = &value - case "AttemptFails": - procSnmp.AttemptFails = &value - case "EstabResets": - procSnmp.EstabResets = &value - case "CurrEstab": - procSnmp.CurrEstab = &value - case "InSegs": - procSnmp.InSegs = &value - case "OutSegs": - procSnmp.OutSegs = &value - case "RetransSegs": - procSnmp.RetransSegs = &value - case "InErrs": - procSnmp.InErrs = &value - case "OutRsts": - procSnmp.OutRsts = &value - case "InCsumErrors": - procSnmp.Tcp.InCsumErrors = &value - } - case "Udp": - switch key { - case "InDatagrams": - procSnmp.Udp.InDatagrams = &value - case "NoPorts": - procSnmp.Udp.NoPorts = &value - case "InErrors": - procSnmp.Udp.InErrors = &value - case "OutDatagrams": - procSnmp.Udp.OutDatagrams = &value - case "RcvbufErrors": - procSnmp.Udp.RcvbufErrors = &value - case "SndbufErrors": - procSnmp.Udp.SndbufErrors = &value - case "InCsumErrors": - procSnmp.Udp.InCsumErrors = &value - case "IgnoredMulti": - procSnmp.Udp.IgnoredMulti = &value - } - case "UdpLite": - switch key { - case "InDatagrams": - procSnmp.UdpLite.InDatagrams = &value - case "NoPorts": - procSnmp.UdpLite.NoPorts = &value - case "InErrors": - procSnmp.UdpLite.InErrors = &value - case "OutDatagrams": - procSnmp.UdpLite.OutDatagrams = &value - case "RcvbufErrors": - procSnmp.UdpLite.RcvbufErrors = &value - case "SndbufErrors": - procSnmp.UdpLite.SndbufErrors = &value - case "InCsumErrors": - procSnmp.UdpLite.InCsumErrors = &value - case "IgnoredMulti": - procSnmp.UdpLite.IgnoredMulti = &value - } - } - } - } - return procSnmp, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/proc_snmp6.go b/vendor/github.com/prometheus/procfs/proc_snmp6.go deleted file mode 100644 index 841fef464..000000000 --- a/vendor/github.com/prometheus/procfs/proc_snmp6.go +++ /dev/null @@ -1,381 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "errors" - "io" - "os" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ProcSnmp6 models the content of /proc//net/snmp6. -type ProcSnmp6 struct { - // The process ID. - PID int - Ip6 - Icmp6 - Udp6 - UdpLite6 -} - -type Ip6 struct { // nolint:revive - InReceives *float64 - InHdrErrors *float64 - InTooBigErrors *float64 - InNoRoutes *float64 - InAddrErrors *float64 - InUnknownProtos *float64 - InTruncatedPkts *float64 - InDiscards *float64 - InDelivers *float64 - OutForwDatagrams *float64 - OutRequests *float64 - OutDiscards *float64 - OutNoRoutes *float64 - ReasmTimeout *float64 - ReasmReqds *float64 - ReasmOKs *float64 - ReasmFails *float64 - FragOKs *float64 - FragFails *float64 - FragCreates *float64 - InMcastPkts *float64 - OutMcastPkts *float64 - InOctets *float64 - OutOctets *float64 - InMcastOctets *float64 - OutMcastOctets *float64 - InBcastOctets *float64 - OutBcastOctets *float64 - InNoECTPkts *float64 - InECT1Pkts *float64 - InECT0Pkts *float64 - InCEPkts *float64 -} - -type Icmp6 struct { - InMsgs *float64 - InErrors *float64 - OutMsgs *float64 - OutErrors *float64 - InCsumErrors *float64 - InDestUnreachs *float64 - InPktTooBigs *float64 - InTimeExcds *float64 - InParmProblems *float64 - InEchos *float64 - InEchoReplies *float64 - InGroupMembQueries *float64 - InGroupMembResponses *float64 - InGroupMembReductions *float64 - InRouterSolicits *float64 - InRouterAdvertisements *float64 - InNeighborSolicits *float64 - InNeighborAdvertisements *float64 - InRedirects *float64 - InMLDv2Reports *float64 - OutDestUnreachs *float64 - OutPktTooBigs *float64 - OutTimeExcds *float64 - OutParmProblems *float64 - OutEchos *float64 - OutEchoReplies *float64 - OutGroupMembQueries *float64 - OutGroupMembResponses *float64 - OutGroupMembReductions *float64 - OutRouterSolicits *float64 - OutRouterAdvertisements *float64 - OutNeighborSolicits *float64 - OutNeighborAdvertisements *float64 - OutRedirects *float64 - OutMLDv2Reports *float64 - InType1 *float64 - InType134 *float64 - InType135 *float64 - InType136 *float64 - InType143 *float64 - OutType133 *float64 - OutType135 *float64 - OutType136 *float64 - OutType143 *float64 -} - -type Udp6 struct { // nolint:revive - InDatagrams *float64 - NoPorts *float64 - InErrors *float64 - OutDatagrams *float64 - RcvbufErrors *float64 - SndbufErrors *float64 - InCsumErrors *float64 - IgnoredMulti *float64 -} - -type UdpLite6 struct { // nolint:revive - InDatagrams *float64 - NoPorts *float64 - InErrors *float64 - OutDatagrams *float64 - RcvbufErrors *float64 - SndbufErrors *float64 - InCsumErrors *float64 -} - -func (p Proc) Snmp6() (ProcSnmp6, error) { - filename := p.path("net/snmp6") - data, err := util.ReadFileNoStat(filename) - if err != nil { - // On systems with IPv6 disabled, this file won't exist. - // Do nothing. - if errors.Is(err, os.ErrNotExist) { - return ProcSnmp6{PID: p.PID}, nil - } - - return ProcSnmp6{PID: p.PID}, err - } - - procSnmp6, err := parseSNMP6Stats(bytes.NewReader(data)) - procSnmp6.PID = p.PID - return procSnmp6, err -} - -// parseSnmp6 parses the metrics from proc//net/snmp6 file -// and returns a map contains those metrics. -func parseSNMP6Stats(r io.Reader) (ProcSnmp6, error) { - var ( - scanner = bufio.NewScanner(r) - procSnmp6 = ProcSnmp6{} - ) - - for scanner.Scan() { - stat := strings.Fields(scanner.Text()) - if len(stat) < 2 { - continue - } - // Expect to have "6" in metric name, skip line otherwise - if sixIndex := strings.Index(stat[0], "6"); sixIndex != -1 { - protocol := stat[0][:sixIndex+1] - key := stat[0][sixIndex+1:] - value, err := strconv.ParseFloat(stat[1], 64) - if err != nil { - return procSnmp6, err - } - - switch protocol { - case "Ip6": - switch key { - case "InReceives": - procSnmp6.InReceives = &value - case "InHdrErrors": - procSnmp6.InHdrErrors = &value - case "InTooBigErrors": - procSnmp6.InTooBigErrors = &value - case "InNoRoutes": - procSnmp6.InNoRoutes = &value - case "InAddrErrors": - procSnmp6.InAddrErrors = &value - case "InUnknownProtos": - procSnmp6.InUnknownProtos = &value - case "InTruncatedPkts": - procSnmp6.InTruncatedPkts = &value - case "InDiscards": - procSnmp6.InDiscards = &value - case "InDelivers": - procSnmp6.InDelivers = &value - case "OutForwDatagrams": - procSnmp6.OutForwDatagrams = &value - case "OutRequests": - procSnmp6.OutRequests = &value - case "OutDiscards": - procSnmp6.OutDiscards = &value - case "OutNoRoutes": - procSnmp6.OutNoRoutes = &value - case "ReasmTimeout": - procSnmp6.ReasmTimeout = &value - case "ReasmReqds": - procSnmp6.ReasmReqds = &value - case "ReasmOKs": - procSnmp6.ReasmOKs = &value - case "ReasmFails": - procSnmp6.ReasmFails = &value - case "FragOKs": - procSnmp6.FragOKs = &value - case "FragFails": - procSnmp6.FragFails = &value - case "FragCreates": - procSnmp6.FragCreates = &value - case "InMcastPkts": - procSnmp6.InMcastPkts = &value - case "OutMcastPkts": - procSnmp6.OutMcastPkts = &value - case "InOctets": - procSnmp6.InOctets = &value - case "OutOctets": - procSnmp6.OutOctets = &value - case "InMcastOctets": - procSnmp6.InMcastOctets = &value - case "OutMcastOctets": - procSnmp6.OutMcastOctets = &value - case "InBcastOctets": - procSnmp6.InBcastOctets = &value - case "OutBcastOctets": - procSnmp6.OutBcastOctets = &value - case "InNoECTPkts": - procSnmp6.InNoECTPkts = &value - case "InECT1Pkts": - procSnmp6.InECT1Pkts = &value - case "InECT0Pkts": - procSnmp6.InECT0Pkts = &value - case "InCEPkts": - procSnmp6.InCEPkts = &value - - } - case "Icmp6": - switch key { - case "InMsgs": - procSnmp6.InMsgs = &value - case "InErrors": - procSnmp6.Icmp6.InErrors = &value - case "OutMsgs": - procSnmp6.OutMsgs = &value - case "OutErrors": - procSnmp6.OutErrors = &value - case "InCsumErrors": - procSnmp6.Icmp6.InCsumErrors = &value - case "InDestUnreachs": - procSnmp6.InDestUnreachs = &value - case "InPktTooBigs": - procSnmp6.InPktTooBigs = &value - case "InTimeExcds": - procSnmp6.InTimeExcds = &value - case "InParmProblems": - procSnmp6.InParmProblems = &value - case "InEchos": - procSnmp6.InEchos = &value - case "InEchoReplies": - procSnmp6.InEchoReplies = &value - case "InGroupMembQueries": - procSnmp6.InGroupMembQueries = &value - case "InGroupMembResponses": - procSnmp6.InGroupMembResponses = &value - case "InGroupMembReductions": - procSnmp6.InGroupMembReductions = &value - case "InRouterSolicits": - procSnmp6.InRouterSolicits = &value - case "InRouterAdvertisements": - procSnmp6.InRouterAdvertisements = &value - case "InNeighborSolicits": - procSnmp6.InNeighborSolicits = &value - case "InNeighborAdvertisements": - procSnmp6.InNeighborAdvertisements = &value - case "InRedirects": - procSnmp6.InRedirects = &value - case "InMLDv2Reports": - procSnmp6.InMLDv2Reports = &value - case "OutDestUnreachs": - procSnmp6.OutDestUnreachs = &value - case "OutPktTooBigs": - procSnmp6.OutPktTooBigs = &value - case "OutTimeExcds": - procSnmp6.OutTimeExcds = &value - case "OutParmProblems": - procSnmp6.OutParmProblems = &value - case "OutEchos": - procSnmp6.OutEchos = &value - case "OutEchoReplies": - procSnmp6.OutEchoReplies = &value - case "OutGroupMembQueries": - procSnmp6.OutGroupMembQueries = &value - case "OutGroupMembResponses": - procSnmp6.OutGroupMembResponses = &value - case "OutGroupMembReductions": - procSnmp6.OutGroupMembReductions = &value - case "OutRouterSolicits": - procSnmp6.OutRouterSolicits = &value - case "OutRouterAdvertisements": - procSnmp6.OutRouterAdvertisements = &value - case "OutNeighborSolicits": - procSnmp6.OutNeighborSolicits = &value - case "OutNeighborAdvertisements": - procSnmp6.OutNeighborAdvertisements = &value - case "OutRedirects": - procSnmp6.OutRedirects = &value - case "OutMLDv2Reports": - procSnmp6.OutMLDv2Reports = &value - case "InType1": - procSnmp6.InType1 = &value - case "InType134": - procSnmp6.InType134 = &value - case "InType135": - procSnmp6.InType135 = &value - case "InType136": - procSnmp6.InType136 = &value - case "InType143": - procSnmp6.InType143 = &value - case "OutType133": - procSnmp6.OutType133 = &value - case "OutType135": - procSnmp6.OutType135 = &value - case "OutType136": - procSnmp6.OutType136 = &value - case "OutType143": - procSnmp6.OutType143 = &value - } - case "Udp6": - switch key { - case "InDatagrams": - procSnmp6.Udp6.InDatagrams = &value - case "NoPorts": - procSnmp6.Udp6.NoPorts = &value - case "InErrors": - procSnmp6.Udp6.InErrors = &value - case "OutDatagrams": - procSnmp6.Udp6.OutDatagrams = &value - case "RcvbufErrors": - procSnmp6.Udp6.RcvbufErrors = &value - case "SndbufErrors": - procSnmp6.Udp6.SndbufErrors = &value - case "InCsumErrors": - procSnmp6.Udp6.InCsumErrors = &value - case "IgnoredMulti": - procSnmp6.IgnoredMulti = &value - } - case "UdpLite6": - switch key { - case "InDatagrams": - procSnmp6.UdpLite6.InDatagrams = &value - case "NoPorts": - procSnmp6.UdpLite6.NoPorts = &value - case "InErrors": - procSnmp6.UdpLite6.InErrors = &value - case "OutDatagrams": - procSnmp6.UdpLite6.OutDatagrams = &value - case "RcvbufErrors": - procSnmp6.UdpLite6.RcvbufErrors = &value - case "SndbufErrors": - procSnmp6.UdpLite6.SndbufErrors = &value - case "InCsumErrors": - procSnmp6.UdpLite6.InCsumErrors = &value - } - } - } - } - return procSnmp6, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/proc_stat.go b/vendor/github.com/prometheus/procfs/proc_stat.go deleted file mode 100644 index 02e3f9e31..000000000 --- a/vendor/github.com/prometheus/procfs/proc_stat.go +++ /dev/null @@ -1,235 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bytes" - "fmt" - "os" - - "github.com/prometheus/procfs/internal/util" -) - -// Originally, this USER_HZ value was dynamically retrieved via a sysconf call -// which required cgo. However, that caused a lot of problems regarding -// cross-compilation. Alternatives such as running a binary to determine the -// value, or trying to derive it in some other way were all problematic. After -// much research it was determined that USER_HZ is actually hardcoded to 100 on -// all Go-supported platforms as of the time of this writing. This is why we -// decided to hardcode it here as well. It is not impossible that there could -// be systems with exceptions, but they should be very exotic edge cases, and -// in that case, the worst outcome will be two misreported metrics. -// -// See also the following discussions: -// -// - https://github.com/prometheus/node_exporter/issues/52 -// - https://github.com/prometheus/procfs/pull/2 -// - http://stackoverflow.com/questions/17410841/how-does-user-hz-solve-the-jiffy-scaling-issue -const userHZ = 100 - -// ProcStat provides status information about the process, -// read from /proc/[pid]/stat. -type ProcStat struct { - // The process ID. - PID int - // The filename of the executable. - Comm string - // The process state. - State string - // The PID of the parent of this process. - PPID int - // The process group ID of the process. - PGRP int - // The session ID of the process. - Session int - // The controlling terminal of the process. - TTY int - // The ID of the foreground process group of the controlling terminal of - // the process. - TPGID int - // The kernel flags word of the process. - Flags uint - // The number of minor faults the process has made which have not required - // loading a memory page from disk. - MinFlt uint - // The number of minor faults that the process's waited-for children have - // made. - CMinFlt uint - // The number of major faults the process has made which have required - // loading a memory page from disk. - MajFlt uint - // The number of major faults that the process's waited-for children have - // made. - CMajFlt uint - // Amount of time that this process has been scheduled in user mode, - // measured in clock ticks. - UTime uint - // Amount of time that this process has been scheduled in kernel mode, - // measured in clock ticks. - STime uint - // Amount of time that this process's waited-for children have been - // scheduled in user mode, measured in clock ticks. - CUTime int - // Amount of time that this process's waited-for children have been - // scheduled in kernel mode, measured in clock ticks. - CSTime int - // For processes running a real-time scheduling policy, this is the negated - // scheduling priority, minus one. - Priority int - // The nice value, a value in the range 19 (low priority) to -20 (high - // priority). - Nice int - // Number of threads in this process. - NumThreads int - // The time the process started after system boot, the value is expressed - // in clock ticks. - Starttime uint64 - // Virtual memory size in bytes. - VSize uint - // Resident set size in pages. - RSS int - // Soft limit in bytes on the rss of the process. - RSSLimit uint64 - // The address above which program text can run. - StartCode uint64 - // The address below which program text can run. - EndCode uint64 - // The address of the start (i.e., bottom) of the stack. - StartStack uint64 - // CPU number last executed on. - Processor uint - // Real-time scheduling priority, a number in the range 1 to 99 for processes - // scheduled under a real-time policy, or 0, for non-real-time processes. - RTPriority uint - // Scheduling policy. - Policy uint - // Aggregated block I/O delays, measured in clock ticks (centiseconds). - DelayAcctBlkIOTicks uint64 - // Guest time of the process (time spent running a virtual CPU for a guest - // operating system), measured in clock ticks. - GuestTime int - // Guest time of the process's children, measured in clock ticks. - CGuestTime int - - proc FS -} - -// NewStat returns the current status information of the process. -// -// Deprecated: Use p.Stat() instead. -func (p Proc) NewStat() (ProcStat, error) { - return p.Stat() -} - -// Stat returns the current status information of the process. -func (p Proc) Stat() (ProcStat, error) { - data, err := util.ReadFileNoStat(p.path("stat")) - if err != nil { - return ProcStat{}, err - } - - var ( - ignoreInt64 int64 - ignoreUint64 uint64 - - s = ProcStat{PID: p.PID, proc: p.fs} - l = bytes.Index(data, []byte("(")) - r = bytes.LastIndex(data, []byte(")")) - ) - - if l < 0 || r < 0 { - return ProcStat{}, fmt.Errorf("%w: unexpected format, couldn't extract comm %q", ErrFileParse, data) - } - - s.Comm = string(data[l+1 : r]) - - // Check the following resources for the details about the particular stat - // fields and their data types: - // * https://man7.org/linux/man-pages/man5/proc.5.html - // * https://man7.org/linux/man-pages/man3/scanf.3.html - _, err = fmt.Fscan( - bytes.NewBuffer(data[r+2:]), - &s.State, - &s.PPID, - &s.PGRP, - &s.Session, - &s.TTY, - &s.TPGID, - &s.Flags, - &s.MinFlt, - &s.CMinFlt, - &s.MajFlt, - &s.CMajFlt, - &s.UTime, - &s.STime, - &s.CUTime, - &s.CSTime, - &s.Priority, - &s.Nice, - &s.NumThreads, - &ignoreInt64, - &s.Starttime, - &s.VSize, - &s.RSS, - &s.RSSLimit, - &s.StartCode, - &s.EndCode, - &s.StartStack, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreUint64, - &ignoreInt64, - &s.Processor, - &s.RTPriority, - &s.Policy, - &s.DelayAcctBlkIOTicks, - &s.GuestTime, - &s.CGuestTime, - ) - if err != nil { - return ProcStat{}, err - } - - return s, nil -} - -// VirtualMemory returns the virtual memory size in bytes. -func (s ProcStat) VirtualMemory() uint { - return s.VSize -} - -// ResidentMemory returns the resident memory size in bytes. -func (s ProcStat) ResidentMemory() int { - return s.RSS * os.Getpagesize() -} - -// StartTime returns the unix timestamp of the process in seconds. -func (s ProcStat) StartTime() (float64, error) { - stat, err := s.proc.Stat() - if err != nil { - return 0, err - } - return float64(stat.BootTime) + (float64(s.Starttime) / userHZ), nil -} - -// CPUTime returns the total CPU user and system time in seconds. -func (s ProcStat) CPUTime() float64 { - return float64(s.UTime+s.STime) / userHZ -} diff --git a/vendor/github.com/prometheus/procfs/proc_statm.go b/vendor/github.com/prometheus/procfs/proc_statm.go deleted file mode 100644 index 6bcc97ec9..000000000 --- a/vendor/github.com/prometheus/procfs/proc_statm.go +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "os" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// - https://man7.org/linux/man-pages/man5/proc_pid_statm.5.html - -// ProcStatm Provides memory usage information for a process, measured in memory pages. -// Read from /proc/[pid]/statm. -type ProcStatm struct { - // The process ID. - PID int - // total program size (same as VmSize in status) - Size uint64 - // resident set size (same as VmRSS in status) - Resident uint64 - // number of resident shared pages (i.e., backed by a file) - Shared uint64 - // text (code) - Text uint64 - // library (unused since Linux 2.6; always 0) - Lib uint64 - // data + stack - Data uint64 - // dirty pages (unused since Linux 2.6; always 0) - Dt uint64 -} - -// NewStatm returns the current status information of the process. -// -// Deprecated: Use p.Statm() instead. -func (p Proc) NewStatm() (ProcStatm, error) { - return p.Statm() -} - -// Statm returns the current memory usage information of the process. -func (p Proc) Statm() (ProcStatm, error) { - data, err := util.ReadFileNoStat(p.path("statm")) - if err != nil { - return ProcStatm{}, err - } - - statmSlice, err := parseStatm(data) - if err != nil { - return ProcStatm{}, err - } - - procStatm := ProcStatm{ - PID: p.PID, - Size: statmSlice[0], - Resident: statmSlice[1], - Shared: statmSlice[2], - Text: statmSlice[3], - Lib: statmSlice[4], - Data: statmSlice[5], - Dt: statmSlice[6], - } - - return procStatm, nil -} - -// parseStatm return /proc/[pid]/statm data to uint64 slice. -func parseStatm(data []byte) ([]uint64, error) { - var statmSlice []uint64 - statmItems := strings.Fields(string(data)) - for i := range statmItems { - statmItem, err := strconv.ParseUint(statmItems[i], 10, 64) - if err != nil { - return nil, err - } - statmSlice = append(statmSlice, statmItem) - } - return statmSlice, nil -} - -// SizeBytes returns the process of total program size in bytes. -func (s ProcStatm) SizeBytes() uint64 { - return s.Size * uint64(os.Getpagesize()) -} - -// ResidentBytes returns the process of resident set size in bytes. -func (s ProcStatm) ResidentBytes() uint64 { - return s.Resident * uint64(os.Getpagesize()) -} - -// SHRBytes returns the process of share memory size in bytes. -func (s ProcStatm) SHRBytes() uint64 { - return s.Shared * uint64(os.Getpagesize()) -} - -// TextBytes returns the process of text (code) size in bytes. -func (s ProcStatm) TextBytes() uint64 { - return s.Text * uint64(os.Getpagesize()) -} - -// DataBytes returns the process of data + stack size in bytes. -func (s ProcStatm) DataBytes() uint64 { - return s.Data * uint64(os.Getpagesize()) -} diff --git a/vendor/github.com/prometheus/procfs/proc_status.go b/vendor/github.com/prometheus/procfs/proc_status.go deleted file mode 100644 index 12d65581c..000000000 --- a/vendor/github.com/prometheus/procfs/proc_status.go +++ /dev/null @@ -1,284 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bytes" - "math/bits" - "slices" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// ProcStatus provides status information about the process, -// read from /proc/[pid]/status. -type ProcStatus struct { - // The process ID. - PID int - // The process name. - Name string - - // Thread group ID. - TGID int - // List of Pid namespace. - NSpids []uint64 - - // Peak virtual memory size. - VmPeak uint64 // nolint:revive - // Virtual memory size. - VmSize uint64 // nolint:revive - // Locked memory size. - VmLck uint64 // nolint:revive - // Pinned memory size. - VmPin uint64 // nolint:revive - // Peak resident set size. - VmHWM uint64 // nolint:revive - // Resident set size (sum of RssAnnon RssFile and RssShmem). - VmRSS uint64 // nolint:revive - // Size of resident anonymous memory. - RssAnon uint64 // nolint:revive - // Size of resident file mappings. - RssFile uint64 // nolint:revive - // Size of resident shared memory. - RssShmem uint64 // nolint:revive - // Size of data segments. - VmData uint64 // nolint:revive - // Size of stack segments. - VmStk uint64 // nolint:revive - // Size of text segments. - VmExe uint64 // nolint:revive - // Shared library code size. - VmLib uint64 // nolint:revive - // Page table entries size. - VmPTE uint64 // nolint:revive - // Size of second-level page tables. - VmPMD uint64 // nolint:revive - // Swapped-out virtual memory size by anonymous private. - VmSwap uint64 // nolint:revive - // Size of hugetlb memory portions - HugetlbPages uint64 - - // Number of voluntary context switches. - VoluntaryCtxtSwitches uint64 - // Number of involuntary context switches. - NonVoluntaryCtxtSwitches uint64 - - // UIDs of the process (Real, effective, saved set, and filesystem UIDs) - UIDs [4]uint64 - // GIDs of the process (Real, effective, saved set, and filesystem GIDs) - GIDs [4]uint64 - - // CpusAllowedList: List of cpu cores processes are allowed to run on. - CpusAllowedList []uint64 - - // CapInh is the bitmap of inheritable capabilities - // - // See: https://www.kernel.org/doc/man-pages/online/pages/man7/capabilities.7.html - CapInh uint64 - // CapPrm is the bitmap of permitted capabilities - CapPrm uint64 - // CapEff is the bitmap of effective capabilities - CapEff uint64 - // CapBnd is the bitmap of bounding capabilities - CapBnd uint64 - // CapAmb is the bitmap of ambient capabilities - CapAmb uint64 -} - -// NewStatus returns the current status information of the process. -func (p Proc) NewStatus() (ProcStatus, error) { - data, err := util.ReadFileNoStat(p.path("status")) - if err != nil { - return ProcStatus{}, err - } - - s := ProcStatus{PID: p.PID} - - for line := range strings.SplitSeq(string(data), "\n") { - if !bytes.Contains([]byte(line), []byte(":")) { - continue - } - - kv := strings.SplitN(line, ":", 2) - - // removes spaces - k := strings.TrimSpace(kv[0]) - v := strings.TrimSpace(kv[1]) - // removes "kB" - v = strings.TrimSuffix(v, " kB") - - // value to int when possible - // we can skip error check here, 'cause vKBytes is not used when value is a string - vKBytes, _ := strconv.ParseUint(v, 10, 64) - // convert kB to B - vBytes := vKBytes * 1024 - - err = s.fillStatus(k, v, vKBytes, vBytes) - if err != nil { - return ProcStatus{}, err - } - } - - return s, nil -} - -func (s *ProcStatus) fillStatus(k string, vString string, vUint uint64, vUintBytes uint64) error { - switch k { - case "Tgid": - s.TGID = int(vUint) - case "Name": - s.Name = vString - case "Uid": - var err error - for i, v := range strings.Split(vString, "\t") { - s.UIDs[i], err = strconv.ParseUint(v, 10, bits.UintSize) - if err != nil { - return err - } - } - case "Gid": - var err error - for i, v := range strings.Split(vString, "\t") { - s.GIDs[i], err = strconv.ParseUint(v, 10, bits.UintSize) - if err != nil { - return err - } - } - case "NSpid": - nspids, err := calcNSPidsList(vString) - if err != nil { - return err - } - s.NSpids = nspids - case "VmPeak": - s.VmPeak = vUintBytes - case "VmSize": - s.VmSize = vUintBytes - case "VmLck": - s.VmLck = vUintBytes - case "VmPin": - s.VmPin = vUintBytes - case "VmHWM": - s.VmHWM = vUintBytes - case "VmRSS": - s.VmRSS = vUintBytes - case "RssAnon": - s.RssAnon = vUintBytes - case "RssFile": - s.RssFile = vUintBytes - case "RssShmem": - s.RssShmem = vUintBytes - case "VmData": - s.VmData = vUintBytes - case "VmStk": - s.VmStk = vUintBytes - case "VmExe": - s.VmExe = vUintBytes - case "VmLib": - s.VmLib = vUintBytes - case "VmPTE": - s.VmPTE = vUintBytes - case "VmPMD": - s.VmPMD = vUintBytes - case "VmSwap": - s.VmSwap = vUintBytes - case "HugetlbPages": - s.HugetlbPages = vUintBytes - case "voluntary_ctxt_switches": - s.VoluntaryCtxtSwitches = vUint - case "nonvoluntary_ctxt_switches": - s.NonVoluntaryCtxtSwitches = vUint - case "Cpus_allowed_list": - s.CpusAllowedList = calcCpusAllowedList(vString) - case "CapInh": - var err error - s.CapInh, err = strconv.ParseUint(vString, 16, 64) - if err != nil { - return err - } - case "CapPrm": - var err error - s.CapPrm, err = strconv.ParseUint(vString, 16, 64) - if err != nil { - return err - } - case "CapEff": - var err error - s.CapEff, err = strconv.ParseUint(vString, 16, 64) - if err != nil { - return err - } - case "CapBnd": - var err error - s.CapBnd, err = strconv.ParseUint(vString, 16, 64) - if err != nil { - return err - } - case "CapAmb": - var err error - s.CapAmb, err = strconv.ParseUint(vString, 16, 64) - if err != nil { - return err - } - } - - return nil -} - -// TotalCtxtSwitches returns the total context switch. -func (s ProcStatus) TotalCtxtSwitches() uint64 { - return s.VoluntaryCtxtSwitches + s.NonVoluntaryCtxtSwitches -} - -func calcCpusAllowedList(cpuString string) []uint64 { - s := strings.Split(cpuString, ",") - - var g []uint64 - - for _, cpu := range s { - // parse cpu ranges, example: 1-3=[1,2,3] - if l := strings.Split(strings.TrimSpace(cpu), "-"); len(l) > 1 { - startCPU, _ := strconv.ParseUint(l[0], 10, 64) - endCPU, _ := strconv.ParseUint(l[1], 10, 64) - - for i := startCPU; i <= endCPU; i++ { - g = append(g, i) - } - } else if len(l) == 1 { - cpu, _ := strconv.ParseUint(l[0], 10, 64) - g = append(g, cpu) - } - - } - - slices.Sort(g) - return g -} - -func calcNSPidsList(nspidsString string) ([]uint64, error) { - s := strings.Split(nspidsString, "\t") - var nspids []uint64 - - for _, nspid := range s { - nspid, err := strconv.ParseUint(nspid, 10, 64) - if err != nil { - return nil, err - } - nspids = append(nspids, nspid) - } - - return nspids, nil -} diff --git a/vendor/github.com/prometheus/procfs/proc_sys.go b/vendor/github.com/prometheus/procfs/proc_sys.go deleted file mode 100644 index 52658a4d5..000000000 --- a/vendor/github.com/prometheus/procfs/proc_sys.go +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -func sysctlToPath(sysctl string) string { - return strings.ReplaceAll(sysctl, ".", "/") -} - -func (fs FS) SysctlStrings(sysctl string) ([]string, error) { - value, err := util.SysReadFile(fs.proc.Path("sys", sysctlToPath(sysctl))) - if err != nil { - return nil, err - } - return strings.Fields(value), nil - -} - -func (fs FS) SysctlInts(sysctl string) ([]int, error) { - fields, err := fs.SysctlStrings(sysctl) - if err != nil { - return nil, err - } - - values := make([]int, len(fields)) - for i, f := range fields { - vp := util.NewValueParser(f) - values[i] = vp.Int() - if err := vp.Err(); err != nil { - return nil, fmt.Errorf("%w: field %d in sysctl %s is not a valid int: %w", ErrFileParse, i, sysctl, err) - } - } - return values, nil -} diff --git a/vendor/github.com/prometheus/procfs/schedstat.go b/vendor/github.com/prometheus/procfs/schedstat.go deleted file mode 100644 index fafd8dff7..000000000 --- a/vendor/github.com/prometheus/procfs/schedstat.go +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "errors" - "os" - "regexp" - "strconv" -) - -var ( - cpuLineRE = regexp.MustCompile(`cpu(\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+) (\d+)`) - procLineRE = regexp.MustCompile(`(\d+) (\d+) (\d+)`) -) - -// Schedstat contains scheduler statistics from /proc/schedstat -// -// See -// https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt -// for a detailed description of what these numbers mean. -// -// Note the current kernel documentation claims some of the time units are in -// jiffies when they are actually in nanoseconds since 2.6.23 with the -// introduction of CFS. A fix to the documentation is pending. See -// https://lore.kernel.org/patchwork/project/lkml/list/?series=403473 -type Schedstat struct { - CPUs []*SchedstatCPU -} - -// SchedstatCPU contains the values from one "cpu" line. -type SchedstatCPU struct { - CPUNum string - - RunningNanoseconds uint64 - WaitingNanoseconds uint64 - RunTimeslices uint64 -} - -// ProcSchedstat contains the values from `/proc//schedstat`. -type ProcSchedstat struct { - RunningNanoseconds uint64 - WaitingNanoseconds uint64 - RunTimeslices uint64 -} - -// Schedstat reads data from `/proc/schedstat`. -func (fs FS) Schedstat() (*Schedstat, error) { - file, err := os.Open(fs.proc.Path("schedstat")) - if err != nil { - return nil, err - } - defer file.Close() - - stats := &Schedstat{} - scanner := bufio.NewScanner(file) - - for scanner.Scan() { - match := cpuLineRE.FindStringSubmatch(scanner.Text()) - if match != nil { - cpu := &SchedstatCPU{} - cpu.CPUNum = match[1] - - cpu.RunningNanoseconds, err = strconv.ParseUint(match[8], 10, 64) - if err != nil { - continue - } - - cpu.WaitingNanoseconds, err = strconv.ParseUint(match[9], 10, 64) - if err != nil { - continue - } - - cpu.RunTimeslices, err = strconv.ParseUint(match[10], 10, 64) - if err != nil { - continue - } - - stats.CPUs = append(stats.CPUs, cpu) - } - } - - return stats, nil -} - -func parseProcSchedstat(contents string) (ProcSchedstat, error) { - var ( - stats ProcSchedstat - err error - ) - match := procLineRE.FindStringSubmatch(contents) - - if match != nil { - stats.RunningNanoseconds, err = strconv.ParseUint(match[1], 10, 64) - if err != nil { - return stats, err - } - - stats.WaitingNanoseconds, err = strconv.ParseUint(match[2], 10, 64) - if err != nil { - return stats, err - } - - stats.RunTimeslices, err = strconv.ParseUint(match[3], 10, 64) - return stats, err - } - - return stats, errors.New("could not parse schedstat") -} diff --git a/vendor/github.com/prometheus/procfs/slab.go b/vendor/github.com/prometheus/procfs/slab.go deleted file mode 100644 index 32a04678a..000000000 --- a/vendor/github.com/prometheus/procfs/slab.go +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "regexp" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -var ( - slabSpace = regexp.MustCompile(`\s+`) - slabVer = regexp.MustCompile(`slabinfo -`) - slabHeader = regexp.MustCompile(`# name`) -) - -// Slab represents a slab pool in the kernel. -type Slab struct { - Name string - ObjActive int64 - ObjNum int64 - ObjSize int64 - ObjPerSlab int64 - PagesPerSlab int64 - // tunables - Limit int64 - Batch int64 - SharedFactor int64 - SlabActive int64 - SlabNum int64 - SharedAvail int64 -} - -// SlabInfo represents info for all slabs. -type SlabInfo struct { - Slabs []*Slab -} - -func shouldParseSlab(line string) bool { - if slabVer.MatchString(line) { - return false - } - if slabHeader.MatchString(line) { - return false - } - return true -} - -// parseV21SlabEntry is used to parse a line from /proc/slabinfo version 2.1. -func parseV21SlabEntry(line string) (*Slab, error) { - // First cleanup whitespace. - l := slabSpace.ReplaceAllString(line, " ") - s := strings.Split(l, " ") - if len(s) != 16 { - return nil, fmt.Errorf("%w: unable to parse: %q", ErrFileParse, line) - } - var err error - i := &Slab{Name: s[0]} - i.ObjActive, err = strconv.ParseInt(s[1], 10, 64) - if err != nil { - return nil, err - } - i.ObjNum, err = strconv.ParseInt(s[2], 10, 64) - if err != nil { - return nil, err - } - i.ObjSize, err = strconv.ParseInt(s[3], 10, 64) - if err != nil { - return nil, err - } - i.ObjPerSlab, err = strconv.ParseInt(s[4], 10, 64) - if err != nil { - return nil, err - } - i.PagesPerSlab, err = strconv.ParseInt(s[5], 10, 64) - if err != nil { - return nil, err - } - i.Limit, err = strconv.ParseInt(s[8], 10, 64) - if err != nil { - return nil, err - } - i.Batch, err = strconv.ParseInt(s[9], 10, 64) - if err != nil { - return nil, err - } - i.SharedFactor, err = strconv.ParseInt(s[10], 10, 64) - if err != nil { - return nil, err - } - i.SlabActive, err = strconv.ParseInt(s[13], 10, 64) - if err != nil { - return nil, err - } - i.SlabNum, err = strconv.ParseInt(s[14], 10, 64) - if err != nil { - return nil, err - } - i.SharedAvail, err = strconv.ParseInt(s[15], 10, 64) - if err != nil { - return nil, err - } - return i, nil -} - -// parseSlabInfo21 is used to parse a slabinfo 2.1 file. -func parseSlabInfo21(r *bytes.Reader) (SlabInfo, error) { - scanner := bufio.NewScanner(r) - s := SlabInfo{Slabs: []*Slab{}} - for scanner.Scan() { - line := scanner.Text() - if !shouldParseSlab(line) { - continue - } - slab, err := parseV21SlabEntry(line) - if err != nil { - return s, err - } - s.Slabs = append(s.Slabs, slab) - } - return s, nil -} - -// SlabInfo reads data from `/proc/slabinfo`. -func (fs FS) SlabInfo() (SlabInfo, error) { - // TODO: Consider passing options to allow for parsing different - // slabinfo versions. However, slabinfo 2.1 has been stable since - // kernel 2.6.10 and later. - data, err := util.ReadFileNoStat(fs.proc.Path("slabinfo")) - if err != nil { - return SlabInfo{}, err - } - - return parseSlabInfo21(bytes.NewReader(data)) -} diff --git a/vendor/github.com/prometheus/procfs/softirqs.go b/vendor/github.com/prometheus/procfs/softirqs.go deleted file mode 100644 index 47b73a729..000000000 --- a/vendor/github.com/prometheus/procfs/softirqs.go +++ /dev/null @@ -1,160 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Softirqs represents the softirq statistics. -type Softirqs struct { - Hi []uint64 - Timer []uint64 - NetTx []uint64 - NetRx []uint64 - Block []uint64 - IRQPoll []uint64 - Tasklet []uint64 - Sched []uint64 - HRTimer []uint64 - RCU []uint64 -} - -func (fs FS) Softirqs() (Softirqs, error) { - fileName := fs.proc.Path("softirqs") - data, err := util.ReadFileNoStat(fileName) - if err != nil { - return Softirqs{}, err - } - - reader := bytes.NewReader(data) - - return parseSoftirqs(reader) -} - -func parseSoftirqs(r io.Reader) (Softirqs, error) { - var ( - softirqs = Softirqs{} - scanner = bufio.NewScanner(r) - ) - - if !scanner.Scan() { - return Softirqs{}, fmt.Errorf("%w: softirqs empty", ErrFileRead) - } - - for scanner.Scan() { - parts := strings.Fields(scanner.Text()) - var err error - - // require at least one cpu - if len(parts) < 2 { - continue - } - switch parts[0] { - case "HI:": - perCPU := parts[1:] - softirqs.Hi = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.Hi[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (HI%d): %w", ErrFileParse, count, i, err) - } - } - case "TIMER:": - perCPU := parts[1:] - softirqs.Timer = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.Timer[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (TIMER%d): %w", ErrFileParse, count, i, err) - } - } - case "NET_TX:": - perCPU := parts[1:] - softirqs.NetTx = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.NetTx[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (NET_TX%d): %w", ErrFileParse, count, i, err) - } - } - case "NET_RX:": - perCPU := parts[1:] - softirqs.NetRx = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.NetRx[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (NET_RX%d): %w", ErrFileParse, count, i, err) - } - } - case "BLOCK:": - perCPU := parts[1:] - softirqs.Block = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.Block[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (BLOCK%d): %w", ErrFileParse, count, i, err) - } - } - case "IRQ_POLL:": - perCPU := parts[1:] - softirqs.IRQPoll = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.IRQPoll[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (IRQ_POLL%d): %w", ErrFileParse, count, i, err) - } - } - case "TASKLET:": - perCPU := parts[1:] - softirqs.Tasklet = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.Tasklet[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (TASKLET%d): %w", ErrFileParse, count, i, err) - } - } - case "SCHED:": - perCPU := parts[1:] - softirqs.Sched = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.Sched[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (SCHED%d): %w", ErrFileParse, count, i, err) - } - } - case "HRTIMER:": - perCPU := parts[1:] - softirqs.HRTimer = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.HRTimer[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (HRTIMER%d): %w", ErrFileParse, count, i, err) - } - } - case "RCU:": - perCPU := parts[1:] - softirqs.RCU = make([]uint64, len(perCPU)) - for i, count := range perCPU { - if softirqs.RCU[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse %q (RCU%d): %w", ErrFileParse, count, i, err) - } - } - } - } - - if err := scanner.Err(); err != nil { - return Softirqs{}, fmt.Errorf("%w: couldn't parse softirqs: %w", ErrFileParse, err) - } - - return softirqs, scanner.Err() -} diff --git a/vendor/github.com/prometheus/procfs/stat.go b/vendor/github.com/prometheus/procfs/stat.go deleted file mode 100644 index 593ad0f62..000000000 --- a/vendor/github.com/prometheus/procfs/stat.go +++ /dev/null @@ -1,259 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "errors" - "fmt" - "io" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/fs" - "github.com/prometheus/procfs/internal/util" -) - -// CPUStat shows how much time the cpu spend in various stages. -type CPUStat struct { - User float64 - Nice float64 - System float64 - Idle float64 - Iowait float64 - IRQ float64 - SoftIRQ float64 - Steal float64 - Guest float64 - GuestNice float64 -} - -// SoftIRQStat represent the softirq statistics as exported in the procfs stat file. -// A nice introduction can be found at https://0xax.gitbooks.io/linux-insides/content/interrupts/interrupts-9.html -// It is possible to get per-cpu stats by reading `/proc/softirqs`. -type SoftIRQStat struct { - Hi uint64 - Timer uint64 - NetTx uint64 - NetRx uint64 - Block uint64 - BlockIoPoll uint64 - Tasklet uint64 - Sched uint64 - Hrtimer uint64 - Rcu uint64 -} - -// Stat represents kernel/system statistics. -type Stat struct { - // Boot time in seconds since the Epoch. - BootTime uint64 - // Summed up cpu statistics. - CPUTotal CPUStat - // Per-CPU statistics. - CPU map[int64]CPUStat - // Number of times interrupts were handled, which contains numbered and unnumbered IRQs. - IRQTotal uint64 - // Number of times a numbered IRQ was triggered. - IRQ []uint64 - // Number of times a context switch happened. - ContextSwitches uint64 - // Number of times a process was created. - ProcessCreated uint64 - // Number of processes currently running. - ProcessesRunning uint64 - // Number of processes currently blocked (waiting for IO). - ProcessesBlocked uint64 - // Number of times a softirq was scheduled. - SoftIRQTotal uint64 - // Detailed softirq statistics. - SoftIRQ SoftIRQStat -} - -// Parse a cpu statistics line and returns the CPUStat struct plus the cpu id (or -1 for the overall sum). -func parseCPUStat(line string) (CPUStat, int64, error) { - cpuStat := CPUStat{} - var cpu string - - count, err := fmt.Sscanf(line, "%s %f %f %f %f %f %f %f %f %f %f", - &cpu, - &cpuStat.User, &cpuStat.Nice, &cpuStat.System, &cpuStat.Idle, - &cpuStat.Iowait, &cpuStat.IRQ, &cpuStat.SoftIRQ, &cpuStat.Steal, - &cpuStat.Guest, &cpuStat.GuestNice) - - if err != nil && !errors.Is(err, io.EOF) { - return CPUStat{}, -1, fmt.Errorf("%w: couldn't parse %q (cpu): %w", ErrFileParse, line, err) - } - if count == 0 { - return CPUStat{}, -1, fmt.Errorf("%w: couldn't parse %q (cpu): 0 elements parsed", ErrFileParse, line) - } - - cpuStat.User /= userHZ - cpuStat.Nice /= userHZ - cpuStat.System /= userHZ - cpuStat.Idle /= userHZ - cpuStat.Iowait /= userHZ - cpuStat.IRQ /= userHZ - cpuStat.SoftIRQ /= userHZ - cpuStat.Steal /= userHZ - cpuStat.Guest /= userHZ - cpuStat.GuestNice /= userHZ - - if cpu == "cpu" { - return cpuStat, -1, nil - } - - cpuID, err := strconv.ParseInt(cpu[3:], 10, 64) - if err != nil { - return CPUStat{}, -1, fmt.Errorf("%w: couldn't parse %q (cpu/cpuid): %w", ErrFileParse, line, err) - } - - return cpuStat, cpuID, nil -} - -// Parse a softirq line. -func parseSoftIRQStat(line string) (SoftIRQStat, uint64, error) { - softIRQStat := SoftIRQStat{} - var total uint64 - var prefix string - - _, err := fmt.Sscanf(line, "%s %d %d %d %d %d %d %d %d %d %d %d", - &prefix, &total, - &softIRQStat.Hi, &softIRQStat.Timer, &softIRQStat.NetTx, &softIRQStat.NetRx, - &softIRQStat.Block, &softIRQStat.BlockIoPoll, - &softIRQStat.Tasklet, &softIRQStat.Sched, - &softIRQStat.Hrtimer, &softIRQStat.Rcu) - - if err != nil { - return SoftIRQStat{}, 0, fmt.Errorf("%w: couldn't parse %q (softirq): %w", ErrFileParse, line, err) - } - - return softIRQStat, total, nil -} - -// NewStat returns information about current cpu/process statistics. -// See https://www.kernel.org/doc/Documentation/filesystems/proc.txt -// -// Deprecated: Use fs.Stat() instead. -func NewStat() (Stat, error) { - fs, err := NewFS(fs.DefaultProcMountPoint) - if err != nil { - return Stat{}, err - } - return fs.Stat() -} - -// NewStat returns information about current cpu/process statistics. -// See: https://www.kernel.org/doc/Documentation/filesystems/proc.txt -// -// Deprecated: Use fs.Stat() instead. -func (fs FS) NewStat() (Stat, error) { - return fs.Stat() -} - -// Stat returns information about current cpu/process statistics. -// See: https://www.kernel.org/doc/Documentation/filesystems/proc.txt -func (fs FS) Stat() (Stat, error) { - fileName := fs.proc.Path("stat") - data, err := util.ReadFileNoStat(fileName) - if err != nil { - return Stat{}, err - } - procStat, err := parseStat(bytes.NewReader(data), fileName) - if err != nil { - return Stat{}, err - } - return procStat, nil -} - -// parseStat parses the metrics from /proc/[pid]/stat. -func parseStat(r io.Reader, fileName string) (Stat, error) { - var ( - scanner = bufio.NewScanner(r) - stat = Stat{ - CPU: make(map[int64]CPUStat), - } - err error - ) - - // Increase default scanner buffer to handle very long `intr` lines. - buf := make([]byte, 0, 8*1024) - scanner.Buffer(buf, 1024*1024) - - for scanner.Scan() { - line := scanner.Text() - parts := strings.Fields(scanner.Text()) - // require at least - if len(parts) < 2 { - continue - } - switch { - case parts[0] == "btime": - if stat.BootTime, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (btime): %w", ErrFileParse, parts[1], err) - } - case parts[0] == "intr": - if stat.IRQTotal, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (intr): %w", ErrFileParse, parts[1], err) - } - numberedIRQs := parts[2:] - stat.IRQ = make([]uint64, len(numberedIRQs)) - for i, count := range numberedIRQs { - if stat.IRQ[i], err = strconv.ParseUint(count, 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (intr%d): %w", ErrFileParse, count, i, err) - } - } - case parts[0] == "ctxt": - if stat.ContextSwitches, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (ctxt): %w", ErrFileParse, parts[1], err) - } - case parts[0] == "processes": - if stat.ProcessCreated, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (processes): %w", ErrFileParse, parts[1], err) - } - case parts[0] == "procs_running": - if stat.ProcessesRunning, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (procs_running): %w", ErrFileParse, parts[1], err) - } - case parts[0] == "procs_blocked": - if stat.ProcessesBlocked, err = strconv.ParseUint(parts[1], 10, 64); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q (procs_blocked): %w", ErrFileParse, parts[1], err) - } - case parts[0] == "softirq": - softIRQStats, total, err := parseSoftIRQStat(line) - if err != nil { - return Stat{}, err - } - stat.SoftIRQTotal = total - stat.SoftIRQ = softIRQStats - case strings.HasPrefix(parts[0], "cpu"): - cpuStat, cpuID, err := parseCPUStat(line) - if err != nil { - return Stat{}, err - } - if cpuID == -1 { - stat.CPUTotal = cpuStat - } else { - stat.CPU[cpuID] = cpuStat - } - } - } - - if err := scanner.Err(); err != nil { - return Stat{}, fmt.Errorf("%w: couldn't parse %q: %w", ErrFileParse, fileName, err) - } - - return stat, nil -} diff --git a/vendor/github.com/prometheus/procfs/swaps.go b/vendor/github.com/prometheus/procfs/swaps.go deleted file mode 100644 index ee17bf488..000000000 --- a/vendor/github.com/prometheus/procfs/swaps.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "bufio" - "bytes" - "fmt" - "strconv" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Swap represents an entry in /proc/swaps. -type Swap struct { - Filename string - Type string - Size int - Used int - Priority int -} - -// Swaps returns a slice of all configured swap devices on the system. -func (fs FS) Swaps() ([]*Swap, error) { - data, err := util.ReadFileNoStat(fs.proc.Path("swaps")) - if err != nil { - return nil, err - } - return parseSwaps(data) -} - -func parseSwaps(info []byte) ([]*Swap, error) { - swaps := []*Swap{} - scanner := bufio.NewScanner(bytes.NewReader(info)) - scanner.Scan() // ignore header line - for scanner.Scan() { - swapString := scanner.Text() - parsedSwap, err := parseSwapString(swapString) - if err != nil { - return nil, err - } - swaps = append(swaps, parsedSwap) - } - - err := scanner.Err() - return swaps, err -} - -func parseSwapString(swapString string) (*Swap, error) { - var err error - - swapFields := strings.Fields(swapString) - swapLength := len(swapFields) - if swapLength < 5 { - return nil, fmt.Errorf("%w: too few fields in swap string: %s", ErrFileParse, swapString) - } - - swap := &Swap{ - Filename: swapFields[0], - Type: swapFields[1], - } - - swap.Size, err = strconv.Atoi(swapFields[2]) - if err != nil { - return nil, fmt.Errorf("%w: invalid swap size: %s: %w", ErrFileParse, swapFields[2], err) - } - swap.Used, err = strconv.Atoi(swapFields[3]) - if err != nil { - return nil, fmt.Errorf("%w: invalid swap used: %s: %w", ErrFileParse, swapFields[3], err) - } - swap.Priority, err = strconv.Atoi(swapFields[4]) - if err != nil { - return nil, fmt.Errorf("%w: invalid swap priority: %s: %w", ErrFileParse, swapFields[4], err) - } - - return swap, nil -} diff --git a/vendor/github.com/prometheus/procfs/thread.go b/vendor/github.com/prometheus/procfs/thread.go deleted file mode 100644 index 0cfbb5418..000000000 --- a/vendor/github.com/prometheus/procfs/thread.go +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright The Prometheus 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 procfs - -import ( - "fmt" - "os" - "strconv" - - fsi "github.com/prometheus/procfs/internal/fs" -) - -// Provide access to /proc/PID/task/TID files, for thread specific values. Since -// such files have the same structure as /proc/PID/ ones, the data structures -// and the parsers for the latter may be reused. - -// AllThreads returns a list of all currently available threads under /proc/PID. -func AllThreads(pid int) (Procs, error) { - fs, err := NewFS(DefaultMountPoint) - if err != nil { - return Procs{}, err - } - return fs.AllThreads(pid) -} - -// AllThreads returns a list of all currently available threads for PID. -func (fs FS) AllThreads(pid int) (Procs, error) { - taskPath := fs.proc.Path(strconv.Itoa(pid), "task") - d, err := os.Open(taskPath) - if err != nil { - return Procs{}, err - } - defer d.Close() - - names, err := d.Readdirnames(-1) - if err != nil { - return Procs{}, fmt.Errorf("%w: could not read %q: %w", ErrFileRead, d.Name(), err) - } - - t := Procs{} - for _, n := range names { - tid, err := strconv.ParseInt(n, 10, 64) - if err != nil { - continue - } - - t = append(t, Proc{PID: int(tid), fs: FS{fsi.FS(taskPath), fs.isReal}}) - } - - return t, nil -} - -// Thread returns a process for a given PID, TID. -func (fs FS) Thread(pid, tid int) (Proc, error) { - taskPath := fs.proc.Path(strconv.Itoa(pid), "task") - if _, err := os.Stat(taskPath); err != nil { - return Proc{}, err - } - return Proc{PID: tid, fs: FS{fsi.FS(taskPath), fs.isReal}}, nil -} - -// Thread returns a process for a given TID of Proc. -func (proc Proc) Thread(tid int) (Proc, error) { - tfs := FS{fsi.FS(proc.path("task")), proc.fs.isReal} - if _, err := os.Stat(tfs.proc.Path(strconv.Itoa(tid))); err != nil { - return Proc{}, err - } - return Proc{PID: tid, fs: tfs}, nil -} diff --git a/vendor/github.com/prometheus/procfs/ttar b/vendor/github.com/prometheus/procfs/ttar deleted file mode 100644 index 19ef02b8d..000000000 --- a/vendor/github.com/prometheus/procfs/ttar +++ /dev/null @@ -1,413 +0,0 @@ -#!/usr/bin/env bash - -# Purpose: plain text tar format -# Limitations: - only suitable for text files, directories, and symlinks -# - stores only filename, content, and mode -# - not designed for untrusted input -# -# Note: must work with bash version 3.2 (macOS) - -# Copyright 2017 Roger Luethi -# -# 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. - -set -o errexit -o nounset - -# Sanitize environment (for instance, standard sorting of glob matches) -export LC_ALL=C - -path="" -CMD="" -ARG_STRING="$*" - -#------------------------------------------------------------------------------ -# Not all sed implementations can work on null bytes. In order to make ttar -# work out of the box on macOS, use Python as a stream editor. - -USE_PYTHON=0 - -PYTHON_CREATE_FILTER=$(cat << 'PCF' -#!/usr/bin/env python - -import re -import sys - -for line in sys.stdin: - line = re.sub(r'EOF', r'\EOF', line) - line = re.sub(r'NULLBYTE', r'\NULLBYTE', line) - line = re.sub('\x00', r'NULLBYTE', line) - sys.stdout.write(line) -PCF -) - -PYTHON_EXTRACT_FILTER=$(cat << 'PEF' -#!/usr/bin/env python - -import re -import sys - -for line in sys.stdin: - line = re.sub(r'(?/dev/null; then - echo "ERROR Python not found. Aborting." - exit 2 - fi - USE_PYTHON=1 - fi -} - -#------------------------------------------------------------------------------ - -function usage { - bname=$(basename "$0") - cat << USAGE -Usage: $bname [-C

] -c -f (create archive) - $bname -t -f (list archive contents) - $bname [-C ] -x -f (extract archive) - -Options: - -C (change directory) - -v (verbose) - --recursive-unlink (recursively delete existing directory if path - collides with file or directory to extract) - -Example: Change to sysfs directory, create ttar file from fixtures directory - $bname -C sysfs -c -f sysfs/fixtures.ttar fixtures/ -USAGE -exit "$1" -} - -function vecho { - if [ "${VERBOSE:-}" == "yes" ]; then - echo >&7 "$@" - fi -} - -function set_cmd { - if [ -n "$CMD" ]; then - echo "ERROR: more than one command given" - echo - usage 2 - fi - CMD=$1 -} - -unset VERBOSE -unset RECURSIVE_UNLINK - -while getopts :cf:-:htxvC: opt; do - case $opt in - c) - set_cmd "create" - ;; - f) - ARCHIVE=$OPTARG - ;; - h) - usage 0 - ;; - t) - set_cmd "list" - ;; - x) - set_cmd "extract" - ;; - v) - VERBOSE=yes - exec 7>&1 - ;; - C) - CDIR=$OPTARG - ;; - -) - case $OPTARG in - recursive-unlink) - RECURSIVE_UNLINK="yes" - ;; - *) - echo -e "Error: invalid option -$OPTARG" - echo - usage 1 - ;; - esac - ;; - *) - echo >&2 "ERROR: invalid option -$OPTARG" - echo - usage 1 - ;; - esac -done - -# Remove processed options from arguments -shift $(( OPTIND - 1 )); - -if [ "${CMD:-}" == "" ]; then - echo >&2 "ERROR: no command given" - echo - usage 1 -elif [ "${ARCHIVE:-}" == "" ]; then - echo >&2 "ERROR: no archive name given" - echo - usage 1 -fi - -function list { - local path="" - local size=0 - local line_no=0 - local ttar_file=$1 - if [ -n "${2:-}" ]; then - echo >&2 "ERROR: too many arguments." - echo - usage 1 - fi - if [ ! -e "$ttar_file" ]; then - echo >&2 "ERROR: file not found ($ttar_file)" - echo - usage 1 - fi - while read -r line; do - line_no=$(( line_no + 1 )) - if [ $size -gt 0 ]; then - size=$(( size - 1 )) - continue - fi - if [[ $line =~ ^Path:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - elif [[ $line =~ ^Lines:\ (.*)$ ]]; then - size=${BASH_REMATCH[1]} - echo "$path" - elif [[ $line =~ ^Directory:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - echo "$path/" - elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then - echo "$path -> ${BASH_REMATCH[1]}" - fi - done < "$ttar_file" -} - -function extract { - local path="" - local size=0 - local line_no=0 - local ttar_file=$1 - if [ -n "${2:-}" ]; then - echo >&2 "ERROR: too many arguments." - echo - usage 1 - fi - if [ ! -e "$ttar_file" ]; then - echo >&2 "ERROR: file not found ($ttar_file)" - echo - usage 1 - fi - while IFS= read -r line; do - line_no=$(( line_no + 1 )) - local eof_without_newline - if [ "$size" -gt 0 ]; then - if [[ "$line" =~ [^\\]EOF ]]; then - # An EOF not preceded by a backslash indicates that the line - # does not end with a newline - eof_without_newline=1 - else - eof_without_newline=0 - fi - # Replace NULLBYTE with null byte if at beginning of line - # Replace NULLBYTE with null byte unless preceded by backslash - # Remove one backslash in front of NULLBYTE (if any) - # Remove EOF unless preceded by backslash - # Remove one backslash in front of EOF - if [ $USE_PYTHON -eq 1 ]; then - echo -n "$line" | python -c "$PYTHON_EXTRACT_FILTER" >> "$path" - else - # The repeated pattern makes up for sed's lack of negative - # lookbehind assertions (for consecutive null bytes). - echo -n "$line" | \ - sed -e 's/^NULLBYTE/\x0/g; - s/\([^\\]\)NULLBYTE/\1\x0/g; - s/\([^\\]\)NULLBYTE/\1\x0/g; - s/\\NULLBYTE/NULLBYTE/g; - s/\([^\\]\)EOF/\1/g; - s/\\EOF/EOF/g; - ' >> "$path" - fi - if [[ "$eof_without_newline" -eq 0 ]]; then - echo >> "$path" - fi - size=$(( size - 1 )) - continue - fi - if [[ $line =~ ^Path:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - if [ -L "$path" ]; then - rm "$path" - elif [ -d "$path" ]; then - if [ "${RECURSIVE_UNLINK:-}" == "yes" ]; then - rm -r "$path" - else - # Safe because symlinks to directories are dealt with above - rmdir "$path" - fi - elif [ -e "$path" ]; then - rm "$path" - fi - elif [[ $line =~ ^Lines:\ (.*)$ ]]; then - size=${BASH_REMATCH[1]} - # Create file even if it is zero-length. - touch "$path" - vecho " $path" - elif [[ $line =~ ^Mode:\ (.*)$ ]]; then - mode=${BASH_REMATCH[1]} - chmod "$mode" "$path" - vecho "$mode" - elif [[ $line =~ ^Directory:\ (.*)$ ]]; then - path=${BASH_REMATCH[1]} - mkdir -p "$path" - vecho " $path/" - elif [[ $line =~ ^SymlinkTo:\ (.*)$ ]]; then - ln -s "${BASH_REMATCH[1]}" "$path" - vecho " $path -> ${BASH_REMATCH[1]}" - elif [[ $line =~ ^# ]]; then - # Ignore comments between files - continue - else - echo >&2 "ERROR: Unknown keyword on line $line_no: $line" - exit 1 - fi - done < "$ttar_file" -} - -function div { - echo "# ttar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -" \ - "- - - - - -" -} - -function get_mode { - local mfile=$1 - if [ -z "${STAT_OPTION:-}" ]; then - if stat -c '%a' "$mfile" >/dev/null 2>&1; then - # GNU stat - STAT_OPTION='-c' - STAT_FORMAT='%a' - else - # BSD stat - STAT_OPTION='-f' - # Octal output, user/group/other (omit file type, sticky bit) - STAT_FORMAT='%OLp' - fi - fi - stat "${STAT_OPTION}" "${STAT_FORMAT}" "$mfile" -} - -function _create { - shopt -s nullglob - local mode - local eof_without_newline - while (( "$#" )); do - file=$1 - if [ -L "$file" ]; then - echo "Path: $file" - symlinkTo=$(readlink "$file") - echo "SymlinkTo: $symlinkTo" - vecho " $file -> $symlinkTo" - div - elif [ -d "$file" ]; then - # Strip trailing slash (if there is one) - file=${file%/} - echo "Directory: $file" - mode=$(get_mode "$file") - echo "Mode: $mode" - vecho "$mode $file/" - div - # Find all files and dirs, including hidden/dot files - for x in "$file/"{*,.[^.]*}; do - _create "$x" - done - elif [ -f "$file" ]; then - echo "Path: $file" - lines=$(wc -l "$file"|awk '{print $1}') - eof_without_newline=0 - if [[ "$(wc -c "$file"|awk '{print $1}')" -gt 0 ]] && \ - [[ "$(tail -c 1 "$file" | wc -l)" -eq 0 ]]; then - eof_without_newline=1 - lines=$((lines+1)) - fi - echo "Lines: $lines" - # Add backslash in front of EOF - # Add backslash in front of NULLBYTE - # Replace null byte with NULLBYTE - if [ $USE_PYTHON -eq 1 ]; then - < "$file" python -c "$PYTHON_CREATE_FILTER" - else - < "$file" \ - sed 's/EOF/\\EOF/g; - s/NULLBYTE/\\NULLBYTE/g; - s/\x0/NULLBYTE/g; - ' - fi - if [[ "$eof_without_newline" -eq 1 ]]; then - # Finish line with EOF to indicate that the original line did - # not end with a linefeed - echo "EOF" - fi - mode=$(get_mode "$file") - echo "Mode: $mode" - vecho "$mode $file" - div - else - echo >&2 "ERROR: file not found ($file in $(pwd))" - exit 2 - fi - shift - done -} - -function create { - ttar_file=$1 - shift - if [ -z "${1:-}" ]; then - echo >&2 "ERROR: missing arguments." - echo - usage 1 - fi - if [ -e "$ttar_file" ]; then - rm "$ttar_file" - fi - exec > "$ttar_file" - echo "# Archive created by ttar $ARG_STRING" - _create "$@" -} - -test_environment - -if [ -n "${CDIR:-}" ]; then - if [[ "$ARCHIVE" != /* ]]; then - # Relative path: preserve the archive's location before changing - # directory - ARCHIVE="$(pwd)/$ARCHIVE" - fi - cd "$CDIR" -fi - -"$CMD" "$ARCHIVE" "$@" diff --git a/vendor/github.com/prometheus/procfs/vm.go b/vendor/github.com/prometheus/procfs/vm.go deleted file mode 100644 index 52180c03e..000000000 --- a/vendor/github.com/prometheus/procfs/vm.go +++ /dev/null @@ -1,211 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !windows - -package procfs - -import ( - "fmt" - "os" - "path/filepath" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// The VM interface is described at -// -// https://www.kernel.org/doc/Documentation/sysctl/vm.txt -// -// Each setting is exposed as a single file. -// Each file contains one line with a single numerical value, except lowmem_reserve_ratio which holds an array -// and numa_zonelist_order (deprecated) which is a string. -type VM struct { - AdminReserveKbytes *int64 // /proc/sys/vm/admin_reserve_kbytes - BlockDump *int64 // /proc/sys/vm/block_dump - CompactUnevictableAllowed *int64 // /proc/sys/vm/compact_unevictable_allowed - DirtyBackgroundBytes *int64 // /proc/sys/vm/dirty_background_bytes - DirtyBackgroundRatio *int64 // /proc/sys/vm/dirty_background_ratio - DirtyBytes *int64 // /proc/sys/vm/dirty_bytes - DirtyExpireCentisecs *int64 // /proc/sys/vm/dirty_expire_centisecs - DirtyRatio *int64 // /proc/sys/vm/dirty_ratio - DirtytimeExpireSeconds *int64 // /proc/sys/vm/dirtytime_expire_seconds - DirtyWritebackCentisecs *int64 // /proc/sys/vm/dirty_writeback_centisecs - DropCaches *int64 // /proc/sys/vm/drop_caches - ExtfragThreshold *int64 // /proc/sys/vm/extfrag_threshold - HugetlbShmGroup *int64 // /proc/sys/vm/hugetlb_shm_group - LaptopMode *int64 // /proc/sys/vm/laptop_mode - LegacyVaLayout *int64 // /proc/sys/vm/legacy_va_layout - LowmemReserveRatio []*int64 // /proc/sys/vm/lowmem_reserve_ratio - MaxMapCount *int64 // /proc/sys/vm/max_map_count - MemoryFailureEarlyKill *int64 // /proc/sys/vm/memory_failure_early_kill - MemoryFailureRecovery *int64 // /proc/sys/vm/memory_failure_recovery - MinFreeKbytes *int64 // /proc/sys/vm/min_free_kbytes - MinSlabRatio *int64 // /proc/sys/vm/min_slab_ratio - MinUnmappedRatio *int64 // /proc/sys/vm/min_unmapped_ratio - MmapMinAddr *int64 // /proc/sys/vm/mmap_min_addr - NrHugepages *int64 // /proc/sys/vm/nr_hugepages - NrHugepagesMempolicy *int64 // /proc/sys/vm/nr_hugepages_mempolicy - NrOvercommitHugepages *int64 // /proc/sys/vm/nr_overcommit_hugepages - NumaStat *int64 // /proc/sys/vm/numa_stat - NumaZonelistOrder string // /proc/sys/vm/numa_zonelist_order - OomDumpTasks *int64 // /proc/sys/vm/oom_dump_tasks - OomKillAllocatingTask *int64 // /proc/sys/vm/oom_kill_allocating_task - OvercommitKbytes *int64 // /proc/sys/vm/overcommit_kbytes - OvercommitMemory *int64 // /proc/sys/vm/overcommit_memory - OvercommitRatio *int64 // /proc/sys/vm/overcommit_ratio - PageCluster *int64 // /proc/sys/vm/page-cluster - PanicOnOom *int64 // /proc/sys/vm/panic_on_oom - PercpuPagelistFraction *int64 // /proc/sys/vm/percpu_pagelist_fraction - StatInterval *int64 // /proc/sys/vm/stat_interval - Swappiness *int64 // /proc/sys/vm/swappiness - UserReserveKbytes *int64 // /proc/sys/vm/user_reserve_kbytes - VfsCachePressure *int64 // /proc/sys/vm/vfs_cache_pressure - WatermarkBoostFactor *int64 // /proc/sys/vm/watermark_boost_factor - WatermarkScaleFactor *int64 // /proc/sys/vm/watermark_scale_factor - ZoneReclaimMode *int64 // /proc/sys/vm/zone_reclaim_mode -} - -// VM reads the VM statistics from the specified `proc` filesystem. -func (fs FS) VM() (*VM, error) { - path := fs.proc.Path("sys/vm") - file, err := os.Stat(path) - if err != nil { - return nil, err - } - if !file.Mode().IsDir() { - return nil, fmt.Errorf("%w: %s is not a directory", ErrFileRead, path) - } - - files, err := os.ReadDir(path) - if err != nil { - return nil, err - } - - var vm VM - for _, f := range files { - if f.IsDir() { - continue - } - - name := filepath.Join(path, f.Name()) - // ignore errors on read, as there are some write only - // in /proc/sys/vm - value, err := util.SysReadFile(name) - if err != nil { - continue - } - vp := util.NewValueParser(value) - - switch f.Name() { - case "admin_reserve_kbytes": - vm.AdminReserveKbytes = vp.PInt64() - case "block_dump": - vm.BlockDump = vp.PInt64() - case "compact_unevictable_allowed": - vm.CompactUnevictableAllowed = vp.PInt64() - case "dirty_background_bytes": - vm.DirtyBackgroundBytes = vp.PInt64() - case "dirty_background_ratio": - vm.DirtyBackgroundRatio = vp.PInt64() - case "dirty_bytes": - vm.DirtyBytes = vp.PInt64() - case "dirty_expire_centisecs": - vm.DirtyExpireCentisecs = vp.PInt64() - case "dirty_ratio": - vm.DirtyRatio = vp.PInt64() - case "dirtytime_expire_seconds": - vm.DirtytimeExpireSeconds = vp.PInt64() - case "dirty_writeback_centisecs": - vm.DirtyWritebackCentisecs = vp.PInt64() - case "drop_caches": - vm.DropCaches = vp.PInt64() - case "extfrag_threshold": - vm.ExtfragThreshold = vp.PInt64() - case "hugetlb_shm_group": - vm.HugetlbShmGroup = vp.PInt64() - case "laptop_mode": - vm.LaptopMode = vp.PInt64() - case "legacy_va_layout": - vm.LegacyVaLayout = vp.PInt64() - case "lowmem_reserve_ratio": - stringSlice := strings.Fields(value) - pint64Slice := make([]*int64, 0, len(stringSlice)) - for _, value := range stringSlice { - vp := util.NewValueParser(value) - pint64Slice = append(pint64Slice, vp.PInt64()) - } - vm.LowmemReserveRatio = pint64Slice - case "max_map_count": - vm.MaxMapCount = vp.PInt64() - case "memory_failure_early_kill": - vm.MemoryFailureEarlyKill = vp.PInt64() - case "memory_failure_recovery": - vm.MemoryFailureRecovery = vp.PInt64() - case "min_free_kbytes": - vm.MinFreeKbytes = vp.PInt64() - case "min_slab_ratio": - vm.MinSlabRatio = vp.PInt64() - case "min_unmapped_ratio": - vm.MinUnmappedRatio = vp.PInt64() - case "mmap_min_addr": - vm.MmapMinAddr = vp.PInt64() - case "nr_hugepages": - vm.NrHugepages = vp.PInt64() - case "nr_hugepages_mempolicy": - vm.NrHugepagesMempolicy = vp.PInt64() - case "nr_overcommit_hugepages": - vm.NrOvercommitHugepages = vp.PInt64() - case "numa_stat": - vm.NumaStat = vp.PInt64() - case "numa_zonelist_order": - vm.NumaZonelistOrder = value - case "oom_dump_tasks": - vm.OomDumpTasks = vp.PInt64() - case "oom_kill_allocating_task": - vm.OomKillAllocatingTask = vp.PInt64() - case "overcommit_kbytes": - vm.OvercommitKbytes = vp.PInt64() - case "overcommit_memory": - vm.OvercommitMemory = vp.PInt64() - case "overcommit_ratio": - vm.OvercommitRatio = vp.PInt64() - case "page-cluster": - vm.PageCluster = vp.PInt64() - case "panic_on_oom": - vm.PanicOnOom = vp.PInt64() - case "percpu_pagelist_fraction": - vm.PercpuPagelistFraction = vp.PInt64() - case "stat_interval": - vm.StatInterval = vp.PInt64() - case "swappiness": - vm.Swappiness = vp.PInt64() - case "user_reserve_kbytes": - vm.UserReserveKbytes = vp.PInt64() - case "vfs_cache_pressure": - vm.VfsCachePressure = vp.PInt64() - case "watermark_boost_factor": - vm.WatermarkBoostFactor = vp.PInt64() - case "watermark_scale_factor": - vm.WatermarkScaleFactor = vp.PInt64() - case "zone_reclaim_mode": - vm.ZoneReclaimMode = vp.PInt64() - } - if err := vp.Err(); err != nil { - return nil, err - } - } - - return &vm, nil -} diff --git a/vendor/github.com/prometheus/procfs/zoneinfo.go b/vendor/github.com/prometheus/procfs/zoneinfo.go deleted file mode 100644 index 63d1898bc..000000000 --- a/vendor/github.com/prometheus/procfs/zoneinfo.go +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright The Prometheus 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. - -//go:build !windows - -package procfs - -import ( - "bytes" - "fmt" - "os" - "regexp" - "strings" - - "github.com/prometheus/procfs/internal/util" -) - -// Zoneinfo holds info parsed from /proc/zoneinfo. -type Zoneinfo struct { - Node string - Zone string - NrFreePages *int64 - Min *int64 - Low *int64 - High *int64 - Scanned *int64 - Spanned *int64 - Present *int64 - Managed *int64 - NrActiveAnon *int64 - NrInactiveAnon *int64 - NrIsolatedAnon *int64 - NrAnonPages *int64 - NrAnonTransparentHugepages *int64 - NrActiveFile *int64 - NrInactiveFile *int64 - NrIsolatedFile *int64 - NrFilePages *int64 - NrSlabReclaimable *int64 - NrSlabUnreclaimable *int64 - NrMlockStack *int64 - NrKernelStack *int64 - NrMapped *int64 - NrDirty *int64 - NrWriteback *int64 - NrUnevictable *int64 - NrShmem *int64 - NrDirtied *int64 - NrWritten *int64 - NumaHit *int64 - NumaMiss *int64 - NumaForeign *int64 - NumaInterleave *int64 - NumaLocal *int64 - NumaOther *int64 - Protection []*int64 -} - -var nodeZoneRE = regexp.MustCompile(`(\d+), zone\s+(\w+)`) - -// Zoneinfo parses an zoneinfo-file (/proc/zoneinfo) and returns a slice of -// structs containing the relevant info. More information available here: -// https://www.kernel.org/doc/Documentation/sysctl/vm.txt -func (fs FS) Zoneinfo() ([]Zoneinfo, error) { - data, err := os.ReadFile(fs.proc.Path("zoneinfo")) - if err != nil { - return nil, fmt.Errorf("%w: error reading zoneinfo %q: %w", ErrFileRead, fs.proc.Path("zoneinfo"), err) - } - zoneinfo, err := parseZoneinfo(data) - if err != nil { - return nil, fmt.Errorf("%w: error parsing zoneinfo %q: %w", ErrFileParse, fs.proc.Path("zoneinfo"), err) - } - return zoneinfo, nil -} - -func parseZoneinfo(zoneinfoData []byte) ([]Zoneinfo, error) { - - zoneinfo := []Zoneinfo{} - - for block := range bytes.SplitSeq(zoneinfoData, []byte("\nNode")) { - var zoneinfoElement Zoneinfo - for line := range strings.SplitSeq(string(block), "\n") { - - if nodeZone := nodeZoneRE.FindStringSubmatch(line); nodeZone != nil { - zoneinfoElement.Node = nodeZone[1] - zoneinfoElement.Zone = nodeZone[2] - continue - } - if strings.HasPrefix(strings.TrimSpace(line), "per-node stats") { - continue - } - parts := strings.Fields(strings.TrimSpace(line)) - if len(parts) < 2 { - continue - } - vp := util.NewValueParser(parts[1]) - switch parts[0] { - case "nr_free_pages": - zoneinfoElement.NrFreePages = vp.PInt64() - case "min": - zoneinfoElement.Min = vp.PInt64() - case "low": - zoneinfoElement.Low = vp.PInt64() - case "high": - zoneinfoElement.High = vp.PInt64() - case "scanned": - zoneinfoElement.Scanned = vp.PInt64() - case "spanned": - zoneinfoElement.Spanned = vp.PInt64() - case "present": - zoneinfoElement.Present = vp.PInt64() - case "managed": - zoneinfoElement.Managed = vp.PInt64() - case "nr_active_anon": - zoneinfoElement.NrActiveAnon = vp.PInt64() - case "nr_inactive_anon": - zoneinfoElement.NrInactiveAnon = vp.PInt64() - case "nr_isolated_anon": - zoneinfoElement.NrIsolatedAnon = vp.PInt64() - case "nr_anon_pages": - zoneinfoElement.NrAnonPages = vp.PInt64() - case "nr_anon_transparent_hugepages": - zoneinfoElement.NrAnonTransparentHugepages = vp.PInt64() - case "nr_active_file": - zoneinfoElement.NrActiveFile = vp.PInt64() - case "nr_inactive_file": - zoneinfoElement.NrInactiveFile = vp.PInt64() - case "nr_isolated_file": - zoneinfoElement.NrIsolatedFile = vp.PInt64() - case "nr_file_pages": - zoneinfoElement.NrFilePages = vp.PInt64() - case "nr_slab_reclaimable": - zoneinfoElement.NrSlabReclaimable = vp.PInt64() - case "nr_slab_unreclaimable": - zoneinfoElement.NrSlabUnreclaimable = vp.PInt64() - case "nr_mlock_stack": - zoneinfoElement.NrMlockStack = vp.PInt64() - case "nr_kernel_stack": - zoneinfoElement.NrKernelStack = vp.PInt64() - case "nr_mapped": - zoneinfoElement.NrMapped = vp.PInt64() - case "nr_dirty": - zoneinfoElement.NrDirty = vp.PInt64() - case "nr_writeback": - zoneinfoElement.NrWriteback = vp.PInt64() - case "nr_unevictable": - zoneinfoElement.NrUnevictable = vp.PInt64() - case "nr_shmem": - zoneinfoElement.NrShmem = vp.PInt64() - case "nr_dirtied": - zoneinfoElement.NrDirtied = vp.PInt64() - case "nr_written": - zoneinfoElement.NrWritten = vp.PInt64() - case "numa_hit": - zoneinfoElement.NumaHit = vp.PInt64() - case "numa_miss": - zoneinfoElement.NumaMiss = vp.PInt64() - case "numa_foreign": - zoneinfoElement.NumaForeign = vp.PInt64() - case "numa_interleave": - zoneinfoElement.NumaInterleave = vp.PInt64() - case "numa_local": - zoneinfoElement.NumaLocal = vp.PInt64() - case "numa_other": - zoneinfoElement.NumaOther = vp.PInt64() - case "protection:": - protectionParts := strings.Split(line, ":") - protectionValues := strings.Replace(protectionParts[1], "(", "", 1) - protectionValues = strings.Replace(protectionValues, ")", "", 1) - protectionValues = strings.TrimSpace(protectionValues) - protectionStringMap := strings.Split(protectionValues, ", ") - val, err := util.ParsePInt64s(protectionStringMap) - if err == nil { - zoneinfoElement.Protection = val - } - } - - } - - zoneinfo = append(zoneinfo, zoneinfoElement) - } - return zoneinfo, nil -} diff --git a/vendor/github.com/robfig/cron/.gitignore b/vendor/github.com/robfig/cron/.gitignore deleted file mode 100644 index 00268614f..000000000 --- a/vendor/github.com/robfig/cron/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe diff --git a/vendor/github.com/robfig/cron/.travis.yml b/vendor/github.com/robfig/cron/.travis.yml deleted file mode 100644 index 4f2ee4d97..000000000 --- a/vendor/github.com/robfig/cron/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: go diff --git a/vendor/github.com/robfig/cron/LICENSE b/vendor/github.com/robfig/cron/LICENSE deleted file mode 100644 index 3a0f627ff..000000000 --- a/vendor/github.com/robfig/cron/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (C) 2012 Rob Figueiredo -All Rights Reserved. - -MIT LICENSE - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/robfig/cron/README.md b/vendor/github.com/robfig/cron/README.md deleted file mode 100644 index ec40c95fc..000000000 --- a/vendor/github.com/robfig/cron/README.md +++ /dev/null @@ -1,6 +0,0 @@ -[![GoDoc](http://godoc.org/github.com/robfig/cron?status.png)](http://godoc.org/github.com/robfig/cron) -[![Build Status](https://travis-ci.org/robfig/cron.svg?branch=master)](https://travis-ci.org/robfig/cron) - -# cron - -Documentation here: https://godoc.org/github.com/robfig/cron diff --git a/vendor/github.com/robfig/cron/constantdelay.go b/vendor/github.com/robfig/cron/constantdelay.go deleted file mode 100644 index cd6e7b1be..000000000 --- a/vendor/github.com/robfig/cron/constantdelay.go +++ /dev/null @@ -1,27 +0,0 @@ -package cron - -import "time" - -// ConstantDelaySchedule represents a simple recurring duty cycle, e.g. "Every 5 minutes". -// It does not support jobs more frequent than once a second. -type ConstantDelaySchedule struct { - Delay time.Duration -} - -// Every returns a crontab Schedule that activates once every duration. -// Delays of less than a second are not supported (will round up to 1 second). -// Any fields less than a Second are truncated. -func Every(duration time.Duration) ConstantDelaySchedule { - if duration < time.Second { - duration = time.Second - } - return ConstantDelaySchedule{ - Delay: duration - time.Duration(duration.Nanoseconds())%time.Second, - } -} - -// Next returns the next time this should be run. -// This rounds so that the next activation time will be on the second. -func (schedule ConstantDelaySchedule) Next(t time.Time) time.Time { - return t.Add(schedule.Delay - time.Duration(t.Nanosecond())*time.Nanosecond) -} diff --git a/vendor/github.com/robfig/cron/cron.go b/vendor/github.com/robfig/cron/cron.go deleted file mode 100644 index 2318aeb2e..000000000 --- a/vendor/github.com/robfig/cron/cron.go +++ /dev/null @@ -1,259 +0,0 @@ -package cron - -import ( - "log" - "runtime" - "sort" - "time" -) - -// Cron keeps track of any number of entries, invoking the associated func as -// specified by the schedule. It may be started, stopped, and the entries may -// be inspected while running. -type Cron struct { - entries []*Entry - stop chan struct{} - add chan *Entry - snapshot chan []*Entry - running bool - ErrorLog *log.Logger - location *time.Location -} - -// Job is an interface for submitted cron jobs. -type Job interface { - Run() -} - -// The Schedule describes a job's duty cycle. -type Schedule interface { - // Return the next activation time, later than the given time. - // Next is invoked initially, and then each time the job is run. - Next(time.Time) time.Time -} - -// Entry consists of a schedule and the func to execute on that schedule. -type Entry struct { - // The schedule on which this job should be run. - Schedule Schedule - - // The next time the job will run. This is the zero time if Cron has not been - // started or this entry's schedule is unsatisfiable - Next time.Time - - // The last time this job was run. This is the zero time if the job has never - // been run. - Prev time.Time - - // The Job to run. - Job Job -} - -// byTime is a wrapper for sorting the entry array by time -// (with zero time at the end). -type byTime []*Entry - -func (s byTime) Len() int { return len(s) } -func (s byTime) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s byTime) Less(i, j int) bool { - // Two zero times should return false. - // Otherwise, zero is "greater" than any other time. - // (To sort it at the end of the list.) - if s[i].Next.IsZero() { - return false - } - if s[j].Next.IsZero() { - return true - } - return s[i].Next.Before(s[j].Next) -} - -// New returns a new Cron job runner, in the Local time zone. -func New() *Cron { - return NewWithLocation(time.Now().Location()) -} - -// NewWithLocation returns a new Cron job runner. -func NewWithLocation(location *time.Location) *Cron { - return &Cron{ - entries: nil, - add: make(chan *Entry), - stop: make(chan struct{}), - snapshot: make(chan []*Entry), - running: false, - ErrorLog: nil, - location: location, - } -} - -// A wrapper that turns a func() into a cron.Job -type FuncJob func() - -func (f FuncJob) Run() { f() } - -// AddFunc adds a func to the Cron to be run on the given schedule. -func (c *Cron) AddFunc(spec string, cmd func()) error { - return c.AddJob(spec, FuncJob(cmd)) -} - -// AddJob adds a Job to the Cron to be run on the given schedule. -func (c *Cron) AddJob(spec string, cmd Job) error { - schedule, err := Parse(spec) - if err != nil { - return err - } - c.Schedule(schedule, cmd) - return nil -} - -// Schedule adds a Job to the Cron to be run on the given schedule. -func (c *Cron) Schedule(schedule Schedule, cmd Job) { - entry := &Entry{ - Schedule: schedule, - Job: cmd, - } - if !c.running { - c.entries = append(c.entries, entry) - return - } - - c.add <- entry -} - -// Entries returns a snapshot of the cron entries. -func (c *Cron) Entries() []*Entry { - if c.running { - c.snapshot <- nil - x := <-c.snapshot - return x - } - return c.entrySnapshot() -} - -// Location gets the time zone location -func (c *Cron) Location() *time.Location { - return c.location -} - -// Start the cron scheduler in its own go-routine, or no-op if already started. -func (c *Cron) Start() { - if c.running { - return - } - c.running = true - go c.run() -} - -// Run the cron scheduler, or no-op if already running. -func (c *Cron) Run() { - if c.running { - return - } - c.running = true - c.run() -} - -func (c *Cron) runWithRecovery(j Job) { - defer func() { - if r := recover(); r != nil { - const size = 64 << 10 - buf := make([]byte, size) - buf = buf[:runtime.Stack(buf, false)] - c.logf("cron: panic running job: %v\n%s", r, buf) - } - }() - j.Run() -} - -// Run the scheduler. this is private just due to the need to synchronize -// access to the 'running' state variable. -func (c *Cron) run() { - // Figure out the next activation times for each entry. - now := c.now() - for _, entry := range c.entries { - entry.Next = entry.Schedule.Next(now) - } - - for { - // Determine the next entry to run. - sort.Sort(byTime(c.entries)) - - var timer *time.Timer - if len(c.entries) == 0 || c.entries[0].Next.IsZero() { - // If there are no entries yet, just sleep - it still handles new entries - // and stop requests. - timer = time.NewTimer(100000 * time.Hour) - } else { - timer = time.NewTimer(c.entries[0].Next.Sub(now)) - } - - for { - select { - case now = <-timer.C: - now = now.In(c.location) - // Run every entry whose next time was less than now - for _, e := range c.entries { - if e.Next.After(now) || e.Next.IsZero() { - break - } - go c.runWithRecovery(e.Job) - e.Prev = e.Next - e.Next = e.Schedule.Next(now) - } - - case newEntry := <-c.add: - timer.Stop() - now = c.now() - newEntry.Next = newEntry.Schedule.Next(now) - c.entries = append(c.entries, newEntry) - - case <-c.snapshot: - c.snapshot <- c.entrySnapshot() - continue - - case <-c.stop: - timer.Stop() - return - } - - break - } - } -} - -// Logs an error to stderr or to the configured error log -func (c *Cron) logf(format string, args ...interface{}) { - if c.ErrorLog != nil { - c.ErrorLog.Printf(format, args...) - } else { - log.Printf(format, args...) - } -} - -// Stop stops the cron scheduler if it is running; otherwise it does nothing. -func (c *Cron) Stop() { - if !c.running { - return - } - c.stop <- struct{}{} - c.running = false -} - -// entrySnapshot returns a copy of the current cron entry list. -func (c *Cron) entrySnapshot() []*Entry { - entries := []*Entry{} - for _, e := range c.entries { - entries = append(entries, &Entry{ - Schedule: e.Schedule, - Next: e.Next, - Prev: e.Prev, - Job: e.Job, - }) - } - return entries -} - -// now returns current time in c location -func (c *Cron) now() time.Time { - return time.Now().In(c.location) -} diff --git a/vendor/github.com/robfig/cron/doc.go b/vendor/github.com/robfig/cron/doc.go deleted file mode 100644 index d02ec2f3b..000000000 --- a/vendor/github.com/robfig/cron/doc.go +++ /dev/null @@ -1,129 +0,0 @@ -/* -Package cron implements a cron spec parser and job runner. - -Usage - -Callers may register Funcs to be invoked on a given schedule. Cron will run -them in their own goroutines. - - c := cron.New() - c.AddFunc("0 30 * * * *", func() { fmt.Println("Every hour on the half hour") }) - c.AddFunc("@hourly", func() { fmt.Println("Every hour") }) - c.AddFunc("@every 1h30m", func() { fmt.Println("Every hour thirty") }) - c.Start() - .. - // Funcs are invoked in their own goroutine, asynchronously. - ... - // Funcs may also be added to a running Cron - c.AddFunc("@daily", func() { fmt.Println("Every day") }) - .. - // Inspect the cron job entries' next and previous run times. - inspect(c.Entries()) - .. - c.Stop() // Stop the scheduler (does not stop any jobs already running). - -CRON Expression Format - -A cron expression represents a set of times, using 6 space-separated fields. - - Field name | Mandatory? | Allowed values | Allowed special characters - ---------- | ---------- | -------------- | -------------------------- - Seconds | Yes | 0-59 | * / , - - Minutes | Yes | 0-59 | * / , - - Hours | Yes | 0-23 | * / , - - Day of month | Yes | 1-31 | * / , - ? - Month | Yes | 1-12 or JAN-DEC | * / , - - Day of week | Yes | 0-6 or SUN-SAT | * / , - ? - -Note: Month and Day-of-week field values are case insensitive. "SUN", "Sun", -and "sun" are equally accepted. - -Special Characters - -Asterisk ( * ) - -The asterisk indicates that the cron expression will match for all values of the -field; e.g., using an asterisk in the 5th field (month) would indicate every -month. - -Slash ( / ) - -Slashes are used to describe increments of ranges. For example 3-59/15 in the -1st field (minutes) would indicate the 3rd minute of the hour and every 15 -minutes thereafter. The form "*\/..." is equivalent to the form "first-last/...", -that is, an increment over the largest possible range of the field. The form -"N/..." is accepted as meaning "N-MAX/...", that is, starting at N, use the -increment until the end of that specific range. It does not wrap around. - -Comma ( , ) - -Commas are used to separate items of a list. For example, using "MON,WED,FRI" in -the 5th field (day of week) would mean Mondays, Wednesdays and Fridays. - -Hyphen ( - ) - -Hyphens are used to define ranges. For example, 9-17 would indicate every -hour between 9am and 5pm inclusive. - -Question mark ( ? ) - -Question mark may be used instead of '*' for leaving either day-of-month or -day-of-week blank. - -Predefined schedules - -You may use one of several pre-defined schedules in place of a cron expression. - - Entry | Description | Equivalent To - ----- | ----------- | ------------- - @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 * - @monthly | Run once a month, midnight, first of month | 0 0 0 1 * * - @weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0 - @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * * - @hourly | Run once an hour, beginning of hour | 0 0 * * * * - -Intervals - -You may also schedule a job to execute at fixed intervals, starting at the time it's added -or cron is run. This is supported by formatting the cron spec like this: - - @every - -where "duration" is a string accepted by time.ParseDuration -(http://golang.org/pkg/time/#ParseDuration). - -For example, "@every 1h30m10s" would indicate a schedule that activates after -1 hour, 30 minutes, 10 seconds, and then every interval after that. - -Note: The interval does not take the job runtime into account. For example, -if a job takes 3 minutes to run, and it is scheduled to run every 5 minutes, -it will have only 2 minutes of idle time between each run. - -Time zones - -All interpretation and scheduling is done in the machine's local time zone (as -provided by the Go time package (http://www.golang.org/pkg/time). - -Be aware that jobs scheduled during daylight-savings leap-ahead transitions will -not be run! - -Thread safety - -Since the Cron service runs concurrently with the calling code, some amount of -care must be taken to ensure proper synchronization. - -All cron methods are designed to be correctly synchronized as long as the caller -ensures that invocations have a clear happens-before ordering between them. - -Implementation - -Cron entries are stored in an array, sorted by their next activation time. Cron -sleeps until the next job is due to be run. - -Upon waking: - - it runs each entry that is active on that second - - it calculates the next run times for the jobs that were run - - it re-sorts the array of entries by next activation time. - - it goes to sleep until the soonest job. -*/ -package cron diff --git a/vendor/github.com/robfig/cron/parser.go b/vendor/github.com/robfig/cron/parser.go deleted file mode 100644 index a5e83c0a8..000000000 --- a/vendor/github.com/robfig/cron/parser.go +++ /dev/null @@ -1,380 +0,0 @@ -package cron - -import ( - "fmt" - "math" - "strconv" - "strings" - "time" -) - -// Configuration options for creating a parser. Most options specify which -// fields should be included, while others enable features. If a field is not -// included the parser will assume a default value. These options do not change -// the order fields are parse in. -type ParseOption int - -const ( - Second ParseOption = 1 << iota // Seconds field, default 0 - Minute // Minutes field, default 0 - Hour // Hours field, default 0 - Dom // Day of month field, default * - Month // Month field, default * - Dow // Day of week field, default * - DowOptional // Optional day of week field, default * - Descriptor // Allow descriptors such as @monthly, @weekly, etc. -) - -var places = []ParseOption{ - Second, - Minute, - Hour, - Dom, - Month, - Dow, -} - -var defaults = []string{ - "0", - "0", - "0", - "*", - "*", - "*", -} - -// A custom Parser that can be configured. -type Parser struct { - options ParseOption - optionals int -} - -// Creates a custom Parser with custom options. -// -// // Standard parser without descriptors -// specParser := NewParser(Minute | Hour | Dom | Month | Dow) -// sched, err := specParser.Parse("0 0 15 */3 *") -// -// // Same as above, just excludes time fields -// subsParser := NewParser(Dom | Month | Dow) -// sched, err := specParser.Parse("15 */3 *") -// -// // Same as above, just makes Dow optional -// subsParser := NewParser(Dom | Month | DowOptional) -// sched, err := specParser.Parse("15 */3") -// -func NewParser(options ParseOption) Parser { - optionals := 0 - if options&DowOptional > 0 { - options |= Dow - optionals++ - } - return Parser{options, optionals} -} - -// Parse returns a new crontab schedule representing the given spec. -// It returns a descriptive error if the spec is not valid. -// It accepts crontab specs and features configured by NewParser. -func (p Parser) Parse(spec string) (Schedule, error) { - if len(spec) == 0 { - return nil, fmt.Errorf("Empty spec string") - } - if spec[0] == '@' && p.options&Descriptor > 0 { - return parseDescriptor(spec) - } - - // Figure out how many fields we need - max := 0 - for _, place := range places { - if p.options&place > 0 { - max++ - } - } - min := max - p.optionals - - // Split fields on whitespace - fields := strings.Fields(spec) - - // Validate number of fields - if count := len(fields); count < min || count > max { - if min == max { - return nil, fmt.Errorf("Expected exactly %d fields, found %d: %s", min, count, spec) - } - return nil, fmt.Errorf("Expected %d to %d fields, found %d: %s", min, max, count, spec) - } - - // Fill in missing fields - fields = expandFields(fields, p.options) - - var err error - field := func(field string, r bounds) uint64 { - if err != nil { - return 0 - } - var bits uint64 - bits, err = getField(field, r) - return bits - } - - var ( - second = field(fields[0], seconds) - minute = field(fields[1], minutes) - hour = field(fields[2], hours) - dayofmonth = field(fields[3], dom) - month = field(fields[4], months) - dayofweek = field(fields[5], dow) - ) - if err != nil { - return nil, err - } - - return &SpecSchedule{ - Second: second, - Minute: minute, - Hour: hour, - Dom: dayofmonth, - Month: month, - Dow: dayofweek, - }, nil -} - -func expandFields(fields []string, options ParseOption) []string { - n := 0 - count := len(fields) - expFields := make([]string, len(places)) - copy(expFields, defaults) - for i, place := range places { - if options&place > 0 { - expFields[i] = fields[n] - n++ - } - if n == count { - break - } - } - return expFields -} - -var standardParser = NewParser( - Minute | Hour | Dom | Month | Dow | Descriptor, -) - -// ParseStandard returns a new crontab schedule representing the given standardSpec -// (https://en.wikipedia.org/wiki/Cron). It differs from Parse requiring to always -// pass 5 entries representing: minute, hour, day of month, month and day of week, -// in that order. It returns a descriptive error if the spec is not valid. -// -// It accepts -// - Standard crontab specs, e.g. "* * * * ?" -// - Descriptors, e.g. "@midnight", "@every 1h30m" -func ParseStandard(standardSpec string) (Schedule, error) { - return standardParser.Parse(standardSpec) -} - -var defaultParser = NewParser( - Second | Minute | Hour | Dom | Month | DowOptional | Descriptor, -) - -// Parse returns a new crontab schedule representing the given spec. -// It returns a descriptive error if the spec is not valid. -// -// It accepts -// - Full crontab specs, e.g. "* * * * * ?" -// - Descriptors, e.g. "@midnight", "@every 1h30m" -func Parse(spec string) (Schedule, error) { - return defaultParser.Parse(spec) -} - -// getField returns an Int with the bits set representing all of the times that -// the field represents or error parsing field value. A "field" is a comma-separated -// list of "ranges". -func getField(field string, r bounds) (uint64, error) { - var bits uint64 - ranges := strings.FieldsFunc(field, func(r rune) bool { return r == ',' }) - for _, expr := range ranges { - bit, err := getRange(expr, r) - if err != nil { - return bits, err - } - bits |= bit - } - return bits, nil -} - -// getRange returns the bits indicated by the given expression: -// number | number "-" number [ "/" number ] -// or error parsing range. -func getRange(expr string, r bounds) (uint64, error) { - var ( - start, end, step uint - rangeAndStep = strings.Split(expr, "/") - lowAndHigh = strings.Split(rangeAndStep[0], "-") - singleDigit = len(lowAndHigh) == 1 - err error - ) - - var extra uint64 - if lowAndHigh[0] == "*" || lowAndHigh[0] == "?" { - start = r.min - end = r.max - extra = starBit - } else { - start, err = parseIntOrName(lowAndHigh[0], r.names) - if err != nil { - return 0, err - } - switch len(lowAndHigh) { - case 1: - end = start - case 2: - end, err = parseIntOrName(lowAndHigh[1], r.names) - if err != nil { - return 0, err - } - default: - return 0, fmt.Errorf("Too many hyphens: %s", expr) - } - } - - switch len(rangeAndStep) { - case 1: - step = 1 - case 2: - step, err = mustParseInt(rangeAndStep[1]) - if err != nil { - return 0, err - } - - // Special handling: "N/step" means "N-max/step". - if singleDigit { - end = r.max - } - default: - return 0, fmt.Errorf("Too many slashes: %s", expr) - } - - if start < r.min { - return 0, fmt.Errorf("Beginning of range (%d) below minimum (%d): %s", start, r.min, expr) - } - if end > r.max { - return 0, fmt.Errorf("End of range (%d) above maximum (%d): %s", end, r.max, expr) - } - if start > end { - return 0, fmt.Errorf("Beginning of range (%d) beyond end of range (%d): %s", start, end, expr) - } - if step == 0 { - return 0, fmt.Errorf("Step of range should be a positive number: %s", expr) - } - - return getBits(start, end, step) | extra, nil -} - -// parseIntOrName returns the (possibly-named) integer contained in expr. -func parseIntOrName(expr string, names map[string]uint) (uint, error) { - if names != nil { - if namedInt, ok := names[strings.ToLower(expr)]; ok { - return namedInt, nil - } - } - return mustParseInt(expr) -} - -// mustParseInt parses the given expression as an int or returns an error. -func mustParseInt(expr string) (uint, error) { - num, err := strconv.Atoi(expr) - if err != nil { - return 0, fmt.Errorf("Failed to parse int from %s: %s", expr, err) - } - if num < 0 { - return 0, fmt.Errorf("Negative number (%d) not allowed: %s", num, expr) - } - - return uint(num), nil -} - -// getBits sets all bits in the range [min, max], modulo the given step size. -func getBits(min, max, step uint) uint64 { - var bits uint64 - - // If step is 1, use shifts. - if step == 1 { - return ^(math.MaxUint64 << (max + 1)) & (math.MaxUint64 << min) - } - - // Else, use a simple loop. - for i := min; i <= max; i += step { - bits |= 1 << i - } - return bits -} - -// all returns all bits within the given bounds. (plus the star bit) -func all(r bounds) uint64 { - return getBits(r.min, r.max, 1) | starBit -} - -// parseDescriptor returns a predefined schedule for the expression, or error if none matches. -func parseDescriptor(descriptor string) (Schedule, error) { - switch descriptor { - case "@yearly", "@annually": - return &SpecSchedule{ - Second: 1 << seconds.min, - Minute: 1 << minutes.min, - Hour: 1 << hours.min, - Dom: 1 << dom.min, - Month: 1 << months.min, - Dow: all(dow), - }, nil - - case "@monthly": - return &SpecSchedule{ - Second: 1 << seconds.min, - Minute: 1 << minutes.min, - Hour: 1 << hours.min, - Dom: 1 << dom.min, - Month: all(months), - Dow: all(dow), - }, nil - - case "@weekly": - return &SpecSchedule{ - Second: 1 << seconds.min, - Minute: 1 << minutes.min, - Hour: 1 << hours.min, - Dom: all(dom), - Month: all(months), - Dow: 1 << dow.min, - }, nil - - case "@daily", "@midnight": - return &SpecSchedule{ - Second: 1 << seconds.min, - Minute: 1 << minutes.min, - Hour: 1 << hours.min, - Dom: all(dom), - Month: all(months), - Dow: all(dow), - }, nil - - case "@hourly": - return &SpecSchedule{ - Second: 1 << seconds.min, - Minute: 1 << minutes.min, - Hour: all(hours), - Dom: all(dom), - Month: all(months), - Dow: all(dow), - }, nil - } - - const every = "@every " - if strings.HasPrefix(descriptor, every) { - duration, err := time.ParseDuration(descriptor[len(every):]) - if err != nil { - return nil, fmt.Errorf("Failed to parse duration %s: %s", descriptor, err) - } - return Every(duration), nil - } - - return nil, fmt.Errorf("Unrecognized descriptor: %s", descriptor) -} diff --git a/vendor/github.com/robfig/cron/spec.go b/vendor/github.com/robfig/cron/spec.go deleted file mode 100644 index aac9a60b9..000000000 --- a/vendor/github.com/robfig/cron/spec.go +++ /dev/null @@ -1,158 +0,0 @@ -package cron - -import "time" - -// SpecSchedule specifies a duty cycle (to the second granularity), based on a -// traditional crontab specification. It is computed initially and stored as bit sets. -type SpecSchedule struct { - Second, Minute, Hour, Dom, Month, Dow uint64 -} - -// bounds provides a range of acceptable values (plus a map of name to value). -type bounds struct { - min, max uint - names map[string]uint -} - -// The bounds for each field. -var ( - seconds = bounds{0, 59, nil} - minutes = bounds{0, 59, nil} - hours = bounds{0, 23, nil} - dom = bounds{1, 31, nil} - months = bounds{1, 12, map[string]uint{ - "jan": 1, - "feb": 2, - "mar": 3, - "apr": 4, - "may": 5, - "jun": 6, - "jul": 7, - "aug": 8, - "sep": 9, - "oct": 10, - "nov": 11, - "dec": 12, - }} - dow = bounds{0, 6, map[string]uint{ - "sun": 0, - "mon": 1, - "tue": 2, - "wed": 3, - "thu": 4, - "fri": 5, - "sat": 6, - }} -) - -const ( - // Set the top bit if a star was included in the expression. - starBit = 1 << 63 -) - -// Next returns the next time this schedule is activated, greater than the given -// time. If no time can be found to satisfy the schedule, return the zero time. -func (s *SpecSchedule) Next(t time.Time) time.Time { - // General approach: - // For Month, Day, Hour, Minute, Second: - // Check if the time value matches. If yes, continue to the next field. - // If the field doesn't match the schedule, then increment the field until it matches. - // While incrementing the field, a wrap-around brings it back to the beginning - // of the field list (since it is necessary to re-verify previous field - // values) - - // Start at the earliest possible time (the upcoming second). - t = t.Add(1*time.Second - time.Duration(t.Nanosecond())*time.Nanosecond) - - // This flag indicates whether a field has been incremented. - added := false - - // If no time is found within five years, return zero. - yearLimit := t.Year() + 5 - -WRAP: - if t.Year() > yearLimit { - return time.Time{} - } - - // Find the first applicable month. - // If it's this month, then do nothing. - for 1< 0 - dowMatch bool = 1< 0 - ) - if s.Dom&starBit > 0 || s.Dow&starBit > 0 { - return domMatch && dowMatch - } - return domMatch || dowMatch -} diff --git a/vendor/google.golang.org/protobuf/encoding/protodelim/protodelim.go b/vendor/google.golang.org/protobuf/encoding/protodelim/protodelim.go deleted file mode 100644 index ec63689e7..000000000 --- a/vendor/google.golang.org/protobuf/encoding/protodelim/protodelim.go +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package protodelim marshals and unmarshals varint size-delimited messages. -package protodelim - -import ( - "bufio" - "encoding/binary" - "fmt" - "io" - "math" - - "google.golang.org/protobuf/encoding/protowire" - "google.golang.org/protobuf/internal/errors" - "google.golang.org/protobuf/proto" -) - -// MarshalOptions is a configurable varint size-delimited marshaler. -type MarshalOptions struct{ proto.MarshalOptions } - -// MarshalTo writes a varint size-delimited wire-format message to w. -// If w returns an error, MarshalTo returns it unchanged. -func (o MarshalOptions) MarshalTo(w io.Writer, m proto.Message) (int, error) { - msgBytes, err := o.MarshalOptions.Marshal(m) - if err != nil { - return 0, err - } - - sizeBytes := protowire.AppendVarint(nil, uint64(len(msgBytes))) - sizeWritten, err := w.Write(sizeBytes) - if err != nil { - return sizeWritten, err - } - msgWritten, err := w.Write(msgBytes) - if err != nil { - return sizeWritten + msgWritten, err - } - return sizeWritten + msgWritten, nil -} - -// MarshalTo writes a varint size-delimited wire-format message to w -// with the default options. -// -// See the documentation for [MarshalOptions.MarshalTo]. -func MarshalTo(w io.Writer, m proto.Message) (int, error) { - return MarshalOptions{}.MarshalTo(w, m) -} - -// UnmarshalOptions is a configurable varint size-delimited unmarshaler. -type UnmarshalOptions struct { - proto.UnmarshalOptions - - // MaxSize is the maximum size in wire-format bytes of a single message. - // Unmarshaling a message larger than MaxSize will return an error. - // A zero MaxSize will default to 4 MiB. - // Setting MaxSize to -1 disables the limit. - MaxSize int64 -} - -const defaultMaxSize = 4 << 20 // 4 MiB, corresponds to the default gRPC max request/response size - -// SizeTooLargeError is an error that is returned when the unmarshaler encounters a message size -// that is larger than its configured [UnmarshalOptions.MaxSize]. -type SizeTooLargeError struct { - // Size is the varint size of the message encountered - // that was larger than the provided MaxSize. - Size uint64 - - // MaxSize is the MaxSize limit configured in UnmarshalOptions, which Size exceeded. - MaxSize uint64 -} - -func (e *SizeTooLargeError) Error() string { - return fmt.Sprintf("message size %d exceeded unmarshaler's maximum configured size %d", e.Size, e.MaxSize) -} - -// Reader is the interface expected by [UnmarshalFrom]. -// It is implemented by *[bufio.Reader]. -type Reader interface { - io.Reader - io.ByteReader -} - -// UnmarshalFrom parses and consumes a varint size-delimited wire-format message -// from r. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -// -// The error is [io.EOF] error only if no bytes are read. -// If an EOF happens after reading some but not all the bytes, -// UnmarshalFrom returns a non-io.EOF error. -// In particular if r returns a non-io.EOF error, UnmarshalFrom returns it unchanged, -// and if only a size is read with no subsequent message, [io.ErrUnexpectedEOF] is returned. -func (o UnmarshalOptions) UnmarshalFrom(r Reader, m proto.Message) error { - var sizeArr [binary.MaxVarintLen64]byte - sizeBuf := sizeArr[:0] - for i := range sizeArr { - b, err := r.ReadByte() - if err != nil { - // Immediate EOF is unexpected. - if err == io.EOF && i != 0 { - break - } - return err - } - sizeBuf = append(sizeBuf, b) - if b < 0x80 { - break - } - } - size, n := protowire.ConsumeVarint(sizeBuf) - if n < 0 { - return protowire.ParseError(n) - } - - maxSize := o.MaxSize - if maxSize == 0 { - maxSize = defaultMaxSize - } - if maxSize == -1 { - // No limit specified: Just check that size fits into an integer, - // otherwise the make([]byte, size) call below will panic. - if size > math.MaxInt { - return errors.Wrap(&SizeTooLargeError{Size: size, MaxSize: math.MaxInt}, "") - } - } else if size > uint64(maxSize) { - return errors.Wrap(&SizeTooLargeError{Size: size, MaxSize: uint64(maxSize)}, "") - } - - var b []byte - var err error - if br, ok := r.(*bufio.Reader); ok { - // Use the []byte from the bufio.Reader instead of having to allocate one. - // This reduces CPU usage and allocated bytes. - b, err = br.Peek(int(size)) - if err == nil { - defer br.Discard(int(size)) - } else { - b = nil - } - } - if b == nil { - b = make([]byte, size) - _, err = io.ReadFull(r, b) - } - - if err == io.EOF { - return io.ErrUnexpectedEOF - } - if err != nil { - return err - } - if err := o.Unmarshal(b, m); err != nil { - return err - } - return nil -} - -// UnmarshalFrom parses and consumes a varint size-delimited wire-format message -// from r with the default options. -// The provided message must be mutable (e.g., a non-nil pointer to a message). -// -// See the documentation for [UnmarshalOptions.UnmarshalFrom]. -func UnmarshalFrom(r Reader, m proto.Message) error { - return UnmarshalOptions{}.UnmarshalFrom(r, m) -} diff --git a/vendor/k8s.io/api/admission/v1/doc.go b/vendor/k8s.io/api/admission/v1/doc.go deleted file mode 100644 index c8be5b235..000000000 --- a/vendor/k8s.io/api/admission/v1/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2019 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=false -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.api.admission.v1 - -// +groupName=admission.k8s.io - -package v1 diff --git a/vendor/k8s.io/api/admission/v1/generated.pb.go b/vendor/k8s.io/api/admission/v1/generated.pb.go deleted file mode 100644 index b9fe1402c..000000000 --- a/vendor/k8s.io/api/admission/v1/generated.pb.go +++ /dev/null @@ -1,1619 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/api/admission/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - "sort" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" - - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" -) - -func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } - -func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } - -func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } - -func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.RequestSubResource) - copy(dAtA[i:], m.RequestSubResource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestSubResource))) - i-- - dAtA[i] = 0x7a - if m.RequestResource != nil { - { - size, err := m.RequestResource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - if m.RequestKind != nil { - { - size, err := m.RequestKind.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - { - size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - if m.DryRun != nil { - i-- - if *m.DryRun { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - { - size, err := m.OldObject.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size, err := m.UserInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - i -= len(m.Operation) - copy(dAtA[i:], m.Operation) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operation))) - i-- - dAtA[i] = 0x3a - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x32 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - i -= len(m.SubResource) - copy(dAtA[i:], m.SubResource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubResource))) - i-- - dAtA[i] = 0x22 - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Kind.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AdmissionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Warnings) > 0 { - for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Warnings[iNdEx]) - copy(dAtA[i:], m.Warnings[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warnings[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AuditAnnotations) > 0 { - keysForAuditAnnotations := make([]string, 0, len(m.AuditAnnotations)) - for k := range m.AuditAnnotations { - keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) - } - sort.Strings(keysForAuditAnnotations) - for iNdEx := len(keysForAuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.AuditAnnotations[string(keysForAuditAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAuditAnnotations[iNdEx]) - copy(dAtA[i:], keysForAuditAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAuditAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if m.PatchType != nil { - i -= len(*m.PatchType) - copy(dAtA[i:], *m.PatchType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PatchType))) - i-- - dAtA[i] = 0x2a - } - if m.Patch != nil { - i -= len(m.Patch) - copy(dAtA[i:], m.Patch) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Patch))) - i-- - dAtA[i] = 0x22 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - i-- - if m.Allowed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AdmissionReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Response != nil { - { - size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AdmissionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Kind.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Resource.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SubResource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operation) - n += 1 + l + sovGenerated(uint64(l)) - l = m.UserInfo.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Object.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.OldObject.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.DryRun != nil { - n += 2 - } - l = m.Options.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.RequestKind != nil { - l = m.RequestKind.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.RequestResource != nil { - l = m.RequestResource.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.RequestSubResource) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *AdmissionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Patch != nil { - l = len(m.Patch) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.PatchType != nil { - l = len(*m.PatchType) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.AuditAnnotations) > 0 { - for k, v := range m.AuditAnnotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Warnings) > 0 { - for _, s := range m.Warnings { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *AdmissionReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Response != nil { - l = m.Response.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AdmissionRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AdmissionRequest{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `Kind:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Kind), "GroupVersionKind", "v1.GroupVersionKind", 1), `&`, ``, 1) + `,`, - `Resource:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resource), "GroupVersionResource", "v1.GroupVersionResource", 1), `&`, ``, 1) + `,`, - `SubResource:` + fmt.Sprintf("%v", this.SubResource) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, - `UserInfo:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UserInfo), "UserInfo", "v11.UserInfo", 1), `&`, ``, 1) + `,`, - `Object:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Object), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `OldObject:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OldObject), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `DryRun:` + valueToStringGenerated(this.DryRun) + `,`, - `Options:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Options), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `RequestKind:` + strings.Replace(fmt.Sprintf("%v", this.RequestKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, - `RequestResource:` + strings.Replace(fmt.Sprintf("%v", this.RequestResource), "GroupVersionResource", "v1.GroupVersionResource", 1) + `,`, - `RequestSubResource:` + fmt.Sprintf("%v", this.RequestSubResource) + `,`, - `}`, - }, "") - return s -} -func (this *AdmissionResponse) String() string { - if this == nil { - return "nil" - } - keysForAuditAnnotations := make([]string, 0, len(this.AuditAnnotations)) - for k := range this.AuditAnnotations { - keysForAuditAnnotations = append(keysForAuditAnnotations, k) - } - sort.Strings(keysForAuditAnnotations) - mapStringForAuditAnnotations := "map[string]string{" - for _, k := range keysForAuditAnnotations { - mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) - } - mapStringForAuditAnnotations += "}" - s := strings.Join([]string{`&AdmissionResponse{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "v1.Status", 1) + `,`, - `Patch:` + valueToStringGenerated(this.Patch) + `,`, - `PatchType:` + valueToStringGenerated(this.PatchType) + `,`, - `AuditAnnotations:` + mapStringForAuditAnnotations + `,`, - `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, - `}`, - }, "") - return s -} -func (this *AdmissionReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AdmissionReview{`, - `Request:` + strings.Replace(this.Request.String(), "AdmissionRequest", "AdmissionRequest", 1) + `,`, - `Response:` + strings.Replace(this.Response.String(), "AdmissionResponse", "AdmissionResponse", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AdmissionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Kind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubResource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubResource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = Operation(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UserInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldObject", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.OldObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.DryRun = &b - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestKind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestKind == nil { - m.RequestKind = &v1.GroupVersionKind{} - } - if err := m.RequestKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestResource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestResource == nil { - m.RequestResource = &v1.GroupVersionResource{} - } - if err := m.RequestResource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestSubResource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestSubResource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdmissionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Allowed = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &v1.Status{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Patch = append(m.Patch[:0], dAtA[iNdEx:postIndex]...) - if m.Patch == nil { - m.Patch = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PatchType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := PatchType(dAtA[iNdEx:postIndex]) - m.PatchType = &s - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuditAnnotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuditAnnotations == nil { - m.AuditAnnotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AuditAnnotations[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdmissionReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &AdmissionRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &AdmissionResponse{} - } - if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/api/admission/v1/generated.proto b/vendor/k8s.io/api/admission/v1/generated.proto deleted file mode 100644 index 38a0fcea6..000000000 --- a/vendor/k8s.io/api/admission/v1/generated.proto +++ /dev/null @@ -1,175 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.api.admission.v1; - -import "k8s.io/api/authentication/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admission/v1"; - -// AdmissionRequest describes the admission.Attributes for the admission request. -message AdmissionRequest { - // uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are - // otherwise identical (parallel requests, requests when earlier requests did not modify etc) - // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - // +optional - optional string uid = 1; - - // kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale) - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2; - - // resource is the fully-qualified resource being requested (for example, v1.pods) - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3; - - // subResource is the subresource being requested, if any (for example, "status" or "scale") - // +optional - optional string subResource = 4; - - // requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). - // If this is specified and differs from the value in "kind", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for), - // and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type for more details. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind requestKind = 13; - - // requestResource is the fully-qualified resource of the original API request (for example, v1.pods). - // If this is specified and differs from the value in "resource", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for), - // and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource requestResource = 14; - - // requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale") - // If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed. - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - optional string requestSubResource = 15; - - // name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and - // rely on the server to generate the name. If that is the case, this field will contain an empty string. - // +optional - optional string name = 5; - - // namespace is the namespace associated with the request (if any). - // +optional - optional string namespace = 6; - - // operation is the operation being performed. This may be different than the operation - // requested. e.g. a patch can result in either a CREATE or UPDATE Operation. - // +optional - optional string operation = 7; - - // userInfo is information about the requesting user - // +optional - optional .k8s.io.api.authentication.v1.UserInfo userInfo = 8; - - // object is the object from the incoming request. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension object = 9; - - // oldObject is the existing object. Only populated for DELETE and UPDATE requests. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; - - // dryRun indicates that modifications will definitely not be persisted for this request. - // Defaults to false. - // +optional - optional bool dryRun = 11; - - // options is the operation option structure of the operation being performed. - // e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be - // different than the options the caller provided. e.g. for a patch request the performed - // Operation might be a CREATE, in which case the Options will a - // `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension options = 12; -} - -// AdmissionResponse describes an admission response. -message AdmissionResponse { - // uid is an identifier for the individual request/response. - // This must be copied over from the corresponding AdmissionRequest. - // +optional - optional string uid = 1; - - // allowed indicates whether or not the admission request was permitted. - // +optional - optional bool allowed = 2; - - // status is the result contains extra details into why an admission request was denied. - // This field IS NOT consulted in any way if "Allowed" is "true". - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3; - - // patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902. - // +optional - optional bytes patch = 4; - - // patchType is the type of Patch. Currently we only allow "JSONPatch". - // +optional - optional string patchType = 5; - - // auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). - // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with - // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by - // the admission webhook to add additional context to the audit log for this request. - // +optional - map auditAnnotations = 6; - - // warnings is a list of warning messages to return to the requesting API client. - // Warning messages describe a problem the client making the API request should correct or be aware of. - // Limit warnings to 120 characters if possible. - // Warnings over 256 characters and large numbers of warnings may be truncated. - // +optional - // +listType=atomic - repeated string warnings = 7; -} - -// AdmissionReview describes an admission review request/response. -message AdmissionReview { - // request describes the attributes for the admission request. - // +optional - optional AdmissionRequest request = 1; - - // response describes the attributes for the admission response. - // +optional - optional AdmissionResponse response = 2; -} - diff --git a/vendor/k8s.io/api/admission/v1/register.go b/vendor/k8s.io/api/admission/v1/register.go deleted file mode 100644 index 79000535c..000000000 --- a/vendor/k8s.io/api/admission/v1/register.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name for this API. -const GroupName = "admission.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. -// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. -var ( - // SchemeBuilder points to a list of functions added to Scheme. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme. - AddToScheme = localSchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &AdmissionReview{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/k8s.io/api/admission/v1/types.go b/vendor/k8s.io/api/admission/v1/types.go deleted file mode 100644 index 34cbf2f59..000000000 --- a/vendor/k8s.io/api/admission/v1/types.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - authenticationv1 "k8s.io/api/authentication/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.19 - -// AdmissionReview describes an admission review request/response. -type AdmissionReview struct { - metav1.TypeMeta `json:",inline"` - // request describes the attributes for the admission request. - // +optional - Request *AdmissionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` - // response describes the attributes for the admission response. - // +optional - Response *AdmissionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` -} - -// AdmissionRequest describes the admission.Attributes for the admission request. -type AdmissionRequest struct { - // uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are - // otherwise identical (parallel requests, requests when earlier requests did not modify etc) - // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - // +optional - UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` - // kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale) - // +optional - Kind metav1.GroupVersionKind `json:"kind" protobuf:"bytes,2,opt,name=kind"` - // resource is the fully-qualified resource being requested (for example, v1.pods) - // +optional - Resource metav1.GroupVersionResource `json:"resource" protobuf:"bytes,3,opt,name=resource"` - // subResource is the subresource being requested, if any (for example, "status" or "scale") - // +optional - SubResource string `json:"subResource,omitempty" protobuf:"bytes,4,opt,name=subResource"` - - // requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). - // If this is specified and differs from the value in "kind", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for), - // and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type for more details. - // +optional - RequestKind *metav1.GroupVersionKind `json:"requestKind,omitempty" protobuf:"bytes,13,opt,name=requestKind"` - // requestResource is the fully-qualified resource of the original API request (for example, v1.pods). - // If this is specified and differs from the value in "resource", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for), - // and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - RequestResource *metav1.GroupVersionResource `json:"requestResource,omitempty" protobuf:"bytes,14,opt,name=requestResource"` - // requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale") - // If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed. - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - RequestSubResource string `json:"requestSubResource,omitempty" protobuf:"bytes,15,opt,name=requestSubResource"` - - // name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and - // rely on the server to generate the name. If that is the case, this field will contain an empty string. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,5,opt,name=name"` - // namespace is the namespace associated with the request (if any). - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,6,opt,name=namespace"` - // operation is the operation being performed. This may be different than the operation - // requested. e.g. a patch can result in either a CREATE or UPDATE Operation. - // +optional - Operation Operation `json:"operation" protobuf:"bytes,7,opt,name=operation"` - // userInfo is information about the requesting user - // +optional - UserInfo authenticationv1.UserInfo `json:"userInfo" protobuf:"bytes,8,opt,name=userInfo"` - // object is the object from the incoming request. - // +optional - Object runtime.RawExtension `json:"object,omitempty" protobuf:"bytes,9,opt,name=object"` - // oldObject is the existing object. Only populated for DELETE and UPDATE requests. - // +optional - OldObject runtime.RawExtension `json:"oldObject,omitempty" protobuf:"bytes,10,opt,name=oldObject"` - // dryRun indicates that modifications will definitely not be persisted for this request. - // Defaults to false. - // +optional - DryRun *bool `json:"dryRun,omitempty" protobuf:"varint,11,opt,name=dryRun"` - // options is the operation option structure of the operation being performed. - // e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be - // different than the options the caller provided. e.g. for a patch request the performed - // Operation might be a CREATE, in which case the Options will a - // `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`. - // +optional - Options runtime.RawExtension `json:"options,omitempty" protobuf:"bytes,12,opt,name=options"` -} - -// AdmissionResponse describes an admission response. -type AdmissionResponse struct { - // uid is an identifier for the individual request/response. - // This must be copied over from the corresponding AdmissionRequest. - // +optional - UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` - - // allowed indicates whether or not the admission request was permitted. - // +optional - Allowed bool `json:"allowed" protobuf:"varint,2,opt,name=allowed"` - - // status is the result contains extra details into why an admission request was denied. - // This field IS NOT consulted in any way if "Allowed" is "true". - // +optional - Result *metav1.Status `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` - - // patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902. - // +optional - Patch []byte `json:"patch,omitempty" protobuf:"bytes,4,opt,name=patch"` - - // patchType is the type of Patch. Currently we only allow "JSONPatch". - // +optional - PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"` - - // auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). - // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with - // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by - // the admission webhook to add additional context to the audit log for this request. - // +optional - AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"` - - // warnings is a list of warning messages to return to the requesting API client. - // Warning messages describe a problem the client making the API request should correct or be aware of. - // Limit warnings to 120 characters if possible. - // Warnings over 256 characters and large numbers of warnings may be truncated. - // +optional - // +listType=atomic - Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` -} - -// PatchType is the type of patch being used to represent the mutated object -type PatchType string - -// PatchType constants. -const ( - PatchTypeJSONPatch PatchType = "JSONPatch" -) - -// Operation is the type of resource operation being checked for admission control -type Operation string - -// Operation constants -const ( - Create Operation = "CREATE" - Update Operation = "UPDATE" - Delete Operation = "DELETE" - Connect Operation = "CONNECT" -) diff --git a/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go deleted file mode 100644 index 0fe90acac..000000000 --- a/vendor/k8s.io/api/admission/v1/types_swagger_doc_generated.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 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 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-codegen.sh - -// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. -var map_AdmissionRequest = map[string]string{ - "": "AdmissionRequest describes the admission.Attributes for the admission request.", - "uid": "uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", - "kind": "kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)", - "resource": "resource is the fully-qualified resource being requested (for example, v1.pods)", - "subResource": "subResource is the subresource being requested, if any (for example, \"status\" or \"scale\")", - "requestKind": "requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). If this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for), and `requestKind: {group:\"apps\", version:\"v1beta1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details.", - "requestResource": "requestResource is the fully-qualified resource of the original API request (for example, v1.pods). If this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for), and `requestResource: {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type.", - "requestSubResource": "requestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\") If this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed. See documentation for the \"matchPolicy\" field in the webhook configuration type.", - "name": "name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this field will contain an empty string.", - "namespace": "namespace is the namespace associated with the request (if any).", - "operation": "operation is the operation being performed. This may be different than the operation requested. e.g. a patch can result in either a CREATE or UPDATE Operation.", - "userInfo": "userInfo is information about the requesting user", - "object": "object is the object from the incoming request.", - "oldObject": "oldObject is the existing object. Only populated for DELETE and UPDATE requests.", - "dryRun": "dryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.", - "options": "options is the operation option structure of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be different than the options the caller provided. e.g. for a patch request the performed Operation might be a CREATE, in which case the Options will a `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.", -} - -func (AdmissionRequest) SwaggerDoc() map[string]string { - return map_AdmissionRequest -} - -var map_AdmissionResponse = map[string]string{ - "": "AdmissionResponse describes an admission response.", - "uid": "uid is an identifier for the individual request/response. This must be copied over from the corresponding AdmissionRequest.", - "allowed": "allowed indicates whether or not the admission request was permitted.", - "status": "status is the result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", - "patch": "patch is the patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", - "patchType": "patchType is the type of Patch. Currently we only allow \"JSONPatch\".", - "auditAnnotations": "auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.", - "warnings": "warnings is a list of warning messages to return to the requesting API client. Warning messages describe a problem the client making the API request should correct or be aware of. Limit warnings to 120 characters if possible. Warnings over 256 characters and large numbers of warnings may be truncated.", -} - -func (AdmissionResponse) SwaggerDoc() map[string]string { - return map_AdmissionResponse -} - -var map_AdmissionReview = map[string]string{ - "": "AdmissionReview describes an admission review request/response.", - "request": "request describes the attributes for the admission request.", - "response": "response describes the attributes for the admission response.", -} - -func (AdmissionReview) SwaggerDoc() map[string]string { - return map_AdmissionReview -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go deleted file mode 100644 index d35688285..000000000 --- a/vendor/k8s.io/api/admission/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AdmissionRequest) DeepCopyInto(out *AdmissionRequest) { - *out = *in - out.Kind = in.Kind - out.Resource = in.Resource - if in.RequestKind != nil { - in, out := &in.RequestKind, &out.RequestKind - *out = new(metav1.GroupVersionKind) - **out = **in - } - if in.RequestResource != nil { - in, out := &in.RequestResource, &out.RequestResource - *out = new(metav1.GroupVersionResource) - **out = **in - } - in.UserInfo.DeepCopyInto(&out.UserInfo) - in.Object.DeepCopyInto(&out.Object) - in.OldObject.DeepCopyInto(&out.OldObject) - if in.DryRun != nil { - in, out := &in.DryRun, &out.DryRun - *out = new(bool) - **out = **in - } - in.Options.DeepCopyInto(&out.Options) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequest. -func (in *AdmissionRequest) DeepCopy() *AdmissionRequest { - if in == nil { - return nil - } - out := new(AdmissionRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { - *out = *in - if in.Result != nil { - in, out := &in.Result, &out.Result - *out = new(metav1.Status) - (*in).DeepCopyInto(*out) - } - if in.Patch != nil { - in, out := &in.Patch, &out.Patch - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.PatchType != nil { - in, out := &in.PatchType, &out.PatchType - *out = new(PatchType) - **out = **in - } - if in.AuditAnnotations != nil { - in, out := &in.AuditAnnotations, &out.AuditAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Warnings != nil { - in, out := &in.Warnings, &out.Warnings - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionResponse. -func (in *AdmissionResponse) DeepCopy() *AdmissionResponse { - if in == nil { - return nil - } - out := new(AdmissionResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = new(AdmissionRequest) - (*in).DeepCopyInto(*out) - } - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(AdmissionResponse) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReview. -func (in *AdmissionReview) DeepCopy() *AdmissionReview { - if in == nil { - return nil - } - out := new(AdmissionReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AdmissionReview) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/k8s.io/api/admission/v1/zz_generated.model_name.go b/vendor/k8s.io/api/admission/v1/zz_generated.model_name.go deleted file mode 100644 index b36acc052..000000000 --- a/vendor/k8s.io/api/admission/v1/zz_generated.model_name.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionRequest) OpenAPIModelName() string { - return "io.k8s.api.admission.v1.AdmissionRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionResponse) OpenAPIModelName() string { - return "io.k8s.api.admission.v1.AdmissionResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionReview) OpenAPIModelName() string { - return "io.k8s.api.admission.v1.AdmissionReview" -} diff --git a/vendor/k8s.io/api/admission/v1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/admission/v1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index ac81d993c..000000000 --- a/vendor/k8s.io/api/admission/v1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,28 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1 - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *AdmissionReview) APILifecycleIntroduced() (major, minor int) { - return 1, 19 -} diff --git a/vendor/k8s.io/api/admission/v1beta1/doc.go b/vendor/k8s.io/api/admission/v1beta1/doc.go deleted file mode 100644 index db856da12..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:openapi-gen=false -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.api.admission.v1beta1 - -// +groupName=admission.k8s.io - -package v1beta1 diff --git a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go b/vendor/k8s.io/api/admission/v1beta1/generated.pb.go deleted file mode 100644 index e8bb2c064..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/generated.pb.go +++ /dev/null @@ -1,1619 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/api/admission/v1beta1/generated.proto - -package v1beta1 - -import ( - fmt "fmt" - - io "io" - "sort" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - - math_bits "math/bits" - reflect "reflect" - strings "strings" - - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" -) - -func (m *AdmissionRequest) Reset() { *m = AdmissionRequest{} } - -func (m *AdmissionResponse) Reset() { *m = AdmissionResponse{} } - -func (m *AdmissionReview) Reset() { *m = AdmissionReview{} } - -func (m *AdmissionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.RequestSubResource) - copy(dAtA[i:], m.RequestSubResource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.RequestSubResource))) - i-- - dAtA[i] = 0x7a - if m.RequestResource != nil { - { - size, err := m.RequestResource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x72 - } - if m.RequestKind != nil { - { - size, err := m.RequestKind.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x6a - } - { - size, err := m.Options.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x62 - if m.DryRun != nil { - i-- - if *m.DryRun { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - { - size, err := m.OldObject.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - { - size, err := m.Object.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - { - size, err := m.UserInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - i -= len(m.Operation) - copy(dAtA[i:], m.Operation) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Operation))) - i-- - dAtA[i] = 0x3a - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0x32 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x2a - i -= len(m.SubResource) - copy(dAtA[i:], m.SubResource) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SubResource))) - i-- - dAtA[i] = 0x22 - { - size, err := m.Resource.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Kind.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AdmissionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Warnings) > 0 { - for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Warnings[iNdEx]) - copy(dAtA[i:], m.Warnings[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Warnings[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AuditAnnotations) > 0 { - keysForAuditAnnotations := make([]string, 0, len(m.AuditAnnotations)) - for k := range m.AuditAnnotations { - keysForAuditAnnotations = append(keysForAuditAnnotations, string(k)) - } - sort.Strings(keysForAuditAnnotations) - for iNdEx := len(keysForAuditAnnotations) - 1; iNdEx >= 0; iNdEx-- { - v := m.AuditAnnotations[string(keysForAuditAnnotations[iNdEx])] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenerated(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(keysForAuditAnnotations[iNdEx]) - copy(dAtA[i:], keysForAuditAnnotations[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForAuditAnnotations[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x32 - } - } - if m.PatchType != nil { - i -= len(*m.PatchType) - copy(dAtA[i:], *m.PatchType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.PatchType))) - i-- - dAtA[i] = 0x2a - } - if m.Patch != nil { - i -= len(m.Patch) - copy(dAtA[i:], m.Patch) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Patch))) - i-- - dAtA[i] = 0x22 - } - if m.Result != nil { - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - i-- - if m.Allowed { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *AdmissionReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AdmissionReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AdmissionReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Response != nil { - { - size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *AdmissionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Kind.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Resource.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.SubResource) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Operation) - n += 1 + l + sovGenerated(uint64(l)) - l = m.UserInfo.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Object.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.OldObject.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.DryRun != nil { - n += 2 - } - l = m.Options.Size() - n += 1 + l + sovGenerated(uint64(l)) - if m.RequestKind != nil { - l = m.RequestKind.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.RequestResource != nil { - l = m.RequestResource.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.RequestSubResource) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *AdmissionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.Result != nil { - l = m.Result.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Patch != nil { - l = len(m.Patch) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.PatchType != nil { - l = len(*m.PatchType) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.AuditAnnotations) > 0 { - for k, v := range m.AuditAnnotations { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + len(v) + sovGenerated(uint64(len(v))) - n += mapEntrySize + 1 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Warnings) > 0 { - for _, s := range m.Warnings { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *AdmissionReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Response != nil { - l = m.Response.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *AdmissionRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AdmissionRequest{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `Kind:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Kind), "GroupVersionKind", "v1.GroupVersionKind", 1), `&`, ``, 1) + `,`, - `Resource:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resource), "GroupVersionResource", "v1.GroupVersionResource", 1), `&`, ``, 1) + `,`, - `SubResource:` + fmt.Sprintf("%v", this.SubResource) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Operation:` + fmt.Sprintf("%v", this.Operation) + `,`, - `UserInfo:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.UserInfo), "UserInfo", "v11.UserInfo", 1), `&`, ``, 1) + `,`, - `Object:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Object), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `OldObject:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.OldObject), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `DryRun:` + valueToStringGenerated(this.DryRun) + `,`, - `Options:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Options), "RawExtension", "runtime.RawExtension", 1), `&`, ``, 1) + `,`, - `RequestKind:` + strings.Replace(fmt.Sprintf("%v", this.RequestKind), "GroupVersionKind", "v1.GroupVersionKind", 1) + `,`, - `RequestResource:` + strings.Replace(fmt.Sprintf("%v", this.RequestResource), "GroupVersionResource", "v1.GroupVersionResource", 1) + `,`, - `RequestSubResource:` + fmt.Sprintf("%v", this.RequestSubResource) + `,`, - `}`, - }, "") - return s -} -func (this *AdmissionResponse) String() string { - if this == nil { - return "nil" - } - keysForAuditAnnotations := make([]string, 0, len(this.AuditAnnotations)) - for k := range this.AuditAnnotations { - keysForAuditAnnotations = append(keysForAuditAnnotations, k) - } - sort.Strings(keysForAuditAnnotations) - mapStringForAuditAnnotations := "map[string]string{" - for _, k := range keysForAuditAnnotations { - mapStringForAuditAnnotations += fmt.Sprintf("%v: %v,", k, this.AuditAnnotations[k]) - } - mapStringForAuditAnnotations += "}" - s := strings.Join([]string{`&AdmissionResponse{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `Allowed:` + fmt.Sprintf("%v", this.Allowed) + `,`, - `Result:` + strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "v1.Status", 1) + `,`, - `Patch:` + valueToStringGenerated(this.Patch) + `,`, - `PatchType:` + valueToStringGenerated(this.PatchType) + `,`, - `AuditAnnotations:` + mapStringForAuditAnnotations + `,`, - `Warnings:` + fmt.Sprintf("%v", this.Warnings) + `,`, - `}`, - }, "") - return s -} -func (this *AdmissionReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&AdmissionReview{`, - `Request:` + strings.Replace(this.Request.String(), "AdmissionRequest", "AdmissionRequest", 1) + `,`, - `Response:` + strings.Replace(this.Response.String(), "AdmissionResponse", "AdmissionResponse", 1) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *AdmissionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Kind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Resource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Resource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SubResource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SubResource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Operation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Operation = Operation(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UserInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.UserInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Object", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Object.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OldObject", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.OldObject.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field DryRun", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.DryRun = &b - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestKind", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestKind == nil { - m.RequestKind = &v1.GroupVersionKind{} - } - if err := m.RequestKind.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestResource", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.RequestResource == nil { - m.RequestResource = &v1.GroupVersionResource{} - } - if err := m.RequestResource.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequestSubResource", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequestSubResource = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdmissionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Allowed", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Allowed = bool(v != 0) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Result == nil { - m.Result = &v1.Status{} - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Patch", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Patch = append(m.Patch[:0], dAtA[iNdEx:postIndex]...) - if m.Patch == nil { - m.Patch = []byte{} - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PatchType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := PatchType(dAtA[iNdEx:postIndex]) - m.PatchType = &s - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AuditAnnotations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AuditAnnotations == nil { - m.AuditAnnotations = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.AuditAnnotations[mapkey] = mapvalue - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Warnings = append(m.Warnings, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *AdmissionReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AdmissionReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AdmissionReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &AdmissionRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &AdmissionResponse{} - } - if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/api/admission/v1beta1/generated.proto b/vendor/k8s.io/api/admission/v1beta1/generated.proto deleted file mode 100644 index 9514719ba..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/generated.proto +++ /dev/null @@ -1,175 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.api.admission.v1beta1; - -import "k8s.io/api/authentication/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/api/admission/v1beta1"; - -// AdmissionRequest describes the admission.Attributes for the admission request. -message AdmissionRequest { - // uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are - // otherwise identical (parallel requests, requests when earlier requests did not modify etc) - // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - // +optional - optional string uid = 1; - - // kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale) - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind kind = 2; - - // resource is the fully-qualified resource being requested (for example, v1.pods) - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource resource = 3; - - // subResource is the subresource being requested, if any (for example, "status" or "scale") - // +optional - optional string subResource = 4; - - // requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). - // If this is specified and differs from the value in "kind", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for), - // and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type for more details. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionKind requestKind = 13; - - // requestResource is the fully-qualified resource of the original API request (for example, v1.pods). - // If this is specified and differs from the value in "resource", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for), - // and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.GroupVersionResource requestResource = 14; - - // requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale") - // If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed. - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - optional string requestSubResource = 15; - - // name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and - // rely on the server to generate the name. If that is the case, this field will contain an empty string. - // +optional - optional string name = 5; - - // namespace is the namespace associated with the request (if any). - // +optional - optional string namespace = 6; - - // operation is the operation being performed. This may be different than the operation - // requested. e.g. a patch can result in either a CREATE or UPDATE Operation. - // +optional - optional string operation = 7; - - // userInfo is information about the requesting user - // +optional - optional .k8s.io.api.authentication.v1.UserInfo userInfo = 8; - - // object is the object from the incoming request. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension object = 9; - - // oldObject is the existing object. Only populated for DELETE and UPDATE requests. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension oldObject = 10; - - // dryRun indicates that modifications will definitely not be persisted for this request. - // Defaults to false. - // +optional - optional bool dryRun = 11; - - // options is the operation option structure of the operation being performed. - // e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be - // different than the options the caller provided. e.g. for a patch request the performed - // Operation might be a CREATE, in which case the Options will a - // `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`. - // +optional - optional .k8s.io.apimachinery.pkg.runtime.RawExtension options = 12; -} - -// AdmissionResponse describes an admission response. -message AdmissionResponse { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding AdmissionRequest. - // +optional - optional string uid = 1; - - // allowed indicates whether or not the admission request was permitted. - // +optional - optional bool allowed = 2; - - // status is the result contains extra details into why an admission request was denied. - // This field IS NOT consulted in any way if "Allowed" is "true". - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status status = 3; - - // patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902. - // +optional - optional bytes patch = 4; - - // patchType is the type of Patch. Currently we only allow "JSONPatch". - // +optional - optional string patchType = 5; - - // auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). - // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with - // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by - // the admission webhook to add additional context to the audit log for this request. - // +optional - map auditAnnotations = 6; - - // warnings is a list of warning messages to return to the requesting API client. - // Warning messages describe a problem the client making the API request should correct or be aware of. - // Limit warnings to 120 characters if possible. - // Warnings over 256 characters and large numbers of warnings may be truncated. - // +optional - // +listType=atomic - repeated string warnings = 7; -} - -// AdmissionReview describes an admission review request/response. -message AdmissionReview { - // request describes the attributes for the admission request. - // +optional - optional AdmissionRequest request = 1; - - // response describes the attributes for the admission response. - // +optional - optional AdmissionResponse response = 2; -} - diff --git a/vendor/k8s.io/api/admission/v1beta1/register.go b/vendor/k8s.io/api/admission/v1beta1/register.go deleted file mode 100644 index 1c53e755d..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/register.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name for this API. -const GroupName = "admission.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -// TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. -// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. -var ( - // SchemeBuilder points to a list of functions added to Scheme. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme. - AddToScheme = localSchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &AdmissionReview{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/k8s.io/api/admission/v1beta1/types.go b/vendor/k8s.io/api/admission/v1beta1/types.go deleted file mode 100644 index 015dc8ba3..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/types.go +++ /dev/null @@ -1,182 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - authenticationv1 "k8s.io/api/authentication/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" -) - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.9 -// +k8s:prerelease-lifecycle-gen:deprecated=1.19 -// This API is never server served. It is used for outbound requests from apiservers. This will ensure it never gets served accidentally -// and having the generator against this group will protect future APIs which may be served. -// +k8s:prerelease-lifecycle-gen:replacement=admission.k8s.io,v1,AdmissionReview - -// AdmissionReview describes an admission review request/response. -type AdmissionReview struct { - metav1.TypeMeta `json:",inline"` - // request describes the attributes for the admission request. - // +optional - Request *AdmissionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` - // response describes the attributes for the admission response. - // +optional - Response *AdmissionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` -} - -// AdmissionRequest describes the admission.Attributes for the admission request. -type AdmissionRequest struct { - // uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are - // otherwise identical (parallel requests, requests when earlier requests did not modify etc) - // The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - // +optional - UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` - // kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale) - // +optional - Kind metav1.GroupVersionKind `json:"kind" protobuf:"bytes,2,opt,name=kind"` - // resource is the fully-qualified resource being requested (for example, v1.pods) - // +optional - Resource metav1.GroupVersionResource `json:"resource" protobuf:"bytes,3,opt,name=resource"` - // subResource is the subresource being requested, if any (for example, "status" or "scale") - // +optional - SubResource string `json:"subResource,omitempty" protobuf:"bytes,4,opt,name=subResource"` - - // requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). - // If this is specified and differs from the value in "kind", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `kind: {group:"apps", version:"v1", kind:"Deployment"}` (matching the rule the webhook registered for), - // and `requestKind: {group:"apps", version:"v1beta1", kind:"Deployment"}` (indicating the kind of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type for more details. - // +optional - RequestKind *metav1.GroupVersionKind `json:"requestKind,omitempty" protobuf:"bytes,13,opt,name=requestKind"` - // requestResource is the fully-qualified resource of the original API request (for example, v1.pods). - // If this is specified and differs from the value in "resource", an equivalent match and conversion was performed. - // - // For example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of - // `apiGroups:["apps"], apiVersions:["v1"], resources: ["deployments"]` and `matchPolicy: Equivalent`, - // an API request to apps/v1beta1 deployments would be converted and sent to the webhook - // with `resource: {group:"apps", version:"v1", resource:"deployments"}` (matching the resource the webhook registered for), - // and `requestResource: {group:"apps", version:"v1beta1", resource:"deployments"}` (indicating the resource of the original API request). - // - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - RequestResource *metav1.GroupVersionResource `json:"requestResource,omitempty" protobuf:"bytes,14,opt,name=requestResource"` - // requestSubResource is the name of the subresource of the original API request, if any (for example, "status" or "scale") - // If this is specified and differs from the value in "subResource", an equivalent match and conversion was performed. - // See documentation for the "matchPolicy" field in the webhook configuration type. - // +optional - RequestSubResource string `json:"requestSubResource,omitempty" protobuf:"bytes,15,opt,name=requestSubResource"` - - // name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and - // rely on the server to generate the name. If that is the case, this field will contain an empty string. - // +optional - Name string `json:"name,omitempty" protobuf:"bytes,5,opt,name=name"` - // namespace is the namespace associated with the request (if any). - // +optional - Namespace string `json:"namespace,omitempty" protobuf:"bytes,6,opt,name=namespace"` - // operation is the operation being performed. This may be different than the operation - // requested. e.g. a patch can result in either a CREATE or UPDATE Operation. - // +optional - Operation Operation `json:"operation" protobuf:"bytes,7,opt,name=operation"` - // userInfo is information about the requesting user - // +optional - UserInfo authenticationv1.UserInfo `json:"userInfo" protobuf:"bytes,8,opt,name=userInfo"` - // object is the object from the incoming request. - // +optional - Object runtime.RawExtension `json:"object,omitempty" protobuf:"bytes,9,opt,name=object"` - // oldObject is the existing object. Only populated for DELETE and UPDATE requests. - // +optional - OldObject runtime.RawExtension `json:"oldObject,omitempty" protobuf:"bytes,10,opt,name=oldObject"` - // dryRun indicates that modifications will definitely not be persisted for this request. - // Defaults to false. - // +optional - DryRun *bool `json:"dryRun,omitempty" protobuf:"varint,11,opt,name=dryRun"` - // options is the operation option structure of the operation being performed. - // e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be - // different than the options the caller provided. e.g. for a patch request the performed - // Operation might be a CREATE, in which case the Options will a - // `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`. - // +optional - Options runtime.RawExtension `json:"options,omitempty" protobuf:"bytes,12,opt,name=options"` -} - -// AdmissionResponse describes an admission response. -type AdmissionResponse struct { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding AdmissionRequest. - // +optional - UID types.UID `json:"uid" protobuf:"bytes,1,opt,name=uid"` - - // allowed indicates whether or not the admission request was permitted. - // +optional - Allowed bool `json:"allowed" protobuf:"varint,2,opt,name=allowed"` - - // status is the result contains extra details into why an admission request was denied. - // This field IS NOT consulted in any way if "Allowed" is "true". - // +optional - Result *metav1.Status `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` - - // patch is the patch body. Currently we only support "JSONPatch" which implements RFC 6902. - // +optional - Patch []byte `json:"patch,omitempty" protobuf:"bytes,4,opt,name=patch"` - - // patchType is the type of Patch. Currently we only allow "JSONPatch". - // +optional - PatchType *PatchType `json:"patchType,omitempty" protobuf:"bytes,5,opt,name=patchType"` - - // auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). - // MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with - // admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by - // the admission webhook to add additional context to the audit log for this request. - // +optional - AuditAnnotations map[string]string `json:"auditAnnotations,omitempty" protobuf:"bytes,6,opt,name=auditAnnotations"` - - // warnings is a list of warning messages to return to the requesting API client. - // Warning messages describe a problem the client making the API request should correct or be aware of. - // Limit warnings to 120 characters if possible. - // Warnings over 256 characters and large numbers of warnings may be truncated. - // +optional - // +listType=atomic - Warnings []string `json:"warnings,omitempty" protobuf:"bytes,7,rep,name=warnings"` -} - -// PatchType is the type of patch being used to represent the mutated object -type PatchType string - -// PatchType constants. -const ( - PatchTypeJSONPatch PatchType = "JSONPatch" -) - -// Operation is the type of resource operation being checked for admission control -type Operation string - -// Operation constants -const ( - Create Operation = "CREATE" - Update Operation = "UPDATE" - Delete Operation = "DELETE" - Connect Operation = "CONNECT" -) diff --git a/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go b/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go deleted file mode 100644 index 25039cf27..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/types_swagger_doc_generated.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 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 v1beta1 - -// 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-codegen.sh - -// AUTO-GENERATED FUNCTIONS START HERE. DO NOT EDIT. -var map_AdmissionRequest = map[string]string{ - "": "AdmissionRequest describes the admission.Attributes for the admission request.", - "uid": "uid is an identifier for the individual request/response. It allows us to distinguish instances of requests which are otherwise identical (parallel requests, requests when earlier requests did not modify etc) The UID is meant to track the round trip (request/response) between the KAS and the WebHook, not the user request. It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging.", - "kind": "kind is the fully-qualified type of object being submitted (for example, v1.Pod or autoscaling.v1.Scale)", - "resource": "resource is the fully-qualified resource being requested (for example, v1.pods)", - "subResource": "subResource is the subresource being requested, if any (for example, \"status\" or \"scale\")", - "requestKind": "requestKind is the fully-qualified type of the original API request (for example, v1.Pod or autoscaling.v1.Scale). If this is specified and differs from the value in \"kind\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `kind: {group:\"apps\", version:\"v1\", kind:\"Deployment\"}` (matching the rule the webhook registered for), and `requestKind: {group:\"apps\", version:\"v1beta1\", kind:\"Deployment\"}` (indicating the kind of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type for more details.", - "requestResource": "requestResource is the fully-qualified resource of the original API request (for example, v1.pods). If this is specified and differs from the value in \"resource\", an equivalent match and conversion was performed.\n\nFor example, if deployments can be modified via apps/v1 and apps/v1beta1, and a webhook registered a rule of `apiGroups:[\"apps\"], apiVersions:[\"v1\"], resources: [\"deployments\"]` and `matchPolicy: Equivalent`, an API request to apps/v1beta1 deployments would be converted and sent to the webhook with `resource: {group:\"apps\", version:\"v1\", resource:\"deployments\"}` (matching the resource the webhook registered for), and `requestResource: {group:\"apps\", version:\"v1beta1\", resource:\"deployments\"}` (indicating the resource of the original API request).\n\nSee documentation for the \"matchPolicy\" field in the webhook configuration type.", - "requestSubResource": "requestSubResource is the name of the subresource of the original API request, if any (for example, \"status\" or \"scale\") If this is specified and differs from the value in \"subResource\", an equivalent match and conversion was performed. See documentation for the \"matchPolicy\" field in the webhook configuration type.", - "name": "name is the name of the object as presented in the request. On a CREATE operation, the client may omit name and rely on the server to generate the name. If that is the case, this field will contain an empty string.", - "namespace": "namespace is the namespace associated with the request (if any).", - "operation": "operation is the operation being performed. This may be different than the operation requested. e.g. a patch can result in either a CREATE or UPDATE Operation.", - "userInfo": "userInfo is information about the requesting user", - "object": "object is the object from the incoming request.", - "oldObject": "oldObject is the existing object. Only populated for DELETE and UPDATE requests.", - "dryRun": "dryRun indicates that modifications will definitely not be persisted for this request. Defaults to false.", - "options": "options is the operation option structure of the operation being performed. e.g. `meta.k8s.io/v1.DeleteOptions` or `meta.k8s.io/v1.CreateOptions`. This may be different than the options the caller provided. e.g. for a patch request the performed Operation might be a CREATE, in which case the Options will a `meta.k8s.io/v1.CreateOptions` even though the caller provided `meta.k8s.io/v1.PatchOptions`.", -} - -func (AdmissionRequest) SwaggerDoc() map[string]string { - return map_AdmissionRequest -} - -var map_AdmissionResponse = map[string]string{ - "": "AdmissionResponse describes an admission response.", - "uid": "uid is an identifier for the individual request/response. This should be copied over from the corresponding AdmissionRequest.", - "allowed": "allowed indicates whether or not the admission request was permitted.", - "status": "status is the result contains extra details into why an admission request was denied. This field IS NOT consulted in any way if \"Allowed\" is \"true\".", - "patch": "patch is the patch body. Currently we only support \"JSONPatch\" which implements RFC 6902.", - "patchType": "patchType is the type of Patch. Currently we only allow \"JSONPatch\".", - "auditAnnotations": "auditAnnotations is an unstructured key value map set by remote admission controller (e.g. error=image-blacklisted). MutatingAdmissionWebhook and ValidatingAdmissionWebhook admission controller will prefix the keys with admission webhook name (e.g. imagepolicy.example.com/error=image-blacklisted). AuditAnnotations will be provided by the admission webhook to add additional context to the audit log for this request.", - "warnings": "warnings is a list of warning messages to return to the requesting API client. Warning messages describe a problem the client making the API request should correct or be aware of. Limit warnings to 120 characters if possible. Warnings over 256 characters and large numbers of warnings may be truncated.", -} - -func (AdmissionResponse) SwaggerDoc() map[string]string { - return map_AdmissionResponse -} - -var map_AdmissionReview = map[string]string{ - "": "AdmissionReview describes an admission review request/response.", - "request": "request describes the attributes for the admission request.", - "response": "response describes the attributes for the admission response.", -} - -func (AdmissionReview) SwaggerDoc() map[string]string { - return map_AdmissionReview -} - -// AUTO-GENERATED FUNCTIONS END HERE diff --git a/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 8234b322f..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,142 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -import ( - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - 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 *AdmissionRequest) DeepCopyInto(out *AdmissionRequest) { - *out = *in - out.Kind = in.Kind - out.Resource = in.Resource - if in.RequestKind != nil { - in, out := &in.RequestKind, &out.RequestKind - *out = new(v1.GroupVersionKind) - **out = **in - } - if in.RequestResource != nil { - in, out := &in.RequestResource, &out.RequestResource - *out = new(v1.GroupVersionResource) - **out = **in - } - in.UserInfo.DeepCopyInto(&out.UserInfo) - in.Object.DeepCopyInto(&out.Object) - in.OldObject.DeepCopyInto(&out.OldObject) - if in.DryRun != nil { - in, out := &in.DryRun, &out.DryRun - *out = new(bool) - **out = **in - } - in.Options.DeepCopyInto(&out.Options) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionRequest. -func (in *AdmissionRequest) DeepCopy() *AdmissionRequest { - if in == nil { - return nil - } - out := new(AdmissionRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionResponse) DeepCopyInto(out *AdmissionResponse) { - *out = *in - if in.Result != nil { - in, out := &in.Result, &out.Result - *out = new(v1.Status) - (*in).DeepCopyInto(*out) - } - if in.Patch != nil { - in, out := &in.Patch, &out.Patch - *out = make([]byte, len(*in)) - copy(*out, *in) - } - if in.PatchType != nil { - in, out := &in.PatchType, &out.PatchType - *out = new(PatchType) - **out = **in - } - if in.AuditAnnotations != nil { - in, out := &in.AuditAnnotations, &out.AuditAnnotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Warnings != nil { - in, out := &in.Warnings, &out.Warnings - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionResponse. -func (in *AdmissionResponse) DeepCopy() *AdmissionResponse { - if in == nil { - return nil - } - out := new(AdmissionResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AdmissionReview) DeepCopyInto(out *AdmissionReview) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = new(AdmissionRequest) - (*in).DeepCopyInto(*out) - } - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(AdmissionResponse) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AdmissionReview. -func (in *AdmissionReview) DeepCopy() *AdmissionReview { - if in == nil { - return nil - } - out := new(AdmissionReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AdmissionReview) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/vendor/k8s.io/api/admission/v1beta1/zz_generated.model_name.go b/vendor/k8s.io/api/admission/v1beta1/zz_generated.model_name.go deleted file mode 100644 index e67adcd71..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/zz_generated.model_name.go +++ /dev/null @@ -1,37 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1beta1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionRequest) OpenAPIModelName() string { - return "io.k8s.api.admission.v1beta1.AdmissionRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionResponse) OpenAPIModelName() string { - return "io.k8s.api.admission.v1beta1.AdmissionResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in AdmissionReview) OpenAPIModelName() string { - return "io.k8s.api.admission.v1beta1.AdmissionReview" -} diff --git a/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index f96e8a443..000000000 --- a/vendor/k8s.io/api/admission/v1beta1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1beta1 - -import ( - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *AdmissionReview) APILifecycleIntroduced() (major, minor int) { - return 1, 9 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *AdmissionReview) APILifecycleDeprecated() (major, minor int) { - return 1, 19 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *AdmissionReview) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "admission.k8s.io", Version: "v1", Kind: "AdmissionReview"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *AdmissionReview) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} diff --git a/vendor/k8s.io/apiextensions-apiserver/LICENSE b/vendor/k8s.io/apiextensions-apiserver/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go deleted file mode 100644 index 52c65ccbe..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/deepcopy.go +++ /dev/null @@ -1,302 +0,0 @@ -/* -Copyright 2017 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 apiextensions - -import "k8s.io/apimachinery/pkg/runtime" - -// TODO: Update this after a tag is created for interface fields in DeepCopy -func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { - if in == nil { - return nil - } - out := new(JSONSchemaProps) - - *out = *in - - if in.Default != nil { - defaultJSON := JSON(runtime.DeepCopyJSONValue(*(in.Default))) - out.Default = &(defaultJSON) - } else { - out.Default = nil - } - - if in.Example != nil { - exampleJSON := JSON(runtime.DeepCopyJSONValue(*(in.Example))) - out.Example = &(exampleJSON) - } else { - out.Example = nil - } - - if in.Ref != nil { - in, out := &in.Ref, &out.Ref - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - - if in.Maximum != nil { - in, out := &in.Maximum, &out.Maximum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.Minimum != nil { - in, out := &in.Minimum, &out.Minimum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.MaxLength != nil { - in, out := &in.MaxLength, &out.MaxLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinLength != nil { - in, out := &in.MinLength, &out.MinLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - if in.MaxItems != nil { - in, out := &in.MaxItems, &out.MaxItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinItems != nil { - in, out := &in.MinItems, &out.MinItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MultipleOf != nil { - in, out := &in.MultipleOf, &out.MultipleOf - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.Enum != nil { - out.Enum = make([]JSON, len(in.Enum)) - for i := range in.Enum { - out.Enum[i] = runtime.DeepCopyJSONValue(in.Enum[i]) - } - } - - if in.MaxProperties != nil { - in, out := &in.MaxProperties, &out.MaxProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinProperties != nil { - in, out := &in.MinProperties, &out.MinProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = make([]string, len(*in)) - copy(*out, *in) - } - - if in.Items != nil { - in, out := &in.Items, &out.Items - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrArray) - (*in).DeepCopyInto(*out) - } - } - - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.Not != nil { - in, out := &in.Not, &out.Not - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } - } - - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.ExternalDocs != nil { - in, out := &in.ExternalDocs, &out.ExternalDocs - if *in == nil { - *out = nil - } else { - *out = new(ExternalDocumentation) - (*in).DeepCopyInto(*out) - } - } - - if in.XPreserveUnknownFields != nil { - in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } - } - - if in.XListMapKeys != nil { - in, out := &in.XListMapKeys, &out.XListMapKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } - - if in.XListType != nil { - in, out := &in.XListType, &out.XListType - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - - if in.XMapType != nil { - in, out := &in.XMapType, &out.XMapType - *out = new(string) - **out = **in - } - - if in.XValidations != nil { - inValidations, outValidations := &in.XValidations, &out.XValidations - *outValidations = make([]ValidationRule, len(*inValidations)) - for i := range *inValidations { - in.XValidations[i].DeepCopyInto(&out.XValidations[i]) - } - } - - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go deleted file mode 100644 index 3f017ff42..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// +k8s:deepcopy-gen=package -// +groupName=apiextensions.k8s.io - -// Package apiextensions is the internal version of the API. -package apiextensions diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go deleted file mode 100644 index 52d6ea866..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/helpers.go +++ /dev/null @@ -1,257 +0,0 @@ -/* -Copyright 2017 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 apiextensions - -import ( - "fmt" - "time" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -var swaggerMetadataDescriptions = metav1.ObjectMeta{}.SwaggerDoc() - -// SetCRDCondition sets the status condition. It either overwrites the existing one or creates a new one. -func SetCRDCondition(crd *CustomResourceDefinition, newCondition CustomResourceDefinitionCondition) { - newCondition.LastTransitionTime = metav1.NewTime(time.Now()) - - existingCondition := FindCRDCondition(crd, newCondition.Type) - if existingCondition == nil { - crd.Status.Conditions = append(crd.Status.Conditions, newCondition) - return - } - - if existingCondition.Status != newCondition.Status || existingCondition.LastTransitionTime.IsZero() { - existingCondition.LastTransitionTime = newCondition.LastTransitionTime - } - - existingCondition.Status = newCondition.Status - existingCondition.Reason = newCondition.Reason - existingCondition.Message = newCondition.Message -} - -// RemoveCRDCondition removes the status condition. -func RemoveCRDCondition(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) { - newConditions := []CustomResourceDefinitionCondition{} - for _, condition := range crd.Status.Conditions { - if condition.Type != conditionType { - newConditions = append(newConditions, condition) - } - } - crd.Status.Conditions = newConditions -} - -// FindCRDCondition returns the condition you're looking for or nil. -func FindCRDCondition(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) *CustomResourceDefinitionCondition { - for i := range crd.Status.Conditions { - if crd.Status.Conditions[i].Type == conditionType { - return &crd.Status.Conditions[i] - } - } - - return nil -} - -// IsCRDConditionTrue indicates if the condition is present and strictly true. -func IsCRDConditionTrue(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) bool { - return IsCRDConditionPresentAndEqual(crd, conditionType, ConditionTrue) -} - -// IsCRDConditionFalse indicates if the condition is present and false. -func IsCRDConditionFalse(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType) bool { - return IsCRDConditionPresentAndEqual(crd, conditionType, ConditionFalse) -} - -// IsCRDConditionPresentAndEqual indicates if the condition is present and equal to the given status. -func IsCRDConditionPresentAndEqual(crd *CustomResourceDefinition, conditionType CustomResourceDefinitionConditionType, status ConditionStatus) bool { - for _, condition := range crd.Status.Conditions { - if condition.Type == conditionType { - return condition.Status == status - } - } - return false -} - -// IsCRDConditionEquivalent returns true if the lhs and rhs are equivalent except for times. -func IsCRDConditionEquivalent(lhs, rhs *CustomResourceDefinitionCondition) bool { - if lhs == nil && rhs == nil { - return true - } - if lhs == nil || rhs == nil { - return false - } - - return lhs.Message == rhs.Message && lhs.Reason == rhs.Reason && lhs.Status == rhs.Status && lhs.Type == rhs.Type -} - -// CRDHasFinalizer returns true if the finalizer is in the list. -func CRDHasFinalizer(crd *CustomResourceDefinition, needle string) bool { - for _, finalizer := range crd.Finalizers { - if finalizer == needle { - return true - } - } - - return false -} - -// CRDRemoveFinalizer removes the finalizer if present. -func CRDRemoveFinalizer(crd *CustomResourceDefinition, needle string) { - newFinalizers := []string{} - for _, finalizer := range crd.Finalizers { - if finalizer != needle { - newFinalizers = append(newFinalizers, finalizer) - } - } - crd.Finalizers = newFinalizers -} - -// HasServedCRDVersion returns true if the given version is in the list of CRD's versions and the Served flag is set. -func HasServedCRDVersion(crd *CustomResourceDefinition, version string) bool { - for _, v := range crd.Spec.Versions { - if v.Name == version { - return v.Served - } - } - return false -} - -// GetCRDStorageVersion returns the storage version for given CRD. -func GetCRDStorageVersion(crd *CustomResourceDefinition) (string, error) { - for _, v := range crd.Spec.Versions { - if v.Storage { - return v.Name, nil - } - } - // This should not happened if crd is valid - return "", fmt.Errorf("invalid CustomResourceDefinition, no storage version") -} - -// IsStoredVersion returns whether the given version is the storage version of the CRD. -func IsStoredVersion(crd *CustomResourceDefinition, version string) bool { - for _, v := range crd.Status.StoredVersions { - if version == v { - return true - } - } - return false -} - -// GetSchemaForVersion returns the validation schema for the given version or nil. -func GetSchemaForVersion(crd *CustomResourceDefinition, version string) (*CustomResourceValidation, error) { - if !HasPerVersionSchema(crd.Spec.Versions) { - return crd.Spec.Validation, nil - } - if crd.Spec.Validation != nil { - return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version schemas must be mutual exclusive", crd.Name, version) - } - for _, v := range crd.Spec.Versions { - if version == v.Name { - return v.Schema, nil - } - } - return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) -} - -// GetSubresourcesForVersion returns the subresources for given version or nil. -func GetSubresourcesForVersion(crd *CustomResourceDefinition, version string) (*CustomResourceSubresources, error) { - if !HasPerVersionSubresources(crd.Spec.Versions) { - return crd.Spec.Subresources, nil - } - if crd.Spec.Subresources != nil { - return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version subresources must be mutual exclusive", crd.Name, version) - } - for _, v := range crd.Spec.Versions { - if version == v.Name { - return v.Subresources, nil - } - } - return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) -} - -// GetColumnsForVersion returns the columns for given version or nil. -// NOTE: the newly logically-defaulted columns is not pointing to the original CRD object. -// One cannot mutate the original CRD columns using the logically-defaulted columns. Please iterate through -// the original CRD object instead. -func GetColumnsForVersion(crd *CustomResourceDefinition, version string) ([]CustomResourceColumnDefinition, error) { - if !HasPerVersionColumns(crd.Spec.Versions) { - return serveDefaultColumnsIfEmpty(crd.Spec.AdditionalPrinterColumns), nil - } - if len(crd.Spec.AdditionalPrinterColumns) > 0 { - return nil, fmt.Errorf("malformed CustomResourceDefinition %s version %s: top-level and per-version additionalPrinterColumns must be mutual exclusive", crd.Name, version) - } - for _, v := range crd.Spec.Versions { - if version == v.Name { - return serveDefaultColumnsIfEmpty(v.AdditionalPrinterColumns), nil - } - } - return nil, fmt.Errorf("version %s not found in CustomResourceDefinition: %v", version, crd.Name) -} - -// HasPerVersionSchema returns true if a CRD uses per-version schema. -func HasPerVersionSchema(versions []CustomResourceDefinitionVersion) bool { - for _, v := range versions { - if v.Schema != nil { - return true - } - } - return false -} - -// HasPerVersionSubresources returns true if a CRD uses per-version subresources. -func HasPerVersionSubresources(versions []CustomResourceDefinitionVersion) bool { - for _, v := range versions { - if v.Subresources != nil { - return true - } - } - return false -} - -// HasPerVersionColumns returns true if a CRD uses per-version columns. -func HasPerVersionColumns(versions []CustomResourceDefinitionVersion) bool { - for _, v := range versions { - if len(v.AdditionalPrinterColumns) > 0 { - return true - } - } - return false -} - -// serveDefaultColumnsIfEmpty applies logically defaulting to columns, if the input columns is empty. -// NOTE: in this way, the newly logically-defaulted columns is not pointing to the original CRD object. -// One cannot mutate the original CRD columns using the logically-defaulted columns. Please iterate through -// the original CRD object instead. -func serveDefaultColumnsIfEmpty(columns []CustomResourceColumnDefinition) []CustomResourceColumnDefinition { - if len(columns) > 0 { - return columns - } - return []CustomResourceColumnDefinition{ - {Name: "Age", Type: "date", Description: swaggerMetadataDescriptions["creationTimestamp"], JSONPath: ".metadata.creationTimestamp"}, - } -} - -// HasVersionServed returns true if given CRD has given version served. -func HasVersionServed(crd *CustomResourceDefinition, version string) bool { - for _, v := range crd.Spec.Versions { - if !v.Served || v.Name != version { - continue - } - return true - } - return false -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/register.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/register.go deleted file mode 100644 index 273f7f123..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/register.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2017 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 apiextensions - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "apiextensions.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CustomResourceDefinition{}, - &CustomResourceDefinitionList{}, - ) - return nil -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go deleted file mode 100644 index 631f55d68..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types.go +++ /dev/null @@ -1,458 +0,0 @@ -/* -Copyright 2017 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 apiextensions - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// ConversionStrategyType describes different conversion types. -type ConversionStrategyType string - -const ( - // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. - NoneConverter ConversionStrategyType = "None" - // WebhookConverter is a converter that calls to an external webhook to convert the CR. - WebhookConverter ConversionStrategyType = "Webhook" -) - -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -type CustomResourceDefinitionSpec struct { - // Group is the group this resource belongs in - Group string - // Version is the version this resource belongs in - // Should be always first item in Versions field if provided. - // Optional, but at least one of Version or Versions must be set. - // Deprecated: Please use `Versions`. - Version string - // Names are the names used to describe this custom resource - Names CustomResourceDefinitionNames - // Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced - Scope ResourceScope - // Validation describes the validation methods for CustomResources - // Optional, the global validation schema for all versions. - // Top-level and per-version schemas are mutually exclusive. - // +optional - Validation *CustomResourceValidation - // Subresources describes the subresources for CustomResource - // Optional, the global subresources for all versions. - // Top-level and per-version subresources are mutually exclusive. - // +optional - Subresources *CustomResourceSubresources - // Versions is the list of all supported versions for this resource. - // If Version field is provided, this field is optional. - // Validation: All versions must use the same validation schema for now. i.e., top - // level Validation field is applied to all of these versions. - // Order: The version name will be used to compute the order. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - Versions []CustomResourceDefinitionVersion - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. - // Optional, the global columns for all versions. - // Top-level and per-version columns are mutually exclusive. - // +optional - AdditionalPrinterColumns []CustomResourceColumnDefinition - // selectableFields specifies paths to fields that may be used as field selectors. - // A maximum of 8 selectable fields are allowed. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // Top-level and per-version columns are mutually exclusive. - // +optional - SelectableFields []SelectableField - - // `conversion` defines conversion settings for the CRD. - Conversion *CustomResourceConversion - - // preserveUnknownFields disables pruning of object fields which are not - // specified in the OpenAPI schema. apiVersion, kind, metadata and known - // fields inside metadata are always preserved. - // Defaults to true in v1beta and will default to false in v1. - PreserveUnknownFields *bool -} - -// CustomResourceConversion describes how to convert different versions of a CR. -type CustomResourceConversion struct { - // `strategy` specifies the conversion strategy. Allowed values are: - // - `None`: The converter only change the apiVersion and would not touch any other field in the CR. - // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false. - Strategy ConversionStrategyType - - // `webhookClientConfig` is the instructions for how to call the webhook if strategy is `Webhook`. - WebhookClientConfig *WebhookClientConfig - - // ConversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. API server will try to use first version in - // the list which it supports. If none of the versions specified in this list - // supported by API server, conversion will fail for this object. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // +optional - ConversionReviewVersions []string -} - -// WebhookClientConfig contains the information to make a TLS -// connection with the webhook. It has the same field as admissionregistration.internal.WebhookClientConfig. -type WebhookClientConfig struct { - // `url` gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - URL *string - - // `service` is a reference to the service for this webhook. Either - // `service` or `url` must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - Service *ServiceReference - - // `caBundle` is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - CABundle []byte -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // `namespace` is the namespace of the service. - // Required - Namespace string - // `name` is the name of the service. - // Required - Name string - - // `path` is an optional URL path which will be sent in any request to - // this service. - // +optional - Path *string - - // If specified, the port on the service that hosting webhook. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port int32 -} - -// CustomResourceDefinitionVersion describes a version for CRD. -type CustomResourceDefinitionVersion struct { - // Name is the version name, e.g. “v1”, “v2beta1”, etc. - Name string - // Served is a flag enabling/disabling this version from being served via REST APIs - Served bool - // Storage flags the version as storage version. There must be exactly one flagged - // as storage version. - Storage bool - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - Deprecated bool - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - DeprecationWarning *string - // Schema describes the schema for CustomResource used in validation, pruning, and defaulting. - // Top-level and per-version schemas are mutually exclusive. - // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead) - // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - // +optional - Schema *CustomResourceValidation - // Subresources describes the subresources for CustomResource - // Top-level and per-version subresources are mutually exclusive. - // Per-version subresources must not all be set to identical values (top-level subresources should be used instead) - // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - // +optional - Subresources *CustomResourceSubresources - // AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. - // Top-level and per-version columns are mutually exclusive. - // Per-version columns must not all be set to identical values (top-level columns should be used instead) - // This field is alpha-level and is only honored by servers that enable the CustomResourceWebhookConversion feature. - // NOTE: CRDs created prior to 1.13 populated the top-level additionalPrinterColumns field by default. To apply an - // update that changes to per-version additionalPrinterColumns, the top-level additionalPrinterColumns field must - // be explicitly set to null - // +optional - AdditionalPrinterColumns []CustomResourceColumnDefinition - - // selectableFields specifies paths to fields that may be used as field selectors. - // A maximum of 8 selectable fields are allowed. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // +optional - SelectableFields []SelectableField -} - -// SelectableField specifies the JSON path of a field that may be used with field selectors. -type SelectableField struct { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - JSONPath string -} - -// CustomResourceColumnDefinition specifies a column for server side printing. -type CustomResourceColumnDefinition struct { - // name is a human readable name for the column. - Name string - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. - Type string - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. - Format string - // description is a human readable description of this column. - Description string - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a higher priority. - Priority int32 - - // JSONPath is a simple JSON path, i.e. without array notation. - JSONPath string -} - -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -type CustomResourceDefinitionNames struct { - // Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration - // too: plural.group and it must be all lowercase. - Plural string - // Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased - Singular string - // ShortNames are short names for the resource. It must be all lowercase. - ShortNames []string - // Kind is the serialized kind of the resource. It is normally CamelCase and singular. - Kind string - // ListKind is the serialized kind of the list for this resource. Defaults to List. - ListKind string - // Categories is a list of grouped resources custom resources belong to (e.g. 'all') - // +optional - Categories []string -} - -// ResourceScope is an enum defining the different scopes available to a custom resource -type ResourceScope string - -const ( - ClusterScoped ResourceScope = "Cluster" - NamespaceScoped ResourceScope = "Namespaced" -) - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type -type CustomResourceDefinitionConditionType string - -const ( - // Established means that the resource has become active. A resource is established when all names are - // accepted without a conflict for the first time. A resource stays established until deleted, even during - // a later NamesAccepted due to changed names. Note that not all names can be changed. - Established CustomResourceDefinitionConditionType = "Established" - // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in - // the group and are therefore accepted. - NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" - // NonStructuralSchema means that one or more OpenAPI schema is not structural. - // - // A schema is structural if it specifies types for all values, with the only exceptions of those with - // - x-kubernetes-int-or-string: true — for fields which can be integer or string - // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values - // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions - // specified under allOf, anyOf, oneOf or not. - // - // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be - // available for non-structural CRDs: - // - pruning - // - defaulting - // - read-only - // - OpenAPI publishing - // - webhook conversion - NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" - // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. - Terminating CustomResourceDefinitionConditionType = "Terminating" - // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs - // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will - // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. - // See https://github.com/kubernetes/enhancements/pull/1111 for more details. - KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" -) - -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -type CustomResourceDefinitionCondition struct { - // Type is the type of the condition. Types include Established, NamesAccepted and Terminating. - Type CustomResourceDefinitionConditionType - // Status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string - // Human-readable message indicating details about last transition. - // +optional - Message string - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 -} - -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -type CustomResourceDefinitionStatus struct { - // Conditions indicate state for particular aspects of a CustomResourceDefinition - // +listType=map - // +listMapKey=type - Conditions []CustomResourceDefinitionCondition - - // AcceptedNames are the names that are actually being used to serve discovery - // They may be different than the names in spec. - AcceptedNames CustomResourceDefinitionNames - - // StoredVersions are all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so the migration controller can first finish a migration to another version (i.e. - // that no old objects are left in the storage), and then remove the rest of the - // versions from this list. - // None of the versions in this list can be removed from the spec.Versions field. - StoredVersions []string - - // The generation observed by the CRD controller. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 -} - -// CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of -// a CustomResourceDefinition -const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -type CustomResourceDefinition struct { - metav1.TypeMeta - metav1.ObjectMeta - - // Spec describes how the user wants the resources to appear - Spec CustomResourceDefinitionSpec - // Status indicates the actual state of the CustomResourceDefinition - Status CustomResourceDefinitionStatus -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -type CustomResourceDefinitionList struct { - metav1.TypeMeta - metav1.ListMeta - - // Items individual CustomResourceDefinitions - Items []CustomResourceDefinition -} - -// CustomResourceValidation is a list of validation methods for CustomResources. -type CustomResourceValidation struct { - // OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. - OpenAPIV3Schema *JSONSchemaProps -} - -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -type CustomResourceSubresources struct { - // Status denotes the status subresource for CustomResources - Status *CustomResourceSubresourceStatus - // Scale denotes the scale subresource for CustomResources - Scale *CustomResourceSubresourceScale -} - -// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. -// Status is represented by the `.status` JSON path inside of a CustomResource. When set, -// * exposes a /status subresource for the custom resource -// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza -// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza -type CustomResourceSubresourceStatus struct{} - -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -type CustomResourceSubresourceScale struct { - // SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under .spec. - // If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET. - SpecReplicasPath string - // StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under .status. - // If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource - // will default to 0. - StatusReplicasPath string - // LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under .status or .spec. - // Must be set to work with HPA. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the CustomResource, the status label selector value in the /scale - // subresource will default to the empty string. - // +optional - LabelSelectorPath *string -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go deleted file mode 100644 index 61efeae69..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/types_jsonschema.go +++ /dev/null @@ -1,318 +0,0 @@ -/* -Copyright 2017 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 apiextensions - -// FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. -// +enum -type FieldValueErrorReason string - -const ( - // FieldValueRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). - FieldValueRequired FieldValueErrorReason = "FieldValueRequired" - // FieldValueDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). - FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" - // FieldValueInvalid is used to report malformed values (e.g. failed regex - // match, too long, out of bounds). - FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" - // FieldValueForbidden is used to report valid (as per formatting rules) - // values which would be accepted under some conditions, but which are not - // permitted by the current conditions (such as security policy). - FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" -) - -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -type JSONSchemaProps struct { - ID string - Schema JSONSchemaURL - Ref *string - Description string - Type string - Nullable bool - Format string - Title string - Default *JSON - Maximum *float64 - ExclusiveMaximum bool - Minimum *float64 - ExclusiveMinimum bool - MaxLength *int64 - MinLength *int64 - Pattern string - MaxItems *int64 - MinItems *int64 - UniqueItems bool - MultipleOf *float64 - Enum []JSON - MaxProperties *int64 - MinProperties *int64 - Required []string - Items *JSONSchemaPropsOrArray - AllOf []JSONSchemaProps - OneOf []JSONSchemaProps - AnyOf []JSONSchemaProps - Not *JSONSchemaProps - Properties map[string]JSONSchemaProps - AdditionalProperties *JSONSchemaPropsOrBool - PatternProperties map[string]JSONSchemaProps - Dependencies JSONSchemaDependencies - AdditionalItems *JSONSchemaPropsOrBool - Definitions JSONSchemaDefinitions - ExternalDocs *ExternalDocumentation - Example *JSON - - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - XPreserveUnknownFields *bool - - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. Both ObjectMeta and TypeMeta - // are validated automatically. x-kubernetes-preserve-unknown-fields - // must be true. - XEmbeddedResource bool - - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - XIntOrString bool - - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - XListMapKeys []string - - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - XListType *string - - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - // +optional - XMapType *string - - // x-kubernetes-validations -kubernetes-validations describes a list of validation rules written in the CEL expression language. - // +patchMergeKey=rule - // +patchStrategy=merge - // +listType=map - // +listMapKey=rule - XValidations ValidationRules -} - -// ValidationRules describes a list of validation rules written in the CEL expression language. -type ValidationRules []ValidationRule - -// ValidationRule describes a validation rule written in the CEL expression language. -type ValidationRule struct { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - // - Rule string - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - Message string - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - // +optional - MessageExpression string - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - // +optional - Reason *FieldValueErrorReason - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - // +optional - FieldPath string - - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - // - // +featureGate=CRDValidationRatcheting - // +optional - OptionalOldSelf *bool -} - -// JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -type JSON interface{} - -// JSONSchemaURL represents a schema url. -type JSONSchemaURL string - -// JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps -// or an array of JSONSchemaProps. Mainly here for serialization purposes. -type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps - JSONSchemas []JSONSchemaProps -} - -// JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. -// Defaults to true for the boolean property. -type JSONSchemaPropsOrBool struct { - Allows bool - Schema *JSONSchemaProps -} - -// JSONSchemaDependencies represent a dependencies property. -type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray - -// JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. -type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps - Property []string -} - -// JSONSchemaDefinitions contains the models explicitly defined in this spec. -type JSONSchemaDefinitions map[string]JSONSchemaProps - -// ExternalDocumentation allows referencing an external resource for extended documentation. -type ExternalDocumentation struct { - Description string - URL string -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions deleted file mode 100644 index 7408dd121..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/.import-restrictions +++ /dev/null @@ -1,5 +0,0 @@ -inverseRules: - # Allow use of this package in all k8s.io packages. - - selectorRegexp: k8s[.]io - allowedPrefixes: - - '' diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go deleted file mode 100644 index 98ee94b19..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/conversion.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - "bytes" - unsafe "unsafe" - - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - apiequality "k8s.io/apimachinery/pkg/api/equality" - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/util/json" -) - -func Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { - if err := autoConvert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in, out, s); err != nil { - return err - } - if in.Default != nil && *(in.Default) == nil { - out.Default = nil - } - if in.Example != nil && *(in.Example) == nil { - out.Example = nil - } - return nil -} - -var nullLiteral = []byte(`null`) - -func Convert_apiextensions_JSON_To_v1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { - raw, err := json.Marshal(*in) - if err != nil { - return err - } - if len(raw) == 0 || bytes.Equal(raw, nullLiteral) { - // match JSON#UnmarshalJSON treatment of literal nulls - out.Raw = nil - } else { - out.Raw = raw - } - return nil -} - -func Convert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { - if in != nil { - var i interface{} - if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) { - if err := json.Unmarshal(in.Raw, &i); err != nil { - return err - } - } - *out = i - } else { - *out = nil - } - return nil -} - -func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { - if err := autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in, out, s); err != nil { - return err - } - - if len(out.Versions) == 0 && len(in.Version) > 0 { - // no versions were specified, and a version name was specified - out.Versions = []CustomResourceDefinitionVersion{{Name: in.Version, Served: true, Storage: true}} - } - - // If spec.{subresources,validation,additionalPrinterColumns,selectableFields} exists, move to versions - if in.Subresources != nil { - subresources := &CustomResourceSubresources{} - if err := Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in.Subresources, subresources, s); err != nil { - return err - } - for i := range out.Versions { - out.Versions[i].Subresources = subresources - } - } - if in.Validation != nil { - schema := &CustomResourceValidation{} - if err := Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(in.Validation, schema, s); err != nil { - return err - } - for i := range out.Versions { - out.Versions[i].Schema = schema - } - } - if in.AdditionalPrinterColumns != nil { - additionalPrinterColumns := make([]CustomResourceColumnDefinition, len(in.AdditionalPrinterColumns)) - for i := range in.AdditionalPrinterColumns { - if err := Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(&in.AdditionalPrinterColumns[i], &additionalPrinterColumns[i], s); err != nil { - return err - } - } - for i := range out.Versions { - out.Versions[i].AdditionalPrinterColumns = additionalPrinterColumns - } - } - if in.SelectableFields != nil { - selectableFields := make([]SelectableField, len(in.SelectableFields)) - for i := range in.SelectableFields { - if err := Convert_apiextensions_SelectableField_To_v1_SelectableField(&in.SelectableFields[i], &selectableFields[i], s); err != nil { - return err - } - } - for i := range out.Versions { - out.Versions[i].SelectableFields = selectableFields - } - } - return nil -} - -func Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { - if err := autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s); err != nil { - return err - } - - if len(out.Versions) == 0 { - return nil - } - - // Copy versions[0] to version - out.Version = out.Versions[0].Name - - // If versions[*].{subresources,schema,additionalPrinterColumns,selectableFields} are identical, move to spec - subresources := out.Versions[0].Subresources - subresourcesIdentical := true - validation := out.Versions[0].Schema - validationIdentical := true - additionalPrinterColumns := out.Versions[0].AdditionalPrinterColumns - additionalPrinterColumnsIdentical := true - selectableFields := out.Versions[0].SelectableFields - selectableFieldsIdentical := true - - // Detect if per-version fields are identical - for _, v := range out.Versions { - if subresourcesIdentical && !apiequality.Semantic.DeepEqual(v.Subresources, subresources) { - subresourcesIdentical = false - } - if validationIdentical && !apiequality.Semantic.DeepEqual(v.Schema, validation) { - validationIdentical = false - } - if additionalPrinterColumnsIdentical && !apiequality.Semantic.DeepEqual(v.AdditionalPrinterColumns, additionalPrinterColumns) { - additionalPrinterColumnsIdentical = false - } - if selectableFieldsIdentical && !apiequality.Semantic.DeepEqual(v.SelectableFields, selectableFields) { - selectableFieldsIdentical = false - } - } - - // If they are, set the top-level fields and clear the per-version fields - if subresourcesIdentical { - out.Subresources = subresources - } - if validationIdentical { - out.Validation = validation - } - if additionalPrinterColumnsIdentical { - out.AdditionalPrinterColumns = additionalPrinterColumns - } - if selectableFieldsIdentical { - out.SelectableFields = selectableFields - } - for i := range out.Versions { - if subresourcesIdentical { - out.Versions[i].Subresources = nil - } - if validationIdentical { - out.Versions[i].Schema = nil - } - if additionalPrinterColumnsIdentical { - out.Versions[i].AdditionalPrinterColumns = nil - } - if selectableFieldsIdentical { - out.Versions[i].SelectableFields = nil - } - } - - return nil -} - -func Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { - if err := autoConvert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in, out, s); err != nil { - return err - } - - out.WebhookClientConfig = nil - out.ConversionReviewVersions = nil - if in.Webhook != nil { - out.ConversionReviewVersions = in.Webhook.ConversionReviewVersions - if in.Webhook.ClientConfig != nil { - out.WebhookClientConfig = &apiextensions.WebhookClientConfig{} - if err := Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in.Webhook.ClientConfig, out.WebhookClientConfig, s); err != nil { - return err - } - } - } - return nil -} - -func Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { - if err := autoConvert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in, out, s); err != nil { - return err - } - - out.Webhook = nil - if in.WebhookClientConfig != nil || in.ConversionReviewVersions != nil { - out.Webhook = &WebhookConversion{} - out.Webhook.ConversionReviewVersions = in.ConversionReviewVersions - if in.WebhookClientConfig != nil { - out.Webhook.ClientConfig = &WebhookClientConfig{} - if err := Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(in.WebhookClientConfig, out.Webhook.ClientConfig, s); err != nil { - return err - } - } - } - return nil -} - -func Convert_apiextensions_ValidationRules_To_v1_ValidationRules(in *apiextensions.ValidationRules, out *ValidationRules, s conversion.Scope) error { - *out = *(*ValidationRules)(unsafe.Pointer(in)) - return nil -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/deepcopy.go deleted file mode 100644 index c548e642d..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/deepcopy.go +++ /dev/null @@ -1,262 +0,0 @@ -/* -Copyright 2019 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 v1 - -// TODO: Update this after a tag is created for interface fields in DeepCopy -func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { - if in == nil { - return nil - } - out := new(JSONSchemaProps) - *out = *in - - if in.Ref != nil { - in, out := &in.Ref, &out.Ref - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - - if in.Maximum != nil { - in, out := &in.Maximum, &out.Maximum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.Minimum != nil { - in, out := &in.Minimum, &out.Minimum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.MaxLength != nil { - in, out := &in.MaxLength, &out.MaxLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinLength != nil { - in, out := &in.MinLength, &out.MinLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - if in.MaxItems != nil { - in, out := &in.MaxItems, &out.MaxItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinItems != nil { - in, out := &in.MinItems, &out.MinItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MultipleOf != nil { - in, out := &in.MultipleOf, &out.MultipleOf - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.MaxProperties != nil { - in, out := &in.MaxProperties, &out.MaxProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinProperties != nil { - in, out := &in.MinProperties, &out.MinProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = make([]string, len(*in)) - copy(*out, *in) - } - - if in.Items != nil { - in, out := &in.Items, &out.Items - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrArray) - (*in).DeepCopyInto(*out) - } - } - - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.Not != nil { - in, out := &in.Not, &out.Not - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } - } - - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.ExternalDocs != nil { - in, out := &in.ExternalDocs, &out.ExternalDocs - if *in == nil { - *out = nil - } else { - *out = new(ExternalDocumentation) - (*in).DeepCopyInto(*out) - } - } - - if in.XPreserveUnknownFields != nil { - in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } - } - - if in.XMapType != nil { - in, out := &in.XMapType, &out.XMapType - *out = new(string) - **out = **in - } - - if in.XValidations != nil { - inValidations, outValidations := &in.XValidations, &out.XValidations - *outValidations = make([]ValidationRule, len(*inValidations)) - for i := range *inValidations { - in.XValidations[i].DeepCopyInto(&out.XValidations[i]) - } - } - - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go deleted file mode 100644 index 629501470..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/defaults.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - "strings" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/ptr" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -func SetDefaults_CustomResourceDefinition(obj *CustomResourceDefinition) { - SetDefaults_CustomResourceDefinitionSpec(&obj.Spec) - if len(obj.Status.StoredVersions) == 0 { - for _, v := range obj.Spec.Versions { - if v.Storage { - obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) - break - } - } - } -} - -func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) { - if len(obj.Names.Singular) == 0 { - obj.Names.Singular = strings.ToLower(obj.Names.Kind) - } - if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { - obj.Names.ListKind = obj.Names.Kind + "List" - } - if obj.Conversion == nil { - obj.Conversion = &CustomResourceConversion{ - Strategy: NoneConverter, - } - } -} - -// SetDefaults_ServiceReference sets defaults for Webhook's ServiceReference -func SetDefaults_ServiceReference(obj *ServiceReference) { - if obj.Port == nil { - obj.Port = ptr.To[int32](443) - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go deleted file mode 100644 index ed2a855d1..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2019 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1 - -// +groupName=apiextensions.k8s.io - -// Package v1 is the v1 version of the API. -package v1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go deleted file mode 100644 index cf9d745a9..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.pb.go +++ /dev/null @@ -1,8738 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto - -package v1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - - io "io" - "sort" - - runtime "k8s.io/apimachinery/pkg/runtime" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" - - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" -) - -func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } - -func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } - -func (m *ConversionReview) Reset() { *m = ConversionReview{} } - -func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } - -func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } - -func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } - -func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } - -func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } - -func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } - -func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } - -func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } - -func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } - -func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } - -func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } - -func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } - -func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } - -func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } - -func (m *JSON) Reset() { *m = JSON{} } - -func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } - -func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } - -func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } - -func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } - -func (m *SelectableField) Reset() { *m = SelectableField{} } - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } - -func (m *ValidationRule) Reset() { *m = ValidationRule{} } - -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } - -func (m *WebhookConversion) Reset() { *m = WebhookConversion{} } - -func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Objects) > 0 { - for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Objects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.DesiredAPIVersion) - copy(dAtA[i:], m.DesiredAPIVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DesiredAPIVersion))) - i-- - dAtA[i] = 0x12 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConversionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ConvertedObjects) > 0 { - for iNdEx := len(m.ConvertedObjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConvertedObjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConversionReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Response != nil { - { - size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceColumnDefinition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceColumnDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceColumnDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.JSONPath) - copy(dAtA[i:], m.JSONPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) - i-- - dAtA[i] = 0x32 - i = encodeVarintGenerated(dAtA, i, uint64(m.Priority)) - i-- - dAtA[i] = 0x28 - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - i -= len(m.Format) - copy(dAtA[i:], m.Format) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Format))) - i-- - dAtA[i] = 0x1a - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceConversion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceConversion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceConversion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Webhook != nil { - { - size, err := m.Webhook.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Strategy) - copy(dAtA[i:], m.Strategy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x30 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionNames) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionNames) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionNames) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Categories) > 0 { - for iNdEx := len(m.Categories) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Categories[iNdEx]) - copy(dAtA[i:], m.Categories[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Categories[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.ListKind) - copy(dAtA[i:], m.ListKind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ListKind))) - i-- - dAtA[i] = 0x2a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x22 - if len(m.ShortNames) > 0 { - for iNdEx := len(m.ShortNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ShortNames[iNdEx]) - copy(dAtA[i:], m.ShortNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShortNames[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.Singular) - copy(dAtA[i:], m.Singular) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Singular))) - i-- - dAtA[i] = 0x12 - i -= len(m.Plural) - copy(dAtA[i:], m.Plural) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Plural))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i-- - if m.PreserveUnknownFields { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - if m.Conversion != nil { - { - size, err := m.Conversion.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.Versions) > 0 { - for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - i -= len(m.Scope) - copy(dAtA[i:], m.Scope) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scope))) - i-- - dAtA[i] = 0x22 - { - size, err := m.Names.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x20 - if len(m.StoredVersions) > 0 { - for iNdEx := len(m.StoredVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StoredVersions[iNdEx]) - copy(dAtA[i:], m.StoredVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoredVersions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.AcceptedNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionVersion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionVersion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SelectableFields) > 0 { - for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.DeprecationWarning != nil { - i -= len(*m.DeprecationWarning) - copy(dAtA[i:], *m.DeprecationWarning) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeprecationWarning))) - i-- - dAtA[i] = 0x42 - } - i-- - if m.Deprecated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - if len(m.AdditionalPrinterColumns) > 0 { - for iNdEx := len(m.AdditionalPrinterColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdditionalPrinterColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Subresources != nil { - { - size, err := m.Subresources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - i-- - if m.Storage { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i-- - if m.Served { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresourceScale) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresourceScale) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresourceScale) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LabelSelectorPath != nil { - i -= len(*m.LabelSelectorPath) - copy(dAtA[i:], *m.LabelSelectorPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LabelSelectorPath))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.StatusReplicasPath) - copy(dAtA[i:], m.StatusReplicasPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StatusReplicasPath))) - i-- - dAtA[i] = 0x12 - i -= len(m.SpecReplicasPath) - copy(dAtA[i:], m.SpecReplicasPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SpecReplicasPath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresourceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresourceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresourceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresources) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresources) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresources) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Scale != nil { - { - size, err := m.Scale.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceValidation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceValidation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceValidation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OpenAPIV3Schema != nil { - { - size, err := m.OpenAPIV3Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExternalDocumentation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExternalDocumentation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExternalDocumentation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) - i-- - dAtA[i] = 0x12 - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *JSON) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSON) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSON) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Raw != nil { - i -= len(m.Raw) - copy(dAtA[i:], m.Raw) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *JSONSchemaProps) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.XValidations) > 0 { - for iNdEx := len(m.XValidations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.XValidations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xe2 - } - } - if m.XMapType != nil { - i -= len(*m.XMapType) - copy(dAtA[i:], *m.XMapType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.XMapType))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xda - } - if m.XListType != nil { - i -= len(*m.XListType) - copy(dAtA[i:], *m.XListType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.XListType))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - if len(m.XListMapKeys) > 0 { - for iNdEx := len(m.XListMapKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.XListMapKeys[iNdEx]) - copy(dAtA[i:], m.XListMapKeys[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.XListMapKeys[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - } - i-- - if m.XIntOrString { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc0 - i-- - if m.XEmbeddedResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb8 - if m.XPreserveUnknownFields != nil { - i-- - if *m.XPreserveUnknownFields { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb0 - } - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa8 - if m.Example != nil { - { - size, err := m.Example.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa2 - } - if m.ExternalDocs != nil { - { - size, err := m.ExternalDocs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if len(m.Definitions) > 0 { - keysForDefinitions := make([]string, 0, len(m.Definitions)) - for k := range m.Definitions { - keysForDefinitions = append(keysForDefinitions, string(k)) - } - sort.Strings(keysForDefinitions) - for iNdEx := len(keysForDefinitions) - 1; iNdEx >= 0; iNdEx-- { - v := m.Definitions[string(keysForDefinitions[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForDefinitions[iNdEx]) - copy(dAtA[i:], keysForDefinitions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDefinitions[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - } - if m.AdditionalItems != nil { - { - size, err := m.AdditionalItems.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - if len(m.Dependencies) > 0 { - keysForDependencies := make([]string, 0, len(m.Dependencies)) - for k := range m.Dependencies { - keysForDependencies = append(keysForDependencies, string(k)) - } - sort.Strings(keysForDependencies) - for iNdEx := len(keysForDependencies) - 1; iNdEx >= 0; iNdEx-- { - v := m.Dependencies[string(keysForDependencies[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForDependencies[iNdEx]) - copy(dAtA[i:], keysForDependencies[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDependencies[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - } - if len(m.PatternProperties) > 0 { - keysForPatternProperties := make([]string, 0, len(m.PatternProperties)) - for k := range m.PatternProperties { - keysForPatternProperties = append(keysForPatternProperties, string(k)) - } - sort.Strings(keysForPatternProperties) - for iNdEx := len(keysForPatternProperties) - 1; iNdEx >= 0; iNdEx-- { - v := m.PatternProperties[string(keysForPatternProperties[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForPatternProperties[iNdEx]) - copy(dAtA[i:], keysForPatternProperties[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForPatternProperties[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - } - if m.AdditionalProperties != nil { - { - size, err := m.AdditionalProperties.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(m.Properties) > 0 { - keysForProperties := make([]string, 0, len(m.Properties)) - for k := range m.Properties { - keysForProperties = append(keysForProperties, string(k)) - } - sort.Strings(keysForProperties) - for iNdEx := len(keysForProperties) - 1; iNdEx >= 0; iNdEx-- { - v := m.Properties[string(keysForProperties[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForProperties[iNdEx]) - copy(dAtA[i:], keysForProperties[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForProperties[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - } - if m.Not != nil { - { - size, err := m.Not.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if len(m.AnyOf) > 0 { - for iNdEx := len(m.AnyOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AnyOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - } - } - if len(m.OneOf) > 0 { - for iNdEx := len(m.OneOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OneOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - } - } - if len(m.AllOf) > 0 { - for iNdEx := len(m.AllOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - } - if m.Items != nil { - { - size, err := m.Items.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(m.Required) > 0 { - for iNdEx := len(m.Required) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Required[iNdEx]) - copy(dAtA[i:], m.Required[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Required[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - } - if m.MinProperties != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinProperties)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if m.MaxProperties != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxProperties)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if len(m.Enum) > 0 { - for iNdEx := len(m.Enum) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Enum[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if m.MultipleOf != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MultipleOf)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x99 - } - i-- - if m.UniqueItems { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - if m.MinItems != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinItems)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.MaxItems != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxItems)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - i -= len(m.Pattern) - copy(dAtA[i:], m.Pattern) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pattern))) - i-- - dAtA[i] = 0x7a - if m.MinLength != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinLength)) - i-- - dAtA[i] = 0x70 - } - if m.MaxLength != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxLength)) - i-- - dAtA[i] = 0x68 - } - i-- - if m.ExclusiveMinimum { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - if m.Minimum != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Minimum)))) - i-- - dAtA[i] = 0x59 - } - i-- - if m.ExclusiveMaximum { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - if m.Maximum != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Maximum)))) - i-- - dAtA[i] = 0x49 - } - if m.Default != nil { - { - size, err := m.Default.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0x3a - i -= len(m.Format) - copy(dAtA[i:], m.Format) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Format))) - i-- - dAtA[i] = 0x32 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x2a - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - if m.Ref != nil { - i -= len(*m.Ref) - copy(dAtA[i:], *m.Ref) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Ref))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schema))) - i-- - dAtA[i] = 0x12 - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrArray) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.JSONSchemas) > 0 { - for iNdEx := len(m.JSONSchemas) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.JSONSchemas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrBool) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrBool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrBool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i-- - if m.Allows { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrStringArray) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrStringArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Property) > 0 { - for iNdEx := len(m.Property) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Property[iNdEx]) - copy(dAtA[i:], m.Property[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Property[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SelectableField) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.JSONPath) - copy(dAtA[i:], m.JSONPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x20 - } - if m.Path != nil { - i -= len(*m.Path) - copy(dAtA[i:], *m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ValidationRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidationRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidationRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OptionalOldSelf != nil { - i-- - if *m.OptionalOldSelf { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - i -= len(m.FieldPath) - copy(dAtA[i:], m.FieldPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath))) - i-- - dAtA[i] = 0x2a - if m.Reason != nil { - i -= len(*m.Reason) - copy(dAtA[i:], *m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) - i-- - dAtA[i] = 0x22 - } - i -= len(m.MessageExpression) - copy(dAtA[i:], m.MessageExpression) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) - i-- - dAtA[i] = 0x1a - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - i -= len(m.Rule) - copy(dAtA[i:], m.Rule) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.URL != nil { - i -= len(*m.URL) - copy(dAtA[i:], *m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) - i-- - dAtA[i] = 0x1a - } - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i-- - dAtA[i] = 0x12 - } - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *WebhookConversion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebhookConversion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebhookConversion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConversionReviewVersions) > 0 { - for iNdEx := len(m.ConversionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConversionReviewVersions[iNdEx]) - copy(dAtA[i:], m.ConversionReviewVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConversionReviewVersions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.ClientConfig != nil { - { - size, err := m.ClientConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ConversionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DesiredAPIVersion) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Objects) > 0 { - for _, e := range m.Objects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ConversionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ConvertedObjects) > 0 { - for _, e := range m.ConvertedObjects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.Result.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConversionReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Response != nil { - l = m.Response.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceColumnDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Format) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Priority)) - l = len(m.JSONPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomResourceConversion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Strategy) - n += 1 + l + sovGenerated(uint64(l)) - if m.Webhook != nil { - l = m.Webhook.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomResourceDefinitionCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - return n -} - -func (m *CustomResourceDefinitionList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinitionNames) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Plural) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Singular) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ShortNames) > 0 { - for _, s := range m.ShortNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ListKind) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Categories) > 0 { - for _, s := range m.Categories { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinitionSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Names.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Scope) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Versions) > 0 { - for _, e := range m.Versions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Conversion != nil { - l = m.Conversion.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - n += 2 - return n -} - -func (m *CustomResourceDefinitionStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.AcceptedNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.StoredVersions) > 0 { - for _, s := range m.StoredVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - return n -} - -func (m *CustomResourceDefinitionVersion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Subresources != nil { - l = m.Subresources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.AdditionalPrinterColumns) > 0 { - for _, e := range m.AdditionalPrinterColumns { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - if m.DeprecationWarning != nil { - l = len(*m.DeprecationWarning) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.SelectableFields) > 0 { - for _, e := range m.SelectableFields { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceSubresourceScale) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpecReplicasPath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.StatusReplicasPath) - n += 1 + l + sovGenerated(uint64(l)) - if m.LabelSelectorPath != nil { - l = len(*m.LabelSelectorPath) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceSubresourceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CustomResourceSubresources) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Scale != nil { - l = m.Scale.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceValidation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OpenAPIV3Schema != nil { - l = m.OpenAPIV3Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ExternalDocumentation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.URL) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JSON) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Raw != nil { - l = len(m.Raw) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *JSONSchemaProps) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Schema) - n += 1 + l + sovGenerated(uint64(l)) - if m.Ref != nil { - l = len(*m.Ref) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Format) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Title) - n += 1 + l + sovGenerated(uint64(l)) - if m.Default != nil { - l = m.Default.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Maximum != nil { - n += 9 - } - n += 2 - if m.Minimum != nil { - n += 9 - } - n += 2 - if m.MaxLength != nil { - n += 1 + sovGenerated(uint64(*m.MaxLength)) - } - if m.MinLength != nil { - n += 1 + sovGenerated(uint64(*m.MinLength)) - } - l = len(m.Pattern) - n += 1 + l + sovGenerated(uint64(l)) - if m.MaxItems != nil { - n += 2 + sovGenerated(uint64(*m.MaxItems)) - } - if m.MinItems != nil { - n += 2 + sovGenerated(uint64(*m.MinItems)) - } - n += 3 - if m.MultipleOf != nil { - n += 10 - } - if len(m.Enum) > 0 { - for _, e := range m.Enum { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.MaxProperties != nil { - n += 2 + sovGenerated(uint64(*m.MaxProperties)) - } - if m.MinProperties != nil { - n += 2 + sovGenerated(uint64(*m.MinProperties)) - } - if len(m.Required) > 0 { - for _, s := range m.Required { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.Items != nil { - l = m.Items.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.AllOf) > 0 { - for _, e := range m.AllOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.OneOf) > 0 { - for _, e := range m.OneOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.AnyOf) > 0 { - for _, e := range m.AnyOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.Not != nil { - l = m.Not.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.Properties) > 0 { - for k, v := range m.Properties { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.AdditionalProperties != nil { - l = m.AdditionalProperties.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.PatternProperties) > 0 { - for k, v := range m.PatternProperties { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Dependencies) > 0 { - for k, v := range m.Dependencies { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.AdditionalItems != nil { - l = m.AdditionalItems.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.Definitions) > 0 { - for k, v := range m.Definitions { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.ExternalDocs != nil { - l = m.ExternalDocs.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if m.Example != nil { - l = m.Example.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - n += 3 - if m.XPreserveUnknownFields != nil { - n += 3 - } - n += 3 - n += 3 - if len(m.XListMapKeys) > 0 { - for _, s := range m.XListMapKeys { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.XListType != nil { - l = len(*m.XListType) - n += 2 + l + sovGenerated(uint64(l)) - } - if m.XMapType != nil { - l = len(*m.XMapType) - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.XValidations) > 0 { - for _, e := range m.XValidations { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JSONSchemaPropsOrArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.JSONSchemas) > 0 { - for _, e := range m.JSONSchemas { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JSONSchemaPropsOrBool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *JSONSchemaPropsOrStringArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Property) > 0 { - for _, s := range m.Property { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SelectableField) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.JSONPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ServiceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Path != nil { - l = len(*m.Path) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func (m *ValidationRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Rule) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.MessageExpression) - n += 1 + l + sovGenerated(uint64(l)) - if m.Reason != nil { - l = len(*m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.FieldPath) - n += 1 + l + sovGenerated(uint64(l)) - if m.OptionalOldSelf != nil { - n += 2 - } - return n -} - -func (m *WebhookClientConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.URL != nil { - l = len(*m.URL) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *WebhookConversion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.ClientConfig != nil { - l = m.ClientConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ConversionReviewVersions) > 0 { - for _, s := range m.ConversionReviewVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ConversionRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForObjects := "[]RawExtension{" - for _, f := range this.Objects { - repeatedStringForObjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForObjects += "}" - s := strings.Join([]string{`&ConversionRequest{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `DesiredAPIVersion:` + fmt.Sprintf("%v", this.DesiredAPIVersion) + `,`, - `Objects:` + repeatedStringForObjects + `,`, - `}`, - }, "") - return s -} -func (this *ConversionResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForConvertedObjects := "[]RawExtension{" - for _, f := range this.ConvertedObjects { - repeatedStringForConvertedObjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConvertedObjects += "}" - s := strings.Join([]string{`&ConversionResponse{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `ConvertedObjects:` + repeatedStringForConvertedObjects + `,`, - `Result:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "v1.Status", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConversionReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConversionReview{`, - `Request:` + strings.Replace(this.Request.String(), "ConversionRequest", "ConversionRequest", 1) + `,`, - `Response:` + strings.Replace(this.Response.String(), "ConversionResponse", "ConversionResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceColumnDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceColumnDefinition{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Format:` + fmt.Sprintf("%v", this.Format) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, - `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceConversion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceConversion{`, - `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, - `Webhook:` + strings.Replace(this.Webhook.String(), "WebhookConversion", "WebhookConversion", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinition{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CustomResourceDefinitionSpec", "CustomResourceDefinitionSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CustomResourceDefinitionStatus", "CustomResourceDefinitionStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinitionCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]CustomResourceDefinition{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinition", "CustomResourceDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&CustomResourceDefinitionList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionNames) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinitionNames{`, - `Plural:` + fmt.Sprintf("%v", this.Plural) + `,`, - `Singular:` + fmt.Sprintf("%v", this.Singular) + `,`, - `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `ListKind:` + fmt.Sprintf("%v", this.ListKind) + `,`, - `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForVersions := "[]CustomResourceDefinitionVersion{" - for _, f := range this.Versions { - repeatedStringForVersions += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinitionVersion", "CustomResourceDefinitionVersion", 1), `&`, ``, 1) + "," - } - repeatedStringForVersions += "}" - s := strings.Join([]string{`&CustomResourceDefinitionSpec{`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Names:` + strings.Replace(strings.Replace(this.Names.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, - `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, - `Versions:` + repeatedStringForVersions + `,`, - `Conversion:` + strings.Replace(this.Conversion.String(), "CustomResourceConversion", "CustomResourceConversion", 1) + `,`, - `PreserveUnknownFields:` + fmt.Sprintf("%v", this.PreserveUnknownFields) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]CustomResourceDefinitionCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinitionCondition", "CustomResourceDefinitionCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&CustomResourceDefinitionStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `AcceptedNames:` + strings.Replace(strings.Replace(this.AcceptedNames.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, - `StoredVersions:` + fmt.Sprintf("%v", this.StoredVersions) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionVersion) String() string { - if this == nil { - return "nil" - } - repeatedStringForAdditionalPrinterColumns := "[]CustomResourceColumnDefinition{" - for _, f := range this.AdditionalPrinterColumns { - repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForAdditionalPrinterColumns += "}" - repeatedStringForSelectableFields := "[]SelectableField{" - for _, f := range this.SelectableFields { - repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectableFields += "}" - s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Served:` + fmt.Sprintf("%v", this.Served) + `,`, - `Storage:` + fmt.Sprintf("%v", this.Storage) + `,`, - `Schema:` + strings.Replace(this.Schema.String(), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, - `Subresources:` + strings.Replace(this.Subresources.String(), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, - `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, - `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, - `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, - `SelectableFields:` + repeatedStringForSelectableFields + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresourceScale) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresourceScale{`, - `SpecReplicasPath:` + fmt.Sprintf("%v", this.SpecReplicasPath) + `,`, - `StatusReplicasPath:` + fmt.Sprintf("%v", this.StatusReplicasPath) + `,`, - `LabelSelectorPath:` + valueToStringGenerated(this.LabelSelectorPath) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresourceStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresourceStatus{`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresources) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresources{`, - `Status:` + strings.Replace(this.Status.String(), "CustomResourceSubresourceStatus", "CustomResourceSubresourceStatus", 1) + `,`, - `Scale:` + strings.Replace(this.Scale.String(), "CustomResourceSubresourceScale", "CustomResourceSubresourceScale", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceValidation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceValidation{`, - `OpenAPIV3Schema:` + strings.Replace(this.OpenAPIV3Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ExternalDocumentation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExternalDocumentation{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `URL:` + fmt.Sprintf("%v", this.URL) + `,`, - `}`, - }, "") - return s -} -func (this *JSON) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSON{`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaProps) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnum := "[]JSON{" - for _, f := range this.Enum { - repeatedStringForEnum += strings.Replace(strings.Replace(f.String(), "JSON", "JSON", 1), `&`, ``, 1) + "," - } - repeatedStringForEnum += "}" - repeatedStringForAllOf := "[]JSONSchemaProps{" - for _, f := range this.AllOf { - repeatedStringForAllOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForAllOf += "}" - repeatedStringForOneOf := "[]JSONSchemaProps{" - for _, f := range this.OneOf { - repeatedStringForOneOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForOneOf += "}" - repeatedStringForAnyOf := "[]JSONSchemaProps{" - for _, f := range this.AnyOf { - repeatedStringForAnyOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForAnyOf += "}" - repeatedStringForXValidations := "[]ValidationRule{" - for _, f := range this.XValidations { - repeatedStringForXValidations += strings.Replace(strings.Replace(f.String(), "ValidationRule", "ValidationRule", 1), `&`, ``, 1) + "," - } - repeatedStringForXValidations += "}" - keysForProperties := make([]string, 0, len(this.Properties)) - for k := range this.Properties { - keysForProperties = append(keysForProperties, k) - } - sort.Strings(keysForProperties) - mapStringForProperties := "map[string]JSONSchemaProps{" - for _, k := range keysForProperties { - mapStringForProperties += fmt.Sprintf("%v: %v,", k, this.Properties[k]) - } - mapStringForProperties += "}" - keysForPatternProperties := make([]string, 0, len(this.PatternProperties)) - for k := range this.PatternProperties { - keysForPatternProperties = append(keysForPatternProperties, k) - } - sort.Strings(keysForPatternProperties) - mapStringForPatternProperties := "map[string]JSONSchemaProps{" - for _, k := range keysForPatternProperties { - mapStringForPatternProperties += fmt.Sprintf("%v: %v,", k, this.PatternProperties[k]) - } - mapStringForPatternProperties += "}" - keysForDependencies := make([]string, 0, len(this.Dependencies)) - for k := range this.Dependencies { - keysForDependencies = append(keysForDependencies, k) - } - sort.Strings(keysForDependencies) - mapStringForDependencies := "JSONSchemaDependencies{" - for _, k := range keysForDependencies { - mapStringForDependencies += fmt.Sprintf("%v: %v,", k, this.Dependencies[k]) - } - mapStringForDependencies += "}" - keysForDefinitions := make([]string, 0, len(this.Definitions)) - for k := range this.Definitions { - keysForDefinitions = append(keysForDefinitions, k) - } - sort.Strings(keysForDefinitions) - mapStringForDefinitions := "JSONSchemaDefinitions{" - for _, k := range keysForDefinitions { - mapStringForDefinitions += fmt.Sprintf("%v: %v,", k, this.Definitions[k]) - } - mapStringForDefinitions += "}" - s := strings.Join([]string{`&JSONSchemaProps{`, - `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `Schema:` + fmt.Sprintf("%v", this.Schema) + `,`, - `Ref:` + valueToStringGenerated(this.Ref) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Format:` + fmt.Sprintf("%v", this.Format) + `,`, - `Title:` + fmt.Sprintf("%v", this.Title) + `,`, - `Default:` + strings.Replace(this.Default.String(), "JSON", "JSON", 1) + `,`, - `Maximum:` + valueToStringGenerated(this.Maximum) + `,`, - `ExclusiveMaximum:` + fmt.Sprintf("%v", this.ExclusiveMaximum) + `,`, - `Minimum:` + valueToStringGenerated(this.Minimum) + `,`, - `ExclusiveMinimum:` + fmt.Sprintf("%v", this.ExclusiveMinimum) + `,`, - `MaxLength:` + valueToStringGenerated(this.MaxLength) + `,`, - `MinLength:` + valueToStringGenerated(this.MinLength) + `,`, - `Pattern:` + fmt.Sprintf("%v", this.Pattern) + `,`, - `MaxItems:` + valueToStringGenerated(this.MaxItems) + `,`, - `MinItems:` + valueToStringGenerated(this.MinItems) + `,`, - `UniqueItems:` + fmt.Sprintf("%v", this.UniqueItems) + `,`, - `MultipleOf:` + valueToStringGenerated(this.MultipleOf) + `,`, - `Enum:` + repeatedStringForEnum + `,`, - `MaxProperties:` + valueToStringGenerated(this.MaxProperties) + `,`, - `MinProperties:` + valueToStringGenerated(this.MinProperties) + `,`, - `Required:` + fmt.Sprintf("%v", this.Required) + `,`, - `Items:` + strings.Replace(this.Items.String(), "JSONSchemaPropsOrArray", "JSONSchemaPropsOrArray", 1) + `,`, - `AllOf:` + repeatedStringForAllOf + `,`, - `OneOf:` + repeatedStringForOneOf + `,`, - `AnyOf:` + repeatedStringForAnyOf + `,`, - `Not:` + strings.Replace(this.Not.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `Properties:` + mapStringForProperties + `,`, - `AdditionalProperties:` + strings.Replace(this.AdditionalProperties.String(), "JSONSchemaPropsOrBool", "JSONSchemaPropsOrBool", 1) + `,`, - `PatternProperties:` + mapStringForPatternProperties + `,`, - `Dependencies:` + mapStringForDependencies + `,`, - `AdditionalItems:` + strings.Replace(this.AdditionalItems.String(), "JSONSchemaPropsOrBool", "JSONSchemaPropsOrBool", 1) + `,`, - `Definitions:` + mapStringForDefinitions + `,`, - `ExternalDocs:` + strings.Replace(this.ExternalDocs.String(), "ExternalDocumentation", "ExternalDocumentation", 1) + `,`, - `Example:` + strings.Replace(this.Example.String(), "JSON", "JSON", 1) + `,`, - `Nullable:` + fmt.Sprintf("%v", this.Nullable) + `,`, - `XPreserveUnknownFields:` + valueToStringGenerated(this.XPreserveUnknownFields) + `,`, - `XEmbeddedResource:` + fmt.Sprintf("%v", this.XEmbeddedResource) + `,`, - `XIntOrString:` + fmt.Sprintf("%v", this.XIntOrString) + `,`, - `XListMapKeys:` + fmt.Sprintf("%v", this.XListMapKeys) + `,`, - `XListType:` + valueToStringGenerated(this.XListType) + `,`, - `XMapType:` + valueToStringGenerated(this.XMapType) + `,`, - `XValidations:` + repeatedStringForXValidations + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrArray) String() string { - if this == nil { - return "nil" - } - repeatedStringForJSONSchemas := "[]JSONSchemaProps{" - for _, f := range this.JSONSchemas { - repeatedStringForJSONSchemas += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForJSONSchemas += "}" - s := strings.Join([]string{`&JSONSchemaPropsOrArray{`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `JSONSchemas:` + repeatedStringForJSONSchemas + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrBool) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSONSchemaPropsOrBool{`, - `Allows:` + fmt.Sprintf("%v", this.Allows) + `,`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrStringArray) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSONSchemaPropsOrStringArray{`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `Property:` + fmt.Sprintf("%v", this.Property) + `,`, - `}`, - }, "") - return s -} -func (this *SelectableField) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SelectableField{`, - `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Path:` + valueToStringGenerated(this.Path) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *ValidationRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValidationRule{`, - `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, - `Reason:` + valueToStringGenerated(this.Reason) + `,`, - `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`, - `OptionalOldSelf:` + valueToStringGenerated(this.OptionalOldSelf) + `,`, - `}`, - }, "") - return s -} -func (this *WebhookClientConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebhookClientConfig{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `URL:` + valueToStringGenerated(this.URL) + `,`, - `}`, - }, "") - return s -} -func (this *WebhookConversion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebhookConversion{`, - `ClientConfig:` + strings.Replace(this.ClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1) + `,`, - `ConversionReviewVersions:` + fmt.Sprintf("%v", this.ConversionReviewVersions) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ConversionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredAPIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DesiredAPIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Objects = append(m.Objects, runtime.RawExtension{}) - if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConversionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConvertedObjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConvertedObjects = append(m.ConvertedObjects, runtime.RawExtension{}) - if err := m.ConvertedObjects[len(m.ConvertedObjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConversionReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &ConversionRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &ConversionResponse{} - } - if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceColumnDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceColumnDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceColumnDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Format = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceConversion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceConversion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceConversion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strategy = ConversionStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Webhook", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Webhook == nil { - m.Webhook = &WebhookConversion{} - } - if err := m.Webhook.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = CustomResourceDefinitionConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CustomResourceDefinition{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plural", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Plural = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Singular", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Singular = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListKind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ListKind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Names.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Versions = append(m.Versions, CustomResourceDefinitionVersion{}) - if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conversion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Conversion == nil { - m.Conversion = &CustomResourceConversion{} - } - if err := m.Conversion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreserveUnknownFields", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.PreserveUnknownFields = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, CustomResourceDefinitionCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptedNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AcceptedNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoredVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoredVersions = append(m.StoredVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Served", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Served = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Storage = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &CustomResourceValidation{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subresources == nil { - m.Subresources = &CustomResourceSubresources{} - } - if err := m.Subresources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalPrinterColumns", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalPrinterColumns = append(m.AdditionalPrinterColumns, CustomResourceColumnDefinition{}) - if err := m.AdditionalPrinterColumns[len(m.AdditionalPrinterColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deprecated = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecationWarning", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.DeprecationWarning = &s - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelectableFields = append(m.SelectableFields, SelectableField{}) - if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresourceScale) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresourceScale: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresourceScale: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpecReplicasPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpecReplicasPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusReplicasPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatusReplicasPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelectorPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.LabelSelectorPath = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresourceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresourceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresourceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresources) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &CustomResourceSubresourceStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scale == nil { - m.Scale = &CustomResourceSubresourceScale{} - } - if err := m.Scale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceValidation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceValidation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceValidation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpenAPIV3Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OpenAPIV3Schema == nil { - m.OpenAPIV3Schema = &JSONSchemaProps{} - } - if err := m.OpenAPIV3Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExternalDocumentation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExternalDocumentation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalDocumentation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSON) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSON: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSON: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaProps) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaProps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaProps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schema = JSONSchemaURL(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Ref = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Format = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Default == nil { - m.Default = &JSON{} - } - if err := m.Default.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Maximum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Maximum = &v2 - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMaximum", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExclusiveMaximum = bool(v != 0) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Minimum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Minimum = &v2 - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMinimum", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExclusiveMinimum = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxLength", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxLength = &v - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinLength", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinLength = &v - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pattern", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxItems", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxItems = &v - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinItems", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinItems = &v - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UniqueItems", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UniqueItems = bool(v != 0) - case 19: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MultipleOf", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.MultipleOf = &v2 - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Enum = append(m.Enum, JSON{}) - if err := m.Enum[len(m.Enum)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxProperties", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxProperties = &v - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinProperties", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinProperties = &v - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Required = append(m.Required, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Items == nil { - m.Items = &JSONSchemaPropsOrArray{} - } - if err := m.Items.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllOf = append(m.AllOf, JSONSchemaProps{}) - if err := m.AllOf[len(m.AllOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OneOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OneOf = append(m.OneOf, JSONSchemaProps{}) - if err := m.OneOf[len(m.OneOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AnyOf = append(m.AnyOf, JSONSchemaProps{}) - if err := m.AnyOf[len(m.AnyOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Not", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Not == nil { - m.Not = &JSONSchemaProps{} - } - if err := m.Not.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Properties == nil { - m.Properties = make(map[string]JSONSchemaProps) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Properties[mapkey] = *mapvalue - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalProperties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AdditionalProperties == nil { - m.AdditionalProperties = &JSONSchemaPropsOrBool{} - } - if err := m.AdditionalProperties.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PatternProperties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PatternProperties == nil { - m.PatternProperties = make(map[string]JSONSchemaProps) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PatternProperties[mapkey] = *mapvalue - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dependencies == nil { - m.Dependencies = make(JSONSchemaDependencies) - } - var mapkey string - mapvalue := &JSONSchemaPropsOrStringArray{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaPropsOrStringArray{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Dependencies[mapkey] = *mapvalue - iNdEx = postIndex - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalItems", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AdditionalItems == nil { - m.AdditionalItems = &JSONSchemaPropsOrBool{} - } - if err := m.AdditionalItems.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Definitions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Definitions == nil { - m.Definitions = make(JSONSchemaDefinitions) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Definitions[mapkey] = *mapvalue - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalDocs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExternalDocs == nil { - m.ExternalDocs = &ExternalDocumentation{} - } - if err := m.ExternalDocs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Example", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Example == nil { - m.Example = &JSON{} - } - if err := m.Example.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Nullable = bool(v != 0) - case 38: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XPreserveUnknownFields", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.XPreserveUnknownFields = &b - case 39: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XEmbeddedResource", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XEmbeddedResource = bool(v != 0) - case 40: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XIntOrString", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XIntOrString = bool(v != 0) - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XListMapKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.XListMapKeys = append(m.XListMapKeys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XListType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.XListType = &s - iNdEx = postIndex - case 43: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XMapType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.XMapType = &s - iNdEx = postIndex - case 44: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XValidations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.XValidations = append(m.XValidations, ValidationRule{}) - if err := m.XValidations[len(m.XValidations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrArray) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONSchemas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONSchemas = append(m.JSONSchemas, JSONSchemaProps{}) - if err := m.JSONSchemas[len(m.JSONSchemas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrBool) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrBool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrBool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Allows", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Allows = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = append(m.Property, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SelectableField) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Path = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidationRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidationRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidationRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rule = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MessageExpression = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := FieldValueErrorReason(dAtA[iNdEx:postIndex]) - m.Reason = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalOldSelf", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.OptionalOldSelf = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebhookClientConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebhookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.URL = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebhookConversion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebhookConversion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebhookConversion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ClientConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ClientConfig == nil { - m.ClientConfig = &WebhookClientConfig{} - } - if err := m.ClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConversionReviewVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConversionReviewVersions = append(m.ConversionReviewVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto deleted file mode 100644 index 83b50127c..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/generated.proto +++ /dev/null @@ -1,841 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1"; - -// ConversionRequest describes the conversion request parameters. -message ConversionRequest { - // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are - // otherwise identical (parallel requests, etc). - // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - optional string uid = 1; - - // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" - optional string desiredAPIVersion = 2; - - // objects is the list of custom resource objects to be converted. - // +listType=atomic - repeated .k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; -} - -// ConversionResponse describes a conversion response. -message ConversionResponse { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding `request.uid`. - optional string uid = 1; - - // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. - // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list - // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). - // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. - // +listType=atomic - repeated .k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; - - // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if - // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the - // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set - // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` - // will be used to construct an error message for the end user. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status result = 3; -} - -// ConversionReview describes a conversion request/response. -message ConversionReview { - // request describes the attributes for the conversion request. - // +optional - optional ConversionRequest request = 1; - - // response describes the attributes for the conversion response. - // +optional - optional ConversionResponse response = 2; -} - -// CustomResourceColumnDefinition specifies a column for server side printing. -message CustomResourceColumnDefinition { - // name is a human readable name for the column. - optional string name = 1; - - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - optional string type = 2; - - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - // +optional - optional string format = 3; - - // description is a human readable description of this column. - // +optional - optional string description = 4; - - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - // +optional - optional int32 priority = 5; - - // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - optional string jsonPath = 6; -} - -// CustomResourceConversion describes how to convert different versions of a CR. -message CustomResourceConversion { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. - optional string strategy = 1; - - // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`. - // +optional - optional WebhookConversion webhook = 2; -} - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -message CustomResourceDefinition { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec describes how the user wants the resources to appear - optional CustomResourceDefinitionSpec spec = 2; - - // status indicates the actual state of the CustomResourceDefinition - // +optional - optional CustomResourceDefinitionStatus status = 3; -} - -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -message CustomResourceDefinitionCondition { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - optional string type = 1; - - // status is the status of the condition. - // Can be True, False, Unknown. - optional string status = 2; - - // lastTransitionTime last time the condition transitioned from one status to another. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - optional string reason = 4; - - // message is a human-readable message indicating details about last transition. - // +optional - optional string message = 5; - - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +featureGate=CRDObservedGenerationTracking - // +optional - optional int64 observedGeneration = 6; -} - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -message CustomResourceDefinitionList { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items list individual CustomResourceDefinition objects - repeated CustomResourceDefinition items = 2; -} - -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -message CustomResourceDefinitionNames { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - optional string plural = 1; - - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - // +optional - optional string singular = 2; - - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - // +optional - // +listType=atomic - repeated string shortNames = 3; - - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - optional string kind = 4; - - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - // +optional - optional string listKind = 5; - - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - // +optional - // +listType=atomic - repeated string categories = 6; -} - -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -message CustomResourceDefinitionSpec { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - optional string group = 1; - - // names specify the resource and kind names for the custom resource. - optional CustomResourceDefinitionNames names = 3; - - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. - optional string scope = 4; - - // versions is the list of all API versions of the defined custom resource. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - // +listType=atomic - repeated CustomResourceDefinitionVersion versions = 7; - - // conversion defines conversion settings for the CRD. - // +optional - optional CustomResourceConversion conversion = 9; - - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - // +optional - optional bool preserveUnknownFields = 10; -} - -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -message CustomResourceDefinitionStatus { - // conditions indicate state for particular aspects of a CustomResourceDefinition - // +optional - // +listType=map - // +listMapKey=type - repeated CustomResourceDefinitionCondition conditions = 1; - - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - // +optional - optional CustomResourceDefinitionNames acceptedNames = 2; - - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - // +optional - // +listType=atomic - repeated string storedVersions = 3; - - // The generation observed by the CRD controller. - // +featureGate=CRDObservedGenerationTracking - // +optional - optional int64 observedGeneration = 4; -} - -// CustomResourceDefinitionVersion describes a version for CRD. -message CustomResourceDefinitionVersion { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - optional string name = 1; - - // served is a flag enabling/disabling this version from being served via REST APIs - optional bool served = 2; - - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - optional bool storage = 3; - - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - // +optional - optional bool deprecated = 7; - - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - // +optional - optional string deprecationWarning = 8; - - // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. - // +optional - optional CustomResourceValidation schema = 4; - - // subresources specify what subresources this version of the defined custom resource have. - // +optional - optional CustomResourceSubresources subresources = 5; - - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If no columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; - - // selectableFields specifies paths to fields that may be used as field selectors. - // A maximum of 8 selectable fields are allowed. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - repeated SelectableField selectableFields = 9; -} - -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -message CustomResourceSubresourceScale { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - optional string specReplicasPath = 1; - - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - optional string statusReplicasPath = 2; - - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - // +optional - optional string labelSelectorPath = 3; -} - -// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. -// Status is represented by the `.status` JSON path inside of a CustomResource. When set, -// * exposes a /status subresource for the custom resource -// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza -// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza -message CustomResourceSubresourceStatus { -} - -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -message CustomResourceSubresources { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - // +optional - optional CustomResourceSubresourceStatus status = 1; - - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - // +optional - optional CustomResourceSubresourceScale scale = 2; -} - -// CustomResourceValidation is a list of validation methods for CustomResources. -message CustomResourceValidation { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - // +optional - optional JSONSchemaProps openAPIV3Schema = 1; -} - -// ExternalDocumentation allows referencing an external resource for extended documentation. -message ExternalDocumentation { - optional string description = 1; - - optional string url = 2; -} - -// JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -message JSON { - optional bytes raw = 1; -} - -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -message JSONSchemaProps { - optional string id = 1; - - optional string schema = 2; - - optional string ref = 3; - - optional string description = 4; - - optional string type = 5; - - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - optional string format = 6; - - optional string title = 7; - - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // Defaulting requires spec.preserveUnknownFields to be false. - optional JSON default = 8; - - optional double maximum = 9; - - optional bool exclusiveMaximum = 10; - - optional double minimum = 11; - - optional bool exclusiveMinimum = 12; - - optional int64 maxLength = 13; - - optional int64 minLength = 14; - - optional string pattern = 15; - - optional int64 maxItems = 16; - - optional int64 minItems = 17; - - optional bool uniqueItems = 18; - - optional double multipleOf = 19; - - // +listType=atomic - repeated JSON enum = 20; - - optional int64 maxProperties = 21; - - optional int64 minProperties = 22; - - // +listType=atomic - repeated string required = 23; - - optional JSONSchemaPropsOrArray items = 24; - - // +listType=atomic - repeated JSONSchemaProps allOf = 25; - - // +listType=atomic - repeated JSONSchemaProps oneOf = 26; - - // +listType=atomic - repeated JSONSchemaProps anyOf = 27; - - optional JSONSchemaProps not = 28; - - map properties = 29; - - optional JSONSchemaPropsOrBool additionalProperties = 30; - - map patternProperties = 31; - - map dependencies = 32; - - optional JSONSchemaPropsOrBool additionalItems = 33; - - map definitions = 34; - - optional ExternalDocumentation externalDocs = 35; - - optional JSON example = 36; - - optional bool nullable = 37; - - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - optional bool xKubernetesPreserveUnknownFields = 38; - - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - optional bool xKubernetesEmbeddedResource = 39; - - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - optional bool xKubernetesIntOrString = 40; - - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - // - // +optional - // +listType=atomic - repeated string xKubernetesListMapKeys = 41; - - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - // +optional - optional string xKubernetesListType = 42; - - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - // +optional - optional string xKubernetesMapType = 43; - - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // +patchMergeKey=rule - // +patchStrategy=merge - // +listType=map - // +listMapKey=rule - repeated ValidationRule xKubernetesValidations = 44; -} - -// JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps -// or an array of JSONSchemaProps. Mainly here for serialization purposes. -message JSONSchemaPropsOrArray { - optional JSONSchemaProps schema = 1; - - // +listType=atomic - repeated JSONSchemaProps jSONSchemas = 2; -} - -// JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. -// Defaults to true for the boolean property. -message JSONSchemaPropsOrBool { - optional bool allows = 1; - - optional JSONSchemaProps schema = 2; -} - -// JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. -message JSONSchemaPropsOrStringArray { - optional JSONSchemaProps schema = 1; - - // +listType=atomic - repeated string property = 2; -} - -// SelectableField specifies the JSON path of a field that may be used with field selectors. -message SelectableField { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - optional string jsonPath = 1; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // namespace is the namespace of the service. - // Required - optional string namespace = 1; - - // name is the name of the service. - // Required - optional string name = 2; - - // path is an optional URL path at which the webhook will be contacted. - // +optional - optional string path = 3; - - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - // +optional - optional int32 port = 4; -} - -// ValidationRule describes a validation rule written in the CEL expression language. -message ValidationRule { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - optional string rule = 1; - - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - optional string message = 2; - - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - // +optional - optional string messageExpression = 3; - - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - // +optional - optional string reason = 4; - - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - // +optional - optional string fieldPath = 5; - - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - // - // +featureGate=CRDValidationRatcheting - // +optional - optional bool optionalOldSelf = 6; -} - -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -message WebhookClientConfig { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - optional string url = 3; - - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - optional ServiceReference service = 1; - - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - optional bytes caBundle = 2; -} - -// WebhookConversion describes how to call a conversion webhook -message WebhookConversion { - // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - // +optional - optional WebhookClientConfig clientConfig = 2; - - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // +listType=atomic - repeated string conversionReviewVersions = 3; -} - diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go deleted file mode 100644 index 6ade24a82..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/marshal.go +++ /dev/null @@ -1,295 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - "bytes" - "errors" - - cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" - "k8s.io/apimachinery/pkg/util/json" -) - -var jsTrue = []byte("true") -var jsFalse = []byte("false") - -// The CBOR parsing related constants and functions below are not exported so they can be -// easily removed at a future date when the CBOR library provides equivalent functionality. - -type cborMajorType int - -const ( - // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 - cborUnsignedInteger cborMajorType = 0 - cborNegativeInteger cborMajorType = 1 - cborByteString cborMajorType = 2 - cborTextString cborMajorType = 3 - cborArray cborMajorType = 4 - cborMap cborMajorType = 5 - cborTag cborMajorType = 6 - cborOther cborMajorType = 7 -) - -const ( - // from https://www.rfc-editor.org/rfc/rfc8949.html#name-jump-table-for-initial-byte. - // additionally, see https://www.rfc-editor.org/rfc/rfc8949.html#section-3.3-5. - cborFalseValue = 0xf4 - cborTrueValue = 0xf5 - cborNullValue = 0xf6 -) - -func cborType(b byte) cborMajorType { - return cborMajorType(b >> 5) -} - -func (s JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { - if s.Schema != nil { - return json.Marshal(s.Schema) - } - - if s.Schema == nil && !s.Allows { - return jsFalse, nil - } - return jsTrue, nil -} - -func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { - var nw JSONSchemaPropsOrBool - switch { - case len(data) == 0: - case data[0] == '{': - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Allows = true - nw.Schema = &sch - case len(data) == 4 && string(data) == "true": - nw.Allows = true - case len(data) == 5 && string(data) == "false": - nw.Allows = false - default: - return errors.New("boolean or JSON schema expected") - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrBool) MarshalCBOR() ([]byte, error) { - if s.Schema != nil { - return cbor.Marshal(s.Schema) - } - return cbor.Marshal(s.Allows) -} - -func (s *JSONSchemaPropsOrBool) UnmarshalCBOR(data []byte) error { - switch { - case len(data) == 0: - // ideally we would avoid modifying *s here, but we are matching the behavior of UnmarshalJSON - *s = JSONSchemaPropsOrBool{} - return nil - case cborType(data[0]) == cborMap: - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrBool{Allows: true, Schema: &p} - return nil - case data[0] == cborTrueValue: - *s = JSONSchemaPropsOrBool{Allows: true} - return nil - case data[0] == cborFalseValue: - *s = JSONSchemaPropsOrBool{Allows: false} - return nil - default: - // ideally, this case would not also capture a null input value, - // but we are matching the behavior of the UnmarshalJSON - return errors.New("boolean or JSON schema expected") - } -} - -func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { - if len(s.Property) > 0 { - return json.Marshal(s.Property) - } - if s.Schema != nil { - return json.Marshal(s.Schema) - } - return []byte("null"), nil -} - -func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error { - var first byte - if len(data) > 1 { - first = data[0] - } - var nw JSONSchemaPropsOrStringArray - if first == '{' { - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.Property); err != nil { - return err - } - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrStringArray) MarshalCBOR() ([]byte, error) { - if len(s.Property) > 0 { - return cbor.Marshal(s.Property) - } - if s.Schema != nil { - return cbor.Marshal(s.Schema) - } - return cbor.Marshal(nil) -} - -func (s *JSONSchemaPropsOrStringArray) UnmarshalCBOR(data []byte) error { - if len(data) > 0 && cborType(data[0]) == cborArray { - var a []string - if err := cbor.Unmarshal(data, &a); err != nil { - return err - } - *s = JSONSchemaPropsOrStringArray{Property: a} - return nil - } - if len(data) > 0 && cborType(data[0]) == cborMap { - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrStringArray{Schema: &p} - return nil - } - // At this point we either have: empty data, a null value, or an - // unexpected type. In order to match the behavior of the existing - // UnmarshalJSON, no error is returned and *s is overwritten here. - *s = JSONSchemaPropsOrStringArray{} - return nil -} - -func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { - if len(s.JSONSchemas) > 0 { - return json.Marshal(s.JSONSchemas) - } - return json.Marshal(s.Schema) -} - -func (s *JSONSchemaPropsOrArray) UnmarshalJSON(data []byte) error { - var nw JSONSchemaPropsOrArray - var first byte - if len(data) > 1 { - first = data[0] - } - if first == '{' { - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.JSONSchemas); err != nil { - return err - } - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrArray) MarshalCBOR() ([]byte, error) { - if len(s.JSONSchemas) > 0 { - return cbor.Marshal(s.JSONSchemas) - } - return cbor.Marshal(s.Schema) -} - -func (s *JSONSchemaPropsOrArray) UnmarshalCBOR(data []byte) error { - if len(data) > 0 && cborType(data[0]) == cborMap { - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrArray{Schema: &p} - return nil - } - if len(data) > 0 && cborType(data[0]) == cborArray { - var a []JSONSchemaProps - if err := cbor.Unmarshal(data, &a); err != nil { - return err - } - *s = JSONSchemaPropsOrArray{JSONSchemas: a} - return nil - } - // At this point we either have: empty data, a null value, or an - // unexpected type. In order to match the behavior of the existing - // UnmarshalJSON, no error is returned and *s is overwritten here. - *s = JSONSchemaPropsOrArray{} - return nil -} - -func (s JSON) MarshalJSON() ([]byte, error) { - if len(s.Raw) > 0 { - return s.Raw, nil - } - return []byte("null"), nil - -} - -func (s *JSON) UnmarshalJSON(data []byte) error { - if len(data) > 0 && !bytes.Equal(data, nullLiteral) { - s.Raw = append(s.Raw[0:0], data...) - } - return nil -} - -func (s JSON) MarshalCBOR() ([]byte, error) { - // Note that non-semantic whitespace is lost during the transcoding performed here. - // We do not forsee this to be a problem given the current known uses of this type. - // Other limitations that arise when roundtripping JSON via dynamic clients also apply - // here, for example: insignificant whitespace handling, number handling, and map key ordering. - if len(s.Raw) == 0 { - return []byte{cborNullValue}, nil - } - var u any - if err := json.Unmarshal(s.Raw, &u); err != nil { - return nil, err - } - return cbor.Marshal(u) -} - -func (s *JSON) UnmarshalCBOR(data []byte) error { - if len(data) == 0 || data[0] == cborNullValue { - return nil - } - var u any - if err := cbor.Unmarshal(data, &u); err != nil { - return err - } - raw, err := json.Marshal(u) - if err != nil { - return err - } - s.Raw = raw - return nil -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/register.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/register.go deleted file mode 100644 index bd6a6ed00..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/register.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "apiextensions.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CustomResourceDefinition{}, - &CustomResourceDefinitionList{}, - &ConversionReview{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go deleted file mode 100644 index b3a8ce7ef..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types.go +++ /dev/null @@ -1,532 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" -) - -// ConversionStrategyType describes different conversion types. -type ConversionStrategyType string - -const ( - // KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces. - // The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL. - // If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged. - KubeAPIApprovedAnnotation = "api-approved.kubernetes.io" - - // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. - NoneConverter ConversionStrategyType = "None" - // WebhookConverter is a converter that calls to an external webhook to convert the CR. - WebhookConverter ConversionStrategyType = "Webhook" -) - -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -type CustomResourceDefinitionSpec struct { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - Group string `json:"group" protobuf:"bytes,1,opt,name=group"` - // names specify the resource and kind names for the custom resource. - Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"` - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. - Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"` - // versions is the list of all API versions of the defined custom resource. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - // +listType=atomic - Versions []CustomResourceDefinitionVersion `json:"versions" protobuf:"bytes,7,rep,name=versions"` - - // conversion defines conversion settings for the CRD. - // +optional - Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` - - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - // +optional - PreserveUnknownFields bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"` -} - -// CustomResourceConversion describes how to convert different versions of a CR. -type CustomResourceConversion struct { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. - Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"` - - // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`. - // +optional - Webhook *WebhookConversion `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"` -} - -// WebhookConversion describes how to call a conversion webhook -type WebhookConversion struct { - // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - // +optional - ClientConfig *WebhookClientConfig `json:"clientConfig,omitempty" protobuf:"bytes,2,name=clientConfig"` - - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // +listType=atomic - ConversionReviewVersions []string `json:"conversionReviewVersions" protobuf:"bytes,3,rep,name=conversionReviewVersions"` -} - -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -type WebhookClientConfig struct { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` - - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` - - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // namespace is the namespace of the service. - // Required - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - // name is the name of the service. - // Required - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - - // path is an optional URL path at which the webhook will be contacted. - // +optional - Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` - - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - // +optional - Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"` -} - -// CustomResourceDefinitionVersion describes a version for CRD. -type CustomResourceDefinitionVersion struct { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // served is a flag enabling/disabling this version from being served via REST APIs - Served bool `json:"served" protobuf:"varint,2,opt,name=served"` - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - // +optional - Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - // +optional - DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` - // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. - // +optional - Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"` - // subresources specify what subresources this version of the defined custom resource have. - // +optional - Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If no columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` - - // selectableFields specifies paths to fields that may be used as field selectors. - // A maximum of 8 selectable fields are allowed. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` -} - -// SelectableField specifies the JSON path of a field that may be used with field selectors. -type SelectableField struct { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` -} - -// CustomResourceColumnDefinition specifies a column for server side printing. -type CustomResourceColumnDefinition struct { - // name is a human readable name for the column. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Type string `json:"type" protobuf:"bytes,2,opt,name=type"` - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - // +optional - Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"` - // description is a human readable description of this column. - // +optional - Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - // +optional - Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"` - // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - JSONPath string `json:"jsonPath" protobuf:"bytes,6,opt,name=jsonPath"` -} - -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -type CustomResourceDefinitionNames struct { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"` - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - // +optional - Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"` - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - // +optional - // +listType=atomic - ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"` - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - // +optional - ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"` - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - // +optional - // +listType=atomic - Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` -} - -// ResourceScope is an enum defining the different scopes available to a custom resource -type ResourceScope string - -const ( - ClusterScoped ResourceScope = "Cluster" - NamespaceScoped ResourceScope = "Namespaced" -) - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type -type CustomResourceDefinitionConditionType string - -const ( - // Established means that the resource has become active. A resource is established when all names are - // accepted without a conflict for the first time. A resource stays established until deleted, even during - // a later NamesAccepted due to changed names. Note that not all names can be changed. - Established CustomResourceDefinitionConditionType = "Established" - // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in - // the group and are therefore accepted. - NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" - // NonStructuralSchema means that one or more OpenAPI schema is not structural. - // - // A schema is structural if it specifies types for all values, with the only exceptions of those with - // - x-kubernetes-int-or-string: true — for fields which can be integer or string - // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values - // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions - // specified under allOf, anyOf, oneOf or not. - // - // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be - // available for non-structural CRDs: - // - pruning - // - defaulting - // - read-only - // - OpenAPI publishing - // - webhook conversion - NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" - // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. - Terminating CustomResourceDefinitionConditionType = "Terminating" - // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs - // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will - // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. - // See https://github.com/kubernetes/enhancements/pull/1111 for more details. - KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" - // StorageMigrating indicates that the underlying storage version of the CRD - // is undergoing migration. - StorageMigrating CustomResourceDefinitionConditionType = "StorageMigrating" -) - -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -type CustomResourceDefinitionCondition struct { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"` - // status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // lastTransitionTime last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // message is a human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,6,opt,name=observedGeneration"` -} - -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -type CustomResourceDefinitionStatus struct { - // conditions indicate state for particular aspects of a CustomResourceDefinition - // +optional - // +listType=map - // +listMapKey=type - Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"` - - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - // +optional - AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` - - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - // +optional - // +listType=atomic - StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` - - // The generation observed by the CRD controller. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,4,opt,name=observedGeneration"` -} - -// CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of -// a CustomResourceDefinition -const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.16 - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -type CustomResourceDefinition struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec describes how the user wants the resources to appear - Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status indicates the actual state of the CustomResourceDefinition - // +optional - Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.16 - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -type CustomResourceDefinitionList struct { - metav1.TypeMeta `json:",inline"` - - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items list individual CustomResourceDefinition objects - Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// CustomResourceValidation is a list of validation methods for CustomResources. -type CustomResourceValidation struct { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - // +optional - OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"` -} - -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -type CustomResourceSubresources struct { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - // +optional - Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - // +optional - Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"` -} - -// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. -// Status is represented by the `.status` JSON path inside of a CustomResource. When set, -// * exposes a /status subresource for the custom resource -// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza -// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza -type CustomResourceSubresourceStatus struct{} - -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -type CustomResourceSubresourceScale struct { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"` - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"` - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - // +optional - LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.16 - -// ConversionReview describes a conversion request/response. -type ConversionReview struct { - metav1.TypeMeta `json:",inline"` - // request describes the attributes for the conversion request. - // +optional - Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` - // response describes the attributes for the conversion response. - // +optional - Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` -} - -// ConversionRequest describes the conversion request parameters. -type ConversionRequest struct { - // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are - // otherwise identical (parallel requests, etc). - // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` - // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" - DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` - // objects is the list of custom resource objects to be converted. - // +listType=atomic - Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` -} - -// ConversionResponse describes a conversion response. -type ConversionResponse struct { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding `request.uid`. - UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` - // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. - // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list - // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). - // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. - // +listType=atomic - ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` - // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if - // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the - // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set - // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` - // will be used to construct an error message for the end user. - Result metav1.Status `json:"result" protobuf:"bytes,3,name=result"` -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go deleted file mode 100644 index 197bd1b7a..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/types_jsonschema.go +++ /dev/null @@ -1,419 +0,0 @@ -/* -Copyright 2019 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 v1 - -// FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. -// +enum -type FieldValueErrorReason string - -const ( - // FieldValueRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). - FieldValueRequired FieldValueErrorReason = "FieldValueRequired" - // FieldValueDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). - FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" - // FieldValueInvalid is used to report malformed values (e.g. failed regex - // match, too long, out of bounds). - FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" - // FieldValueForbidden is used to report valid (as per formatting rules) - // values which would be accepted under some conditions, but which are not - // permitted by the current conditions (such as security policy). - FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" -) - -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -type JSONSchemaProps struct { - ID string `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"` - Schema JSONSchemaURL `json:"$schema,omitempty" protobuf:"bytes,2,opt,name=schema"` - Ref *string `json:"$ref,omitempty" protobuf:"bytes,3,opt,name=ref"` - Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` - Type string `json:"type,omitempty" protobuf:"bytes,5,opt,name=type"` - - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"` - - Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"` - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // Defaulting requires spec.preserveUnknownFields to be false. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - // +listType=atomic - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - // +listType=atomic - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - // +listType=atomic - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - // +listType=atomic - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` - // +listType=atomic - AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` - Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` - Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` - AdditionalProperties *JSONSchemaPropsOrBool `json:"additionalProperties,omitempty" protobuf:"bytes,30,opt,name=additionalProperties"` - PatternProperties map[string]JSONSchemaProps `json:"patternProperties,omitempty" protobuf:"bytes,31,rep,name=patternProperties"` - Dependencies JSONSchemaDependencies `json:"dependencies,omitempty" protobuf:"bytes,32,opt,name=dependencies"` - AdditionalItems *JSONSchemaPropsOrBool `json:"additionalItems,omitempty" protobuf:"bytes,33,opt,name=additionalItems"` - Definitions JSONSchemaDefinitions `json:"definitions,omitempty" protobuf:"bytes,34,opt,name=definitions"` - ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty" protobuf:"bytes,35,opt,name=externalDocs"` - Example *JSON `json:"example,omitempty" protobuf:"bytes,36,opt,name=example"` - Nullable bool `json:"nullable,omitempty" protobuf:"bytes,37,opt,name=nullable"` - - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty" protobuf:"bytes,38,opt,name=xKubernetesPreserveUnknownFields"` - - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - XEmbeddedResource bool `json:"x-kubernetes-embedded-resource,omitempty" protobuf:"bytes,39,opt,name=xKubernetesEmbeddedResource"` - - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty" protobuf:"bytes,40,opt,name=xKubernetesIntOrString"` - - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - // - // +optional - // +listType=atomic - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` - - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - // +optional - XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"` - - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - // +optional - XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"` - - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // +patchMergeKey=rule - // +patchStrategy=merge - // +listType=map - // +listMapKey=rule - XValidations ValidationRules `json:"x-kubernetes-validations,omitempty" patchStrategy:"merge" patchMergeKey:"rule" protobuf:"bytes,44,rep,name=xKubernetesValidations"` -} - -// ValidationRules describes a list of validation rules written in the CEL expression language. -type ValidationRules []ValidationRule - -// ValidationRule describes a validation rule written in the CEL expression language. -type ValidationRule struct { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - // - Rule string `json:"rule" protobuf:"bytes,1,opt,name=rule"` - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - // +optional - MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"` - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - // +optional - Reason *FieldValueErrorReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - // +optional - FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,5,opt,name=fieldPath"` - - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - // - // +featureGate=CRDValidationRatcheting - // +optional - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty" protobuf:"bytes,6,opt,name=optionalOldSelf"` -} - -// JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -type JSON struct { - Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSON) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSON) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaURL represents a schema url. -type JSONSchemaURL string - -// JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps -// or an array of JSONSchemaProps. Mainly here for serialization purposes. -type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - // +listType=atomic - JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. -// Defaults to true for the boolean property. -type JSONSchemaPropsOrBool struct { - Allows bool `protobuf:"varint,1,opt,name=allows"` - Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaDependencies represent a dependencies property. -type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray - -// JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. -type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - // +listType=atomic - Property []string `protobuf:"bytes,2,rep,name=property"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaDefinitions contains the models explicitly defined in this spec. -type JSONSchemaDefinitions map[string]JSONSchemaProps - -// ExternalDocumentation allows referencing an external resource for extended documentation. -type ExternalDocumentation struct { - Description string `json:"description,omitempty" protobuf:"bytes,1,opt,name=description"` - URL string `json:"url,omitempty" protobuf:"bytes,2,opt,name=url"` -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go deleted file mode 100644 index 4d02c8df0..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.conversion.go +++ /dev/null @@ -1,1363 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1 - -import ( - unsafe "unsafe" - - apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CustomResourceColumnDefinition)(nil), (*apiextensions.CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(a.(*CustomResourceColumnDefinition), b.(*apiextensions.CustomResourceColumnDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceColumnDefinition)(nil), (*CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(a.(*apiextensions.CustomResourceColumnDefinition), b.(*CustomResourceColumnDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinition)(nil), (*apiextensions.CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(a.(*CustomResourceDefinition), b.(*apiextensions.CustomResourceDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinition)(nil), (*CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(a.(*apiextensions.CustomResourceDefinition), b.(*CustomResourceDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionCondition)(nil), (*apiextensions.CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(a.(*CustomResourceDefinitionCondition), b.(*apiextensions.CustomResourceDefinitionCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionCondition)(nil), (*CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(a.(*apiextensions.CustomResourceDefinitionCondition), b.(*CustomResourceDefinitionCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionList)(nil), (*apiextensions.CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(a.(*CustomResourceDefinitionList), b.(*apiextensions.CustomResourceDefinitionList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionList)(nil), (*CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(a.(*apiextensions.CustomResourceDefinitionList), b.(*CustomResourceDefinitionList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionNames)(nil), (*apiextensions.CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(a.(*CustomResourceDefinitionNames), b.(*apiextensions.CustomResourceDefinitionNames), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionNames)(nil), (*CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(a.(*apiextensions.CustomResourceDefinitionNames), b.(*CustomResourceDefinitionNames), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionStatus)(nil), (*apiextensions.CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(a.(*CustomResourceDefinitionStatus), b.(*apiextensions.CustomResourceDefinitionStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionStatus)(nil), (*CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(a.(*apiextensions.CustomResourceDefinitionStatus), b.(*CustomResourceDefinitionStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionVersion)(nil), (*apiextensions.CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(a.(*CustomResourceDefinitionVersion), b.(*apiextensions.CustomResourceDefinitionVersion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionVersion)(nil), (*CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(a.(*apiextensions.CustomResourceDefinitionVersion), b.(*CustomResourceDefinitionVersion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceScale)(nil), (*apiextensions.CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(a.(*CustomResourceSubresourceScale), b.(*apiextensions.CustomResourceSubresourceScale), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceScale)(nil), (*CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale(a.(*apiextensions.CustomResourceSubresourceScale), b.(*CustomResourceSubresourceScale), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceStatus)(nil), (*apiextensions.CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(a.(*CustomResourceSubresourceStatus), b.(*apiextensions.CustomResourceSubresourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceStatus)(nil), (*CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus(a.(*apiextensions.CustomResourceSubresourceStatus), b.(*CustomResourceSubresourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresources)(nil), (*apiextensions.CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(a.(*CustomResourceSubresources), b.(*apiextensions.CustomResourceSubresources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresources)(nil), (*CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(a.(*apiextensions.CustomResourceSubresources), b.(*CustomResourceSubresources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceValidation)(nil), (*apiextensions.CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(a.(*CustomResourceValidation), b.(*apiextensions.CustomResourceValidation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceValidation)(nil), (*CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(a.(*apiextensions.CustomResourceValidation), b.(*CustomResourceValidation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalDocumentation)(nil), (*apiextensions.ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(a.(*ExternalDocumentation), b.(*apiextensions.ExternalDocumentation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ExternalDocumentation)(nil), (*ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation(a.(*apiextensions.ExternalDocumentation), b.(*ExternalDocumentation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaProps)(nil), (*apiextensions.JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(a.(*JSONSchemaProps), b.(*apiextensions.JSONSchemaProps), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrArray)(nil), (*apiextensions.JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(a.(*JSONSchemaPropsOrArray), b.(*apiextensions.JSONSchemaPropsOrArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrArray)(nil), (*JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(a.(*apiextensions.JSONSchemaPropsOrArray), b.(*JSONSchemaPropsOrArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrBool)(nil), (*apiextensions.JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(a.(*JSONSchemaPropsOrBool), b.(*apiextensions.JSONSchemaPropsOrBool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrBool)(nil), (*JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(a.(*apiextensions.JSONSchemaPropsOrBool), b.(*JSONSchemaPropsOrBool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrStringArray)(nil), (*apiextensions.JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(a.(*JSONSchemaPropsOrStringArray), b.(*apiextensions.JSONSchemaPropsOrStringArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrStringArray)(nil), (*JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(a.(*apiextensions.JSONSchemaPropsOrStringArray), b.(*JSONSchemaPropsOrStringArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_SelectableField_To_v1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ServiceReference_To_v1_ServiceReference(a.(*apiextensions.ServiceReference), b.(*ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ValidationRule)(nil), (*apiextensions.ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_ValidationRule_To_apiextensions_ValidationRule(a.(*ValidationRule), b.(*apiextensions.ValidationRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ValidationRule)(nil), (*ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ValidationRule_To_v1_ValidationRule(a.(*apiextensions.ValidationRule), b.(*ValidationRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*WebhookClientConfig)(nil), (*apiextensions.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(a.(*WebhookClientConfig), b.(*apiextensions.WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.WebhookClientConfig)(nil), (*WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(a.(*apiextensions.WebhookClientConfig), b.(*WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.CustomResourceConversion)(nil), (*CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(a.(*apiextensions.CustomResourceConversion), b.(*CustomResourceConversion), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.CustomResourceDefinitionSpec)(nil), (*CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(a.(*apiextensions.CustomResourceDefinitionSpec), b.(*CustomResourceDefinitionSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSON_To_v1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.ValidationRules)(nil), (*ValidationRules)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ValidationRules_To_v1_ValidationRules(a.(*apiextensions.ValidationRules), b.(*ValidationRules), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CustomResourceConversion)(nil), (*apiextensions.CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(a.(*CustomResourceConversion), b.(*apiextensions.CustomResourceConversion), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*CustomResourceDefinitionSpec)(nil), (*apiextensions.CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(a.(*CustomResourceDefinitionSpec), b.(*apiextensions.CustomResourceDefinitionSpec), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { - out.Name = in.Name - out.Type = in.Type - out.Format = in.Format - out.Description = in.Description - out.Priority = in.Priority - out.JSONPath = in.JSONPath - return nil -} - -// Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition is an autogenerated conversion function. -func Convert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { - return autoConvert_v1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { - out.Name = in.Name - out.Type = in.Type - out.Format = in.Format - out.Description = in.Description - out.Priority = in.Priority - out.JSONPath = in.JSONPath - return nil -} - -// Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1_CustomResourceColumnDefinition(in, out, s) -} - -func autoConvert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { - out.Strategy = apiextensions.ConversionStrategyType(in.Strategy) - // WARNING: in.Webhook requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { - out.Strategy = ConversionStrategyType(in.Strategy) - // WARNING: in.WebhookClientConfig requires manual conversion: does not exist in peer-type - // WARNING: in.ConversionReviewVersions requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(in, out, s) -} - -func autoConvert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { - out.Type = apiextensions.CustomResourceDefinitionConditionType(in.Type) - out.Status = apiextensions.ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { - out.Type = CustomResourceDefinitionConditionType(in.Type) - out.Status = ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1_CustomResourceDefinitionCondition(in, out, s) -} - -func autoConvert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apiextensions.CustomResourceDefinition, len(*in)) - for i := range *in { - if err := Convert_v1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - if err := Convert_apiextensions_CustomResourceDefinition_To_v1_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionList_To_v1_CustomResourceDefinitionList(in, out, s) -} - -func autoConvert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { - out.Plural = in.Plural - out.Singular = in.Singular - out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) - out.Kind = in.Kind - out.ListKind = in.ListKind - out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) - return nil -} - -// Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { - out.Plural = in.Plural - out.Singular = in.Singular - out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) - out.Kind = in.Kind - out.ListKind = in.ListKind - out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(in, out, s) -} - -func autoConvert_v1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { - out.Group = in.Group - if err := Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { - return err - } - out.Scope = apiextensions.ResourceScope(in.Scope) - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]apiextensions.CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - if err := Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(apiextensions.CustomResourceConversion) - if err := Convert_v1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(*in, *out, s); err != nil { - return err - } - } else { - out.Conversion = nil - } - if err := metav1.Convert_bool_To_Pointer_bool(&in.PreserveUnknownFields, &out.PreserveUnknownFields, s); err != nil { - return err - } - return nil -} - -func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { - out.Group = in.Group - // WARNING: in.Version requires manual conversion: does not exist in peer-type - if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { - return err - } - out.Scope = ResourceScope(in.Scope) - // WARNING: in.Validation requires manual conversion: does not exist in peer-type - // WARNING: in.Subresources requires manual conversion: does not exist in peer-type - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - if err := Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } - // WARNING: in.AdditionalPrinterColumns requires manual conversion: does not exist in peer-type - // WARNING: in.SelectableFields requires manual conversion: does not exist in peer-type - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(CustomResourceConversion) - if err := Convert_apiextensions_CustomResourceConversion_To_v1_CustomResourceConversion(*in, *out, s); err != nil { - return err - } - } else { - out.Conversion = nil - } - if err := metav1.Convert_Pointer_bool_To_bool(&in.PreserveUnknownFields, &out.PreserveUnknownFields, s); err != nil { - return err - } - return nil -} - -func autoConvert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { - out.Conditions = *(*[]apiextensions.CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) - if err := Convert_v1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { - return err - } - out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { - out.Conditions = *(*[]CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) - if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { - return err - } - out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1_CustomResourceDefinitionStatus(in, out, s) -} - -func autoConvert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { - out.Name = in.Name - out.Served = in.Served - out.Storage = in.Storage - out.Deprecated = in.Deprecated - out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.CustomResourceValidation) - if err := Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) - return nil -} - -// Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion is an autogenerated conversion function. -func Convert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { - return autoConvert_v1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { - out.Name = in.Name - out.Served = in.Served - out.Storage = in.Storage - out.Deprecated = in.Deprecated - out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(CustomResourceValidation) - if err := Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1_CustomResourceDefinitionVersion(in, out, s) -} - -func autoConvert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { - out.SpecReplicasPath = in.SpecReplicasPath - out.StatusReplicasPath = in.StatusReplicasPath - out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) - return nil -} - -// Convert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale is an autogenerated conversion function. -func Convert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { - return autoConvert_v1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { - out.SpecReplicasPath = in.SpecReplicasPath - out.StatusReplicasPath = in.StatusReplicasPath - out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) - return nil -} - -// Convert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1_CustomResourceSubresourceScale(in, out, s) -} - -func autoConvert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { - return nil -} - -// Convert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus is an autogenerated conversion function. -func Convert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { - return autoConvert_v1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { - return nil -} - -// Convert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1_CustomResourceSubresourceStatus(in, out, s) -} - -func autoConvert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { - out.Status = (*apiextensions.CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) - out.Scale = (*apiextensions.CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) - return nil -} - -// Convert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources is an autogenerated conversion function. -func Convert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { - return autoConvert_v1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { - out.Status = (*CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) - out.Scale = (*CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) - return nil -} - -// Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresources_To_v1_CustomResourceSubresources(in, out, s) -} - -func autoConvert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in *CustomResourceValidation, out *apiextensions.CustomResourceValidation, s conversion.Scope) error { - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.OpenAPIV3Schema = nil - } - return nil -} - -// Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation is an autogenerated conversion function. -func Convert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in *CustomResourceValidation, out *apiextensions.CustomResourceValidation, s conversion.Scope) error { - return autoConvert_v1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(in *apiextensions.CustomResourceValidation, out *CustomResourceValidation, s conversion.Scope) error { - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.OpenAPIV3Schema = nil - } - return nil -} - -// Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(in *apiextensions.CustomResourceValidation, out *CustomResourceValidation, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceValidation_To_v1_CustomResourceValidation(in, out, s) -} - -func autoConvert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in *ExternalDocumentation, out *apiextensions.ExternalDocumentation, s conversion.Scope) error { - out.Description = in.Description - out.URL = in.URL - return nil -} - -// Convert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation is an autogenerated conversion function. -func Convert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in *ExternalDocumentation, out *apiextensions.ExternalDocumentation, s conversion.Scope) error { - return autoConvert_v1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in, out, s) -} - -func autoConvert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation(in *apiextensions.ExternalDocumentation, out *ExternalDocumentation, s conversion.Scope) error { - out.Description = in.Description - out.URL = in.URL - return nil -} - -// Convert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation is an autogenerated conversion function. -func Convert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation(in *apiextensions.ExternalDocumentation, out *ExternalDocumentation, s conversion.Scope) error { - return autoConvert_apiextensions_ExternalDocumentation_To_v1_ExternalDocumentation(in, out, s) -} - -func autoConvert_v1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { - // WARNING: in.Raw requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_apiextensions_JSON_To_v1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { - // FIXME: Type apiextensions.JSON is unsupported. - return nil -} - -func autoConvert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in *JSONSchemaProps, out *apiextensions.JSONSchemaProps, s conversion.Scope) error { - out.ID = in.ID - out.Schema = apiextensions.JSONSchemaURL(in.Schema) - out.Ref = (*string)(unsafe.Pointer(in.Ref)) - out.Description = in.Description - out.Type = in.Type - out.Format = in.Format - out.Title = in.Title - if in.Default != nil { - in, out := &in.Default, &out.Default - *out = new(apiextensions.JSON) - if err := Convert_v1_JSON_To_apiextensions_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Default = nil - } - out.Maximum = (*float64)(unsafe.Pointer(in.Maximum)) - out.ExclusiveMaximum = in.ExclusiveMaximum - out.Minimum = (*float64)(unsafe.Pointer(in.Minimum)) - out.ExclusiveMinimum = in.ExclusiveMinimum - out.MaxLength = (*int64)(unsafe.Pointer(in.MaxLength)) - out.MinLength = (*int64)(unsafe.Pointer(in.MinLength)) - out.Pattern = in.Pattern - out.MaxItems = (*int64)(unsafe.Pointer(in.MaxItems)) - out.MinItems = (*int64)(unsafe.Pointer(in.MinItems)) - out.UniqueItems = in.UniqueItems - out.MultipleOf = (*float64)(unsafe.Pointer(in.MultipleOf)) - if in.Enum != nil { - in, out := &in.Enum, &out.Enum - *out = make([]apiextensions.JSON, len(*in)) - for i := range *in { - if err := Convert_v1_JSON_To_apiextensions_JSON(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enum = nil - } - out.MaxProperties = (*int64)(unsafe.Pointer(in.MaxProperties)) - out.MinProperties = (*int64)(unsafe.Pointer(in.MinProperties)) - out.Required = *(*[]string)(unsafe.Pointer(&in.Required)) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = new(apiextensions.JSONSchemaPropsOrArray) - if err := Convert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(*in, *out, s); err != nil { - return err - } - } else { - out.Items = nil - } - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AllOf = nil - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.OneOf = nil - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AnyOf = nil - } - if in.Not != nil { - in, out := &in.Not, &out.Not - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Not = nil - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]apiextensions.JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Properties = nil - } - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - *out = new(apiextensions.JSONSchemaPropsOrBool) - if err := Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalProperties = nil - } - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]apiextensions.JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.PatternProperties = nil - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(apiextensions.JSONSchemaDependencies, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaPropsOrStringArray) - if err := Convert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Dependencies = nil - } - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - *out = new(apiextensions.JSONSchemaPropsOrBool) - if err := Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalItems = nil - } - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(apiextensions.JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Definitions = nil - } - out.ExternalDocs = (*apiextensions.ExternalDocumentation)(unsafe.Pointer(in.ExternalDocs)) - if in.Example != nil { - in, out := &in.Example, &out.Example - *out = new(apiextensions.JSON) - if err := Convert_v1_JSON_To_apiextensions_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Example = nil - } - out.Nullable = in.Nullable - out.XPreserveUnknownFields = (*bool)(unsafe.Pointer(in.XPreserveUnknownFields)) - out.XEmbeddedResource = in.XEmbeddedResource - out.XIntOrString = in.XIntOrString - out.XListMapKeys = *(*[]string)(unsafe.Pointer(&in.XListMapKeys)) - out.XListType = (*string)(unsafe.Pointer(in.XListType)) - out.XMapType = (*string)(unsafe.Pointer(in.XMapType)) - out.XValidations = *(*apiextensions.ValidationRules)(unsafe.Pointer(&in.XValidations)) - return nil -} - -// Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps is an autogenerated conversion function. -func Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in *JSONSchemaProps, out *apiextensions.JSONSchemaProps, s conversion.Scope) error { - return autoConvert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { - out.ID = in.ID - out.Schema = JSONSchemaURL(in.Schema) - out.Ref = (*string)(unsafe.Pointer(in.Ref)) - out.Description = in.Description - out.Type = in.Type - out.Nullable = in.Nullable - out.Format = in.Format - out.Title = in.Title - if in.Default != nil { - in, out := &in.Default, &out.Default - *out = new(JSON) - if err := Convert_apiextensions_JSON_To_v1_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Default = nil - } - out.Maximum = (*float64)(unsafe.Pointer(in.Maximum)) - out.ExclusiveMaximum = in.ExclusiveMaximum - out.Minimum = (*float64)(unsafe.Pointer(in.Minimum)) - out.ExclusiveMinimum = in.ExclusiveMinimum - out.MaxLength = (*int64)(unsafe.Pointer(in.MaxLength)) - out.MinLength = (*int64)(unsafe.Pointer(in.MinLength)) - out.Pattern = in.Pattern - out.MaxItems = (*int64)(unsafe.Pointer(in.MaxItems)) - out.MinItems = (*int64)(unsafe.Pointer(in.MinItems)) - out.UniqueItems = in.UniqueItems - out.MultipleOf = (*float64)(unsafe.Pointer(in.MultipleOf)) - if in.Enum != nil { - in, out := &in.Enum, &out.Enum - *out = make([]JSON, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSON_To_v1_JSON(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enum = nil - } - out.MaxProperties = (*int64)(unsafe.Pointer(in.MaxProperties)) - out.MinProperties = (*int64)(unsafe.Pointer(in.MinProperties)) - out.Required = *(*[]string)(unsafe.Pointer(&in.Required)) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = new(JSONSchemaPropsOrArray) - if err := Convert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(*in, *out, s); err != nil { - return err - } - } else { - out.Items = nil - } - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AllOf = nil - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.OneOf = nil - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AnyOf = nil - } - if in.Not != nil { - in, out := &in.Not, &out.Not - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Not = nil - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Properties = nil - } - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - *out = new(JSONSchemaPropsOrBool) - if err := Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalProperties = nil - } - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.PatternProperties = nil - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaPropsOrStringArray) - if err := Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Dependencies = nil - } - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - *out = new(JSONSchemaPropsOrBool) - if err := Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalItems = nil - } - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Definitions = nil - } - out.ExternalDocs = (*ExternalDocumentation)(unsafe.Pointer(in.ExternalDocs)) - if in.Example != nil { - in, out := &in.Example, &out.Example - *out = new(JSON) - if err := Convert_apiextensions_JSON_To_v1_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Example = nil - } - out.XPreserveUnknownFields = (*bool)(unsafe.Pointer(in.XPreserveUnknownFields)) - out.XEmbeddedResource = in.XEmbeddedResource - out.XIntOrString = in.XIntOrString - out.XListMapKeys = *(*[]string)(unsafe.Pointer(&in.XListMapKeys)) - out.XListType = (*string)(unsafe.Pointer(in.XListType)) - out.XMapType = (*string)(unsafe.Pointer(in.XMapType)) - out.XValidations = *(*ValidationRules)(unsafe.Pointer(&in.XValidations)) - return nil -} - -func autoConvert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in *JSONSchemaPropsOrArray, out *apiextensions.JSONSchemaPropsOrArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.JSONSchemas = nil - } - return nil -} - -// Convert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray is an autogenerated conversion function. -func Convert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in *JSONSchemaPropsOrArray, out *apiextensions.JSONSchemaPropsOrArray, s conversion.Scope) error { - return autoConvert_v1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out *JSONSchemaPropsOrArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.JSONSchemas = nil - } - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out *JSONSchemaPropsOrArray, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrArray_To_v1_JSONSchemaPropsOrArray(in, out, s) -} - -func autoConvert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in *JSONSchemaPropsOrBool, out *apiextensions.JSONSchemaPropsOrBool, s conversion.Scope) error { - out.Allows = in.Allows - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - return nil -} - -// Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool is an autogenerated conversion function. -func Convert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in *JSONSchemaPropsOrBool, out *apiextensions.JSONSchemaPropsOrBool, s conversion.Scope) error { - return autoConvert_v1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(in *apiextensions.JSONSchemaPropsOrBool, out *JSONSchemaPropsOrBool, s conversion.Scope) error { - out.Allows = in.Allows - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(in *apiextensions.JSONSchemaPropsOrBool, out *JSONSchemaPropsOrBool, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrBool_To_v1_JSONSchemaPropsOrBool(in, out, s) -} - -func autoConvert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in *JSONSchemaPropsOrStringArray, out *apiextensions.JSONSchemaPropsOrStringArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Property = *(*[]string)(unsafe.Pointer(&in.Property)) - return nil -} - -// Convert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray is an autogenerated conversion function. -func Convert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in *JSONSchemaPropsOrStringArray, out *apiextensions.JSONSchemaPropsOrStringArray, s conversion.Scope) error { - return autoConvert_v1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(in *apiextensions.JSONSchemaPropsOrStringArray, out *JSONSchemaPropsOrStringArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Property = *(*[]string)(unsafe.Pointer(&in.Property)) - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(in *apiextensions.JSONSchemaPropsOrStringArray, out *JSONSchemaPropsOrStringArray, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1_JSONSchemaPropsOrStringArray(in, out, s) -} - -func autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { - out.JSONPath = in.JSONPath - return nil -} - -// Convert_v1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. -func Convert_v1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { - return autoConvert_v1_SelectableField_To_apiextensions_SelectableField(in, out, s) -} - -func autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { - out.JSONPath = in.JSONPath - return nil -} - -// Convert_apiextensions_SelectableField_To_v1_SelectableField is an autogenerated conversion function. -func Convert_apiextensions_SelectableField_To_v1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { - return autoConvert_apiextensions_SelectableField_To_v1_SelectableField(in, out, s) -} - -func autoConvert_v1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := metav1.Convert_Pointer_int32_To_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_v1_ServiceReference_To_apiextensions_ServiceReference is an autogenerated conversion function. -func Convert_v1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { - return autoConvert_v1_ServiceReference_To_apiextensions_ServiceReference(in, out, s) -} - -func autoConvert_apiextensions_ServiceReference_To_v1_ServiceReference(in *apiextensions.ServiceReference, out *ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := metav1.Convert_int32_To_Pointer_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_apiextensions_ServiceReference_To_v1_ServiceReference is an autogenerated conversion function. -func Convert_apiextensions_ServiceReference_To_v1_ServiceReference(in *apiextensions.ServiceReference, out *ServiceReference, s conversion.Scope) error { - return autoConvert_apiextensions_ServiceReference_To_v1_ServiceReference(in, out, s) -} - -func autoConvert_v1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRule, out *apiextensions.ValidationRule, s conversion.Scope) error { - out.Rule = in.Rule - out.Message = in.Message - out.MessageExpression = in.MessageExpression - out.Reason = (*apiextensions.FieldValueErrorReason)(unsafe.Pointer(in.Reason)) - out.FieldPath = in.FieldPath - out.OptionalOldSelf = (*bool)(unsafe.Pointer(in.OptionalOldSelf)) - return nil -} - -// Convert_v1_ValidationRule_To_apiextensions_ValidationRule is an autogenerated conversion function. -func Convert_v1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRule, out *apiextensions.ValidationRule, s conversion.Scope) error { - return autoConvert_v1_ValidationRule_To_apiextensions_ValidationRule(in, out, s) -} - -func autoConvert_apiextensions_ValidationRule_To_v1_ValidationRule(in *apiextensions.ValidationRule, out *ValidationRule, s conversion.Scope) error { - out.Rule = in.Rule - out.Message = in.Message - out.MessageExpression = in.MessageExpression - out.Reason = (*FieldValueErrorReason)(unsafe.Pointer(in.Reason)) - out.FieldPath = in.FieldPath - out.OptionalOldSelf = (*bool)(unsafe.Pointer(in.OptionalOldSelf)) - return nil -} - -// Convert_apiextensions_ValidationRule_To_v1_ValidationRule is an autogenerated conversion function. -func Convert_apiextensions_ValidationRule_To_v1_ValidationRule(in *apiextensions.ValidationRule, out *ValidationRule, s conversion.Scope) error { - return autoConvert_apiextensions_ValidationRule_To_v1_ValidationRule(in, out, s) -} - -func autoConvert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in *WebhookClientConfig, out *apiextensions.WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(apiextensions.ServiceReference) - if err := Convert_v1_ServiceReference_To_apiextensions_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig is an autogenerated conversion function. -func Convert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in *WebhookClientConfig, out *apiextensions.WebhookClientConfig, s conversion.Scope) error { - return autoConvert_v1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in, out, s) -} - -func autoConvert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(in *apiextensions.WebhookClientConfig, out *WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - if err := Convert_apiextensions_ServiceReference_To_v1_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig is an autogenerated conversion function. -func Convert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(in *apiextensions.WebhookClientConfig, out *WebhookClientConfig, s conversion.Scope) error { - return autoConvert_apiextensions_WebhookClientConfig_To_v1_WebhookClientConfig(in, out, s) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go deleted file mode 100644 index f85a0b067..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,738 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -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 *ConversionRequest) DeepCopyInto(out *ConversionRequest) { - *out = *in - if in.Objects != nil { - in, out := &in.Objects, &out.Objects - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionRequest. -func (in *ConversionRequest) DeepCopy() *ConversionRequest { - if in == nil { - return nil - } - out := new(ConversionRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConversionResponse) DeepCopyInto(out *ConversionResponse) { - *out = *in - if in.ConvertedObjects != nil { - in, out := &in.ConvertedObjects, &out.ConvertedObjects - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Result.DeepCopyInto(&out.Result) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionResponse. -func (in *ConversionResponse) DeepCopy() *ConversionResponse { - if in == nil { - return nil - } - out := new(ConversionResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConversionReview) DeepCopyInto(out *ConversionReview) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = new(ConversionRequest) - (*in).DeepCopyInto(*out) - } - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(ConversionResponse) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionReview. -func (in *ConversionReview) DeepCopy() *ConversionReview { - if in == nil { - return nil - } - out := new(ConversionReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConversionReview) 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 *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. -func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { - if in == nil { - return nil - } - out := new(CustomResourceColumnDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { - *out = *in - if in.Webhook != nil { - in, out := &in.Webhook, &out.Webhook - *out = new(WebhookConversion) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. -func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { - if in == nil { - return nil - } - out := new(CustomResourceConversion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. -func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { - if in == nil { - return nil - } - out := new(CustomResourceDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinition) 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 *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. -func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. -func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinitionList) 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 *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { - *out = *in - if in.ShortNames != nil { - in, out := &in.ShortNames, &out.ShortNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. -func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionNames) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { - *out = *in - in.Names.DeepCopyInto(&out.Names) - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(CustomResourceConversion) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. -func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CustomResourceDefinitionCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) - if in.StoredVersions != nil { - in, out := &in.StoredVersions, &out.StoredVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. -func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { - *out = *in - if in.DeprecationWarning != nil { - in, out := &in.DeprecationWarning, &out.DeprecationWarning - *out = new(string) - **out = **in - } - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } - if in.Subresources != nil { - in, out := &in.Subresources, &out.Subresources - *out = new(CustomResourceSubresources) - (*in).DeepCopyInto(*out) - } - if in.AdditionalPrinterColumns != nil { - in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns - *out = make([]CustomResourceColumnDefinition, len(*in)) - copy(*out, *in) - } - if in.SelectableFields != nil { - in, out := &in.SelectableFields, &out.SelectableFields - *out = make([]SelectableField, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. -func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { - *out = *in - if in.LabelSelectorPath != nil { - in, out := &in.LabelSelectorPath, &out.LabelSelectorPath - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. -func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceScale) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. -func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { - *out = *in - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(CustomResourceSubresourceStatus) - **out = **in - } - if in.Scale != nil { - in, out := &in.Scale, &out.Scale - *out = new(CustomResourceSubresourceScale) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. -func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { - if in == nil { - return nil - } - out := new(CustomResourceSubresources) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { - *out = *in - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. -func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { - if in == nil { - return nil - } - out := new(CustomResourceValidation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. -func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { - if in == nil { - return nil - } - out := new(ExternalDocumentation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSON) DeepCopyInto(out *JSON) { - *out = *in - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSON. -func (in *JSON) DeepCopy() *JSON { - if in == nil { - return nil - } - out := new(JSON) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { - { - in := &in - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. -func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { - if in == nil { - return nil - } - out := new(JSONSchemaDefinitions) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { - { - in := &in - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. -func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { - if in == nil { - return nil - } - out := new(JSONSchemaDependencies) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { - clone := in.DeepCopy() - *out = *clone - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. -func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. -func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrBool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.Property != nil { - in, out := &in.Property, &out.Property - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. -func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrStringArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelectableField) DeepCopyInto(out *SelectableField) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. -func (in *SelectableField) DeepCopy() *SelectableField { - if in == nil { - return nil - } - out := new(SelectableField) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { - *out = *in - if in.Reason != nil { - in, out := &in.Reason, &out.Reason - *out = new(FieldValueErrorReason) - **out = **in - } - if in.OptionalOldSelf != nil { - in, out := &in.OptionalOldSelf, &out.OptionalOldSelf - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. -func (in *ValidationRule) DeepCopy() *ValidationRule { - if in == nil { - return nil - } - out := new(ValidationRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ValidationRules) DeepCopyInto(out *ValidationRules) { - { - in := &in - *out = make(ValidationRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. -func (in ValidationRules) DeepCopy() ValidationRules { - if in == nil { - return nil - } - out := new(ValidationRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. -func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { - if in == nil { - return nil - } - out := new(WebhookClientConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookConversion) DeepCopyInto(out *WebhookConversion) { - *out = *in - if in.ClientConfig != nil { - in, out := &in.ClientConfig, &out.ClientConfig - *out = new(WebhookClientConfig) - (*in).DeepCopyInto(*out) - } - if in.ConversionReviewVersions != nil { - in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConversion. -func (in *WebhookConversion) DeepCopy() *WebhookConversion { - if in == nil { - return nil - } - out := new(WebhookConversion) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.defaults.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.defaults.go deleted file mode 100644 index 2bc705780..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.defaults.go +++ /dev/null @@ -1,58 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&CustomResourceDefinition{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinition(obj.(*CustomResourceDefinition)) }) - scheme.AddTypeDefaultingFunc(&CustomResourceDefinitionList{}, func(obj interface{}) { - SetObjectDefaults_CustomResourceDefinitionList(obj.(*CustomResourceDefinitionList)) - }) - return nil -} - -func SetObjectDefaults_CustomResourceDefinition(in *CustomResourceDefinition) { - SetDefaults_CustomResourceDefinition(in) - SetDefaults_CustomResourceDefinitionSpec(&in.Spec) - if in.Spec.Conversion != nil { - if in.Spec.Conversion.Webhook != nil { - if in.Spec.Conversion.Webhook.ClientConfig != nil { - if in.Spec.Conversion.Webhook.ClientConfig.Service != nil { - SetDefaults_ServiceReference(in.Spec.Conversion.Webhook.ClientConfig.Service) - } - } - } - } -} - -func SetObjectDefaults_CustomResourceDefinitionList(in *CustomResourceDefinitionList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_CustomResourceDefinition(a) - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go deleted file mode 100644 index 285fdd9fa..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.model_name.go +++ /dev/null @@ -1,157 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionRequest) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionResponse) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionReview) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ConversionReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceColumnDefinition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceColumnDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceConversion) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceConversion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionCondition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionList) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionNames) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionNames" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionSpec) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionStatus) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionVersion) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceDefinitionVersion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresourceScale) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceScale" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresourceStatus) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresourceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresources) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceSubresources" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceValidation) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.CustomResourceValidation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ExternalDocumentation) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ExternalDocumentation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSON) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSON" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaProps) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaProps" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrArray) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrArray" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrBool) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrBool" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrStringArray) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.JSONSchemaPropsOrStringArray" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SelectableField) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.SelectableField" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceReference) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ServiceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ValidationRule) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.ValidationRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebhookClientConfig) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookClientConfig" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebhookConversion) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1.WebhookConversion" -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index e3acc247c..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,40 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1 - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { - return 1, 16 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { - return 1, 16 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { - return 1, 16 -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions deleted file mode 100644 index 7408dd121..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/.import-restrictions +++ /dev/null @@ -1,5 +0,0 @@ -inverseRules: - # Allow use of this package in all k8s.io packages. - - selectorRegexp: k8s[.]io - allowedPrefixes: - - '' diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go deleted file mode 100644 index 91c55dba4..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/conversion.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - "bytes" - - "k8s.io/apimachinery/pkg/conversion" - "k8s.io/apimachinery/pkg/util/json" - - "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" -) - -func Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { - if err := autoConvert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in, out, s); err != nil { - return err - } - if in.Default != nil && *(in.Default) == nil { - out.Default = nil - } - if in.Example != nil && *(in.Example) == nil { - out.Example = nil - } - return nil -} - -var nullLiteral = []byte(`null`) - -func Convert_apiextensions_JSON_To_v1beta1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { - raw, err := json.Marshal(*in) - if err != nil { - return err - } - if len(raw) == 0 || bytes.Equal(raw, nullLiteral) { - // match JSON#UnmarshalJSON treatment of literal nulls - out.Raw = nil - } else { - out.Raw = raw - } - return nil -} - -func Convert_v1beta1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { - if in != nil { - var i interface{} - if len(in.Raw) > 0 && !bytes.Equal(in.Raw, nullLiteral) { - if err := json.Unmarshal(in.Raw, &i); err != nil { - return err - } - } - *out = i - } else { - *out = nil - } - return nil -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go deleted file mode 100644 index 3a2ee6807..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/deepcopy.go +++ /dev/null @@ -1,278 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -// TODO: Update this after a tag is created for interface fields in DeepCopy -func (in *JSONSchemaProps) DeepCopy() *JSONSchemaProps { - if in == nil { - return nil - } - out := new(JSONSchemaProps) - *out = *in - - if in.Ref != nil { - in, out := &in.Ref, &out.Ref - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - - if in.Maximum != nil { - in, out := &in.Maximum, &out.Maximum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.Minimum != nil { - in, out := &in.Minimum, &out.Minimum - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.MaxLength != nil { - in, out := &in.MaxLength, &out.MaxLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinLength != nil { - in, out := &in.MinLength, &out.MinLength - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - if in.MaxItems != nil { - in, out := &in.MaxItems, &out.MaxItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinItems != nil { - in, out := &in.MinItems, &out.MinItems - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MultipleOf != nil { - in, out := &in.MultipleOf, &out.MultipleOf - if *in == nil { - *out = nil - } else { - *out = new(float64) - **out = **in - } - } - - if in.MaxProperties != nil { - in, out := &in.MaxProperties, &out.MaxProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.MinProperties != nil { - in, out := &in.MinProperties, &out.MinProperties - if *in == nil { - *out = nil - } else { - *out = new(int64) - **out = **in - } - } - - if in.Required != nil { - in, out := &in.Required, &out.Required - *out = make([]string, len(*in)) - copy(*out, *in) - } - - if in.Items != nil { - in, out := &in.Items, &out.Items - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrArray) - (*in).DeepCopyInto(*out) - } - } - - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - - if in.Not != nil { - in, out := &in.Not, &out.Not - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaProps) - (*in).DeepCopyInto(*out) - } - } - - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - if *in == nil { - *out = nil - } else { - *out = new(JSONSchemaPropsOrBool) - (*in).DeepCopyInto(*out) - } - } - - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - - if in.ExternalDocs != nil { - in, out := &in.ExternalDocs, &out.ExternalDocs - if *in == nil { - *out = nil - } else { - *out = new(ExternalDocumentation) - (*in).DeepCopyInto(*out) - } - } - - if in.XPreserveUnknownFields != nil { - in, out := &in.XPreserveUnknownFields, &out.XPreserveUnknownFields - if *in == nil { - *out = nil - } else { - *out = new(bool) - **out = **in - } - } - - if in.XListMapKeys != nil { - in, out := &in.XListMapKeys, &out.XListMapKeys - *out = make([]string, len(*in)) - copy(*out, *in) - } - - if in.XListType != nil { - in, out := &in.XListType, &out.XListType - if *in == nil { - *out = nil - } else { - *out = new(string) - **out = **in - } - } - - if in.XMapType != nil { - in, out := &in.XMapType, &out.XMapType - *out = new(string) - **out = **in - } - - if in.XValidations != nil { - inValidations, outValidations := &in.XValidations, &out.XValidations - *outValidations = make([]ValidationRule, len(*inValidations)) - for i := range *inValidations { - in.XValidations[i].DeepCopyInto(&out.XValidations[i]) - } - } - - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go deleted file mode 100644 index 02898ae50..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/defaults.go +++ /dev/null @@ -1,82 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - "strings" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/ptr" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -func SetDefaults_CustomResourceDefinition(obj *CustomResourceDefinition) { - SetDefaults_CustomResourceDefinitionSpec(&obj.Spec) - if len(obj.Status.StoredVersions) == 0 { - for _, v := range obj.Spec.Versions { - if v.Storage { - obj.Status.StoredVersions = append(obj.Status.StoredVersions, v.Name) - break - } - } - } -} - -func SetDefaults_CustomResourceDefinitionSpec(obj *CustomResourceDefinitionSpec) { - if len(obj.Scope) == 0 { - obj.Scope = NamespaceScoped - } - if len(obj.Names.Singular) == 0 { - obj.Names.Singular = strings.ToLower(obj.Names.Kind) - } - if len(obj.Names.ListKind) == 0 && len(obj.Names.Kind) > 0 { - obj.Names.ListKind = obj.Names.Kind + "List" - } - // If there is no list of versions, create on using deprecated Version field. - if len(obj.Versions) == 0 && len(obj.Version) != 0 { - obj.Versions = []CustomResourceDefinitionVersion{{ - Name: obj.Version, - Storage: true, - Served: true, - }} - } - // For backward compatibility set the version field to the first item in versions list. - if len(obj.Version) == 0 && len(obj.Versions) != 0 { - obj.Version = obj.Versions[0].Name - } - if obj.Conversion == nil { - obj.Conversion = &CustomResourceConversion{ - Strategy: NoneConverter, - } - } - if obj.Conversion.Strategy == WebhookConverter && len(obj.Conversion.ConversionReviewVersions) == 0 { - obj.Conversion.ConversionReviewVersions = []string{SchemeGroupVersion.Version} - } - if obj.PreserveUnknownFields == nil { - obj.PreserveUnknownFields = ptr.To(true) - } -} - -// SetDefaults_ServiceReference sets defaults for Webhook's ServiceReference -func SetDefaults_ServiceReference(obj *ServiceReference) { - if obj.Port == nil { - obj.Port = ptr.To[int32](443) - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go deleted file mode 100644 index ccf0a36a4..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2017 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:conversion-gen=k8s.io/apiextensions-apiserver/pkg/apis/apiextensions -// +k8s:defaulter-gen=TypeMeta -// +k8s:openapi-gen=true -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1 - -// +groupName=apiextensions.k8s.io - -// Package v1beta1 is the v1beta1 version of the API. -package v1beta1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go deleted file mode 100644 index ef4fba850..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.pb.go +++ /dev/null @@ -1,8863 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto - -package v1beta1 - -import ( - encoding_binary "encoding/binary" - fmt "fmt" - - io "io" - "sort" - - runtime "k8s.io/apimachinery/pkg/runtime" - - math "math" - math_bits "math/bits" - reflect "reflect" - strings "strings" - - k8s_io_apimachinery_pkg_types "k8s.io/apimachinery/pkg/types" -) - -func (m *ConversionRequest) Reset() { *m = ConversionRequest{} } - -func (m *ConversionResponse) Reset() { *m = ConversionResponse{} } - -func (m *ConversionReview) Reset() { *m = ConversionReview{} } - -func (m *CustomResourceColumnDefinition) Reset() { *m = CustomResourceColumnDefinition{} } - -func (m *CustomResourceConversion) Reset() { *m = CustomResourceConversion{} } - -func (m *CustomResourceDefinition) Reset() { *m = CustomResourceDefinition{} } - -func (m *CustomResourceDefinitionCondition) Reset() { *m = CustomResourceDefinitionCondition{} } - -func (m *CustomResourceDefinitionList) Reset() { *m = CustomResourceDefinitionList{} } - -func (m *CustomResourceDefinitionNames) Reset() { *m = CustomResourceDefinitionNames{} } - -func (m *CustomResourceDefinitionSpec) Reset() { *m = CustomResourceDefinitionSpec{} } - -func (m *CustomResourceDefinitionStatus) Reset() { *m = CustomResourceDefinitionStatus{} } - -func (m *CustomResourceDefinitionVersion) Reset() { *m = CustomResourceDefinitionVersion{} } - -func (m *CustomResourceSubresourceScale) Reset() { *m = CustomResourceSubresourceScale{} } - -func (m *CustomResourceSubresourceStatus) Reset() { *m = CustomResourceSubresourceStatus{} } - -func (m *CustomResourceSubresources) Reset() { *m = CustomResourceSubresources{} } - -func (m *CustomResourceValidation) Reset() { *m = CustomResourceValidation{} } - -func (m *ExternalDocumentation) Reset() { *m = ExternalDocumentation{} } - -func (m *JSON) Reset() { *m = JSON{} } - -func (m *JSONSchemaProps) Reset() { *m = JSONSchemaProps{} } - -func (m *JSONSchemaPropsOrArray) Reset() { *m = JSONSchemaPropsOrArray{} } - -func (m *JSONSchemaPropsOrBool) Reset() { *m = JSONSchemaPropsOrBool{} } - -func (m *JSONSchemaPropsOrStringArray) Reset() { *m = JSONSchemaPropsOrStringArray{} } - -func (m *SelectableField) Reset() { *m = SelectableField{} } - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } - -func (m *ValidationRule) Reset() { *m = ValidationRule{} } - -func (m *WebhookClientConfig) Reset() { *m = WebhookClientConfig{} } - -func (m *ConversionRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Objects) > 0 { - for iNdEx := len(m.Objects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Objects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.DesiredAPIVersion) - copy(dAtA[i:], m.DesiredAPIVersion) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.DesiredAPIVersion))) - i-- - dAtA[i] = 0x12 - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConversionResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - if len(m.ConvertedObjects) > 0 { - for iNdEx := len(m.ConvertedObjects) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.ConvertedObjects[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - i -= len(m.UID) - copy(dAtA[i:], m.UID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.UID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ConversionReview) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ConversionReview) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ConversionReview) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Response != nil { - { - size, err := m.Response.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Request != nil { - { - size, err := m.Request.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceColumnDefinition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceColumnDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceColumnDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.JSONPath) - copy(dAtA[i:], m.JSONPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) - i-- - dAtA[i] = 0x32 - i = encodeVarintGenerated(dAtA, i, uint64(m.Priority)) - i-- - dAtA[i] = 0x28 - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - i -= len(m.Format) - copy(dAtA[i:], m.Format) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Format))) - i-- - dAtA[i] = 0x1a - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x12 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceConversion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceConversion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceConversion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ConversionReviewVersions) > 0 { - for iNdEx := len(m.ConversionReviewVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ConversionReviewVersions[iNdEx]) - copy(dAtA[i:], m.ConversionReviewVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ConversionReviewVersions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.WebhookClientConfig != nil { - { - size, err := m.WebhookClientConfig.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i -= len(m.Strategy) - copy(dAtA[i:], m.Strategy) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Strategy))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x30 - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionNames) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionNames) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionNames) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Categories) > 0 { - for iNdEx := len(m.Categories) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Categories[iNdEx]) - copy(dAtA[i:], m.Categories[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Categories[iNdEx]))) - i-- - dAtA[i] = 0x32 - } - } - i -= len(m.ListKind) - copy(dAtA[i:], m.ListKind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ListKind))) - i-- - dAtA[i] = 0x2a - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Kind))) - i-- - dAtA[i] = 0x22 - if len(m.ShortNames) > 0 { - for iNdEx := len(m.ShortNames) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ShortNames[iNdEx]) - copy(dAtA[i:], m.ShortNames[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ShortNames[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - i -= len(m.Singular) - copy(dAtA[i:], m.Singular) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Singular))) - i-- - dAtA[i] = 0x12 - i -= len(m.Plural) - copy(dAtA[i:], m.Plural) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Plural))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SelectableFields) > 0 { - for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x5a - } - } - if m.PreserveUnknownFields != nil { - i-- - if *m.PreserveUnknownFields { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.Conversion != nil { - { - size, err := m.Conversion.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.AdditionalPrinterColumns) > 0 { - for iNdEx := len(m.AdditionalPrinterColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdditionalPrinterColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.Versions) > 0 { - for iNdEx := len(m.Versions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Versions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if m.Subresources != nil { - { - size, err := m.Subresources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - if m.Validation != nil { - { - size, err := m.Validation.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - i -= len(m.Scope) - copy(dAtA[i:], m.Scope) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Scope))) - i-- - dAtA[i] = 0x22 - { - size, err := m.Names.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.ObservedGeneration)) - i-- - dAtA[i] = 0x20 - if len(m.StoredVersions) > 0 { - for iNdEx := len(m.StoredVersions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.StoredVersions[iNdEx]) - copy(dAtA[i:], m.StoredVersions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StoredVersions[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - { - size, err := m.AcceptedNames.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceDefinitionVersion) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceDefinitionVersion) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceDefinitionVersion) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.SelectableFields) > 0 { - for iNdEx := len(m.SelectableFields) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.SelectableFields[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if m.DeprecationWarning != nil { - i -= len(*m.DeprecationWarning) - copy(dAtA[i:], *m.DeprecationWarning) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.DeprecationWarning))) - i-- - dAtA[i] = 0x42 - } - i-- - if m.Deprecated { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x38 - if len(m.AdditionalPrinterColumns) > 0 { - for iNdEx := len(m.AdditionalPrinterColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AdditionalPrinterColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x32 - } - } - if m.Subresources != nil { - { - size, err := m.Subresources.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - i-- - if m.Storage { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - i-- - if m.Served { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresourceScale) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresourceScale) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresourceScale) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.LabelSelectorPath != nil { - i -= len(*m.LabelSelectorPath) - copy(dAtA[i:], *m.LabelSelectorPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.LabelSelectorPath))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.StatusReplicasPath) - copy(dAtA[i:], m.StatusReplicasPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.StatusReplicasPath))) - i-- - dAtA[i] = 0x12 - i -= len(m.SpecReplicasPath) - copy(dAtA[i:], m.SpecReplicasPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.SpecReplicasPath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresourceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresourceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresourceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *CustomResourceSubresources) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceSubresources) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceSubresources) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Scale != nil { - { - size, err := m.Scale.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Status != nil { - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *CustomResourceValidation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *CustomResourceValidation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *CustomResourceValidation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OpenAPIV3Schema != nil { - { - size, err := m.OpenAPIV3Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ExternalDocumentation) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ExternalDocumentation) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ExternalDocumentation) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.URL) - copy(dAtA[i:], m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.URL))) - i-- - dAtA[i] = 0x12 - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *JSON) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSON) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSON) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Raw != nil { - i -= len(m.Raw) - copy(dAtA[i:], m.Raw) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Raw))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *JSONSchemaProps) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaProps) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaProps) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.XValidations) > 0 { - for iNdEx := len(m.XValidations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.XValidations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xe2 - } - } - if m.XMapType != nil { - i -= len(*m.XMapType) - copy(dAtA[i:], *m.XMapType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.XMapType))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xda - } - if m.XListType != nil { - i -= len(*m.XListType) - copy(dAtA[i:], *m.XListType) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.XListType))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xd2 - } - if len(m.XListMapKeys) > 0 { - for iNdEx := len(m.XListMapKeys) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.XListMapKeys[iNdEx]) - copy(dAtA[i:], m.XListMapKeys[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.XListMapKeys[iNdEx]))) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xca - } - } - i-- - if m.XIntOrString { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xc0 - i-- - if m.XEmbeddedResource { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb8 - if m.XPreserveUnknownFields != nil { - i-- - if *m.XPreserveUnknownFields { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xb0 - } - i-- - if m.Nullable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa8 - if m.Example != nil { - { - size, err := m.Example.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0xa2 - } - if m.ExternalDocs != nil { - { - size, err := m.ExternalDocs.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x9a - } - if len(m.Definitions) > 0 { - keysForDefinitions := make([]string, 0, len(m.Definitions)) - for k := range m.Definitions { - keysForDefinitions = append(keysForDefinitions, string(k)) - } - sort.Strings(keysForDefinitions) - for iNdEx := len(keysForDefinitions) - 1; iNdEx >= 0; iNdEx-- { - v := m.Definitions[string(keysForDefinitions[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForDefinitions[iNdEx]) - copy(dAtA[i:], keysForDefinitions[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDefinitions[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x92 - } - } - if m.AdditionalItems != nil { - { - size, err := m.AdditionalItems.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x8a - } - if len(m.Dependencies) > 0 { - keysForDependencies := make([]string, 0, len(m.Dependencies)) - for k := range m.Dependencies { - keysForDependencies = append(keysForDependencies, string(k)) - } - sort.Strings(keysForDependencies) - for iNdEx := len(keysForDependencies) - 1; iNdEx >= 0; iNdEx-- { - v := m.Dependencies[string(keysForDependencies[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForDependencies[iNdEx]) - copy(dAtA[i:], keysForDependencies[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForDependencies[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x2 - i-- - dAtA[i] = 0x82 - } - } - if len(m.PatternProperties) > 0 { - keysForPatternProperties := make([]string, 0, len(m.PatternProperties)) - for k := range m.PatternProperties { - keysForPatternProperties = append(keysForPatternProperties, string(k)) - } - sort.Strings(keysForPatternProperties) - for iNdEx := len(keysForPatternProperties) - 1; iNdEx >= 0; iNdEx-- { - v := m.PatternProperties[string(keysForPatternProperties[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForPatternProperties[iNdEx]) - copy(dAtA[i:], keysForPatternProperties[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForPatternProperties[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xfa - } - } - if m.AdditionalProperties != nil { - { - size, err := m.AdditionalProperties.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xf2 - } - if len(m.Properties) > 0 { - keysForProperties := make([]string, 0, len(m.Properties)) - for k := range m.Properties { - keysForProperties = append(keysForProperties, string(k)) - } - sort.Strings(keysForProperties) - for iNdEx := len(keysForProperties) - 1; iNdEx >= 0; iNdEx-- { - v := m.Properties[string(keysForProperties[iNdEx])] - baseI := i - { - size, err := (&v).MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - i -= len(keysForProperties[iNdEx]) - copy(dAtA[i:], keysForProperties[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(keysForProperties[iNdEx]))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenerated(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xea - } - } - if m.Not != nil { - { - size, err := m.Not.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xe2 - } - if len(m.AnyOf) > 0 { - for iNdEx := len(m.AnyOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AnyOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xda - } - } - if len(m.OneOf) > 0 { - for iNdEx := len(m.OneOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.OneOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xd2 - } - } - if len(m.AllOf) > 0 { - for iNdEx := len(m.AllOf) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AllOf[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xca - } - } - if m.Items != nil { - { - size, err := m.Items.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xc2 - } - if len(m.Required) > 0 { - for iNdEx := len(m.Required) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Required[iNdEx]) - copy(dAtA[i:], m.Required[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Required[iNdEx]))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xba - } - } - if m.MinProperties != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinProperties)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xb0 - } - if m.MaxProperties != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxProperties)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa8 - } - if len(m.Enum) > 0 { - for iNdEx := len(m.Enum) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Enum[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0xa2 - } - } - if m.MultipleOf != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.MultipleOf)))) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x99 - } - i-- - if m.UniqueItems { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x90 - if m.MinItems != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinItems)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x88 - } - if m.MaxItems != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxItems)) - i-- - dAtA[i] = 0x1 - i-- - dAtA[i] = 0x80 - } - i -= len(m.Pattern) - copy(dAtA[i:], m.Pattern) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Pattern))) - i-- - dAtA[i] = 0x7a - if m.MinLength != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MinLength)) - i-- - dAtA[i] = 0x70 - } - if m.MaxLength != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.MaxLength)) - i-- - dAtA[i] = 0x68 - } - i-- - if m.ExclusiveMinimum { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - if m.Minimum != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Minimum)))) - i-- - dAtA[i] = 0x59 - } - i-- - if m.ExclusiveMaximum { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - if m.Maximum != nil { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(*m.Maximum)))) - i-- - dAtA[i] = 0x49 - } - if m.Default != nil { - { - size, err := m.Default.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - i -= len(m.Title) - copy(dAtA[i:], m.Title) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Title))) - i-- - dAtA[i] = 0x3a - i -= len(m.Format) - copy(dAtA[i:], m.Format) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Format))) - i-- - dAtA[i] = 0x32 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0x2a - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x22 - if m.Ref != nil { - i -= len(*m.Ref) - copy(dAtA[i:], *m.Ref) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Ref))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Schema) - copy(dAtA[i:], m.Schema) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Schema))) - i-- - dAtA[i] = 0x12 - i -= len(m.ID) - copy(dAtA[i:], m.ID) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.ID))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrArray) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.JSONSchemas) > 0 { - for iNdEx := len(m.JSONSchemas) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.JSONSchemas[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrBool) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrBool) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrBool) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - i-- - if m.Allows { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - return len(dAtA) - i, nil -} - -func (m *JSONSchemaPropsOrStringArray) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *JSONSchemaPropsOrStringArray) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *JSONSchemaPropsOrStringArray) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Property) > 0 { - for iNdEx := len(m.Property) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Property[iNdEx]) - copy(dAtA[i:], m.Property[iNdEx]) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Property[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if m.Schema != nil { - { - size, err := m.Schema.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SelectableField) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SelectableField) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SelectableField) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.JSONPath) - copy(dAtA[i:], m.JSONPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.JSONPath))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ServiceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x20 - } - if m.Path != nil { - i -= len(*m.Path) - copy(dAtA[i:], *m.Path) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Path))) - i-- - dAtA[i] = 0x1a - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *ValidationRule) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ValidationRule) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ValidationRule) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.OptionalOldSelf != nil { - i-- - if *m.OptionalOldSelf { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x30 - } - i -= len(m.FieldPath) - copy(dAtA[i:], m.FieldPath) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.FieldPath))) - i-- - dAtA[i] = 0x2a - if m.Reason != nil { - i -= len(*m.Reason) - copy(dAtA[i:], *m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.Reason))) - i-- - dAtA[i] = 0x22 - } - i -= len(m.MessageExpression) - copy(dAtA[i:], m.MessageExpression) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.MessageExpression))) - i-- - dAtA[i] = 0x1a - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 - i -= len(m.Rule) - copy(dAtA[i:], m.Rule) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Rule))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *WebhookClientConfig) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *WebhookClientConfig) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *WebhookClientConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.URL != nil { - i -= len(*m.URL) - copy(dAtA[i:], *m.URL) - i = encodeVarintGenerated(dAtA, i, uint64(len(*m.URL))) - i-- - dAtA[i] = 0x1a - } - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i-- - dAtA[i] = 0x12 - } - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *ConversionRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.DesiredAPIVersion) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Objects) > 0 { - for _, e := range m.Objects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ConversionResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.UID) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ConvertedObjects) > 0 { - for _, e := range m.ConvertedObjects { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.Result.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ConversionReview) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Request != nil { - l = m.Request.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Response != nil { - l = m.Response.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceColumnDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Format) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.Priority)) - l = len(m.JSONPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomResourceConversion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Strategy) - n += 1 + l + sovGenerated(uint64(l)) - if m.WebhookClientConfig != nil { - l = m.WebhookClientConfig.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.ConversionReviewVersions) > 0 { - for _, s := range m.ConversionReviewVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *CustomResourceDefinitionCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - return n -} - -func (m *CustomResourceDefinitionList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinitionNames) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Plural) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Singular) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.ShortNames) > 0 { - for _, s := range m.ShortNames { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = len(m.Kind) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.ListKind) - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Categories) > 0 { - for _, s := range m.Categories { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinitionSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - l = m.Names.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Scope) - n += 1 + l + sovGenerated(uint64(l)) - if m.Validation != nil { - l = m.Validation.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Subresources != nil { - l = m.Subresources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Versions) > 0 { - for _, e := range m.Versions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if len(m.AdditionalPrinterColumns) > 0 { - for _, e := range m.AdditionalPrinterColumns { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - if m.Conversion != nil { - l = m.Conversion.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.PreserveUnknownFields != nil { - n += 2 - } - if len(m.SelectableFields) > 0 { - for _, e := range m.SelectableFields { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceDefinitionStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - l = m.AcceptedNames.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.StoredVersions) > 0 { - for _, s := range m.StoredVersions { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 1 + sovGenerated(uint64(m.ObservedGeneration)) - return n -} - -func (m *CustomResourceDefinitionVersion) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - n += 2 - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Subresources != nil { - l = m.Subresources.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.AdditionalPrinterColumns) > 0 { - for _, e := range m.AdditionalPrinterColumns { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - n += 2 - if m.DeprecationWarning != nil { - l = len(*m.DeprecationWarning) - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.SelectableFields) > 0 { - for _, e := range m.SelectableFields { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *CustomResourceSubresourceScale) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.SpecReplicasPath) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.StatusReplicasPath) - n += 1 + l + sovGenerated(uint64(l)) - if m.LabelSelectorPath != nil { - l = len(*m.LabelSelectorPath) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceSubresourceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *CustomResourceSubresources) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != nil { - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Scale != nil { - l = m.Scale.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *CustomResourceValidation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.OpenAPIV3Schema != nil { - l = m.OpenAPIV3Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *ExternalDocumentation) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.URL) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *JSON) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Raw != nil { - l = len(m.Raw) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *JSONSchemaProps) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ID) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Schema) - n += 1 + l + sovGenerated(uint64(l)) - if m.Ref != nil { - l = len(*m.Ref) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Description) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Format) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Title) - n += 1 + l + sovGenerated(uint64(l)) - if m.Default != nil { - l = m.Default.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Maximum != nil { - n += 9 - } - n += 2 - if m.Minimum != nil { - n += 9 - } - n += 2 - if m.MaxLength != nil { - n += 1 + sovGenerated(uint64(*m.MaxLength)) - } - if m.MinLength != nil { - n += 1 + sovGenerated(uint64(*m.MinLength)) - } - l = len(m.Pattern) - n += 1 + l + sovGenerated(uint64(l)) - if m.MaxItems != nil { - n += 2 + sovGenerated(uint64(*m.MaxItems)) - } - if m.MinItems != nil { - n += 2 + sovGenerated(uint64(*m.MinItems)) - } - n += 3 - if m.MultipleOf != nil { - n += 10 - } - if len(m.Enum) > 0 { - for _, e := range m.Enum { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.MaxProperties != nil { - n += 2 + sovGenerated(uint64(*m.MaxProperties)) - } - if m.MinProperties != nil { - n += 2 + sovGenerated(uint64(*m.MinProperties)) - } - if len(m.Required) > 0 { - for _, s := range m.Required { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.Items != nil { - l = m.Items.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.AllOf) > 0 { - for _, e := range m.AllOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.OneOf) > 0 { - for _, e := range m.OneOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if len(m.AnyOf) > 0 { - for _, e := range m.AnyOf { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.Not != nil { - l = m.Not.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.Properties) > 0 { - for k, v := range m.Properties { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.AdditionalProperties != nil { - l = m.AdditionalProperties.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.PatternProperties) > 0 { - for k, v := range m.PatternProperties { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if len(m.Dependencies) > 0 { - for k, v := range m.Dependencies { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.AdditionalItems != nil { - l = m.AdditionalItems.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.Definitions) > 0 { - for k, v := range m.Definitions { - _ = k - _ = v - l = v.Size() - mapEntrySize := 1 + len(k) + sovGenerated(uint64(len(k))) + 1 + l + sovGenerated(uint64(l)) - n += mapEntrySize + 2 + sovGenerated(uint64(mapEntrySize)) - } - } - if m.ExternalDocs != nil { - l = m.ExternalDocs.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - if m.Example != nil { - l = m.Example.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - n += 3 - if m.XPreserveUnknownFields != nil { - n += 3 - } - n += 3 - n += 3 - if len(m.XListMapKeys) > 0 { - for _, s := range m.XListMapKeys { - l = len(s) - n += 2 + l + sovGenerated(uint64(l)) - } - } - if m.XListType != nil { - l = len(*m.XListType) - n += 2 + l + sovGenerated(uint64(l)) - } - if m.XMapType != nil { - l = len(*m.XMapType) - n += 2 + l + sovGenerated(uint64(l)) - } - if len(m.XValidations) > 0 { - for _, e := range m.XValidations { - l = e.Size() - n += 2 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JSONSchemaPropsOrArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.JSONSchemas) > 0 { - for _, e := range m.JSONSchemas { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *JSONSchemaPropsOrBool) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += 2 - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func (m *JSONSchemaPropsOrStringArray) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Schema != nil { - l = m.Schema.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if len(m.Property) > 0 { - for _, s := range m.Property { - l = len(s) - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *SelectableField) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.JSONPath) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *ServiceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Path != nil { - l = len(*m.Path) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func (m *ValidationRule) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Rule) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.MessageExpression) - n += 1 + l + sovGenerated(uint64(l)) - if m.Reason != nil { - l = len(*m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.FieldPath) - n += 1 + l + sovGenerated(uint64(l)) - if m.OptionalOldSelf != nil { - n += 2 - } - return n -} - -func (m *WebhookClientConfig) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - if m.URL != nil { - l = len(*m.URL) - n += 1 + l + sovGenerated(uint64(l)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *ConversionRequest) String() string { - if this == nil { - return "nil" - } - repeatedStringForObjects := "[]RawExtension{" - for _, f := range this.Objects { - repeatedStringForObjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForObjects += "}" - s := strings.Join([]string{`&ConversionRequest{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `DesiredAPIVersion:` + fmt.Sprintf("%v", this.DesiredAPIVersion) + `,`, - `Objects:` + repeatedStringForObjects + `,`, - `}`, - }, "") - return s -} -func (this *ConversionResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForConvertedObjects := "[]RawExtension{" - for _, f := range this.ConvertedObjects { - repeatedStringForConvertedObjects += fmt.Sprintf("%v", f) + "," - } - repeatedStringForConvertedObjects += "}" - s := strings.Join([]string{`&ConversionResponse{`, - `UID:` + fmt.Sprintf("%v", this.UID) + `,`, - `ConvertedObjects:` + repeatedStringForConvertedObjects + `,`, - `Result:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Result), "Status", "v1.Status", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *ConversionReview) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConversionReview{`, - `Request:` + strings.Replace(this.Request.String(), "ConversionRequest", "ConversionRequest", 1) + `,`, - `Response:` + strings.Replace(this.Response.String(), "ConversionResponse", "ConversionResponse", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceColumnDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceColumnDefinition{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Format:` + fmt.Sprintf("%v", this.Format) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Priority:` + fmt.Sprintf("%v", this.Priority) + `,`, - `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceConversion) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceConversion{`, - `Strategy:` + fmt.Sprintf("%v", this.Strategy) + `,`, - `WebhookClientConfig:` + strings.Replace(this.WebhookClientConfig.String(), "WebhookClientConfig", "WebhookClientConfig", 1) + `,`, - `ConversionReviewVersions:` + fmt.Sprintf("%v", this.ConversionReviewVersions) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinition{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "CustomResourceDefinitionSpec", "CustomResourceDefinitionSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "CustomResourceDefinitionStatus", "CustomResourceDefinitionStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinitionCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]CustomResourceDefinition{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinition", "CustomResourceDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&CustomResourceDefinitionList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionNames) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceDefinitionNames{`, - `Plural:` + fmt.Sprintf("%v", this.Plural) + `,`, - `Singular:` + fmt.Sprintf("%v", this.Singular) + `,`, - `ShortNames:` + fmt.Sprintf("%v", this.ShortNames) + `,`, - `Kind:` + fmt.Sprintf("%v", this.Kind) + `,`, - `ListKind:` + fmt.Sprintf("%v", this.ListKind) + `,`, - `Categories:` + fmt.Sprintf("%v", this.Categories) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionSpec) String() string { - if this == nil { - return "nil" - } - repeatedStringForVersions := "[]CustomResourceDefinitionVersion{" - for _, f := range this.Versions { - repeatedStringForVersions += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinitionVersion", "CustomResourceDefinitionVersion", 1), `&`, ``, 1) + "," - } - repeatedStringForVersions += "}" - repeatedStringForAdditionalPrinterColumns := "[]CustomResourceColumnDefinition{" - for _, f := range this.AdditionalPrinterColumns { - repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForAdditionalPrinterColumns += "}" - repeatedStringForSelectableFields := "[]SelectableField{" - for _, f := range this.SelectableFields { - repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectableFields += "}" - s := strings.Join([]string{`&CustomResourceDefinitionSpec{`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `Names:` + strings.Replace(strings.Replace(this.Names.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, - `Scope:` + fmt.Sprintf("%v", this.Scope) + `,`, - `Validation:` + strings.Replace(this.Validation.String(), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, - `Subresources:` + strings.Replace(this.Subresources.String(), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, - `Versions:` + repeatedStringForVersions + `,`, - `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, - `Conversion:` + strings.Replace(this.Conversion.String(), "CustomResourceConversion", "CustomResourceConversion", 1) + `,`, - `PreserveUnknownFields:` + valueToStringGenerated(this.PreserveUnknownFields) + `,`, - `SelectableFields:` + repeatedStringForSelectableFields + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]CustomResourceDefinitionCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "CustomResourceDefinitionCondition", "CustomResourceDefinitionCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&CustomResourceDefinitionStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `AcceptedNames:` + strings.Replace(strings.Replace(this.AcceptedNames.String(), "CustomResourceDefinitionNames", "CustomResourceDefinitionNames", 1), `&`, ``, 1) + `,`, - `StoredVersions:` + fmt.Sprintf("%v", this.StoredVersions) + `,`, - `ObservedGeneration:` + fmt.Sprintf("%v", this.ObservedGeneration) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceDefinitionVersion) String() string { - if this == nil { - return "nil" - } - repeatedStringForAdditionalPrinterColumns := "[]CustomResourceColumnDefinition{" - for _, f := range this.AdditionalPrinterColumns { - repeatedStringForAdditionalPrinterColumns += strings.Replace(strings.Replace(f.String(), "CustomResourceColumnDefinition", "CustomResourceColumnDefinition", 1), `&`, ``, 1) + "," - } - repeatedStringForAdditionalPrinterColumns += "}" - repeatedStringForSelectableFields := "[]SelectableField{" - for _, f := range this.SelectableFields { - repeatedStringForSelectableFields += strings.Replace(strings.Replace(f.String(), "SelectableField", "SelectableField", 1), `&`, ``, 1) + "," - } - repeatedStringForSelectableFields += "}" - s := strings.Join([]string{`&CustomResourceDefinitionVersion{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Served:` + fmt.Sprintf("%v", this.Served) + `,`, - `Storage:` + fmt.Sprintf("%v", this.Storage) + `,`, - `Schema:` + strings.Replace(this.Schema.String(), "CustomResourceValidation", "CustomResourceValidation", 1) + `,`, - `Subresources:` + strings.Replace(this.Subresources.String(), "CustomResourceSubresources", "CustomResourceSubresources", 1) + `,`, - `AdditionalPrinterColumns:` + repeatedStringForAdditionalPrinterColumns + `,`, - `Deprecated:` + fmt.Sprintf("%v", this.Deprecated) + `,`, - `DeprecationWarning:` + valueToStringGenerated(this.DeprecationWarning) + `,`, - `SelectableFields:` + repeatedStringForSelectableFields + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresourceScale) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresourceScale{`, - `SpecReplicasPath:` + fmt.Sprintf("%v", this.SpecReplicasPath) + `,`, - `StatusReplicasPath:` + fmt.Sprintf("%v", this.StatusReplicasPath) + `,`, - `LabelSelectorPath:` + valueToStringGenerated(this.LabelSelectorPath) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresourceStatus) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresourceStatus{`, - `}`, - }, "") - return s -} -func (this *CustomResourceSubresources) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceSubresources{`, - `Status:` + strings.Replace(this.Status.String(), "CustomResourceSubresourceStatus", "CustomResourceSubresourceStatus", 1) + `,`, - `Scale:` + strings.Replace(this.Scale.String(), "CustomResourceSubresourceScale", "CustomResourceSubresourceScale", 1) + `,`, - `}`, - }, "") - return s -} -func (this *CustomResourceValidation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&CustomResourceValidation{`, - `OpenAPIV3Schema:` + strings.Replace(this.OpenAPIV3Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `}`, - }, "") - return s -} -func (this *ExternalDocumentation) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ExternalDocumentation{`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `URL:` + fmt.Sprintf("%v", this.URL) + `,`, - `}`, - }, "") - return s -} -func (this *JSON) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSON{`, - `Raw:` + valueToStringGenerated(this.Raw) + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaProps) String() string { - if this == nil { - return "nil" - } - repeatedStringForEnum := "[]JSON{" - for _, f := range this.Enum { - repeatedStringForEnum += strings.Replace(strings.Replace(f.String(), "JSON", "JSON", 1), `&`, ``, 1) + "," - } - repeatedStringForEnum += "}" - repeatedStringForAllOf := "[]JSONSchemaProps{" - for _, f := range this.AllOf { - repeatedStringForAllOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForAllOf += "}" - repeatedStringForOneOf := "[]JSONSchemaProps{" - for _, f := range this.OneOf { - repeatedStringForOneOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForOneOf += "}" - repeatedStringForAnyOf := "[]JSONSchemaProps{" - for _, f := range this.AnyOf { - repeatedStringForAnyOf += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForAnyOf += "}" - repeatedStringForXValidations := "[]ValidationRule{" - for _, f := range this.XValidations { - repeatedStringForXValidations += strings.Replace(strings.Replace(f.String(), "ValidationRule", "ValidationRule", 1), `&`, ``, 1) + "," - } - repeatedStringForXValidations += "}" - keysForProperties := make([]string, 0, len(this.Properties)) - for k := range this.Properties { - keysForProperties = append(keysForProperties, k) - } - sort.Strings(keysForProperties) - mapStringForProperties := "map[string]JSONSchemaProps{" - for _, k := range keysForProperties { - mapStringForProperties += fmt.Sprintf("%v: %v,", k, this.Properties[k]) - } - mapStringForProperties += "}" - keysForPatternProperties := make([]string, 0, len(this.PatternProperties)) - for k := range this.PatternProperties { - keysForPatternProperties = append(keysForPatternProperties, k) - } - sort.Strings(keysForPatternProperties) - mapStringForPatternProperties := "map[string]JSONSchemaProps{" - for _, k := range keysForPatternProperties { - mapStringForPatternProperties += fmt.Sprintf("%v: %v,", k, this.PatternProperties[k]) - } - mapStringForPatternProperties += "}" - keysForDependencies := make([]string, 0, len(this.Dependencies)) - for k := range this.Dependencies { - keysForDependencies = append(keysForDependencies, k) - } - sort.Strings(keysForDependencies) - mapStringForDependencies := "JSONSchemaDependencies{" - for _, k := range keysForDependencies { - mapStringForDependencies += fmt.Sprintf("%v: %v,", k, this.Dependencies[k]) - } - mapStringForDependencies += "}" - keysForDefinitions := make([]string, 0, len(this.Definitions)) - for k := range this.Definitions { - keysForDefinitions = append(keysForDefinitions, k) - } - sort.Strings(keysForDefinitions) - mapStringForDefinitions := "JSONSchemaDefinitions{" - for _, k := range keysForDefinitions { - mapStringForDefinitions += fmt.Sprintf("%v: %v,", k, this.Definitions[k]) - } - mapStringForDefinitions += "}" - s := strings.Join([]string{`&JSONSchemaProps{`, - `ID:` + fmt.Sprintf("%v", this.ID) + `,`, - `Schema:` + fmt.Sprintf("%v", this.Schema) + `,`, - `Ref:` + valueToStringGenerated(this.Ref) + `,`, - `Description:` + fmt.Sprintf("%v", this.Description) + `,`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Format:` + fmt.Sprintf("%v", this.Format) + `,`, - `Title:` + fmt.Sprintf("%v", this.Title) + `,`, - `Default:` + strings.Replace(this.Default.String(), "JSON", "JSON", 1) + `,`, - `Maximum:` + valueToStringGenerated(this.Maximum) + `,`, - `ExclusiveMaximum:` + fmt.Sprintf("%v", this.ExclusiveMaximum) + `,`, - `Minimum:` + valueToStringGenerated(this.Minimum) + `,`, - `ExclusiveMinimum:` + fmt.Sprintf("%v", this.ExclusiveMinimum) + `,`, - `MaxLength:` + valueToStringGenerated(this.MaxLength) + `,`, - `MinLength:` + valueToStringGenerated(this.MinLength) + `,`, - `Pattern:` + fmt.Sprintf("%v", this.Pattern) + `,`, - `MaxItems:` + valueToStringGenerated(this.MaxItems) + `,`, - `MinItems:` + valueToStringGenerated(this.MinItems) + `,`, - `UniqueItems:` + fmt.Sprintf("%v", this.UniqueItems) + `,`, - `MultipleOf:` + valueToStringGenerated(this.MultipleOf) + `,`, - `Enum:` + repeatedStringForEnum + `,`, - `MaxProperties:` + valueToStringGenerated(this.MaxProperties) + `,`, - `MinProperties:` + valueToStringGenerated(this.MinProperties) + `,`, - `Required:` + fmt.Sprintf("%v", this.Required) + `,`, - `Items:` + strings.Replace(this.Items.String(), "JSONSchemaPropsOrArray", "JSONSchemaPropsOrArray", 1) + `,`, - `AllOf:` + repeatedStringForAllOf + `,`, - `OneOf:` + repeatedStringForOneOf + `,`, - `AnyOf:` + repeatedStringForAnyOf + `,`, - `Not:` + strings.Replace(this.Not.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `Properties:` + mapStringForProperties + `,`, - `AdditionalProperties:` + strings.Replace(this.AdditionalProperties.String(), "JSONSchemaPropsOrBool", "JSONSchemaPropsOrBool", 1) + `,`, - `PatternProperties:` + mapStringForPatternProperties + `,`, - `Dependencies:` + mapStringForDependencies + `,`, - `AdditionalItems:` + strings.Replace(this.AdditionalItems.String(), "JSONSchemaPropsOrBool", "JSONSchemaPropsOrBool", 1) + `,`, - `Definitions:` + mapStringForDefinitions + `,`, - `ExternalDocs:` + strings.Replace(this.ExternalDocs.String(), "ExternalDocumentation", "ExternalDocumentation", 1) + `,`, - `Example:` + strings.Replace(this.Example.String(), "JSON", "JSON", 1) + `,`, - `Nullable:` + fmt.Sprintf("%v", this.Nullable) + `,`, - `XPreserveUnknownFields:` + valueToStringGenerated(this.XPreserveUnknownFields) + `,`, - `XEmbeddedResource:` + fmt.Sprintf("%v", this.XEmbeddedResource) + `,`, - `XIntOrString:` + fmt.Sprintf("%v", this.XIntOrString) + `,`, - `XListMapKeys:` + fmt.Sprintf("%v", this.XListMapKeys) + `,`, - `XListType:` + valueToStringGenerated(this.XListType) + `,`, - `XMapType:` + valueToStringGenerated(this.XMapType) + `,`, - `XValidations:` + repeatedStringForXValidations + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrArray) String() string { - if this == nil { - return "nil" - } - repeatedStringForJSONSchemas := "[]JSONSchemaProps{" - for _, f := range this.JSONSchemas { - repeatedStringForJSONSchemas += strings.Replace(strings.Replace(f.String(), "JSONSchemaProps", "JSONSchemaProps", 1), `&`, ``, 1) + "," - } - repeatedStringForJSONSchemas += "}" - s := strings.Join([]string{`&JSONSchemaPropsOrArray{`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `JSONSchemas:` + repeatedStringForJSONSchemas + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrBool) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSONSchemaPropsOrBool{`, - `Allows:` + fmt.Sprintf("%v", this.Allows) + `,`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `}`, - }, "") - return s -} -func (this *JSONSchemaPropsOrStringArray) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&JSONSchemaPropsOrStringArray{`, - `Schema:` + strings.Replace(this.Schema.String(), "JSONSchemaProps", "JSONSchemaProps", 1) + `,`, - `Property:` + fmt.Sprintf("%v", this.Property) + `,`, - `}`, - }, "") - return s -} -func (this *SelectableField) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&SelectableField{`, - `JSONPath:` + fmt.Sprintf("%v", this.JSONPath) + `,`, - `}`, - }, "") - return s -} -func (this *ServiceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Path:` + valueToStringGenerated(this.Path) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func (this *ValidationRule) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ValidationRule{`, - `Rule:` + fmt.Sprintf("%v", this.Rule) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `MessageExpression:` + fmt.Sprintf("%v", this.MessageExpression) + `,`, - `Reason:` + valueToStringGenerated(this.Reason) + `,`, - `FieldPath:` + fmt.Sprintf("%v", this.FieldPath) + `,`, - `OptionalOldSelf:` + valueToStringGenerated(this.OptionalOldSelf) + `,`, - `}`, - }, "") - return s -} -func (this *WebhookClientConfig) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&WebhookClientConfig{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `URL:` + valueToStringGenerated(this.URL) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *ConversionRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DesiredAPIVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DesiredAPIVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Objects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Objects = append(m.Objects, runtime.RawExtension{}) - if err := m.Objects[len(m.Objects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConversionResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.UID = k8s_io_apimachinery_pkg_types.UID(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConvertedObjects", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConvertedObjects = append(m.ConvertedObjects, runtime.RawExtension{}) - if err := m.ConvertedObjects[len(m.ConvertedObjects)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ConversionReview) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ConversionReview: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ConversionReview: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Request", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Request == nil { - m.Request = &ConversionRequest{} - } - if err := m.Request.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Response", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Response == nil { - m.Response = &ConversionResponse{} - } - if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceColumnDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceColumnDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceColumnDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Format = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Priority", wireType) - } - m.Priority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Priority |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceConversion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceConversion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceConversion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Strategy", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Strategy = ConversionStrategyType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WebhookClientConfig", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.WebhookClientConfig == nil { - m.WebhookClientConfig = &WebhookClientConfig{} - } - if err := m.WebhookClientConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ConversionReviewVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ConversionReviewVersions = append(m.ConversionReviewVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = CustomResourceDefinitionConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, CustomResourceDefinition{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionNames) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionNames: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Plural", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Plural = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Singular", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Singular = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ShortNames", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ShortNames = append(m.ShortNames, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListKind", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ListKind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Categories", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Categories = append(m.Categories, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Names", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Names.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scope", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Scope = ResourceScope(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validation", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Validation == nil { - m.Validation = &CustomResourceValidation{} - } - if err := m.Validation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subresources == nil { - m.Subresources = &CustomResourceSubresources{} - } - if err := m.Subresources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Versions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Versions = append(m.Versions, CustomResourceDefinitionVersion{}) - if err := m.Versions[len(m.Versions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalPrinterColumns", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalPrinterColumns = append(m.AdditionalPrinterColumns, CustomResourceColumnDefinition{}) - if err := m.AdditionalPrinterColumns[len(m.AdditionalPrinterColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conversion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Conversion == nil { - m.Conversion = &CustomResourceConversion{} - } - if err := m.Conversion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PreserveUnknownFields", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.PreserveUnknownFields = &b - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelectableFields = append(m.SelectableFields, SelectableField{}) - if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, CustomResourceDefinitionCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AcceptedNames", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.AcceptedNames.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StoredVersions", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StoredVersions = append(m.StoredVersions, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ObservedGeneration", wireType) - } - m.ObservedGeneration = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ObservedGeneration |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceDefinitionVersion) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceDefinitionVersion: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceDefinitionVersion: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Served", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Served = bool(v != 0) - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Storage = bool(v != 0) - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &CustomResourceValidation{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subresources", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Subresources == nil { - m.Subresources = &CustomResourceSubresources{} - } - if err := m.Subresources.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalPrinterColumns", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AdditionalPrinterColumns = append(m.AdditionalPrinterColumns, CustomResourceColumnDefinition{}) - if err := m.AdditionalPrinterColumns[len(m.AdditionalPrinterColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Deprecated = bool(v != 0) - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DeprecationWarning", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.DeprecationWarning = &s - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SelectableFields", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SelectableFields = append(m.SelectableFields, SelectableField{}) - if err := m.SelectableFields[len(m.SelectableFields)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresourceScale) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresourceScale: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresourceScale: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SpecReplicasPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SpecReplicasPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field StatusReplicasPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.StatusReplicasPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LabelSelectorPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.LabelSelectorPath = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresourceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresourceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresourceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceSubresources) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceSubresources: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceSubresources: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Status == nil { - m.Status = &CustomResourceSubresourceStatus{} - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Scale", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Scale == nil { - m.Scale = &CustomResourceSubresourceScale{} - } - if err := m.Scale.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *CustomResourceValidation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: CustomResourceValidation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: CustomResourceValidation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OpenAPIV3Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.OpenAPIV3Schema == nil { - m.OpenAPIV3Schema = &JSONSchemaProps{} - } - if err := m.OpenAPIV3Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ExternalDocumentation) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ExternalDocumentation: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ExternalDocumentation: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.URL = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSON) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSON: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSON: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) - if m.Raw == nil { - m.Raw = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaProps) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaProps: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaProps: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ID = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Schema = JSONSchemaURL(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Ref", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Ref = &s - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Format", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Format = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Title = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Default", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Default == nil { - m.Default = &JSON{} - } - if err := m.Default.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Maximum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Maximum = &v2 - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMaximum", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExclusiveMaximum = bool(v != 0) - case 11: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field Minimum", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.Minimum = &v2 - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ExclusiveMinimum", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ExclusiveMinimum = bool(v != 0) - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxLength", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxLength = &v - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinLength", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinLength = &v - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pattern", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Pattern = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 16: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxItems", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxItems = &v - case 17: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinItems", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinItems = &v - case 18: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field UniqueItems", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.UniqueItems = bool(v != 0) - case 19: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field MultipleOf", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - v2 := float64(math.Float64frombits(v)) - m.MultipleOf = &v2 - case 20: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Enum", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Enum = append(m.Enum, JSON{}) - if err := m.Enum[len(m.Enum)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 21: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MaxProperties", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MaxProperties = &v - case 22: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field MinProperties", wireType) - } - var v int64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.MinProperties = &v - case 23: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Required", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Required = append(m.Required, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 24: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Items == nil { - m.Items = &JSONSchemaPropsOrArray{} - } - if err := m.Items.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 25: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AllOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AllOf = append(m.AllOf, JSONSchemaProps{}) - if err := m.AllOf[len(m.AllOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 26: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OneOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OneOf = append(m.OneOf, JSONSchemaProps{}) - if err := m.OneOf[len(m.OneOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 27: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AnyOf", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AnyOf = append(m.AnyOf, JSONSchemaProps{}) - if err := m.AnyOf[len(m.AnyOf)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 28: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Not", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Not == nil { - m.Not = &JSONSchemaProps{} - } - if err := m.Not.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 29: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Properties == nil { - m.Properties = make(map[string]JSONSchemaProps) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Properties[mapkey] = *mapvalue - iNdEx = postIndex - case 30: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalProperties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AdditionalProperties == nil { - m.AdditionalProperties = &JSONSchemaPropsOrBool{} - } - if err := m.AdditionalProperties.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 31: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PatternProperties", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PatternProperties == nil { - m.PatternProperties = make(map[string]JSONSchemaProps) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PatternProperties[mapkey] = *mapvalue - iNdEx = postIndex - case 32: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Dependencies", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Dependencies == nil { - m.Dependencies = make(JSONSchemaDependencies) - } - var mapkey string - mapvalue := &JSONSchemaPropsOrStringArray{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaPropsOrStringArray{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Dependencies[mapkey] = *mapvalue - iNdEx = postIndex - case 33: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AdditionalItems", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.AdditionalItems == nil { - m.AdditionalItems = &JSONSchemaPropsOrBool{} - } - if err := m.AdditionalItems.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 34: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Definitions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Definitions == nil { - m.Definitions = make(JSONSchemaDefinitions) - } - var mapkey string - mapvalue := &JSONSchemaProps{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenerated - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenerated - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapmsglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return ErrInvalidLengthGenerated - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return ErrInvalidLengthGenerated - } - if postmsgIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = &JSONSchemaProps{} - if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { - return err - } - iNdEx = postmsgIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Definitions[mapkey] = *mapvalue - iNdEx = postIndex - case 35: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ExternalDocs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ExternalDocs == nil { - m.ExternalDocs = &ExternalDocumentation{} - } - if err := m.ExternalDocs.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 36: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Example", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Example == nil { - m.Example = &JSON{} - } - if err := m.Example.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 37: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Nullable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Nullable = bool(v != 0) - case 38: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XPreserveUnknownFields", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.XPreserveUnknownFields = &b - case 39: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XEmbeddedResource", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XEmbeddedResource = bool(v != 0) - case 40: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field XIntOrString", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.XIntOrString = bool(v != 0) - case 41: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XListMapKeys", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.XListMapKeys = append(m.XListMapKeys, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 42: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XListType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.XListType = &s - iNdEx = postIndex - case 43: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XMapType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.XMapType = &s - iNdEx = postIndex - case 44: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field XValidations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.XValidations = append(m.XValidations, ValidationRule{}) - if err := m.XValidations[len(m.XValidations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrArray) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONSchemas", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONSchemas = append(m.JSONSchemas, JSONSchemaProps{}) - if err := m.JSONSchemas[len(m.JSONSchemas)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrBool) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrBool: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrBool: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Allows", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Allows = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *JSONSchemaPropsOrStringArray) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: JSONSchemaPropsOrStringArray: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Schema", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Schema == nil { - m.Schema = &JSONSchemaProps{} - } - if err := m.Schema.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Property = append(m.Property, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SelectableField) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SelectableField: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SelectableField: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field JSONPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.JSONPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.Path = &s - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ValidationRule) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ValidationRule: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ValidationRule: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rule", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rule = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field MessageExpression", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.MessageExpression = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := FieldValueErrorReason(dAtA[iNdEx:postIndex]) - m.Reason = &s - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FieldPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FieldPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field OptionalOldSelf", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - b := bool(v != 0) - m.OptionalOldSelf = &b - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *WebhookClientConfig) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: WebhookClientConfig: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: WebhookClientConfig: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - s := string(dAtA[iNdEx:postIndex]) - m.URL = &s - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto deleted file mode 100644 index bc9594992..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/generated.proto +++ /dev/null @@ -1,886 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.apiextensions_apiserver.pkg.apis.apiextensions.v1beta1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1"; - -// ConversionRequest describes the conversion request parameters. -message ConversionRequest { - // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are - // otherwise identical (parallel requests, etc). - // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - optional string uid = 1; - - // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" - optional string desiredAPIVersion = 2; - - // objects is the list of custom resource objects to be converted. - // +listType=atomic - repeated .k8s.io.apimachinery.pkg.runtime.RawExtension objects = 3; -} - -// ConversionResponse describes a conversion response. -message ConversionResponse { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding `request.uid`. - optional string uid = 1; - - // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. - // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list - // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). - // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. - // +listType=atomic - repeated .k8s.io.apimachinery.pkg.runtime.RawExtension convertedObjects = 2; - - // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if - // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the - // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set - // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` - // will be used to construct an error message for the end user. - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Status result = 3; -} - -// ConversionReview describes a conversion request/response. -message ConversionReview { - // request describes the attributes for the conversion request. - // +optional - optional ConversionRequest request = 1; - - // response describes the attributes for the conversion response. - // +optional - optional ConversionResponse response = 2; -} - -// CustomResourceColumnDefinition specifies a column for server side printing. -message CustomResourceColumnDefinition { - // name is a human readable name for the column. - optional string name = 1; - - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - optional string type = 2; - - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - // +optional - optional string format = 3; - - // description is a human readable description of this column. - // +optional - optional string description = 4; - - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - // +optional - optional int32 priority = 5; - - // JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - optional string JSONPath = 6; -} - -// CustomResourceConversion describes how to convert different versions of a CR. -message CustomResourceConversion { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set. - optional string strategy = 1; - - // webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - // Required when `strategy` is set to `Webhook`. - // +optional - optional WebhookClientConfig webhookClientConfig = 2; - - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // Defaults to `["v1beta1"]`. - // +optional - // +listType=atomic - repeated string conversionReviewVersions = 3; -} - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. -message CustomResourceDefinition { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // spec describes how the user wants the resources to appear - optional CustomResourceDefinitionSpec spec = 2; - - // status indicates the actual state of the CustomResourceDefinition - // +optional - optional CustomResourceDefinitionStatus status = 3; -} - -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -message CustomResourceDefinitionCondition { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - optional string type = 1; - - // status is the status of the condition. - // Can be True, False, Unknown. - optional string status = 2; - - // lastTransitionTime last time the condition transitioned from one status to another. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - optional string reason = 4; - - // message is a human-readable message indicating details about last transition. - // +optional - optional string message = 5; - - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +featureGate=CRDObservedGenerationTracking - // +optional - optional int64 observedGeneration = 6; -} - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -message CustomResourceDefinitionList { - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // items list individual CustomResourceDefinition objects - repeated CustomResourceDefinition items = 2; -} - -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -message CustomResourceDefinitionNames { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - optional string plural = 1; - - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - // +optional - optional string singular = 2; - - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - // +optional - // +listType=atomic - repeated string shortNames = 3; - - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - optional string kind = 4; - - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - // +optional - optional string listKind = 5; - - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - // +optional - // +listType=atomic - repeated string categories = 6; -} - -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -message CustomResourceDefinitionSpec { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - optional string group = 1; - - // version is the API version of the defined custom resource. - // The custom resources are served under `/apis///...`. - // Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. - // Optional if `versions` is specified. - // Deprecated: use `versions` instead. - // +optional - optional string version = 2; - - // names specify the resource and kind names for the custom resource. - optional CustomResourceDefinitionNames names = 3; - - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`. - optional string scope = 4; - - // validation describes the schema used for validation and pruning of the custom resource. - // If present, this validation schema is used to validate all versions. - // Top-level and per-version schemas are mutually exclusive. - // +optional - optional CustomResourceValidation validation = 5; - - // subresources specify what subresources the defined custom resource has. - // If present, this field configures subresources for all versions. - // Top-level and per-version subresources are mutually exclusive. - // +optional - optional CustomResourceSubresources subresources = 6; - - // versions is the list of all API versions of the defined custom resource. - // Optional if `version` is specified. - // The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - // +optional - // +listType=atomic - repeated CustomResourceDefinitionVersion versions = 7; - - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If present, this field configures columns for all versions. - // Top-level and per-version columns are mutually exclusive. - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - repeated CustomResourceColumnDefinition additionalPrinterColumns = 8; - - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - repeated SelectableField selectableFields = 11; - - // conversion defines conversion settings for the CRD. - // +optional - optional CustomResourceConversion conversion = 9; - - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // If false, schemas must be defined for all versions. - // Defaults to true in v1beta for backwards compatibility. - // Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified - // in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - // +optional - optional bool preserveUnknownFields = 10; -} - -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -message CustomResourceDefinitionStatus { - // conditions indicate state for particular aspects of a CustomResourceDefinition - // +optional - // +listType=map - // +listMapKey=type - repeated CustomResourceDefinitionCondition conditions = 1; - - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - // +optional - optional CustomResourceDefinitionNames acceptedNames = 2; - - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - // +optional - // +listType=atomic - repeated string storedVersions = 3; - - // The generation observed by the CRD controller. - // +featureGate=CRDObservedGenerationTracking - // +optional - optional int64 observedGeneration = 4; -} - -// CustomResourceDefinitionVersion describes a version for CRD. -message CustomResourceDefinitionVersion { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - optional string name = 1; - - // served is a flag enabling/disabling this version from being served via REST APIs - optional bool served = 2; - - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - optional bool storage = 3; - - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - // +optional - optional bool deprecated = 7; - - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - // +optional - optional string deprecationWarning = 8; - - // schema describes the schema used for validation and pruning of this version of the custom resource. - // Top-level and per-version schemas are mutually exclusive. - // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). - // +optional - optional CustomResourceValidation schema = 4; - - // subresources specify what subresources this version of the defined custom resource have. - // Top-level and per-version subresources are mutually exclusive. - // Per-version subresources must not all be set to identical values (top-level subresources should be used instead). - // +optional - optional CustomResourceSubresources subresources = 5; - - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // Top-level and per-version columns are mutually exclusive. - // Per-version columns must not all be set to identical values (top-level columns should be used instead). - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - repeated CustomResourceColumnDefinition additionalPrinterColumns = 6; - - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - repeated SelectableField selectableFields = 9; -} - -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -message CustomResourceSubresourceScale { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - optional string specReplicasPath = 1; - - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - optional string statusReplicasPath = 2; - - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - // +optional - optional string labelSelectorPath = 3; -} - -// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. -// Status is represented by the `.status` JSON path inside of a CustomResource. When set, -// * exposes a /status subresource for the custom resource -// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza -// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza -message CustomResourceSubresourceStatus { -} - -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -message CustomResourceSubresources { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - // +optional - optional CustomResourceSubresourceStatus status = 1; - - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - // +optional - optional CustomResourceSubresourceScale scale = 2; -} - -// CustomResourceValidation is a list of validation methods for CustomResources. -message CustomResourceValidation { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - // +optional - optional JSONSchemaProps openAPIV3Schema = 1; -} - -// ExternalDocumentation allows referencing an external resource for extended documentation. -message ExternalDocumentation { - optional string description = 1; - - optional string url = 2; -} - -// JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -message JSON { - optional bytes raw = 1; -} - -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -message JSONSchemaProps { - optional string id = 1; - - optional string schema = 2; - - optional string ref = 3; - - optional string description = 4; - - optional string type = 5; - - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - optional string format = 6; - - optional string title = 7; - - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. - optional JSON default = 8; - - optional double maximum = 9; - - optional bool exclusiveMaximum = 10; - - optional double minimum = 11; - - optional bool exclusiveMinimum = 12; - - optional int64 maxLength = 13; - - optional int64 minLength = 14; - - optional string pattern = 15; - - optional int64 maxItems = 16; - - optional int64 minItems = 17; - - optional bool uniqueItems = 18; - - optional double multipleOf = 19; - - // +listType=atomic - repeated JSON enum = 20; - - optional int64 maxProperties = 21; - - optional int64 minProperties = 22; - - // +listType=atomic - repeated string required = 23; - - optional JSONSchemaPropsOrArray items = 24; - - // +listType=atomic - repeated JSONSchemaProps allOf = 25; - - // +listType=atomic - repeated JSONSchemaProps oneOf = 26; - - // +listType=atomic - repeated JSONSchemaProps anyOf = 27; - - optional JSONSchemaProps not = 28; - - map properties = 29; - - optional JSONSchemaPropsOrBool additionalProperties = 30; - - map patternProperties = 31; - - map dependencies = 32; - - optional JSONSchemaPropsOrBool additionalItems = 33; - - map definitions = 34; - - optional ExternalDocumentation externalDocs = 35; - - optional JSON example = 36; - - optional bool nullable = 37; - - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - optional bool xKubernetesPreserveUnknownFields = 38; - - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - optional bool xKubernetesEmbeddedResource = 39; - - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - optional bool xKubernetesIntOrString = 40; - - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - // - // +optional - // +listType=atomic - repeated string xKubernetesListMapKeys = 41; - - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - // +optional - optional string xKubernetesListType = 42; - - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - // +optional - optional string xKubernetesMapType = 43; - - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // +patchMergeKey=rule - // +patchStrategy=merge - // +listType=map - // +listMapKey=rule - repeated ValidationRule xKubernetesValidations = 44; -} - -// JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps -// or an array of JSONSchemaProps. Mainly here for serialization purposes. -message JSONSchemaPropsOrArray { - optional JSONSchemaProps schema = 1; - - // +listType=atomic - repeated JSONSchemaProps jSONSchemas = 2; -} - -// JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. -// Defaults to true for the boolean property. -message JSONSchemaPropsOrBool { - optional bool allows = 1; - - optional JSONSchemaProps schema = 2; -} - -// JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. -message JSONSchemaPropsOrStringArray { - optional JSONSchemaProps schema = 1; - - // +listType=atomic - repeated string property = 2; -} - -// SelectableField specifies the JSON path of a field that may be used with field selectors. -message SelectableField { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - optional string jsonPath = 1; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // namespace is the namespace of the service. - // Required - optional string namespace = 1; - - // name is the name of the service. - // Required - optional string name = 2; - - // path is an optional URL path at which the webhook will be contacted. - // +optional - optional string path = 3; - - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - // +optional - optional int32 port = 4; -} - -// ValidationRule describes a validation rule written in the CEL expression language. -message ValidationRule { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - optional string rule = 1; - - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - optional string message = 2; - - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - // +optional - optional string messageExpression = 3; - - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - // +optional - optional string reason = 4; - - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - // +optional - optional string fieldPath = 5; - - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - // - // +featureGate=CRDValidationRatcheting - // +optional - optional bool optionalOldSelf = 6; -} - -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -message WebhookClientConfig { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - optional string url = 3; - - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - optional ServiceReference service = 1; - - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - optional bytes caBundle = 2; -} - diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go deleted file mode 100644 index 5e6e82532..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/marshal.go +++ /dev/null @@ -1,293 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - "bytes" - "errors" - - cbor "k8s.io/apimachinery/pkg/runtime/serializer/cbor/direct" - "k8s.io/apimachinery/pkg/util/json" -) - -var jsTrue = []byte("true") -var jsFalse = []byte("false") - -// The CBOR parsing related constants and functions below are not exported so they can be -// easily removed at a future date when the CBOR library provides equivalent functionality. - -type cborMajorType int - -const ( - // https://www.rfc-editor.org/rfc/rfc8949.html#section-3.1 - cborUnsignedInteger cborMajorType = 0 - cborNegativeInteger cborMajorType = 1 - cborByteString cborMajorType = 2 - cborTextString cborMajorType = 3 - cborArray cborMajorType = 4 - cborMap cborMajorType = 5 - cborTag cborMajorType = 6 - cborOther cborMajorType = 7 -) - -const ( - cborFalseValue = 0xf4 - cborTrueValue = 0xf5 - cborNullValue = 0xf6 -) - -func cborType(b byte) cborMajorType { - return cborMajorType(b >> 5) -} - -func (s JSONSchemaPropsOrBool) MarshalJSON() ([]byte, error) { - if s.Schema != nil { - return json.Marshal(s.Schema) - } - - if s.Schema == nil && !s.Allows { - return jsFalse, nil - } - return jsTrue, nil -} - -func (s *JSONSchemaPropsOrBool) UnmarshalJSON(data []byte) error { - var nw JSONSchemaPropsOrBool - switch { - case len(data) == 0: - case data[0] == '{': - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Allows = true - nw.Schema = &sch - case len(data) == 4 && string(data) == "true": - nw.Allows = true - case len(data) == 5 && string(data) == "false": - nw.Allows = false - default: - return errors.New("boolean or JSON schema expected") - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrBool) MarshalCBOR() ([]byte, error) { - if s.Schema != nil { - return cbor.Marshal(s.Schema) - } - return cbor.Marshal(s.Allows) -} - -func (s *JSONSchemaPropsOrBool) UnmarshalCBOR(data []byte) error { - switch { - case len(data) == 0: - // ideally we would avoid modifying *s here, but we are matching the behavior of UnmarshalJSON - *s = JSONSchemaPropsOrBool{} - return nil - case cborType(data[0]) == cborMap: - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrBool{Allows: true, Schema: &p} - return nil - case data[0] == cborTrueValue: - *s = JSONSchemaPropsOrBool{Allows: true} - return nil - case data[0] == cborFalseValue: - *s = JSONSchemaPropsOrBool{Allows: false} - return nil - default: - // ideally, this case would not also capture a null input value, - // but we are matching the behavior of the UnmarshalJSON - return errors.New("boolean or JSON schema expected") - } -} - -func (s JSONSchemaPropsOrStringArray) MarshalJSON() ([]byte, error) { - if len(s.Property) > 0 { - return json.Marshal(s.Property) - } - if s.Schema != nil { - return json.Marshal(s.Schema) - } - return []byte("null"), nil -} - -func (s *JSONSchemaPropsOrStringArray) UnmarshalJSON(data []byte) error { - var first byte - if len(data) > 1 { - first = data[0] - } - var nw JSONSchemaPropsOrStringArray - if first == '{' { - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.Property); err != nil { - return err - } - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrStringArray) MarshalCBOR() ([]byte, error) { - if len(s.Property) > 0 { - return cbor.Marshal(s.Property) - } - if s.Schema != nil { - return cbor.Marshal(s.Schema) - } - return cbor.Marshal(nil) -} - -func (s *JSONSchemaPropsOrStringArray) UnmarshalCBOR(data []byte) error { - if len(data) > 0 && cborType(data[0]) == cborArray { - var a []string - if err := cbor.Unmarshal(data, &a); err != nil { - return err - } - *s = JSONSchemaPropsOrStringArray{Property: a} - return nil - } - if len(data) > 0 && cborType(data[0]) == cborMap { - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrStringArray{Schema: &p} - return nil - } - // At this point we either have: empty data, a null value, or an - // unexpected type. In order to match the behavior of the existing - // UnmarshalJSON, no error is returned and *s is overwritten here. - *s = JSONSchemaPropsOrStringArray{} - return nil -} - -func (s JSONSchemaPropsOrArray) MarshalJSON() ([]byte, error) { - if len(s.JSONSchemas) > 0 { - return json.Marshal(s.JSONSchemas) - } - return json.Marshal(s.Schema) -} - -func (s *JSONSchemaPropsOrArray) UnmarshalJSON(data []byte) error { - var nw JSONSchemaPropsOrArray - var first byte - if len(data) > 1 { - first = data[0] - } - if first == '{' { - var sch JSONSchemaProps - if err := json.Unmarshal(data, &sch); err != nil { - return err - } - nw.Schema = &sch - } - if first == '[' { - if err := json.Unmarshal(data, &nw.JSONSchemas); err != nil { - return err - } - } - *s = nw - return nil -} - -func (s JSONSchemaPropsOrArray) MarshalCBOR() ([]byte, error) { - if len(s.JSONSchemas) > 0 { - return cbor.Marshal(s.JSONSchemas) - } - return cbor.Marshal(s.Schema) -} - -func (s *JSONSchemaPropsOrArray) UnmarshalCBOR(data []byte) error { - if len(data) > 0 && cborType(data[0]) == cborMap { - var p JSONSchemaProps - if err := cbor.Unmarshal(data, &p); err != nil { - return err - } - *s = JSONSchemaPropsOrArray{Schema: &p} - return nil - } - if len(data) > 0 && cborType(data[0]) == cborArray { - var a []JSONSchemaProps - if err := cbor.Unmarshal(data, &a); err != nil { - return err - } - *s = JSONSchemaPropsOrArray{JSONSchemas: a} - return nil - } - // At this point we either have: empty data, a null value, or an - // unexpected type. In order to match the behavior of the existing - // UnmarshalJSON, no error is returned and *s is overwritten here. - *s = JSONSchemaPropsOrArray{} - return nil -} - -func (s JSON) MarshalJSON() ([]byte, error) { - if len(s.Raw) > 0 { - return s.Raw, nil - } - return []byte("null"), nil - -} - -func (s *JSON) UnmarshalJSON(data []byte) error { - if len(data) > 0 && !bytes.Equal(data, nullLiteral) { - s.Raw = append(s.Raw[0:0], data...) - } - return nil -} - -func (s JSON) MarshalCBOR() ([]byte, error) { - // Note that non-semantic whitespace is lost during the transcoding performed here. - // We do not forsee this to be a problem given the current known uses of this type. - // Other limitations that arise when roundtripping JSON via dynamic clients also apply - // here, for example: insignificant whitespace handling, number handling, and map key ordering. - if len(s.Raw) == 0 { - return []byte{cborNullValue}, nil - } - var u any - if err := json.Unmarshal(s.Raw, &u); err != nil { - return nil, err - } - return cbor.Marshal(u) -} - -func (s *JSON) UnmarshalCBOR(data []byte) error { - if len(data) == 0 || data[0] == cborNullValue { - return nil - } - var u any - if err := cbor.Unmarshal(data, &u); err != nil { - return err - } - raw, err := json.Marshal(u) - if err != nil { - return err - } - s.Raw = raw - return nil -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/register.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/register.go deleted file mode 100644 index ac807211b..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/register.go +++ /dev/null @@ -1,62 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -const GroupName = "apiextensions.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes, addDefaultingFuncs) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &CustomResourceDefinition{}, - &CustomResourceDefinitionList{}, - &ConversionReview{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addDefaultingFuncs) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go deleted file mode 100644 index fb844903e..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types.go +++ /dev/null @@ -1,579 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/types" -) - -// ConversionStrategyType describes different conversion types. -type ConversionStrategyType string - -const ( - // KubeAPIApprovedAnnotation is an annotation that must be set to create a CRD for the k8s.io, *.k8s.io, kubernetes.io, or *.kubernetes.io namespaces. - // The value should be a link to a URL where the current spec was approved, so updates to the spec should also update the URL. - // If the API is unapproved, you may set the annotation to a string starting with `"unapproved"`. For instance, `"unapproved, temporarily squatting"` or `"unapproved, experimental-only"`. This is discouraged. - KubeAPIApprovedAnnotation = "api-approved.kubernetes.io" - - // NoneConverter is a converter that only sets apiversion of the CR and leave everything else unchanged. - NoneConverter ConversionStrategyType = "None" - // WebhookConverter is a converter that calls to an external webhook to convert the CR. - WebhookConverter ConversionStrategyType = "Webhook" -) - -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -type CustomResourceDefinitionSpec struct { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - Group string `json:"group" protobuf:"bytes,1,opt,name=group"` - // version is the API version of the defined custom resource. - // The custom resources are served under `/apis///...`. - // Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. - // Optional if `versions` is specified. - // Deprecated: use `versions` instead. - // +optional - Version string `json:"version,omitempty" protobuf:"bytes,2,opt,name=version"` - // names specify the resource and kind names for the custom resource. - Names CustomResourceDefinitionNames `json:"names" protobuf:"bytes,3,opt,name=names"` - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`. - Scope ResourceScope `json:"scope" protobuf:"bytes,4,opt,name=scope,casttype=ResourceScope"` - // validation describes the schema used for validation and pruning of the custom resource. - // If present, this validation schema is used to validate all versions. - // Top-level and per-version schemas are mutually exclusive. - // +optional - Validation *CustomResourceValidation `json:"validation,omitempty" protobuf:"bytes,5,opt,name=validation"` - // subresources specify what subresources the defined custom resource has. - // If present, this field configures subresources for all versions. - // Top-level and per-version subresources are mutually exclusive. - // +optional - Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,6,opt,name=subresources"` - // versions is the list of all API versions of the defined custom resource. - // Optional if `version` is specified. - // The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - // +optional - // +listType=atomic - Versions []CustomResourceDefinitionVersion `json:"versions,omitempty" protobuf:"bytes,7,rep,name=versions"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If present, this field configures columns for all versions. - // Top-level and per-version columns are mutually exclusive. - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,8,rep,name=additionalPrinterColumns"` - - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,11,rep,name=selectableFields"` - - // conversion defines conversion settings for the CRD. - // +optional - Conversion *CustomResourceConversion `json:"conversion,omitempty" protobuf:"bytes,9,opt,name=conversion"` - - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // If false, schemas must be defined for all versions. - // Defaults to true in v1beta for backwards compatibility. - // Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified - // in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - // +optional - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty" protobuf:"varint,10,opt,name=preserveUnknownFields"` -} - -// CustomResourceConversion describes how to convert different versions of a CR. -type CustomResourceConversion struct { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set. - Strategy ConversionStrategyType `json:"strategy" protobuf:"bytes,1,name=strategy"` - - // webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - // Required when `strategy` is set to `Webhook`. - // +optional - WebhookClientConfig *WebhookClientConfig `json:"webhookClientConfig,omitempty" protobuf:"bytes,2,name=webhookClientConfig"` - - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // Defaults to `["v1beta1"]`. - // +optional - // +listType=atomic - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty" protobuf:"bytes,3,rep,name=conversionReviewVersions"` -} - -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -type WebhookClientConfig struct { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - // - // +optional - URL *string `json:"url,omitempty" protobuf:"bytes,3,opt,name=url"` - - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - // - // +optional - Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` - - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - // +optional - CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,2,opt,name=caBundle"` -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // namespace is the namespace of the service. - // Required - Namespace string `json:"namespace" protobuf:"bytes,1,opt,name=namespace"` - // name is the name of the service. - // Required - Name string `json:"name" protobuf:"bytes,2,opt,name=name"` - - // path is an optional URL path at which the webhook will be contacted. - // +optional - Path *string `json:"path,omitempty" protobuf:"bytes,3,opt,name=path"` - - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - // +optional - Port *int32 `json:"port,omitempty" protobuf:"varint,4,opt,name=port"` -} - -// CustomResourceDefinitionVersion describes a version for CRD. -type CustomResourceDefinitionVersion struct { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // served is a flag enabling/disabling this version from being served via REST APIs - Served bool `json:"served" protobuf:"varint,2,opt,name=served"` - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - Storage bool `json:"storage" protobuf:"varint,3,opt,name=storage"` - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - // +optional - Deprecated bool `json:"deprecated,omitempty" protobuf:"varint,7,opt,name=deprecated"` - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - // +optional - DeprecationWarning *string `json:"deprecationWarning,omitempty" protobuf:"bytes,8,opt,name=deprecationWarning"` - // schema describes the schema used for validation and pruning of this version of the custom resource. - // Top-level and per-version schemas are mutually exclusive. - // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). - // +optional - Schema *CustomResourceValidation `json:"schema,omitempty" protobuf:"bytes,4,opt,name=schema"` - // subresources specify what subresources this version of the defined custom resource have. - // Top-level and per-version subresources are mutually exclusive. - // Per-version subresources must not all be set to identical values (top-level subresources should be used instead). - // +optional - Subresources *CustomResourceSubresources `json:"subresources,omitempty" protobuf:"bytes,5,opt,name=subresources"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // Top-level and per-version columns are mutually exclusive. - // Per-version columns must not all be set to identical values (top-level columns should be used instead). - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - // +optional - // +listType=atomic - AdditionalPrinterColumns []CustomResourceColumnDefinition `json:"additionalPrinterColumns,omitempty" protobuf:"bytes,6,rep,name=additionalPrinterColumns"` - - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - // - // +featureGate=CustomResourceFieldSelectors - // +optional - // +listType=atomic - SelectableFields []SelectableField `json:"selectableFields,omitempty" protobuf:"bytes,9,rep,name=selectableFields"` -} - -// SelectableField specifies the JSON path of a field that may be used with field selectors. -type SelectableField struct { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - JSONPath string `json:"jsonPath" protobuf:"bytes,1,opt,name=jsonPath"` -} - -// CustomResourceColumnDefinition specifies a column for server side printing. -type CustomResourceColumnDefinition struct { - // name is a human readable name for the column. - Name string `json:"name" protobuf:"bytes,1,opt,name=name"` - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Type string `json:"type" protobuf:"bytes,2,opt,name=type"` - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - // +optional - Format string `json:"format,omitempty" protobuf:"bytes,3,opt,name=format"` - // description is a human readable description of this column. - // +optional - Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - // +optional - Priority int32 `json:"priority,omitempty" protobuf:"bytes,5,opt,name=priority"` - // JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - JSONPath string `json:"JSONPath" protobuf:"bytes,6,opt,name=JSONPath"` -} - -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -type CustomResourceDefinitionNames struct { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - Plural string `json:"plural" protobuf:"bytes,1,opt,name=plural"` - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - // +optional - Singular string `json:"singular,omitempty" protobuf:"bytes,2,opt,name=singular"` - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - // +optional - // +listType=atomic - ShortNames []string `json:"shortNames,omitempty" protobuf:"bytes,3,opt,name=shortNames"` - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - Kind string `json:"kind" protobuf:"bytes,4,opt,name=kind"` - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - // +optional - ListKind string `json:"listKind,omitempty" protobuf:"bytes,5,opt,name=listKind"` - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - // +optional - // +listType=atomic - Categories []string `json:"categories,omitempty" protobuf:"bytes,6,rep,name=categories"` -} - -// ResourceScope is an enum defining the different scopes available to a custom resource -type ResourceScope string - -const ( - ClusterScoped ResourceScope = "Cluster" - NamespaceScoped ResourceScope = "Namespaced" -) - -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition. -// "ConditionFalse" means a resource is not in the condition. "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// CustomResourceDefinitionConditionType is a valid value for CustomResourceDefinitionCondition.Type -type CustomResourceDefinitionConditionType string - -const ( - // Established means that the resource has become active. A resource is established when all names are - // accepted without a conflict for the first time. A resource stays established until deleted, even during - // a later NamesAccepted due to changed names. Note that not all names can be changed. - Established CustomResourceDefinitionConditionType = "Established" - // NamesAccepted means the names chosen for this CustomResourceDefinition do not conflict with others in - // the group and are therefore accepted. - NamesAccepted CustomResourceDefinitionConditionType = "NamesAccepted" - // NonStructuralSchema means that one or more OpenAPI schema is not structural. - // - // A schema is structural if it specifies types for all values, with the only exceptions of those with - // - x-kubernetes-int-or-string: true — for fields which can be integer or string - // - x-kubernetes-preserve-unknown-fields: true — for raw, unspecified JSON values - // and there is no type, additionalProperties, default, nullable or x-kubernetes-* vendor extenions - // specified under allOf, anyOf, oneOf or not. - // - // Non-structural schemas will not be allowed anymore in v1 API groups. Moreover, new features will not be - // available for non-structural CRDs: - // - pruning - // - defaulting - // - read-only - // - OpenAPI publishing - // - webhook conversion - NonStructuralSchema CustomResourceDefinitionConditionType = "NonStructuralSchema" - // Terminating means that the CustomResourceDefinition has been deleted and is cleaning up. - Terminating CustomResourceDefinitionConditionType = "Terminating" - // KubernetesAPIApprovalPolicyConformant indicates that an API in *.k8s.io or *.kubernetes.io is or is not approved. For CRDs - // outside those groups, this condition will not be set. For CRDs inside those groups, the condition will - // be true if .metadata.annotations["api-approved.kubernetes.io"] is set to a URL, otherwise it will be false. - // See https://github.com/kubernetes/enhancements/pull/1111 for more details. - KubernetesAPIApprovalPolicyConformant CustomResourceDefinitionConditionType = "KubernetesAPIApprovalPolicyConformant" -) - -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -type CustomResourceDefinitionCondition struct { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - Type CustomResourceDefinitionConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=CustomResourceDefinitionConditionType"` - // status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // lastTransitionTime last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // message is a human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,6,opt,name=observedGeneration"` -} - -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -type CustomResourceDefinitionStatus struct { - // conditions indicate state for particular aspects of a CustomResourceDefinition - // +optional - // +listType=map - // +listMapKey=type - Conditions []CustomResourceDefinitionCondition `json:"conditions" protobuf:"bytes,1,opt,name=conditions"` - - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - // +optional - AcceptedNames CustomResourceDefinitionNames `json:"acceptedNames" protobuf:"bytes,2,opt,name=acceptedNames"` - - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - // +optional - // +listType=atomic - StoredVersions []string `json:"storedVersions" protobuf:"bytes,3,rep,name=storedVersions"` - // The generation observed by the CRD controller. - // +featureGate=CRDObservedGenerationTracking - // +optional - ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,4,opt,name=observedGeneration"` -} - -// CustomResourceCleanupFinalizer is the name of the finalizer which will delete instances of -// a CustomResourceDefinition -const CustomResourceCleanupFinalizer = "customresourcecleanup.apiextensions.k8s.io" - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.7 -// +k8s:prerelease-lifecycle-gen:deprecated=1.16 -// +k8s:prerelease-lifecycle-gen:removed=1.22 -// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinition - -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. -type CustomResourceDefinition struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // spec describes how the user wants the resources to appear - Spec CustomResourceDefinitionSpec `json:"spec" protobuf:"bytes,2,opt,name=spec"` - // status indicates the actual state of the CustomResourceDefinition - // +optional - Status CustomResourceDefinitionStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.7 -// +k8s:prerelease-lifecycle-gen:deprecated=1.16 -// +k8s:prerelease-lifecycle-gen:removed=1.22 -// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,CustomResourceDefinitionList - -// CustomResourceDefinitionList is a list of CustomResourceDefinition objects. -type CustomResourceDefinitionList struct { - metav1.TypeMeta `json:",inline"` - - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // items list individual CustomResourceDefinition objects - Items []CustomResourceDefinition `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// CustomResourceValidation is a list of validation methods for CustomResources. -type CustomResourceValidation struct { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - // +optional - OpenAPIV3Schema *JSONSchemaProps `json:"openAPIV3Schema,omitempty" protobuf:"bytes,1,opt,name=openAPIV3Schema"` -} - -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -type CustomResourceSubresources struct { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - // +optional - Status *CustomResourceSubresourceStatus `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"` - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - // +optional - Scale *CustomResourceSubresourceScale `json:"scale,omitempty" protobuf:"bytes,2,opt,name=scale"` -} - -// CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. -// Status is represented by the `.status` JSON path inside of a CustomResource. When set, -// * exposes a /status subresource for the custom resource -// * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza -// * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza -type CustomResourceSubresourceStatus struct{} - -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -type CustomResourceSubresourceScale struct { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - SpecReplicasPath string `json:"specReplicasPath" protobuf:"bytes,1,name=specReplicasPath"` - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - StatusReplicasPath string `json:"statusReplicasPath" protobuf:"bytes,2,opt,name=statusReplicasPath"` - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - // +optional - LabelSelectorPath *string `json:"labelSelectorPath,omitempty" protobuf:"bytes,3,opt,name=labelSelectorPath"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.13 -// +k8s:prerelease-lifecycle-gen:deprecated=1.19 -// This API is never served. It is used for outbound requests from apiservers. This will ensure it never gets served accidentally -// and having the generator against this group will protect future APIs which may be served. -// +k8s:prerelease-lifecycle-gen:replacement=apiextensions.k8s.io,v1,ConversionReview - -// ConversionReview describes a conversion request/response. -type ConversionReview struct { - metav1.TypeMeta `json:",inline"` - // request describes the attributes for the conversion request. - // +optional - Request *ConversionRequest `json:"request,omitempty" protobuf:"bytes,1,opt,name=request"` - // response describes the attributes for the conversion response. - // +optional - Response *ConversionResponse `json:"response,omitempty" protobuf:"bytes,2,opt,name=response"` -} - -// ConversionRequest describes the conversion request parameters. -type ConversionRequest struct { - // uid is an identifier for the individual request/response. It allows distinguishing instances of requests which are - // otherwise identical (parallel requests, etc). - // The UID is meant to track the round trip (request/response) between the Kubernetes API server and the webhook, not the user request. - // It is suitable for correlating log entries between the webhook and apiserver, for either auditing or debugging. - UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` - // desiredAPIVersion is the version to convert given objects to. e.g. "myapi.example.com/v1" - DesiredAPIVersion string `json:"desiredAPIVersion" protobuf:"bytes,2,name=desiredAPIVersion"` - // objects is the list of custom resource objects to be converted. - // +listType=atomic - Objects []runtime.RawExtension `json:"objects" protobuf:"bytes,3,rep,name=objects"` -} - -// ConversionResponse describes a conversion response. -type ConversionResponse struct { - // uid is an identifier for the individual request/response. - // This should be copied over from the corresponding `request.uid`. - UID types.UID `json:"uid" protobuf:"bytes,1,name=uid"` - // convertedObjects is the list of converted version of `request.objects` if the `result` is successful, otherwise empty. - // The webhook is expected to set `apiVersion` of these objects to the `request.desiredAPIVersion`. The list - // must also have the same size as the input list with the same objects in the same order (equal kind, metadata.uid, metadata.name and metadata.namespace). - // The webhook is allowed to mutate labels and annotations. Any other change to the metadata is silently ignored. - // +listType=atomic - ConvertedObjects []runtime.RawExtension `json:"convertedObjects" protobuf:"bytes,2,rep,name=convertedObjects"` - // result contains the result of conversion with extra details if the conversion failed. `result.status` determines if - // the conversion failed or succeeded. The `result.status` field is required and represents the success or failure of the - // conversion. A successful conversion must set `result.status` to `Success`. A failed conversion must set - // `result.status` to `Failure` and provide more details in `result.message` and return http status 200. The `result.message` - // will be used to construct an error message for the end user. - Result metav1.Status `json:"result" protobuf:"bytes,3,name=result"` -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go deleted file mode 100644 index 3ed584dd9..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/types_jsonschema.go +++ /dev/null @@ -1,419 +0,0 @@ -/* -Copyright 2017 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 v1beta1 - -// FieldValueErrorReason is a machine-readable value providing more detail about why a field failed the validation. -// +enum -type FieldValueErrorReason string - -const ( - // FieldValueRequired is used to report required values that are not - // provided (e.g. empty strings, null values, or empty arrays). - FieldValueRequired FieldValueErrorReason = "FieldValueRequired" - // FieldValueDuplicate is used to report collisions of values that must be - // unique (e.g. unique IDs). - FieldValueDuplicate FieldValueErrorReason = "FieldValueDuplicate" - // FieldValueInvalid is used to report malformed values (e.g. failed regex - // match, too long, out of bounds). - FieldValueInvalid FieldValueErrorReason = "FieldValueInvalid" - // FieldValueForbidden is used to report valid (as per formatting rules) - // values which would be accepted under some conditions, but which are not - // permitted by the current conditions (such as security policy). - FieldValueForbidden FieldValueErrorReason = "FieldValueForbidden" -) - -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -type JSONSchemaProps struct { - ID string `json:"id,omitempty" protobuf:"bytes,1,opt,name=id"` - Schema JSONSchemaURL `json:"$schema,omitempty" protobuf:"bytes,2,opt,name=schema"` - Ref *string `json:"$ref,omitempty" protobuf:"bytes,3,opt,name=ref"` - Description string `json:"description,omitempty" protobuf:"bytes,4,opt,name=description"` - Type string `json:"type,omitempty" protobuf:"bytes,5,opt,name=type"` - - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - Format string `json:"format,omitempty" protobuf:"bytes,6,opt,name=format"` - - Title string `json:"title,omitempty" protobuf:"bytes,7,opt,name=title"` - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. - Default *JSON `json:"default,omitempty" protobuf:"bytes,8,opt,name=default"` - Maximum *float64 `json:"maximum,omitempty" protobuf:"bytes,9,opt,name=maximum"` - ExclusiveMaximum bool `json:"exclusiveMaximum,omitempty" protobuf:"bytes,10,opt,name=exclusiveMaximum"` - Minimum *float64 `json:"minimum,omitempty" protobuf:"bytes,11,opt,name=minimum"` - ExclusiveMinimum bool `json:"exclusiveMinimum,omitempty" protobuf:"bytes,12,opt,name=exclusiveMinimum"` - MaxLength *int64 `json:"maxLength,omitempty" protobuf:"bytes,13,opt,name=maxLength"` - MinLength *int64 `json:"minLength,omitempty" protobuf:"bytes,14,opt,name=minLength"` - Pattern string `json:"pattern,omitempty" protobuf:"bytes,15,opt,name=pattern"` - MaxItems *int64 `json:"maxItems,omitempty" protobuf:"bytes,16,opt,name=maxItems"` - MinItems *int64 `json:"minItems,omitempty" protobuf:"bytes,17,opt,name=minItems"` - UniqueItems bool `json:"uniqueItems,omitempty" protobuf:"bytes,18,opt,name=uniqueItems"` - MultipleOf *float64 `json:"multipleOf,omitempty" protobuf:"bytes,19,opt,name=multipleOf"` - // +listType=atomic - Enum []JSON `json:"enum,omitempty" protobuf:"bytes,20,rep,name=enum"` - MaxProperties *int64 `json:"maxProperties,omitempty" protobuf:"bytes,21,opt,name=maxProperties"` - MinProperties *int64 `json:"minProperties,omitempty" protobuf:"bytes,22,opt,name=minProperties"` - // +listType=atomic - Required []string `json:"required,omitempty" protobuf:"bytes,23,rep,name=required"` - Items *JSONSchemaPropsOrArray `json:"items,omitempty" protobuf:"bytes,24,opt,name=items"` - // +listType=atomic - AllOf []JSONSchemaProps `json:"allOf,omitempty" protobuf:"bytes,25,rep,name=allOf"` - // +listType=atomic - OneOf []JSONSchemaProps `json:"oneOf,omitempty" protobuf:"bytes,26,rep,name=oneOf"` - // +listType=atomic - AnyOf []JSONSchemaProps `json:"anyOf,omitempty" protobuf:"bytes,27,rep,name=anyOf"` - Not *JSONSchemaProps `json:"not,omitempty" protobuf:"bytes,28,opt,name=not"` - Properties map[string]JSONSchemaProps `json:"properties,omitempty" protobuf:"bytes,29,rep,name=properties"` - AdditionalProperties *JSONSchemaPropsOrBool `json:"additionalProperties,omitempty" protobuf:"bytes,30,opt,name=additionalProperties"` - PatternProperties map[string]JSONSchemaProps `json:"patternProperties,omitempty" protobuf:"bytes,31,rep,name=patternProperties"` - Dependencies JSONSchemaDependencies `json:"dependencies,omitempty" protobuf:"bytes,32,opt,name=dependencies"` - AdditionalItems *JSONSchemaPropsOrBool `json:"additionalItems,omitempty" protobuf:"bytes,33,opt,name=additionalItems"` - Definitions JSONSchemaDefinitions `json:"definitions,omitempty" protobuf:"bytes,34,opt,name=definitions"` - ExternalDocs *ExternalDocumentation `json:"externalDocs,omitempty" protobuf:"bytes,35,opt,name=externalDocs"` - Example *JSON `json:"example,omitempty" protobuf:"bytes,36,opt,name=example"` - Nullable bool `json:"nullable,omitempty" protobuf:"bytes,37,opt,name=nullable"` - - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty" protobuf:"bytes,38,opt,name=xKubernetesPreserveUnknownFields"` - - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - XEmbeddedResource bool `json:"x-kubernetes-embedded-resource,omitempty" protobuf:"bytes,39,opt,name=xKubernetesEmbeddedResource"` - - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - XIntOrString bool `json:"x-kubernetes-int-or-string,omitempty" protobuf:"bytes,40,opt,name=xKubernetesIntOrString"` - - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - // - // +optional - // +listType=atomic - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty" protobuf:"bytes,41,rep,name=xKubernetesListMapKeys"` - - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - // +optional - XListType *string `json:"x-kubernetes-list-type,omitempty" protobuf:"bytes,42,opt,name=xKubernetesListType"` - - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - // +optional - XMapType *string `json:"x-kubernetes-map-type,omitempty" protobuf:"bytes,43,opt,name=xKubernetesMapType"` - - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - // +patchMergeKey=rule - // +patchStrategy=merge - // +listType=map - // +listMapKey=rule - XValidations ValidationRules `json:"x-kubernetes-validations,omitempty" patchStrategy:"merge" patchMergeKey:"rule" protobuf:"bytes,44,rep,name=xKubernetesValidations"` -} - -// ValidationRules describes a list of validation rules written in the CEL expression language. -type ValidationRules []ValidationRule - -// ValidationRule describes a validation rule written in the CEL expression language. -type ValidationRule struct { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - // - Rule string `json:"rule" protobuf:"bytes,1,opt,name=rule"` - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"` - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - // +optional - MessageExpression string `json:"messageExpression,omitempty" protobuf:"bytes,3,opt,name=messageExpression"` - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - // +optional - Reason *FieldValueErrorReason `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - // +optional - FieldPath string `json:"fieldPath,omitempty" protobuf:"bytes,5,opt,name=fieldPath"` - - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - // - // +featureGate=CRDValidationRatcheting - // +optional - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty" protobuf:"bytes,6,opt,name=optionalOldSelf"` -} - -// JSON represents any valid JSON value. -// These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil. -type JSON struct { - Raw []byte `json:"-" protobuf:"bytes,1,opt,name=raw"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSON) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSON) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaURL represents a schema url. -type JSONSchemaURL string - -// JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps -// or an array of JSONSchemaProps. Mainly here for serialization purposes. -type JSONSchemaPropsOrArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - // +listType=atomic - JSONSchemas []JSONSchemaProps `protobuf:"bytes,2,rep,name=jSONSchemas"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrArray) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrArray) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. -// Defaults to true for the boolean property. -type JSONSchemaPropsOrBool struct { - Allows bool `protobuf:"varint,1,opt,name=allows"` - Schema *JSONSchemaProps `protobuf:"bytes,2,opt,name=schema"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrBool) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrBool) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaDependencies represent a dependencies property. -type JSONSchemaDependencies map[string]JSONSchemaPropsOrStringArray - -// JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array. -type JSONSchemaPropsOrStringArray struct { - Schema *JSONSchemaProps `protobuf:"bytes,1,opt,name=schema"` - // +listType=atomic - Property []string `protobuf:"bytes,2,rep,name=property"` -} - -// OpenAPISchemaType is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -// -// See: https://github.com/kubernetes/kube-openapi/tree/master/pkg/generators -func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaType() []string { - // TODO: return actual types when anyOf is supported - return nil -} - -// OpenAPISchemaFormat is used by the kube-openapi generator when constructing -// the OpenAPI spec of this type. -func (_ JSONSchemaPropsOrStringArray) OpenAPISchemaFormat() string { return "" } - -// JSONSchemaDefinitions contains the models explicitly defined in this spec. -type JSONSchemaDefinitions map[string]JSONSchemaProps - -// ExternalDocumentation allows referencing an external resource for extended documentation. -type ExternalDocumentation struct { - Description string `json:"description,omitempty" protobuf:"bytes,1,opt,name=description"` - URL string `json:"url,omitempty" protobuf:"bytes,2,opt,name=url"` -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 5e388dc69..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,1412 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*CustomResourceColumnDefinition)(nil), (*apiextensions.CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(a.(*CustomResourceColumnDefinition), b.(*apiextensions.CustomResourceColumnDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceColumnDefinition)(nil), (*CustomResourceColumnDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(a.(*apiextensions.CustomResourceColumnDefinition), b.(*CustomResourceColumnDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceConversion)(nil), (*apiextensions.CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(a.(*CustomResourceConversion), b.(*apiextensions.CustomResourceConversion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceConversion)(nil), (*CustomResourceConversion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(a.(*apiextensions.CustomResourceConversion), b.(*CustomResourceConversion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinition)(nil), (*apiextensions.CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(a.(*CustomResourceDefinition), b.(*apiextensions.CustomResourceDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinition)(nil), (*CustomResourceDefinition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(a.(*apiextensions.CustomResourceDefinition), b.(*CustomResourceDefinition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionCondition)(nil), (*apiextensions.CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(a.(*CustomResourceDefinitionCondition), b.(*apiextensions.CustomResourceDefinitionCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionCondition)(nil), (*CustomResourceDefinitionCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(a.(*apiextensions.CustomResourceDefinitionCondition), b.(*CustomResourceDefinitionCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionList)(nil), (*apiextensions.CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(a.(*CustomResourceDefinitionList), b.(*apiextensions.CustomResourceDefinitionList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionList)(nil), (*CustomResourceDefinitionList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(a.(*apiextensions.CustomResourceDefinitionList), b.(*CustomResourceDefinitionList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionNames)(nil), (*apiextensions.CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(a.(*CustomResourceDefinitionNames), b.(*apiextensions.CustomResourceDefinitionNames), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionNames)(nil), (*CustomResourceDefinitionNames)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(a.(*apiextensions.CustomResourceDefinitionNames), b.(*CustomResourceDefinitionNames), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionSpec)(nil), (*apiextensions.CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(a.(*CustomResourceDefinitionSpec), b.(*apiextensions.CustomResourceDefinitionSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionSpec)(nil), (*CustomResourceDefinitionSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(a.(*apiextensions.CustomResourceDefinitionSpec), b.(*CustomResourceDefinitionSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionStatus)(nil), (*apiextensions.CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(a.(*CustomResourceDefinitionStatus), b.(*apiextensions.CustomResourceDefinitionStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionStatus)(nil), (*CustomResourceDefinitionStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(a.(*apiextensions.CustomResourceDefinitionStatus), b.(*CustomResourceDefinitionStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceDefinitionVersion)(nil), (*apiextensions.CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(a.(*CustomResourceDefinitionVersion), b.(*apiextensions.CustomResourceDefinitionVersion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceDefinitionVersion)(nil), (*CustomResourceDefinitionVersion)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(a.(*apiextensions.CustomResourceDefinitionVersion), b.(*CustomResourceDefinitionVersion), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceScale)(nil), (*apiextensions.CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(a.(*CustomResourceSubresourceScale), b.(*apiextensions.CustomResourceSubresourceScale), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceScale)(nil), (*CustomResourceSubresourceScale)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(a.(*apiextensions.CustomResourceSubresourceScale), b.(*CustomResourceSubresourceScale), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresourceStatus)(nil), (*apiextensions.CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(a.(*CustomResourceSubresourceStatus), b.(*apiextensions.CustomResourceSubresourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresourceStatus)(nil), (*CustomResourceSubresourceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(a.(*apiextensions.CustomResourceSubresourceStatus), b.(*CustomResourceSubresourceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceSubresources)(nil), (*apiextensions.CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(a.(*CustomResourceSubresources), b.(*apiextensions.CustomResourceSubresources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceSubresources)(nil), (*CustomResourceSubresources)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(a.(*apiextensions.CustomResourceSubresources), b.(*CustomResourceSubresources), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*CustomResourceValidation)(nil), (*apiextensions.CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(a.(*CustomResourceValidation), b.(*apiextensions.CustomResourceValidation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.CustomResourceValidation)(nil), (*CustomResourceValidation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(a.(*apiextensions.CustomResourceValidation), b.(*CustomResourceValidation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ExternalDocumentation)(nil), (*apiextensions.ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(a.(*ExternalDocumentation), b.(*apiextensions.ExternalDocumentation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ExternalDocumentation)(nil), (*ExternalDocumentation)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(a.(*apiextensions.ExternalDocumentation), b.(*ExternalDocumentation), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaProps)(nil), (*apiextensions.JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(a.(*JSONSchemaProps), b.(*apiextensions.JSONSchemaProps), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrArray)(nil), (*apiextensions.JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(a.(*JSONSchemaPropsOrArray), b.(*apiextensions.JSONSchemaPropsOrArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrArray)(nil), (*JSONSchemaPropsOrArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(a.(*apiextensions.JSONSchemaPropsOrArray), b.(*JSONSchemaPropsOrArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrBool)(nil), (*apiextensions.JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(a.(*JSONSchemaPropsOrBool), b.(*apiextensions.JSONSchemaPropsOrBool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrBool)(nil), (*JSONSchemaPropsOrBool)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(a.(*apiextensions.JSONSchemaPropsOrBool), b.(*JSONSchemaPropsOrBool), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*JSONSchemaPropsOrStringArray)(nil), (*apiextensions.JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(a.(*JSONSchemaPropsOrStringArray), b.(*apiextensions.JSONSchemaPropsOrStringArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.JSONSchemaPropsOrStringArray)(nil), (*JSONSchemaPropsOrStringArray)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(a.(*apiextensions.JSONSchemaPropsOrStringArray), b.(*JSONSchemaPropsOrStringArray), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*SelectableField)(nil), (*apiextensions.SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(a.(*SelectableField), b.(*apiextensions.SelectableField), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.SelectableField)(nil), (*SelectableField)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(a.(*apiextensions.SelectableField), b.(*SelectableField), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiextensions.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(a.(*ServiceReference), b.(*apiextensions.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(a.(*apiextensions.ServiceReference), b.(*ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ValidationRule)(nil), (*apiextensions.ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ValidationRule_To_apiextensions_ValidationRule(a.(*ValidationRule), b.(*apiextensions.ValidationRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.ValidationRule)(nil), (*ValidationRule)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_ValidationRule_To_v1beta1_ValidationRule(a.(*apiextensions.ValidationRule), b.(*ValidationRule), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*WebhookClientConfig)(nil), (*apiextensions.WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(a.(*WebhookClientConfig), b.(*apiextensions.WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiextensions.WebhookClientConfig)(nil), (*WebhookClientConfig)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(a.(*apiextensions.WebhookClientConfig), b.(*WebhookClientConfig), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.JSONSchemaProps)(nil), (*JSONSchemaProps)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(a.(*apiextensions.JSONSchemaProps), b.(*JSONSchemaProps), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*apiextensions.JSON)(nil), (*JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiextensions_JSON_To_v1beta1_JSON(a.(*apiextensions.JSON), b.(*JSON), scope) - }); err != nil { - return err - } - if err := s.AddConversionFunc((*JSON)(nil), (*apiextensions.JSON)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_JSON_To_apiextensions_JSON(a.(*JSON), b.(*apiextensions.JSON), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { - out.Name = in.Name - out.Type = in.Type - out.Format = in.Format - out.Description = in.Description - out.Priority = in.Priority - out.JSONPath = in.JSONPath - return nil -} - -// Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in *CustomResourceColumnDefinition, out *apiextensions.CustomResourceColumnDefinition, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceColumnDefinition_To_apiextensions_CustomResourceColumnDefinition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { - out.Name = in.Name - out.Type = in.Type - out.Format = in.Format - out.Description = in.Description - out.Priority = in.Priority - out.JSONPath = in.JSONPath - return nil -} - -// Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in *apiextensions.CustomResourceColumnDefinition, out *CustomResourceColumnDefinition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceColumnDefinition_To_v1beta1_CustomResourceColumnDefinition(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { - out.Strategy = apiextensions.ConversionStrategyType(in.Strategy) - if in.WebhookClientConfig != nil { - in, out := &in.WebhookClientConfig, &out.WebhookClientConfig - *out = new(apiextensions.WebhookClientConfig) - if err := Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(*in, *out, s); err != nil { - return err - } - } else { - out.WebhookClientConfig = nil - } - out.ConversionReviewVersions = *(*[]string)(unsafe.Pointer(&in.ConversionReviewVersions)) - return nil -} - -// Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in *CustomResourceConversion, out *apiextensions.CustomResourceConversion, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { - out.Strategy = ConversionStrategyType(in.Strategy) - if in.WebhookClientConfig != nil { - in, out := &in.WebhookClientConfig, &out.WebhookClientConfig - *out = new(WebhookClientConfig) - if err := Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(*in, *out, s); err != nil { - return err - } - } else { - out.WebhookClientConfig = nil - } - out.ConversionReviewVersions = *(*[]string)(unsafe.Pointer(&in.ConversionReviewVersions)) - return nil -} - -// Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in *apiextensions.CustomResourceConversion, out *CustomResourceConversion, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in *CustomResourceDefinition, out *apiextensions.CustomResourceDefinition, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in *apiextensions.CustomResourceDefinition, out *CustomResourceDefinition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { - out.Type = apiextensions.CustomResourceDefinitionConditionType(in.Type) - out.Status = apiextensions.ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in *CustomResourceDefinitionCondition, out *apiextensions.CustomResourceDefinitionCondition, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionCondition_To_apiextensions_CustomResourceDefinitionCondition(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { - out.Type = CustomResourceDefinitionConditionType(in.Type) - out.Status = ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in *apiextensions.CustomResourceDefinitionCondition, out *CustomResourceDefinitionCondition, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionCondition_To_v1beta1_CustomResourceDefinitionCondition(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apiextensions.CustomResourceDefinition, len(*in)) - for i := range *in { - if err := Convert_v1beta1_CustomResourceDefinition_To_apiextensions_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in *CustomResourceDefinitionList, out *apiextensions.CustomResourceDefinitionList, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionList_To_apiextensions_CustomResourceDefinitionList(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - if err := Convert_apiextensions_CustomResourceDefinition_To_v1beta1_CustomResourceDefinition(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in *apiextensions.CustomResourceDefinitionList, out *CustomResourceDefinitionList, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionList_To_v1beta1_CustomResourceDefinitionList(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { - out.Plural = in.Plural - out.Singular = in.Singular - out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) - out.Kind = in.Kind - out.ListKind = in.ListKind - out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in *CustomResourceDefinitionNames, out *apiextensions.CustomResourceDefinitionNames, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { - out.Plural = in.Plural - out.Singular = in.Singular - out.ShortNames = *(*[]string)(unsafe.Pointer(&in.ShortNames)) - out.Kind = in.Kind - out.ListKind = in.ListKind - out.Categories = *(*[]string)(unsafe.Pointer(&in.Categories)) - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in *apiextensions.CustomResourceDefinitionNames, out *CustomResourceDefinitionNames, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { - out.Group = in.Group - out.Version = in.Version - if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { - return err - } - out.Scope = apiextensions.ResourceScope(in.Scope) - if in.Validation != nil { - in, out := &in.Validation, &out.Validation - *out = new(apiextensions.CustomResourceValidation) - if err := Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Validation = nil - } - out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]apiextensions.CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - if err := Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } - out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(apiextensions.CustomResourceConversion) - if err := Convert_v1beta1_CustomResourceConversion_To_apiextensions_CustomResourceConversion(*in, *out, s); err != nil { - return err - } - } else { - out.Conversion = nil - } - out.PreserveUnknownFields = (*bool)(unsafe.Pointer(in.PreserveUnknownFields)) - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in *CustomResourceDefinitionSpec, out *apiextensions.CustomResourceDefinitionSpec, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionSpec_To_apiextensions_CustomResourceDefinitionSpec(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { - out.Group = in.Group - out.Version = in.Version - if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(&in.Names, &out.Names, s); err != nil { - return err - } - out.Scope = ResourceScope(in.Scope) - if in.Validation != nil { - in, out := &in.Validation, &out.Validation - *out = new(CustomResourceValidation) - if err := Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Validation = nil - } - out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - if err := Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Versions = nil - } - out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(CustomResourceConversion) - if err := Convert_apiextensions_CustomResourceConversion_To_v1beta1_CustomResourceConversion(*in, *out, s); err != nil { - return err - } - } else { - out.Conversion = nil - } - out.PreserveUnknownFields = (*bool)(unsafe.Pointer(in.PreserveUnknownFields)) - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in *apiextensions.CustomResourceDefinitionSpec, out *CustomResourceDefinitionSpec, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionSpec_To_v1beta1_CustomResourceDefinitionSpec(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { - out.Conditions = *(*[]apiextensions.CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) - if err := Convert_v1beta1_CustomResourceDefinitionNames_To_apiextensions_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { - return err - } - out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in *CustomResourceDefinitionStatus, out *apiextensions.CustomResourceDefinitionStatus, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionStatus_To_apiextensions_CustomResourceDefinitionStatus(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { - out.Conditions = *(*[]CustomResourceDefinitionCondition)(unsafe.Pointer(&in.Conditions)) - if err := Convert_apiextensions_CustomResourceDefinitionNames_To_v1beta1_CustomResourceDefinitionNames(&in.AcceptedNames, &out.AcceptedNames, s); err != nil { - return err - } - out.StoredVersions = *(*[]string)(unsafe.Pointer(&in.StoredVersions)) - out.ObservedGeneration = in.ObservedGeneration - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in *apiextensions.CustomResourceDefinitionStatus, out *CustomResourceDefinitionStatus, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionStatus_To_v1beta1_CustomResourceDefinitionStatus(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { - out.Name = in.Name - out.Served = in.Served - out.Storage = in.Storage - out.Deprecated = in.Deprecated - out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.CustomResourceValidation) - if err := Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Subresources = (*apiextensions.CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - out.AdditionalPrinterColumns = *(*[]apiextensions.CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]apiextensions.SelectableField)(unsafe.Pointer(&in.SelectableFields)) - return nil -} - -// Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in *CustomResourceDefinitionVersion, out *apiextensions.CustomResourceDefinitionVersion, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceDefinitionVersion_To_apiextensions_CustomResourceDefinitionVersion(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { - out.Name = in.Name - out.Served = in.Served - out.Storage = in.Storage - out.Deprecated = in.Deprecated - out.DeprecationWarning = (*string)(unsafe.Pointer(in.DeprecationWarning)) - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(CustomResourceValidation) - if err := Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Subresources = (*CustomResourceSubresources)(unsafe.Pointer(in.Subresources)) - out.AdditionalPrinterColumns = *(*[]CustomResourceColumnDefinition)(unsafe.Pointer(&in.AdditionalPrinterColumns)) - out.SelectableFields = *(*[]SelectableField)(unsafe.Pointer(&in.SelectableFields)) - return nil -} - -// Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in *apiextensions.CustomResourceDefinitionVersion, out *CustomResourceDefinitionVersion, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceDefinitionVersion_To_v1beta1_CustomResourceDefinitionVersion(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { - out.SpecReplicasPath = in.SpecReplicasPath - out.StatusReplicasPath = in.StatusReplicasPath - out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) - return nil -} - -// Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in *CustomResourceSubresourceScale, out *apiextensions.CustomResourceSubresourceScale, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceSubresourceScale_To_apiextensions_CustomResourceSubresourceScale(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { - out.SpecReplicasPath = in.SpecReplicasPath - out.StatusReplicasPath = in.StatusReplicasPath - out.LabelSelectorPath = (*string)(unsafe.Pointer(in.LabelSelectorPath)) - return nil -} - -// Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in *apiextensions.CustomResourceSubresourceScale, out *CustomResourceSubresourceScale, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresourceScale_To_v1beta1_CustomResourceSubresourceScale(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { - return nil -} - -// Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in *CustomResourceSubresourceStatus, out *apiextensions.CustomResourceSubresourceStatus, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceSubresourceStatus_To_apiextensions_CustomResourceSubresourceStatus(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { - return nil -} - -// Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in *apiextensions.CustomResourceSubresourceStatus, out *CustomResourceSubresourceStatus, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresourceStatus_To_v1beta1_CustomResourceSubresourceStatus(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { - out.Status = (*apiextensions.CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) - out.Scale = (*apiextensions.CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) - return nil -} - -// Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in *CustomResourceSubresources, out *apiextensions.CustomResourceSubresources, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceSubresources_To_apiextensions_CustomResourceSubresources(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { - out.Status = (*CustomResourceSubresourceStatus)(unsafe.Pointer(in.Status)) - out.Scale = (*CustomResourceSubresourceScale)(unsafe.Pointer(in.Scale)) - return nil -} - -// Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in *apiextensions.CustomResourceSubresources, out *CustomResourceSubresources, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceSubresources_To_v1beta1_CustomResourceSubresources(in, out, s) -} - -func autoConvert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in *CustomResourceValidation, out *apiextensions.CustomResourceValidation, s conversion.Scope) error { - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.OpenAPIV3Schema = nil - } - return nil -} - -// Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation is an autogenerated conversion function. -func Convert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in *CustomResourceValidation, out *apiextensions.CustomResourceValidation, s conversion.Scope) error { - return autoConvert_v1beta1_CustomResourceValidation_To_apiextensions_CustomResourceValidation(in, out, s) -} - -func autoConvert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(in *apiextensions.CustomResourceValidation, out *CustomResourceValidation, s conversion.Scope) error { - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.OpenAPIV3Schema = nil - } - return nil -} - -// Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation is an autogenerated conversion function. -func Convert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(in *apiextensions.CustomResourceValidation, out *CustomResourceValidation, s conversion.Scope) error { - return autoConvert_apiextensions_CustomResourceValidation_To_v1beta1_CustomResourceValidation(in, out, s) -} - -func autoConvert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in *ExternalDocumentation, out *apiextensions.ExternalDocumentation, s conversion.Scope) error { - out.Description = in.Description - out.URL = in.URL - return nil -} - -// Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation is an autogenerated conversion function. -func Convert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in *ExternalDocumentation, out *apiextensions.ExternalDocumentation, s conversion.Scope) error { - return autoConvert_v1beta1_ExternalDocumentation_To_apiextensions_ExternalDocumentation(in, out, s) -} - -func autoConvert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(in *apiextensions.ExternalDocumentation, out *ExternalDocumentation, s conversion.Scope) error { - out.Description = in.Description - out.URL = in.URL - return nil -} - -// Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation is an autogenerated conversion function. -func Convert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(in *apiextensions.ExternalDocumentation, out *ExternalDocumentation, s conversion.Scope) error { - return autoConvert_apiextensions_ExternalDocumentation_To_v1beta1_ExternalDocumentation(in, out, s) -} - -func autoConvert_v1beta1_JSON_To_apiextensions_JSON(in *JSON, out *apiextensions.JSON, s conversion.Scope) error { - // WARNING: in.Raw requires manual conversion: does not exist in peer-type - return nil -} - -func autoConvert_apiextensions_JSON_To_v1beta1_JSON(in *apiextensions.JSON, out *JSON, s conversion.Scope) error { - // FIXME: Type apiextensions.JSON is unsupported. - return nil -} - -func autoConvert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in *JSONSchemaProps, out *apiextensions.JSONSchemaProps, s conversion.Scope) error { - out.ID = in.ID - out.Schema = apiextensions.JSONSchemaURL(in.Schema) - out.Ref = (*string)(unsafe.Pointer(in.Ref)) - out.Description = in.Description - out.Type = in.Type - out.Format = in.Format - out.Title = in.Title - if in.Default != nil { - in, out := &in.Default, &out.Default - *out = new(apiextensions.JSON) - if err := Convert_v1beta1_JSON_To_apiextensions_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Default = nil - } - out.Maximum = (*float64)(unsafe.Pointer(in.Maximum)) - out.ExclusiveMaximum = in.ExclusiveMaximum - out.Minimum = (*float64)(unsafe.Pointer(in.Minimum)) - out.ExclusiveMinimum = in.ExclusiveMinimum - out.MaxLength = (*int64)(unsafe.Pointer(in.MaxLength)) - out.MinLength = (*int64)(unsafe.Pointer(in.MinLength)) - out.Pattern = in.Pattern - out.MaxItems = (*int64)(unsafe.Pointer(in.MaxItems)) - out.MinItems = (*int64)(unsafe.Pointer(in.MinItems)) - out.UniqueItems = in.UniqueItems - out.MultipleOf = (*float64)(unsafe.Pointer(in.MultipleOf)) - if in.Enum != nil { - in, out := &in.Enum, &out.Enum - *out = make([]apiextensions.JSON, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JSON_To_apiextensions_JSON(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enum = nil - } - out.MaxProperties = (*int64)(unsafe.Pointer(in.MaxProperties)) - out.MinProperties = (*int64)(unsafe.Pointer(in.MinProperties)) - out.Required = *(*[]string)(unsafe.Pointer(&in.Required)) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = new(apiextensions.JSONSchemaPropsOrArray) - if err := Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(*in, *out, s); err != nil { - return err - } - } else { - out.Items = nil - } - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AllOf = nil - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.OneOf = nil - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AnyOf = nil - } - if in.Not != nil { - in, out := &in.Not, &out.Not - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Not = nil - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]apiextensions.JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Properties = nil - } - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - *out = new(apiextensions.JSONSchemaPropsOrBool) - if err := Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalProperties = nil - } - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]apiextensions.JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.PatternProperties = nil - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(apiextensions.JSONSchemaDependencies, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaPropsOrStringArray) - if err := Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Dependencies = nil - } - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - *out = new(apiextensions.JSONSchemaPropsOrBool) - if err := Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalItems = nil - } - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(apiextensions.JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - newVal := new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Definitions = nil - } - out.ExternalDocs = (*apiextensions.ExternalDocumentation)(unsafe.Pointer(in.ExternalDocs)) - if in.Example != nil { - in, out := &in.Example, &out.Example - *out = new(apiextensions.JSON) - if err := Convert_v1beta1_JSON_To_apiextensions_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Example = nil - } - out.Nullable = in.Nullable - out.XPreserveUnknownFields = (*bool)(unsafe.Pointer(in.XPreserveUnknownFields)) - out.XEmbeddedResource = in.XEmbeddedResource - out.XIntOrString = in.XIntOrString - out.XListMapKeys = *(*[]string)(unsafe.Pointer(&in.XListMapKeys)) - out.XListType = (*string)(unsafe.Pointer(in.XListType)) - out.XMapType = (*string)(unsafe.Pointer(in.XMapType)) - out.XValidations = *(*apiextensions.ValidationRules)(unsafe.Pointer(&in.XValidations)) - return nil -} - -// Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps is an autogenerated conversion function. -func Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in *JSONSchemaProps, out *apiextensions.JSONSchemaProps, s conversion.Scope) error { - return autoConvert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(in *apiextensions.JSONSchemaProps, out *JSONSchemaProps, s conversion.Scope) error { - out.ID = in.ID - out.Schema = JSONSchemaURL(in.Schema) - out.Ref = (*string)(unsafe.Pointer(in.Ref)) - out.Description = in.Description - out.Type = in.Type - out.Nullable = in.Nullable - out.Format = in.Format - out.Title = in.Title - if in.Default != nil { - in, out := &in.Default, &out.Default - *out = new(JSON) - if err := Convert_apiextensions_JSON_To_v1beta1_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Default = nil - } - out.Maximum = (*float64)(unsafe.Pointer(in.Maximum)) - out.ExclusiveMaximum = in.ExclusiveMaximum - out.Minimum = (*float64)(unsafe.Pointer(in.Minimum)) - out.ExclusiveMinimum = in.ExclusiveMinimum - out.MaxLength = (*int64)(unsafe.Pointer(in.MaxLength)) - out.MinLength = (*int64)(unsafe.Pointer(in.MinLength)) - out.Pattern = in.Pattern - out.MaxItems = (*int64)(unsafe.Pointer(in.MaxItems)) - out.MinItems = (*int64)(unsafe.Pointer(in.MinItems)) - out.UniqueItems = in.UniqueItems - out.MultipleOf = (*float64)(unsafe.Pointer(in.MultipleOf)) - if in.Enum != nil { - in, out := &in.Enum, &out.Enum - *out = make([]JSON, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSON_To_v1beta1_JSON(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Enum = nil - } - out.MaxProperties = (*int64)(unsafe.Pointer(in.MaxProperties)) - out.MinProperties = (*int64)(unsafe.Pointer(in.MinProperties)) - out.Required = *(*[]string)(unsafe.Pointer(&in.Required)) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = new(JSONSchemaPropsOrArray) - if err := Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(*in, *out, s); err != nil { - return err - } - } else { - out.Items = nil - } - if in.AllOf != nil { - in, out := &in.AllOf, &out.AllOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AllOf = nil - } - if in.OneOf != nil { - in, out := &in.OneOf, &out.OneOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.OneOf = nil - } - if in.AnyOf != nil { - in, out := &in.AnyOf, &out.AnyOf - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.AnyOf = nil - } - if in.Not != nil { - in, out := &in.Not, &out.Not - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Not = nil - } - if in.Properties != nil { - in, out := &in.Properties, &out.Properties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Properties = nil - } - if in.AdditionalProperties != nil { - in, out := &in.AdditionalProperties, &out.AdditionalProperties - *out = new(JSONSchemaPropsOrBool) - if err := Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalProperties = nil - } - if in.PatternProperties != nil { - in, out := &in.PatternProperties, &out.PatternProperties - *out = make(map[string]JSONSchemaProps, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.PatternProperties = nil - } - if in.Dependencies != nil { - in, out := &in.Dependencies, &out.Dependencies - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaPropsOrStringArray) - if err := Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Dependencies = nil - } - if in.AdditionalItems != nil { - in, out := &in.AdditionalItems, &out.AdditionalItems - *out = new(JSONSchemaPropsOrBool) - if err := Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(*in, *out, s); err != nil { - return err - } - } else { - out.AdditionalItems = nil - } - if in.Definitions != nil { - in, out := &in.Definitions, &out.Definitions - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - newVal := new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&val, newVal, s); err != nil { - return err - } - (*out)[key] = *newVal - } - } else { - out.Definitions = nil - } - out.ExternalDocs = (*ExternalDocumentation)(unsafe.Pointer(in.ExternalDocs)) - if in.Example != nil { - in, out := &in.Example, &out.Example - *out = new(JSON) - if err := Convert_apiextensions_JSON_To_v1beta1_JSON(*in, *out, s); err != nil { - return err - } - } else { - out.Example = nil - } - out.XPreserveUnknownFields = (*bool)(unsafe.Pointer(in.XPreserveUnknownFields)) - out.XEmbeddedResource = in.XEmbeddedResource - out.XIntOrString = in.XIntOrString - out.XListMapKeys = *(*[]string)(unsafe.Pointer(&in.XListMapKeys)) - out.XListType = (*string)(unsafe.Pointer(in.XListType)) - out.XMapType = (*string)(unsafe.Pointer(in.XMapType)) - out.XValidations = *(*ValidationRules)(unsafe.Pointer(&in.XValidations)) - return nil -} - -func autoConvert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in *JSONSchemaPropsOrArray, out *apiextensions.JSONSchemaPropsOrArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]apiextensions.JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.JSONSchemas = nil - } - return nil -} - -// Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray is an autogenerated conversion function. -func Convert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in *JSONSchemaPropsOrArray, out *apiextensions.JSONSchemaPropsOrArray, s conversion.Scope) error { - return autoConvert_v1beta1_JSONSchemaPropsOrArray_To_apiextensions_JSONSchemaPropsOrArray(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out *JSONSchemaPropsOrArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.JSONSchemas = nil - } - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(in *apiextensions.JSONSchemaPropsOrArray, out *JSONSchemaPropsOrArray, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrArray_To_v1beta1_JSONSchemaPropsOrArray(in, out, s) -} - -func autoConvert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in *JSONSchemaPropsOrBool, out *apiextensions.JSONSchemaPropsOrBool, s conversion.Scope) error { - out.Allows = in.Allows - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - return nil -} - -// Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool is an autogenerated conversion function. -func Convert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in *JSONSchemaPropsOrBool, out *apiextensions.JSONSchemaPropsOrBool, s conversion.Scope) error { - return autoConvert_v1beta1_JSONSchemaPropsOrBool_To_apiextensions_JSONSchemaPropsOrBool(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(in *apiextensions.JSONSchemaPropsOrBool, out *JSONSchemaPropsOrBool, s conversion.Scope) error { - out.Allows = in.Allows - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(in *apiextensions.JSONSchemaPropsOrBool, out *JSONSchemaPropsOrBool, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrBool_To_v1beta1_JSONSchemaPropsOrBool(in, out, s) -} - -func autoConvert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in *JSONSchemaPropsOrStringArray, out *apiextensions.JSONSchemaPropsOrStringArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(apiextensions.JSONSchemaProps) - if err := Convert_v1beta1_JSONSchemaProps_To_apiextensions_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Property = *(*[]string)(unsafe.Pointer(&in.Property)) - return nil -} - -// Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray is an autogenerated conversion function. -func Convert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in *JSONSchemaPropsOrStringArray, out *apiextensions.JSONSchemaPropsOrStringArray, s conversion.Scope) error { - return autoConvert_v1beta1_JSONSchemaPropsOrStringArray_To_apiextensions_JSONSchemaPropsOrStringArray(in, out, s) -} - -func autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(in *apiextensions.JSONSchemaPropsOrStringArray, out *JSONSchemaPropsOrStringArray, s conversion.Scope) error { - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(JSONSchemaProps) - if err := Convert_apiextensions_JSONSchemaProps_To_v1beta1_JSONSchemaProps(*in, *out, s); err != nil { - return err - } - } else { - out.Schema = nil - } - out.Property = *(*[]string)(unsafe.Pointer(&in.Property)) - return nil -} - -// Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray is an autogenerated conversion function. -func Convert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(in *apiextensions.JSONSchemaPropsOrStringArray, out *JSONSchemaPropsOrStringArray, s conversion.Scope) error { - return autoConvert_apiextensions_JSONSchemaPropsOrStringArray_To_v1beta1_JSONSchemaPropsOrStringArray(in, out, s) -} - -func autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { - out.JSONPath = in.JSONPath - return nil -} - -// Convert_v1beta1_SelectableField_To_apiextensions_SelectableField is an autogenerated conversion function. -func Convert_v1beta1_SelectableField_To_apiextensions_SelectableField(in *SelectableField, out *apiextensions.SelectableField, s conversion.Scope) error { - return autoConvert_v1beta1_SelectableField_To_apiextensions_SelectableField(in, out, s) -} - -func autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { - out.JSONPath = in.JSONPath - return nil -} - -// Convert_apiextensions_SelectableField_To_v1beta1_SelectableField is an autogenerated conversion function. -func Convert_apiextensions_SelectableField_To_v1beta1_SelectableField(in *apiextensions.SelectableField, out *SelectableField, s conversion.Scope) error { - return autoConvert_apiextensions_SelectableField_To_v1beta1_SelectableField(in, out, s) -} - -func autoConvert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := v1.Convert_Pointer_int32_To_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference is an autogenerated conversion function. -func Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(in *ServiceReference, out *apiextensions.ServiceReference, s conversion.Scope) error { - return autoConvert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(in, out, s) -} - -func autoConvert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(in *apiextensions.ServiceReference, out *ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - out.Path = (*string)(unsafe.Pointer(in.Path)) - if err := v1.Convert_int32_To_Pointer_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_apiextensions_ServiceReference_To_v1beta1_ServiceReference is an autogenerated conversion function. -func Convert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(in *apiextensions.ServiceReference, out *ServiceReference, s conversion.Scope) error { - return autoConvert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(in, out, s) -} - -func autoConvert_v1beta1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRule, out *apiextensions.ValidationRule, s conversion.Scope) error { - out.Rule = in.Rule - out.Message = in.Message - out.MessageExpression = in.MessageExpression - out.Reason = (*apiextensions.FieldValueErrorReason)(unsafe.Pointer(in.Reason)) - out.FieldPath = in.FieldPath - out.OptionalOldSelf = (*bool)(unsafe.Pointer(in.OptionalOldSelf)) - return nil -} - -// Convert_v1beta1_ValidationRule_To_apiextensions_ValidationRule is an autogenerated conversion function. -func Convert_v1beta1_ValidationRule_To_apiextensions_ValidationRule(in *ValidationRule, out *apiextensions.ValidationRule, s conversion.Scope) error { - return autoConvert_v1beta1_ValidationRule_To_apiextensions_ValidationRule(in, out, s) -} - -func autoConvert_apiextensions_ValidationRule_To_v1beta1_ValidationRule(in *apiextensions.ValidationRule, out *ValidationRule, s conversion.Scope) error { - out.Rule = in.Rule - out.Message = in.Message - out.MessageExpression = in.MessageExpression - out.Reason = (*FieldValueErrorReason)(unsafe.Pointer(in.Reason)) - out.FieldPath = in.FieldPath - out.OptionalOldSelf = (*bool)(unsafe.Pointer(in.OptionalOldSelf)) - return nil -} - -// Convert_apiextensions_ValidationRule_To_v1beta1_ValidationRule is an autogenerated conversion function. -func Convert_apiextensions_ValidationRule_To_v1beta1_ValidationRule(in *apiextensions.ValidationRule, out *ValidationRule, s conversion.Scope) error { - return autoConvert_apiextensions_ValidationRule_To_v1beta1_ValidationRule(in, out, s) -} - -func autoConvert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in *WebhookClientConfig, out *apiextensions.WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(apiextensions.ServiceReference) - if err := Convert_v1beta1_ServiceReference_To_apiextensions_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig is an autogenerated conversion function. -func Convert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in *WebhookClientConfig, out *apiextensions.WebhookClientConfig, s conversion.Scope) error { - return autoConvert_v1beta1_WebhookClientConfig_To_apiextensions_WebhookClientConfig(in, out, s) -} - -func autoConvert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(in *apiextensions.WebhookClientConfig, out *WebhookClientConfig, s conversion.Scope) error { - out.URL = (*string)(unsafe.Pointer(in.URL)) - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - if err := Convert_apiextensions_ServiceReference_To_v1beta1_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - return nil -} - -// Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig is an autogenerated conversion function. -func Convert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(in *apiextensions.WebhookClientConfig, out *WebhookClientConfig, s conversion.Scope) error { - return autoConvert_apiextensions_WebhookClientConfig_To_v1beta1_WebhookClientConfig(in, out, s) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 18740925c..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,742 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -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 *ConversionRequest) DeepCopyInto(out *ConversionRequest) { - *out = *in - if in.Objects != nil { - in, out := &in.Objects, &out.Objects - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionRequest. -func (in *ConversionRequest) DeepCopy() *ConversionRequest { - if in == nil { - return nil - } - out := new(ConversionRequest) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConversionResponse) DeepCopyInto(out *ConversionResponse) { - *out = *in - if in.ConvertedObjects != nil { - in, out := &in.ConvertedObjects, &out.ConvertedObjects - *out = make([]runtime.RawExtension, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.Result.DeepCopyInto(&out.Result) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionResponse. -func (in *ConversionResponse) DeepCopy() *ConversionResponse { - if in == nil { - return nil - } - out := new(ConversionResponse) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConversionReview) DeepCopyInto(out *ConversionReview) { - *out = *in - out.TypeMeta = in.TypeMeta - if in.Request != nil { - in, out := &in.Request, &out.Request - *out = new(ConversionRequest) - (*in).DeepCopyInto(*out) - } - if in.Response != nil { - in, out := &in.Response, &out.Response - *out = new(ConversionResponse) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConversionReview. -func (in *ConversionReview) DeepCopy() *ConversionReview { - if in == nil { - return nil - } - out := new(ConversionReview) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConversionReview) 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 *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. -func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { - if in == nil { - return nil - } - out := new(CustomResourceColumnDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { - *out = *in - if in.WebhookClientConfig != nil { - in, out := &in.WebhookClientConfig, &out.WebhookClientConfig - *out = new(WebhookClientConfig) - (*in).DeepCopyInto(*out) - } - if in.ConversionReviewVersions != nil { - in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. -func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { - if in == nil { - return nil - } - out := new(CustomResourceConversion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. -func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { - if in == nil { - return nil - } - out := new(CustomResourceDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinition) 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 *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. -func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. -func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinitionList) 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 *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { - *out = *in - if in.ShortNames != nil { - in, out := &in.ShortNames, &out.ShortNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. -func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionNames) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { - *out = *in - in.Names.DeepCopyInto(&out.Names) - if in.Validation != nil { - in, out := &in.Validation, &out.Validation - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } - if in.Subresources != nil { - in, out := &in.Subresources, &out.Subresources - *out = new(CustomResourceSubresources) - (*in).DeepCopyInto(*out) - } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalPrinterColumns != nil { - in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns - *out = make([]CustomResourceColumnDefinition, len(*in)) - copy(*out, *in) - } - if in.SelectableFields != nil { - in, out := &in.SelectableFields, &out.SelectableFields - *out = make([]SelectableField, len(*in)) - copy(*out, *in) - } - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(CustomResourceConversion) - (*in).DeepCopyInto(*out) - } - if in.PreserveUnknownFields != nil { - in, out := &in.PreserveUnknownFields, &out.PreserveUnknownFields - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. -func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CustomResourceDefinitionCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) - if in.StoredVersions != nil { - in, out := &in.StoredVersions, &out.StoredVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. -func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { - *out = *in - if in.DeprecationWarning != nil { - in, out := &in.DeprecationWarning, &out.DeprecationWarning - *out = new(string) - **out = **in - } - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } - if in.Subresources != nil { - in, out := &in.Subresources, &out.Subresources - *out = new(CustomResourceSubresources) - (*in).DeepCopyInto(*out) - } - if in.AdditionalPrinterColumns != nil { - in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns - *out = make([]CustomResourceColumnDefinition, len(*in)) - copy(*out, *in) - } - if in.SelectableFields != nil { - in, out := &in.SelectableFields, &out.SelectableFields - *out = make([]SelectableField, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. -func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { - *out = *in - if in.LabelSelectorPath != nil { - in, out := &in.LabelSelectorPath, &out.LabelSelectorPath - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. -func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceScale) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. -func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { - *out = *in - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(CustomResourceSubresourceStatus) - **out = **in - } - if in.Scale != nil { - in, out := &in.Scale, &out.Scale - *out = new(CustomResourceSubresourceScale) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. -func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { - if in == nil { - return nil - } - out := new(CustomResourceSubresources) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { - *out = *in - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. -func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { - if in == nil { - return nil - } - out := new(CustomResourceValidation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. -func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { - if in == nil { - return nil - } - out := new(ExternalDocumentation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSON) DeepCopyInto(out *JSON) { - *out = *in - if in.Raw != nil { - in, out := &in.Raw, &out.Raw - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSON. -func (in *JSON) DeepCopy() *JSON { - if in == nil { - return nil - } - out := new(JSON) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { - { - in := &in - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. -func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { - if in == nil { - return nil - } - out := new(JSONSchemaDefinitions) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { - { - in := &in - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. -func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { - if in == nil { - return nil - } - out := new(JSONSchemaDependencies) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { - clone := in.DeepCopy() - *out = *clone - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. -func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. -func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrBool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.Property != nil { - in, out := &in.Property, &out.Property - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. -func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrStringArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelectableField) DeepCopyInto(out *SelectableField) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. -func (in *SelectableField) DeepCopy() *SelectableField { - if in == nil { - return nil - } - out := new(SelectableField) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { - *out = *in - if in.Reason != nil { - in, out := &in.Reason, &out.Reason - *out = new(FieldValueErrorReason) - **out = **in - } - if in.OptionalOldSelf != nil { - in, out := &in.OptionalOldSelf, &out.OptionalOldSelf - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. -func (in *ValidationRule) DeepCopy() *ValidationRule { - if in == nil { - return nil - } - out := new(ValidationRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ValidationRules) DeepCopyInto(out *ValidationRules) { - { - in := &in - *out = make(ValidationRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. -func (in ValidationRules) DeepCopy() ValidationRules { - if in == nil { - return nil - } - out := new(ValidationRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. -func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { - if in == nil { - return nil - } - out := new(WebhookClientConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go deleted file mode 100644 index 225c6ff51..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.defaults.go +++ /dev/null @@ -1,56 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1beta1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&CustomResourceDefinition{}, func(obj interface{}) { SetObjectDefaults_CustomResourceDefinition(obj.(*CustomResourceDefinition)) }) - scheme.AddTypeDefaultingFunc(&CustomResourceDefinitionList{}, func(obj interface{}) { - SetObjectDefaults_CustomResourceDefinitionList(obj.(*CustomResourceDefinitionList)) - }) - return nil -} - -func SetObjectDefaults_CustomResourceDefinition(in *CustomResourceDefinition) { - SetDefaults_CustomResourceDefinition(in) - SetDefaults_CustomResourceDefinitionSpec(&in.Spec) - if in.Spec.Conversion != nil { - if in.Spec.Conversion.WebhookClientConfig != nil { - if in.Spec.Conversion.WebhookClientConfig.Service != nil { - SetDefaults_ServiceReference(in.Spec.Conversion.WebhookClientConfig.Service) - } - } - } -} - -func SetObjectDefaults_CustomResourceDefinitionList(in *CustomResourceDefinitionList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_CustomResourceDefinition(a) - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go deleted file mode 100644 index b346b0109..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.model_name.go +++ /dev/null @@ -1,152 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1beta1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionRequest) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionRequest" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionResponse) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionResponse" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ConversionReview) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ConversionReview" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceColumnDefinition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceColumnDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceConversion) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceConversion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionCondition) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionList) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionNames) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionNames" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionSpec) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionStatus) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceDefinitionVersion) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionVersion" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresourceScale) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceScale" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresourceStatus) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresourceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceSubresources) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceSubresources" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in CustomResourceValidation) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceValidation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ExternalDocumentation) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ExternalDocumentation" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSON) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSON" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaProps) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaProps" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrArray) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrArray" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrBool) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrBool" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in JSONSchemaPropsOrStringArray) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.JSONSchemaPropsOrStringArray" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in SelectableField) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.SelectableField" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceReference) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ServiceReference" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ValidationRule) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.ValidationRule" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in WebhookClientConfig) OpenAPIModelName() string { - return "io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.WebhookClientConfig" -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index 9c22ae5c1..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,98 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1beta1 - -import ( - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *ConversionReview) APILifecycleIntroduced() (major, minor int) { - return 1, 13 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *ConversionReview) APILifecycleDeprecated() (major, minor int) { - return 1, 19 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *ConversionReview) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "ConversionReview"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *ConversionReview) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *CustomResourceDefinition) APILifecycleIntroduced() (major, minor int) { - return 1, 7 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *CustomResourceDefinition) APILifecycleDeprecated() (major, minor int) { - return 1, 16 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *CustomResourceDefinition) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinition"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *CustomResourceDefinition) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *CustomResourceDefinitionList) APILifecycleIntroduced() (major, minor int) { - return 1, 7 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *CustomResourceDefinitionList) APILifecycleDeprecated() (major, minor int) { - return 1, 16 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *CustomResourceDefinitionList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "apiextensions.k8s.io", Version: "v1", Kind: "CustomResourceDefinitionList"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *CustomResourceDefinitionList) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go b/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go deleted file mode 100644 index 3be35f308..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/zz_generated.deepcopy.go +++ /dev/null @@ -1,634 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package apiextensions - -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 *CustomResourceColumnDefinition) DeepCopyInto(out *CustomResourceColumnDefinition) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceColumnDefinition. -func (in *CustomResourceColumnDefinition) DeepCopy() *CustomResourceColumnDefinition { - if in == nil { - return nil - } - out := new(CustomResourceColumnDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceConversion) DeepCopyInto(out *CustomResourceConversion) { - *out = *in - if in.WebhookClientConfig != nil { - in, out := &in.WebhookClientConfig, &out.WebhookClientConfig - *out = new(WebhookClientConfig) - (*in).DeepCopyInto(*out) - } - if in.ConversionReviewVersions != nil { - in, out := &in.ConversionReviewVersions, &out.ConversionReviewVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceConversion. -func (in *CustomResourceConversion) DeepCopy() *CustomResourceConversion { - if in == nil { - return nil - } - out := new(CustomResourceConversion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinition) DeepCopyInto(out *CustomResourceDefinition) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinition. -func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { - if in == nil { - return nil - } - out := new(CustomResourceDefinition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinition) 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 *CustomResourceDefinitionCondition) DeepCopyInto(out *CustomResourceDefinitionCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionCondition. -func (in *CustomResourceDefinitionCondition) DeepCopy() *CustomResourceDefinitionCondition { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionList) DeepCopyInto(out *CustomResourceDefinitionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]CustomResourceDefinition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionList. -func (in *CustomResourceDefinitionList) DeepCopy() *CustomResourceDefinitionList { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CustomResourceDefinitionList) 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 *CustomResourceDefinitionNames) DeepCopyInto(out *CustomResourceDefinitionNames) { - *out = *in - if in.ShortNames != nil { - in, out := &in.ShortNames, &out.ShortNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.Categories != nil { - in, out := &in.Categories, &out.Categories - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionNames. -func (in *CustomResourceDefinitionNames) DeepCopy() *CustomResourceDefinitionNames { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionNames) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionSpec) DeepCopyInto(out *CustomResourceDefinitionSpec) { - *out = *in - in.Names.DeepCopyInto(&out.Names) - if in.Validation != nil { - in, out := &in.Validation, &out.Validation - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } - if in.Subresources != nil { - in, out := &in.Subresources, &out.Subresources - *out = new(CustomResourceSubresources) - (*in).DeepCopyInto(*out) - } - if in.Versions != nil { - in, out := &in.Versions, &out.Versions - *out = make([]CustomResourceDefinitionVersion, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.AdditionalPrinterColumns != nil { - in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns - *out = make([]CustomResourceColumnDefinition, len(*in)) - copy(*out, *in) - } - if in.SelectableFields != nil { - in, out := &in.SelectableFields, &out.SelectableFields - *out = make([]SelectableField, len(*in)) - copy(*out, *in) - } - if in.Conversion != nil { - in, out := &in.Conversion, &out.Conversion - *out = new(CustomResourceConversion) - (*in).DeepCopyInto(*out) - } - if in.PreserveUnknownFields != nil { - in, out := &in.PreserveUnknownFields, &out.PreserveUnknownFields - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionSpec. -func (in *CustomResourceDefinitionSpec) DeepCopy() *CustomResourceDefinitionSpec { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionStatus) DeepCopyInto(out *CustomResourceDefinitionStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]CustomResourceDefinitionCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - in.AcceptedNames.DeepCopyInto(&out.AcceptedNames) - if in.StoredVersions != nil { - in, out := &in.StoredVersions, &out.StoredVersions - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionStatus. -func (in *CustomResourceDefinitionStatus) DeepCopy() *CustomResourceDefinitionStatus { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceDefinitionVersion) DeepCopyInto(out *CustomResourceDefinitionVersion) { - *out = *in - if in.DeprecationWarning != nil { - in, out := &in.DeprecationWarning, &out.DeprecationWarning - *out = new(string) - **out = **in - } - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = new(CustomResourceValidation) - (*in).DeepCopyInto(*out) - } - if in.Subresources != nil { - in, out := &in.Subresources, &out.Subresources - *out = new(CustomResourceSubresources) - (*in).DeepCopyInto(*out) - } - if in.AdditionalPrinterColumns != nil { - in, out := &in.AdditionalPrinterColumns, &out.AdditionalPrinterColumns - *out = make([]CustomResourceColumnDefinition, len(*in)) - copy(*out, *in) - } - if in.SelectableFields != nil { - in, out := &in.SelectableFields, &out.SelectableFields - *out = make([]SelectableField, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceDefinitionVersion. -func (in *CustomResourceDefinitionVersion) DeepCopy() *CustomResourceDefinitionVersion { - if in == nil { - return nil - } - out := new(CustomResourceDefinitionVersion) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceScale) DeepCopyInto(out *CustomResourceSubresourceScale) { - *out = *in - if in.LabelSelectorPath != nil { - in, out := &in.LabelSelectorPath, &out.LabelSelectorPath - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceScale. -func (in *CustomResourceSubresourceScale) DeepCopy() *CustomResourceSubresourceScale { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceScale) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresourceStatus) DeepCopyInto(out *CustomResourceSubresourceStatus) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresourceStatus. -func (in *CustomResourceSubresourceStatus) DeepCopy() *CustomResourceSubresourceStatus { - if in == nil { - return nil - } - out := new(CustomResourceSubresourceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceSubresources) DeepCopyInto(out *CustomResourceSubresources) { - *out = *in - if in.Status != nil { - in, out := &in.Status, &out.Status - *out = new(CustomResourceSubresourceStatus) - **out = **in - } - if in.Scale != nil { - in, out := &in.Scale, &out.Scale - *out = new(CustomResourceSubresourceScale) - (*in).DeepCopyInto(*out) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceSubresources. -func (in *CustomResourceSubresources) DeepCopy() *CustomResourceSubresources { - if in == nil { - return nil - } - out := new(CustomResourceSubresources) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomResourceValidation) DeepCopyInto(out *CustomResourceValidation) { - *out = *in - if in.OpenAPIV3Schema != nil { - in, out := &in.OpenAPIV3Schema, &out.OpenAPIV3Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomResourceValidation. -func (in *CustomResourceValidation) DeepCopy() *CustomResourceValidation { - if in == nil { - return nil - } - out := new(CustomResourceValidation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExternalDocumentation) DeepCopyInto(out *ExternalDocumentation) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExternalDocumentation. -func (in *ExternalDocumentation) DeepCopy() *ExternalDocumentation { - if in == nil { - return nil - } - out := new(ExternalDocumentation) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDefinitions) DeepCopyInto(out *JSONSchemaDefinitions) { - { - in := &in - *out = make(JSONSchemaDefinitions, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDefinitions. -func (in JSONSchemaDefinitions) DeepCopy() JSONSchemaDefinitions { - if in == nil { - return nil - } - out := new(JSONSchemaDefinitions) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in JSONSchemaDependencies) DeepCopyInto(out *JSONSchemaDependencies) { - { - in := &in - *out = make(JSONSchemaDependencies, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaDependencies. -func (in JSONSchemaDependencies) DeepCopy() JSONSchemaDependencies { - if in == nil { - return nil - } - out := new(JSONSchemaDependencies) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaProps) DeepCopyInto(out *JSONSchemaProps) { - clone := in.DeepCopy() - *out = *clone - return -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrArray) DeepCopyInto(out *JSONSchemaPropsOrArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.JSONSchemas != nil { - in, out := &in.JSONSchemas, &out.JSONSchemas - *out = make([]JSONSchemaProps, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrArray. -func (in *JSONSchemaPropsOrArray) DeepCopy() *JSONSchemaPropsOrArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrBool) DeepCopyInto(out *JSONSchemaPropsOrBool) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrBool. -func (in *JSONSchemaPropsOrBool) DeepCopy() *JSONSchemaPropsOrBool { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrBool) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONSchemaPropsOrStringArray) DeepCopyInto(out *JSONSchemaPropsOrStringArray) { - *out = *in - if in.Schema != nil { - in, out := &in.Schema, &out.Schema - *out = (*in).DeepCopy() - } - if in.Property != nil { - in, out := &in.Property, &out.Property - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONSchemaPropsOrStringArray. -func (in *JSONSchemaPropsOrStringArray) DeepCopy() *JSONSchemaPropsOrStringArray { - if in == nil { - return nil - } - out := new(JSONSchemaPropsOrStringArray) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SelectableField) DeepCopyInto(out *SelectableField) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SelectableField. -func (in *SelectableField) DeepCopy() *SelectableField { - if in == nil { - return nil - } - out := new(SelectableField) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Path != nil { - in, out := &in.Path, &out.Path - *out = new(string) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ValidationRule) DeepCopyInto(out *ValidationRule) { - *out = *in - if in.Reason != nil { - in, out := &in.Reason, &out.Reason - *out = new(FieldValueErrorReason) - **out = **in - } - if in.OptionalOldSelf != nil { - in, out := &in.OptionalOldSelf, &out.OptionalOldSelf - *out = new(bool) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRule. -func (in *ValidationRule) DeepCopy() *ValidationRule { - if in == nil { - return nil - } - out := new(ValidationRule) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ValidationRules) DeepCopyInto(out *ValidationRules) { - { - in := &in - *out = make(ValidationRules, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ValidationRules. -func (in ValidationRules) DeepCopy() ValidationRules { - if in == nil { - return nil - } - out := new(ValidationRules) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *WebhookClientConfig) DeepCopyInto(out *WebhookClientConfig) { - *out = *in - if in.URL != nil { - in, out := &in.URL, &out.URL - *out = new(string) - **out = **in - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookClientConfig. -func (in *WebhookClientConfig) DeepCopy() *WebhookClientConfig { - if in == nil { - return nil - } - out := new(WebhookClientConfig) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go deleted file mode 100644 index 3c14acfc2..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcecolumndefinition.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use -// with apply. -// -// CustomResourceColumnDefinition specifies a column for server side printing. -type CustomResourceColumnDefinitionApplyConfiguration struct { - // name is a human readable name for the column. - Name *string `json:"name,omitempty"` - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Type *string `json:"type,omitempty"` - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Format *string `json:"format,omitempty"` - // description is a human readable description of this column. - Description *string `json:"description,omitempty"` - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - Priority *int32 `json:"priority,omitempty"` - // jsonPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - JSONPath *string `json:"jsonPath,omitempty"` -} - -// CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with -// apply. -func CustomResourceColumnDefinition() *CustomResourceColumnDefinitionApplyConfiguration { - return &CustomResourceColumnDefinitionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithName(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Name = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithType(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithFormat(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Format = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithDescription(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Description = &value - return b -} - -// WithPriority sets the Priority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Priority field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithPriority(value int32) *CustomResourceColumnDefinitionApplyConfiguration { - b.Priority = &value - return b -} - -// WithJSONPath sets the JSONPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the JSONPath field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithJSONPath(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.JSONPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go deleted file mode 100644 index f2d185336..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourceconversion.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use -// with apply. -// -// CustomResourceConversion describes how to convert different versions of a CR. -type CustomResourceConversionApplyConfiguration struct { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `"None"`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `"Webhook"`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhook to be set. - Strategy *apiextensionsv1.ConversionStrategyType `json:"strategy,omitempty"` - // webhook describes how to call the conversion webhook. Required when `strategy` is set to `"Webhook"`. - Webhook *WebhookConversionApplyConfiguration `json:"webhook,omitempty"` -} - -// CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with -// apply. -func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { - return &CustomResourceConversionApplyConfiguration{} -} - -// WithStrategy sets the Strategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Strategy field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value apiextensionsv1.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { - b.Strategy = &value - return b -} - -// WithWebhook sets the Webhook field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Webhook field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithWebhook(value *WebhookConversionApplyConfiguration) *CustomResourceConversionApplyConfiguration { - b.Webhook = value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go deleted file mode 100644 index 4884c2523..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinition.go +++ /dev/null @@ -1,249 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use -// with apply. -// -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -type CustomResourceDefinitionApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec describes how the user wants the resources to appear - Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` - // status indicates the actual state of the CustomResourceDefinition - Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` -} - -// CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with -// apply. -func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfiguration { - b := &CustomResourceDefinitionApplyConfiguration{} - b.WithName(name) - b.WithKind("CustomResourceDefinition") - b.WithAPIVersion("apiextensions.k8s.io/v1") - return b -} - -func (b CustomResourceDefinitionApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithKind(value string) *CustomResourceDefinitionApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithAPIVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGenerateName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithNamespace(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithUID(value types.UID) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithResourceVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGeneration(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithLabels(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithAnnotations(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CustomResourceDefinitionApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CustomResourceDefinitionApplyConfiguration) WithFinalizers(values ...string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CustomResourceDefinitionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithSpec(value *CustomResourceDefinitionSpecApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithStatus(value *CustomResourceDefinitionStatusApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go deleted file mode 100644 index 54f7d2d7b..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitioncondition.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use -// with apply. -// -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -type CustomResourceDefinitionConditionApplyConfiguration struct { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - Type *apiextensionsv1.CustomResourceDefinitionConditionType `json:"type,omitempty"` - // status is the status of the condition. - // Can be True, False, Unknown. - Status *apiextensionsv1.ConditionStatus `json:"status,omitempty"` - // lastTransitionTime last time the condition transitioned from one status to another. - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - Reason *string `json:"reason,omitempty"` - // message is a human-readable message indicating details about last transition. - Message *string `json:"message,omitempty"` - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` -} - -// CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with -// apply. -func CustomResourceDefinitionCondition() *CustomResourceDefinitionConditionApplyConfiguration { - return &CustomResourceDefinitionConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithType(value apiextensionsv1.CustomResourceDefinitionConditionType) *CustomResourceDefinitionConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithStatus(value apiextensionsv1.ConditionStatus) *CustomResourceDefinitionConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *CustomResourceDefinitionConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithReason(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithMessage(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Message = &value - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithObservedGeneration(value int64) *CustomResourceDefinitionConditionApplyConfiguration { - b.ObservedGeneration = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go deleted file mode 100644 index d6558eec8..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionnames.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use -// with apply. -// -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -type CustomResourceDefinitionNamesApplyConfiguration struct { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - Plural *string `json:"plural,omitempty"` - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - Singular *string `json:"singular,omitempty"` - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - ShortNames []string `json:"shortNames,omitempty"` - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - Kind *string `json:"kind,omitempty"` - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - ListKind *string `json:"listKind,omitempty"` - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - Categories []string `json:"categories,omitempty"` -} - -// CustomResourceDefinitionNamesApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionNames type for use with -// apply. -func CustomResourceDefinitionNames() *CustomResourceDefinitionNamesApplyConfiguration { - return &CustomResourceDefinitionNamesApplyConfiguration{} -} - -// WithPlural sets the Plural field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Plural field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithPlural(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Plural = &value - return b -} - -// WithSingular sets the Singular field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Singular field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithSingular(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Singular = &value - return b -} - -// WithShortNames adds the given value to the ShortNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ShortNames field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithShortNames(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.ShortNames = append(b.ShortNames, values[i]) - } - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Kind = &value - return b -} - -// WithListKind sets the ListKind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ListKind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithListKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.ListKind = &value - return b -} - -// WithCategories adds the given value to the Categories field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Categories field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithCategories(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.Categories = append(b.Categories, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go deleted file mode 100644 index b33a82418..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionspec.go +++ /dev/null @@ -1,115 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use -// with apply. -// -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -type CustomResourceDefinitionSpecApplyConfiguration struct { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - Group *string `json:"group,omitempty"` - // names specify the resource and kind names for the custom resource. - Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. - Scope *apiextensionsv1.ResourceScope `json:"scope,omitempty"` - // versions is the list of all API versions of the defined custom resource. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` - // conversion defines conversion settings for the CRD. - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // This field is deprecated in favor of setting `x-preserve-unknown-fields` to true in `spec.versions[*].schema.openAPIV3Schema`. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` -} - -// CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with -// apply. -func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration { - return &CustomResourceDefinitionSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Names = value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration { - b.Scope = &value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Conversion = value - return b -} - -// WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PreserveUnknownFields field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration { - b.PreserveUnknownFields = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go deleted file mode 100644 index 8a590de96..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionstatus.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use -// with apply. -// -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -type CustomResourceDefinitionStatusApplyConfiguration struct { - // conditions indicate state for particular aspects of a CustomResourceDefinition - Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - StoredVersions []string `json:"storedVersions,omitempty"` - // The generation observed by the CRD controller. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` -} - -// CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with -// apply. -func CustomResourceDefinitionStatus() *CustomResourceDefinitionStatusApplyConfiguration { - return &CustomResourceDefinitionStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithConditions(values ...*CustomResourceDefinitionConditionApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithAcceptedNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - b.AcceptedNames = value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithStoredVersions(values ...string) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithObservedGeneration(value int64) *CustomResourceDefinitionStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go deleted file mode 100644 index 0362753e8..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcedefinitionversion.go +++ /dev/null @@ -1,143 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use -// with apply. -// -// CustomResourceDefinitionVersion describes a version for CRD. -type CustomResourceDefinitionVersionApplyConfiguration struct { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - Name *string `json:"name,omitempty"` - // served is a flag enabling/disabling this version from being served via REST APIs - Served *bool `json:"served,omitempty"` - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - Storage *bool `json:"storage,omitempty"` - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - Deprecated *bool `json:"deprecated,omitempty"` - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - // schema describes the schema used for validation, pruning, and defaulting of this version of the custom resource. - Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` - // subresources specify what subresources this version of the defined custom resource have. - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If no columns are specified, a single column displaying the age of the custom resource is used. - AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - // selectableFields specifies paths to fields that may be used as field selectors. - // A maximum of 8 selectable fields are allowed. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` -} - -// CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with -// apply. -func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { - return &CustomResourceDefinitionVersionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithServed sets the Served field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Served field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Served = &value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Storage = &value - return b -} - -// WithDeprecated sets the Deprecated field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Deprecated field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Deprecated = &value - return b -} - -// WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeprecationWarning field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.DeprecationWarning = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Schema = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Subresources = value - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalPrinterColumns") - } - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) - } - return b -} - -// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the SelectableFields field. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSelectableFields") - } - b.SelectableFields = append(b.SelectableFields, *values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go deleted file mode 100644 index 77307d9af..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresources.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use -// with apply. -// -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -type CustomResourceSubresourcesApplyConfiguration struct { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - Status *apiextensionsv1.CustomResourceSubresourceStatus `json:"status,omitempty"` - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` -} - -// CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with -// apply. -func CustomResourceSubresources() *CustomResourceSubresourcesApplyConfiguration { - return &CustomResourceSubresourcesApplyConfiguration{} -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceSubresourcesApplyConfiguration) WithStatus(value apiextensionsv1.CustomResourceSubresourceStatus) *CustomResourceSubresourcesApplyConfiguration { - b.Status = &value - return b -} - -// WithScale sets the Scale field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scale field is set to the value of the last call. -func (b *CustomResourceSubresourcesApplyConfiguration) WithScale(value *CustomResourceSubresourceScaleApplyConfiguration) *CustomResourceSubresourcesApplyConfiguration { - b.Scale = value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go deleted file mode 100644 index 61743e236..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcesubresourcescale.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use -// with apply. -// -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -type CustomResourceSubresourceScaleApplyConfiguration struct { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - SpecReplicasPath *string `json:"specReplicasPath,omitempty"` - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` -} - -// CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with -// apply. -func CustomResourceSubresourceScale() *CustomResourceSubresourceScaleApplyConfiguration { - return &CustomResourceSubresourceScaleApplyConfiguration{} -} - -// WithSpecReplicasPath sets the SpecReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SpecReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithSpecReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.SpecReplicasPath = &value - return b -} - -// WithStatusReplicasPath sets the StatusReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StatusReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithStatusReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.StatusReplicasPath = &value - return b -} - -// WithLabelSelectorPath sets the LabelSelectorPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LabelSelectorPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithLabelSelectorPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.LabelSelectorPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go deleted file mode 100644 index 459ea7e69..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/customresourcevalidation.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use -// with apply. -// -// CustomResourceValidation is a list of validation methods for CustomResources. -type CustomResourceValidationApplyConfiguration struct { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` -} - -// CustomResourceValidationApplyConfiguration constructs a declarative configuration of the CustomResourceValidation type for use with -// apply. -func CustomResourceValidation() *CustomResourceValidationApplyConfiguration { - return &CustomResourceValidationApplyConfiguration{} -} - -// WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. -func (b *CustomResourceValidationApplyConfiguration) WithOpenAPIV3Schema(value *JSONSchemaPropsApplyConfiguration) *CustomResourceValidationApplyConfiguration { - b.OpenAPIV3Schema = value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go deleted file mode 100644 index 907f2ae7e..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/externaldocumentation.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use -// with apply. -// -// ExternalDocumentation allows referencing an external resource for extended documentation. -type ExternalDocumentationApplyConfiguration struct { - Description *string `json:"description,omitempty"` - URL *string `json:"url,omitempty"` -} - -// ExternalDocumentationApplyConfiguration constructs a declarative configuration of the ExternalDocumentation type for use with -// apply. -func ExternalDocumentation() *ExternalDocumentationApplyConfiguration { - return &ExternalDocumentationApplyConfiguration{} -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithDescription(value string) *ExternalDocumentationApplyConfiguration { - b.Description = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithURL(value string) *ExternalDocumentationApplyConfiguration { - b.URL = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go deleted file mode 100644 index 844140528..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/jsonschemaprops.go +++ /dev/null @@ -1,554 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use -// with apply. -// -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -type JSONSchemaPropsApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Schema *apiextensionsv1.JSONSchemaURL `json:"$schema,omitempty"` - Ref *string `json:"$ref,omitempty"` - Description *string `json:"description,omitempty"` - Type *string `json:"type,omitempty"` - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - Format *string `json:"format,omitempty"` - Title *string `json:"title,omitempty"` - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // Defaulting requires spec.preserveUnknownFields to be false. - Default *apiextensionsv1.JSON `json:"default,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` - ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` - MaxLength *int64 `json:"maxLength,omitempty"` - MinLength *int64 `json:"minLength,omitempty"` - Pattern *string `json:"pattern,omitempty"` - MaxItems *int64 `json:"maxItems,omitempty"` - MinItems *int64 `json:"minItems,omitempty"` - UniqueItems *bool `json:"uniqueItems,omitempty"` - MultipleOf *float64 `json:"multipleOf,omitempty"` - Enum []apiextensionsv1.JSON `json:"enum,omitempty"` - MaxProperties *int64 `json:"maxProperties,omitempty"` - MinProperties *int64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` - Items *apiextensionsv1.JSONSchemaPropsOrArray `json:"items,omitempty"` - AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` - OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` - AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` - Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` - Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` - AdditionalProperties *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` - PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` - Dependencies *apiextensionsv1.JSONSchemaDependencies `json:"dependencies,omitempty"` - AdditionalItems *apiextensionsv1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` - Definitions *apiextensionsv1.JSONSchemaDefinitions `json:"definitions,omitempty"` - ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` - Example *apiextensionsv1.JSON `json:"example,omitempty"` - Nullable *bool `json:"nullable,omitempty"` - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - XListType *string `json:"x-kubernetes-list-type,omitempty"` - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - XMapType *string `json:"x-kubernetes-map-type,omitempty"` - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - XValidations *apiextensionsv1.ValidationRules `json:"x-kubernetes-validations,omitempty"` -} - -// JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with -// apply. -func JSONSchemaProps() *JSONSchemaPropsApplyConfiguration { - return &JSONSchemaPropsApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithID(value string) *JSONSchemaPropsApplyConfiguration { - b.ID = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithSchema(value apiextensionsv1.JSONSchemaURL) *JSONSchemaPropsApplyConfiguration { - b.Schema = &value - return b -} - -// WithRef sets the Ref field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ref field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithRef(value string) *JSONSchemaPropsApplyConfiguration { - b.Ref = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDescription(value string) *JSONSchemaPropsApplyConfiguration { - b.Description = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithType(value string) *JSONSchemaPropsApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithFormat(value string) *JSONSchemaPropsApplyConfiguration { - b.Format = &value - return b -} - -// WithTitle sets the Title field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Title field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithTitle(value string) *JSONSchemaPropsApplyConfiguration { - b.Title = &value - return b -} - -// WithDefault sets the Default field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Default field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefault(value apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Default = &value - return b -} - -// WithMaximum sets the Maximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Maximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaximum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Maximum = &value - return b -} - -// WithExclusiveMaximum sets the ExclusiveMaximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMaximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMaximum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMaximum = &value - return b -} - -// WithMinimum sets the Minimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Minimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinimum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Minimum = &value - return b -} - -// WithExclusiveMinimum sets the ExclusiveMinimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMinimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMinimum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMinimum = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxLength = &value - return b -} - -// WithMinLength sets the MinLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinLength = &value - return b -} - -// WithPattern sets the Pattern field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Pattern field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithPattern(value string) *JSONSchemaPropsApplyConfiguration { - b.Pattern = &value - return b -} - -// WithMaxItems sets the MaxItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxItems = &value - return b -} - -// WithMinItems sets the MinItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinItems = &value - return b -} - -// WithUniqueItems sets the UniqueItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UniqueItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithUniqueItems(value bool) *JSONSchemaPropsApplyConfiguration { - b.UniqueItems = &value - return b -} - -// WithMultipleOf sets the MultipleOf field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MultipleOf field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMultipleOf(value float64) *JSONSchemaPropsApplyConfiguration { - b.MultipleOf = &value - return b -} - -// WithEnum adds the given value to the Enum field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Enum field. -func (b *JSONSchemaPropsApplyConfiguration) WithEnum(values ...apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Enum = append(b.Enum, values[i]) - } - return b -} - -// WithMaxProperties sets the MaxProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxProperties = &value - return b -} - -// WithMinProperties sets the MinProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinProperties = &value - return b -} - -// WithRequired adds the given value to the Required field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Required field. -func (b *JSONSchemaPropsApplyConfiguration) WithRequired(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Required = append(b.Required, values[i]) - } - return b -} - -// WithItems sets the Items field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Items field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithItems(value apiextensionsv1.JSONSchemaPropsOrArray) *JSONSchemaPropsApplyConfiguration { - b.Items = &value - return b -} - -// WithAllOf adds the given value to the AllOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAllOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAllOf") - } - b.AllOf = append(b.AllOf, *values[i]) - } - return b -} - -// WithOneOf adds the given value to the OneOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OneOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithOneOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOneOf") - } - b.OneOf = append(b.OneOf, *values[i]) - } - return b -} - -// WithAnyOf adds the given value to the AnyOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AnyOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAnyOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAnyOf") - } - b.AnyOf = append(b.AnyOf, *values[i]) - } - return b -} - -// WithNot sets the Not field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Not field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNot(value *JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.Not = value - return b -} - -// WithProperties puts the entries into the Properties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Properties field, -// overwriting an existing map entries in Properties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.Properties == nil && len(entries) > 0 { - b.Properties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.Properties[k] = v - } - return b -} - -// WithAdditionalProperties sets the AdditionalProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalProperties(value apiextensionsv1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalProperties = &value - return b -} - -// WithPatternProperties puts the entries into the PatternProperties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the PatternProperties field, -// overwriting an existing map entries in PatternProperties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithPatternProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.PatternProperties == nil && len(entries) > 0 { - b.PatternProperties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.PatternProperties[k] = v - } - return b -} - -// WithDependencies sets the Dependencies field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Dependencies field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDependencies(value apiextensionsv1.JSONSchemaDependencies) *JSONSchemaPropsApplyConfiguration { - b.Dependencies = &value - return b -} - -// WithAdditionalItems sets the AdditionalItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalItems(value apiextensionsv1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalItems = &value - return b -} - -// WithDefinitions sets the Definitions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Definitions field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefinitions(value apiextensionsv1.JSONSchemaDefinitions) *JSONSchemaPropsApplyConfiguration { - b.Definitions = &value - return b -} - -// WithExternalDocs sets the ExternalDocs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExternalDocs field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExternalDocs(value *ExternalDocumentationApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.ExternalDocs = value - return b -} - -// WithExample sets the Example field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Example field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExample(value apiextensionsv1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Example = &value - return b -} - -// WithNullable sets the Nullable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Nullable field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNullable(value bool) *JSONSchemaPropsApplyConfiguration { - b.Nullable = &value - return b -} - -// WithXPreserveUnknownFields sets the XPreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XPreserveUnknownFields field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXPreserveUnknownFields(value bool) *JSONSchemaPropsApplyConfiguration { - b.XPreserveUnknownFields = &value - return b -} - -// WithXEmbeddedResource sets the XEmbeddedResource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XEmbeddedResource field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXEmbeddedResource(value bool) *JSONSchemaPropsApplyConfiguration { - b.XEmbeddedResource = &value - return b -} - -// WithXIntOrString sets the XIntOrString field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XIntOrString field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXIntOrString(value bool) *JSONSchemaPropsApplyConfiguration { - b.XIntOrString = &value - return b -} - -// WithXListMapKeys adds the given value to the XListMapKeys field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the XListMapKeys field. -func (b *JSONSchemaPropsApplyConfiguration) WithXListMapKeys(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.XListMapKeys = append(b.XListMapKeys, values[i]) - } - return b -} - -// WithXListType sets the XListType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XListType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXListType(value string) *JSONSchemaPropsApplyConfiguration { - b.XListType = &value - return b -} - -// WithXMapType sets the XMapType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XMapType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXMapType(value string) *JSONSchemaPropsApplyConfiguration { - b.XMapType = &value - return b -} - -// WithXValidations sets the XValidations field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XValidations field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXValidations(value apiextensionsv1.ValidationRules) *JSONSchemaPropsApplyConfiguration { - b.XValidations = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go deleted file mode 100644 index b1edc643f..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/selectablefield.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use -// with apply. -// -// SelectableField specifies the JSON path of a field that may be used with field selectors. -type SelectableFieldApplyConfiguration struct { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - JSONPath *string `json:"jsonPath,omitempty"` -} - -// SelectableFieldApplyConfiguration constructs a declarative configuration of the SelectableField type for use with -// apply. -func SelectableField() *SelectableFieldApplyConfiguration { - return &SelectableFieldApplyConfiguration{} -} - -// WithJSONPath sets the JSONPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the JSONPath field is set to the value of the last call. -func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { - b.JSONPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go deleted file mode 100644 index 215bc3a14..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/servicereference.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use -// with apply. -// -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReferenceApplyConfiguration struct { - // namespace is the namespace of the service. - // Required - Namespace *string `json:"namespace,omitempty"` - // name is the name of the service. - // Required - Name *string `json:"name,omitempty"` - // path is an optional URL path at which the webhook will be contacted. - Path *string `json:"path,omitempty"` - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - Port *int32 `json:"port,omitempty"` -} - -// ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with -// apply. -func ServiceReference() *ServiceReferenceApplyConfiguration { - return &ServiceReferenceApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration { - b.Path = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { - b.Port = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go deleted file mode 100644 index 4f2278bf2..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/validationrule.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" -) - -// ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use -// with apply. -// -// ValidationRule describes a validation rule written in the CEL expression language. -type ValidationRuleApplyConfiguration struct { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - Rule *string `json:"rule,omitempty"` - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - Message *string `json:"message,omitempty"` - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - MessageExpression *string `json:"messageExpression,omitempty"` - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - Reason *apiextensionsv1.FieldValueErrorReason `json:"reason,omitempty"` - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - FieldPath *string `json:"fieldPath,omitempty"` - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` -} - -// ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with -// apply. -func ValidationRule() *ValidationRuleApplyConfiguration { - return &ValidationRuleApplyConfiguration{} -} - -// WithRule sets the Rule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Rule field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithRule(value string) *ValidationRuleApplyConfiguration { - b.Rule = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithMessage(value string) *ValidationRuleApplyConfiguration { - b.Message = &value - return b -} - -// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MessageExpression field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithMessageExpression(value string) *ValidationRuleApplyConfiguration { - b.MessageExpression = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithReason(value apiextensionsv1.FieldValueErrorReason) *ValidationRuleApplyConfiguration { - b.Reason = &value - return b -} - -// WithFieldPath sets the FieldPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FieldPath field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithFieldPath(value string) *ValidationRuleApplyConfiguration { - b.FieldPath = &value - return b -} - -// WithOptionalOldSelf sets the OptionalOldSelf field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OptionalOldSelf field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithOptionalOldSelf(value bool) *ValidationRuleApplyConfiguration { - b.OptionalOldSelf = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go deleted file mode 100644 index c984e1dc8..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookclientconfig.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use -// with apply. -// -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -type WebhookClientConfigApplyConfiguration struct { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - URL *string `json:"url,omitempty"` - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - CABundle []byte `json:"caBundle,omitempty"` -} - -// WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with -// apply. -func WebhookClientConfig() *WebhookClientConfigApplyConfiguration { - return &WebhookClientConfigApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration { - b.URL = &value - return b -} - -// WithService sets the Service field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Service field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration { - b.Service = value - return b -} - -// WithCABundle adds the given value to the CABundle field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CABundle field. -func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration { - for i := range values { - b.CABundle = append(b.CABundle, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go deleted file mode 100644 index 6daf74eac..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1/webhookconversion.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// WebhookConversionApplyConfiguration represents a declarative configuration of the WebhookConversion type for use -// with apply. -// -// WebhookConversion describes how to call a conversion webhook -type WebhookConversionApplyConfiguration struct { - // clientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - ClientConfig *WebhookClientConfigApplyConfiguration `json:"clientConfig,omitempty"` - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` -} - -// WebhookConversionApplyConfiguration constructs a declarative configuration of the WebhookConversion type for use with -// apply. -func WebhookConversion() *WebhookConversionApplyConfiguration { - return &WebhookConversionApplyConfiguration{} -} - -// WithClientConfig sets the ClientConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ClientConfig field is set to the value of the last call. -func (b *WebhookConversionApplyConfiguration) WithClientConfig(value *WebhookClientConfigApplyConfiguration) *WebhookConversionApplyConfiguration { - b.ClientConfig = value - return b -} - -// WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. -func (b *WebhookConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *WebhookConversionApplyConfiguration { - for i := range values { - b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go deleted file mode 100644 index ea6f783ba..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcecolumndefinition.go +++ /dev/null @@ -1,98 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceColumnDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceColumnDefinition type for use -// with apply. -// -// CustomResourceColumnDefinition specifies a column for server side printing. -type CustomResourceColumnDefinitionApplyConfiguration struct { - // name is a human readable name for the column. - Name *string `json:"name,omitempty"` - // type is an OpenAPI type definition for this column. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Type *string `json:"type,omitempty"` - // format is an optional OpenAPI type definition for this column. The 'name' format is applied - // to the primary identifier column to assist in clients identifying column is the resource name. - // See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for details. - Format *string `json:"format,omitempty"` - // description is a human readable description of this column. - Description *string `json:"description,omitempty"` - // priority is an integer defining the relative importance of this column compared to others. Lower - // numbers are considered higher priority. Columns that may be omitted in limited space scenarios - // should be given a priority greater than 0. - Priority *int32 `json:"priority,omitempty"` - // JSONPath is a simple JSON path (i.e. with array notation) which is evaluated against - // each custom resource to produce the value for this column. - JSONPath *string `json:"JSONPath,omitempty"` -} - -// CustomResourceColumnDefinitionApplyConfiguration constructs a declarative configuration of the CustomResourceColumnDefinition type for use with -// apply. -func CustomResourceColumnDefinition() *CustomResourceColumnDefinitionApplyConfiguration { - return &CustomResourceColumnDefinitionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithName(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Name = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithType(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithFormat(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Format = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithDescription(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.Description = &value - return b -} - -// WithPriority sets the Priority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Priority field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithPriority(value int32) *CustomResourceColumnDefinitionApplyConfiguration { - b.Priority = &value - return b -} - -// WithJSONPath sets the JSONPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the JSONPath field is set to the value of the last call. -func (b *CustomResourceColumnDefinitionApplyConfiguration) WithJSONPath(value string) *CustomResourceColumnDefinitionApplyConfiguration { - b.JSONPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go deleted file mode 100644 index 8cc99f2eb..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourceconversion.go +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -) - -// CustomResourceConversionApplyConfiguration represents a declarative configuration of the CustomResourceConversion type for use -// with apply. -// -// CustomResourceConversion describes how to convert different versions of a CR. -type CustomResourceConversionApplyConfiguration struct { - // strategy specifies how custom resources are converted between versions. Allowed values are: - // - `None`: The converter only change the apiVersion and would not touch any other field in the custom resource. - // - `Webhook`: API Server will call to an external webhook to do the conversion. Additional information - // is needed for this option. This requires spec.preserveUnknownFields to be false, and spec.conversion.webhookClientConfig to be set. - Strategy *apiextensionsv1beta1.ConversionStrategyType `json:"strategy,omitempty"` - // webhookClientConfig is the instructions for how to call the webhook if strategy is `Webhook`. - // Required when `strategy` is set to `Webhook`. - WebhookClientConfig *WebhookClientConfigApplyConfiguration `json:"webhookClientConfig,omitempty"` - // conversionReviewVersions is an ordered list of preferred `ConversionReview` - // versions the Webhook expects. The API server will use the first version in - // the list which it supports. If none of the versions specified in this list - // are supported by API server, conversion will fail for the custom resource. - // If a persisted Webhook configuration specifies allowed versions and does not - // include any versions known to the API Server, calls to the webhook will fail. - // Defaults to `["v1beta1"]`. - ConversionReviewVersions []string `json:"conversionReviewVersions,omitempty"` -} - -// CustomResourceConversionApplyConfiguration constructs a declarative configuration of the CustomResourceConversion type for use with -// apply. -func CustomResourceConversion() *CustomResourceConversionApplyConfiguration { - return &CustomResourceConversionApplyConfiguration{} -} - -// WithStrategy sets the Strategy field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Strategy field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithStrategy(value apiextensionsv1beta1.ConversionStrategyType) *CustomResourceConversionApplyConfiguration { - b.Strategy = &value - return b -} - -// WithWebhookClientConfig sets the WebhookClientConfig field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the WebhookClientConfig field is set to the value of the last call. -func (b *CustomResourceConversionApplyConfiguration) WithWebhookClientConfig(value *WebhookClientConfigApplyConfiguration) *CustomResourceConversionApplyConfiguration { - b.WebhookClientConfig = value - return b -} - -// WithConversionReviewVersions adds the given value to the ConversionReviewVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ConversionReviewVersions field. -func (b *CustomResourceConversionApplyConfiguration) WithConversionReviewVersions(values ...string) *CustomResourceConversionApplyConfiguration { - for i := range values { - b.ConversionReviewVersions = append(b.ConversionReviewVersions, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go deleted file mode 100644 index 4838dafcb..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinition.go +++ /dev/null @@ -1,250 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - v1 "k8s.io/client-go/applyconfigurations/meta/v1" -) - -// CustomResourceDefinitionApplyConfiguration represents a declarative configuration of the CustomResourceDefinition type for use -// with apply. -// -// CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format -// <.spec.name>.<.spec.group>. -// Deprecated in v1.16, planned for removal in v1.22. Use apiextensions.k8s.io/v1 CustomResourceDefinition instead. -type CustomResourceDefinitionApplyConfiguration struct { - v1.TypeMetaApplyConfiguration `json:",inline"` - // Standard object's metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *v1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // spec describes how the user wants the resources to appear - Spec *CustomResourceDefinitionSpecApplyConfiguration `json:"spec,omitempty"` - // status indicates the actual state of the CustomResourceDefinition - Status *CustomResourceDefinitionStatusApplyConfiguration `json:"status,omitempty"` -} - -// CustomResourceDefinition constructs a declarative configuration of the CustomResourceDefinition type for use with -// apply. -func CustomResourceDefinition(name string) *CustomResourceDefinitionApplyConfiguration { - b := &CustomResourceDefinitionApplyConfiguration{} - b.WithName(name) - b.WithKind("CustomResourceDefinition") - b.WithAPIVersion("apiextensions.k8s.io/v1beta1") - return b -} - -func (b CustomResourceDefinitionApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithKind(value string) *CustomResourceDefinitionApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithAPIVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGenerateName(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithNamespace(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithUID(value types.UID) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithResourceVersion(value string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithGeneration(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithCreationTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionTimestamp(value metav1.Time) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithLabels(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *CustomResourceDefinitionApplyConfiguration) WithAnnotations(entries map[string]string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *CustomResourceDefinitionApplyConfiguration) WithOwnerReferences(values ...*v1.OwnerReferenceApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *CustomResourceDefinitionApplyConfiguration) WithFinalizers(values ...string) *CustomResourceDefinitionApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *CustomResourceDefinitionApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &v1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithSpec(value *CustomResourceDefinitionSpecApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionApplyConfiguration) WithStatus(value *CustomResourceDefinitionStatusApplyConfiguration) *CustomResourceDefinitionApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *CustomResourceDefinitionApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go deleted file mode 100644 index ce0577234..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitioncondition.go +++ /dev/null @@ -1,100 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// CustomResourceDefinitionConditionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionCondition type for use -// with apply. -// -// CustomResourceDefinitionCondition contains details for the current condition of this pod. -type CustomResourceDefinitionConditionApplyConfiguration struct { - // type is the type of the condition. Types include Established, NamesAccepted and Terminating. - Type *apiextensionsv1beta1.CustomResourceDefinitionConditionType `json:"type,omitempty"` - // status is the status of the condition. - // Can be True, False, Unknown. - Status *apiextensionsv1beta1.ConditionStatus `json:"status,omitempty"` - // lastTransitionTime last time the condition transitioned from one status to another. - LastTransitionTime *v1.Time `json:"lastTransitionTime,omitempty"` - // reason is a unique, one-word, CamelCase reason for the condition's last transition. - Reason *string `json:"reason,omitempty"` - // message is a human-readable message indicating details about last transition. - Message *string `json:"message,omitempty"` - // observedGeneration represents the .metadata.generation that the condition was set based upon. - // For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - // with respect to the current state of the instance. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` -} - -// CustomResourceDefinitionConditionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionCondition type for use with -// apply. -func CustomResourceDefinitionCondition() *CustomResourceDefinitionConditionApplyConfiguration { - return &CustomResourceDefinitionConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithType(value apiextensionsv1beta1.CustomResourceDefinitionConditionType) *CustomResourceDefinitionConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithStatus(value apiextensionsv1beta1.ConditionStatus) *CustomResourceDefinitionConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithLastTransitionTime(value v1.Time) *CustomResourceDefinitionConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithReason(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithMessage(value string) *CustomResourceDefinitionConditionApplyConfiguration { - b.Message = &value - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CustomResourceDefinitionConditionApplyConfiguration) WithObservedGeneration(value int64) *CustomResourceDefinitionConditionApplyConfiguration { - b.ObservedGeneration = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go deleted file mode 100644 index 4ad23b7b2..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionnames.go +++ /dev/null @@ -1,104 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceDefinitionNamesApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionNames type for use -// with apply. -// -// CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition -type CustomResourceDefinitionNamesApplyConfiguration struct { - // plural is the plural name of the resource to serve. - // The custom resources are served under `/apis///.../`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - // Must be all lowercase. - Plural *string `json:"plural,omitempty"` - // singular is the singular name of the resource. It must be all lowercase. Defaults to lowercased `kind`. - Singular *string `json:"singular,omitempty"` - // shortNames are short names for the resource, exposed in API discovery documents, - // and used by clients to support invocations like `kubectl get `. - // It must be all lowercase. - ShortNames []string `json:"shortNames,omitempty"` - // kind is the serialized kind of the resource. It is normally CamelCase and singular. - // Custom resource instances will use this value as the `kind` attribute in API calls. - Kind *string `json:"kind,omitempty"` - // listKind is the serialized kind of the list for this resource. Defaults to "`kind`List". - ListKind *string `json:"listKind,omitempty"` - // categories is a list of grouped resources this custom resource belongs to (e.g. 'all'). - // This is published in API discovery documents, and used by clients to support invocations like - // `kubectl get all`. - Categories []string `json:"categories,omitempty"` -} - -// CustomResourceDefinitionNamesApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionNames type for use with -// apply. -func CustomResourceDefinitionNames() *CustomResourceDefinitionNamesApplyConfiguration { - return &CustomResourceDefinitionNamesApplyConfiguration{} -} - -// WithPlural sets the Plural field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Plural field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithPlural(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Plural = &value - return b -} - -// WithSingular sets the Singular field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Singular field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithSingular(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Singular = &value - return b -} - -// WithShortNames adds the given value to the ShortNames field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the ShortNames field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithShortNames(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.ShortNames = append(b.ShortNames, values[i]) - } - return b -} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.Kind = &value - return b -} - -// WithListKind sets the ListKind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ListKind field is set to the value of the last call. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithListKind(value string) *CustomResourceDefinitionNamesApplyConfiguration { - b.ListKind = &value - return b -} - -// WithCategories adds the given value to the Categories field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Categories field. -func (b *CustomResourceDefinitionNamesApplyConfiguration) WithCategories(values ...string) *CustomResourceDefinitionNamesApplyConfiguration { - for i := range values { - b.Categories = append(b.Categories, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go deleted file mode 100644 index 12e24ba2f..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionspec.go +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -) - -// CustomResourceDefinitionSpecApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionSpec type for use -// with apply. -// -// CustomResourceDefinitionSpec describes how a user wants their resource to appear -type CustomResourceDefinitionSpecApplyConfiguration struct { - // group is the API group of the defined custom resource. - // The custom resources are served under `/apis//...`. - // Must match the name of the CustomResourceDefinition (in the form `.`). - Group *string `json:"group,omitempty"` - // version is the API version of the defined custom resource. - // The custom resources are served under `/apis///...`. - // Must match the name of the first item in the `versions` list if `version` and `versions` are both specified. - // Optional if `versions` is specified. - // Deprecated: use `versions` instead. - Version *string `json:"version,omitempty"` - // names specify the resource and kind names for the custom resource. - Names *CustomResourceDefinitionNamesApplyConfiguration `json:"names,omitempty"` - // scope indicates whether the defined custom resource is cluster- or namespace-scoped. - // Allowed values are `Cluster` and `Namespaced`. Default is `Namespaced`. - Scope *apiextensionsv1beta1.ResourceScope `json:"scope,omitempty"` - // validation describes the schema used for validation and pruning of the custom resource. - // If present, this validation schema is used to validate all versions. - // Top-level and per-version schemas are mutually exclusive. - Validation *CustomResourceValidationApplyConfiguration `json:"validation,omitempty"` - // subresources specify what subresources the defined custom resource has. - // If present, this field configures subresources for all versions. - // Top-level and per-version subresources are mutually exclusive. - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - // versions is the list of all API versions of the defined custom resource. - // Optional if `version` is specified. - // The name of the first item in the `versions` list must match the `version` field if `version` and `versions` are both specified. - // Version names are used to compute the order in which served versions are listed in API discovery. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing - // major version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - Versions []CustomResourceDefinitionVersionApplyConfiguration `json:"versions,omitempty"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // If present, this field configures columns for all versions. - // Top-level and per-version columns are mutually exclusive. - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` - // conversion defines conversion settings for the CRD. - Conversion *CustomResourceConversionApplyConfiguration `json:"conversion,omitempty"` - // preserveUnknownFields indicates that object fields which are not specified - // in the OpenAPI schema should be preserved when persisting to storage. - // apiVersion, kind, metadata and known fields inside metadata are always preserved. - // If false, schemas must be defined for all versions. - // Defaults to true in v1beta for backwards compatibility. - // Deprecated: will be required to be false in v1. Preservation of unknown fields can be specified - // in the validation schema using the `x-kubernetes-preserve-unknown-fields: true` extension. - // See https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#field-pruning for details. - PreserveUnknownFields *bool `json:"preserveUnknownFields,omitempty"` -} - -// CustomResourceDefinitionSpecApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionSpec type for use with -// apply. -func CustomResourceDefinitionSpec() *CustomResourceDefinitionSpecApplyConfiguration { - return &CustomResourceDefinitionSpecApplyConfiguration{} -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithGroup(value string) *CustomResourceDefinitionSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersion(value string) *CustomResourceDefinitionSpecApplyConfiguration { - b.Version = &value - return b -} - -// WithNames sets the Names field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Names field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Names = value - return b -} - -// WithScope sets the Scope field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scope field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithScope(value apiextensionsv1beta1.ResourceScope) *CustomResourceDefinitionSpecApplyConfiguration { - b.Scope = &value - return b -} - -// WithValidation sets the Validation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Validation field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithValidation(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Validation = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Subresources = value - return b -} - -// WithVersions adds the given value to the Versions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Versions field. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithVersions(values ...*CustomResourceDefinitionVersionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithVersions") - } - b.Versions = append(b.Versions, *values[i]) - } - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalPrinterColumns") - } - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) - } - return b -} - -// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the SelectableFields field. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSelectableFields") - } - b.SelectableFields = append(b.SelectableFields, *values[i]) - } - return b -} - -// WithConversion sets the Conversion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Conversion field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithConversion(value *CustomResourceConversionApplyConfiguration) *CustomResourceDefinitionSpecApplyConfiguration { - b.Conversion = value - return b -} - -// WithPreserveUnknownFields sets the PreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the PreserveUnknownFields field is set to the value of the last call. -func (b *CustomResourceDefinitionSpecApplyConfiguration) WithPreserveUnknownFields(value bool) *CustomResourceDefinitionSpecApplyConfiguration { - b.PreserveUnknownFields = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go deleted file mode 100644 index e0107b3a7..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionstatus.go +++ /dev/null @@ -1,85 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceDefinitionStatusApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionStatus type for use -// with apply. -// -// CustomResourceDefinitionStatus indicates the state of the CustomResourceDefinition -type CustomResourceDefinitionStatusApplyConfiguration struct { - // conditions indicate state for particular aspects of a CustomResourceDefinition - Conditions []CustomResourceDefinitionConditionApplyConfiguration `json:"conditions,omitempty"` - // acceptedNames are the names that are actually being used to serve discovery. - // They may be different than the names in spec. - AcceptedNames *CustomResourceDefinitionNamesApplyConfiguration `json:"acceptedNames,omitempty"` - // storedVersions lists all versions of CustomResources that were ever persisted. Tracking these - // versions allows a migration path for stored versions in etcd. The field is mutable - // so a migration controller can finish a migration to another version (ensuring - // no old objects are left in storage), and then remove the rest of the - // versions from this list. - // Versions may not be removed from `spec.versions` while they exist in this list. - StoredVersions []string `json:"storedVersions,omitempty"` - // The generation observed by the CRD controller. - ObservedGeneration *int64 `json:"observedGeneration,omitempty"` -} - -// CustomResourceDefinitionStatusApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionStatus type for use with -// apply. -func CustomResourceDefinitionStatus() *CustomResourceDefinitionStatusApplyConfiguration { - return &CustomResourceDefinitionStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithConditions(values ...*CustomResourceDefinitionConditionApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} - -// WithAcceptedNames sets the AcceptedNames field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AcceptedNames field is set to the value of the last call. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithAcceptedNames(value *CustomResourceDefinitionNamesApplyConfiguration) *CustomResourceDefinitionStatusApplyConfiguration { - b.AcceptedNames = value - return b -} - -// WithStoredVersions adds the given value to the StoredVersions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the StoredVersions field. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithStoredVersions(values ...string) *CustomResourceDefinitionStatusApplyConfiguration { - for i := range values { - b.StoredVersions = append(b.StoredVersions, values[i]) - } - return b -} - -// WithObservedGeneration sets the ObservedGeneration field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ObservedGeneration field is set to the value of the last call. -func (b *CustomResourceDefinitionStatusApplyConfiguration) WithObservedGeneration(value int64) *CustomResourceDefinitionStatusApplyConfiguration { - b.ObservedGeneration = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go deleted file mode 100644 index f26bfd4a6..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcedefinitionversion.go +++ /dev/null @@ -1,148 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceDefinitionVersionApplyConfiguration represents a declarative configuration of the CustomResourceDefinitionVersion type for use -// with apply. -// -// CustomResourceDefinitionVersion describes a version for CRD. -type CustomResourceDefinitionVersionApplyConfiguration struct { - // name is the version name, e.g. “v1”, “v2beta1”, etc. - // The custom resources are served under this version at `/apis///...` if `served` is true. - Name *string `json:"name,omitempty"` - // served is a flag enabling/disabling this version from being served via REST APIs - Served *bool `json:"served,omitempty"` - // storage indicates this version should be used when persisting custom resources to storage. - // There must be exactly one version with storage=true. - Storage *bool `json:"storage,omitempty"` - // deprecated indicates this version of the custom resource API is deprecated. - // When set to true, API requests to this version receive a warning header in the server response. - // Defaults to false. - Deprecated *bool `json:"deprecated,omitempty"` - // deprecationWarning overrides the default warning returned to API clients. - // May only be set when `deprecated` is true. - // The default warning indicates this version is deprecated and recommends use - // of the newest served version of equal or greater stability, if one exists. - DeprecationWarning *string `json:"deprecationWarning,omitempty"` - // schema describes the schema used for validation and pruning of this version of the custom resource. - // Top-level and per-version schemas are mutually exclusive. - // Per-version schemas must not all be set to identical values (top-level validation schema should be used instead). - Schema *CustomResourceValidationApplyConfiguration `json:"schema,omitempty"` - // subresources specify what subresources this version of the defined custom resource have. - // Top-level and per-version subresources are mutually exclusive. - // Per-version subresources must not all be set to identical values (top-level subresources should be used instead). - Subresources *CustomResourceSubresourcesApplyConfiguration `json:"subresources,omitempty"` - // additionalPrinterColumns specifies additional columns returned in Table output. - // See https://kubernetes.io/docs/reference/using-api/api-concepts/#receiving-resources-as-tables for details. - // Top-level and per-version columns are mutually exclusive. - // Per-version columns must not all be set to identical values (top-level columns should be used instead). - // If no top-level or per-version columns are specified, a single column displaying the age of the custom resource is used. - AdditionalPrinterColumns []CustomResourceColumnDefinitionApplyConfiguration `json:"additionalPrinterColumns,omitempty"` - // selectableFields specifies paths to fields that may be used as field selectors. - // See https://kubernetes.io/docs/concepts/overview/working-with-objects/field-selectors - SelectableFields []SelectableFieldApplyConfiguration `json:"selectableFields,omitempty"` -} - -// CustomResourceDefinitionVersionApplyConfiguration constructs a declarative configuration of the CustomResourceDefinitionVersion type for use with -// apply. -func CustomResourceDefinitionVersion() *CustomResourceDefinitionVersionApplyConfiguration { - return &CustomResourceDefinitionVersionApplyConfiguration{} -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithName(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.Name = &value - return b -} - -// WithServed sets the Served field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Served field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithServed(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Served = &value - return b -} - -// WithStorage sets the Storage field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Storage field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithStorage(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Storage = &value - return b -} - -// WithDeprecated sets the Deprecated field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Deprecated field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecated(value bool) *CustomResourceDefinitionVersionApplyConfiguration { - b.Deprecated = &value - return b -} - -// WithDeprecationWarning sets the DeprecationWarning field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeprecationWarning field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithDeprecationWarning(value string) *CustomResourceDefinitionVersionApplyConfiguration { - b.DeprecationWarning = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSchema(value *CustomResourceValidationApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Schema = value - return b -} - -// WithSubresources sets the Subresources field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Subresources field is set to the value of the last call. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSubresources(value *CustomResourceSubresourcesApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - b.Subresources = value - return b -} - -// WithAdditionalPrinterColumns adds the given value to the AdditionalPrinterColumns field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AdditionalPrinterColumns field. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithAdditionalPrinterColumns(values ...*CustomResourceColumnDefinitionApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAdditionalPrinterColumns") - } - b.AdditionalPrinterColumns = append(b.AdditionalPrinterColumns, *values[i]) - } - return b -} - -// WithSelectableFields adds the given value to the SelectableFields field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the SelectableFields field. -func (b *CustomResourceDefinitionVersionApplyConfiguration) WithSelectableFields(values ...*SelectableFieldApplyConfiguration) *CustomResourceDefinitionVersionApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithSelectableFields") - } - b.SelectableFields = append(b.SelectableFields, *values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go deleted file mode 100644 index 6b92eb1fc..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresources.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -) - -// CustomResourceSubresourcesApplyConfiguration represents a declarative configuration of the CustomResourceSubresources type for use -// with apply. -// -// CustomResourceSubresources defines the status and scale subresources for CustomResources. -type CustomResourceSubresourcesApplyConfiguration struct { - // status indicates the custom resource should serve a `/status` subresource. - // When enabled: - // 1. requests to the custom resource primary endpoint ignore changes to the `status` stanza of the object. - // 2. requests to the custom resource `/status` subresource ignore changes to anything other than the `status` stanza of the object. - Status *apiextensionsv1beta1.CustomResourceSubresourceStatus `json:"status,omitempty"` - // scale indicates the custom resource should serve a `/scale` subresource that returns an `autoscaling/v1` Scale object. - Scale *CustomResourceSubresourceScaleApplyConfiguration `json:"scale,omitempty"` -} - -// CustomResourceSubresourcesApplyConfiguration constructs a declarative configuration of the CustomResourceSubresources type for use with -// apply. -func CustomResourceSubresources() *CustomResourceSubresourcesApplyConfiguration { - return &CustomResourceSubresourcesApplyConfiguration{} -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *CustomResourceSubresourcesApplyConfiguration) WithStatus(value apiextensionsv1beta1.CustomResourceSubresourceStatus) *CustomResourceSubresourcesApplyConfiguration { - b.Status = &value - return b -} - -// WithScale sets the Scale field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Scale field is set to the value of the last call. -func (b *CustomResourceSubresourcesApplyConfiguration) WithScale(value *CustomResourceSubresourceScaleApplyConfiguration) *CustomResourceSubresourcesApplyConfiguration { - b.Scale = value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go deleted file mode 100644 index 4141699c4..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcesubresourcescale.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceSubresourceScaleApplyConfiguration represents a declarative configuration of the CustomResourceSubresourceScale type for use -// with apply. -// -// CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources. -type CustomResourceSubresourceScaleApplyConfiguration struct { - // specReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `spec.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.spec`. - // If there is no value under the given path in the custom resource, the `/scale` subresource will return an error on GET. - SpecReplicasPath *string `json:"specReplicasPath,omitempty"` - // statusReplicasPath defines the JSON path inside of a custom resource that corresponds to Scale `status.replicas`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status`. - // If there is no value under the given path in the custom resource, the `status.replicas` value in the `/scale` subresource - // will default to 0. - StatusReplicasPath *string `json:"statusReplicasPath,omitempty"` - // labelSelectorPath defines the JSON path inside of a custom resource that corresponds to Scale `status.selector`. - // Only JSON paths without the array notation are allowed. - // Must be a JSON Path under `.status` or `.spec`. - // Must be set to work with HorizontalPodAutoscaler. - // The field pointed by this JSON path must be a string field (not a complex selector struct) - // which contains a serialized label selector in string form. - // More info: https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definitions#scale-subresource - // If there is no value under the given path in the custom resource, the `status.selector` value in the `/scale` - // subresource will default to the empty string. - LabelSelectorPath *string `json:"labelSelectorPath,omitempty"` -} - -// CustomResourceSubresourceScaleApplyConfiguration constructs a declarative configuration of the CustomResourceSubresourceScale type for use with -// apply. -func CustomResourceSubresourceScale() *CustomResourceSubresourceScaleApplyConfiguration { - return &CustomResourceSubresourceScaleApplyConfiguration{} -} - -// WithSpecReplicasPath sets the SpecReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SpecReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithSpecReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.SpecReplicasPath = &value - return b -} - -// WithStatusReplicasPath sets the StatusReplicasPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the StatusReplicasPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithStatusReplicasPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.StatusReplicasPath = &value - return b -} - -// WithLabelSelectorPath sets the LabelSelectorPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LabelSelectorPath field is set to the value of the last call. -func (b *CustomResourceSubresourceScaleApplyConfiguration) WithLabelSelectorPath(value string) *CustomResourceSubresourceScaleApplyConfiguration { - b.LabelSelectorPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go deleted file mode 100644 index 64007c709..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/customresourcevalidation.go +++ /dev/null @@ -1,42 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// CustomResourceValidationApplyConfiguration represents a declarative configuration of the CustomResourceValidation type for use -// with apply. -// -// CustomResourceValidation is a list of validation methods for CustomResources. -type CustomResourceValidationApplyConfiguration struct { - // openAPIV3Schema is the OpenAPI v3 schema to use for validation and pruning. - OpenAPIV3Schema *JSONSchemaPropsApplyConfiguration `json:"openAPIV3Schema,omitempty"` -} - -// CustomResourceValidationApplyConfiguration constructs a declarative configuration of the CustomResourceValidation type for use with -// apply. -func CustomResourceValidation() *CustomResourceValidationApplyConfiguration { - return &CustomResourceValidationApplyConfiguration{} -} - -// WithOpenAPIV3Schema sets the OpenAPIV3Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OpenAPIV3Schema field is set to the value of the last call. -func (b *CustomResourceValidationApplyConfiguration) WithOpenAPIV3Schema(value *JSONSchemaPropsApplyConfiguration) *CustomResourceValidationApplyConfiguration { - b.OpenAPIV3Schema = value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go deleted file mode 100644 index 42f7ace15..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/externaldocumentation.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// ExternalDocumentationApplyConfiguration represents a declarative configuration of the ExternalDocumentation type for use -// with apply. -// -// ExternalDocumentation allows referencing an external resource for extended documentation. -type ExternalDocumentationApplyConfiguration struct { - Description *string `json:"description,omitempty"` - URL *string `json:"url,omitempty"` -} - -// ExternalDocumentationApplyConfiguration constructs a declarative configuration of the ExternalDocumentation type for use with -// apply. -func ExternalDocumentation() *ExternalDocumentationApplyConfiguration { - return &ExternalDocumentationApplyConfiguration{} -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithDescription(value string) *ExternalDocumentationApplyConfiguration { - b.Description = &value - return b -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *ExternalDocumentationApplyConfiguration) WithURL(value string) *ExternalDocumentationApplyConfiguration { - b.URL = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go deleted file mode 100644 index 4997d47e6..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/jsonschemaprops.go +++ /dev/null @@ -1,554 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -) - -// JSONSchemaPropsApplyConfiguration represents a declarative configuration of the JSONSchemaProps type for use -// with apply. -// -// JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/). -type JSONSchemaPropsApplyConfiguration struct { - ID *string `json:"id,omitempty"` - Schema *apiextensionsv1beta1.JSONSchemaURL `json:"$schema,omitempty"` - Ref *string `json:"$ref,omitempty"` - Description *string `json:"description,omitempty"` - Type *string `json:"type,omitempty"` - // format is an OpenAPI v3 format string. Unknown formats are ignored. The following formats are validated: - // - // - bsonobjectid: a bson object ID, i.e. a 24 characters hex string - // - uri: an URI as parsed by Golang net/url.ParseRequestURI - // - email: an email address as parsed by Golang net/mail.ParseAddress - // - hostname: a valid representation for an Internet host name, as defined by RFC 1034, section 3.1 [RFC1034]. - // - ipv4: an IPv4 IP as parsed by Golang net.ParseIP - // - ipv6: an IPv6 IP as parsed by Golang net.ParseIP - // - cidr: a CIDR as parsed by Golang net.ParseCIDR - // - mac: a MAC address as parsed by Golang net.ParseMAC - // - uuid: an UUID that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid3: an UUID3 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?3[0-9a-f]{3}-?[0-9a-f]{4}-?[0-9a-f]{12}$ - // - uuid4: an UUID4 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?4[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - uuid5: an UUID5 that allows uppercase defined by the regex (?i)^[0-9a-f]{8}-?[0-9a-f]{4}-?5[0-9a-f]{3}-?[89ab][0-9a-f]{3}-?[0-9a-f]{12}$ - // - isbn: an ISBN10 or ISBN13 number string like "0321751043" or "978-0321751041" - // - isbn10: an ISBN10 number string like "0321751043" - // - isbn13: an ISBN13 number string like "978-0321751041" - // - creditcard: a credit card number defined by the regex ^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\\d{3})\\d{11})$ with any non digit characters mixed in - // - ssn: a U.S. social security number following the regex ^\\d{3}[- ]?\\d{2}[- ]?\\d{4}$ - // - hexcolor: an hexadecimal color code like "#FFFFFF: following the regex ^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$ - // - rgbcolor: an RGB color code like rgb like "rgb(255,255,2559" - // - byte: base64 encoded binary data - // - password: any kind of string - // - date: a date string like "2006-01-02" as defined by full-date in RFC3339 - // - duration: a duration string like "22 ns" as parsed by Golang time.ParseDuration or compatible with Scala duration format - // - datetime: a date time string like "2014-12-15T19:30:20.000Z" as defined by date-time in RFC3339. - Format *string `json:"format,omitempty"` - Title *string `json:"title,omitempty"` - // default is a default value for undefined object fields. - // Defaulting is a beta feature under the CustomResourceDefaulting feature gate. - // CustomResourceDefinitions with defaults must be created using the v1 (or newer) CustomResourceDefinition API. - Default *apiextensionsv1beta1.JSON `json:"default,omitempty"` - Maximum *float64 `json:"maximum,omitempty"` - ExclusiveMaximum *bool `json:"exclusiveMaximum,omitempty"` - Minimum *float64 `json:"minimum,omitempty"` - ExclusiveMinimum *bool `json:"exclusiveMinimum,omitempty"` - MaxLength *int64 `json:"maxLength,omitempty"` - MinLength *int64 `json:"minLength,omitempty"` - Pattern *string `json:"pattern,omitempty"` - MaxItems *int64 `json:"maxItems,omitempty"` - MinItems *int64 `json:"minItems,omitempty"` - UniqueItems *bool `json:"uniqueItems,omitempty"` - MultipleOf *float64 `json:"multipleOf,omitempty"` - Enum []apiextensionsv1beta1.JSON `json:"enum,omitempty"` - MaxProperties *int64 `json:"maxProperties,omitempty"` - MinProperties *int64 `json:"minProperties,omitempty"` - Required []string `json:"required,omitempty"` - Items *apiextensionsv1beta1.JSONSchemaPropsOrArray `json:"items,omitempty"` - AllOf []JSONSchemaPropsApplyConfiguration `json:"allOf,omitempty"` - OneOf []JSONSchemaPropsApplyConfiguration `json:"oneOf,omitempty"` - AnyOf []JSONSchemaPropsApplyConfiguration `json:"anyOf,omitempty"` - Not *JSONSchemaPropsApplyConfiguration `json:"not,omitempty"` - Properties map[string]JSONSchemaPropsApplyConfiguration `json:"properties,omitempty"` - AdditionalProperties *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalProperties,omitempty"` - PatternProperties map[string]JSONSchemaPropsApplyConfiguration `json:"patternProperties,omitempty"` - Dependencies *apiextensionsv1beta1.JSONSchemaDependencies `json:"dependencies,omitempty"` - AdditionalItems *apiextensionsv1beta1.JSONSchemaPropsOrBool `json:"additionalItems,omitempty"` - Definitions *apiextensionsv1beta1.JSONSchemaDefinitions `json:"definitions,omitempty"` - ExternalDocs *ExternalDocumentationApplyConfiguration `json:"externalDocs,omitempty"` - Example *apiextensionsv1beta1.JSON `json:"example,omitempty"` - Nullable *bool `json:"nullable,omitempty"` - // x-kubernetes-preserve-unknown-fields stops the API server - // decoding step from pruning fields which are not specified - // in the validation schema. This affects fields recursively, - // but switches back to normal pruning behaviour if nested - // properties or additionalProperties are specified in the schema. - // This can either be true or undefined. False is forbidden. - XPreserveUnknownFields *bool `json:"x-kubernetes-preserve-unknown-fields,omitempty"` - // x-kubernetes-embedded-resource defines that the value is an - // embedded Kubernetes runtime.Object, with TypeMeta and - // ObjectMeta. The type must be object. It is allowed to further - // restrict the embedded object. kind, apiVersion and metadata - // are validated automatically. x-kubernetes-preserve-unknown-fields - // is allowed to be true, but does not have to be if the object - // is fully specified (up to kind, apiVersion, metadata). - XEmbeddedResource *bool `json:"x-kubernetes-embedded-resource,omitempty"` - // x-kubernetes-int-or-string specifies that this value is - // either an integer or a string. If this is true, an empty - // type is allowed and type as child of anyOf is permitted - // if following one of the following patterns: - // - // 1) anyOf: - // - type: integer - // - type: string - // 2) allOf: - // - anyOf: - // - type: integer - // - type: string - // - ... zero or more - XIntOrString *bool `json:"x-kubernetes-int-or-string,omitempty"` - // x-kubernetes-list-map-keys annotates an array with the x-kubernetes-list-type `map` by specifying the keys used - // as the index of the map. - // - // This tag MUST only be used on lists that have the "x-kubernetes-list-type" - // extension set to "map". Also, the values specified for this attribute must - // be a scalar typed field of the child structure (no nesting is supported). - // - // The properties specified must either be required or have a default value, - // to ensure those properties are present for all list items. - XListMapKeys []string `json:"x-kubernetes-list-map-keys,omitempty"` - // x-kubernetes-list-type annotates an array to further describe its topology. - // This extension must only be used on lists and may have 3 possible values: - // - // 1) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic lists will be entirely replaced when updated. This extension - // may be used on any type of list (struct, scalar, ...). - // 2) `set`: - // Sets are lists that must not have multiple items with the same value. Each - // value must be a scalar, an object with x-kubernetes-map-type `atomic` or an - // array with x-kubernetes-list-type `atomic`. - // 3) `map`: - // These lists are like maps in that their elements have a non-index key - // used to identify them. Order is preserved upon merge. The map tag - // must only be used on a list with elements of type object. - // Defaults to atomic for arrays. - XListType *string `json:"x-kubernetes-list-type,omitempty"` - // x-kubernetes-map-type annotates an object to further describe its topology. - // This extension must only be used when type is object and may have 2 possible values: - // - // 1) `granular`: - // These maps are actual maps (key-value pairs) and each fields are independent - // from each other (they can each be manipulated by separate actors). This is - // the default behaviour for all maps. - // 2) `atomic`: the list is treated as a single entity, like a scalar. - // Atomic maps will be entirely replaced when updated. - XMapType *string `json:"x-kubernetes-map-type,omitempty"` - // x-kubernetes-validations describes a list of validation rules written in the CEL expression language. - XValidations *apiextensionsv1beta1.ValidationRules `json:"x-kubernetes-validations,omitempty"` -} - -// JSONSchemaPropsApplyConfiguration constructs a declarative configuration of the JSONSchemaProps type for use with -// apply. -func JSONSchemaProps() *JSONSchemaPropsApplyConfiguration { - return &JSONSchemaPropsApplyConfiguration{} -} - -// WithID sets the ID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ID field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithID(value string) *JSONSchemaPropsApplyConfiguration { - b.ID = &value - return b -} - -// WithSchema sets the Schema field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Schema field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithSchema(value apiextensionsv1beta1.JSONSchemaURL) *JSONSchemaPropsApplyConfiguration { - b.Schema = &value - return b -} - -// WithRef sets the Ref field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Ref field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithRef(value string) *JSONSchemaPropsApplyConfiguration { - b.Ref = &value - return b -} - -// WithDescription sets the Description field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Description field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDescription(value string) *JSONSchemaPropsApplyConfiguration { - b.Description = &value - return b -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithType(value string) *JSONSchemaPropsApplyConfiguration { - b.Type = &value - return b -} - -// WithFormat sets the Format field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Format field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithFormat(value string) *JSONSchemaPropsApplyConfiguration { - b.Format = &value - return b -} - -// WithTitle sets the Title field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Title field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithTitle(value string) *JSONSchemaPropsApplyConfiguration { - b.Title = &value - return b -} - -// WithDefault sets the Default field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Default field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefault(value apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Default = &value - return b -} - -// WithMaximum sets the Maximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Maximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaximum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Maximum = &value - return b -} - -// WithExclusiveMaximum sets the ExclusiveMaximum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMaximum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMaximum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMaximum = &value - return b -} - -// WithMinimum sets the Minimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Minimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinimum(value float64) *JSONSchemaPropsApplyConfiguration { - b.Minimum = &value - return b -} - -// WithExclusiveMinimum sets the ExclusiveMinimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExclusiveMinimum field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExclusiveMinimum(value bool) *JSONSchemaPropsApplyConfiguration { - b.ExclusiveMinimum = &value - return b -} - -// WithMaxLength sets the MaxLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxLength = &value - return b -} - -// WithMinLength sets the MinLength field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinLength field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinLength(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinLength = &value - return b -} - -// WithPattern sets the Pattern field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Pattern field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithPattern(value string) *JSONSchemaPropsApplyConfiguration { - b.Pattern = &value - return b -} - -// WithMaxItems sets the MaxItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxItems = &value - return b -} - -// WithMinItems sets the MinItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinItems(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinItems = &value - return b -} - -// WithUniqueItems sets the UniqueItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UniqueItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithUniqueItems(value bool) *JSONSchemaPropsApplyConfiguration { - b.UniqueItems = &value - return b -} - -// WithMultipleOf sets the MultipleOf field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MultipleOf field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMultipleOf(value float64) *JSONSchemaPropsApplyConfiguration { - b.MultipleOf = &value - return b -} - -// WithEnum adds the given value to the Enum field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Enum field. -func (b *JSONSchemaPropsApplyConfiguration) WithEnum(values ...apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Enum = append(b.Enum, values[i]) - } - return b -} - -// WithMaxProperties sets the MaxProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MaxProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMaxProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MaxProperties = &value - return b -} - -// WithMinProperties sets the MinProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MinProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithMinProperties(value int64) *JSONSchemaPropsApplyConfiguration { - b.MinProperties = &value - return b -} - -// WithRequired adds the given value to the Required field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Required field. -func (b *JSONSchemaPropsApplyConfiguration) WithRequired(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.Required = append(b.Required, values[i]) - } - return b -} - -// WithItems sets the Items field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Items field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithItems(value apiextensionsv1beta1.JSONSchemaPropsOrArray) *JSONSchemaPropsApplyConfiguration { - b.Items = &value - return b -} - -// WithAllOf adds the given value to the AllOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AllOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAllOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAllOf") - } - b.AllOf = append(b.AllOf, *values[i]) - } - return b -} - -// WithOneOf adds the given value to the OneOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OneOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithOneOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOneOf") - } - b.OneOf = append(b.OneOf, *values[i]) - } - return b -} - -// WithAnyOf adds the given value to the AnyOf field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the AnyOf field. -func (b *JSONSchemaPropsApplyConfiguration) WithAnyOf(values ...*JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithAnyOf") - } - b.AnyOf = append(b.AnyOf, *values[i]) - } - return b -} - -// WithNot sets the Not field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Not field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNot(value *JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.Not = value - return b -} - -// WithProperties puts the entries into the Properties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Properties field, -// overwriting an existing map entries in Properties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.Properties == nil && len(entries) > 0 { - b.Properties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.Properties[k] = v - } - return b -} - -// WithAdditionalProperties sets the AdditionalProperties field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalProperties field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalProperties(value apiextensionsv1beta1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalProperties = &value - return b -} - -// WithPatternProperties puts the entries into the PatternProperties field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the PatternProperties field, -// overwriting an existing map entries in PatternProperties field with the same key. -func (b *JSONSchemaPropsApplyConfiguration) WithPatternProperties(entries map[string]JSONSchemaPropsApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - if b.PatternProperties == nil && len(entries) > 0 { - b.PatternProperties = make(map[string]JSONSchemaPropsApplyConfiguration, len(entries)) - } - for k, v := range entries { - b.PatternProperties[k] = v - } - return b -} - -// WithDependencies sets the Dependencies field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Dependencies field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDependencies(value apiextensionsv1beta1.JSONSchemaDependencies) *JSONSchemaPropsApplyConfiguration { - b.Dependencies = &value - return b -} - -// WithAdditionalItems sets the AdditionalItems field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the AdditionalItems field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithAdditionalItems(value apiextensionsv1beta1.JSONSchemaPropsOrBool) *JSONSchemaPropsApplyConfiguration { - b.AdditionalItems = &value - return b -} - -// WithDefinitions sets the Definitions field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Definitions field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithDefinitions(value apiextensionsv1beta1.JSONSchemaDefinitions) *JSONSchemaPropsApplyConfiguration { - b.Definitions = &value - return b -} - -// WithExternalDocs sets the ExternalDocs field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ExternalDocs field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExternalDocs(value *ExternalDocumentationApplyConfiguration) *JSONSchemaPropsApplyConfiguration { - b.ExternalDocs = value - return b -} - -// WithExample sets the Example field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Example field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithExample(value apiextensionsv1beta1.JSON) *JSONSchemaPropsApplyConfiguration { - b.Example = &value - return b -} - -// WithNullable sets the Nullable field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Nullable field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithNullable(value bool) *JSONSchemaPropsApplyConfiguration { - b.Nullable = &value - return b -} - -// WithXPreserveUnknownFields sets the XPreserveUnknownFields field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XPreserveUnknownFields field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXPreserveUnknownFields(value bool) *JSONSchemaPropsApplyConfiguration { - b.XPreserveUnknownFields = &value - return b -} - -// WithXEmbeddedResource sets the XEmbeddedResource field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XEmbeddedResource field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXEmbeddedResource(value bool) *JSONSchemaPropsApplyConfiguration { - b.XEmbeddedResource = &value - return b -} - -// WithXIntOrString sets the XIntOrString field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XIntOrString field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXIntOrString(value bool) *JSONSchemaPropsApplyConfiguration { - b.XIntOrString = &value - return b -} - -// WithXListMapKeys adds the given value to the XListMapKeys field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the XListMapKeys field. -func (b *JSONSchemaPropsApplyConfiguration) WithXListMapKeys(values ...string) *JSONSchemaPropsApplyConfiguration { - for i := range values { - b.XListMapKeys = append(b.XListMapKeys, values[i]) - } - return b -} - -// WithXListType sets the XListType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XListType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXListType(value string) *JSONSchemaPropsApplyConfiguration { - b.XListType = &value - return b -} - -// WithXMapType sets the XMapType field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XMapType field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXMapType(value string) *JSONSchemaPropsApplyConfiguration { - b.XMapType = &value - return b -} - -// WithXValidations sets the XValidations field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the XValidations field is set to the value of the last call. -func (b *JSONSchemaPropsApplyConfiguration) WithXValidations(value apiextensionsv1beta1.ValidationRules) *JSONSchemaPropsApplyConfiguration { - b.XValidations = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go deleted file mode 100644 index a216cd886..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/selectablefield.go +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// SelectableFieldApplyConfiguration represents a declarative configuration of the SelectableField type for use -// with apply. -// -// SelectableField specifies the JSON path of a field that may be used with field selectors. -type SelectableFieldApplyConfiguration struct { - // jsonPath is a simple JSON path which is evaluated against each custom resource to produce a - // field selector value. - // Only JSON paths without the array notation are allowed. - // Must point to a field of type string, boolean or integer. Types with enum values - // and strings with formats are allowed. - // If jsonPath refers to absent field in a resource, the jsonPath evaluates to an empty string. - // Must not point to metdata fields. - // Required. - JSONPath *string `json:"jsonPath,omitempty"` -} - -// SelectableFieldApplyConfiguration constructs a declarative configuration of the SelectableField type for use with -// apply. -func SelectableField() *SelectableFieldApplyConfiguration { - return &SelectableFieldApplyConfiguration{} -} - -// WithJSONPath sets the JSONPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the JSONPath field is set to the value of the last call. -func (b *SelectableFieldApplyConfiguration) WithJSONPath(value string) *SelectableFieldApplyConfiguration { - b.JSONPath = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go deleted file mode 100644 index 2d2ef35f6..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/servicereference.go +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use -// with apply. -// -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReferenceApplyConfiguration struct { - // namespace is the namespace of the service. - // Required - Namespace *string `json:"namespace,omitempty"` - // name is the name of the service. - // Required - Name *string `json:"name,omitempty"` - // path is an optional URL path at which the webhook will be contacted. - Path *string `json:"path,omitempty"` - // port is an optional service port at which the webhook will be contacted. - // `port` should be a valid port number (1-65535, inclusive). - // Defaults to 443 for backward compatibility. - Port *int32 `json:"port,omitempty"` -} - -// ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with -// apply. -func ServiceReference() *ServiceReferenceApplyConfiguration { - return &ServiceReferenceApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPath sets the Path field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Path field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPath(value string) *ServiceReferenceApplyConfiguration { - b.Path = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { - b.Port = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go deleted file mode 100644 index 4e1c108fa..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/validationrule.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -import ( - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" -) - -// ValidationRuleApplyConfiguration represents a declarative configuration of the ValidationRule type for use -// with apply. -// -// ValidationRule describes a validation rule written in the CEL expression language. -type ValidationRuleApplyConfiguration struct { - // Rule represents the expression which will be evaluated by CEL. - // ref: https://github.com/google/cel-spec - // The Rule is scoped to the location of the x-kubernetes-validations extension in the schema. - // The `self` variable in the CEL expression is bound to the scoped value. - // Example: - // - Rule scoped to the root of a resource with a status subresource: {"rule": "self.status.actual <= self.spec.maxDesired"} - // - // If the Rule is scoped to an object with properties, the accessible properties of the object are field selectable - // via `self.field` and field presence can be checked via `has(self.field)`. Null valued fields are treated as - // absent fields in CEL expressions. - // If the Rule is scoped to an object with additionalProperties (i.e. a map) the value of the map - // are accessible via `self[mapKey]`, map containment can be checked via `mapKey in self` and all entries of the map - // are accessible via CEL macros and functions such as `self.all(...)`. - // If the Rule is scoped to an array, the elements of the array are accessible via `self[i]` and also by macros and - // functions. - // If the Rule is scoped to a scalar, `self` is bound to the scalar value. - // Examples: - // - Rule scoped to a map of objects: {"rule": "self.components['Widget'].priority < 10"} - // - Rule scoped to a list of integers: {"rule": "self.values.all(value, value >= 0 && value < 100)"} - // - Rule scoped to a string value: {"rule": "self.startsWith('kube')"} - // - // The `apiVersion`, `kind`, `metadata.name` and `metadata.generateName` are always accessible from the root of the - // object and from any x-kubernetes-embedded-resource annotated objects. No other metadata properties are accessible. - // - // Unknown data preserved in custom resources via x-kubernetes-preserve-unknown-fields is not accessible in CEL - // expressions. This includes: - // - Unknown field values that are preserved by object schemas with x-kubernetes-preserve-unknown-fields. - // - Object properties where the property schema is of an "unknown type". An "unknown type" is recursively defined as: - // - A schema with no type and x-kubernetes-preserve-unknown-fields set to true - // - An array where the items schema is of an "unknown type" - // - An object where the additionalProperties schema is of an "unknown type" - // - // Only property names of the form `[a-zA-Z_.-/][a-zA-Z0-9_.-/]*` are accessible. - // Accessible property names are escaped according to the following rules when accessed in the expression: - // - '__' escapes to '__underscores__' - // - '.' escapes to '__dot__' - // - '-' escapes to '__dash__' - // - '/' escapes to '__slash__' - // - Property names that exactly match a CEL RESERVED keyword escape to '__{keyword}__'. The keywords are: - // "true", "false", "null", "in", "as", "break", "const", "continue", "else", "for", "function", "if", - // "import", "let", "loop", "package", "namespace", "return". - // Examples: - // - Rule accessing a property named "namespace": {"rule": "self.__namespace__ > 0"} - // - Rule accessing a property named "x-prop": {"rule": "self.x__dash__prop > 0"} - // - Rule accessing a property named "redact__d": {"rule": "self.redact__underscores__d > 0"} - // - // Equality on arrays with x-kubernetes-list-type of 'set' or 'map' ignores element order, i.e. [1, 2] == [2, 1]. - // Concatenation on arrays with x-kubernetes-list-type use the semantics of the list type: - // - 'set': `X + Y` performs a union where the array positions of all elements in `X` are preserved and - // non-intersecting elements in `Y` are appended, retaining their partial order. - // - 'map': `X + Y` performs a merge where the array positions of all keys in `X` are preserved but the values - // are overwritten by values in `Y` when the key sets of `X` and `Y` intersect. Elements in `Y` with - // non-intersecting keys are appended, retaining their partial order. - // - // If `rule` makes use of the `oldSelf` variable it is implicitly a - // `transition rule`. - // - // By default, the `oldSelf` variable is the same type as `self`. - // When `optionalOldSelf` is true, the `oldSelf` variable is a CEL optional - // variable whose value() is the same type as `self`. - // See the documentation for the `optionalOldSelf` field for details. - // - // Transition rules by default are applied only on UPDATE requests and are - // skipped if an old value could not be found. You can opt a transition - // rule into unconditional evaluation by setting `optionalOldSelf` to true. - Rule *string `json:"rule,omitempty"` - // Message represents the message displayed when validation fails. The message is required if the Rule contains - // line breaks. The message must not contain line breaks. - // If unset, the message is "failed rule: {Rule}". - // e.g. "must be a URL with the host matching spec.host" - Message *string `json:"message,omitempty"` - // MessageExpression declares a CEL expression that evaluates to the validation failure message that is returned when this rule fails. - // Since messageExpression is used as a failure message, it must evaluate to a string. - // If both message and messageExpression are present on a rule, then messageExpression will be used if validation - // fails. If messageExpression results in a runtime error, the runtime error is logged, and the validation failure message is produced - // as if the messageExpression field were unset. If messageExpression evaluates to an empty string, a string with only spaces, or a string - // that contains line breaks, then the validation failure message will also be produced as if the messageExpression field were unset, and - // the fact that messageExpression produced an empty string/string with only spaces/string with line breaks will be logged. - // messageExpression has access to all the same variables as the rule; the only difference is the return type. - // Example: - // "x must be less than max ("+string(self.max)+")" - MessageExpression *string `json:"messageExpression,omitempty"` - // reason provides a machine-readable validation failure reason that is returned to the caller when a request fails this validation rule. - // The HTTP status code returned to the caller will match the reason of the reason of the first failed validation rule. - // The currently supported reasons are: "FieldValueInvalid", "FieldValueForbidden", "FieldValueRequired", "FieldValueDuplicate". - // If not set, default to use "FieldValueInvalid". - // All future added reasons must be accepted by clients when reading this value and unknown reasons should be treated as FieldValueInvalid. - Reason *apiextensionsv1beta1.FieldValueErrorReason `json:"reason,omitempty"` - // fieldPath represents the field path returned when the validation fails. - // It must be a relative JSON path (i.e. with array notation) scoped to the location of this x-kubernetes-validations extension in the schema and refer to an existing field. - // e.g. when validation checks if a specific attribute `foo` under a map `testMap`, the fieldPath could be set to `.testMap.foo` - // If the validation checks two lists must have unique attributes, the fieldPath could be set to either of the list: e.g. `.testList` - // It does not support list numeric index. - // It supports child operation to refer to an existing field currently. Refer to [JSONPath support in Kubernetes](https://kubernetes.io/docs/reference/kubectl/jsonpath/) for more info. - // Numeric index of array is not supported. - // For field name which contains special characters, use `['specialName']` to refer the field name. - // e.g. for attribute `foo.34$` appears in a list `testList`, the fieldPath could be set to `.testList['foo.34$']` - FieldPath *string `json:"fieldPath,omitempty"` - // optionalOldSelf is used to opt a transition rule into evaluation - // even when the object is first created, or if the old object is - // missing the value. - // - // When enabled `oldSelf` will be a CEL optional whose value will be - // `None` if there is no old value, or when the object is initially created. - // - // You may check for presence of oldSelf using `oldSelf.hasValue()` and - // unwrap it after checking using `oldSelf.value()`. Check the CEL - // documentation for Optional types for more information: - // https://pkg.go.dev/github.com/google/cel-go/cel#OptionalTypes - // - // May not be set unless `oldSelf` is used in `rule`. - OptionalOldSelf *bool `json:"optionalOldSelf,omitempty"` -} - -// ValidationRuleApplyConfiguration constructs a declarative configuration of the ValidationRule type for use with -// apply. -func ValidationRule() *ValidationRuleApplyConfiguration { - return &ValidationRuleApplyConfiguration{} -} - -// WithRule sets the Rule field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Rule field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithRule(value string) *ValidationRuleApplyConfiguration { - b.Rule = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithMessage(value string) *ValidationRuleApplyConfiguration { - b.Message = &value - return b -} - -// WithMessageExpression sets the MessageExpression field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the MessageExpression field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithMessageExpression(value string) *ValidationRuleApplyConfiguration { - b.MessageExpression = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithReason(value apiextensionsv1beta1.FieldValueErrorReason) *ValidationRuleApplyConfiguration { - b.Reason = &value - return b -} - -// WithFieldPath sets the FieldPath field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the FieldPath field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithFieldPath(value string) *ValidationRuleApplyConfiguration { - b.FieldPath = &value - return b -} - -// WithOptionalOldSelf sets the OptionalOldSelf field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the OptionalOldSelf field is set to the value of the last call. -func (b *ValidationRuleApplyConfiguration) WithOptionalOldSelf(value bool) *ValidationRuleApplyConfiguration { - b.OptionalOldSelf = &value - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go deleted file mode 100644 index 67b7fcb09..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1/webhookclientconfig.go +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1beta1 - -// WebhookClientConfigApplyConfiguration represents a declarative configuration of the WebhookClientConfig type for use -// with apply. -// -// WebhookClientConfig contains the information to make a TLS connection with the webhook. -type WebhookClientConfigApplyConfiguration struct { - // url gives the location of the webhook, in standard URL form - // (`scheme://host:port/path`). Exactly one of `url` or `service` - // must be specified. - // - // The `host` should not refer to a service running in the cluster; use - // the `service` field instead. The host might be resolved via external - // DNS in some apiservers (e.g., `kube-apiserver` cannot resolve - // in-cluster DNS as that would be a layering violation). `host` may - // also be an IP address. - // - // Please note that using `localhost` or `127.0.0.1` as a `host` is - // risky unless you take great care to run this webhook on all hosts - // which run an apiserver which might need to make calls to this - // webhook. Such installs are likely to be non-portable, i.e., not easy - // to turn up in a new cluster. - // - // The scheme must be "https"; the URL must begin with "https://". - // - // A path is optional, and if present may be any string permissible in - // a URL. You may use the path to pass an arbitrary string to the - // webhook, for example, a cluster identifier. - // - // Attempting to use a user or basic auth e.g. "user:password@" is not - // allowed. Fragments ("#...") and query parameters ("?...") are not - // allowed, either. - URL *string `json:"url,omitempty"` - // service is a reference to the service for this webhook. Either - // service or url must be specified. - // - // If the webhook is running within the cluster, then you should use `service`. - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - // caBundle is a PEM encoded CA bundle which will be used to validate the webhook's server certificate. - // If unspecified, system trust roots on the apiserver are used. - CABundle []byte `json:"caBundle,omitempty"` -} - -// WebhookClientConfigApplyConfiguration constructs a declarative configuration of the WebhookClientConfig type for use with -// apply. -func WebhookClientConfig() *WebhookClientConfigApplyConfiguration { - return &WebhookClientConfigApplyConfiguration{} -} - -// WithURL sets the URL field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the URL field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithURL(value string) *WebhookClientConfigApplyConfiguration { - b.URL = &value - return b -} - -// WithService sets the Service field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Service field is set to the value of the last call. -func (b *WebhookClientConfigApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *WebhookClientConfigApplyConfiguration { - b.Service = value - return b -} - -// WithCABundle adds the given value to the CABundle field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CABundle field. -func (b *WebhookClientConfigApplyConfiguration) WithCABundle(values ...byte) *WebhookClientConfigApplyConfiguration { - for i := range values { - b.CABundle = append(b.CABundle, values[i]) - } - return b -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go deleted file mode 100644 index 93dd79d63..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/clientset.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package clientset - -import ( - fmt "fmt" - http "net/http" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1" - 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 - ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface - ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - apiextensionsV1 *apiextensionsv1.ApiextensionsV1Client - apiextensionsV1beta1 *apiextensionsv1beta1.ApiextensionsV1beta1Client -} - -// ApiextensionsV1 retrieves the ApiextensionsV1Client -func (c *Clientset) ApiextensionsV1() apiextensionsv1.ApiextensionsV1Interface { - return c.apiextensionsV1 -} - -// ApiextensionsV1beta1 retrieves the ApiextensionsV1beta1Client -func (c *Clientset) ApiextensionsV1beta1() apiextensionsv1beta1.ApiextensionsV1beta1Interface { - return c.apiextensionsV1beta1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.apiextensionsV1, err = apiextensionsv1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.apiextensionsV1beta1, err = apiextensionsv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.apiextensionsV1 = apiextensionsv1.New(c) - cs.apiextensionsV1beta1 = apiextensionsv1beta1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go deleted file mode 100644 index 7dc375616..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go deleted file mode 100644 index b5c4fdc78..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiextensionsv1.AddToScheme, - apiextensionsv1beta1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go deleted file mode 100644 index 866f11fb9..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/apiextensions_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - http "net/http" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" - rest "k8s.io/client-go/rest" -) - -type ApiextensionsV1Interface interface { - RESTClient() rest.Interface - CustomResourceDefinitionsGetter -} - -// ApiextensionsV1Client is used to interact with features provided by the apiextensions.k8s.io group. -type ApiextensionsV1Client struct { - restClient rest.Interface -} - -func (c *ApiextensionsV1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { - return newCustomResourceDefinitions(c) -} - -// NewForConfig creates a new ApiextensionsV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ApiextensionsV1Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ApiextensionsV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiextensionsV1Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ApiextensionsV1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiextensionsV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiextensionsV1Client for the given RESTClient. -func New(c rest.Interface) *ApiextensionsV1Client { - return &ApiextensionsV1Client{c} -} - -func setConfigDefaults(config *rest.Config) { - gv := apiextensionsv1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiextensionsV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go deleted file mode 100644 index 1197071d0..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/customresourcedefinition.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - applyconfigurationapiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. -// A group's client should implement this interface. -type CustomResourceDefinitionsGetter interface { - CustomResourceDefinitions() CustomResourceDefinitionInterface -} - -// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. -type CustomResourceDefinitionInterface interface { - Create(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts metav1.CreateOptions) (*apiextensionsv1.CustomResourceDefinition, error) - Update(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts metav1.UpdateOptions) (*apiextensionsv1.CustomResourceDefinition, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1.CustomResourceDefinition, opts metav1.UpdateOptions) (*apiextensionsv1.CustomResourceDefinition, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiextensionsv1.CustomResourceDefinition, error) - List(ctx context.Context, opts metav1.ListOptions) (*apiextensionsv1.CustomResourceDefinitionList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *apiextensionsv1.CustomResourceDefinition, err error) - Apply(ctx context.Context, customResourceDefinition *applyconfigurationapiextensionsv1.CustomResourceDefinitionApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, customResourceDefinition *applyconfigurationapiextensionsv1.CustomResourceDefinitionApplyConfiguration, opts metav1.ApplyOptions) (result *apiextensionsv1.CustomResourceDefinition, err error) - CustomResourceDefinitionExpansion -} - -// customResourceDefinitions implements CustomResourceDefinitionInterface -type customResourceDefinitions struct { - *gentype.ClientWithListAndApply[*apiextensionsv1.CustomResourceDefinition, *apiextensionsv1.CustomResourceDefinitionList, *applyconfigurationapiextensionsv1.CustomResourceDefinitionApplyConfiguration] -} - -// newCustomResourceDefinitions returns a CustomResourceDefinitions -func newCustomResourceDefinitions(c *ApiextensionsV1Client) *customResourceDefinitions { - return &customResourceDefinitions{ - gentype.NewClientWithListAndApply[*apiextensionsv1.CustomResourceDefinition, *apiextensionsv1.CustomResourceDefinitionList, *applyconfigurationapiextensionsv1.CustomResourceDefinitionApplyConfiguration]( - "customresourcedefinitions", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *apiextensionsv1.CustomResourceDefinition { return &apiextensionsv1.CustomResourceDefinition{} }, - func() *apiextensionsv1.CustomResourceDefinitionList { - return &apiextensionsv1.CustomResourceDefinitionList{} - }, - gentype.PrefersProtobuf[*apiextensionsv1.CustomResourceDefinition](), - ), - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/doc.go deleted file mode 100644 index 3af5d054f..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/generated_expansion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/generated_expansion.go deleted file mode 100644 index e594636af..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type CustomResourceDefinitionExpansion interface{} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go deleted file mode 100644 index 6687e7745..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/apiextensions_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - http "net/http" - - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" - rest "k8s.io/client-go/rest" -) - -type ApiextensionsV1beta1Interface interface { - RESTClient() rest.Interface - CustomResourceDefinitionsGetter -} - -// ApiextensionsV1beta1Client is used to interact with features provided by the apiextensions.k8s.io group. -type ApiextensionsV1beta1Client struct { - restClient rest.Interface -} - -func (c *ApiextensionsV1beta1Client) CustomResourceDefinitions() CustomResourceDefinitionInterface { - return newCustomResourceDefinitions(c) -} - -// NewForConfig creates a new ApiextensionsV1beta1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ApiextensionsV1beta1Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ApiextensionsV1beta1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiextensionsV1beta1Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ApiextensionsV1beta1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiextensionsV1beta1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiextensionsV1beta1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiextensionsV1beta1Client for the given RESTClient. -func New(c rest.Interface) *ApiextensionsV1beta1Client { - return &ApiextensionsV1beta1Client{c} -} - -func setConfigDefaults(config *rest.Config) { - gv := apiextensionsv1beta1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiextensionsV1beta1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go deleted file mode 100644 index e7ea4e971..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/customresourcedefinition.go +++ /dev/null @@ -1,79 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -import ( - context "context" - - apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" - applyconfigurationapiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1" - scheme "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" -) - -// CustomResourceDefinitionsGetter has a method to return a CustomResourceDefinitionInterface. -// A group's client should implement this interface. -type CustomResourceDefinitionsGetter interface { - CustomResourceDefinitions() CustomResourceDefinitionInterface -} - -// CustomResourceDefinitionInterface has methods to work with CustomResourceDefinition resources. -type CustomResourceDefinitionInterface interface { - Create(ctx context.Context, customResourceDefinition *apiextensionsv1beta1.CustomResourceDefinition, opts v1.CreateOptions) (*apiextensionsv1beta1.CustomResourceDefinition, error) - Update(ctx context.Context, customResourceDefinition *apiextensionsv1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*apiextensionsv1beta1.CustomResourceDefinition, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, customResourceDefinition *apiextensionsv1beta1.CustomResourceDefinition, opts v1.UpdateOptions) (*apiextensionsv1beta1.CustomResourceDefinition, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*apiextensionsv1beta1.CustomResourceDefinition, error) - List(ctx context.Context, opts v1.ListOptions) (*apiextensionsv1beta1.CustomResourceDefinitionList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *apiextensionsv1beta1.CustomResourceDefinition, err error) - Apply(ctx context.Context, customResourceDefinition *applyconfigurationapiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration, opts v1.ApplyOptions) (result *apiextensionsv1beta1.CustomResourceDefinition, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, customResourceDefinition *applyconfigurationapiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration, opts v1.ApplyOptions) (result *apiextensionsv1beta1.CustomResourceDefinition, err error) - CustomResourceDefinitionExpansion -} - -// customResourceDefinitions implements CustomResourceDefinitionInterface -type customResourceDefinitions struct { - *gentype.ClientWithListAndApply[*apiextensionsv1beta1.CustomResourceDefinition, *apiextensionsv1beta1.CustomResourceDefinitionList, *applyconfigurationapiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration] -} - -// newCustomResourceDefinitions returns a CustomResourceDefinitions -func newCustomResourceDefinitions(c *ApiextensionsV1beta1Client) *customResourceDefinitions { - return &customResourceDefinitions{ - gentype.NewClientWithListAndApply[*apiextensionsv1beta1.CustomResourceDefinition, *apiextensionsv1beta1.CustomResourceDefinitionList, *applyconfigurationapiextensionsv1beta1.CustomResourceDefinitionApplyConfiguration]( - "customresourcedefinitions", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *apiextensionsv1beta1.CustomResourceDefinition { - return &apiextensionsv1beta1.CustomResourceDefinition{} - }, - func() *apiextensionsv1beta1.CustomResourceDefinitionList { - return &apiextensionsv1beta1.CustomResourceDefinitionList{} - }, - gentype.PrefersProtobuf[*apiextensionsv1beta1.CustomResourceDefinition](), - ), - } -} diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go deleted file mode 100644 index 771101956..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1beta1 diff --git a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go b/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go deleted file mode 100644 index 2a989d4be..000000000 --- a/vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1beta1 - -type CustomResourceDefinitionExpansion interface{} diff --git a/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go b/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go deleted file mode 100644 index 82a473bb1..000000000 --- a/vendor/k8s.io/apimachinery/pkg/util/rand/rand.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2015 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 rand provides utilities related to randomization. -package rand - -import ( - "math/rand" - "sync" - "time" -) - -var rng = struct { - sync.Mutex - rand *rand.Rand -}{ - rand: rand.New(rand.NewSource(time.Now().UnixNano())), -} - -// Int returns a non-negative pseudo-random int. -func Int() int { - rng.Lock() - defer rng.Unlock() - return rng.rand.Int() -} - -// Intn generates an integer in range [0,max). -// By design this should panic if input is invalid, <= 0. -func Intn(max int) int { - rng.Lock() - defer rng.Unlock() - return rng.rand.Intn(max) -} - -// IntnRange generates an integer in range [min,max). -// By design this should panic if input is invalid, <= 0. -func IntnRange(min, max int) int { - rng.Lock() - defer rng.Unlock() - return rng.rand.Intn(max-min) + min -} - -// IntnRange generates an int64 integer in range [min,max). -// By design this should panic if input is invalid, <= 0. -func Int63nRange(min, max int64) int64 { - rng.Lock() - defer rng.Unlock() - return rng.rand.Int63n(max-min) + min -} - -// Seed seeds the rng with the provided seed. -func Seed(seed int64) { - rng.Lock() - defer rng.Unlock() - - rng.rand = rand.New(rand.NewSource(seed)) -} - -// Perm returns, as a slice of n ints, a pseudo-random permutation of the integers [0,n) -// from the default Source. -func Perm(n int) []int { - rng.Lock() - defer rng.Unlock() - return rng.rand.Perm(n) -} - -const ( - // We omit vowels from the set of available characters to reduce the chances - // of "bad words" being formed. - alphanums = "bcdfghjklmnpqrstvwxz2456789" - // No. of bits required to index into alphanums string. - alphanumsIdxBits = 5 - // Mask used to extract last alphanumsIdxBits of an int. - alphanumsIdxMask = 1<>= alphanumsIdxBits - remaining-- - } - return string(b) -} - -// SafeEncodeString encodes s using the same characters as rand.String. This reduces the chances of bad words and -// ensures that strings generated from hash functions appear consistent throughout the API. -func SafeEncodeString(s string) string { - r := make([]byte, len(s)) - for i, b := range []rune(s) { - r[i] = alphanums[(int(b) % len(alphanums))] - } - return string(r) -} diff --git a/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go b/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go deleted file mode 100644 index 1fa351aab..000000000 --- a/vendor/k8s.io/apimachinery/pkg/util/uuid/uuid.go +++ /dev/null @@ -1,27 +0,0 @@ -/* -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 uuid - -import ( - "github.com/google/uuid" - - "k8s.io/apimachinery/pkg/types" -) - -func NewUUID() types.UID { - return types.UID(uuid.New().String()) -} diff --git a/vendor/k8s.io/apiserver/LICENSE b/vendor/k8s.io/apiserver/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/k8s.io/apiserver/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/k8s.io/apiserver/pkg/authentication/user/doc.go b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go deleted file mode 100644 index 570c51ae9..000000000 --- a/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -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 user contains utilities for dealing with simple user exchange in the auth -// packages. The user.Info interface defines an interface for exchanging that info. -package user diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go deleted file mode 100644 index 1af6f2b27..000000000 --- a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -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 user - -// Info describes a user that has been authenticated to the system. -type Info interface { - // GetName returns the name that uniquely identifies this user among all - // other active users. - GetName() string - // GetUID returns a unique value for a particular user that will change - // if the user is removed from the system and another user is added with - // the same name. - GetUID() string - // GetGroups returns the names of the groups the user is a member of - GetGroups() []string - - // GetExtra can contain any additional information that the authenticator - // thought was interesting. One example would be scopes on a token. - // Keys in this map should be namespaced to the authenticator or - // authenticator/authorizer pair making use of them. - // For instance: "example.org/foo" instead of "foo" - // This is a map[string][]string because it needs to be serializeable into - // a SubjectAccessReviewSpec.authorization.k8s.io for proper authorization - // delegation flows - // In order to faithfully round-trip through an impersonation flow, these keys - // MUST be lowercase. - GetExtra() map[string][]string -} - -// DefaultInfo provides a simple user information exchange object -// for components that implement the UserInfo interface. -type DefaultInfo struct { - Name string - UID string - Groups []string - Extra map[string][]string -} - -func (i *DefaultInfo) GetName() string { - return i.Name -} - -func (i *DefaultInfo) GetUID() string { - return i.UID -} - -func (i *DefaultInfo) GetGroups() []string { - return i.Groups -} - -func (i *DefaultInfo) GetExtra() map[string][]string { - return i.Extra -} - -const ( - // well-known user and group names - SystemPrivilegedGroup = "system:masters" - NodesGroup = "system:nodes" - MonitoringGroup = "system:monitoring" - AllUnauthenticated = "system:unauthenticated" - AllAuthenticated = "system:authenticated" - - Anonymous = "system:anonymous" - APIServerUser = "system:apiserver" - - // core kubernetes process identities - KubeProxy = "system:kube-proxy" - KubeControllerManager = "system:kube-controller-manager" - KubeScheduler = "system:kube-scheduler" - - // CredentialIDKey is the key used in a user's "extra" to specify the unique - // identifier for this identity document). - CredentialIDKey = "authentication.kubernetes.io/credential-id" -) diff --git a/vendor/k8s.io/client-go/tools/internal/events/interfaces.go b/vendor/k8s.io/client-go/tools/internal/events/interfaces.go deleted file mode 100644 index be6261b53..000000000 --- a/vendor/k8s.io/client-go/tools/internal/events/interfaces.go +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2019 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 internal is needed to break an import cycle: record.EventRecorderAdapter -// needs this interface definition to implement it, but event.NewEventBroadcasterAdapter -// needs record.NewBroadcaster. Therefore this interface cannot be in event/interfaces.go. -package internal - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog/v2" -) - -// EventRecorder knows how to record events on behalf of an EventSource. -type EventRecorder interface { - // Eventf constructs an event from the given information and puts it in the queue for sending. - // 'regarding' is the object this event is about. Event will make a reference-- or you may also - // pass a reference to the object directly. - // 'related' is the secondary object for more complex actions. E.g. when regarding object triggers - // a creation or deletion of related object. - // 'type' of this event, and can be one of Normal, Warning. New types could be added in future - // 'reason' is the reason this event is generated. 'reason' should be short and unique; it - // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used - // to automate handling of events, so imagine people writing switch statements to handle them. - // You want to make that easy. - // 'action' explains what happened with regarding/what action did the ReportingController - // (ReportingController is a type of a Controller reporting an Event, e.g. k8s.io/node-controller, k8s.io/kubelet.) - // take in regarding's name; it should be in UpperCamelCase format (starting with a capital letter). - // 'note' is intended to be human readable. - Eventf(regarding runtime.Object, related runtime.Object, eventtype, reason, action, note string, args ...interface{}) -} - -// EventRecorderLogger extends EventRecorder such that a logger can -// be set for methods in EventRecorder. Normally, those methods -// uses the global default logger to record errors and debug messages. -// If that is not desired, use WithLogger to provide a logger instance. -type EventRecorderLogger interface { - EventRecorder - - // WithLogger replaces the context used for logging. This is a cheap call - // and meant to be used for contextual logging: - // recorder := ... - // logger := klog.FromContext(ctx) - // recorder.WithLogger(logger).Eventf(...) - WithLogger(logger klog.Logger) EventRecorderLogger -} diff --git a/vendor/k8s.io/client-go/tools/record/OWNERS b/vendor/k8s.io/client-go/tools/record/OWNERS deleted file mode 100644 index 8105c4fe0..000000000 --- a/vendor/k8s.io/client-go/tools/record/OWNERS +++ /dev/null @@ -1,6 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -reviewers: - - sig-instrumentation-reviewers -approvers: - - sig-instrumentation-approvers diff --git a/vendor/k8s.io/client-go/tools/record/doc.go b/vendor/k8s.io/client-go/tools/record/doc.go deleted file mode 100644 index 23a35758c..000000000 --- a/vendor/k8s.io/client-go/tools/record/doc.go +++ /dev/null @@ -1,19 +0,0 @@ -/* -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 record has all client logic for recording and reporting -// "k8s.io/api/core/v1".Event events. -package record diff --git a/vendor/k8s.io/client-go/tools/record/event.go b/vendor/k8s.io/client-go/tools/record/event.go deleted file mode 100644 index 305a92438..000000000 --- a/vendor/k8s.io/client-go/tools/record/event.go +++ /dev/null @@ -1,530 +0,0 @@ -/* -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 record - -import ( - "context" - "fmt" - "math/rand" - "time" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - "k8s.io/apimachinery/pkg/watch" - restclient "k8s.io/client-go/rest" - internalevents "k8s.io/client-go/tools/internal/events" - "k8s.io/client-go/tools/record/util" - ref "k8s.io/client-go/tools/reference" - "k8s.io/klog/v2" - "k8s.io/utils/clock" -) - -const maxTriesPerEvent = 12 - -var defaultSleepDuration = 10 * time.Second - -const maxQueuedEvents = 1000 - -// EventSink knows how to store events (client.Client implements it.) -// EventSink must respect the namespace that will be embedded in 'event'. -// It is assumed that EventSink will return the same sorts of errors as -// pkg/client's REST client. -type EventSink interface { - Create(event *v1.Event) (*v1.Event, error) - Update(event *v1.Event) (*v1.Event, error) - Patch(oldEvent *v1.Event, data []byte) (*v1.Event, error) -} - -// CorrelatorOptions allows you to change the default of the EventSourceObjectSpamFilter -// and EventAggregator in EventCorrelator -type CorrelatorOptions struct { - // The lru cache size used for both EventSourceObjectSpamFilter and the EventAggregator - // If not specified (zero value), the default specified in events_cache.go will be picked - // This means that the LRUCacheSize has to be greater than 0. - LRUCacheSize int - // The burst size used by the token bucket rate filtering in EventSourceObjectSpamFilter - // If not specified (zero value), the default specified in events_cache.go will be picked - // This means that the BurstSize has to be greater than 0. - BurstSize int - // The fill rate of the token bucket in queries per second in EventSourceObjectSpamFilter - // If not specified (zero value), the default specified in events_cache.go will be picked - // This means that the QPS has to be greater than 0. - QPS float32 - // The func used by the EventAggregator to group event keys for aggregation - // If not specified (zero value), EventAggregatorByReasonFunc will be used - KeyFunc EventAggregatorKeyFunc - // The func used by the EventAggregator to produced aggregated message - // If not specified (zero value), EventAggregatorByReasonMessageFunc will be used - MessageFunc EventAggregatorMessageFunc - // The number of events in an interval before aggregation happens by the EventAggregator - // If not specified (zero value), the default specified in events_cache.go will be picked - // This means that the MaxEvents has to be greater than 0 - MaxEvents int - // The amount of time in seconds that must transpire since the last occurrence of a similar event before it is considered new by the EventAggregator - // If not specified (zero value), the default specified in events_cache.go will be picked - // This means that the MaxIntervalInSeconds has to be greater than 0 - MaxIntervalInSeconds int - // The clock used by the EventAggregator to allow for testing - // If not specified (zero value), clock.RealClock{} will be used - Clock clock.PassiveClock - // The func used by EventFilterFunc, which returns a key for given event, based on which filtering will take place - // If not specified (zero value), getSpamKey will be used - SpamKeyFunc EventSpamKeyFunc -} - -// EventRecorder knows how to record events on behalf of an EventSource. -type EventRecorder interface { - // Event constructs an event from the given information and puts it in the queue for sending. - // 'object' is the object this event is about. Event will make a reference-- or you may also - // pass a reference to the object directly. - // 'eventtype' of this event, and can be one of Normal, Warning. New types could be added in future - // 'reason' is the reason this event is generated. 'reason' should be short and unique; it - // should be in UpperCamelCase format (starting with a capital letter). "reason" will be used - // to automate handling of events, so imagine people writing switch statements to handle them. - // You want to make that easy. - // 'message' is intended to be human readable. - // - // The resulting event will be created in the same namespace as the reference object. - Event(object runtime.Object, eventtype, reason, message string) - - // Eventf is just like Event, but with Sprintf for the message field. - Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) - - // AnnotatedEventf is just like eventf, but with annotations attached - AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) -} - -// EventRecorderLogger extends EventRecorder such that a logger can -// be set for methods in EventRecorder. Normally, those methods -// uses the global default logger to record errors and debug messages. -// If that is not desired, use WithLogger to provide a logger instance. -type EventRecorderLogger interface { - EventRecorder - - // WithLogger replaces the context used for logging. This is a cheap call - // and meant to be used for contextual logging: - // recorder := ... - // logger := klog.FromContext(ctx) - // recorder.WithLogger(logger).Eventf(...) - WithLogger(logger klog.Logger) EventRecorderLogger -} - -// EventBroadcaster knows how to receive events and send them to any EventSink, watcher, or log. -type EventBroadcaster interface { - // StartEventWatcher starts sending events received from this EventBroadcaster to the given - // event handler function. The return value can be ignored or used to stop recording, if - // desired. - StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface - - // StartRecordingToSink starts sending events received from this EventBroadcaster to the given - // sink. The return value can be ignored or used to stop recording, if desired. - StartRecordingToSink(sink EventSink) watch.Interface - - // StartLogging starts sending events received from this EventBroadcaster to the given logging - // function. The return value can be ignored or used to stop recording, if desired. - StartLogging(logf func(format string, args ...interface{})) watch.Interface - - // StartStructuredLogging starts sending events received from this EventBroadcaster to the structured - // logging function. The return value can be ignored or used to stop recording, if desired. - StartStructuredLogging(verbosity klog.Level) watch.Interface - - // NewRecorder returns an EventRecorder that can be used to send events to this EventBroadcaster - // with the event source set to the given event source. - NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorderLogger - - // Shutdown shuts down the broadcaster. Once the broadcaster is shut - // down, it will only try to record an event in a sink once before - // giving up on it with an error message. - Shutdown() -} - -// EventRecorderAdapter is a wrapper around a "k8s.io/client-go/tools/record".EventRecorder -// implementing the new "k8s.io/client-go/tools/events".EventRecorder interface. -type EventRecorderAdapter struct { - recorder EventRecorderLogger -} - -var _ internalevents.EventRecorder = &EventRecorderAdapter{} - -// NewEventRecorderAdapter returns an adapter implementing the new -// "k8s.io/client-go/tools/events".EventRecorder interface. -func NewEventRecorderAdapter(recorder EventRecorderLogger) *EventRecorderAdapter { - return &EventRecorderAdapter{ - recorder: recorder, - } -} - -// Eventf is a wrapper around v1 Eventf -func (a *EventRecorderAdapter) Eventf(regarding, _ runtime.Object, eventtype, reason, action, note string, args ...interface{}) { - a.recorder.Eventf(regarding, eventtype, reason, note, args...) -} - -func (a *EventRecorderAdapter) WithLogger(logger klog.Logger) internalevents.EventRecorderLogger { - return &EventRecorderAdapter{ - recorder: a.recorder.WithLogger(logger), - } -} - -// Creates a new event broadcaster. -func NewBroadcaster(opts ...BroadcasterOption) EventBroadcaster { - c := config{ - sleepDuration: defaultSleepDuration, - } - for _, opt := range opts { - opt(&c) - } - eventBroadcaster := &eventBroadcasterImpl{ - Broadcaster: watch.NewLongQueueBroadcaster(maxQueuedEvents, watch.DropIfChannelFull), - sleepDuration: c.sleepDuration, - options: c.CorrelatorOptions, - } - ctx := c.Context - if ctx == nil { - ctx = context.Background() - } - // The are two scenarios where it makes no sense to wait for context cancelation: - // - The context was nil. - // - The context was context.Background() to begin with. - // - // Both cases get checked here: we have cancelation if (and only if) there is a channel. - haveCtxCancelation := ctx.Done() != nil - - eventBroadcaster.cancelationCtx, eventBroadcaster.cancel = context.WithCancel(ctx) - - if haveCtxCancelation { - // Calling Shutdown is not required when a context was provided: - // when the context is canceled, this goroutine will shut down - // the broadcaster. - // - // If Shutdown is called first, then this goroutine will - // also stop. - go func() { - <-eventBroadcaster.cancelationCtx.Done() - eventBroadcaster.Broadcaster.Shutdown() - }() - } - - return eventBroadcaster -} - -func NewBroadcasterForTests(sleepDuration time.Duration) EventBroadcaster { - return NewBroadcaster(WithSleepDuration(sleepDuration)) -} - -func NewBroadcasterWithCorrelatorOptions(options CorrelatorOptions) EventBroadcaster { - return NewBroadcaster(WithCorrelatorOptions(options)) -} - -func WithCorrelatorOptions(options CorrelatorOptions) BroadcasterOption { - return func(c *config) { - c.CorrelatorOptions = options - } -} - -// WithContext sets a context for the broadcaster. Canceling the context will -// shut down the broadcaster, Shutdown doesn't need to be called. The context -// can also be used to provide a logger. -func WithContext(ctx context.Context) BroadcasterOption { - return func(c *config) { - c.Context = ctx - } -} - -func WithSleepDuration(sleepDuration time.Duration) BroadcasterOption { - return func(c *config) { - c.sleepDuration = sleepDuration - } -} - -type BroadcasterOption func(*config) - -type config struct { - CorrelatorOptions - context.Context - sleepDuration time.Duration -} - -type eventBroadcasterImpl struct { - *watch.Broadcaster - sleepDuration time.Duration - options CorrelatorOptions - cancelationCtx context.Context - cancel func() -} - -// StartRecordingToSink starts sending events received from the specified eventBroadcaster to the given sink. -// The return value can be ignored or used to stop recording, if desired. -// TODO: make me an object with parameterizable queue length and retry interval -func (e *eventBroadcasterImpl) StartRecordingToSink(sink EventSink) watch.Interface { - eventCorrelator := NewEventCorrelatorWithOptions(e.options) - return e.StartEventWatcher( - func(event *v1.Event) { - e.recordToSink(sink, event, eventCorrelator) - }) -} - -func (e *eventBroadcasterImpl) Shutdown() { - e.Broadcaster.Shutdown() - e.cancel() -} - -func (e *eventBroadcasterImpl) recordToSink(sink EventSink, event *v1.Event, eventCorrelator *EventCorrelator) { - // Make a copy before modification, because there could be multiple listeners. - // Events are safe to copy like this. - eventCopy := *event - event = &eventCopy - result, err := eventCorrelator.EventCorrelate(event) - if err != nil { - utilruntime.HandleError(err) - } - if result.Skip { - return - } - tries := 0 - for { - if recordEvent(e.cancelationCtx, sink, result.Event, result.Patch, result.Event.Count > 1, eventCorrelator) { - break - } - tries++ - if tries >= maxTriesPerEvent { - klog.FromContext(e.cancelationCtx).Error(nil, "Unable to write event (retry limit exceeded!)", "event", event) - break - } - - // Randomize the first sleep so that various clients won't all be - // synced up if the master goes down. - delay := e.sleepDuration - if tries == 1 { - delay = time.Duration(float64(delay) * rand.Float64()) - } - select { - case <-e.cancelationCtx.Done(): - klog.FromContext(e.cancelationCtx).Error(nil, "Unable to write event (broadcaster is shut down)", "event", event) - return - case <-time.After(delay): - } - } -} - -// recordEvent attempts to write event to a sink. It returns true if the event -// was successfully recorded or discarded, false if it should be retried. -// If updateExistingEvent is false, it creates a new event, otherwise it updates -// existing event. -func recordEvent(ctx context.Context, sink EventSink, event *v1.Event, patch []byte, updateExistingEvent bool, eventCorrelator *EventCorrelator) bool { - var newEvent *v1.Event - var err error - if updateExistingEvent { - newEvent, err = sink.Patch(event, patch) - } - // Update can fail because the event may have been removed and it no longer exists. - if !updateExistingEvent || util.IsKeyNotFoundError(err) { - // Making sure that ResourceVersion is empty on creation - event.ResourceVersion = "" - newEvent, err = sink.Create(event) - } - if err == nil { - // we need to update our event correlator with the server returned state to handle name/resourceversion - eventCorrelator.UpdateState(newEvent) - return true - } - - // If we can't contact the server, then hold everything while we keep trying. - // Otherwise, something about the event is malformed and we should abandon it. - switch err.(type) { - case *restclient.RequestConstructionError: - // We will construct the request the same next time, so don't keep trying. - klog.FromContext(ctx).Error(err, "Unable to construct event (will not retry!)", "event", event) - return true - case *errors.StatusError: - if errors.IsAlreadyExists(err) || errors.HasStatusCause(err, v1.NamespaceTerminatingCause) { - klog.FromContext(ctx).V(5).Info("Server rejected event (will not retry!)", "event", event, "err", err) - } else { - klog.FromContext(ctx).Error(err, "Server rejected event (will not retry!)", "event", event) - } - return true - case *errors.UnexpectedObjectError: - // We don't expect this; it implies the server's response didn't match a - // known pattern. Go ahead and retry. - default: - // This case includes actual http transport errors. Go ahead and retry. - } - klog.FromContext(ctx).Error(err, "Unable to write event (may retry after sleeping)", "event", event) - return false -} - -// StartLogging starts sending events received from this EventBroadcaster to the given logging function. -// The return value can be ignored or used to stop recording, if desired. -func (e *eventBroadcasterImpl) StartLogging(logf func(format string, args ...interface{})) watch.Interface { - return e.StartEventWatcher( - func(e *v1.Event) { - logf("Event(%#v): type: '%v' reason: '%v' %v", e.InvolvedObject, e.Type, e.Reason, e.Message) - }) -} - -// StartStructuredLogging starts sending events received from this EventBroadcaster to a structured logger. -// The logger is retrieved from a context if the broadcaster was constructed with a context, otherwise -// the global default is used. -// The return value can be ignored or used to stop recording, if desired. -func (e *eventBroadcasterImpl) StartStructuredLogging(verbosity klog.Level) watch.Interface { - loggerV := klog.FromContext(e.cancelationCtx).V(int(verbosity)) - return e.StartEventWatcher( - func(e *v1.Event) { - loggerV.Info("Event occurred", "object", klog.KRef(e.InvolvedObject.Namespace, e.InvolvedObject.Name), "fieldPath", e.InvolvedObject.FieldPath, "kind", e.InvolvedObject.Kind, "apiVersion", e.InvolvedObject.APIVersion, "type", e.Type, "reason", e.Reason, "message", e.Message) - }) -} - -// StartEventWatcher starts sending events received from this EventBroadcaster to the given event handler function. -// The return value can be ignored or used to stop recording, if desired. -func (e *eventBroadcasterImpl) StartEventWatcher(eventHandler func(*v1.Event)) watch.Interface { - watcher, err := e.Watch() - if err != nil { - // This function traditionally returns no error even though it can fail. - // Instead, it logs the error and returns an empty watch. The empty - // watch ensures that callers don't crash when calling Stop. - klog.FromContext(e.cancelationCtx).Error(err, "Unable start event watcher (will not retry!)") - return watch.NewEmptyWatch() - } - go func() { - defer utilruntime.HandleCrash() - for { - select { - case <-e.cancelationCtx.Done(): - watcher.Stop() - return - case watchEvent, ok := <-watcher.ResultChan(): - if !ok { - return - } - event, ok := watchEvent.Object.(*v1.Event) - if !ok { - // This is all local, so there's no reason this should - // ever happen. - continue - } - eventHandler(event) - } - } - }() - return watcher -} - -// NewRecorder returns an EventRecorder that records events with the given event source. -func (e *eventBroadcasterImpl) NewRecorder(scheme *runtime.Scheme, source v1.EventSource) EventRecorderLogger { - return &recorderImplLogger{recorderImpl: &recorderImpl{scheme, source, e.Broadcaster, clock.RealClock{}}, logger: klog.Background()} -} - -type recorderImpl struct { - scheme *runtime.Scheme - source v1.EventSource - *watch.Broadcaster - clock clock.PassiveClock -} - -var _ EventRecorder = &recorderImpl{} - -func (recorder *recorderImpl) generateEvent(logger klog.Logger, object runtime.Object, annotations map[string]string, eventtype, reason, message string) { - ref, err := ref.GetReference(recorder.scheme, object) - if err != nil { - logger.Error(err, "Could not construct reference, will not report event", "object", object, "eventType", eventtype, "reason", reason, "message", message) - return - } - - if !util.ValidateEventType(eventtype) { - logger.Error(nil, "Unsupported event type", "eventType", eventtype) - return - } - - event := recorder.makeEvent(ref, annotations, eventtype, reason, message) - event.Source = recorder.source - - event.ReportingInstance = recorder.source.Host - event.ReportingController = recorder.source.Component - - // NOTE: events should be a non-blocking operation, but we also need to not - // put this in a goroutine, otherwise we'll race to write to a closed channel - // when we go to shut down this broadcaster. Just drop events if we get overloaded, - // and log an error if that happens (we've configured the broadcaster to drop - // outgoing events anyway). - sent, err := recorder.ActionOrDrop(watch.Added, event) - if err != nil { - logger.Error(err, "Unable to record event (will not retry!)") - return - } - if !sent { - logger.Error(nil, "Unable to record event: too many queued events, dropped event", "event", event) - } -} - -func (recorder *recorderImpl) Event(object runtime.Object, eventtype, reason, message string) { - recorder.generateEvent(klog.Background(), object, nil, eventtype, reason, message) -} - -func (recorder *recorderImpl) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...)) -} - -func (recorder *recorderImpl) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.generateEvent(klog.Background(), object, annotations, eventtype, reason, fmt.Sprintf(messageFmt, args...)) -} - -func (recorder *recorderImpl) makeEvent(ref *v1.ObjectReference, annotations map[string]string, eventtype, reason, message string) *v1.Event { - t := metav1.Time{Time: recorder.clock.Now()} - namespace := ref.Namespace - if namespace == "" { - namespace = metav1.NamespaceDefault - } - return &v1.Event{ - ObjectMeta: metav1.ObjectMeta{ - Name: util.GenerateEventName(ref.Name, t.UnixNano()), - Namespace: namespace, - Annotations: annotations, - }, - InvolvedObject: *ref, - Reason: reason, - Message: message, - FirstTimestamp: t, - LastTimestamp: t, - Count: 1, - Type: eventtype, - } -} - -type recorderImplLogger struct { - *recorderImpl - logger klog.Logger -} - -var _ EventRecorderLogger = &recorderImplLogger{} - -func (recorder recorderImplLogger) Event(object runtime.Object, eventtype, reason, message string) { - recorder.recorderImpl.generateEvent(recorder.logger, object, nil, eventtype, reason, message) -} - -func (recorder recorderImplLogger) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.Event(object, eventtype, reason, fmt.Sprintf(messageFmt, args...)) -} - -func (recorder recorderImplLogger) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { - recorder.generateEvent(recorder.logger, object, annotations, eventtype, reason, fmt.Sprintf(messageFmt, args...)) -} - -func (recorder recorderImplLogger) WithLogger(logger klog.Logger) EventRecorderLogger { - return recorderImplLogger{recorderImpl: recorder.recorderImpl, logger: logger} -} diff --git a/vendor/k8s.io/client-go/tools/record/events_cache.go b/vendor/k8s.io/client-go/tools/record/events_cache.go deleted file mode 100644 index 9eae6971c..000000000 --- a/vendor/k8s.io/client-go/tools/record/events_cache.go +++ /dev/null @@ -1,521 +0,0 @@ -/* -Copyright 2015 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 record - -import ( - "encoding/json" - "fmt" - "strings" - "sync" - "time" - - v1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/strategicpatch" - "k8s.io/client-go/util/flowcontrol" - "k8s.io/utils/clock" - "k8s.io/utils/lru" -) - -const ( - maxLruCacheEntries = 4096 - - // if we see the same event that varies only by message - // more than 10 times in a 10 minute period, aggregate the event - defaultAggregateMaxEvents = 10 - defaultAggregateIntervalInSeconds = 600 - - // by default, allow a source to send 25 events about an object - // but control the refill rate to 1 new event every 5 minutes - // this helps control the long-tail of events for things that are always - // unhealthy - defaultSpamBurst = 25 - defaultSpamQPS = 1. / 300. -) - -// getEventKey builds unique event key based on source, involvedObject, reason, message -func getEventKey(event *v1.Event) string { - return strings.Join([]string{ - event.Source.Component, - event.Source.Host, - event.InvolvedObject.Kind, - event.InvolvedObject.Namespace, - event.InvolvedObject.Name, - event.InvolvedObject.FieldPath, - string(event.InvolvedObject.UID), - event.InvolvedObject.APIVersion, - event.Type, - event.Reason, - event.Message, - }, - "") -} - -// getSpamKey builds unique event key based on source, involvedObject -func getSpamKey(event *v1.Event) string { - return strings.Join([]string{ - event.Source.Component, - event.Source.Host, - event.InvolvedObject.Kind, - event.InvolvedObject.Namespace, - event.InvolvedObject.Name, - string(event.InvolvedObject.UID), - event.InvolvedObject.APIVersion, - event.Type, - }, - "") -} - -// EventSpamKeyFunc is a function that returns unique key based on provided event -type EventSpamKeyFunc func(event *v1.Event) string - -// EventFilterFunc is a function that returns true if the event should be skipped -type EventFilterFunc func(event *v1.Event) bool - -// EventSourceObjectSpamFilter is responsible for throttling -// the amount of events a source and object can produce. -type EventSourceObjectSpamFilter struct { - // the cache that manages last synced state - cache *lru.Cache - - // burst is the amount of events we allow per source + object - burst int - - // qps is the refill rate of the token bucket in queries per second - qps float32 - - // clock is used to allow for testing over a time interval - clock clock.PassiveClock - - // spamKeyFunc is a func used to create a key based on an event, which is later used to filter spam events. - spamKeyFunc EventSpamKeyFunc -} - -// NewEventSourceObjectSpamFilter allows burst events from a source about an object with the specified qps refill. -func NewEventSourceObjectSpamFilter(lruCacheSize, burst int, qps float32, clock clock.PassiveClock, spamKeyFunc EventSpamKeyFunc) *EventSourceObjectSpamFilter { - return &EventSourceObjectSpamFilter{ - cache: lru.New(lruCacheSize), - burst: burst, - qps: qps, - clock: clock, - spamKeyFunc: spamKeyFunc, - } -} - -// spamRecord holds data used to perform spam filtering decisions. -type spamRecord struct { - // rateLimiter controls the rate of events about this object - rateLimiter flowcontrol.PassiveRateLimiter -} - -// Filter controls that a given source+object are not exceeding the allowed rate. -func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool { - var record spamRecord - - // controls our cached information about this event - eventKey := f.spamKeyFunc(event) - - // do we have a record of similar events in our cache? - value, found := f.cache.Get(eventKey) - if found { - record = value.(spamRecord) - } - - // verify we have a rate limiter for this record - if record.rateLimiter == nil { - record.rateLimiter = flowcontrol.NewTokenBucketPassiveRateLimiterWithClock(f.qps, f.burst, f.clock) - } - - // ensure we have available rate - filter := !record.rateLimiter.TryAccept() - - // update the cache - f.cache.Add(eventKey, record) - - return filter -} - -// EventAggregatorKeyFunc is responsible for grouping events for aggregation -// It returns a tuple of the following: -// aggregateKey - key the identifies the aggregate group to bucket this event -// localKey - key that makes this event in the local group -type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string) - -// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type, -// event.Reason, event.ReportingController and event.ReportingInstance -func EventAggregatorByReasonFunc(event *v1.Event) (string, string) { - return strings.Join([]string{ - event.Source.Component, - event.Source.Host, - event.InvolvedObject.Kind, - event.InvolvedObject.Namespace, - event.InvolvedObject.Name, - string(event.InvolvedObject.UID), - event.InvolvedObject.APIVersion, - event.Type, - event.Reason, - event.ReportingController, - event.ReportingInstance, - }, - ""), event.Message -} - -// EventAggregatorMessageFunc is responsible for producing an aggregation message -type EventAggregatorMessageFunc func(event *v1.Event) string - -// EventAggregatorByReasonMessageFunc returns an aggregate message by prefixing the incoming message -func EventAggregatorByReasonMessageFunc(event *v1.Event) string { - return "(combined from similar events): " + event.Message -} - -// EventAggregator identifies similar events and aggregates them into a single event -type EventAggregator struct { - sync.RWMutex - - // The cache that manages aggregation state - cache *lru.Cache - - // The function that groups events for aggregation - keyFunc EventAggregatorKeyFunc - - // The function that generates a message for an aggregate event - messageFunc EventAggregatorMessageFunc - - // The maximum number of events in the specified interval before aggregation occurs - maxEvents uint - - // The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new - maxIntervalInSeconds uint - - // clock is used to allow for testing over a time interval - clock clock.PassiveClock -} - -// NewEventAggregator returns a new instance of an EventAggregator -func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc, - maxEvents int, maxIntervalInSeconds int, clock clock.PassiveClock) *EventAggregator { - return &EventAggregator{ - cache: lru.New(lruCacheSize), - keyFunc: keyFunc, - messageFunc: messageFunc, - maxEvents: uint(maxEvents), - maxIntervalInSeconds: uint(maxIntervalInSeconds), - clock: clock, - } -} - -// aggregateRecord holds data used to perform aggregation decisions -type aggregateRecord struct { - // we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate - // if the size of this set exceeds the max, we know we need to aggregate - localKeys sets.Set[string] - // The last time at which the aggregate was recorded - lastTimestamp metav1.Time -} - -// EventAggregate checks if a similar event has been seen according to the -// aggregation configuration (max events, max interval, etc) and returns: -// -// - The (potentially modified) event that should be created -// - The cache key for the event, for correlation purposes. This will be set to -// the full key for normal events, and to the result of -// EventAggregatorMessageFunc for aggregate events. -func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, string) { - now := metav1.NewTime(e.clock.Now()) - var record aggregateRecord - // eventKey is the full cache key for this event - eventKey := getEventKey(newEvent) - // aggregateKey is for the aggregate event, if one is needed. - aggregateKey, localKey := e.keyFunc(newEvent) - - // Do we have a record of similar events in our cache? - e.Lock() - defer e.Unlock() - value, found := e.cache.Get(aggregateKey) - if found { - record = value.(aggregateRecord) - } - - // Is the previous record too old? If so, make a fresh one. Note: if we didn't - // find a similar record, its lastTimestamp will be the zero value, so we - // create a new one in that case. - maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second - interval := now.Time.Sub(record.lastTimestamp.Time) - if interval > maxInterval { - record = aggregateRecord{localKeys: sets.New[string]()} - } - - // Write the new event into the aggregation record and put it on the cache - record.localKeys.Insert(localKey) - record.lastTimestamp = now - e.cache.Add(aggregateKey, record) - - // If we are not yet over the threshold for unique events, don't correlate them - if uint(record.localKeys.Len()) < e.maxEvents { - return newEvent, eventKey - } - - // do not grow our local key set any larger than max - record.localKeys.PopAny() - - // create a new aggregate event, and return the aggregateKey as the cache key - // (so that it can be overwritten.) - eventCopy := &v1.Event{ - ObjectMeta: metav1.ObjectMeta{ - Name: fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()), - Namespace: newEvent.Namespace, - }, - Count: 1, - FirstTimestamp: now, - InvolvedObject: newEvent.InvolvedObject, - LastTimestamp: now, - Message: e.messageFunc(newEvent), - Type: newEvent.Type, - Reason: newEvent.Reason, - Source: newEvent.Source, - } - return eventCopy, aggregateKey -} - -// eventLog records data about when an event was observed -type eventLog struct { - // The number of times the event has occurred since first occurrence. - count uint - - // The time at which the event was first recorded. - firstTimestamp metav1.Time - - // The unique name of the first occurrence of this event - name string - - // Resource version returned from previous interaction with server - resourceVersion string -} - -// eventLogger logs occurrences of an event -type eventLogger struct { - sync.RWMutex - cache *lru.Cache - clock clock.PassiveClock -} - -// newEventLogger observes events and counts their frequencies -func newEventLogger(lruCacheEntries int, clock clock.PassiveClock) *eventLogger { - return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock} -} - -// eventObserve records an event, or updates an existing one if key is a cache hit -func (e *eventLogger) eventObserve(newEvent *v1.Event, key string) (*v1.Event, []byte, error) { - var ( - patch []byte - err error - ) - eventCopy := *newEvent - event := &eventCopy - - e.Lock() - defer e.Unlock() - - // Check if there is an existing event we should update - lastObservation := e.lastEventObservationFromCache(key) - - // If we found a result, prepare a patch - if lastObservation.count > 0 { - // update the event based on the last observation so patch will work as desired - event.Name = lastObservation.name - event.ResourceVersion = lastObservation.resourceVersion - event.FirstTimestamp = lastObservation.firstTimestamp - event.Count = int32(lastObservation.count) + 1 - - eventCopy2 := *event - eventCopy2.Count = 0 - eventCopy2.LastTimestamp = metav1.NewTime(time.Unix(0, 0)) - eventCopy2.Message = "" - - newData, _ := json.Marshal(event) - oldData, _ := json.Marshal(eventCopy2) - patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event) - } - - // record our new observation - e.cache.Add( - key, - eventLog{ - count: uint(event.Count), - firstTimestamp: event.FirstTimestamp, - name: event.Name, - resourceVersion: event.ResourceVersion, - }, - ) - return event, patch, err -} - -// updateState updates its internal tracking information based on latest server state -func (e *eventLogger) updateState(event *v1.Event) { - key := getEventKey(event) - e.Lock() - defer e.Unlock() - // record our new observation - e.cache.Add( - key, - eventLog{ - count: uint(event.Count), - firstTimestamp: event.FirstTimestamp, - name: event.Name, - resourceVersion: event.ResourceVersion, - }, - ) -} - -// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock -func (e *eventLogger) lastEventObservationFromCache(key string) eventLog { - value, ok := e.cache.Get(key) - if ok { - observationValue, ok := value.(eventLog) - if ok { - return observationValue - } - } - return eventLog{} -} - -// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system. It can filter all -// incoming events to see if the event should be filtered from further processing. It can aggregate similar events that occur -// frequently to protect the system from spamming events that are difficult for users to distinguish. It performs de-duplication -// to ensure events that are observed multiple times are compacted into a single event with increasing counts. -type EventCorrelator struct { - // the function to filter the event - filterFunc EventFilterFunc - // the object that performs event aggregation - aggregator *EventAggregator - // the object that observes events as they come through - logger *eventLogger -} - -// EventCorrelateResult is the result of a Correlate -type EventCorrelateResult struct { - // the event after correlation - Event *v1.Event - // if provided, perform a strategic patch when updating the record on the server - Patch []byte - // if true, do no further processing of the event - Skip bool -} - -// NewEventCorrelator returns an EventCorrelator configured with default values. -// -// The EventCorrelator is responsible for event filtering, aggregating, and counting -// prior to interacting with the API server to record the event. -// -// The default behavior is as follows: -// - Aggregation is performed if a similar event is recorded 10 times -// in a 10 minute rolling interval. A similar event is an event that varies only by -// the Event.Message field. Rather than recording the precise event, aggregation -// will create a new event whose message reports that it has combined events with -// the same reason. -// - Events are incrementally counted if the exact same event is encountered multiple -// times. -// - A source may burst 25 events about an object, but has a refill rate budget -// per object of 1 event every 5 minutes to control long-tail of spam. -func NewEventCorrelator(clock clock.PassiveClock) *EventCorrelator { - cacheSize := maxLruCacheEntries - spamFilter := NewEventSourceObjectSpamFilter(cacheSize, defaultSpamBurst, defaultSpamQPS, clock, getSpamKey) - return &EventCorrelator{ - filterFunc: spamFilter.Filter, - aggregator: NewEventAggregator( - cacheSize, - EventAggregatorByReasonFunc, - EventAggregatorByReasonMessageFunc, - defaultAggregateMaxEvents, - defaultAggregateIntervalInSeconds, - clock), - - logger: newEventLogger(cacheSize, clock), - } -} - -func NewEventCorrelatorWithOptions(options CorrelatorOptions) *EventCorrelator { - optionsWithDefaults := populateDefaults(options) - spamFilter := NewEventSourceObjectSpamFilter( - optionsWithDefaults.LRUCacheSize, - optionsWithDefaults.BurstSize, - optionsWithDefaults.QPS, - optionsWithDefaults.Clock, - optionsWithDefaults.SpamKeyFunc) - return &EventCorrelator{ - filterFunc: spamFilter.Filter, - aggregator: NewEventAggregator( - optionsWithDefaults.LRUCacheSize, - optionsWithDefaults.KeyFunc, - optionsWithDefaults.MessageFunc, - optionsWithDefaults.MaxEvents, - optionsWithDefaults.MaxIntervalInSeconds, - optionsWithDefaults.Clock), - logger: newEventLogger(optionsWithDefaults.LRUCacheSize, optionsWithDefaults.Clock), - } -} - -// populateDefaults populates the zero value options with defaults -func populateDefaults(options CorrelatorOptions) CorrelatorOptions { - if options.LRUCacheSize == 0 { - options.LRUCacheSize = maxLruCacheEntries - } - if options.BurstSize == 0 { - options.BurstSize = defaultSpamBurst - } - if options.QPS == 0 { - options.QPS = defaultSpamQPS - } - if options.KeyFunc == nil { - options.KeyFunc = EventAggregatorByReasonFunc - } - if options.MessageFunc == nil { - options.MessageFunc = EventAggregatorByReasonMessageFunc - } - if options.MaxEvents == 0 { - options.MaxEvents = defaultAggregateMaxEvents - } - if options.MaxIntervalInSeconds == 0 { - options.MaxIntervalInSeconds = defaultAggregateIntervalInSeconds - } - if options.Clock == nil { - options.Clock = clock.RealClock{} - } - if options.SpamKeyFunc == nil { - options.SpamKeyFunc = getSpamKey - } - return options -} - -// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events -func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) { - if newEvent == nil { - return nil, fmt.Errorf("event is nil") - } - aggregateEvent, ckey := c.aggregator.EventAggregate(newEvent) - observedEvent, patch, err := c.logger.eventObserve(aggregateEvent, ckey) - if c.filterFunc(observedEvent) { - return &EventCorrelateResult{Skip: true}, nil - } - return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err -} - -// UpdateState based on the latest observed state from server -func (c *EventCorrelator) UpdateState(event *v1.Event) { - c.logger.updateState(event) -} diff --git a/vendor/k8s.io/client-go/tools/record/fake.go b/vendor/k8s.io/client-go/tools/record/fake.go deleted file mode 100644 index 67eac4817..000000000 --- a/vendor/k8s.io/client-go/tools/record/fake.go +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2015 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 record - -import ( - "fmt" - - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/klog/v2" -) - -// FakeRecorder is used as a fake during tests. It is thread safe. It is usable -// when created manually and not by NewFakeRecorder, however all events may be -// thrown away in this case. -type FakeRecorder struct { - Events chan string - - IncludeObject bool -} - -var _ EventRecorderLogger = &FakeRecorder{} - -func objectString(object runtime.Object, includeObject bool) string { - if !includeObject { - return "" - } - return fmt.Sprintf(" involvedObject{kind=%s,apiVersion=%s}", - object.GetObjectKind().GroupVersionKind().Kind, - object.GetObjectKind().GroupVersionKind().GroupVersion(), - ) -} - -func annotationsString(annotations map[string]string) string { - if len(annotations) == 0 { - return "" - } else { - return " " + fmt.Sprint(annotations) - } -} - -func (f *FakeRecorder) writeEvent(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { - if f.Events != nil { - f.Events <- fmt.Sprintf(eventtype+" "+reason+" "+messageFmt, args...) + - objectString(object, f.IncludeObject) + annotationsString(annotations) - } -} - -func (f *FakeRecorder) Event(object runtime.Object, eventtype, reason, message string) { - f.writeEvent(object, nil, eventtype, reason, "%s", message) -} - -func (f *FakeRecorder) Eventf(object runtime.Object, eventtype, reason, messageFmt string, args ...interface{}) { - f.writeEvent(object, nil, eventtype, reason, messageFmt, args...) -} - -func (f *FakeRecorder) AnnotatedEventf(object runtime.Object, annotations map[string]string, eventtype, reason, messageFmt string, args ...interface{}) { - f.writeEvent(object, annotations, eventtype, reason, messageFmt, args...) -} - -func (f *FakeRecorder) WithLogger(logger klog.Logger) EventRecorderLogger { - return f -} - -// NewFakeRecorder creates new fake event recorder with event channel with -// buffer of given size. -func NewFakeRecorder(bufferSize int) *FakeRecorder { - return &FakeRecorder{ - Events: make(chan string, bufferSize), - } -} diff --git a/vendor/k8s.io/client-go/tools/record/util/util.go b/vendor/k8s.io/client-go/tools/record/util/util.go deleted file mode 100644 index 7a82db0cd..000000000 --- a/vendor/k8s.io/client-go/tools/record/util/util.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 2019 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 util - -import ( - "fmt" - "net/http" - - "github.com/google/uuid" - - v1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/api/errors" - apimachineryvalidation "k8s.io/apimachinery/pkg/api/validation" -) - -// ValidateEventType checks that eventtype is an expected type of event -func ValidateEventType(eventtype string) bool { - switch eventtype { - case v1.EventTypeNormal, v1.EventTypeWarning: - return true - } - return false -} - -// IsKeyNotFoundError is utility function that checks if an error is not found error -func IsKeyNotFoundError(err error) bool { - statusErr, _ := err.(*errors.StatusError) - - return statusErr != nil && statusErr.Status().Code == http.StatusNotFound -} - -// GenerateEventName generates a valid Event name from the referenced name and the passed UNIX timestamp. -// The referenced Object name may not be a valid name for Events and cause the Event to fail -// to be created, so we need to generate a new one in that case. -// Ref: https://issues.k8s.io/127594 -func GenerateEventName(refName string, unixNano int64) string { - name := fmt.Sprintf("%s.%x", refName, unixNano) - if errs := apimachineryvalidation.NameIsDNSSubdomain(name, false); len(errs) > 0 { - // Using an uuid guarantees uniqueness and correctness - name = uuid.New().String() - } - return name -} diff --git a/vendor/k8s.io/component-base/LICENSE b/vendor/k8s.io/component-base/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/k8s.io/component-base/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/k8s.io/component-base/metrics/OWNERS b/vendor/k8s.io/component-base/metrics/OWNERS deleted file mode 100644 index b70cf0be7..000000000 --- a/vendor/k8s.io/component-base/metrics/OWNERS +++ /dev/null @@ -1,12 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -approvers: - - sig-instrumentation-approvers - - RainbowMango -emeritus_approvers: - - logicalhan -reviewers: - - sig-instrumentation-reviewers - - YoyinZyc -labels: - - sig/instrumentation diff --git a/vendor/k8s.io/component-base/metrics/api/v1/config.go b/vendor/k8s.io/component-base/metrics/api/v1/config.go deleted file mode 100644 index 982571368..000000000 --- a/vendor/k8s.io/component-base/metrics/api/v1/config.go +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2025 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 v1 - -import ( - "fmt" - "os" - "path/filepath" - "regexp" - - "github.com/blang/semver/v4" - "go.yaml.in/yaml/v2" - "k8s.io/apimachinery/pkg/util/validation/field" -) - -var ( - labelExpr = `[a-zA-Z_][a-zA-Z0-9_]*` - metricNameExpr = `[a-zA-Z_:][a-zA-Z0-9_:]*` - allowListMappingKeyRegex = regexp.MustCompile(`^` + metricNameExpr + `,` + labelExpr + `$`) - metricNameRegex = regexp.MustCompile(`^` + metricNameExpr + `$`) -) - -// Validate validates a MetricsConfiguration. -func Validate(c *MetricsConfiguration, currentVersion semver.Version, fldPath *field.Path) field.ErrorList { - errs := field.ErrorList{} - if c == nil { - return errs - } - errs = append(errs, validateShowHiddenMetricsVersion(currentVersion, c.ShowHiddenMetricsForVersion, fldPath.Child("showHiddenMetricsForVersion"))...) - errs = append(errs, validateDisabledMetrics(c.DisabledMetrics, fldPath.Child("disabledMetrics"))...) - errs = append(errs, validateAllowListMapping(c.AllowListMapping, fldPath.Child("allowListMapping"))...) - errs = append(errs, validateAllowListMappingManifest(c.AllowListMappingManifest, fldPath.Child("allowListMappingManifest"))...) - if c.AllowListMapping != nil && c.AllowListMappingManifest != "" { - errs = append(errs, field.Invalid(fldPath, c, "cannot specify both allowListMapping and allowListMappingManifest")) - } - - return errs -} - -func validateAllowListMapping(allowListMapping map[string]string, fldPath *field.Path) field.ErrorList { - errs := field.ErrorList{} - for k := range allowListMapping { - if !allowListMappingKeyRegex.MatchString(k) { - return append(errs, field.Invalid(fldPath, allowListMapping, fmt.Sprintf("must have keys with format `metricName,labelName` where metricName matches %q and labelName matches %q", metricNameExpr, labelExpr))) - } - } - - return errs -} - -// validateAllowListMappingManifest validates the allow list mapping manifest file. -// This function is used to validate the manifest file provided via the flag --allow-metric-labels-manifest, or the configuration file. -// In the former case, the path resolution is relative to the current working directory. -// In the latter case, the path resolution is relative to the configuration file's location, and components are required to pass in the resolved absolute path. -// NOTE: If its the latter case, components are expected to pass in the *absolute* path to the manifest file. -func validateAllowListMappingManifest(allowListMappingManifestPath string, fldPath *field.Path) field.ErrorList { - errs := field.ErrorList{} - if allowListMappingManifestPath == "" { - return errs - } - data, err := os.ReadFile(filepath.Clean(allowListMappingManifestPath)) - if err != nil { - return append(errs, field.Invalid(fldPath, allowListMappingManifestPath, fmt.Errorf("failed to read allow list manifest: %w", err).Error())) - } - allowListMapping := make(map[string]string) - err = yaml.Unmarshal(data, &allowListMapping) - if err != nil { - return append(errs, field.Invalid(fldPath, allowListMappingManifestPath, fmt.Errorf("failed to parse allow list manifest: %w", err).Error())) - } - allowListMappingErrs := validateAllowListMapping(allowListMapping, fldPath) - if len(allowListMappingErrs) > 0 { - return append(errs, field.Invalid(fldPath, allowListMappingManifestPath, fmt.Sprintf("invalid allow list mapping in manifest: %v", allowListMappingErrs))) - } - - return errs -} - -func validateDisabledMetrics(names []string, fldPath *field.Path) field.ErrorList { - errs := field.ErrorList{} - for _, name := range names { - if !metricNameRegex.MatchString(name) { - return append(errs, field.Invalid(fldPath, names, fmt.Sprintf("must be fully qualified metric names matching %q, got %q", metricNameRegex.String(), name))) - } - } - - return errs -} - -func validateShowHiddenMetricsVersion(currentVersion semver.Version, targetVersionStr string, fldPath *field.Path) field.ErrorList { - errs := field.ErrorList{} - if targetVersionStr == "" { - return errs - } - - validVersionStr := fmt.Sprintf("%d.%d", currentVersion.Major, currentVersion.Minor-1) - if targetVersionStr != validVersionStr { - return append(errs, field.Invalid(fldPath, targetVersionStr, fmt.Sprintf("must be omitted or have the value '%v'; only the previous minor version is allowed", validVersionStr))) - } - - return errs -} - -// ValidateShowHiddenMetricsVersionForKubeletBackwardCompatOnly validates the ShowHiddenMetricsForVersion field. -// TODO: This is kept here for backward compatibility in Kubelet (as metrics configuration fields were exposed on an individual basis earlier). -// TODO: Revisit this after Kubelet supports the new metrics configuration API: https://github.com/kubernetes/kubernetes/pull/123426 -func ValidateShowHiddenMetricsVersionForKubeletBackwardCompatOnly(currentVersion semver.Version, targetVersionStr string) error { - errs := validateShowHiddenMetricsVersion(currentVersion, targetVersionStr, field.NewPath("showHiddenMetricsForVersion")) - if len(errs) > 0 { - return fmt.Errorf("invalid showHiddenMetricsForVersion: %v", errs.ToAggregate().Error()) - } - - return nil -} diff --git a/vendor/k8s.io/component-base/metrics/api/v1/doc.go b/vendor/k8s.io/component-base/metrics/api/v1/doc.go deleted file mode 100644 index 8c457bd0d..000000000 --- a/vendor/k8s.io/component-base/metrics/api/v1/doc.go +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2025 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. -*/ - -// +k8s:deepcopy-gen=package - -// Package v1 contains the configuration API for metrics. -// -// The intention is to only have a single version of this API, potentially with -// new fields added over time in a backwards-compatible manner. Fields for -// alpha or beta features are allowed as long as they are defined so that not -// changing the defaults leaves those features disabled. -// -// The "v1" package name is just a reminder that API compatibility rules apply, -// not an indication of the stability of all features covered by it. -// -// NOTE: Component owners are advised to rely on `k8s.io/component-base/metrics` to operate upon -// `k8s.io/component-base/metrics/api/v1.MetricsConfiguration` as the former contains functions to apply and validate -// the configuration, which in turn rely on members of the same package, which cannot be moved, -// or imported (cyclic dependency) here. - -package v1 // import "k8s.io/component-base/metrics/api/v1" diff --git a/vendor/k8s.io/component-base/metrics/api/v1/types.go b/vendor/k8s.io/component-base/metrics/api/v1/types.go deleted file mode 100644 index b95aa3723..000000000 --- a/vendor/k8s.io/component-base/metrics/api/v1/types.go +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2025 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 v1 - -// MetricsConfiguration contains all metrics options. -type MetricsConfiguration struct { - // ShowHiddenMetricsForVersion is the previous version for which you want to show hidden metrics. - // Only the previous minor version is meaningful, other values will not be allowed. - // The format is ., e.g.: '1.16'. - // The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, - // rather than being surprised when they are permanently removed in the release after that. - ShowHiddenMetricsForVersion string `json:"showHiddenMetricsForVersion,omitempty"` - // DisabledMetrics is a list of fully qualified metric names that should be disabled. - // Disabling metrics is higher in precedence than showing hidden metrics. - DisabledMetrics []string `json:"disabledMetrics,omitempty"` - // AllowListMapping is the map from metric-label to value allow-list of this label. - // The key's format is ,, while its value is a list of allowed values for that label of that metric, i.e., ,,... - // For e.g., metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'." - AllowListMapping map[string]string `json:"allowListMapping,omitempty"` - // The path to the manifest file that contains the allow-list mapping. Provided for convenience over AllowListMapping. - // The file contents must represent a map of string keys and values, i.e., - // "metric1,label1": "value11,value12" - // "metric2,label2": "" - AllowListMappingManifest string `json:"allowListMappingManifest,omitempty"` -} diff --git a/vendor/k8s.io/component-base/metrics/api/v1/zz_generated.deepcopy.go b/vendor/k8s.io/component-base/metrics/api/v1/zz_generated.deepcopy.go deleted file mode 100644 index 6c96349a9..000000000 --- a/vendor/k8s.io/component-base/metrics/api/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,50 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetricsConfiguration) DeepCopyInto(out *MetricsConfiguration) { - *out = *in - if in.DisabledMetrics != nil { - in, out := &in.DisabledMetrics, &out.DisabledMetrics - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.AllowListMapping != nil { - in, out := &in.AllowListMapping, &out.AllowListMapping - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricsConfiguration. -func (in *MetricsConfiguration) DeepCopy() *MetricsConfiguration { - if in == nil { - return nil - } - out := new(MetricsConfiguration) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/component-base/metrics/buckets.go b/vendor/k8s.io/component-base/metrics/buckets.go deleted file mode 100644 index 27a57eb7f..000000000 --- a/vendor/k8s.io/component-base/metrics/buckets.go +++ /dev/null @@ -1,53 +0,0 @@ -/* -Copyright 2022 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 metrics - -import ( - "github.com/prometheus/client_golang/prometheus" -) - -// DefBuckets is a wrapper for prometheus.DefBuckets -var DefBuckets = prometheus.DefBuckets - -// LinearBuckets is a wrapper for prometheus.LinearBuckets. -func LinearBuckets(start, width float64, count int) []float64 { - return prometheus.LinearBuckets(start, width, count) -} - -// ExponentialBuckets is a wrapper for prometheus.ExponentialBuckets. -func ExponentialBuckets(start, factor float64, count int) []float64 { - return prometheus.ExponentialBuckets(start, factor, count) -} - -// ExponentialBucketsRange creates 'count' buckets, where the lowest bucket is -// 'min' and the highest bucket is 'max'. The final +Inf bucket is not counted -// and not included in the returned slice. The returned slice is meant to be -// used for the Buckets field of HistogramOpts. -// -// The function panics if 'count' is 0 or negative, if 'min' is 0 or negative. -func ExponentialBucketsRange(min, max float64, count int) []float64 { - return prometheus.ExponentialBucketsRange(min, max, count) -} - -// MergeBuckets merges buckets together -func MergeBuckets(buckets ...[]float64) []float64 { - result := make([]float64, 1) - for _, s := range buckets { - result = append(result, s...) - } - return result -} diff --git a/vendor/k8s.io/component-base/metrics/collector.go b/vendor/k8s.io/component-base/metrics/collector.go deleted file mode 100644 index 0718b6e13..000000000 --- a/vendor/k8s.io/component-base/metrics/collector.go +++ /dev/null @@ -1,190 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "fmt" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" -) - -// StableCollector extends the prometheus.Collector interface to allow customization of the -// metric registration process, it's especially intend to be used in scenario of custom collector. -type StableCollector interface { - prometheus.Collector - - // DescribeWithStability sends the super-set of all possible metrics.Desc collected - // by this StableCollector to the provided channel. - DescribeWithStability(chan<- *Desc) - - // CollectWithStability sends each collected metrics.Metric via the provide channel. - CollectWithStability(chan<- Metric) - - // Create will initialize all Desc and it intends to be called by registry. - Create(version *semver.Version, self StableCollector) bool - - // ClearState will clear all the states marked by Create. - ClearState() - - // HiddenMetrics tells the list of hidden metrics with fqName. - HiddenMetrics() []string -} - -// BaseStableCollector which implements almost all methods defined by StableCollector -// is a convenient assistant for custom collectors. -// It is recommended to inherit BaseStableCollector when implementing custom collectors. -type BaseStableCollector struct { - descriptors map[string]*Desc // stores all descriptors by pair, these are collected from DescribeWithStability(). - registerable map[string]*Desc // stores registerable descriptors by pair, is a subset of descriptors. - hidden map[string]*Desc // stores hidden descriptors by pair, is a subset of descriptors. - self StableCollector -} - -// DescribeWithStability sends all descriptors to the provided channel. -// Every custom collector should over-write this method. -func (bsc *BaseStableCollector) DescribeWithStability(ch chan<- *Desc) { - panic(fmt.Errorf("custom collector should over-write DescribeWithStability method")) -} - -// Describe sends all descriptors to the provided channel. -// It intended to be called by prometheus registry. -func (bsc *BaseStableCollector) Describe(ch chan<- *prometheus.Desc) { - for _, d := range bsc.registerable { - ch <- d.toPrometheusDesc() - } -} - -// CollectWithStability sends all metrics to the provided channel. -// Every custom collector should over-write this method. -func (bsc *BaseStableCollector) CollectWithStability(ch chan<- Metric) { - panic(fmt.Errorf("custom collector should over-write CollectWithStability method")) -} - -// Collect is called by the Prometheus registry when collecting metrics. -func (bsc *BaseStableCollector) Collect(ch chan<- prometheus.Metric) { - mch := make(chan Metric) - - go func() { - bsc.self.CollectWithStability(mch) - close(mch) - }() - - for m := range mch { - // nil Metric usually means hidden metrics - if m == nil { - continue - } - - ch <- prometheus.Metric(m) - } -} - -func (bsc *BaseStableCollector) add(d *Desc) { - if len(d.fqName) == 0 { - panic("nameless metrics will be not allowed") - } - - if bsc.descriptors == nil { - bsc.descriptors = make(map[string]*Desc) - } - - if _, exist := bsc.descriptors[d.fqName]; exist { - panic(fmt.Sprintf("duplicate metrics (%s) will be not allowed", d.fqName)) - } - - bsc.descriptors[d.fqName] = d -} - -// Init intends to be called by registry. -func (bsc *BaseStableCollector) init(self StableCollector) { - bsc.self = self - - dch := make(chan *Desc) - - // collect all possible descriptions from custom side - go func() { - bsc.self.DescribeWithStability(dch) - close(dch) - }() - - for d := range dch { - bsc.add(d) - } -} - -func (bsc *BaseStableCollector) trackRegistrableDescriptor(d *Desc) { - if bsc.registerable == nil { - bsc.registerable = make(map[string]*Desc) - } - - bsc.registerable[d.fqName] = d -} - -func (bsc *BaseStableCollector) trackHiddenDescriptor(d *Desc) { - if bsc.hidden == nil { - bsc.hidden = make(map[string]*Desc) - } - - bsc.hidden[d.fqName] = d -} - -// Create intends to be called by registry. -// Create will return true as long as there is one or more metrics not be hidden. -// Otherwise return false, that means the whole collector will be ignored by registry. -func (bsc *BaseStableCollector) Create(version *semver.Version, self StableCollector) bool { - bsc.init(self) - - for _, d := range bsc.descriptors { - d.create(version) - if d.IsHidden() { - bsc.trackHiddenDescriptor(d) - } else { - bsc.trackRegistrableDescriptor(d) - } - } - - if len(bsc.registerable) > 0 { - return true - } - - return false -} - -// ClearState will clear all the states marked by Create. -// It intends to be used for re-register a hidden metric. -func (bsc *BaseStableCollector) ClearState() { - for _, d := range bsc.descriptors { - d.ClearState() - } - - bsc.descriptors = nil - bsc.registerable = nil - bsc.hidden = nil - bsc.self = nil -} - -// HiddenMetrics tells the list of hidden metrics with fqName. -func (bsc *BaseStableCollector) HiddenMetrics() (fqNames []string) { - for i := range bsc.hidden { - fqNames = append(fqNames, bsc.hidden[i].fqName) - } - return -} - -// Check if our BaseStableCollector implements necessary interface -var _ StableCollector = &BaseStableCollector{} diff --git a/vendor/k8s.io/component-base/metrics/counter.go b/vendor/k8s.io/component-base/metrics/counter.go deleted file mode 100644 index 6805bf940..000000000 --- a/vendor/k8s.io/component-base/metrics/counter.go +++ /dev/null @@ -1,297 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "context" - "sync" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - "go.opentelemetry.io/otel/trace" - - dto "github.com/prometheus/client_model/go" -) - -// Counter is our internal representation for our wrapping struct around prometheus -// counters. Counter implements both kubeCollector and CounterMetric. -type Counter struct { - CounterMetric - *CounterOpts - lazyMetric - selfCollector -} - -// The implementation of the Metric interface is expected by testutil.GetCounterMetricValue. -var _ Metric = &Counter{} - -// exemplarCounterMetric holds a context to extract exemplar labels from, and a counter metric to attach them to. It implements the metricWithExemplar interface. -type exemplarCounterMetric struct { - ctx context.Context - delegate CounterMetric -} - -// NewCounter returns an object which satisfies the kubeCollector and CounterMetric interfaces. -// However, the object returned will not measure anything unless the collector is first -// registered, since the metric is lazily instantiated. -func NewCounter(opts *CounterOpts) *Counter { - opts.StabilityLevel.setDefaults() - - kc := &Counter{ - CounterOpts: opts, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - kc.setPrometheusCounter(noop) - kc.lazyInit(kc, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) - return kc -} - -func (c *Counter) Desc() *prometheus.Desc { - return c.metric.Desc() -} - -func (c *Counter) Write(to *dto.Metric) error { - return c.metric.Write(to) -} - -// Reset resets the underlying prometheus Counter to start counting from 0 again -func (c *Counter) Reset() { - if !c.IsCreated() { - return - } - c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) -} - -// setPrometheusCounter sets the underlying CounterMetric object, i.e. the thing that does the measurement. -func (c *Counter) setPrometheusCounter(counter prometheus.Counter) { - c.CounterMetric = counter - c.initSelfCollection(counter) -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (c *Counter) DeprecatedVersion() *semver.Version { - return parseSemver(c.CounterOpts.DeprecatedVersion) -} - -// initializeMetric invocation creates the actual underlying Counter. Until this method is called -// the underlying counter is a no-op. -func (c *Counter) initializeMetric() { - c.CounterOpts.annotateStabilityLevel() - // this actually creates the underlying prometheus counter. - c.setPrometheusCounter(prometheus.NewCounter(c.CounterOpts.toPromCounterOpts())) -} - -// initializeDeprecatedMetric invocation creates the actual (but deprecated) Counter. Until this method -// is called the underlying counter is a no-op. -func (c *Counter) initializeDeprecatedMetric() { - c.CounterOpts.markDeprecated() - c.initializeMetric() -} - -// WithContext allows the normal Counter metric to pass in context. -func (c *Counter) WithContext(ctx context.Context) CounterMetric { - return &exemplarCounterMetric{ctx: ctx, delegate: c.CounterMetric} -} - -// Add attaches an exemplar to the metric and then calls the delegate. -func (e *exemplarCounterMetric) Add(v float64) { - if m, ok := e.delegate.(prometheus.ExemplarAdder); ok { - maybeSpanCtx := trace.SpanContextFromContext(e.ctx) - if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { - exemplarLabels := prometheus.Labels{ - "trace_id": maybeSpanCtx.TraceID().String(), - "span_id": maybeSpanCtx.SpanID().String(), - } - m.AddWithExemplar(v, exemplarLabels) - return - } - } - - e.delegate.Add(v) -} - -// Inc attaches an exemplar to the metric and then calls the delegate. -func (e *exemplarCounterMetric) Inc() { - e.Add(1) -} - -// CounterVec is the internal representation of our wrapping struct around prometheus -// counterVecs. CounterVec implements both kubeCollector and CounterVecMetric. -type CounterVec struct { - *prometheus.CounterVec - *CounterOpts - lazyMetric - originalLabels []string -} - -var _ kubeCollector = &CounterVec{} - -// TODO: make this true: var _ CounterVecMetric = &CounterVec{} - -// NewCounterVec returns an object which satisfies the kubeCollector and (almost) CounterVecMetric interfaces. -// However, the object returned will not measure anything unless the collector is first -// registered, since the metric is lazily instantiated, and only members extracted after -// registration will actually measure anything. -func NewCounterVec(opts *CounterOpts, labels []string) *CounterVec { - opts.StabilityLevel.setDefaults() - - fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) - - cv := &CounterVec{ - CounterVec: noopCounterVec, - CounterOpts: opts, - originalLabels: labels, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - cv.lazyInit(cv, fqName) - return cv -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (v *CounterVec) DeprecatedVersion() *semver.Version { - return parseSemver(v.CounterOpts.DeprecatedVersion) - -} - -// initializeMetric invocation creates the actual underlying CounterVec. Until this method is called -// the underlying counterVec is a no-op. -func (v *CounterVec) initializeMetric() { - v.CounterOpts.annotateStabilityLevel() - v.CounterVec = prometheus.NewCounterVec(v.CounterOpts.toPromCounterOpts(), v.originalLabels) -} - -// initializeDeprecatedMetric invocation creates the actual (but deprecated) CounterVec. Until this method is called -// the underlying counterVec is a no-op. -func (v *CounterVec) initializeDeprecatedMetric() { - v.CounterOpts.markDeprecated() - v.initializeMetric() -} - -// Default Prometheus Vec behavior is that member extraction results in creation of a new element -// if one with the unique label values is not found in the underlying stored metricMap. -// This means that if this function is called but the underlying metric is not registered -// (which means it will never be exposed externally nor consumed), the metric will exist in memory -// for perpetuity (i.e. throughout application lifecycle). -// -// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/counter.go#L179-L197 -// -// In contrast, the Vec behavior in this package is that member extraction before registration -// returns a permanent noop object. - -// WithLabelValues returns the Counter for the given slice of label -// values (same order as the VariableLabels in Desc). If that combination of -// label values is accessed for the first time, a new Counter is created IFF the counterVec -// has been registered to a metrics registry. -func (v *CounterVec) WithLabelValues(lvs ...string) CounterMetric { - if !v.IsCreated() { - return noop // return no-op counter - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label values to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) - } - - return v.CounterVec.WithLabelValues(lvs...) -} - -// With returns the Counter for the given Labels map (the label names -// must match those of the VariableLabels in Desc). If that label map is -// accessed for the first time, a new Counter is created IFF the counterVec has -// been registered to a metrics registry. -func (v *CounterVec) With(labels map[string]string) CounterMetric { - if !v.IsCreated() { - return noop // return no-op counter - } - - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainLabelMap(labels) - } - - return v.CounterVec.With(labels) -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -func (v *CounterVec) Delete(labels map[string]string) bool { - if !v.IsCreated() { - return false // since we haven't created the metric, we haven't deleted a metric with the passed in values - } - return v.CounterVec.Delete(labels) -} - -// Reset deletes all metrics in this vector. -func (v *CounterVec) Reset() { - if !v.IsCreated() { - return - } - - v.CounterVec.Reset() -} - -// ResetLabelAllowLists resets the label allow list for the CounterVec. -// NOTE: This should only be used in test. -func (v *CounterVec) ResetLabelAllowLists() { - v.initializeLabelAllowListsOnce = sync.Once{} - v.LabelValueAllowLists = nil -} - -// WithContext returns wrapped CounterVec with context -func (v *CounterVec) WithContext(ctx context.Context) *CounterVecWithContext { - return &CounterVecWithContext{ - ctx: ctx, - CounterVec: v, - } -} - -// CounterVecWithContext is the wrapper of CounterVec with context. -type CounterVecWithContext struct { - *CounterVec - ctx context.Context -} - -// WithLabelValues is the wrapper of CounterVec.WithLabelValues. -func (vc *CounterVecWithContext) WithLabelValues(lvs ...string) CounterMetric { - return vc.CounterVec.WithLabelValues(lvs...) -} - -// With is the wrapper of CounterVec.With. -func (vc *CounterVecWithContext) With(labels map[string]string) CounterMetric { - return vc.CounterVec.With(labels) -} diff --git a/vendor/k8s.io/component-base/metrics/desc.go b/vendor/k8s.io/component-base/metrics/desc.go deleted file mode 100644 index a40c488a5..000000000 --- a/vendor/k8s.io/component-base/metrics/desc.go +++ /dev/null @@ -1,223 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "fmt" - "sync" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - - "k8s.io/klog/v2" -) - -// Desc is a prometheus.Desc extension. -// -// Use NewDesc to create new Desc instances. -type Desc struct { - // fqName has been built from Namespace, Subsystem, and Name. - fqName string - // help provides some helpful information about this metric. - help string - // constLabels is the label names. Their label values are variable. - constLabels Labels - // variableLabels contains names of labels for which the metric - // maintains variable values. - variableLabels []string - - // promDesc is the descriptor used by every Prometheus Metric. - promDesc *prometheus.Desc - annotatedHelp string - - // stabilityLevel represents the API guarantees for a given defined metric. - stabilityLevel StabilityLevel - // deprecatedVersion represents in which version this metric be deprecated. - deprecatedVersion string - - isDeprecated bool - isHidden bool - isCreated bool - createLock sync.RWMutex - markDeprecationOnce sync.Once - createOnce sync.Once - deprecateOnce sync.Once - hideOnce sync.Once - annotateOnce sync.Once -} - -// NewDesc extends prometheus.NewDesc with stability support. -// -// The stabilityLevel should be valid stability label, such as "metrics.ALPHA" -// and "metrics.STABLE"(Maybe "metrics.BETA" in future). Default value "metrics.ALPHA" -// will be used in case of empty or invalid stability label. -// -// The deprecatedVersion represents in which version this Metric be deprecated. -// The deprecation policy outlined by the control plane metrics stability KEP. -func NewDesc(fqName string, help string, variableLabels []string, constLabels Labels, - stabilityLevel StabilityLevel, deprecatedVersion string) *Desc { - d := &Desc{ - fqName: fqName, - help: help, - annotatedHelp: help, - variableLabels: variableLabels, - constLabels: constLabels, - stabilityLevel: stabilityLevel, - deprecatedVersion: deprecatedVersion, - } - d.stabilityLevel.setDefaults() - - return d -} - -// String formats the Desc as a string. -// The stability metadata maybe annotated in 'HELP' section if called after registry, -// otherwise not. -// e.g. "Desc{fqName: "normal_stable_descriptor", help: "[STABLE] this is a stable descriptor", constLabels: {}, variableLabels: []}" -func (d *Desc) String() string { - if d.isCreated { - return d.promDesc.String() - } - - return prometheus.NewDesc(d.fqName, d.help, d.variableLabels, prometheus.Labels(d.constLabels)).String() -} - -// toPrometheusDesc transform self to prometheus.Desc -func (d *Desc) toPrometheusDesc() *prometheus.Desc { - return d.promDesc -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (d *Desc) DeprecatedVersion() *semver.Version { - return parseSemver(d.deprecatedVersion) - -} - -func (d *Desc) determineDeprecationStatus(currentVersion semver.Version) { - deprecatedVersion := d.DeprecatedVersion() - if deprecatedVersion == nil { - return - } - d.markDeprecationOnce.Do(func() { - d.isDeprecated = isDeprecated(currentVersion, *deprecatedVersion) - if shouldHide(d.stabilityLevel, ¤tVersion, deprecatedVersion) { - if ShouldShowHidden() { - klog.Warningf("Hidden metrics(%s) have been manually overridden, showing this very deprecated metric.", d.fqName) - return - } - // TODO(RainbowMango): Remove this log temporarily. https://github.com/kubernetes/kubernetes/issues/85369 - // klog.Warningf("This metric(%s) has been deprecated for more than one release, hiding.", d.fqName) - d.isHidden = true - } - }) -} - -// IsHidden returns if metric will be hidden -func (d *Desc) IsHidden() bool { - return d.isHidden -} - -// IsDeprecated returns if metric has been deprecated -func (d *Desc) IsDeprecated() bool { - return d.isDeprecated -} - -// IsCreated returns if metric has been created. -func (d *Desc) IsCreated() bool { - d.createLock.RLock() - defer d.createLock.RUnlock() - - return d.isCreated -} - -// create forces the initialization of Desc which has been deferred until -// the point at which this method is invoked. This method will determine whether -// the Desc is deprecated or hidden, no-opting if the Desc should be considered -// hidden. Furthermore, this function no-opts and returns true if Desc is already -// created. -func (d *Desc) create(version *semver.Version) bool { - if version != nil { - d.determineDeprecationStatus(*version) - } - - // let's not create if this metric is slated to be hidden - if d.IsHidden() { - return false - } - d.createOnce.Do(func() { - d.createLock.Lock() - defer d.createLock.Unlock() - - d.isCreated = true - if d.IsDeprecated() { - d.initializeDeprecatedDesc() - } else { - d.initialize() - } - }) - return d.IsCreated() -} - -// ClearState will clear all the states marked by Create. -// It intends to be used for re-register a hidden metric. -func (d *Desc) ClearState() { - d.isDeprecated = false - d.isHidden = false - d.isCreated = false - - d.markDeprecationOnce = *new(sync.Once) - d.createOnce = *new(sync.Once) - d.deprecateOnce = *new(sync.Once) - d.hideOnce = *new(sync.Once) - d.annotateOnce = *new(sync.Once) - - d.annotatedHelp = d.help - d.promDesc = nil -} - -func (d *Desc) markDeprecated() { - d.deprecateOnce.Do(func() { - d.annotatedHelp = fmt.Sprintf("(Deprecated since %s) %s", d.deprecatedVersion, d.annotatedHelp) - }) -} - -func (d *Desc) annotateStabilityLevel() { - d.annotateOnce.Do(func() { - d.annotatedHelp = fmt.Sprintf("[%v] %v", d.stabilityLevel, d.annotatedHelp) - }) -} - -func (d *Desc) initialize() { - d.annotateStabilityLevel() - - // this actually creates the underlying prometheus desc. - d.promDesc = prometheus.NewDesc(d.fqName, d.annotatedHelp, d.variableLabels, prometheus.Labels(d.constLabels)) -} - -func (d *Desc) initializeDeprecatedDesc() { - d.markDeprecated() - d.initialize() -} - -// GetRawDesc will returns a new *Desc with original parameters provided to NewDesc(). -// -// It will be useful in testing scenario that the same Desc be registered to different registry. -// 1. Desc `D` is registered to registry 'A' in TestA (Note: `D` maybe created) -// 2. Desc `D` is registered to registry 'B' in TestB (Note: since 'D' has been created once, thus will be ignored by registry 'B') -func (d *Desc) GetRawDesc() *Desc { - return NewDesc(d.fqName, d.help, d.variableLabels, d.constLabels, d.stabilityLevel, d.deprecatedVersion) -} diff --git a/vendor/k8s.io/component-base/metrics/gauge.go b/vendor/k8s.io/component-base/metrics/gauge.go deleted file mode 100644 index 20982f67d..000000000 --- a/vendor/k8s.io/component-base/metrics/gauge.go +++ /dev/null @@ -1,321 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "context" - "sync" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - - "k8s.io/component-base/version" -) - -// Gauge is our internal representation for our wrapping struct around prometheus -// gauges. kubeGauge implements both kubeCollector and KubeGauge. -type Gauge struct { - GaugeMetric - *GaugeOpts - lazyMetric - selfCollector -} - -var _ GaugeMetric = &Gauge{} -var _ Registerable = &Gauge{} -var _ kubeCollector = &Gauge{} - -// NewGauge returns an object which satisfies the kubeCollector, Registerable, and Gauge interfaces. -// However, the object returned will not measure anything unless the collector is first -// registered, since the metric is lazily instantiated. -func NewGauge(opts *GaugeOpts) *Gauge { - opts.StabilityLevel.setDefaults() - - kc := &Gauge{ - GaugeOpts: opts, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - kc.setPrometheusGauge(noop) - kc.lazyInit(kc, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) - return kc -} - -// setPrometheusGauge sets the underlying KubeGauge object, i.e. the thing that does the measurement. -func (g *Gauge) setPrometheusGauge(gauge prometheus.Gauge) { - g.GaugeMetric = gauge - g.initSelfCollection(gauge) -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (g *Gauge) DeprecatedVersion() *semver.Version { - return parseSemver(g.GaugeOpts.DeprecatedVersion) -} - -// initializeMetric invocation creates the actual underlying Gauge. Until this method is called -// the underlying gauge is a no-op. -func (g *Gauge) initializeMetric() { - g.GaugeOpts.annotateStabilityLevel() - // this actually creates the underlying prometheus gauge. - g.setPrometheusGauge(prometheus.NewGauge(g.GaugeOpts.toPromGaugeOpts())) -} - -// initializeDeprecatedMetric invocation creates the actual (but deprecated) Gauge. Until this method -// is called the underlying gauge is a no-op. -func (g *Gauge) initializeDeprecatedMetric() { - g.GaugeOpts.markDeprecated() - g.initializeMetric() -} - -// WithContext allows the normal Gauge metric to pass in context. The context is no-op now. -func (g *Gauge) WithContext(ctx context.Context) GaugeMetric { - return g.GaugeMetric -} - -// GaugeVec is the internal representation of our wrapping struct around prometheus -// gaugeVecs. kubeGaugeVec implements both kubeCollector and KubeGaugeVec. -type GaugeVec struct { - *prometheus.GaugeVec - *GaugeOpts - lazyMetric - originalLabels []string -} - -var _ GaugeVecMetric = &GaugeVec{} -var _ Registerable = &GaugeVec{} -var _ kubeCollector = &GaugeVec{} - -// NewGaugeVec returns an object which satisfies the kubeCollector, Registerable, and GaugeVecMetric interfaces. -// However, the object returned will not measure anything unless the collector is first -// registered, since the metric is lazily instantiated, and only members extracted after -// registration will actually measure anything. -func NewGaugeVec(opts *GaugeOpts, labels []string) *GaugeVec { - opts.StabilityLevel.setDefaults() - - fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) - - cv := &GaugeVec{ - GaugeVec: noopGaugeVec, - GaugeOpts: opts, - originalLabels: labels, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - cv.lazyInit(cv, fqName) - return cv -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (v *GaugeVec) DeprecatedVersion() *semver.Version { - return parseSemver(v.GaugeOpts.DeprecatedVersion) -} - -// initializeMetric invocation creates the actual underlying GaugeVec. Until this method is called -// the underlying gaugeVec is a no-op. -func (v *GaugeVec) initializeMetric() { - v.GaugeOpts.annotateStabilityLevel() - v.GaugeVec = prometheus.NewGaugeVec(v.GaugeOpts.toPromGaugeOpts(), v.originalLabels) -} - -// initializeDeprecatedMetric invocation creates the actual (but deprecated) GaugeVec. Until this method is called -// the underlying gaugeVec is a no-op. -func (v *GaugeVec) initializeDeprecatedMetric() { - v.GaugeOpts.markDeprecated() - v.initializeMetric() -} - -func (v *GaugeVec) WithLabelValuesChecked(lvs ...string) (GaugeMetric, error) { - if !v.IsCreated() { - if v.IsHidden() { - return noop, nil - } - return noop, errNotRegistered // return no-op gauge - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label values to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) - } - - return v.GetMetricWithLabelValues(lvs...) -} - -func (v *GaugeVec) DeleteLabelValuesChecked(lvs ...string) (bool, error) { - if !v.IsCreated() { - if v.IsHidden() { - return false, nil - } - return false, errNotRegistered - } - - return v.GaugeVec.DeleteLabelValues(lvs...), nil -} - -// Default Prometheus Vec behavior is that member extraction results in creation of a new element -// if one with the unique label values is not found in the underlying stored metricMap. -// This means that if this function is called but the underlying metric is not registered -// (which means it will never be exposed externally nor consumed), the metric will exist in memory -// for perpetuity (i.e. throughout application lifecycle). -// -// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/gauge.go#L190-L208 -// -// In contrast, the Vec behavior in this package is that member extraction before registration -// returns a permanent noop object. - -// WithLabelValues returns the GaugeMetric for the given slice of label -// values (same order as the VariableLabels in Desc). If that combination of -// label values is accessed for the first time, a new GaugeMetric is created IFF the gaugeVec -// has been registered to a metrics registry. -func (v *GaugeVec) WithLabelValues(lvs ...string) GaugeMetric { - ans, err := v.WithLabelValuesChecked(lvs...) - if err == nil || ErrIsNotRegistered(err) { - return ans - } - panic(err) -} - -func (v *GaugeVec) DeleteLabelValues(lvs ...string) bool { - ans, err := v.DeleteLabelValuesChecked(lvs...) - if err == nil || ErrIsNotRegistered(err) { - return ans - } - panic(err) -} - -func (v *GaugeVec) WithChecked(labels map[string]string) (GaugeMetric, error) { - if !v.IsCreated() { - if v.IsHidden() { - return noop, nil - } - return noop, errNotRegistered // return no-op gauge - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label map to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainLabelMap(labels) - } - - return v.GetMetricWith(labels) -} - -// With returns the GaugeMetric for the given Labels map (the label names -// must match those of the VariableLabels in Desc). If that label map is -// accessed for the first time, a new GaugeMetric is created IFF the gaugeVec has -// been registered to a metrics registry. -func (v *GaugeVec) With(labels map[string]string) GaugeMetric { - ans, err := v.WithChecked(labels) - if err == nil || ErrIsNotRegistered(err) { - return ans - } - panic(err) -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -func (v *GaugeVec) Delete(labels map[string]string) bool { - if !v.IsCreated() { - return false // since we haven't created the metric, we haven't deleted a metric with the passed in values - } - return v.GaugeVec.Delete(labels) -} - -// Reset deletes all metrics in this vector. -func (v *GaugeVec) Reset() { - if !v.IsCreated() { - return - } - - v.GaugeVec.Reset() -} - -// ResetLabelAllowLists resets the label allow list for the GaugeVec. -// NOTE: This should only be used in test. -func (v *GaugeVec) ResetLabelAllowLists() { - v.initializeLabelAllowListsOnce = sync.Once{} - v.LabelValueAllowLists = nil -} - -func newGaugeFunc(opts *GaugeOpts, function func() float64, v semver.Version) GaugeFunc { - g := NewGauge(opts) - - if !g.Create(&v) { - return nil - } - - return prometheus.NewGaugeFunc(g.GaugeOpts.toPromGaugeOpts(), function) -} - -// NewGaugeFunc creates a new GaugeFunc based on the provided GaugeOpts. The -// value reported is determined by calling the given function from within the -// Write method. Take into account that metric collection may happen -// concurrently. If that results in concurrent calls to Write, like in the case -// where a GaugeFunc is directly registered with Prometheus, the provided -// function must be concurrency-safe. -func NewGaugeFunc(opts *GaugeOpts, function func() float64) GaugeFunc { - v := parseVersion(version.Get()) - - return newGaugeFunc(opts, function, v) -} - -// WithContext returns wrapped GaugeVec with context -func (v *GaugeVec) WithContext(ctx context.Context) *GaugeVecWithContext { - return &GaugeVecWithContext{ - ctx: ctx, - GaugeVec: v, - } -} - -func (v *GaugeVec) InterfaceWithContext(ctx context.Context) GaugeVecMetric { - return v.WithContext(ctx) -} - -// GaugeVecWithContext is the wrapper of GaugeVec with context. -type GaugeVecWithContext struct { - *GaugeVec - ctx context.Context -} - -// WithLabelValues is the wrapper of GaugeVec.WithLabelValues. -func (vc *GaugeVecWithContext) WithLabelValues(lvs ...string) GaugeMetric { - return vc.GaugeVec.WithLabelValues(lvs...) -} - -// With is the wrapper of GaugeVec.With. -func (vc *GaugeVecWithContext) With(labels map[string]string) GaugeMetric { - return vc.GaugeVec.With(labels) -} diff --git a/vendor/k8s.io/component-base/metrics/histogram.go b/vendor/k8s.io/component-base/metrics/histogram.go deleted file mode 100644 index f1e51036f..000000000 --- a/vendor/k8s.io/component-base/metrics/histogram.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "context" - "sync" - "time" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - "go.opentelemetry.io/otel/trace" -) - -// Histogram is our internal representation for our wrapping struct around prometheus -// histograms. Summary implements both kubeCollector and ObserverMetric -type Histogram struct { - ObserverMetric - *HistogramOpts - lazyMetric - selfCollector -} - -// exemplarHistogramMetric holds a context to extract exemplar labels from, and a historgram metric to attach them to. It implements the metricWithExemplar interface. -type exemplarHistogramMetric struct { - ctx context.Context - delegate ObserverMetric -} - -type exemplarHistogramVec struct { - *HistogramVecWithContext - observer prometheus.Observer -} - -// Observe attaches an exemplar to the metric and then calls the delegate. -func (e *exemplarHistogramMetric) Observe(v float64) { - if m, ok := e.delegate.(prometheus.ExemplarObserver); ok { - maybeSpanCtx := trace.SpanContextFromContext(e.ctx) - if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { - exemplarLabels := prometheus.Labels{ - "trace_id": maybeSpanCtx.TraceID().String(), - "span_id": maybeSpanCtx.SpanID().String(), - } - m.ObserveWithExemplar(v, exemplarLabels) - return - } - } - - e.delegate.Observe(v) -} - -// NewHistogram returns an object which is Histogram-like. However, nothing -// will be measured until the histogram is registered somewhere. -func NewHistogram(opts *HistogramOpts) *Histogram { - opts.StabilityLevel.setDefaults() - - h := &Histogram{ - HistogramOpts: opts, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - h.setPrometheusHistogram(noopMetric{}) - h.lazyInit(h, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) - return h -} - -// setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. -func (h *Histogram) setPrometheusHistogram(histogram prometheus.Histogram) { - h.ObserverMetric = histogram - h.initSelfCollection(histogram) -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (h *Histogram) DeprecatedVersion() *semver.Version { - return parseSemver(h.HistogramOpts.DeprecatedVersion) -} - -// initializeMetric invokes the actual prometheus.Histogram object instantiation -// and stores a reference to it -func (h *Histogram) initializeMetric() { - h.HistogramOpts.annotateStabilityLevel() - // this actually creates the underlying prometheus histogram. - h.setPrometheusHistogram(prometheus.NewHistogram(h.HistogramOpts.toPromHistogramOpts())) -} - -// initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation -// but modifies the Help description prior to object instantiation. -func (h *Histogram) initializeDeprecatedMetric() { - h.HistogramOpts.markDeprecated() - h.initializeMetric() -} - -// WithContext allows the normal Histogram metric to pass in context. The context is no-op now. -func (h *Histogram) WithContext(ctx context.Context) ObserverMetric { - return &exemplarHistogramMetric{ctx: ctx, delegate: h.ObserverMetric} -} - -// HistogramVec is the internal representation of our wrapping struct around prometheus -// histogramVecs. -type HistogramVec struct { - *prometheus.HistogramVec - *HistogramOpts - lazyMetric - originalLabels []string -} - -// NewHistogramVec returns an object which satisfies kubeCollector and wraps the -// prometheus.HistogramVec object. However, the object returned will not measure -// anything unless the collector is first registered, since the metric is lazily instantiated, -// and only members extracted after -// registration will actually measure anything. - -func NewHistogramVec(opts *HistogramOpts, labels []string) *HistogramVec { - opts.StabilityLevel.setDefaults() - - fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) - - v := &HistogramVec{ - HistogramVec: noopHistogramVec, - HistogramOpts: opts, - originalLabels: labels, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - v.lazyInit(v, fqName) - return v -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (v *HistogramVec) DeprecatedVersion() *semver.Version { - return parseSemver(v.HistogramOpts.DeprecatedVersion) -} - -func (v *HistogramVec) initializeMetric() { - v.HistogramOpts.annotateStabilityLevel() - v.HistogramVec = prometheus.NewHistogramVec(v.HistogramOpts.toPromHistogramOpts(), v.originalLabels) -} - -func (v *HistogramVec) initializeDeprecatedMetric() { - v.HistogramOpts.markDeprecated() - v.initializeMetric() -} - -// Default Prometheus Vec behavior is that member extraction results in creation of a new element -// if one with the unique label values is not found in the underlying stored metricMap. -// This means that if this function is called but the underlying metric is not registered -// (which means it will never be exposed externally nor consumed), the metric will exist in memory -// for perpetuity (i.e. throughout application lifecycle). -// -// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/histogram.go#L460-L470 -// -// In contrast, the Vec behavior in this package is that member extraction before registration -// returns a permanent noop object. - -// WithLabelValues returns the ObserverMetric for the given slice of label -// values (same order as the VariableLabels in Desc). If that combination of -// label values is accessed for the first time, a new ObserverMetric is created IFF the HistogramVec -// has been registered to a metrics registry. -func (v *HistogramVec) WithLabelValues(lvs ...string) ObserverMetric { - if !v.IsCreated() { - return noop - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label values to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) - } - return v.HistogramVec.WithLabelValues(lvs...) -} - -// With returns the ObserverMetric for the given Labels map (the label names -// must match those of the VariableLabels in Desc). If that label map is -// accessed for the first time, a new ObserverMetric is created IFF the HistogramVec has -// been registered to a metrics registry. -func (v *HistogramVec) With(labels map[string]string) ObserverMetric { - if !v.IsCreated() { - return noop - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label map to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainLabelMap(labels) - } - - return v.HistogramVec.With(labels) -} - -// ObserveSince returns a function that observes the duration since the given start time. -// This is intended to be used with defer to measure the time elapsed since a given point: -// -// start := time.Now() -// defer metricVec.ObserveSince(start, "label1", "label2")() -// -// The returned function must be called (typically via defer) to record the observation. -// This pattern avoids the common pitfall where arguments to deferred functions are evaluated -// immediately, which would result in incorrect timing measurements. -func (v *HistogramVec) ObserveSince(start time.Time, lvs ...string) func() { - return func() { - v.WithLabelValues(lvs...).Observe(time.Since(start).Seconds()) - } -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -func (v *HistogramVec) Delete(labels map[string]string) bool { - if !v.IsCreated() { - return false // since we haven't created the metric, we haven't deleted a metric with the passed in values - } - return v.HistogramVec.Delete(labels) -} - -// Reset deletes all metrics in this vector. -func (v *HistogramVec) Reset() { - if !v.IsCreated() { - return - } - - v.HistogramVec.Reset() -} - -// ResetLabelAllowLists resets the label allow list for the HistogramVec. -// NOTE: This should only be used in test. -func (v *HistogramVec) ResetLabelAllowLists() { - v.initializeLabelAllowListsOnce = sync.Once{} - v.LabelValueAllowLists = nil -} - -// WithContext returns wrapped HistogramVec with context -func (v *HistogramVec) WithContext(ctx context.Context) *HistogramVecWithContext { - return &HistogramVecWithContext{ - ctx: ctx, - HistogramVec: v, - } -} - -// HistogramVecWithContext is the wrapper of HistogramVec with context. -type HistogramVecWithContext struct { - *HistogramVec - ctx context.Context -} - -func (h *exemplarHistogramVec) Observe(v float64) { - h.withExemplar(v) -} - -func (h *exemplarHistogramVec) withExemplar(v float64) { - if m, ok := h.observer.(prometheus.ExemplarObserver); ok { - maybeSpanCtx := trace.SpanContextFromContext(h.HistogramVecWithContext.ctx) - if maybeSpanCtx.IsValid() && maybeSpanCtx.IsSampled() { - m.ObserveWithExemplar(v, prometheus.Labels{ - "trace_id": maybeSpanCtx.TraceID().String(), - "span_id": maybeSpanCtx.SpanID().String(), - }) - return - } - } - - h.observer.Observe(v) -} - -// WithLabelValues is the wrapper of HistogramVec.WithLabelValues. -func (vc *HistogramVecWithContext) WithLabelValues(lvs ...string) *exemplarHistogramVec { - return &exemplarHistogramVec{ - HistogramVecWithContext: vc, - observer: vc.HistogramVec.WithLabelValues(lvs...), - } -} - -// With is the wrapper of HistogramVec.With. -func (vc *HistogramVecWithContext) With(labels map[string]string) *exemplarHistogramVec { - return &exemplarHistogramVec{ - HistogramVecWithContext: vc, - observer: vc.HistogramVec.With(labels), - } -} - -// ObserveSince is the wrapper of HistogramVec.ObserveSince. -func (vc *HistogramVecWithContext) ObserveSince(start time.Time, lvs ...string) func() { - return vc.HistogramVec.ObserveSince(start, lvs...) -} diff --git a/vendor/k8s.io/component-base/metrics/http.go b/vendor/k8s.io/component-base/metrics/http.go deleted file mode 100644 index 2a0d249c2..000000000 --- a/vendor/k8s.io/component-base/metrics/http.go +++ /dev/null @@ -1,87 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "io" - "net/http" - "time" - - "github.com/prometheus/client_golang/prometheus/promhttp" -) - -var ( - processStartedAt time.Time -) - -func init() { - processStartedAt = time.Now() -} - -// These constants cause handlers serving metrics to behave as described if -// errors are encountered. -const ( - // HTTPErrorOnError serve an HTTP status code 500 upon the first error - // encountered. Report the error message in the body. - HTTPErrorOnError promhttp.HandlerErrorHandling = iota - - // ContinueOnError ignore errors and try to serve as many metrics as possible. - // However, if no metrics can be served, serve an HTTP status code 500 and the - // last error message in the body. Only use this in deliberate "best - // effort" metrics collection scenarios. In this case, it is highly - // recommended to provide other means of detecting errors: By setting an - // ErrorLog in HandlerOpts, the errors are logged. By providing a - // Registry in HandlerOpts, the exposed metrics include an error counter - // "promhttp_metric_handler_errors_total", which can be used for - // alerts. - ContinueOnError - - // PanicOnError panics upon the first error encountered (useful for "crash only" apps). - PanicOnError -) - -// HandlerOpts specifies options how to serve metrics via an http.Handler. The -// zero value of HandlerOpts is a reasonable default. -type HandlerOpts promhttp.HandlerOpts - -func (ho *HandlerOpts) toPromhttpHandlerOpts() promhttp.HandlerOpts { - ho.ProcessStartTime = processStartedAt - return promhttp.HandlerOpts(*ho) -} - -// HandlerFor returns an uninstrumented http.Handler for the provided -// Gatherer. The behavior of the Handler is defined by the provided -// HandlerOpts. Thus, HandlerFor is useful to create http.Handlers for custom -// Gatherers, with non-default HandlerOpts, and/or with custom (or no) -// instrumentation. Use the InstrumentMetricHandler function to apply the same -// kind of instrumentation as it is used by the Handler function. -func HandlerFor(reg Gatherer, opts HandlerOpts) http.Handler { - return promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) -} - -// HandlerWithReset return an http.Handler with Reset -func HandlerWithReset(reg KubeRegistry, opts HandlerOpts) http.Handler { - defaultHandler := promhttp.HandlerFor(reg, opts.toPromhttpHandlerOpts()) - return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if r.Method == http.MethodDelete { - reg.Reset() - io.WriteString(w, "metrics reset\n") - return - } - defaultHandler.ServeHTTP(w, r) - }) -} diff --git a/vendor/k8s.io/component-base/metrics/internal/nativehistograms.go b/vendor/k8s.io/component-base/metrics/internal/nativehistograms.go deleted file mode 100644 index c7d1769f2..000000000 --- a/vendor/k8s.io/component-base/metrics/internal/nativehistograms.go +++ /dev/null @@ -1,57 +0,0 @@ -/* -Copyright 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 internal holds shared state for the metrics package that must not be -// directly accessible by external callers. -package internal - -import "sync/atomic" - -var nativeHistogramsEnabled atomic.Bool - -// NativeHistogramOptions holds the bucket configuration options for native histograms. -type NativeHistogramOptions struct { - BucketFactor float64 - MaxBucketNumber uint32 -} - -// defaultNativeHistogramOptions are the defaults applied to all histogram metrics -// when native histograms are enabled. -var defaultNativeHistogramOptions = NativeHistogramOptions{ - // BucketFactor is the growth factor for native histogram buckets. - // A value of 1.1 means each bucket is at most 10% wider than the previous one. - BucketFactor: 1.1, - // MaxBucketNumber is the maximum number of buckets per native histogram. - // Based on the OTel SDK recommendation for base2 exponential bucket histogram aggregation. - MaxBucketNumber: 160, -} - -// SetNativeHistogramsEnabled records whether native histograms are enabled. -// This should be called exactly once during component initialisation, driven -// by the NativeHistograms feature gate. -func SetNativeHistogramsEnabled(enabled bool) { - nativeHistogramsEnabled.Store(enabled) -} - -// NativeHistogramsEnabled reports whether native histograms are currently enabled. -func NativeHistogramsEnabled() bool { - return nativeHistogramsEnabled.Load() -} - -// NativeHistogramConfig returns the default bucket configuration for native histograms. -func NativeHistogramConfig() NativeHistogramOptions { - return defaultNativeHistogramOptions -} diff --git a/vendor/k8s.io/component-base/metrics/labels.go b/vendor/k8s.io/component-base/metrics/labels.go deleted file mode 100644 index 11af3ae42..000000000 --- a/vendor/k8s.io/component-base/metrics/labels.go +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2019 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 metrics - -import "github.com/prometheus/client_golang/prometheus" - -// Labels represents a collection of label name -> value mappings. -type Labels prometheus.Labels diff --git a/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go b/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go deleted file mode 100644 index c8c0bc08f..000000000 --- a/vendor/k8s.io/component-base/metrics/legacyregistry/registry.go +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2019 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 legacyregistry - -import ( - "net/http" - "time" - - "github.com/prometheus/client_golang/prometheus" - "github.com/prometheus/client_golang/prometheus/collectors" - "github.com/prometheus/client_golang/prometheus/promhttp" - - "k8s.io/component-base/metrics" -) - -var ( - defaultRegistry = metrics.NewKubeRegistry() - // DefaultGatherer exposes the global registry gatherer - DefaultGatherer metrics.Gatherer = defaultRegistry - // Reset calls reset on the global registry - Reset = defaultRegistry.Reset - // MustRegister registers registerable metrics but uses the global registry. - MustRegister = defaultRegistry.MustRegister - // RawMustRegister registers prometheus collectors but uses the global registry, this - // bypasses the metric stability framework - // - // Deprecated - RawMustRegister = defaultRegistry.RawMustRegister - - // Register registers a collectable metric but uses the global registry - Register = defaultRegistry.Register - - // Registerer exposes the global registerer - Registerer = defaultRegistry.Registerer - - processStart time.Time -) - -func init() { - RawMustRegister(collectors.NewProcessCollector(collectors.ProcessCollectorOpts{})) - RawMustRegister(collectors.NewGoCollector(collectors.WithGoCollectorRuntimeMetrics(collectors.MetricsAll))) - defaultRegistry.RegisterMetaMetrics() - processStart = time.Now() -} - -// Handler returns an HTTP handler for the DefaultGatherer. It is -// already instrumented with InstrumentHandler (using "prometheus" as handler -// name). -func Handler() http.Handler { - return promhttp.InstrumentMetricHandler(prometheus.DefaultRegisterer, promhttp.HandlerFor(defaultRegistry, promhttp.HandlerOpts{ProcessStartTime: processStart})) -} - -// HandlerWithReset returns an HTTP handler for the DefaultGatherer but invokes -// registry reset if the http method is DELETE. -func HandlerWithReset() http.Handler { - return promhttp.InstrumentMetricHandler( - prometheus.DefaultRegisterer, - metrics.HandlerWithReset(defaultRegistry, metrics.HandlerOpts{ProcessStartTime: processStart})) -} - -// CustomRegister registers a custom collector but uses the global registry. -func CustomRegister(c metrics.StableCollector) error { - err := defaultRegistry.CustomRegister(c) - - //TODO(RainbowMango): Maybe we can wrap this error by error wrapping.(Golang 1.13) - _ = prometheus.Register(c) - - return err -} - -// CustomMustRegister registers custom collectors but uses the global registry. -func CustomMustRegister(cs ...metrics.StableCollector) { - defaultRegistry.CustomMustRegister(cs...) - - for _, c := range cs { - prometheus.MustRegister(c) - } -} - -// GetProcessStart return processStart value -func GetProcessStart() time.Time { - return processStart -} diff --git a/vendor/k8s.io/component-base/metrics/metric.go b/vendor/k8s.io/component-base/metrics/metric.go deleted file mode 100644 index 1d05044b5..000000000 --- a/vendor/k8s.io/component-base/metrics/metric.go +++ /dev/null @@ -1,234 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "sync" - "sync/atomic" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" - - promext "k8s.io/component-base/metrics/prometheusextension" - "k8s.io/klog/v2" -) - -/* -kubeCollector extends the prometheus.Collector interface to allow customization of the metric -registration process. Defer metric initialization until Create() is called, which then -delegates to the underlying metric's initializeMetric or initializeDeprecatedMetric -method call depending on whether the metric is deprecated or not. -*/ -type kubeCollector interface { - Collector - lazyKubeMetric - DeprecatedVersion() *semver.Version - // Each collector metric should provide an initialization function - // for both deprecated and non-deprecated variants of a metric. This - // is necessary since metric instantiation will be deferred - // until the metric is actually registered somewhere. - initializeMetric() - initializeDeprecatedMetric() -} - -/* -lazyKubeMetric defines our metric registration interface. lazyKubeMetric objects are expected -to lazily instantiate metrics (i.e defer metric instantiation until when -the Create() function is explicitly called). -*/ -type lazyKubeMetric interface { - Create(*semver.Version) bool - IsCreated() bool - IsHidden() bool - IsDeprecated() bool -} - -/* -lazyMetric implements lazyKubeMetric. A lazy metric is lazy because it waits until metric -registration time before instantiation. Add it as an anonymous field to a struct that -implements kubeCollector to get deferred registration behavior. You must call lazyInit -with the kubeCollector itself as an argument. -*/ -type lazyMetric struct { - fqName string - isDeprecated atomic.Bool - isHidden atomic.Bool - isCreated bool - createLock sync.RWMutex - markDeprecationOnce sync.Once - createOnce sync.Once - self kubeCollector - stabilityLevel StabilityLevel -} - -func (r *lazyMetric) IsCreated() bool { - r.createLock.RLock() - defer r.createLock.RUnlock() - return r.isCreated -} - -// lazyInit provides the lazyMetric with a reference to the kubeCollector it is supposed -// to allow lazy initialization for. It should be invoked in the factory function which creates new -// kubeCollector type objects. -func (r *lazyMetric) lazyInit(self kubeCollector, fqName string) { - r.fqName = fqName - r.self = self -} - -// preprocessMetric figures out whether the lazy metric should be hidden or not. -// This method takes a Version argument which should be the version of the binary in which -// this code is currently being executed. A metric can be hidden under two conditions: -// 1. if the metric is deprecated and is outside the grace period (i.e. has been -// deprecated for more than one release -// 2. if the metric is manually disabled via a CLI flag. -// -// Disclaimer: disabling a metric via a CLI flag has higher precedence than -// deprecation and will override show-hidden-metrics for the explicitly -// disabled metric. -func (r *lazyMetric) preprocessMetric(currentVersion semver.Version) { - disabledMetricsLock.RLock() - defer disabledMetricsLock.RUnlock() - // disabling metrics is higher in precedence than showing hidden metrics - if _, ok := disabledMetrics[r.fqName]; ok { - r.isHidden.Store(true) - return - } - deprecatedVersion := r.self.DeprecatedVersion() - if deprecatedVersion == nil { - return - } - r.markDeprecationOnce.Do(func() { - r.isDeprecated.Store(isDeprecated(currentVersion, *deprecatedVersion)) - - if shouldHide(r.stabilityLevel, ¤tVersion, deprecatedVersion) { - if ShouldShowHidden() { - klog.Warningf("Hidden metrics (%s) have been manually overridden, showing this very deprecated metric.", r.fqName) - return - } - // TODO(RainbowMango): Remove this log temporarily. https://github.com/kubernetes/kubernetes/issues/85369 - // klog.Warningf("This metric has been deprecated for more than one release, hiding.") - r.isHidden.Store(true) - } - }) -} - -func (r *lazyMetric) IsHidden() bool { - return r.isHidden.Load() -} - -func (r *lazyMetric) IsDeprecated() bool { - return r.isDeprecated.Load() -} - -// Create forces the initialization of metric which has been deferred until -// the point at which this method is invoked. This method will determine whether -// the metric is deprecated or hidden, no-opting if the metric should be considered -// hidden. Furthermore, this function no-opts and returns true if metric is already -// created. -func (r *lazyMetric) Create(version *semver.Version) bool { - if version != nil { - r.preprocessMetric(*version) - } - // let's not create if this metric is slated to be hidden - if r.IsHidden() { - return false - } - - r.createOnce.Do(func() { - r.createLock.Lock() - defer r.createLock.Unlock() - r.isCreated = true - if r.IsDeprecated() { - r.self.initializeDeprecatedMetric() - } else { - r.self.initializeMetric() - } - }) - sl := r.stabilityLevel - deprecatedV := r.self.DeprecatedVersion() - dv := "" - if deprecatedV != nil { - dv = deprecatedV.String() - } - registeredMetricsTotal.WithLabelValues(string(sl), dv).Inc() - return r.IsCreated() -} - -// ClearState will clear all the states marked by Create. -// It intends to be used for re-register a hidden metric. -func (r *lazyMetric) ClearState() { - r.createLock.Lock() - defer r.createLock.Unlock() - - r.isDeprecated.Store(false) - r.isHidden.Store(false) - r.isCreated = false - r.markDeprecationOnce = sync.Once{} - r.createOnce = sync.Once{} -} - -// FQName returns the fully-qualified metric name of the collector. -func (r *lazyMetric) FQName() string { - return r.fqName -} - -/* -This code is directly lifted from the prometheus codebase. It's a convenience struct which -allows you to satisfy the Collector interface automatically if you already satisfy the Metric interface. - -For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/collector.go#L98-L120 -*/ -type selfCollector struct { - metric prometheus.Metric -} - -func (c *selfCollector) initSelfCollection(m prometheus.Metric) { - c.metric = m -} - -func (c *selfCollector) Describe(ch chan<- *prometheus.Desc) { - ch <- c.metric.Desc() -} - -func (c *selfCollector) Collect(ch chan<- prometheus.Metric) { - ch <- c.metric -} - -// no-op vecs for convenience -var noopCounterVec = &prometheus.CounterVec{} -var noopHistogramVec = &prometheus.HistogramVec{} -var noopTimingHistogramVec = &promext.TimingHistogramVec{} -var noopGaugeVec = &prometheus.GaugeVec{} - -// just use a convenience struct for all the no-ops -var noop = &noopMetric{} - -type noopMetric struct{} - -func (noopMetric) Inc() {} -func (noopMetric) Add(float64) {} -func (noopMetric) Dec() {} -func (noopMetric) Set(float64) {} -func (noopMetric) Sub(float64) {} -func (noopMetric) Observe(float64) {} -func (noopMetric) ObserveWithWeight(float64, uint64) {} -func (noopMetric) SetToCurrentTime() {} -func (noopMetric) Desc() *prometheus.Desc { return nil } -func (noopMetric) Write(*dto.Metric) error { return nil } -func (noopMetric) Describe(chan<- *prometheus.Desc) {} -func (noopMetric) Collect(chan<- prometheus.Metric) {} diff --git a/vendor/k8s.io/component-base/metrics/options.go b/vendor/k8s.io/component-base/metrics/options.go deleted file mode 100644 index 4e842d6c0..000000000 --- a/vendor/k8s.io/component-base/metrics/options.go +++ /dev/null @@ -1,275 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "os" - "path/filepath" - "strings" - "sync" - "sync/atomic" - - "github.com/spf13/pflag" - "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apimachinery/pkg/util/validation/field" - "k8s.io/component-base/version" - "k8s.io/klog/v2" - - "go.yaml.in/yaml/v2" - v1 "k8s.io/component-base/metrics/api/v1" -) - -var ( - disabledMetricsLock sync.RWMutex - disabledMetrics = map[string]struct{}{} - showHiddenOnce sync.Once - showHidden atomic.Bool -) - -var ( - disabledMetricsTotal = NewCounter( - &CounterOpts{ - Name: "disabled_metrics_total", - Help: "The count of disabled metrics.", - StabilityLevel: BETA, - }, - ) - - hiddenMetricsTotal = NewCounter( - &CounterOpts{ - Name: "hidden_metrics_total", - Help: "The count of hidden metrics.", - StabilityLevel: BETA, - }, - ) - - cardinalityEnforcementUnexpectedCategorizationsTotal = NewCounter( - &CounterOpts{ - Name: "cardinality_enforcement_unexpected_categorizations_total", - Help: "The count of unexpected categorizations during cardinality enforcement.", - StabilityLevel: ALPHA, - }, - ) -) - -// Options has all parameters needed for exposing metrics from components -type Options struct { - // Configuration serialization is omitted here since the parent is never expected to be embedded. - v1.MetricsConfiguration `json:"-"` -} - -// NewOptions returns default metrics options -func NewOptions() *Options { - return &Options{} -} - -// AddFlags adds flags for exposing component metrics. -// This won't be called in embedded instances within component configurations. -func (o *Options) AddFlags(fs *pflag.FlagSet) { - if o == nil { - return - } - fs.StringVar(&o.ShowHiddenMetricsForVersion, "show-hidden-metrics-for-version", o.ShowHiddenMetricsForVersion, - "The previous version for which you want to show hidden metrics. "+ - "Only the previous minor version is meaningful, other values will not be allowed. "+ - "The format is ., e.g.: '1.16'. "+ - "The purpose of this format is make sure you have the opportunity to notice if the next release hides additional metrics, "+ - "rather than being surprised when they are permanently removed in the release after that.") - fs.StringSliceVar(&o.DisabledMetrics, - "disabled-metrics", - o.DisabledMetrics, - "This flag provides an escape hatch for misbehaving metrics. "+ - "You must provide the fully qualified metric name in order to disable it. "+ - "Disclaimer: disabling metrics is higher in precedence than showing hidden metrics.") - fs.StringToStringVar(&o.AllowListMapping, "allow-metric-labels", o.AllowListMapping, - "The map from metric-label to value allow-list of this label. The key's format is ,. "+ - "The value's format is ,..."+ - "e.g. metric1,label1='v1,v2,v3', metric1,label2='v1,v2,v3' metric2,label1='v1,v2,v3'.") - fs.StringVar(&o.AllowListMappingManifest, "allow-metric-labels-manifest", o.AllowListMappingManifest, - "The path to the manifest file that contains the allow-list mapping. "+ - "The format of the file is the same as the flag --allow-metric-labels, i.e., \n"+ - "allowListMapping:\n \"metric1,label1\": \"value11,value12\"\n \"metric2,label2\": \"\"\n"+ - "Note that the flag --allow-metric-labels will override the manifest file.") -} - -// SetShowHidden will enable showing hidden metrics. This will no-opt -// after the initial call -func SetShowHidden() { - showHiddenOnce.Do(func() { - showHidden.Store(true) - - // re-register collectors that has been hidden in phase of last registry. - for _, r := range registries { - r.enableHiddenCollectors() - r.enableHiddenStableCollectors() - } - }) -} - -// ShouldShowHidden returns whether showing hidden deprecated metrics is enabled. -// While the primary use case for this is internal (to determine registration behavior) this can also be used to introspect. -func ShouldShowHidden() bool { - return showHidden.Load() -} - -// SetDisabledMetric will disable a metric by name. -// This will also increment the disabled metrics counter. -// Note that this is a no-op if the metric is already disabled. -func SetDisabledMetrics(names []string) { - for _, name := range names { - func(name string) { - // An empty metric name is not a valid Prometheus metric. - if name == "" { - klog.Warningf("Attempted to disable an empty metric name, ignoring.") - return - } - disabledMetricsLock.Lock() - defer disabledMetricsLock.Unlock() - if _, ok := disabledMetrics[name]; !ok { - disabledMetrics[name] = struct{}{} - disabledMetricsTotal.Inc() - } - }(name) - } -} - -type MetricLabelAllowList struct { - labelToAllowList map[string]sets.Set[string] -} - -func (allowList *MetricLabelAllowList) ConstrainToAllowedList(labelNameList, labelValueList []string) { - for index, value := range labelValueList { - name := labelNameList[index] - if allowValues, ok := allowList.labelToAllowList[name]; ok { - if !allowValues.Has(value) { - labelValueList[index] = "unexpected" - cardinalityEnforcementUnexpectedCategorizationsTotal.Inc() - } - } - } -} - -func (allowList *MetricLabelAllowList) ConstrainLabelMap(labels map[string]string) { - for name, value := range labels { - if allowValues, ok := allowList.labelToAllowList[name]; ok { - if !allowValues.Has(value) { - labels[name] = "unexpected" - cardinalityEnforcementUnexpectedCategorizationsTotal.Inc() - } - } - } -} - -func SetLabelAllowList(allowListMapping map[string]string) { - if len(allowListMapping) == 0 { - klog.Errorf("empty allow-list mapping supplied, ignoring.") - return - } - - allowListLock.Lock() - defer allowListLock.Unlock() - for metricLabelName, labelValues := range allowListMapping { - metricName := strings.Split(metricLabelName, ",")[0] - labelName := strings.Split(metricLabelName, ",")[1] - valueSet := sets.New[string](strings.Split(labelValues, ",")...) - - allowList, ok := labelValueAllowLists[metricName] - if ok { - allowList.labelToAllowList[labelName] = valueSet - } else { - labelToAllowList := make(map[string]sets.Set[string]) - labelToAllowList[labelName] = valueSet - labelValueAllowLists[metricName] = &MetricLabelAllowList{ - labelToAllowList, - } - } - } -} - -func SetLabelAllowListFromManifest(manifest string) { - if manifest == "" { - klog.Errorf("The manifest file is empty, ignoring.") - return - } - - data, err := os.ReadFile(filepath.Clean(manifest)) - if err != nil { - klog.Errorf("Failed to read allow list manifest: %v", err) - return - } - allowListMapping := make(map[string]string) - err = yaml.Unmarshal(data, &allowListMapping) - if err != nil { - klog.Errorf("Failed to parse allow list manifest: %v", err) - return - } - SetLabelAllowList(allowListMapping) -} - -// Apply applies a MetricsConfiguration into global configuration of metrics. -func Apply(c *v1.MetricsConfiguration) { - if c == nil { - return - } - - if len(c.ShowHiddenMetricsForVersion) > 0 { - SetShowHidden() - } - SetDisabledMetrics(c.DisabledMetrics) - if c.AllowListMapping != nil { - SetLabelAllowList(c.AllowListMapping) - } else { - SetLabelAllowListFromManifest(c.AllowListMappingManifest) - } -} - -// Apply applies parameters into global configuration of metrics. -func (o *Options) Apply() { - if o == nil { - return - } - - Apply(&o.MetricsConfiguration) -} - -// ValidateShowHiddenMetricsVersion checks invalid version for which show hidden metrics. -// TODO: This is kept here for backward compatibility in Kubelet (as metrics configuration fields were exposed on an individual basis earlier). -// TODO: Revisit this after Kubelet supports the new metrics configuration API. -func ValidateShowHiddenMetricsVersion(v string) []error { - err := v1.ValidateShowHiddenMetricsVersionForKubeletBackwardCompatOnly(parseVersion(version.Get()), v) - if err != nil { - return []error{err} - } - - return nil -} - -// Validate validates metrics flags options. -func (o *Options) Validate() []error { - if o == nil { - return nil - } - currentVersion := parseVersion(version.Get()) - fldPath := field.NewPath("metrics") - fldErrs := v1.Validate(&o.MetricsConfiguration, currentVersion, fldPath) - - if len(fldErrs) == 0 { - return nil - } - - return fldErrs.ToAggregate().Errors() -} diff --git a/vendor/k8s.io/component-base/metrics/opts.go b/vendor/k8s.io/component-base/metrics/opts.go deleted file mode 100644 index 59beb2368..000000000 --- a/vendor/k8s.io/component-base/metrics/opts.go +++ /dev/null @@ -1,332 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "fmt" - "sync" - "time" - - "github.com/prometheus/client_golang/prometheus" - - internalmetrics "k8s.io/component-base/metrics/internal" - promext "k8s.io/component-base/metrics/prometheusextension" -) - -var ( - labelValueAllowLists = map[string]*MetricLabelAllowList{} - allowListLock sync.RWMutex -) - -// ResetLabelValueAllowLists resets the allow lists for label values. -// NOTE: This should only be used in test. -func ResetLabelValueAllowLists() { - allowListLock.Lock() - defer allowListLock.Unlock() - labelValueAllowLists = map[string]*MetricLabelAllowList{} -} - -// KubeOpts is superset struct for prometheus.Opts. The prometheus Opts structure -// is purposefully not embedded here because that would change struct initialization -// in the manner which people are currently accustomed. -// -// Name must be set to a non-empty string. DeprecatedVersion is defined only -// if the metric for which this options applies is, in fact, deprecated. -type KubeOpts struct { - Namespace string - Subsystem string - Name string - Help string - ConstLabels map[string]string - DeprecatedVersion string - deprecateOnce sync.Once - annotateOnce sync.Once - StabilityLevel StabilityLevel - initializeLabelAllowListsOnce sync.Once - LabelValueAllowLists *MetricLabelAllowList -} - -// BuildFQName joins the given three name components by "_". Empty name -// components are ignored. If the name parameter itself is empty, an empty -// string is returned, no matter what. Metric implementations included in this -// library use this function internally to generate the fully-qualified metric -// name from the name component in their Opts. Users of the library will only -// need this function if they implement their own Metric or instantiate a Desc -// (with NewDesc) directly. -func BuildFQName(namespace, subsystem, name string) string { - return prometheus.BuildFQName(namespace, subsystem, name) -} - -// StabilityLevel represents the API guarantees for a given defined metric. -type StabilityLevel string - -const ( - // INTERNAL metrics have no stability guarantees, as such, labels may - // be arbitrarily added/removed and the metric may be deleted at any time. - INTERNAL StabilityLevel = "INTERNAL" - // ALPHA metrics have no stability guarantees, as such, labels may - // be arbitrarily added/removed and the metric may be deleted at any time. - ALPHA StabilityLevel = "ALPHA" - // BETA metrics are governed by the deprecation policy outlined in by - // the control plane metrics stability KEP. - BETA StabilityLevel = "BETA" - // STABLE metrics are guaranteed not be mutated and removal is governed by - // the deprecation policy outlined in by the control plane metrics stability KEP. - STABLE StabilityLevel = "STABLE" -) - -// setDefaults takes 'ALPHA' in case of empty. -func (sl *StabilityLevel) setDefaults() { - switch *sl { - case "": - *sl = ALPHA - default: - // no-op, since we have a StabilityLevel already - } -} - -// CounterOpts is an alias for Opts. See there for doc comments. -type CounterOpts KubeOpts - -// Modify help description on the metric description. -func (o *CounterOpts) markDeprecated() { - o.deprecateOnce.Do(func() { - o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) - }) -} - -// annotateStabilityLevel annotates help description on the metric description with the stability level -// of the metric -func (o *CounterOpts) annotateStabilityLevel() { - o.annotateOnce.Do(func() { - o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) - }) -} - -// convenience function to allow easy transformation to the prometheus -// counterpart. This will do more once we have a proper label abstraction -func (o *CounterOpts) toPromCounterOpts() prometheus.CounterOpts { - return prometheus.CounterOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - } -} - -// GaugeOpts is an alias for Opts. See there for doc comments. -type GaugeOpts KubeOpts - -// Modify help description on the metric description. -func (o *GaugeOpts) markDeprecated() { - o.deprecateOnce.Do(func() { - o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) - }) -} - -// annotateStabilityLevel annotates help description on the metric description with the stability level -// of the metric -func (o *GaugeOpts) annotateStabilityLevel() { - o.annotateOnce.Do(func() { - o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) - }) -} - -// convenience function to allow easy transformation to the prometheus -// counterpart. This will do more once we have a proper label abstraction -func (o *GaugeOpts) toPromGaugeOpts() prometheus.GaugeOpts { - return prometheus.GaugeOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - } -} - -// HistogramOpts bundles the options for creating a Histogram metric. It is -// mandatory to set Name to a non-empty string. All other fields are optional -// and can safely be left at their zero value, although it is strongly -// encouraged to set a Help string. -type HistogramOpts struct { - Namespace string - Subsystem string - Name string - Help string - ConstLabels map[string]string - Buckets []float64 - DeprecatedVersion string - deprecateOnce sync.Once - annotateOnce sync.Once - StabilityLevel StabilityLevel - initializeLabelAllowListsOnce sync.Once - LabelValueAllowLists *MetricLabelAllowList -} - -// Modify help description on the metric description. -func (o *HistogramOpts) markDeprecated() { - o.deprecateOnce.Do(func() { - o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) - }) -} - -// annotateStabilityLevel annotates help description on the metric description with the stability level -// of the metric -func (o *HistogramOpts) annotateStabilityLevel() { - o.annotateOnce.Do(func() { - o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) - }) -} - -// convenience function to allow easy transformation to the prometheus -// counterpart. This will do more once we have a proper label abstraction -func (o *HistogramOpts) toPromHistogramOpts() prometheus.HistogramOpts { - opts := prometheus.HistogramOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - Buckets: o.Buckets, - } - - // When native histograms are enabled, configure exponential bucket options - // to expose metrics in both classic and native histogram formats. - if internalmetrics.NativeHistogramsEnabled() { - nativeOpts := internalmetrics.NativeHistogramConfig() - opts.NativeHistogramBucketFactor = nativeOpts.BucketFactor - opts.NativeHistogramMaxBucketNumber = nativeOpts.MaxBucketNumber - } - - return opts -} - -// TimingHistogramOpts bundles the options for creating a TimingHistogram metric. It is -// mandatory to set Name to a non-empty string. All other fields are optional -// and can safely be left at their zero value, although it is strongly -// encouraged to set a Help string. -type TimingHistogramOpts struct { - Namespace string - Subsystem string - Name string - Help string - ConstLabels map[string]string - Buckets []float64 - InitialValue float64 - DeprecatedVersion string - deprecateOnce sync.Once - annotateOnce sync.Once - StabilityLevel StabilityLevel - initializeLabelAllowListsOnce sync.Once - LabelValueAllowLists *MetricLabelAllowList -} - -// Modify help description on the metric description. -func (o *TimingHistogramOpts) markDeprecated() { - o.deprecateOnce.Do(func() { - o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) - }) -} - -// annotateStabilityLevel annotates help description on the metric description with the stability level -// of the metric -func (o *TimingHistogramOpts) annotateStabilityLevel() { - o.annotateOnce.Do(func() { - o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) - }) -} - -// convenience function to allow easy transformation to the prometheus -// counterpart. This will do more once we have a proper label abstraction -func (o *TimingHistogramOpts) toPromHistogramOpts() promext.TimingHistogramOpts { - return promext.TimingHistogramOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - Buckets: o.Buckets, - InitialValue: o.InitialValue, - } -} - -// SummaryOpts bundles the options for creating a Summary metric. It is -// mandatory to set Name to a non-empty string. While all other fields are -// optional and can safely be left at their zero value, it is recommended to set -// a help string and to explicitly set the Objectives field to the desired value -// as the default value will change in the upcoming v0.10 of the library. -type SummaryOpts struct { - Namespace string - Subsystem string - Name string - Help string - ConstLabels map[string]string - Objectives map[float64]float64 - MaxAge time.Duration - AgeBuckets uint32 - BufCap uint32 - DeprecatedVersion string - deprecateOnce sync.Once - annotateOnce sync.Once - StabilityLevel StabilityLevel - initializeLabelAllowListsOnce sync.Once - LabelValueAllowLists *MetricLabelAllowList -} - -// Modify help description on the metric description. -func (o *SummaryOpts) markDeprecated() { - o.deprecateOnce.Do(func() { - o.Help = fmt.Sprintf("(Deprecated since %v) %v", o.DeprecatedVersion, o.Help) - }) -} - -// annotateStabilityLevel annotates help description on the metric description with the stability level -// of the metric -func (o *SummaryOpts) annotateStabilityLevel() { - o.annotateOnce.Do(func() { - o.Help = fmt.Sprintf("[%v] %v", o.StabilityLevel, o.Help) - }) -} - -// Deprecated: DefObjectives will not be used as the default objectives in -// v1.0.0 of the library. The default Summary will have no quantiles then. -var ( - defObjectives = map[float64]float64{0.5: 0.05, 0.9: 0.01, 0.99: 0.001} -) - -// convenience function to allow easy transformation to the prometheus -// counterpart. This will do more once we have a proper label abstraction -func (o *SummaryOpts) toPromSummaryOpts() prometheus.SummaryOpts { - // we need to retain existing quantile behavior for backwards compatibility, - // so let's do what prometheus used to do prior to v1. - objectives := o.Objectives - if objectives == nil { - objectives = defObjectives - } - return prometheus.SummaryOpts{ - Namespace: o.Namespace, - Subsystem: o.Subsystem, - Name: o.Name, - Help: o.Help, - ConstLabels: o.ConstLabels, - Objectives: objectives, - MaxAge: o.MaxAge, - AgeBuckets: o.AgeBuckets, - BufCap: o.BufCap, - } -} diff --git a/vendor/k8s.io/component-base/metrics/processstarttime.go b/vendor/k8s.io/component-base/metrics/processstarttime.go deleted file mode 100644 index f4b98f8eb..000000000 --- a/vendor/k8s.io/component-base/metrics/processstarttime.go +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "time" - - "k8s.io/klog/v2" -) - -var processStartTime = NewGaugeVec( - &GaugeOpts{ - Name: "process_start_time_seconds", - Help: "Start time of the process since unix epoch in seconds.", - StabilityLevel: ALPHA, - }, - []string{}, -) - -// RegisterProcessStartTime registers the process_start_time_seconds to -// a prometheus registry. This metric needs to be included to ensure counter -// data fidelity. -func RegisterProcessStartTime(registrationFunc func(Registerable) error) error { - start, err := GetProcessStart() - if err != nil { - klog.Errorf("Could not get process start time, %v", err) - start = float64(time.Now().Unix()) - } - // processStartTime is a lazy metric which only get initialized after registered. - // so we need to register the metric first and then set the value for it - if err = registrationFunc(processStartTime); err != nil { - return err - } - - processStartTime.WithLabelValues().Set(start) - return nil -} diff --git a/vendor/k8s.io/component-base/metrics/processstarttime_others.go b/vendor/k8s.io/component-base/metrics/processstarttime_others.go deleted file mode 100644 index 5e9c86758..000000000 --- a/vendor/k8s.io/component-base/metrics/processstarttime_others.go +++ /dev/null @@ -1,38 +0,0 @@ -//go:build !windows - -/* -Copyright 2019 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 metrics - -import ( - "os" - - "github.com/prometheus/procfs" -) - -func GetProcessStart() (float64, error) { - pid := os.Getpid() - p, err := procfs.NewProc(pid) - if err != nil { - return 0, err - } - - if stat, err := p.Stat(); err == nil { - return stat.StartTime() - } - return 0, err -} diff --git a/vendor/k8s.io/component-base/metrics/processstarttime_windows.go b/vendor/k8s.io/component-base/metrics/processstarttime_windows.go deleted file mode 100644 index 9a38abd33..000000000 --- a/vendor/k8s.io/component-base/metrics/processstarttime_windows.go +++ /dev/null @@ -1,33 +0,0 @@ -//go:build windows - -/* -Copyright 2019 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 metrics - -import ( - "golang.org/x/sys/windows" -) - -func GetProcessStart() (float64, error) { - processHandle := windows.CurrentProcess() - - var creationTime, exitTime, kernelTime, userTime windows.Filetime - if err := windows.GetProcessTimes(processHandle, &creationTime, &exitTime, &kernelTime, &userTime); err != nil { - return 0, err - } - return float64(creationTime.Nanoseconds() / 1e9), nil -} diff --git a/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram.go b/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram.go deleted file mode 100644 index be07977e2..000000000 --- a/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram.go +++ /dev/null @@ -1,189 +0,0 @@ -/* -Copyright 2022 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 prometheusextension - -import ( - "errors" - "time" - - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -// GaugeOps is the part of `prometheus.Gauge` that is relevant to -// instrumented code. -// This factoring should be in prometheus, analogous to the way -// it already factors out the Observer interface for histograms and summaries. -type GaugeOps interface { - // Set is the same as Gauge.Set - Set(float64) - // Inc is the same as Gauge.inc - Inc() - // Dec is the same as Gauge.Dec - Dec() - // Add is the same as Gauge.Add - Add(float64) - // Sub is the same as Gauge.Sub - Sub(float64) - - // SetToCurrentTime the same as Gauge.SetToCurrentTime - SetToCurrentTime() -} - -// A TimingHistogram tracks how long a `float64` variable spends in -// ranges defined by buckets. Time is counted in nanoseconds. The -// histogram's sum is the integral over time (in nanoseconds, from -// creation of the histogram) of the variable's value. -type TimingHistogram interface { - prometheus.Metric - prometheus.Collector - GaugeOps -} - -// TimingHistogramOpts is the parameters of the TimingHistogram constructor -type TimingHistogramOpts struct { - Namespace string - Subsystem string - Name string - Help string - ConstLabels prometheus.Labels - - // Buckets defines the buckets into which observations are - // accumulated. Each element in the slice is the upper - // inclusive bound of a bucket. The values must be sorted in - // strictly increasing order. There is no need to add a - // highest bucket with +Inf bound. The default value is - // prometheus.DefBuckets. - Buckets []float64 - - // The initial value of the variable. - InitialValue float64 -} - -// NewTimingHistogram creates a new TimingHistogram -func NewTimingHistogram(opts TimingHistogramOpts) (TimingHistogram, error) { - return NewTestableTimingHistogram(time.Now, opts) -} - -// NewTestableTimingHistogram creates a TimingHistogram that uses a mockable clock -func NewTestableTimingHistogram(nowFunc func() time.Time, opts TimingHistogramOpts) (TimingHistogram, error) { - desc := prometheus.NewDesc( - prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - wrapTimingHelp(opts.Help), - nil, - opts.ConstLabels, - ) - return newTimingHistogram(nowFunc, desc, opts) -} - -func wrapTimingHelp(given string) string { - return "EXPERIMENTAL: " + given -} - -func newTimingHistogram(nowFunc func() time.Time, desc *prometheus.Desc, opts TimingHistogramOpts, variableLabelValues ...string) (TimingHistogram, error) { - allLabelsM := prometheus.Labels{} - allLabelsS := prometheus.MakeLabelPairs(desc, variableLabelValues) - for _, pair := range allLabelsS { - if pair == nil || pair.Name == nil || pair.Value == nil { - return nil, errors.New("prometheus.MakeLabelPairs returned a nil") - } - allLabelsM[*pair.Name] = *pair.Value - } - weighted, err := newWeightedHistogram(desc, WeightedHistogramOpts{ - Namespace: opts.Namespace, - Subsystem: opts.Subsystem, - Name: opts.Name, - Help: opts.Help, - ConstLabels: allLabelsM, - Buckets: opts.Buckets, - }, variableLabelValues...) - if err != nil { - return nil, err - } - return &timingHistogram{ - nowFunc: nowFunc, - weighted: weighted, - lastSetTime: nowFunc(), - value: opts.InitialValue, - }, nil -} - -type timingHistogram struct { - nowFunc func() time.Time - weighted *weightedHistogram - - // The following fields must only be accessed with weighted's lock held - - lastSetTime time.Time // identifies when value was last set - value float64 -} - -var _ TimingHistogram = &timingHistogram{} - -func (th *timingHistogram) Set(newValue float64) { - th.update(func(float64) float64 { return newValue }) -} - -func (th *timingHistogram) Inc() { - th.update(func(oldValue float64) float64 { return oldValue + 1 }) -} - -func (th *timingHistogram) Dec() { - th.update(func(oldValue float64) float64 { return oldValue - 1 }) -} - -func (th *timingHistogram) Add(delta float64) { - th.update(func(oldValue float64) float64 { return oldValue + delta }) -} - -func (th *timingHistogram) Sub(delta float64) { - th.update(func(oldValue float64) float64 { return oldValue - delta }) -} - -func (th *timingHistogram) SetToCurrentTime() { - th.update(func(oldValue float64) float64 { return th.nowFunc().Sub(time.Unix(0, 0)).Seconds() }) -} - -func (th *timingHistogram) update(updateFn func(float64) float64) { - th.weighted.lock.Lock() - defer th.weighted.lock.Unlock() - now := th.nowFunc() - delta := now.Sub(th.lastSetTime) - value := th.value - if delta > 0 { - th.weighted.observeWithWeightLocked(value, uint64(delta)) - th.lastSetTime = now - } - th.value = updateFn(value) -} - -func (th *timingHistogram) Desc() *prometheus.Desc { - return th.weighted.Desc() -} - -func (th *timingHistogram) Write(dest *dto.Metric) error { - th.Add(0) // account for time since last update - return th.weighted.Write(dest) -} - -func (th *timingHistogram) Describe(ch chan<- *prometheus.Desc) { - ch <- th.weighted.Desc() -} - -func (th *timingHistogram) Collect(ch chan<- prometheus.Metric) { - ch <- th -} diff --git a/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram_vec.go b/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram_vec.go deleted file mode 100644 index 7af1a4586..000000000 --- a/vendor/k8s.io/component-base/metrics/prometheusextension/timing_histogram_vec.go +++ /dev/null @@ -1,111 +0,0 @@ -/* -Copyright 2022 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 prometheusextension - -import ( - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -// GaugeVecOps is a bunch of Gauge that have the same -// Desc and are distinguished by the values for their variable labels. -type GaugeVecOps interface { - GetMetricWith(prometheus.Labels) (GaugeOps, error) - GetMetricWithLabelValues(lvs ...string) (GaugeOps, error) - With(prometheus.Labels) GaugeOps - WithLabelValues(...string) GaugeOps - CurryWith(prometheus.Labels) (GaugeVecOps, error) - MustCurryWith(prometheus.Labels) GaugeVecOps -} - -type TimingHistogramVec struct { - *prometheus.MetricVec -} - -var _ GaugeVecOps = &TimingHistogramVec{} -var _ prometheus.Collector = &TimingHistogramVec{} - -func NewTimingHistogramVec(opts TimingHistogramOpts, labelNames ...string) *TimingHistogramVec { - return NewTestableTimingHistogramVec(time.Now, opts, labelNames...) -} - -func NewTestableTimingHistogramVec(nowFunc func() time.Time, opts TimingHistogramOpts, labelNames ...string) *TimingHistogramVec { - desc := prometheus.NewDesc( - prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - wrapTimingHelp(opts.Help), - labelNames, - opts.ConstLabels, - ) - return &TimingHistogramVec{ - MetricVec: prometheus.NewMetricVec(desc, func(lvs ...string) prometheus.Metric { - metric, err := newTimingHistogram(nowFunc, desc, opts, lvs...) - if err != nil { - panic(err) // like in prometheus.newHistogram - } - return metric - }), - } -} - -func (hv *TimingHistogramVec) GetMetricWith(labels prometheus.Labels) (GaugeOps, error) { - metric, err := hv.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(GaugeOps), err - } - return nil, err -} - -func (hv *TimingHistogramVec) GetMetricWithLabelValues(lvs ...string) (GaugeOps, error) { - metric, err := hv.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(GaugeOps), err - } - return nil, err -} - -func (hv *TimingHistogramVec) With(labels prometheus.Labels) GaugeOps { - h, err := hv.GetMetricWith(labels) - if err != nil { - panic(err) - } - return h -} - -func (hv *TimingHistogramVec) WithLabelValues(lvs ...string) GaugeOps { - h, err := hv.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return h -} - -func (hv *TimingHistogramVec) CurryWith(labels prometheus.Labels) (GaugeVecOps, error) { - vec, err := hv.MetricVec.CurryWith(labels) - if vec != nil { - return &TimingHistogramVec{MetricVec: vec}, err - } - return nil, err -} - -func (hv *TimingHistogramVec) MustCurryWith(labels prometheus.Labels) GaugeVecOps { - vec, err := hv.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} diff --git a/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram.go b/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram.go deleted file mode 100644 index a060019b2..000000000 --- a/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -Copyright 2022 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 prometheusextension - -import ( - "fmt" - "math" - "sort" - "sync" - - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -// WeightedHistogram generalizes Histogram: each observation has -// an associated _weight_. For a given `x` and `N`, -// `1` call on `ObserveWithWeight(x, N)` has the same meaning as -// `N` calls on `ObserveWithWeight(x, 1)`. -// The weighted sum might differ slightly due to the use of -// floating point, although the implementation takes some steps -// to mitigate that. -// If every weight were 1, -// this would be the same as the existing Histogram abstraction. -type WeightedHistogram interface { - prometheus.Metric - prometheus.Collector - WeightedObserver -} - -// WeightedObserver generalizes the Observer interface. -type WeightedObserver interface { - // Set the variable to the given value with the given weight. - ObserveWithWeight(value float64, weight uint64) -} - -// WeightedHistogramOpts is the same as for an ordinary Histogram -type WeightedHistogramOpts = prometheus.HistogramOpts - -// NewWeightedHistogram creates a new WeightedHistogram -func NewWeightedHistogram(opts WeightedHistogramOpts) (WeightedHistogram, error) { - desc := prometheus.NewDesc( - prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - wrapWeightedHelp(opts.Help), - nil, - opts.ConstLabels, - ) - return newWeightedHistogram(desc, opts) -} - -func wrapWeightedHelp(given string) string { - return "EXPERIMENTAL: " + given -} - -func newWeightedHistogram(desc *prometheus.Desc, opts WeightedHistogramOpts, variableLabelValues ...string) (*weightedHistogram, error) { - if len(opts.Buckets) == 0 { - opts.Buckets = prometheus.DefBuckets - } - - for i, upperBound := range opts.Buckets { - if i < len(opts.Buckets)-1 { - if upperBound >= opts.Buckets[i+1] { - return nil, fmt.Errorf( - "histogram buckets must be in increasing order: %f >= %f", - upperBound, opts.Buckets[i+1], - ) - } - } else { - if math.IsInf(upperBound, +1) { - // The +Inf bucket is implicit. Remove it here. - opts.Buckets = opts.Buckets[:i] - } - } - } - upperBounds := make([]float64, len(opts.Buckets)) - copy(upperBounds, opts.Buckets) - - return &weightedHistogram{ - desc: desc, - variableLabelValues: variableLabelValues, - upperBounds: upperBounds, - buckets: make([]uint64, len(upperBounds)+1), - hotCount: initialHotCount, - }, nil -} - -type weightedHistogram struct { - desc *prometheus.Desc - variableLabelValues []string - upperBounds []float64 // exclusive of +Inf - - lock sync.Mutex // applies to all the following - - // buckets is longer by one than upperBounds. - // For 0 <= idx < len(upperBounds), buckets[idx] holds the - // accumulated time.Duration that value has been <= - // upperBounds[idx] but not <= upperBounds[idx-1]. - // buckets[len(upperBounds)] holds the accumulated - // time.Duration when value fit in no other bucket. - buckets []uint64 - - // sumHot + sumCold is the weighted sum of value. - // Rather than risk loss of precision in one - // float64, we do this sum hierarchically. Many successive - // increments are added into sumHot; once in a while - // the magnitude of sumHot is compared to the magnitude - // of sumCold and, if the ratio is high enough, - // sumHot is transferred into sumCold. - sumHot float64 - sumCold float64 - - transferThreshold float64 // = math.Abs(sumCold) / 2^26 (that's about half of the bits of precision in a float64) - - // hotCount is used to decide when to consider dumping sumHot into sumCold. - // hotCount counts upward from initialHotCount to zero. - hotCount int -} - -// initialHotCount is the negative of the number of terms -// that are summed into sumHot before considering whether -// to transfer to sumCold. This only has to be big enough -// to make the extra floating point operations occur in a -// distinct minority of cases. -const initialHotCount = -15 - -var _ WeightedHistogram = &weightedHistogram{} -var _ prometheus.Metric = &weightedHistogram{} -var _ prometheus.Collector = &weightedHistogram{} - -func (sh *weightedHistogram) ObserveWithWeight(value float64, weight uint64) { - idx := sort.SearchFloat64s(sh.upperBounds, value) - sh.lock.Lock() - defer sh.lock.Unlock() - sh.updateLocked(idx, value, weight) -} - -func (sh *weightedHistogram) observeWithWeightLocked(value float64, weight uint64) { - idx := sort.SearchFloat64s(sh.upperBounds, value) - sh.updateLocked(idx, value, weight) -} - -func (sh *weightedHistogram) updateLocked(idx int, value float64, weight uint64) { - sh.buckets[idx] += weight - newSumHot := sh.sumHot + float64(weight)*value - sh.hotCount++ - if sh.hotCount >= 0 { - sh.hotCount = initialHotCount - if math.Abs(newSumHot) > sh.transferThreshold { - newSumCold := sh.sumCold + newSumHot - sh.sumCold = newSumCold - sh.transferThreshold = math.Abs(newSumCold / 67108864) - sh.sumHot = 0 - return - } - } - sh.sumHot = newSumHot -} - -func (sh *weightedHistogram) Desc() *prometheus.Desc { - return sh.desc -} - -func (sh *weightedHistogram) Write(dest *dto.Metric) error { - count, sum, buckets := func() (uint64, float64, map[float64]uint64) { - sh.lock.Lock() - defer sh.lock.Unlock() - nBounds := len(sh.upperBounds) - buckets := make(map[float64]uint64, nBounds) - var count uint64 - for idx, upperBound := range sh.upperBounds { - count += sh.buckets[idx] - buckets[upperBound] = count - } - count += sh.buckets[nBounds] - return count, sh.sumHot + sh.sumCold, buckets - }() - metric, err := prometheus.NewConstHistogram(sh.desc, count, sum, buckets, sh.variableLabelValues...) - if err != nil { - return err - } - return metric.Write(dest) -} - -func (sh *weightedHistogram) Describe(ch chan<- *prometheus.Desc) { - ch <- sh.desc -} - -func (sh *weightedHistogram) Collect(ch chan<- prometheus.Metric) { - ch <- sh -} diff --git a/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram_vec.go b/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram_vec.go deleted file mode 100644 index 2ca95f0a7..000000000 --- a/vendor/k8s.io/component-base/metrics/prometheusextension/weighted_histogram_vec.go +++ /dev/null @@ -1,106 +0,0 @@ -/* -Copyright 2022 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 prometheusextension - -import ( - "github.com/prometheus/client_golang/prometheus" -) - -// WeightedObserverVec is a bunch of WeightedObservers that have the same -// Desc and are distinguished by the values for their variable labels. -type WeightedObserverVec interface { - GetMetricWith(prometheus.Labels) (WeightedObserver, error) - GetMetricWithLabelValues(lvs ...string) (WeightedObserver, error) - With(prometheus.Labels) WeightedObserver - WithLabelValues(...string) WeightedObserver - CurryWith(prometheus.Labels) (WeightedObserverVec, error) - MustCurryWith(prometheus.Labels) WeightedObserverVec -} - -// WeightedHistogramVec implements WeightedObserverVec -type WeightedHistogramVec struct { - *prometheus.MetricVec -} - -var _ WeightedObserverVec = &WeightedHistogramVec{} -var _ prometheus.Collector = &WeightedHistogramVec{} - -func NewWeightedHistogramVec(opts WeightedHistogramOpts, labelNames ...string) *WeightedHistogramVec { - desc := prometheus.NewDesc( - prometheus.BuildFQName(opts.Namespace, opts.Subsystem, opts.Name), - wrapWeightedHelp(opts.Help), - labelNames, - opts.ConstLabels, - ) - return &WeightedHistogramVec{ - MetricVec: prometheus.NewMetricVec(desc, func(lvs ...string) prometheus.Metric { - metric, err := newWeightedHistogram(desc, opts, lvs...) - if err != nil { - panic(err) // like in prometheus.newHistogram - } - return metric - }), - } -} - -func (hv *WeightedHistogramVec) GetMetricWith(labels prometheus.Labels) (WeightedObserver, error) { - metric, err := hv.MetricVec.GetMetricWith(labels) - if metric != nil { - return metric.(WeightedObserver), err - } - return nil, err -} - -func (hv *WeightedHistogramVec) GetMetricWithLabelValues(lvs ...string) (WeightedObserver, error) { - metric, err := hv.MetricVec.GetMetricWithLabelValues(lvs...) - if metric != nil { - return metric.(WeightedObserver), err - } - return nil, err -} - -func (hv *WeightedHistogramVec) With(labels prometheus.Labels) WeightedObserver { - h, err := hv.GetMetricWith(labels) - if err != nil { - panic(err) - } - return h -} - -func (hv *WeightedHistogramVec) WithLabelValues(lvs ...string) WeightedObserver { - h, err := hv.GetMetricWithLabelValues(lvs...) - if err != nil { - panic(err) - } - return h -} - -func (hv *WeightedHistogramVec) CurryWith(labels prometheus.Labels) (WeightedObserverVec, error) { - vec, err := hv.MetricVec.CurryWith(labels) - if vec != nil { - return &WeightedHistogramVec{MetricVec: vec}, err - } - return nil, err -} - -func (hv *WeightedHistogramVec) MustCurryWith(labels prometheus.Labels) WeightedObserverVec { - vec, err := hv.CurryWith(labels) - if err != nil { - panic(err) - } - return vec -} diff --git a/vendor/k8s.io/component-base/metrics/registry.go b/vendor/k8s.io/component-base/metrics/registry.go deleted file mode 100644 index bccfd90f6..000000000 --- a/vendor/k8s.io/component-base/metrics/registry.go +++ /dev/null @@ -1,366 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "strings" - "sync" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" - - apimachineryversion "k8s.io/apimachinery/pkg/version" - "k8s.io/component-base/version" -) - -var ( - registries []*kubeRegistry // stores all registries created by NewKubeRegistry() - registriesLock sync.RWMutex - - registeredMetricsTotal = NewCounterVec( - &CounterOpts{ - Name: "registered_metrics_total", - Help: "The count of registered metrics broken by stability level and deprecation version.", - StabilityLevel: BETA, - }, - []string{"stability_level", "deprecated_version"}, - ) -) - -// shouldHide is used to check if a specific metric with deprecated version should be hidden -// according to metrics deprecation lifecycle. -func shouldHide(stabilityLevel StabilityLevel, currentVersion *semver.Version, deprecatedVersion *semver.Version) bool { - hiddenMinor := deprecatedVersion.Minor + deprecationPeriodMinorVersions(stabilityLevel) - - switch { - case deprecatedVersion.Major < currentVersion.Major: - return true - case deprecatedVersion.Major > currentVersion.Major: - return false - - // deprecatedVersion.Major == currentVersion.Major - case hiddenMinor < currentVersion.Minor: - return true - case hiddenMinor > currentVersion.Minor: - return false - - // deprecatedVersion.Minor == currentVersion.Minor - case strings.Contains(currentVersion.String(), "alpha.0"): - // Wait until we're past the alpha.0 period of a minor development cycle to hide metrics whose deprecation period ends in that minor version. - // See discussion in https://github.com/kubernetes/kubernetes/issues/133429#issuecomment-3165551443 - return false - default: - return true - } -} - -// getDeprecationReleaseWindow returns the number of minor releases a metric should be served -// after its deprecated version, based on its stability level. -func deprecationPeriodMinorVersions(stabilityLevel StabilityLevel) uint64 { - switch stabilityLevel { - case STABLE: - return 3 - case BETA: - return 1 - default: // ALPHA, INTERNAL - return 0 - } -} - -// isDeprecated returns true if the current version, ignoring pre-release tags, -// is greater than or equal to the deprecated version. -func isDeprecated(currentVersion, deprecatedVersion semver.Version) bool { - switch { - case currentVersion.Major < deprecatedVersion.Major: - return false - case currentVersion.Major > deprecatedVersion.Major: - return true - } - - // currentVersion.Major == deprecatedVersion.Major - return currentVersion.Minor >= deprecatedVersion.Minor -} - -// Registerable is an interface for a collector metric which we -// will register with KubeRegistry. -type Registerable interface { - prometheus.Collector - - // Create will mark deprecated state for the collector - Create(version *semver.Version) bool - - // ClearState will clear all the states marked by Create. - ClearState() - - // FQName returns the fully-qualified metric name of the collector. - FQName() string -} - -type resettable interface { - Reset() -} - -// KubeRegistry is an interface which implements a subset of prometheus.Registerer and -// prometheus.Gatherer interfaces -type KubeRegistry interface { - // Deprecated - RawMustRegister(...prometheus.Collector) - // CustomRegister is our internal variant of Prometheus registry.Register - CustomRegister(c StableCollector) error - // CustomMustRegister is our internal variant of Prometheus registry.MustRegister - CustomMustRegister(cs ...StableCollector) - // Register conforms to Prometheus registry.Register - Register(Registerable) error - // MustRegister conforms to Prometheus registry.MustRegister - MustRegister(...Registerable) - // Unregister conforms to Prometheus registry.Unregister - Unregister(collector Collector) bool - // Gather conforms to Prometheus gatherer.Gather - Gather() ([]*dto.MetricFamily, error) - // Reset invokes the Reset() function on all items in the registry - // which are added as resettables. - Reset() - // RegisterMetaMetrics registers metrics about the number of registered metrics. - RegisterMetaMetrics() - // Registerer exposes the underlying prometheus registerer - Registerer() prometheus.Registerer - // Gatherer exposes the underlying prometheus gatherer - Gatherer() prometheus.Gatherer -} - -// kubeRegistry is a wrapper around a prometheus registry-type object. Upon initialization -// the kubernetes binary version information is loaded into the registry object, so that -// automatic behavior can be configured for metric versioning. -type kubeRegistry struct { - PromRegistry - version semver.Version - hiddenCollectors map[string]Registerable // stores all collectors that has been hidden - stableCollectors []StableCollector // stores all stable collector - hiddenCollectorsLock sync.RWMutex - stableCollectorsLock sync.RWMutex - resetLock sync.RWMutex - resettables []resettable -} - -// Register registers a new Collector to be included in metrics -// collection. It returns an error if the descriptors provided by the -// Collector are invalid or if they — in combination with descriptors of -// already registered Collectors — do not fulfill the consistency and -// uniqueness criteria described in the documentation of metric.Desc. -func (kr *kubeRegistry) Register(c Registerable) error { - if c.Create(&kr.version) { - defer kr.addResettable(c) - return kr.PromRegistry.Register(c) - } - - kr.trackHiddenCollector(c) - return nil -} - -// Registerer exposes the underlying prometheus.Registerer -func (kr *kubeRegistry) Registerer() prometheus.Registerer { - return kr.PromRegistry -} - -// Gatherer exposes the underlying prometheus.Gatherer -func (kr *kubeRegistry) Gatherer() prometheus.Gatherer { - return kr.PromRegistry -} - -// MustRegister works like Register but registers any number of -// Collectors and panics upon the first registration that causes an -// error. -func (kr *kubeRegistry) MustRegister(cs ...Registerable) { - metrics := make([]prometheus.Collector, 0, len(cs)) - for _, c := range cs { - if c.Create(&kr.version) { - metrics = append(metrics, c) - kr.addResettable(c) - } else { - kr.trackHiddenCollector(c) - } - } - kr.PromRegistry.MustRegister(metrics...) -} - -// CustomRegister registers a new custom collector. -func (kr *kubeRegistry) CustomRegister(c StableCollector) error { - kr.trackStableCollectors(c) - defer kr.addResettable(c) - if c.Create(&kr.version, c) { - return kr.PromRegistry.Register(c) - } - return nil -} - -// CustomMustRegister works like CustomRegister but registers any number of -// StableCollectors and panics upon the first registration that causes an -// error. -func (kr *kubeRegistry) CustomMustRegister(cs ...StableCollector) { - kr.trackStableCollectors(cs...) - collectors := make([]prometheus.Collector, 0, len(cs)) - for _, c := range cs { - if c.Create(&kr.version, c) { - kr.addResettable(c) - collectors = append(collectors, c) - } - } - kr.PromRegistry.MustRegister(collectors...) -} - -// RawMustRegister takes a native prometheus.Collector and registers the collector -// to the registry. This bypasses metrics safety checks, so should only be used -// to register custom prometheus collectors. -// -// Deprecated -func (kr *kubeRegistry) RawMustRegister(cs ...prometheus.Collector) { - kr.PromRegistry.MustRegister(cs...) - for _, c := range cs { - kr.addResettable(c) - } -} - -// addResettable will automatically add our metric to our reset -// list if it satisfies the interface -func (kr *kubeRegistry) addResettable(i interface{}) { - kr.resetLock.Lock() - defer kr.resetLock.Unlock() - if resettable, ok := i.(resettable); ok { - kr.resettables = append(kr.resettables, resettable) - } -} - -// Unregister unregisters the Collector that equals the Collector passed -// in as an argument. (Two Collectors are considered equal if their -// Describe method yields the same set of descriptors.) The function -// returns whether a Collector was unregistered. Note that an unchecked -// Collector cannot be unregistered (as its Describe method does not -// yield any descriptor). -func (kr *kubeRegistry) Unregister(collector Collector) bool { - return kr.PromRegistry.Unregister(collector) -} - -// Gather calls the Collect method of the registered Collectors and then -// gathers the collected metrics into a lexicographically sorted slice -// of uniquely named MetricFamily protobufs. Gather ensures that the -// returned slice is valid and self-consistent so that it can be used -// for valid exposition. As an exception to the strict consistency -// requirements described for metric.Desc, Gather will tolerate -// different sets of label names for metrics of the same metric family. -func (kr *kubeRegistry) Gather() ([]*dto.MetricFamily, error) { - return kr.PromRegistry.Gather() -} - -// trackHiddenCollector stores all hidden collectors. -func (kr *kubeRegistry) trackHiddenCollector(c Registerable) { - kr.hiddenCollectorsLock.Lock() - defer kr.hiddenCollectorsLock.Unlock() - - kr.hiddenCollectors[c.FQName()] = c - hiddenMetricsTotal.Inc() -} - -// trackStableCollectors stores all custom collectors. -func (kr *kubeRegistry) trackStableCollectors(cs ...StableCollector) { - kr.stableCollectorsLock.Lock() - defer kr.stableCollectorsLock.Unlock() - - kr.stableCollectors = append(kr.stableCollectors, cs...) -} - -// enableHiddenCollectors will re-register all the hidden collectors. -func (kr *kubeRegistry) enableHiddenCollectors() { - if len(kr.hiddenCollectors) == 0 { - return - } - - kr.hiddenCollectorsLock.Lock() - cs := make([]Registerable, 0, len(kr.hiddenCollectors)) - - for _, c := range kr.hiddenCollectors { - c.ClearState() - cs = append(cs, c) - } - - kr.hiddenCollectors = make(map[string]Registerable) - kr.hiddenCollectorsLock.Unlock() - kr.MustRegister(cs...) -} - -// enableHiddenStableCollectors will re-register the stable collectors if there is one or more hidden metrics in it. -// Since we can not register a metrics twice, so we have to unregister first then register again. -func (kr *kubeRegistry) enableHiddenStableCollectors() { - if len(kr.stableCollectors) == 0 { - return - } - - kr.stableCollectorsLock.Lock() - - cs := make([]StableCollector, 0, len(kr.stableCollectors)) - for _, c := range kr.stableCollectors { - if len(c.HiddenMetrics()) > 0 { - kr.Unregister(c) // unregister must happens before clear state, otherwise no metrics would be unregister - c.ClearState() - cs = append(cs, c) - } - } - - kr.stableCollectors = nil - kr.stableCollectorsLock.Unlock() - kr.CustomMustRegister(cs...) -} - -// Reset invokes Reset on all metrics that are resettable. -func (kr *kubeRegistry) Reset() { - kr.resetLock.RLock() - defer kr.resetLock.RUnlock() - for _, r := range kr.resettables { - r.Reset() - } -} - -// BuildVersion is a helper function that can be easily mocked. -var BuildVersion = version.Get - -func newKubeRegistry(v apimachineryversion.Info) *kubeRegistry { - r := &kubeRegistry{ - PromRegistry: prometheus.NewRegistry(), - version: parseVersion(v), - hiddenCollectors: make(map[string]Registerable), - resettables: make([]resettable, 0), - } - - registriesLock.Lock() - defer registriesLock.Unlock() - registries = append(registries, r) - - return r -} - -// NewKubeRegistry creates a new vanilla Registry -func NewKubeRegistry() KubeRegistry { - r := newKubeRegistry(BuildVersion()) - return r -} - -func (r *kubeRegistry) RegisterMetaMetrics() { - r.MustRegister(registeredMetricsTotal) - r.MustRegister(disabledMetricsTotal) - r.MustRegister(hiddenMetricsTotal) - r.MustRegister(cardinalityEnforcementUnexpectedCategorizationsTotal) -} diff --git a/vendor/k8s.io/component-base/metrics/summary.go b/vendor/k8s.io/component-base/metrics/summary.go deleted file mode 100644 index 82898e60e..000000000 --- a/vendor/k8s.io/component-base/metrics/summary.go +++ /dev/null @@ -1,249 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "context" - "sync" - - "github.com/blang/semver/v4" - "github.com/prometheus/client_golang/prometheus" -) - -const ( - DefAgeBuckets = prometheus.DefAgeBuckets - DefBufCap = prometheus.DefBufCap - DefMaxAge = prometheus.DefMaxAge -) - -// Summary is our internal representation for our wrapping struct around prometheus -// summaries. Summary implements both kubeCollector and ObserverMetric -// -// Deprecated: as per the metrics overhaul KEP -type Summary struct { - ObserverMetric - *SummaryOpts - lazyMetric - selfCollector -} - -// NewSummary returns an object which is Summary-like. However, nothing -// will be measured until the summary is registered somewhere. -// -// Deprecated: as per the metrics overhaul KEP -func NewSummary(opts *SummaryOpts) *Summary { - opts.StabilityLevel.setDefaults() - - s := &Summary{ - SummaryOpts: opts, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - s.setPrometheusSummary(noopMetric{}) - s.lazyInit(s, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) - return s -} - -// setPrometheusSummary sets the underlying KubeGauge object, i.e. the thing that does the measurement. -func (s *Summary) setPrometheusSummary(summary prometheus.Summary) { - s.ObserverMetric = summary - s.initSelfCollection(summary) -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (s *Summary) DeprecatedVersion() *semver.Version { - return parseSemver(s.SummaryOpts.DeprecatedVersion) -} - -// initializeMetric invokes the actual prometheus.Summary object instantiation -// and stores a reference to it -func (s *Summary) initializeMetric() { - s.SummaryOpts.annotateStabilityLevel() - // this actually creates the underlying prometheus gauge. - s.setPrometheusSummary(prometheus.NewSummary(s.SummaryOpts.toPromSummaryOpts())) -} - -// initializeDeprecatedMetric invokes the actual prometheus.Summary object instantiation -// but modifies the Help description prior to object instantiation. -func (s *Summary) initializeDeprecatedMetric() { - s.SummaryOpts.markDeprecated() - s.initializeMetric() -} - -// WithContext allows the normal Summary metric to pass in context. The context is no-op now. -func (s *Summary) WithContext(ctx context.Context) ObserverMetric { - return s.ObserverMetric -} - -// SummaryVec is the internal representation of our wrapping struct around prometheus -// summaryVecs. -// -// Deprecated: as per the metrics overhaul KEP -type SummaryVec struct { - *prometheus.SummaryVec - *SummaryOpts - lazyMetric - originalLabels []string -} - -// NewSummaryVec returns an object which satisfies kubeCollector and wraps the -// prometheus.SummaryVec object. However, the object returned will not measure -// anything unless the collector is first registered, since the metric is lazily instantiated, -// and only members extracted after -// registration will actually measure anything. -// -// Deprecated: as per the metrics overhaul KEP -func NewSummaryVec(opts *SummaryOpts, labels []string) *SummaryVec { - opts.StabilityLevel.setDefaults() - - fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) - - v := &SummaryVec{ - SummaryOpts: opts, - originalLabels: labels, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - v.lazyInit(v, fqName) - return v -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (v *SummaryVec) DeprecatedVersion() *semver.Version { - return parseSemver(v.SummaryOpts.DeprecatedVersion) -} - -func (v *SummaryVec) initializeMetric() { - v.SummaryOpts.annotateStabilityLevel() - v.SummaryVec = prometheus.NewSummaryVec(v.SummaryOpts.toPromSummaryOpts(), v.originalLabels) -} - -func (v *SummaryVec) initializeDeprecatedMetric() { - v.SummaryOpts.markDeprecated() - v.initializeMetric() -} - -// Default Prometheus Vec behavior is that member extraction results in creation of a new element -// if one with the unique label values is not found in the underlying stored metricMap. -// This means that if this function is called but the underlying metric is not registered -// (which means it will never be exposed externally nor consumed), the metric will exist in memory -// for perpetuity (i.e. throughout application lifecycle). -// -// For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/histogram.go#L460-L470 -// -// In contrast, the Vec behavior in this package is that member extraction before registration -// returns a permanent noop object. - -// WithLabelValues returns the ObserverMetric for the given slice of label -// values (same order as the VariableLabels in Desc). If that combination of -// label values is accessed for the first time, a new ObserverMetric is created IFF the summaryVec -// has been registered to a metrics registry. -func (v *SummaryVec) WithLabelValues(lvs ...string) ObserverMetric { - if !v.IsCreated() { - return noop - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label values to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) - } - return v.SummaryVec.WithLabelValues(lvs...) -} - -// With returns the ObserverMetric for the given Labels map (the label names -// must match those of the VariableLabels in Desc). If that label map is -// accessed for the first time, a new ObserverMetric is created IFF the summaryVec has -// been registered to a metrics registry. -func (v *SummaryVec) With(labels map[string]string) ObserverMetric { - if !v.IsCreated() { - return noop - } - - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainLabelMap(labels) - } - return v.SummaryVec.With(labels) -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -func (v *SummaryVec) Delete(labels map[string]string) bool { - if !v.IsCreated() { - return false // since we haven't created the metric, we haven't deleted a metric with the passed in values - } - return v.SummaryVec.Delete(labels) -} - -// Reset deletes all metrics in this vector. -func (v *SummaryVec) Reset() { - if !v.IsCreated() { - return - } - - v.SummaryVec.Reset() -} - -// ResetLabelAllowLists resets the label allow list for the SummaryVec. -// NOTE: This should only be used in test. -func (v *SummaryVec) ResetLabelAllowLists() { - v.initializeLabelAllowListsOnce = sync.Once{} - v.LabelValueAllowLists = nil -} - -// WithContext returns wrapped SummaryVec with context -func (v *SummaryVec) WithContext(ctx context.Context) *SummaryVecWithContext { - return &SummaryVecWithContext{ - ctx: ctx, - SummaryVec: v, - } -} - -// SummaryVecWithContext is the wrapper of SummaryVec with context. -type SummaryVecWithContext struct { - *SummaryVec - ctx context.Context -} - -// WithLabelValues is the wrapper of SummaryVec.WithLabelValues. -func (vc *SummaryVecWithContext) WithLabelValues(lvs ...string) ObserverMetric { - return vc.SummaryVec.WithLabelValues(lvs...) -} - -// With is the wrapper of SummaryVec.With. -func (vc *SummaryVecWithContext) With(labels map[string]string) ObserverMetric { - return vc.SummaryVec.With(labels) -} diff --git a/vendor/k8s.io/component-base/metrics/timing_histogram.go b/vendor/k8s.io/component-base/metrics/timing_histogram.go deleted file mode 100644 index 5399f8d1b..000000000 --- a/vendor/k8s.io/component-base/metrics/timing_histogram.go +++ /dev/null @@ -1,298 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "context" - "sync" - "time" - - "github.com/blang/semver/v4" - promext "k8s.io/component-base/metrics/prometheusextension" -) - -// PrometheusTimingHistogram is the abstraction of the underlying histogram -// that we want to promote from the wrapper. -type PrometheusTimingHistogram interface { - GaugeMetric -} - -// TimingHistogram is our internal representation for our wrapping struct around -// timing histograms. It implements both kubeCollector and GaugeMetric -type TimingHistogram struct { - PrometheusTimingHistogram - *TimingHistogramOpts - nowFunc func() time.Time - lazyMetric - selfCollector -} - -var _ GaugeMetric = &TimingHistogram{} -var _ Registerable = &TimingHistogram{} -var _ kubeCollector = &TimingHistogram{} - -// NewTimingHistogram returns an object which is TimingHistogram-like. However, nothing -// will be measured until the histogram is registered somewhere. -func NewTimingHistogram(opts *TimingHistogramOpts) *TimingHistogram { - return NewTestableTimingHistogram(time.Now, opts) -} - -// NewTestableTimingHistogram adds injection of the clock -func NewTestableTimingHistogram(nowFunc func() time.Time, opts *TimingHistogramOpts) *TimingHistogram { - opts.StabilityLevel.setDefaults() - - h := &TimingHistogram{ - TimingHistogramOpts: opts, - nowFunc: nowFunc, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - h.setPrometheusHistogram(noopMetric{}) - h.lazyInit(h, BuildFQName(opts.Namespace, opts.Subsystem, opts.Name)) - return h -} - -// setPrometheusHistogram sets the underlying KubeGauge object, i.e. the thing that does the measurement. -func (h *TimingHistogram) setPrometheusHistogram(histogram promext.TimingHistogram) { - h.PrometheusTimingHistogram = histogram - h.initSelfCollection(histogram) -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (h *TimingHistogram) DeprecatedVersion() *semver.Version { - return parseSemver(h.TimingHistogramOpts.DeprecatedVersion) -} - -// initializeMetric invokes the actual prometheus.Histogram object instantiation -// and stores a reference to it -func (h *TimingHistogram) initializeMetric() { - h.TimingHistogramOpts.annotateStabilityLevel() - // this actually creates the underlying prometheus gauge. - histogram, err := promext.NewTestableTimingHistogram(h.nowFunc, h.TimingHistogramOpts.toPromHistogramOpts()) - if err != nil { - panic(err) // handle as for regular histograms - } - h.setPrometheusHistogram(histogram) -} - -// initializeDeprecatedMetric invokes the actual prometheus.Histogram object instantiation -// but modifies the Help description prior to object instantiation. -func (h *TimingHistogram) initializeDeprecatedMetric() { - h.TimingHistogramOpts.markDeprecated() - h.initializeMetric() -} - -// WithContext allows the normal TimingHistogram metric to pass in context. The context is no-op now. -func (h *TimingHistogram) WithContext(ctx context.Context) GaugeMetric { - return h.PrometheusTimingHistogram -} - -// TimingHistogramVec is the internal representation of our wrapping struct around prometheus -// TimingHistogramVecs. -type TimingHistogramVec struct { - *promext.TimingHistogramVec - *TimingHistogramOpts - nowFunc func() time.Time - lazyMetric - originalLabels []string -} - -var _ GaugeVecMetric = &TimingHistogramVec{} -var _ Registerable = &TimingHistogramVec{} -var _ kubeCollector = &TimingHistogramVec{} - -// NewTimingHistogramVec returns an object which satisfies the kubeCollector, Registerable, and GaugeVecMetric interfaces -// and wraps an underlying promext.TimingHistogramVec object. Note well the way that -// behavior depends on registration and whether this is hidden. -func NewTimingHistogramVec(opts *TimingHistogramOpts, labels []string) *TimingHistogramVec { - return NewTestableTimingHistogramVec(time.Now, opts, labels) -} - -// NewTestableTimingHistogramVec adds injection of the clock. -func NewTestableTimingHistogramVec(nowFunc func() time.Time, opts *TimingHistogramOpts, labels []string) *TimingHistogramVec { - opts.StabilityLevel.setDefaults() - - fqName := BuildFQName(opts.Namespace, opts.Subsystem, opts.Name) - - v := &TimingHistogramVec{ - TimingHistogramVec: noopTimingHistogramVec, - TimingHistogramOpts: opts, - nowFunc: nowFunc, - originalLabels: labels, - lazyMetric: lazyMetric{stabilityLevel: opts.StabilityLevel}, - } - v.lazyInit(v, fqName) - return v -} - -// DeprecatedVersion returns a pointer to the Version or nil -func (v *TimingHistogramVec) DeprecatedVersion() *semver.Version { - return parseSemver(v.TimingHistogramOpts.DeprecatedVersion) -} - -func (v *TimingHistogramVec) initializeMetric() { - v.TimingHistogramOpts.annotateStabilityLevel() - v.TimingHistogramVec = promext.NewTestableTimingHistogramVec(v.nowFunc, v.TimingHistogramOpts.toPromHistogramOpts(), v.originalLabels...) -} - -func (v *TimingHistogramVec) initializeDeprecatedMetric() { - v.TimingHistogramOpts.markDeprecated() - v.initializeMetric() -} - -// WithLabelValuesChecked, if called before this vector has been registered in -// at least one registry, will return a noop gauge and -// an error that passes ErrIsNotRegistered. -// If called on a hidden vector, -// will return a noop gauge and a nil error. -// If called with a syntactic problem in the labels, will -// return a noop gauge and an error about the labels. -// If none of the above apply, this method will return -// the appropriate vector member and a nil error. -func (v *TimingHistogramVec) WithLabelValuesChecked(lvs ...string) (GaugeMetric, error) { - if !v.IsCreated() { - if v.IsHidden() { - return noop, nil - } - return noop, errNotRegistered - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label values to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainToAllowedList(v.originalLabels, lvs) - } - ops, err := v.TimingHistogramVec.GetMetricWithLabelValues(lvs...) - if err != nil { - return noop, err - } - return ops.(GaugeMetric), err -} - -// WithLabelValues calls WithLabelValuesChecked -// and handles errors as follows. -// An error that passes ErrIsNotRegistered is ignored -// and the noop gauge is returned; -// all other errors cause a panic. -func (v *TimingHistogramVec) WithLabelValues(lvs ...string) GaugeMetric { - ans, err := v.WithLabelValuesChecked(lvs...) - if err == nil || ErrIsNotRegistered(err) { - return ans - } - panic(err) -} - -// WithChecked, if called before this vector has been registered in -// at least one registry, will return a noop gauge and -// an error that passes ErrIsNotRegistered. -// If called on a hidden vector, -// will return a noop gauge and a nil error. -// If called with a syntactic problem in the labels, will -// return a noop gauge and an error about the labels. -// If none of the above apply, this method will return -// the appropriate vector member and a nil error. -func (v *TimingHistogramVec) WithChecked(labels map[string]string) (GaugeMetric, error) { - if !v.IsCreated() { - if v.IsHidden() { - return noop, nil - } - return noop, errNotRegistered - } - - // Initialize label allow lists if not already initialized - v.initializeLabelAllowListsOnce.Do(func() { - allowListLock.RLock() - if allowList, ok := labelValueAllowLists[v.FQName()]; ok { - v.LabelValueAllowLists = allowList - } - allowListLock.RUnlock() - }) - - // Constrain label map to allowed values - if v.LabelValueAllowLists != nil { - v.LabelValueAllowLists.ConstrainLabelMap(labels) - } - ops, err := v.TimingHistogramVec.GetMetricWith(labels) - if err != nil { - return noop, err - } - return ops.(GaugeMetric), err -} - -// With calls WithChecked and handles errors as follows. -// An error that passes ErrIsNotRegistered is ignored -// and the noop gauge is returned; -// all other errors cause a panic. -func (v *TimingHistogramVec) With(labels map[string]string) GaugeMetric { - ans, err := v.WithChecked(labels) - if err == nil || ErrIsNotRegistered(err) { - return ans - } - panic(err) -} - -// Delete deletes the metric where the variable labels are the same as those -// passed in as labels. It returns true if a metric was deleted. -// -// It is not an error if the number and names of the Labels are inconsistent -// with those of the VariableLabels in Desc. However, such inconsistent Labels -// can never match an actual metric, so the method will always return false in -// that case. -func (v *TimingHistogramVec) Delete(labels map[string]string) bool { - if !v.IsCreated() { - return false // since we haven't created the metric, we haven't deleted a metric with the passed in values - } - return v.TimingHistogramVec.Delete(labels) -} - -// Reset deletes all metrics in this vector. -func (v *TimingHistogramVec) Reset() { - if !v.IsCreated() { - return - } - - v.TimingHistogramVec.Reset() -} - -// ResetLabelAllowLists resets the label allow list for the TimingHistogramVec. -// NOTE: This should only be used in test. -func (v *TimingHistogramVec) ResetLabelAllowLists() { - v.initializeLabelAllowListsOnce = sync.Once{} - v.LabelValueAllowLists = nil -} - -// WithContext returns wrapped TimingHistogramVec with context -func (v *TimingHistogramVec) InterfaceWithContext(ctx context.Context) GaugeVecMetric { - return &TimingHistogramVecWithContext{ - ctx: ctx, - TimingHistogramVec: v, - } -} - -// TimingHistogramVecWithContext is the wrapper of TimingHistogramVec with context. -// Currently the context is ignored. -type TimingHistogramVecWithContext struct { - *TimingHistogramVec - ctx context.Context -} diff --git a/vendor/k8s.io/component-base/metrics/value.go b/vendor/k8s.io/component-base/metrics/value.go deleted file mode 100644 index 4a405048c..000000000 --- a/vendor/k8s.io/component-base/metrics/value.go +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "time" - - "github.com/prometheus/client_golang/prometheus" -) - -// ValueType is an enumeration of metric types that represent a simple value. -type ValueType int - -// Possible values for the ValueType enum. -const ( - _ ValueType = iota - CounterValue - GaugeValue - UntypedValue -) - -func (vt *ValueType) toPromValueType() prometheus.ValueType { - return prometheus.ValueType(*vt) -} - -// NewLazyConstMetric is a helper of MustNewConstMetric. -// -// Note: If the metrics described by the desc is hidden, the metrics will not be created. -func NewLazyConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) Metric { - if desc.IsHidden() { - return nil - } - return prometheus.MustNewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...) -} - -// NewConstMetric is a helper of NewConstMetric. -// -// Note: If the metrics described by the desc is hidden, the metrics will not be created. -func NewConstMetric(desc *Desc, valueType ValueType, value float64, labelValues ...string) (Metric, error) { - if desc.IsHidden() { - return nil, nil - } - return prometheus.NewConstMetric(desc.toPrometheusDesc(), valueType.toPromValueType(), value, labelValues...) -} - -// NewLazyMetricWithTimestamp is a helper of NewMetricWithTimestamp. -// -// Warning: the Metric 'm' must be the one created by NewLazyConstMetric(), -// otherwise, no stability guarantees would be offered. -func NewLazyMetricWithTimestamp(t time.Time, m Metric) Metric { - if m == nil { - return nil - } - - return prometheus.NewMetricWithTimestamp(t, m) -} diff --git a/vendor/k8s.io/component-base/metrics/version.go b/vendor/k8s.io/component-base/metrics/version.go deleted file mode 100644 index eba29ce9b..000000000 --- a/vendor/k8s.io/component-base/metrics/version.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2019 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 metrics - -import "k8s.io/component-base/version" - -var ( - buildInfo = NewGaugeVec( - &GaugeOpts{ - Name: "kubernetes_build_info", - Help: "A metric with a constant '1' value labeled by major, minor, git version, git commit, git tree state, build date, Go version, and compiler from which Kubernetes was built, and platform on which it is running.", - StabilityLevel: BETA, - }, - []string{"major", "minor", "git_version", "git_commit", "git_tree_state", "build_date", "go_version", "compiler", "platform"}, - ) -) - -// RegisterBuildInfo registers the build and version info in a metadata metric in prometheus -func RegisterBuildInfo(r KubeRegistry) { - info := version.Get() - r.MustRegister(buildInfo) - buildInfo.WithLabelValues(info.Major, info.Minor, info.GitVersion, info.GitCommit, info.GitTreeState, info.BuildDate, info.GoVersion, info.Compiler, info.Platform).Set(1) -} diff --git a/vendor/k8s.io/component-base/metrics/version_parser.go b/vendor/k8s.io/component-base/metrics/version_parser.go deleted file mode 100644 index 102e108e2..000000000 --- a/vendor/k8s.io/component-base/metrics/version_parser.go +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "fmt" - "regexp" - - "github.com/blang/semver/v4" - - apimachineryversion "k8s.io/apimachinery/pkg/version" -) - -const ( - versionRegexpString = `^v(\d+\.\d+\.\d+)` -) - -var ( - versionRe = regexp.MustCompile(versionRegexpString) -) - -func parseSemver(s string) *semver.Version { - if s != "" { - sv := semver.MustParse(s) - return &sv - } - return nil -} -func parseVersion(ver apimachineryversion.Info) semver.Version { - matches := versionRe.FindAllStringSubmatch(ver.String(), -1) - - if len(matches) != 1 { - panic(fmt.Sprintf("version string \"%v\" doesn't match expected regular expression: \"%v\"", ver.String(), versionRe.String())) - } - return semver.MustParse(matches[0][1]) -} diff --git a/vendor/k8s.io/component-base/metrics/wrappers.go b/vendor/k8s.io/component-base/metrics/wrappers.go deleted file mode 100644 index 679590aad..000000000 --- a/vendor/k8s.io/component-base/metrics/wrappers.go +++ /dev/null @@ -1,167 +0,0 @@ -/* -Copyright 2019 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 metrics - -import ( - "errors" - - "github.com/prometheus/client_golang/prometheus" - dto "github.com/prometheus/client_model/go" -) - -// This file contains a series of interfaces which we explicitly define for -// integrating with prometheus. We redefine the interfaces explicitly here -// so that we can prevent breakage if methods are ever added to prometheus -// variants of them. - -// Collector defines a subset of prometheus.Collector interface methods -type Collector interface { - Describe(chan<- *prometheus.Desc) - Collect(chan<- prometheus.Metric) -} - -// Metric defines a subset of prometheus.Metric interface methods -type Metric interface { - Desc() *prometheus.Desc - Write(*dto.Metric) error -} - -// CounterMetric is a Metric that represents a single numerical value that only ever -// goes up. That implies that it cannot be used to count items whose number can -// also go down, e.g. the number of currently running goroutines. Those -// "counters" are represented by Gauges. - -// CounterMetric is an interface which defines a subset of the interface provided by prometheus.Counter -type CounterMetric interface { - Inc() - Add(float64) -} - -// CounterVecMetric is an interface which prometheus.CounterVec satisfies. -type CounterVecMetric interface { - WithLabelValues(...string) CounterMetric - With(prometheus.Labels) CounterMetric -} - -// GaugeMetric is an interface which defines a subset of the interface provided by prometheus.Gauge -type GaugeMetric interface { - Set(float64) - Inc() - Dec() - Add(float64) - Write(out *dto.Metric) error - SetToCurrentTime() -} - -// GaugeVecMetric is a collection of Gauges that differ only in label values. -type GaugeVecMetric interface { - // Default Prometheus Vec behavior is that member extraction results in creation of a new element - // if one with the unique label values is not found in the underlying stored metricMap. - // This means that if this function is called but the underlying metric is not registered - // (which means it will never be exposed externally nor consumed), the metric would exist in memory - // for perpetuity (i.e. throughout application lifecycle). - // - // For reference: https://github.com/prometheus/client_golang/blob/v0.9.2/prometheus/gauge.go#L190-L208 - // - // In contrast, the Vec behavior in this package is that member extraction before registration - // returns a permanent noop object. - - // WithLabelValuesChecked, if called before this vector has been registered in - // at least one registry, will return a noop gauge and - // an error that passes ErrIsNotRegistered. - // If called on a hidden vector, - // will return a noop gauge and a nil error. - // If called with a syntactic problem in the labels, will - // return a noop gauge and an error about the labels. - // If none of the above apply, this method will return - // the appropriate vector member and a nil error. - WithLabelValuesChecked(labelValues ...string) (GaugeMetric, error) - - // WithLabelValues calls WithLabelValuesChecked - // and handles errors as follows. - // An error that passes ErrIsNotRegistered is ignored - // and the noop gauge is returned; - // all other errors cause a panic. - WithLabelValues(labelValues ...string) GaugeMetric - - // WithChecked, if called before this vector has been registered in - // at least one registry, will return a noop gauge and - // an error that passes ErrIsNotRegistered. - // If called on a hidden vector, - // will return a noop gauge and a nil error. - // If called with a syntactic problem in the labels, will - // return a noop gauge and an error about the labels. - // If none of the above apply, this method will return - // the appropriate vector member and a nil error. - WithChecked(labels map[string]string) (GaugeMetric, error) - - // With calls WithChecked and handles errors as follows. - // An error that passes ErrIsNotRegistered is ignored - // and the noop gauge is returned; - // all other errors cause a panic. - With(labels map[string]string) GaugeMetric - - // Delete asserts that the vec should have no member for the given label set. - // The returned bool indicates whether there was a change. - // The return will certainly be `false` if the given label set has the wrong - // set of label names. - Delete(map[string]string) bool - - // Reset removes all the members - Reset() -} - -// ObserverMetric captures individual observations. -type ObserverMetric interface { - Observe(float64) -} - -// PromRegistry is an interface which implements a subset of prometheus.Registerer and -// prometheus.Gatherer interfaces -type PromRegistry interface { - Register(prometheus.Collector) error - MustRegister(...prometheus.Collector) - Unregister(prometheus.Collector) bool - Gather() ([]*dto.MetricFamily, error) -} - -// Gatherer is the interface for the part of a registry in charge of gathering -// the collected metrics into a number of MetricFamilies. -type Gatherer interface { - prometheus.Gatherer -} - -// Registerer is the interface for the part of a registry in charge of registering -// the collected metrics. -type Registerer interface { - prometheus.Registerer -} - -// GaugeFunc is a Gauge whose value is determined at collect time by calling a -// provided function. -// -// To create GaugeFunc instances, use NewGaugeFunc. -type GaugeFunc interface { - Metric - Collector -} - -func ErrIsNotRegistered(err error) bool { - return err == errNotRegistered -} - -var errNotRegistered = errors.New("metric vec is not registered yet") diff --git a/vendor/k8s.io/component-base/version/OWNERS b/vendor/k8s.io/component-base/version/OWNERS deleted file mode 100644 index 08c7aea9c..000000000 --- a/vendor/k8s.io/component-base/version/OWNERS +++ /dev/null @@ -1,16 +0,0 @@ -# See the OWNERS docs at https://go.k8s.io/owners - -# Currently assigned this directory to sig-api-machinery since this is -# an interface to the version definition in "k8s.io/apimachinery/pkg/version", -# and also to sig-release since this version information is set up for -# each release. - -approvers: - - sig-api-machinery-api-approvers - - release-engineering-approvers -reviewers: - - sig-api-machinery-api-reviewers - - release-managers -labels: - - sig/api-machinery - - sig/release diff --git a/vendor/k8s.io/component-base/version/base.go b/vendor/k8s.io/component-base/version/base.go deleted file mode 100644 index 453b63d82..000000000 --- a/vendor/k8s.io/component-base/version/base.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 2019 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 version - -// Base version information. -// -// This is the fallback data used when version information from git is not -// provided via go ldflags. It provides an approximation of the Kubernetes -// version for ad-hoc builds (e.g. `go build`) that cannot get the version -// information from git. -// -// If you are looking at these fields in the git tree, they look -// strange. They are set by the build process with ldflags -X. The -// in-tree values are dummy values used for "git archive", which also -// works for GitHub tar downloads. -var ( - // TODO: Deprecate gitMajor and gitMinor, use only gitVersion - // instead. First step in deprecation, keep the fields but make - // them irrelevant. (Next we'll take it out, which may muck with - // scripts consuming the kubectl version output - but most of - // these should be looking at gitVersion already anyways.) - gitMajor string // major version, always numeric - gitMinor string // minor version, numeric possibly followed by "+" - - // semantic version, derived by build scripts (see - // https://github.com/kubernetes/community/blob/master/contributors/design-proposals/release/versioning.md - // for a detailed discussion of this field) - // - // TODO: This field is still called "gitVersion" for legacy - // reasons. For prerelease versions, the build metadata on the - // semantic version is a git hash, but the version itself is no - // longer the direct output of "git describe", but a slight - // translation to be semver compliant. - - // NOTE: The $Format strings are replaced during 'git archive' thanks to the - // companion .gitattributes file containing 'export-subst' in this same - // directory. See also https://git-scm.com/docs/gitattributes - gitVersion = "v0.0.0-master+$Format:%H$" - gitCommit = "$Format:%H$" // sha1 from git, output of $(git rev-parse HEAD) - gitTreeState = "" // state of git tree, either "clean" or "dirty" - - buildDate = "1970-01-01T00:00:00Z" // build date in ISO8601 format, output of $(date -u +'%Y-%m-%dT%H:%M:%SZ') -) - -const ( - // DefaultKubeBinaryVersion is the hard coded k8 binary version based on the latest K8s release. - // It is supposed to be consistent with gitMajor and gitMinor, except for local tests, where gitMajor and gitMinor are "". - // Should update for each minor release! - DefaultKubeBinaryVersion = "1.36" -) diff --git a/vendor/k8s.io/component-base/version/dynamic.go b/vendor/k8s.io/component-base/version/dynamic.go deleted file mode 100644 index 46ade9f5e..000000000 --- a/vendor/k8s.io/component-base/version/dynamic.go +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2023 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 version - -import ( - "fmt" - "sync/atomic" - - utilversion "k8s.io/apimachinery/pkg/util/version" -) - -var dynamicGitVersion atomic.Value - -func init() { - // initialize to static gitVersion - dynamicGitVersion.Store(gitVersion) -} - -// SetDynamicVersion overrides the version returned as the GitVersion from Get(). -// The specified version must be non-empty, a valid semantic version, and must -// match the major/minor/patch version of the default gitVersion. -func SetDynamicVersion(dynamicVersion string) error { - if err := ValidateDynamicVersion(dynamicVersion); err != nil { - return err - } - dynamicGitVersion.Store(dynamicVersion) - return nil -} - -// ValidateDynamicVersion ensures the given version is non-empty, a valid semantic version, -// and matched the major/minor/patch version of the default gitVersion. -func ValidateDynamicVersion(dynamicVersion string) error { - return validateDynamicVersion(dynamicVersion, gitVersion) -} - -func validateDynamicVersion(dynamicVersion, defaultVersion string) error { - if len(dynamicVersion) == 0 { - return fmt.Errorf("version must not be empty") - } - if dynamicVersion == defaultVersion { - // allow no-op - return nil - } - vRuntime, err := utilversion.ParseSemantic(dynamicVersion) - if err != nil { - return err - } - // must match major/minor/patch of default version - var vDefault *utilversion.Version - if defaultVersion == "v0.0.0-master+$Format:%H$" { - // special-case the placeholder value which doesn't parse as a semantic version - vDefault, err = utilversion.ParseSemantic("v0.0.0-master") - } else { - vDefault, err = utilversion.ParseSemantic(defaultVersion) - } - if err != nil { - return err - } - if vRuntime.Major() != vDefault.Major() || vRuntime.Minor() != vDefault.Minor() || vRuntime.Patch() != vDefault.Patch() { - return fmt.Errorf("version %q must match major/minor/patch of default version %q", dynamicVersion, defaultVersion) - } - return nil -} diff --git a/vendor/k8s.io/component-base/version/version.go b/vendor/k8s.io/component-base/version/version.go deleted file mode 100644 index c71ccf196..000000000 --- a/vendor/k8s.io/component-base/version/version.go +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2019 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 version - -import ( - "fmt" - "runtime" - - apimachineryversion "k8s.io/apimachinery/pkg/version" -) - -// Get returns the overall codebase version. It's for detecting -// what code a binary was built from. -// The caller should use BinaryMajor and BinaryMinor to determine -// the binary version. The Major and Minor fields are still set by git version for backwards compatibility. -func Get() apimachineryversion.Info { - // These variables typically come from -ldflags settings and in - // their absence fallback to the settings in ./base.go - return apimachineryversion.Info{ - Major: gitMajor, - Minor: gitMinor, - GitVersion: dynamicGitVersion.Load().(string), - GitCommit: gitCommit, - GitTreeState: gitTreeState, - BuildDate: buildDate, - GoVersion: runtime.Version(), - Compiler: runtime.Compiler, - Platform: fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH), - } -} diff --git a/vendor/k8s.io/kube-aggregator/LICENSE b/vendor/k8s.io/kube-aggregator/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/k8s.io/kube-aggregator/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/k8s.io/kube-aggregator/pkg/apis/apiregistration/doc.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/doc.go deleted file mode 100644 index e1a1ab796..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/doc.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2016 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. -*/ - -// +k8s:deepcopy-gen=package -// +groupName=apiregistration.k8s.io - -// Package apiregistration is the internal version of the API. -package apiregistration diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/helpers.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/helpers.go deleted file mode 100644 index dfa746008..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/helpers.go +++ /dev/null @@ -1,128 +0,0 @@ -/* -Copyright 2016 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 apiregistration - -import ( - "sort" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/version" -) - -// SortedByGroupAndVersion sorts APIServices into their different groups, and then sorts them based on their versions. -// For example, the first element of the first array contains the APIService with the highest version number, in the -// group with the highest priority; while the last element of the last array contains the APIService with the lowest -// version number, in the group with the lowest priority. -func SortedByGroupAndVersion(servers []*APIService) [][]*APIService { - serversByGroupPriorityMinimum := ByGroupPriorityMinimum(servers) - sort.Sort(serversByGroupPriorityMinimum) - - ret := [][]*APIService{} - for _, curr := range serversByGroupPriorityMinimum { - // check to see if we already have an entry for this group - existingIndex := -1 - for j, groupInReturn := range ret { - if groupInReturn[0].Spec.Group == curr.Spec.Group { - existingIndex = j - break - } - } - - if existingIndex >= 0 { - ret[existingIndex] = append(ret[existingIndex], curr) - sort.Sort(ByVersionPriority(ret[existingIndex])) - continue - } - - ret = append(ret, []*APIService{curr}) - } - - return ret -} - -// ByGroupPriorityMinimum sorts with the highest group number first, then by name. -// This is not a simple reverse, because we want the name sorting to be alpha, not -// reverse alpha. -type ByGroupPriorityMinimum []*APIService - -func (s ByGroupPriorityMinimum) Len() int { return len(s) } -func (s ByGroupPriorityMinimum) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s ByGroupPriorityMinimum) Less(i, j int) bool { - if s[i].Spec.GroupPriorityMinimum != s[j].Spec.GroupPriorityMinimum { - return s[i].Spec.GroupPriorityMinimum > s[j].Spec.GroupPriorityMinimum - } - return s[i].Name < s[j].Name -} - -// ByVersionPriority sorts with the highest version number first, then by name. -// This is not a simple reverse, because we want the name sorting to be alpha, not -// reverse alpha. -type ByVersionPriority []*APIService - -func (s ByVersionPriority) Len() int { return len(s) } -func (s ByVersionPriority) Swap(i, j int) { s[i], s[j] = s[j], s[i] } -func (s ByVersionPriority) Less(i, j int) bool { - if s[i].Spec.VersionPriority != s[j].Spec.VersionPriority { - return s[i].Spec.VersionPriority > s[j].Spec.VersionPriority - } - return version.CompareKubeAwareVersionStrings(s[i].Spec.Version, s[j].Spec.Version) > 0 -} - -// NewLocalAvailableAPIServiceCondition returns a condition for an available local APIService. -func NewLocalAvailableAPIServiceCondition() APIServiceCondition { - return APIServiceCondition{ - Type: Available, - Status: ConditionTrue, - LastTransitionTime: metav1.Now(), - Reason: "Local", - Message: "Local APIServices are always available", - } -} - -// GetAPIServiceConditionByType gets an *APIServiceCondition by APIServiceConditionType if present -func GetAPIServiceConditionByType(apiService *APIService, conditionType APIServiceConditionType) *APIServiceCondition { - for i := range apiService.Status.Conditions { - if apiService.Status.Conditions[i].Type == conditionType { - return &apiService.Status.Conditions[i] - } - } - return nil -} - -// SetAPIServiceCondition sets the status condition. It either overwrites the existing one or -// creates a new one -func SetAPIServiceCondition(apiService *APIService, newCondition APIServiceCondition) { - existingCondition := GetAPIServiceConditionByType(apiService, newCondition.Type) - if existingCondition == nil { - apiService.Status.Conditions = append(apiService.Status.Conditions, newCondition) - return - } - - if existingCondition.Status != newCondition.Status { - existingCondition.Status = newCondition.Status - existingCondition.LastTransitionTime = newCondition.LastTransitionTime - } - - existingCondition.Reason = newCondition.Reason - existingCondition.Message = newCondition.Message -} - -// IsAPIServiceConditionTrue indicates if the condition is present and strictly true -func IsAPIServiceConditionTrue(apiService *APIService, conditionType APIServiceConditionType) bool { - condition := GetAPIServiceConditionByType(apiService, conditionType) - return condition != nil && condition.Status == ConditionTrue -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/register.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/register.go deleted file mode 100644 index 7b88df42f..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/register.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2016 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 apiregistration - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the API group for apiregistration -const GroupName = "apiregistration.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: runtime.APIVersionInternal} - -// Kind takes an unqualified kind and returns back a Group qualified GroupKind -func Kind(kind string) schema.GroupKind { - return SchemeGroupVersion.WithKind(kind).GroupKind() -} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &APIService{}, - &APIServiceList{}, - ) - return nil -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go deleted file mode 100644 index 97411783f..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/types.go +++ /dev/null @@ -1,146 +0,0 @@ -/* -Copyright 2016 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 apiregistration - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIServiceList is a list of APIService objects. -type APIServiceList struct { - metav1.TypeMeta - metav1.ListMeta - - Items []APIService -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // Namespace is the namespace of the service - Namespace string - // Name is the name of the service - Name string - // If specified, the port on the service that hosting the service. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port int32 -} - -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -type APIServiceSpec struct { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - // +optional - Service *ServiceReference - // Group is the API group name this server hosts - Group string - // Version is the API version this server hosts. For example, "v1" - Version string - - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - InsecureSkipTLSVerify bool - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - // +listType=atomic - // +optional - CABundle []byte - - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - GroupPriorityMinimum int32 - - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - VersionPriority int32 -} - -// ConditionStatus indicates the status of a condition (true, false, or unknown). -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition; -// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// APIServiceConditionType is a valid value for APIServiceCondition.Type -type APIServiceConditionType string - -const ( - // Available indicates that the service exists and is reachable - Available APIServiceConditionType = "Available" -) - -// APIServiceCondition describes conditions for an APIService -type APIServiceCondition struct { - // Type is the type of the condition. - Type APIServiceConditionType - // Status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus - // Last time the condition transitioned from one status to another. - LastTransitionTime metav1.Time - // Unique, one-word, CamelCase reason for the condition's last transition. - Reason string - // Human-readable message indicating details about last transition. - Message string -} - -// APIServiceStatus contains derived information about an API server -type APIServiceStatus struct { - // Current service state of apiService. - // +listType=map - // +listMapKey=type - Conditions []APIServiceCondition -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -type APIService struct { - metav1.TypeMeta - metav1.ObjectMeta - - // Spec contains information for locating and communicating with a server - Spec APIServiceSpec - // Status contains derived information about an API server - Status APIServiceStatus -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/defaults.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/defaults.go deleted file mode 100644 index 4a31f94ce..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2019 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 v1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/ptr" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// SetDefaults_ServiceReference sets defaults for AuditSync Webhook's ServiceReference -func SetDefaults_ServiceReference(obj *ServiceReference) { - if obj.Port == nil { - obj.Port = ptr.To[int32](443) - } -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/doc.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/doc.go deleted file mode 100644 index 95e92cb8d..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2016 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:conversion-gen=k8s.io/kube-aggregator/pkg/apis/apiregistration -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.kube-aggregator.pkg.apis.apiregistration.v1 - -// +groupName=apiregistration.k8s.io - -// Package v1 contains the API Registration API, which is responsible for -// registering an API `Group`/`Version` with another kubernetes like API server. -// The `APIService` holds information about the other API server in -// `APIServiceSpec` type as well as general `TypeMeta` and `ObjectMeta`. The -// `APIServiceSpec` type have the main configuration needed to do the -// aggregation. Any request coming for specified `Group`/`Version` will be -// directed to the service defined by `ServiceReference` (on port 443) after -// validating the target using provided `CABundle` or skipping validation -// if development flag `InsecureSkipTLSVerify` is set. `Priority` is controlling -// the order of this API group in the overall discovery document. -// The return status is a set of conditions for this aggregation. Currently -// there is only one condition named "Available", if true, it means the -// api/server requests will be redirected to specified API server. -package v1 diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.pb.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.pb.go deleted file mode 100644 index 2fe94e409..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.pb.go +++ /dev/null @@ -1,1574 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto - -package v1 - -import ( - fmt "fmt" - - io "io" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *APIService) Reset() { *m = APIService{} } - -func (m *APIServiceCondition) Reset() { *m = APIServiceCondition{} } - -func (m *APIServiceList) Reset() { *m = APIServiceList{} } - -func (m *APIServiceSpec) Reset() { *m = APIServiceSpec{} } - -func (m *APIServiceStatus) Reset() { *m = APIServiceStatus{} } - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } - -func (m *APIService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.VersionPriority)) - i-- - dAtA[i] = 0x40 - i = encodeVarintGenerated(dAtA, i, uint64(m.GroupPriorityMinimum)) - i-- - dAtA[i] = 0x38 - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i-- - dAtA[i] = 0x2a - } - i-- - if m.InsecureSkipTLSVerify { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0x12 - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *APIServiceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ServiceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x18 - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *APIService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *APIServiceCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *APIServiceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *APIServiceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.GroupPriorityMinimum)) - n += 1 + sovGenerated(uint64(m.VersionPriority)) - return n -} - -func (m *APIServiceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *APIService) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIService{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "APIServiceSpec", "APIServiceSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "APIServiceStatus", "APIServiceStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIServiceCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]APIService{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "APIService", "APIService", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&APIServiceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIServiceSpec{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `InsecureSkipTLSVerify:` + fmt.Sprintf("%v", this.InsecureSkipTLSVerify) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `GroupPriorityMinimum:` + fmt.Sprintf("%v", this.GroupPriorityMinimum) + `,`, - `VersionPriority:` + fmt.Sprintf("%v", this.VersionPriority) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]APIServiceCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "APIServiceCondition", "APIServiceCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&APIServiceStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *ServiceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *APIService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = APIServiceConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, APIService{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipTLSVerify", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsecureSkipTLSVerify = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupPriorityMinimum", wireType) - } - m.GroupPriorityMinimum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GroupPriorityMinimum |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionPriority", wireType) - } - m.VersionPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VersionPriority |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, APIServiceCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto deleted file mode 100644 index 5571387ef..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/generated.proto +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.kube_aggregator.pkg.apis.apiregistration.v1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"; - -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -message APIService { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec contains information for locating and communicating with a server - optional APIServiceSpec spec = 2; - - // Status contains derived information about an API server - optional APIServiceStatus status = 3; -} - -// APIServiceCondition describes the state of an APIService at a particular point -message APIServiceCondition { - // Type is the type of the condition. - optional string type = 1; - - // Status is the status of the condition. - // Can be True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - optional string reason = 4; - - // Human-readable message indicating details about last transition. - // +optional - optional string message = 5; -} - -// APIServiceList is a list of APIService objects. -message APIServiceList { - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of APIService - repeated APIService items = 2; -} - -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -message APIServiceSpec { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - // +optional - optional ServiceReference service = 1; - - // Group is the API group name this server hosts - optional string group = 2; - - // Version is the API version this server hosts. For example, "v1" - optional string version = 3; - - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - optional bool insecureSkipTLSVerify = 4; - - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - // +listType=atomic - // +optional - optional bytes caBundle = 5; - - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - optional int32 groupPriorityMinimum = 7; - - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - optional int32 versionPriority = 8; -} - -// APIServiceStatus contains derived information about an API server -message APIServiceStatus { - // Current service state of apiService. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated APIServiceCondition conditions = 1; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // Namespace is the namespace of the service - optional string namespace = 1; - - // Name is the name of the service - optional string name = 2; - - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - optional int32 port = 3; -} - diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/register.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/register.go deleted file mode 100644 index 07e65bf04..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/register.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2016 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 v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the API group for apiregistration -const GroupName = "apiregistration.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1"} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package - // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &APIService{}, - &APIServiceList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go deleted file mode 100644 index fe5f64c0e..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/types.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -Copyright 2016 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 v1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.10 - -// APIServiceList is a list of APIService objects. -type APIServiceList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of APIService - Items []APIService `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // Namespace is the namespace of the service - Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` - // Name is the name of the service - Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"` - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port *int32 `json:"port,omitempty" protobuf:"varint,3,opt,name=port"` -} - -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -type APIServiceSpec struct { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - // +optional - Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` - // Group is the API group name this server hosts - Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` - // Version is the API version this server hosts. For example, "v1" - Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"` - - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - // +listType=atomic - // +optional - CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` - - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - GroupPriorityMinimum int32 `json:"groupPriorityMinimum" protobuf:"varint,7,opt,name=groupPriorityMinimum"` - - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - VersionPriority int32 `json:"versionPriority" protobuf:"varint,8,opt,name=versionPriority"` - - // leaving this here so everyone remembers why proto index 6 is skipped - // Priority int64 `json:"priority" protobuf:"varint,6,opt,name=priority"` -} - -// ConditionStatus indicates the status of a condition (true, false, or unknown). -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition; -// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// APIServiceConditionType is a valid value for APIServiceCondition.Type -type APIServiceConditionType string - -const ( - // Available indicates that the service exists and is reachable - Available APIServiceConditionType = "Available" -) - -// APIServiceCondition describes the state of an APIService at a particular point -type APIServiceCondition struct { - // Type is the type of the condition. - Type APIServiceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=APIServiceConditionType"` - // Status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // Human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// APIServiceStatus contains derived information about an API server -type APIServiceStatus struct { - // Current service state of apiService. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.10 - -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -type APIService struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec contains information for locating and communicating with a server - Spec APIServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Status contains derived information about an API server - Status APIServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.conversion.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.conversion.go deleted file mode 100644 index 208e23efd..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.conversion.go +++ /dev/null @@ -1,299 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1 - -import ( - unsafe "unsafe" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - apiregistration "k8s.io/kube-aggregator/pkg/apis/apiregistration" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIService)(nil), (*apiregistration.APIService)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_APIService_To_apiregistration_APIService(a.(*APIService), b.(*apiregistration.APIService), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIService)(nil), (*APIService)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIService_To_v1_APIService(a.(*apiregistration.APIService), b.(*APIService), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceCondition)(nil), (*apiregistration.APIServiceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_APIServiceCondition_To_apiregistration_APIServiceCondition(a.(*APIServiceCondition), b.(*apiregistration.APIServiceCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceCondition)(nil), (*APIServiceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceCondition_To_v1_APIServiceCondition(a.(*apiregistration.APIServiceCondition), b.(*APIServiceCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceList)(nil), (*apiregistration.APIServiceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_APIServiceList_To_apiregistration_APIServiceList(a.(*APIServiceList), b.(*apiregistration.APIServiceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceList)(nil), (*APIServiceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceList_To_v1_APIServiceList(a.(*apiregistration.APIServiceList), b.(*APIServiceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceSpec)(nil), (*apiregistration.APIServiceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec(a.(*APIServiceSpec), b.(*apiregistration.APIServiceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceSpec)(nil), (*APIServiceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec(a.(*apiregistration.APIServiceSpec), b.(*APIServiceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceStatus)(nil), (*apiregistration.APIServiceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus(a.(*APIServiceStatus), b.(*apiregistration.APIServiceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceStatus)(nil), (*APIServiceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus(a.(*apiregistration.APIServiceStatus), b.(*APIServiceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiregistration.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1_ServiceReference_To_apiregistration_ServiceReference(a.(*ServiceReference), b.(*apiregistration.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_ServiceReference_To_v1_ServiceReference(a.(*apiregistration.ServiceReference), b.(*ServiceReference), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1_APIService_To_apiregistration_APIService is an autogenerated conversion function. -func Convert_v1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - return autoConvert_v1_APIService_To_apiregistration_APIService(in, out, s) -} - -func autoConvert_apiregistration_APIService_To_v1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_apiregistration_APIService_To_v1_APIService is an autogenerated conversion function. -func Convert_apiregistration_APIService_To_v1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - return autoConvert_apiregistration_APIService_To_v1_APIService(in, out, s) -} - -func autoConvert_v1_APIServiceCondition_To_apiregistration_APIServiceCondition(in *APIServiceCondition, out *apiregistration.APIServiceCondition, s conversion.Scope) error { - out.Type = apiregistration.APIServiceConditionType(in.Type) - out.Status = apiregistration.ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1_APIServiceCondition_To_apiregistration_APIServiceCondition is an autogenerated conversion function. -func Convert_v1_APIServiceCondition_To_apiregistration_APIServiceCondition(in *APIServiceCondition, out *apiregistration.APIServiceCondition, s conversion.Scope) error { - return autoConvert_v1_APIServiceCondition_To_apiregistration_APIServiceCondition(in, out, s) -} - -func autoConvert_apiregistration_APIServiceCondition_To_v1_APIServiceCondition(in *apiregistration.APIServiceCondition, out *APIServiceCondition, s conversion.Scope) error { - out.Type = APIServiceConditionType(in.Type) - out.Status = ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_apiregistration_APIServiceCondition_To_v1_APIServiceCondition is an autogenerated conversion function. -func Convert_apiregistration_APIServiceCondition_To_v1_APIServiceCondition(in *apiregistration.APIServiceCondition, out *APIServiceCondition, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceCondition_To_v1_APIServiceCondition(in, out, s) -} - -func autoConvert_v1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apiregistration.APIService, len(*in)) - for i := range *in { - if err := Convert_v1_APIService_To_apiregistration_APIService(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1_APIServiceList_To_apiregistration_APIServiceList is an autogenerated conversion function. -func Convert_v1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error { - return autoConvert_v1_APIServiceList_To_apiregistration_APIServiceList(in, out, s) -} - -func autoConvert_apiregistration_APIServiceList_To_v1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIService, len(*in)) - for i := range *in { - if err := Convert_apiregistration_APIService_To_v1_APIService(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_apiregistration_APIServiceList_To_v1_APIServiceList is an autogenerated conversion function. -func Convert_apiregistration_APIServiceList_To_v1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceList_To_v1_APIServiceList(in, out, s) -} - -func autoConvert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error { - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(apiregistration.ServiceReference) - if err := Convert_v1_ServiceReference_To_apiregistration_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.Group = in.Group - out.Version = in.Version - out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.GroupPriorityMinimum = in.GroupPriorityMinimum - out.VersionPriority = in.VersionPriority - return nil -} - -// Convert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec is an autogenerated conversion function. -func Convert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error { - return autoConvert_v1_APIServiceSpec_To_apiregistration_APIServiceSpec(in, out, s) -} - -func autoConvert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error { - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - if err := Convert_apiregistration_ServiceReference_To_v1_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.Group = in.Group - out.Version = in.Version - out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.GroupPriorityMinimum = in.GroupPriorityMinimum - out.VersionPriority = in.VersionPriority - return nil -} - -// Convert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec is an autogenerated conversion function. -func Convert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceSpec_To_v1_APIServiceSpec(in, out, s) -} - -func autoConvert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error { - out.Conditions = *(*[]apiregistration.APIServiceCondition)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus is an autogenerated conversion function. -func Convert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error { - return autoConvert_v1_APIServiceStatus_To_apiregistration_APIServiceStatus(in, out, s) -} - -func autoConvert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error { - out.Conditions = *(*[]APIServiceCondition)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus is an autogenerated conversion function. -func Convert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceStatus_To_v1_APIServiceStatus(in, out, s) -} - -func autoConvert_v1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - if err := metav1.Convert_Pointer_int32_To_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_v1_ServiceReference_To_apiregistration_ServiceReference is an autogenerated conversion function. -func Convert_v1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error { - return autoConvert_v1_ServiceReference_To_apiregistration_ServiceReference(in, out, s) -} - -func autoConvert_apiregistration_ServiceReference_To_v1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - if err := metav1.Convert_int32_To_Pointer_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_apiregistration_ServiceReference_To_v1_ServiceReference is an autogenerated conversion function. -func Convert_apiregistration_ServiceReference_To_v1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error { - return autoConvert_apiregistration_ServiceReference_To_v1_ServiceReference(in, out, s) -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.deepcopy.go deleted file mode 100644 index 638877245..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.deepcopy.go +++ /dev/null @@ -1,174 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1 - -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 *APIService) DeepCopyInto(out *APIService) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIService. -func (in *APIService) DeepCopy() *APIService { - if in == nil { - return nil - } - out := new(APIService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIService) 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 *APIServiceCondition) DeepCopyInto(out *APIServiceCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceCondition. -func (in *APIServiceCondition) DeepCopy() *APIServiceCondition { - if in == nil { - return nil - } - out := new(APIServiceCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceList) DeepCopyInto(out *APIServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceList. -func (in *APIServiceList) DeepCopy() *APIServiceList { - if in == nil { - return nil - } - out := new(APIServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServiceList) 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 *APIServiceSpec) DeepCopyInto(out *APIServiceSpec) { - *out = *in - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceSpec. -func (in *APIServiceSpec) DeepCopy() *APIServiceSpec { - if in == nil { - return nil - } - out := new(APIServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceStatus) DeepCopyInto(out *APIServiceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]APIServiceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceStatus. -func (in *APIServiceStatus) DeepCopy() *APIServiceStatus { - if in == nil { - return nil - } - out := new(APIServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.defaults.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.defaults.go deleted file mode 100644 index 175637ca5..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.defaults.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&APIService{}, func(obj interface{}) { SetObjectDefaults_APIService(obj.(*APIService)) }) - scheme.AddTypeDefaultingFunc(&APIServiceList{}, func(obj interface{}) { SetObjectDefaults_APIServiceList(obj.(*APIServiceList)) }) - return nil -} - -func SetObjectDefaults_APIService(in *APIService) { - if in.Spec.Service != nil { - SetDefaults_ServiceReference(in.Spec.Service) - } -} - -func SetObjectDefaults_APIServiceList(in *APIServiceList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_APIService(a) - } -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.model_name.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.model_name.go deleted file mode 100644 index 5a46c2cb5..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.model_name.go +++ /dev/null @@ -1,52 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIService) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceCondition) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceList) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceSpec) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceStatus) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceReference) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference" -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index 14d3e1f48..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,34 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1 - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *APIService) APILifecycleIntroduced() (major, minor int) { - return 1, 10 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *APIServiceList) APILifecycleIntroduced() (major, minor int) { - return 1, 10 -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/defaults.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/defaults.go deleted file mode 100644 index d9c5af94e..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/defaults.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2019 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 v1beta1 - -import ( - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/utils/ptr" -) - -func addDefaultingFuncs(scheme *runtime.Scheme) error { - return RegisterDefaults(scheme) -} - -// SetDefaults_ServiceReference sets defaults for AuditSync Webhook's ServiceReference -func SetDefaults_ServiceReference(obj *ServiceReference) { - if obj.Port == nil { - obj.Port = ptr.To[int32](443) - } -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go deleted file mode 100644 index 07ee950de..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/doc.go +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2016 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. -*/ - -// +k8s:deepcopy-gen=package -// +k8s:protobuf-gen=package -// +k8s:conversion-gen=k8s.io/kube-aggregator/pkg/apis/apiregistration -// +k8s:openapi-gen=true -// +k8s:defaulter-gen=TypeMeta -// +k8s:prerelease-lifecycle-gen=true -// +k8s:openapi-model-package=io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1 - -// +groupName=apiregistration.k8s.io - -// Package v1beta1 contains the API Registration API, which is responsible for -// registering an API `Group`/`Version` with another kubernetes like API server. -// The `APIService` holds information about the other API server in -// `APIServiceSpec` type as well as general `TypeMeta` and `ObjectMeta`. The -// `APIServiceSpec` type have the main configuration needed to do the -// aggregation. Any request coming for specified `Group`/`Version` will be -// directed to the service defined by `ServiceReference` (on port 443) after -// validating the target using provided `CABundle` or skipping validation -// if development flag `InsecureSkipTLSVerify` is set. `Priority` is controlling -// the order of this API group in the overall discovery document. -// The return status is a set of conditions for this aggregation. Currently -// there is only one condition named "Available", if true, it means the -// api/server requests will be redirected to specified API server. -package v1beta1 diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.pb.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.pb.go deleted file mode 100644 index 5ae842edc..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.pb.go +++ /dev/null @@ -1,1574 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto - -package v1beta1 - -import ( - fmt "fmt" - - io "io" - - math_bits "math/bits" - reflect "reflect" - strings "strings" -) - -func (m *APIService) Reset() { *m = APIService{} } - -func (m *APIServiceCondition) Reset() { *m = APIServiceCondition{} } - -func (m *APIServiceList) Reset() { *m = APIServiceList{} } - -func (m *APIServiceSpec) Reset() { *m = APIServiceSpec{} } - -func (m *APIServiceStatus) Reset() { *m = APIServiceStatus{} } - -func (m *ServiceReference) Reset() { *m = ServiceReference{} } - -func (m *APIService) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIService) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIService) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.Status.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - { - size, err := m.Spec.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - { - size, err := m.ObjectMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceCondition) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceCondition) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceCondition) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x2a - i -= len(m.Reason) - copy(dAtA[i:], m.Reason) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Reason))) - i-- - dAtA[i] = 0x22 - { - size, err := m.LastTransitionTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - i -= len(m.Status) - copy(dAtA[i:], m.Status) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Status))) - i-- - dAtA[i] = 0x12 - i -= len(m.Type) - copy(dAtA[i:], m.Type) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Type))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceList) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceList) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceList) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Items) > 0 { - for iNdEx := len(m.Items) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Items[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - { - size, err := m.ListMeta.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func (m *APIServiceSpec) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceSpec) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceSpec) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - i = encodeVarintGenerated(dAtA, i, uint64(m.VersionPriority)) - i-- - dAtA[i] = 0x40 - i = encodeVarintGenerated(dAtA, i, uint64(m.GroupPriorityMinimum)) - i-- - dAtA[i] = 0x38 - if m.CABundle != nil { - i -= len(m.CABundle) - copy(dAtA[i:], m.CABundle) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.CABundle))) - i-- - dAtA[i] = 0x2a - } - i-- - if m.InsecureSkipTLSVerify { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x20 - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - i -= len(m.Group) - copy(dAtA[i:], m.Group) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Group))) - i-- - dAtA[i] = 0x12 - if m.Service != nil { - { - size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *APIServiceStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *APIServiceStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *APIServiceStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Conditions) > 0 { - for iNdEx := len(m.Conditions) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Conditions[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenerated(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *ServiceReference) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ServiceReference) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ServiceReference) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Port != nil { - i = encodeVarintGenerated(dAtA, i, uint64(*m.Port)) - i-- - dAtA[i] = 0x18 - } - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - i -= len(m.Namespace) - copy(dAtA[i:], m.Namespace) - i = encodeVarintGenerated(dAtA, i, uint64(len(m.Namespace))) - i-- - dAtA[i] = 0xa - return len(dAtA) - i, nil -} - -func encodeVarintGenerated(dAtA []byte, offset int, v uint64) int { - offset -= sovGenerated(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *APIService) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ObjectMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Spec.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = m.Status.Size() - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *APIServiceCondition) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Type) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Status) - n += 1 + l + sovGenerated(uint64(l)) - l = m.LastTransitionTime.Size() - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Reason) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Message) - n += 1 + l + sovGenerated(uint64(l)) - return n -} - -func (m *APIServiceList) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = m.ListMeta.Size() - n += 1 + l + sovGenerated(uint64(l)) - if len(m.Items) > 0 { - for _, e := range m.Items { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *APIServiceSpec) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Service != nil { - l = m.Service.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - l = len(m.Group) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Version) - n += 1 + l + sovGenerated(uint64(l)) - n += 2 - if m.CABundle != nil { - l = len(m.CABundle) - n += 1 + l + sovGenerated(uint64(l)) - } - n += 1 + sovGenerated(uint64(m.GroupPriorityMinimum)) - n += 1 + sovGenerated(uint64(m.VersionPriority)) - return n -} - -func (m *APIServiceStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Conditions) > 0 { - for _, e := range m.Conditions { - l = e.Size() - n += 1 + l + sovGenerated(uint64(l)) - } - } - return n -} - -func (m *ServiceReference) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Namespace) - n += 1 + l + sovGenerated(uint64(l)) - l = len(m.Name) - n += 1 + l + sovGenerated(uint64(l)) - if m.Port != nil { - n += 1 + sovGenerated(uint64(*m.Port)) - } - return n -} - -func sovGenerated(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozGenerated(x uint64) (n int) { - return sovGenerated(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (this *APIService) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIService{`, - `ObjectMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ObjectMeta), "ObjectMeta", "v1.ObjectMeta", 1), `&`, ``, 1) + `,`, - `Spec:` + strings.Replace(strings.Replace(this.Spec.String(), "APIServiceSpec", "APIServiceSpec", 1), `&`, ``, 1) + `,`, - `Status:` + strings.Replace(strings.Replace(this.Status.String(), "APIServiceStatus", "APIServiceStatus", 1), `&`, ``, 1) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceCondition) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIServiceCondition{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `LastTransitionTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LastTransitionTime), "Time", "v1.Time", 1), `&`, ``, 1) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `Message:` + fmt.Sprintf("%v", this.Message) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceList) String() string { - if this == nil { - return "nil" - } - repeatedStringForItems := "[]APIService{" - for _, f := range this.Items { - repeatedStringForItems += strings.Replace(strings.Replace(f.String(), "APIService", "APIService", 1), `&`, ``, 1) + "," - } - repeatedStringForItems += "}" - s := strings.Join([]string{`&APIServiceList{`, - `ListMeta:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ListMeta), "ListMeta", "v1.ListMeta", 1), `&`, ``, 1) + `,`, - `Items:` + repeatedStringForItems + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceSpec) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&APIServiceSpec{`, - `Service:` + strings.Replace(this.Service.String(), "ServiceReference", "ServiceReference", 1) + `,`, - `Group:` + fmt.Sprintf("%v", this.Group) + `,`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `InsecureSkipTLSVerify:` + fmt.Sprintf("%v", this.InsecureSkipTLSVerify) + `,`, - `CABundle:` + valueToStringGenerated(this.CABundle) + `,`, - `GroupPriorityMinimum:` + fmt.Sprintf("%v", this.GroupPriorityMinimum) + `,`, - `VersionPriority:` + fmt.Sprintf("%v", this.VersionPriority) + `,`, - `}`, - }, "") - return s -} -func (this *APIServiceStatus) String() string { - if this == nil { - return "nil" - } - repeatedStringForConditions := "[]APIServiceCondition{" - for _, f := range this.Conditions { - repeatedStringForConditions += strings.Replace(strings.Replace(f.String(), "APIServiceCondition", "APIServiceCondition", 1), `&`, ``, 1) + "," - } - repeatedStringForConditions += "}" - s := strings.Join([]string{`&APIServiceStatus{`, - `Conditions:` + repeatedStringForConditions + `,`, - `}`, - }, "") - return s -} -func (this *ServiceReference) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ServiceReference{`, - `Namespace:` + fmt.Sprintf("%v", this.Namespace) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Port:` + valueToStringGenerated(this.Port) + `,`, - `}`, - }, "") - return s -} -func valueToStringGenerated(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} -func (m *APIService) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIService: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIService: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ObjectMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ObjectMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Spec", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Spec.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.Status.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceCondition) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceCondition: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceCondition: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Type = APIServiceConditionType(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Status = ConditionStatus(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LastTransitionTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.LastTransitionTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Reason = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceList) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceList: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceList: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ListMeta", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.ListMeta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Items", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Items = append(m.Items, APIService{}) - if err := m.Items[len(m.Items)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceSpec) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceSpec: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceSpec: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Service == nil { - m.Service = &ServiceReference{} - } - if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Group", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Group = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field InsecureSkipTLSVerify", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.InsecureSkipTLSVerify = bool(v != 0) - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CABundle", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CABundle = append(m.CABundle[:0], dAtA[iNdEx:postIndex]...) - if m.CABundle == nil { - m.CABundle = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field GroupPriorityMinimum", wireType) - } - m.GroupPriorityMinimum = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.GroupPriorityMinimum |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VersionPriority", wireType) - } - m.VersionPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VersionPriority |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *APIServiceStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: APIServiceStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: APIServiceStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Conditions", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Conditions = append(m.Conditions, APIServiceCondition{}) - if err := m.Conditions[len(m.Conditions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *ServiceReference) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ServiceReference: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ServiceReference: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Namespace = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenerated - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenerated - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var v int32 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenerated - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Port = &v - default: - iNdEx = preIndex - skippy, err := skipGenerated(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenerated - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipGenerated(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowGenerated - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthGenerated - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupGenerated - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthGenerated - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthGenerated = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowGenerated = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupGenerated = fmt.Errorf("proto: unexpected end of group") -) diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto deleted file mode 100644 index 938039f4d..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/generated.proto +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright 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. -*/ - - -// This file was autogenerated by go-to-protobuf. Do not edit it manually! - -syntax = "proto2"; - -package k8s.io.kube_aggregator.pkg.apis.apiregistration.v1beta1; - -import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/generated.proto"; -import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto"; - -// Package-wide variables from generator "generated". -option go_package = "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1"; - -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -message APIService { - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1; - - // Spec contains information for locating and communicating with a server - optional APIServiceSpec spec = 2; - - // Status contains derived information about an API server - optional APIServiceStatus status = 3; -} - -// APIServiceCondition describes the state of an APIService at a particular point -message APIServiceCondition { - // Type is the type of the condition. - optional string type = 1; - - // Status is the status of the condition. - // Can be True, False, Unknown. - optional string status = 2; - - // Last time the condition transitioned from one status to another. - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3; - - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - optional string reason = 4; - - // Human-readable message indicating details about last transition. - // +optional - optional string message = 5; -} - -// APIServiceList is a list of APIService objects. -message APIServiceList { - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - optional .k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1; - - // Items is the list of APIService - repeated APIService items = 2; -} - -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -message APIServiceSpec { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - // +optional - optional ServiceReference service = 1; - - // Group is the API group name this server hosts - optional string group = 2; - - // Version is the API version this server hosts. For example, "v1" - optional string version = 3; - - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - optional bool insecureSkipTLSVerify = 4; - - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - // +listType=atomic - // +optional - optional bytes caBundle = 5; - - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - optional int32 groupPriorityMinimum = 7; - - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - optional int32 versionPriority = 8; -} - -// APIServiceStatus contains derived information about an API server -message APIServiceStatus { - // Current service state of apiService. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - repeated APIServiceCondition conditions = 1; -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -message ServiceReference { - // Namespace is the namespace of the service - optional string namespace = 1; - - // Name is the name of the service - optional string name = 2; - - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - optional int32 port = 3; -} - diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/register.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/register.go deleted file mode 100644 index baa179571..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/register.go +++ /dev/null @@ -1,61 +0,0 @@ -/* -Copyright 2016 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 v1beta1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the API group for apiregistration -const GroupName = "apiregistration.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1beta1"} - -// Resource takes an unqualified resource and returns back a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // SchemeBuilder is the scheme builder with scheme init functions to run for this API package - // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - SchemeBuilder runtime.SchemeBuilder - localSchemeBuilder = &SchemeBuilder - // AddToScheme is a common registration function for mapping packaged scoped group & version keys to a scheme - AddToScheme = localSchemeBuilder.AddToScheme -) - -func init() { - // We only register manually written functions here. The registration of the - // generated functions takes place in the generated files. The separation - // makes the code compile even when the generated files are missing. - localSchemeBuilder.Register(addKnownTypes, addDefaultingFuncs) -} - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &APIService{}, - &APIServiceList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go deleted file mode 100644 index 83fb8445f..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/types.go +++ /dev/null @@ -1,168 +0,0 @@ -/* -Copyright 2016 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 v1beta1 - -import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.7 -// +k8s:prerelease-lifecycle-gen:deprecated=1.19 -// +k8s:prerelease-lifecycle-gen:replacement=apiregistration.k8s.io,v1,APIServiceList - -// APIServiceList is a list of APIService objects. -type APIServiceList struct { - metav1.TypeMeta `json:",inline"` - // Standard list metadata - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ListMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Items is the list of APIService - Items []APIService `json:"items" protobuf:"bytes,2,rep,name=items"` -} - -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReference struct { - // Namespace is the namespace of the service - Namespace string `json:"namespace,omitempty" protobuf:"bytes,1,opt,name=namespace"` - // Name is the name of the service - Name string `json:"name,omitempty" protobuf:"bytes,2,opt,name=name"` - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - // +optional - Port *int32 `json:"port,omitempty" protobuf:"varint,3,opt,name=port"` -} - -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -type APIServiceSpec struct { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - // +optional - Service *ServiceReference `json:"service,omitempty" protobuf:"bytes,1,opt,name=service"` - // Group is the API group name this server hosts - Group string `json:"group,omitempty" protobuf:"bytes,2,opt,name=group"` - // Version is the API version this server hosts. For example, "v1" - Version string `json:"version,omitempty" protobuf:"bytes,3,opt,name=version"` - - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - InsecureSkipTLSVerify bool `json:"insecureSkipTLSVerify,omitempty" protobuf:"varint,4,opt,name=insecureSkipTLSVerify"` - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - // +listType=atomic - // +optional - CABundle []byte `json:"caBundle,omitempty" protobuf:"bytes,5,opt,name=caBundle"` - - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - GroupPriorityMinimum int32 `json:"groupPriorityMinimum" protobuf:"varint,7,opt,name=groupPriorityMinimum"` - - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - VersionPriority int32 `json:"versionPriority" protobuf:"varint,8,opt,name=versionPriority"` - - // leaving this here so everyone remembers why proto index 6 is skipped - // Priority int64 `json:"priority" protobuf:"varint,6,opt,name=priority"` -} - -// ConditionStatus indicates the status of a condition (true, false, or unknown). -type ConditionStatus string - -// These are valid condition statuses. "ConditionTrue" means a resource is in the condition; -// "ConditionFalse" means a resource is not in the condition; "ConditionUnknown" means kubernetes -// can't decide if a resource is in the condition or not. In the future, we could add other -// intermediate conditions, e.g. ConditionDegraded. -const ( - ConditionTrue ConditionStatus = "True" - ConditionFalse ConditionStatus = "False" - ConditionUnknown ConditionStatus = "Unknown" -) - -// APIServiceConditionType is a valid value for APIServiceCondition.Type -type APIServiceConditionType string - -const ( - // Available indicates that the service exists and is reachable - Available APIServiceConditionType = "Available" -) - -// APIServiceCondition describes the state of an APIService at a particular point -type APIServiceCondition struct { - // Type is the type of the condition. - Type APIServiceConditionType `json:"type" protobuf:"bytes,1,opt,name=type,casttype=APIServiceConditionType"` - // Status is the status of the condition. - // Can be True, False, Unknown. - Status ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"` - // Last time the condition transitioned from one status to another. - // +optional - LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,3,opt,name=lastTransitionTime"` - // Unique, one-word, CamelCase reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty" protobuf:"bytes,4,opt,name=reason"` - // Human-readable message indicating details about last transition. - // +optional - Message string `json:"message,omitempty" protobuf:"bytes,5,opt,name=message"` -} - -// APIServiceStatus contains derived information about an API server -type APIServiceStatus struct { - // Current service state of apiService. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - // +listType=map - // +listMapKey=type - Conditions []APIServiceCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` -} - -// +genclient -// +genclient:nonNamespaced -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +k8s:prerelease-lifecycle-gen:introduced=1.7 -// +k8s:prerelease-lifecycle-gen:deprecated=1.19 -// +k8s:prerelease-lifecycle-gen:replacement=apiregistration.k8s.io,v1,APIService - -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -type APIService struct { - metav1.TypeMeta `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - // +optional - metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` - - // Spec contains information for locating and communicating with a server - Spec APIServiceSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` - // Status contains derived information about an API server - Status APIServiceStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.conversion.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.conversion.go deleted file mode 100644 index 665b959f7..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.conversion.go +++ /dev/null @@ -1,299 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by conversion-gen. DO NOT EDIT. - -package v1beta1 - -import ( - unsafe "unsafe" - - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - conversion "k8s.io/apimachinery/pkg/conversion" - runtime "k8s.io/apimachinery/pkg/runtime" - apiregistration "k8s.io/kube-aggregator/pkg/apis/apiregistration" -) - -func init() { - localSchemeBuilder.Register(RegisterConversions) -} - -// RegisterConversions adds conversion functions to the given scheme. -// Public to allow building arbitrary schemes. -func RegisterConversions(s *runtime.Scheme) error { - if err := s.AddGeneratedConversionFunc((*APIService)(nil), (*apiregistration.APIService)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIService_To_apiregistration_APIService(a.(*APIService), b.(*apiregistration.APIService), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIService)(nil), (*APIService)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIService_To_v1beta1_APIService(a.(*apiregistration.APIService), b.(*APIService), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceCondition)(nil), (*apiregistration.APIServiceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServiceCondition_To_apiregistration_APIServiceCondition(a.(*APIServiceCondition), b.(*apiregistration.APIServiceCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceCondition)(nil), (*APIServiceCondition)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceCondition_To_v1beta1_APIServiceCondition(a.(*apiregistration.APIServiceCondition), b.(*APIServiceCondition), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceList)(nil), (*apiregistration.APIServiceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServiceList_To_apiregistration_APIServiceList(a.(*APIServiceList), b.(*apiregistration.APIServiceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceList)(nil), (*APIServiceList)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceList_To_v1beta1_APIServiceList(a.(*apiregistration.APIServiceList), b.(*APIServiceList), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceSpec)(nil), (*apiregistration.APIServiceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec(a.(*APIServiceSpec), b.(*apiregistration.APIServiceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceSpec)(nil), (*APIServiceSpec)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec(a.(*apiregistration.APIServiceSpec), b.(*APIServiceSpec), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*APIServiceStatus)(nil), (*apiregistration.APIServiceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus(a.(*APIServiceStatus), b.(*apiregistration.APIServiceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.APIServiceStatus)(nil), (*APIServiceStatus)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus(a.(*apiregistration.APIServiceStatus), b.(*APIServiceStatus), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*ServiceReference)(nil), (*apiregistration.ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_v1beta1_ServiceReference_To_apiregistration_ServiceReference(a.(*ServiceReference), b.(*apiregistration.ServiceReference), scope) - }); err != nil { - return err - } - if err := s.AddGeneratedConversionFunc((*apiregistration.ServiceReference)(nil), (*ServiceReference)(nil), func(a, b interface{}, scope conversion.Scope) error { - return Convert_apiregistration_ServiceReference_To_v1beta1_ServiceReference(a.(*apiregistration.ServiceReference), b.(*ServiceReference), scope) - }); err != nil { - return err - } - return nil -} - -func autoConvert_v1beta1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_APIService_To_apiregistration_APIService is an autogenerated conversion function. -func Convert_v1beta1_APIService_To_apiregistration_APIService(in *APIService, out *apiregistration.APIService, s conversion.Scope) error { - return autoConvert_v1beta1_APIService_To_apiregistration_APIService(in, out, s) -} - -func autoConvert_apiregistration_APIService_To_v1beta1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - out.ObjectMeta = in.ObjectMeta - if err := Convert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec(&in.Spec, &out.Spec, s); err != nil { - return err - } - if err := Convert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus(&in.Status, &out.Status, s); err != nil { - return err - } - return nil -} - -// Convert_apiregistration_APIService_To_v1beta1_APIService is an autogenerated conversion function. -func Convert_apiregistration_APIService_To_v1beta1_APIService(in *apiregistration.APIService, out *APIService, s conversion.Scope) error { - return autoConvert_apiregistration_APIService_To_v1beta1_APIService(in, out, s) -} - -func autoConvert_v1beta1_APIServiceCondition_To_apiregistration_APIServiceCondition(in *APIServiceCondition, out *apiregistration.APIServiceCondition, s conversion.Scope) error { - out.Type = apiregistration.APIServiceConditionType(in.Type) - out.Status = apiregistration.ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_v1beta1_APIServiceCondition_To_apiregistration_APIServiceCondition is an autogenerated conversion function. -func Convert_v1beta1_APIServiceCondition_To_apiregistration_APIServiceCondition(in *APIServiceCondition, out *apiregistration.APIServiceCondition, s conversion.Scope) error { - return autoConvert_v1beta1_APIServiceCondition_To_apiregistration_APIServiceCondition(in, out, s) -} - -func autoConvert_apiregistration_APIServiceCondition_To_v1beta1_APIServiceCondition(in *apiregistration.APIServiceCondition, out *APIServiceCondition, s conversion.Scope) error { - out.Type = APIServiceConditionType(in.Type) - out.Status = ConditionStatus(in.Status) - out.LastTransitionTime = in.LastTransitionTime - out.Reason = in.Reason - out.Message = in.Message - return nil -} - -// Convert_apiregistration_APIServiceCondition_To_v1beta1_APIServiceCondition is an autogenerated conversion function. -func Convert_apiregistration_APIServiceCondition_To_v1beta1_APIServiceCondition(in *apiregistration.APIServiceCondition, out *APIServiceCondition, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceCondition_To_v1beta1_APIServiceCondition(in, out, s) -} - -func autoConvert_v1beta1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apiregistration.APIService, len(*in)) - for i := range *in { - if err := Convert_v1beta1_APIService_To_apiregistration_APIService(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_v1beta1_APIServiceList_To_apiregistration_APIServiceList is an autogenerated conversion function. -func Convert_v1beta1_APIServiceList_To_apiregistration_APIServiceList(in *APIServiceList, out *apiregistration.APIServiceList, s conversion.Scope) error { - return autoConvert_v1beta1_APIServiceList_To_apiregistration_APIServiceList(in, out, s) -} - -func autoConvert_apiregistration_APIServiceList_To_v1beta1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error { - out.ListMeta = in.ListMeta - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIService, len(*in)) - for i := range *in { - if err := Convert_apiregistration_APIService_To_v1beta1_APIService(&(*in)[i], &(*out)[i], s); err != nil { - return err - } - } - } else { - out.Items = nil - } - return nil -} - -// Convert_apiregistration_APIServiceList_To_v1beta1_APIServiceList is an autogenerated conversion function. -func Convert_apiregistration_APIServiceList_To_v1beta1_APIServiceList(in *apiregistration.APIServiceList, out *APIServiceList, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceList_To_v1beta1_APIServiceList(in, out, s) -} - -func autoConvert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error { - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(apiregistration.ServiceReference) - if err := Convert_v1beta1_ServiceReference_To_apiregistration_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.Group = in.Group - out.Version = in.Version - out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.GroupPriorityMinimum = in.GroupPriorityMinimum - out.VersionPriority = in.VersionPriority - return nil -} - -// Convert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec is an autogenerated conversion function. -func Convert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec(in *APIServiceSpec, out *apiregistration.APIServiceSpec, s conversion.Scope) error { - return autoConvert_v1beta1_APIServiceSpec_To_apiregistration_APIServiceSpec(in, out, s) -} - -func autoConvert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error { - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - if err := Convert_apiregistration_ServiceReference_To_v1beta1_ServiceReference(*in, *out, s); err != nil { - return err - } - } else { - out.Service = nil - } - out.Group = in.Group - out.Version = in.Version - out.InsecureSkipTLSVerify = in.InsecureSkipTLSVerify - out.CABundle = *(*[]byte)(unsafe.Pointer(&in.CABundle)) - out.GroupPriorityMinimum = in.GroupPriorityMinimum - out.VersionPriority = in.VersionPriority - return nil -} - -// Convert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec is an autogenerated conversion function. -func Convert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec(in *apiregistration.APIServiceSpec, out *APIServiceSpec, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceSpec_To_v1beta1_APIServiceSpec(in, out, s) -} - -func autoConvert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error { - out.Conditions = *(*[]apiregistration.APIServiceCondition)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus is an autogenerated conversion function. -func Convert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus(in *APIServiceStatus, out *apiregistration.APIServiceStatus, s conversion.Scope) error { - return autoConvert_v1beta1_APIServiceStatus_To_apiregistration_APIServiceStatus(in, out, s) -} - -func autoConvert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error { - out.Conditions = *(*[]APIServiceCondition)(unsafe.Pointer(&in.Conditions)) - return nil -} - -// Convert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus is an autogenerated conversion function. -func Convert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus(in *apiregistration.APIServiceStatus, out *APIServiceStatus, s conversion.Scope) error { - return autoConvert_apiregistration_APIServiceStatus_To_v1beta1_APIServiceStatus(in, out, s) -} - -func autoConvert_v1beta1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - if err := v1.Convert_Pointer_int32_To_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_v1beta1_ServiceReference_To_apiregistration_ServiceReference is an autogenerated conversion function. -func Convert_v1beta1_ServiceReference_To_apiregistration_ServiceReference(in *ServiceReference, out *apiregistration.ServiceReference, s conversion.Scope) error { - return autoConvert_v1beta1_ServiceReference_To_apiregistration_ServiceReference(in, out, s) -} - -func autoConvert_apiregistration_ServiceReference_To_v1beta1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error { - out.Namespace = in.Namespace - out.Name = in.Name - if err := v1.Convert_int32_To_Pointer_int32(&in.Port, &out.Port, s); err != nil { - return err - } - return nil -} - -// Convert_apiregistration_ServiceReference_To_v1beta1_ServiceReference is an autogenerated conversion function. -func Convert_apiregistration_ServiceReference_To_v1beta1_ServiceReference(in *apiregistration.ServiceReference, out *ServiceReference, s conversion.Scope) error { - return autoConvert_apiregistration_ServiceReference_To_v1beta1_ServiceReference(in, out, s) -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go deleted file mode 100644 index 989688e9f..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.deepcopy.go +++ /dev/null @@ -1,174 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1beta1 - -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 *APIService) DeepCopyInto(out *APIService) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIService. -func (in *APIService) DeepCopy() *APIService { - if in == nil { - return nil - } - out := new(APIService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIService) 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 *APIServiceCondition) DeepCopyInto(out *APIServiceCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceCondition. -func (in *APIServiceCondition) DeepCopy() *APIServiceCondition { - if in == nil { - return nil - } - out := new(APIServiceCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceList) DeepCopyInto(out *APIServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceList. -func (in *APIServiceList) DeepCopy() *APIServiceList { - if in == nil { - return nil - } - out := new(APIServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServiceList) 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 *APIServiceSpec) DeepCopyInto(out *APIServiceSpec) { - *out = *in - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - (*in).DeepCopyInto(*out) - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceSpec. -func (in *APIServiceSpec) DeepCopy() *APIServiceSpec { - if in == nil { - return nil - } - out := new(APIServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceStatus) DeepCopyInto(out *APIServiceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]APIServiceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceStatus. -func (in *APIServiceStatus) DeepCopy() *APIServiceStatus { - if in == nil { - return nil - } - out := new(APIServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - if in.Port != nil { - in, out := &in.Port, &out.Port - *out = new(int32) - **out = **in - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.defaults.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.defaults.go deleted file mode 100644 index 034247c30..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.defaults.go +++ /dev/null @@ -1,48 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by defaulter-gen. DO NOT EDIT. - -package v1beta1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// RegisterDefaults adds defaulters functions to the given scheme. -// Public to allow building arbitrary schemes. -// All generated defaulters are covering - they call all nested defaulters. -func RegisterDefaults(scheme *runtime.Scheme) error { - scheme.AddTypeDefaultingFunc(&APIService{}, func(obj interface{}) { SetObjectDefaults_APIService(obj.(*APIService)) }) - scheme.AddTypeDefaultingFunc(&APIServiceList{}, func(obj interface{}) { SetObjectDefaults_APIServiceList(obj.(*APIServiceList)) }) - return nil -} - -func SetObjectDefaults_APIService(in *APIService) { - if in.Spec.Service != nil { - SetDefaults_ServiceReference(in.Spec.Service) - } -} - -func SetObjectDefaults_APIServiceList(in *APIServiceList) { - for i := range in.Items { - a := &in.Items[i] - SetObjectDefaults_APIService(a) - } -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.model_name.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.model_name.go deleted file mode 100644 index 490a39e88..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.model_name.go +++ /dev/null @@ -1,52 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by openapi-gen. DO NOT EDIT. - -package v1beta1 - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIService) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceCondition) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceList) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceList" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceSpec) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in APIServiceStatus) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus" -} - -// OpenAPIModelName returns the OpenAPI model name for this type. -func (in ServiceReference) OpenAPIModelName() string { - return "io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference" -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go deleted file mode 100644 index e29944718..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1/zz_generated.prerelease-lifecycle.go +++ /dev/null @@ -1,74 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by prerelease-lifecycle-gen. DO NOT EDIT. - -package v1beta1 - -import ( - schema "k8s.io/apimachinery/pkg/runtime/schema" -) - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *APIService) APILifecycleIntroduced() (major, minor int) { - return 1, 7 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *APIService) APILifecycleDeprecated() (major, minor int) { - return 1, 19 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *APIService) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1", Kind: "APIService"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *APIService) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} - -// APILifecycleIntroduced is an autogenerated function, returning the release in which the API struct was introduced as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:introduced" tags in types.go. -func (in *APIServiceList) APILifecycleIntroduced() (major, minor int) { - return 1, 7 -} - -// APILifecycleDeprecated is an autogenerated function, returning the release in which the API struct was or will be deprecated as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:deprecated" tags in types.go or "k8s:prerelease-lifecycle-gen:introduced" plus three minor. -func (in *APIServiceList) APILifecycleDeprecated() (major, minor int) { - return 1, 19 -} - -// APILifecycleReplacement is an autogenerated function, returning the group, version, and kind that should be used instead of this deprecated type. -// It is controlled by "k8s:prerelease-lifecycle-gen:replacement=,," tags in types.go. -func (in *APIServiceList) APILifecycleReplacement() schema.GroupVersionKind { - return schema.GroupVersionKind{Group: "apiregistration.k8s.io", Version: "v1", Kind: "APIServiceList"} -} - -// APILifecycleRemoved is an autogenerated function, returning the release in which the API is no longer served as int versions of major and minor for comparison. -// It is controlled by "k8s:prerelease-lifecycle-gen:removed" tags in types.go or "k8s:prerelease-lifecycle-gen:deprecated" plus three minor. -func (in *APIServiceList) APILifecycleRemoved() (major, minor int) { - return 1, 22 -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go b/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go deleted file mode 100644 index 45d0347c0..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/apis/apiregistration/zz_generated.deepcopy.go +++ /dev/null @@ -1,221 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package apiregistration - -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 *APIService) DeepCopyInto(out *APIService) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIService. -func (in *APIService) DeepCopy() *APIService { - if in == nil { - return nil - } - out := new(APIService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIService) 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 *APIServiceCondition) DeepCopyInto(out *APIServiceCondition) { - *out = *in - in.LastTransitionTime.DeepCopyInto(&out.LastTransitionTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceCondition. -func (in *APIServiceCondition) DeepCopy() *APIServiceCondition { - if in == nil { - return nil - } - out := new(APIServiceCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceList) DeepCopyInto(out *APIServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]APIService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceList. -func (in *APIServiceList) DeepCopy() *APIServiceList { - if in == nil { - return nil - } - out := new(APIServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServiceList) 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 *APIServiceSpec) DeepCopyInto(out *APIServiceSpec) { - *out = *in - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ServiceReference) - **out = **in - } - if in.CABundle != nil { - in, out := &in.CABundle, &out.CABundle - *out = make([]byte, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceSpec. -func (in *APIServiceSpec) DeepCopy() *APIServiceSpec { - if in == nil { - return nil - } - out := new(APIServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceStatus) DeepCopyInto(out *APIServiceStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]APIServiceCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceStatus. -func (in *APIServiceStatus) DeepCopy() *APIServiceStatus { - if in == nil { - return nil - } - out := new(APIServiceStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ByGroupPriorityMinimum) DeepCopyInto(out *ByGroupPriorityMinimum) { - { - in := &in - *out = make(ByGroupPriorityMinimum, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(APIService) - (*in).DeepCopyInto(*out) - } - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ByGroupPriorityMinimum. -func (in ByGroupPriorityMinimum) DeepCopy() ByGroupPriorityMinimum { - if in == nil { - return nil - } - out := new(ByGroupPriorityMinimum) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in ByVersionPriority) DeepCopyInto(out *ByVersionPriority) { - { - in := &in - *out = make(ByVersionPriority, len(*in)) - for i := range *in { - if (*in)[i] != nil { - in, out := &(*in)[i], &(*out)[i] - *out = new(APIService) - (*in).DeepCopyInto(*out) - } - } - return - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ByVersionPriority. -func (in ByVersionPriority) DeepCopy() ByVersionPriority { - if in == nil { - return nil - } - out := new(ByVersionPriority) - in.DeepCopyInto(out) - return *out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceReference) DeepCopyInto(out *ServiceReference) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceReference. -func (in *ServiceReference) DeepCopy() *ServiceReference { - if in == nil { - return nil - } - out := new(ServiceReference) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservice.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservice.go deleted file mode 100644 index 7ed5fa113..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservice.go +++ /dev/null @@ -1,292 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - managedfields "k8s.io/apimachinery/pkg/util/managedfields" - metav1 "k8s.io/client-go/applyconfigurations/meta/v1" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - internal "k8s.io/kube-aggregator/pkg/client/applyconfiguration/internal" -) - -// APIServiceApplyConfiguration represents a declarative configuration of the APIService type for use -// with apply. -// -// APIService represents a server for a particular GroupVersion. -// Name must be "version.group". -type APIServiceApplyConfiguration struct { - metav1.TypeMetaApplyConfiguration `json:",inline"` - // Standard object's metadata. - // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` - // Spec contains information for locating and communicating with a server - Spec *APIServiceSpecApplyConfiguration `json:"spec,omitempty"` - // Status contains derived information about an API server - Status *APIServiceStatusApplyConfiguration `json:"status,omitempty"` -} - -// APIService constructs a declarative configuration of the APIService type for use with -// apply. -func APIService(name string) *APIServiceApplyConfiguration { - b := &APIServiceApplyConfiguration{} - b.WithName(name) - b.WithKind("APIService") - b.WithAPIVersion("apiregistration.k8s.io/v1") - return b -} - -// ExtractAPIServiceFrom extracts the applied configuration owned by fieldManager from -// aPIService for the specified subresource. Pass an empty string for subresource to extract -// the main resource. Common subresources include "status", "scale", etc. -// aPIService must be a unmodified APIService API object that was retrieved from the Kubernetes API. -// ExtractAPIServiceFrom provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAPIServiceFrom(aPIService *apiregistrationv1.APIService, fieldManager string, subresource string) (*APIServiceApplyConfiguration, error) { - b := &APIServiceApplyConfiguration{} - err := managedfields.ExtractInto(aPIService, internal.Parser().Type("io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService"), fieldManager, b, subresource) - if err != nil { - return nil, err - } - b.WithName(aPIService.Name) - - b.WithKind("APIService") - b.WithAPIVersion("apiregistration.k8s.io/v1") - return b, nil -} - -// ExtractAPIService extracts the applied configuration owned by fieldManager from -// aPIService. If no managedFields are found in aPIService for fieldManager, a -// APIServiceApplyConfiguration is returned with only the Name, Namespace (if applicable), -// APIVersion and Kind populated. It is possible that no managed fields were found for because other -// field managers have taken ownership of all the fields previously owned by fieldManager, or because -// the fieldManager never owned fields any fields. -// aPIService must be a unmodified APIService API object that was retrieved from the Kubernetes API. -// ExtractAPIService provides a way to perform a extract/modify-in-place/apply workflow. -// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously -// applied if another fieldManager has updated or force applied any of the previously applied fields. -func ExtractAPIService(aPIService *apiregistrationv1.APIService, fieldManager string) (*APIServiceApplyConfiguration, error) { - return ExtractAPIServiceFrom(aPIService, fieldManager, "") -} - -// ExtractAPIServiceStatus extracts the applied configuration owned by fieldManager from -// aPIService for the status subresource. -func ExtractAPIServiceStatus(aPIService *apiregistrationv1.APIService, fieldManager string) (*APIServiceApplyConfiguration, error) { - return ExtractAPIServiceFrom(aPIService, fieldManager, "status") -} - -func (b APIServiceApplyConfiguration) IsApplyConfiguration() {} - -// WithKind sets the Kind field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Kind field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithKind(value string) *APIServiceApplyConfiguration { - b.TypeMetaApplyConfiguration.Kind = &value - return b -} - -// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the APIVersion field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithAPIVersion(value string) *APIServiceApplyConfiguration { - b.TypeMetaApplyConfiguration.APIVersion = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithName(value string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Name = &value - return b -} - -// WithGenerateName sets the GenerateName field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GenerateName field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithGenerateName(value string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.GenerateName = &value - return b -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithNamespace(value string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Namespace = &value - return b -} - -// WithUID sets the UID field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the UID field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithUID(value types.UID) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.UID = &value - return b -} - -// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the ResourceVersion field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithResourceVersion(value string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.ResourceVersion = &value - return b -} - -// WithGeneration sets the Generation field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Generation field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithGeneration(value int64) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.Generation = &value - return b -} - -// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the CreationTimestamp field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.CreationTimestamp = &value - return b -} - -// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionTimestamp field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value - return b -} - -// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value - return b -} - -// WithLabels puts the entries into the Labels field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Labels field, -// overwriting an existing map entries in Labels field with the same key. -func (b *APIServiceApplyConfiguration) WithLabels(entries map[string]string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Labels[k] = v - } - return b -} - -// WithAnnotations puts the entries into the Annotations field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, the entries provided by each call will be put on the Annotations field, -// overwriting an existing map entries in Annotations field with the same key. -func (b *APIServiceApplyConfiguration) WithAnnotations(entries map[string]string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { - b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) - } - for k, v := range entries { - b.ObjectMetaApplyConfiguration.Annotations[k] = v - } - return b -} - -// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the OwnerReferences field. -func (b *APIServiceApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - if values[i] == nil { - panic("nil value passed to WithOwnerReferences") - } - b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) - } - return b -} - -// WithFinalizers adds the given value to the Finalizers field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Finalizers field. -func (b *APIServiceApplyConfiguration) WithFinalizers(values ...string) *APIServiceApplyConfiguration { - b.ensureObjectMetaApplyConfigurationExists() - for i := range values { - b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) - } - return b -} - -func (b *APIServiceApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { - if b.ObjectMetaApplyConfiguration == nil { - b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} - } -} - -// WithSpec sets the Spec field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Spec field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithSpec(value *APIServiceSpecApplyConfiguration) *APIServiceApplyConfiguration { - b.Spec = value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceApplyConfiguration) WithStatus(value *APIServiceStatusApplyConfiguration) *APIServiceApplyConfiguration { - b.Status = value - return b -} - -// GetKind retrieves the value of the Kind field in the declarative configuration. -func (b *APIServiceApplyConfiguration) GetKind() *string { - return b.TypeMetaApplyConfiguration.Kind -} - -// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. -func (b *APIServiceApplyConfiguration) GetAPIVersion() *string { - return b.TypeMetaApplyConfiguration.APIVersion -} - -// GetName retrieves the value of the Name field in the declarative configuration. -func (b *APIServiceApplyConfiguration) GetName() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Name -} - -// GetNamespace retrieves the value of the Namespace field in the declarative configuration. -func (b *APIServiceApplyConfiguration) GetNamespace() *string { - b.ensureObjectMetaApplyConfigurationExists() - return b.ObjectMetaApplyConfiguration.Namespace -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicecondition.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicecondition.go deleted file mode 100644 index e7255009b..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicecondition.go +++ /dev/null @@ -1,88 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" -) - -// APIServiceConditionApplyConfiguration represents a declarative configuration of the APIServiceCondition type for use -// with apply. -// -// APIServiceCondition describes the state of an APIService at a particular point -type APIServiceConditionApplyConfiguration struct { - // Type is the type of the condition. - Type *apiregistrationv1.APIServiceConditionType `json:"type,omitempty"` - // Status is the status of the condition. - // Can be True, False, Unknown. - Status *apiregistrationv1.ConditionStatus `json:"status,omitempty"` - // Last time the condition transitioned from one status to another. - LastTransitionTime *metav1.Time `json:"lastTransitionTime,omitempty"` - // Unique, one-word, CamelCase reason for the condition's last transition. - Reason *string `json:"reason,omitempty"` - // Human-readable message indicating details about last transition. - Message *string `json:"message,omitempty"` -} - -// APIServiceConditionApplyConfiguration constructs a declarative configuration of the APIServiceCondition type for use with -// apply. -func APIServiceCondition() *APIServiceConditionApplyConfiguration { - return &APIServiceConditionApplyConfiguration{} -} - -// WithType sets the Type field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Type field is set to the value of the last call. -func (b *APIServiceConditionApplyConfiguration) WithType(value apiregistrationv1.APIServiceConditionType) *APIServiceConditionApplyConfiguration { - b.Type = &value - return b -} - -// WithStatus sets the Status field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Status field is set to the value of the last call. -func (b *APIServiceConditionApplyConfiguration) WithStatus(value apiregistrationv1.ConditionStatus) *APIServiceConditionApplyConfiguration { - b.Status = &value - return b -} - -// WithLastTransitionTime sets the LastTransitionTime field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the LastTransitionTime field is set to the value of the last call. -func (b *APIServiceConditionApplyConfiguration) WithLastTransitionTime(value metav1.Time) *APIServiceConditionApplyConfiguration { - b.LastTransitionTime = &value - return b -} - -// WithReason sets the Reason field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Reason field is set to the value of the last call. -func (b *APIServiceConditionApplyConfiguration) WithReason(value string) *APIServiceConditionApplyConfiguration { - b.Reason = &value - return b -} - -// WithMessage sets the Message field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Message field is set to the value of the last call. -func (b *APIServiceConditionApplyConfiguration) WithMessage(value string) *APIServiceConditionApplyConfiguration { - b.Message = &value - return b -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicespec.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicespec.go deleted file mode 100644 index 074ff08f8..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicespec.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// APIServiceSpecApplyConfiguration represents a declarative configuration of the APIServiceSpec type for use -// with apply. -// -// APIServiceSpec contains information for locating and communicating with a server. -// Only https is supported, though you are able to disable certificate verification. -type APIServiceSpecApplyConfiguration struct { - // Service is a reference to the service for this API server. It must communicate - // on port 443. - // If the Service is nil, that means the handling for the API groupversion is handled locally on this server. - // The call will simply delegate to the normal handler chain to be fulfilled. - Service *ServiceReferenceApplyConfiguration `json:"service,omitempty"` - // Group is the API group name this server hosts - Group *string `json:"group,omitempty"` - // Version is the API version this server hosts. For example, "v1" - Version *string `json:"version,omitempty"` - // InsecureSkipTLSVerify disables TLS certificate verification when communicating with this server. - // This is strongly discouraged. You should use the CABundle instead. - InsecureSkipTLSVerify *bool `json:"insecureSkipTLSVerify,omitempty"` - // CABundle is a PEM encoded CA bundle which will be used to validate an API server's serving certificate. - // If unspecified, system trust roots on the apiserver are used. - CABundle []byte `json:"caBundle,omitempty"` - // GroupPriorityMinimum is the priority this group should have at least. Higher priority means that the group is preferred by clients over lower priority ones. - // Note that other versions of this group might specify even higher GroupPriorityMinimum values such that the whole group gets a higher priority. - // The primary sort is based on GroupPriorityMinimum, ordered highest number to lowest (20 before 10). - // The secondary sort is based on the alphabetical comparison of the name of the object. (v1.bar before v1.foo) - // We'd recommend something like: *.k8s.io (except extensions) at 18000 and - // PaaSes (OpenShift, Deis) are recommended to be in the 2000s - GroupPriorityMinimum *int32 `json:"groupPriorityMinimum,omitempty"` - // VersionPriority controls the ordering of this API version inside of its group. Must be greater than zero. - // The primary sort is based on VersionPriority, ordered highest to lowest (20 before 10). - // Since it's inside of a group, the number can be small, probably in the 10s. - // In case of equal version priorities, the version string will be used to compute the order inside a group. - // If the version string is "kube-like", it will sort above non "kube-like" version strings, which are ordered - // lexicographically. "Kube-like" versions start with a "v", then are followed by a number (the major version), - // then optionally the string "alpha" or "beta" and another number (the minor version). These are sorted first - // by GA > beta > alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major - // version, then minor version. An example sorted list of versions: - // v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. - VersionPriority *int32 `json:"versionPriority,omitempty"` -} - -// APIServiceSpecApplyConfiguration constructs a declarative configuration of the APIServiceSpec type for use with -// apply. -func APIServiceSpec() *APIServiceSpecApplyConfiguration { - return &APIServiceSpecApplyConfiguration{} -} - -// WithService sets the Service field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Service field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithService(value *ServiceReferenceApplyConfiguration) *APIServiceSpecApplyConfiguration { - b.Service = value - return b -} - -// WithGroup sets the Group field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Group field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithGroup(value string) *APIServiceSpecApplyConfiguration { - b.Group = &value - return b -} - -// WithVersion sets the Version field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Version field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithVersion(value string) *APIServiceSpecApplyConfiguration { - b.Version = &value - return b -} - -// WithInsecureSkipTLSVerify sets the InsecureSkipTLSVerify field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the InsecureSkipTLSVerify field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithInsecureSkipTLSVerify(value bool) *APIServiceSpecApplyConfiguration { - b.InsecureSkipTLSVerify = &value - return b -} - -// WithCABundle adds the given value to the CABundle field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the CABundle field. -func (b *APIServiceSpecApplyConfiguration) WithCABundle(values ...byte) *APIServiceSpecApplyConfiguration { - for i := range values { - b.CABundle = append(b.CABundle, values[i]) - } - return b -} - -// WithGroupPriorityMinimum sets the GroupPriorityMinimum field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the GroupPriorityMinimum field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithGroupPriorityMinimum(value int32) *APIServiceSpecApplyConfiguration { - b.GroupPriorityMinimum = &value - return b -} - -// WithVersionPriority sets the VersionPriority field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the VersionPriority field is set to the value of the last call. -func (b *APIServiceSpecApplyConfiguration) WithVersionPriority(value int32) *APIServiceSpecApplyConfiguration { - b.VersionPriority = &value - return b -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicestatus.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicestatus.go deleted file mode 100644 index 900e2834c..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/apiservicestatus.go +++ /dev/null @@ -1,47 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// APIServiceStatusApplyConfiguration represents a declarative configuration of the APIServiceStatus type for use -// with apply. -// -// APIServiceStatus contains derived information about an API server -type APIServiceStatusApplyConfiguration struct { - // Current service state of apiService. - Conditions []APIServiceConditionApplyConfiguration `json:"conditions,omitempty"` -} - -// APIServiceStatusApplyConfiguration constructs a declarative configuration of the APIServiceStatus type for use with -// apply. -func APIServiceStatus() *APIServiceStatusApplyConfiguration { - return &APIServiceStatusApplyConfiguration{} -} - -// WithConditions adds the given value to the Conditions field in the declarative configuration -// and returns the receiver, so that objects can be build by chaining "With" function invocations. -// If called multiple times, values provided by each call will be appended to the Conditions field. -func (b *APIServiceStatusApplyConfiguration) WithConditions(values ...*APIServiceConditionApplyConfiguration) *APIServiceStatusApplyConfiguration { - for i := range values { - if values[i] == nil { - panic("nil value passed to WithConditions") - } - b.Conditions = append(b.Conditions, *values[i]) - } - return b -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/servicereference.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/servicereference.go deleted file mode 100644 index 0b333f0cf..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1/servicereference.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package v1 - -// ServiceReferenceApplyConfiguration represents a declarative configuration of the ServiceReference type for use -// with apply. -// -// ServiceReference holds a reference to Service.legacy.k8s.io -type ServiceReferenceApplyConfiguration struct { - // Namespace is the namespace of the service - Namespace *string `json:"namespace,omitempty"` - // Name is the name of the service - Name *string `json:"name,omitempty"` - // If specified, the port on the service that hosting webhook. - // Default to 443 for backward compatibility. - // `port` should be a valid port number (1-65535, inclusive). - Port *int32 `json:"port,omitempty"` -} - -// ServiceReferenceApplyConfiguration constructs a declarative configuration of the ServiceReference type for use with -// apply. -func ServiceReference() *ServiceReferenceApplyConfiguration { - return &ServiceReferenceApplyConfiguration{} -} - -// WithNamespace sets the Namespace field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Namespace field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithNamespace(value string) *ServiceReferenceApplyConfiguration { - b.Namespace = &value - return b -} - -// WithName sets the Name field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Name field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithName(value string) *ServiceReferenceApplyConfiguration { - b.Name = &value - return b -} - -// WithPort sets the Port field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the Port field is set to the value of the last call. -func (b *ServiceReferenceApplyConfiguration) WithPort(value int32) *ServiceReferenceApplyConfiguration { - b.Port = &value - return b -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/internal/internal.go b/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/internal/internal.go deleted file mode 100644 index 5cde85e8d..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/applyconfiguration/internal/internal.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by applyconfiguration-gen. DO NOT EDIT. - -package internal - -import ( - fmt "fmt" - sync "sync" - - typed "sigs.k8s.io/structured-merge-diff/v6/typed" -) - -func Parser() *typed.Parser { - parserOnce.Do(func() { - var err error - parser, err = typed.NewParser(schemaYAML) - if err != nil { - panic(fmt.Sprintf("Failed to parse schema: %v", err)) - } - }) - return parser -} - -var parserOnce sync.Once -var parser *typed.Parser -var schemaYAML = typed.YAMLObject(`types: -- name: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - map: - fields: - - name: apiVersion - type: - scalar: string - - name: fieldsType - type: - scalar: string - - name: fieldsV1 - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.FieldsV1 - - name: manager - type: - scalar: string - - name: operation - type: - scalar: string - - name: subresource - type: - scalar: string - - name: time - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - map: - fields: - - name: annotations - type: - map: - elementType: - scalar: string - - name: creationTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: deletionGracePeriodSeconds - type: - scalar: numeric - - name: deletionTimestamp - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: finalizers - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: generateName - type: - scalar: string - - name: generation - type: - scalar: numeric - - name: labels - type: - map: - elementType: - scalar: string - - name: managedFields - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ManagedFieldsEntry - elementRelationship: atomic - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: ownerReferences - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - elementRelationship: associative - keys: - - uid - - name: resourceVersion - type: - scalar: string - - name: selfLink - type: - scalar: string - - name: uid - type: - scalar: string -- name: io.k8s.apimachinery.pkg.apis.meta.v1.OwnerReference - map: - fields: - - name: apiVersion - type: - scalar: string - default: "" - - name: blockOwnerDeletion - type: - scalar: boolean - - name: controller - type: - scalar: boolean - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - - name: uid - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.apimachinery.pkg.apis.meta.v1.Time - scalar: untyped -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIService - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec - default: {} - - name: status - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceStatus - default: {} -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceSpec - map: - fields: - - name: caBundle - type: - scalar: string - - name: group - type: - scalar: string - - name: groupPriorityMinimum - type: - scalar: numeric - default: 0 - - name: insecureSkipTLSVerify - type: - scalar: boolean - - name: service - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference - - name: version - type: - scalar: string - - name: versionPriority - type: - scalar: numeric - default: 0 -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.APIServiceCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1.ServiceReference - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: port - type: - scalar: numeric -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIService - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec - default: {} - - name: status - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus - default: {} -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceSpec - map: - fields: - - name: caBundle - type: - scalar: string - - name: group - type: - scalar: string - - name: groupPriorityMinimum - type: - scalar: numeric - default: 0 - - name: insecureSkipTLSVerify - type: - scalar: boolean - - name: service - type: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference - - name: version - type: - scalar: string - - name: versionPriority - type: - scalar: numeric - default: 0 -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.APIServiceCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.kube-aggregator.pkg.apis.apiregistration.v1beta1.ServiceReference - map: - fields: - - name: name - type: - scalar: string - - name: namespace - type: - scalar: string - - name: port - type: - scalar: numeric -- name: __untyped_atomic_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic -- name: __untyped_deduced_ - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -`) diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/doc.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/doc.go deleted file mode 100644 index 7dc375616..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/register.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/register.go deleted file mode 100644 index c60532dd7..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - apiregistrationv1beta1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - apiregistrationv1.AddToScheme, - apiregistrationv1beta1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go deleted file mode 100644 index 7e1e008fc..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiregistration_client.go +++ /dev/null @@ -1,101 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - http "net/http" - - rest "k8s.io/client-go/rest" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -) - -type ApiregistrationV1Interface interface { - RESTClient() rest.Interface - APIServicesGetter -} - -// ApiregistrationV1Client is used to interact with features provided by the apiregistration.k8s.io group. -type ApiregistrationV1Client struct { - restClient rest.Interface -} - -func (c *ApiregistrationV1Client) APIServices() APIServiceInterface { - return newAPIServices(c) -} - -// NewForConfig creates a new ApiregistrationV1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*ApiregistrationV1Client, error) { - config := *c - setConfigDefaults(&config) - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new ApiregistrationV1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*ApiregistrationV1Client, error) { - config := *c - setConfigDefaults(&config) - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &ApiregistrationV1Client{client}, nil -} - -// NewForConfigOrDie creates a new ApiregistrationV1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *ApiregistrationV1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new ApiregistrationV1Client for the given RESTClient. -func New(c rest.Interface) *ApiregistrationV1Client { - return &ApiregistrationV1Client{c} -} - -func setConfigDefaults(config *rest.Config) { - gv := apiregistrationv1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *ApiregistrationV1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go deleted file mode 100644 index dc48ba62a..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/apiservice.go +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -import ( - context "context" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - gentype "k8s.io/client-go/gentype" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" - applyconfigurationapiregistrationv1 "k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1" - scheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -) - -// APIServicesGetter has a method to return a APIServiceInterface. -// A group's client should implement this interface. -type APIServicesGetter interface { - APIServices() APIServiceInterface -} - -// APIServiceInterface has methods to work with APIService resources. -type APIServiceInterface interface { - Create(ctx context.Context, aPIService *apiregistrationv1.APIService, opts metav1.CreateOptions) (*apiregistrationv1.APIService, error) - Update(ctx context.Context, aPIService *apiregistrationv1.APIService, opts metav1.UpdateOptions) (*apiregistrationv1.APIService, error) - // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). - UpdateStatus(ctx context.Context, aPIService *apiregistrationv1.APIService, opts metav1.UpdateOptions) (*apiregistrationv1.APIService, error) - Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error - Get(ctx context.Context, name string, opts metav1.GetOptions) (*apiregistrationv1.APIService, error) - List(ctx context.Context, opts metav1.ListOptions) (*apiregistrationv1.APIServiceList, error) - Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *apiregistrationv1.APIService, err error) - Apply(ctx context.Context, aPIService *applyconfigurationapiregistrationv1.APIServiceApplyConfiguration, opts metav1.ApplyOptions) (result *apiregistrationv1.APIService, err error) - // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). - ApplyStatus(ctx context.Context, aPIService *applyconfigurationapiregistrationv1.APIServiceApplyConfiguration, opts metav1.ApplyOptions) (result *apiregistrationv1.APIService, err error) - APIServiceExpansion -} - -// aPIServices implements APIServiceInterface -type aPIServices struct { - *gentype.ClientWithListAndApply[*apiregistrationv1.APIService, *apiregistrationv1.APIServiceList, *applyconfigurationapiregistrationv1.APIServiceApplyConfiguration] -} - -// newAPIServices returns a APIServices -func newAPIServices(c *ApiregistrationV1Client) *aPIServices { - return &aPIServices{ - gentype.NewClientWithListAndApply[*apiregistrationv1.APIService, *apiregistrationv1.APIServiceList, *applyconfigurationapiregistrationv1.APIServiceApplyConfiguration]( - "apiservices", - c.RESTClient(), - scheme.ParameterCodec, - "", - func() *apiregistrationv1.APIService { return &apiregistrationv1.APIService{} }, - func() *apiregistrationv1.APIServiceList { return &apiregistrationv1.APIServiceList{} }, - gentype.PrefersProtobuf[*apiregistrationv1.APIService](), - ), - } -} diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/doc.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/doc.go deleted file mode 100644 index 3af5d054f..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1 diff --git a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/generated_expansion.go b/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/generated_expansion.go deleted file mode 100644 index 87aa18716..000000000 --- a/vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1 - -type APIServiceExpansion interface{} diff --git a/vendor/k8s.io/utils/internal/third_party/forked/golang/golang-lru/lru.go b/vendor/k8s.io/utils/internal/third_party/forked/golang/golang-lru/lru.go deleted file mode 100644 index f486aa643..000000000 --- a/vendor/k8s.io/utils/internal/third_party/forked/golang/golang-lru/lru.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright 2013 Google Inc. - -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 lru implements an LRU cache. -package golang_lru - -import "container/list" - -// Cache is an LRU cache. It is not safe for concurrent access. -type Cache struct { - // MaxEntries is the maximum number of cache entries before - // an item is evicted. Zero means no limit. - MaxEntries int - - // OnEvicted optionally specifies a callback function to be - // executed when an entry is purged from the cache. - OnEvicted func(key Key, value any) - - ll *list.List - cache map[any]*list.Element -} - -// A Key may be any value that is comparable. See http://golang.org/ref/spec#Comparison_operators -type Key any - -type entry struct { - key Key - value any -} - -// New creates a new Cache. -// If maxEntries is zero, the cache has no limit and it's assumed -// that eviction is done by the caller. -func New(maxEntries int) *Cache { - return &Cache{ - MaxEntries: maxEntries, - ll: list.New(), - cache: make(map[any]*list.Element), - } -} - -// Add adds a value to the cache. -func (c *Cache) Add(key Key, value any) { - if c.cache == nil { - c.cache = make(map[any]*list.Element) - c.ll = list.New() - } - if ee, ok := c.cache[key]; ok { - c.ll.MoveToFront(ee) - ee.Value.(*entry).value = value - return - } - ele := c.ll.PushFront(&entry{key, value}) - c.cache[key] = ele - if c.MaxEntries != 0 && c.ll.Len() > c.MaxEntries { - c.RemoveOldest() - } -} - -// Get looks up a key's value from the cache. -func (c *Cache) Get(key Key) (value any, ok bool) { - if c.cache == nil { - return - } - if ele, hit := c.cache[key]; hit { - c.ll.MoveToFront(ele) - return ele.Value.(*entry).value, true - } - return -} - -// Remove removes the provided key from the cache. -func (c *Cache) Remove(key Key) { - if c.cache == nil { - return - } - if ele, hit := c.cache[key]; hit { - c.removeElement(ele) - } -} - -// RemoveOldest removes the oldest item from the cache. -func (c *Cache) RemoveOldest() { - if c.cache == nil { - return - } - ele := c.ll.Back() - if ele != nil { - c.removeElement(ele) - } -} - -func (c *Cache) removeElement(e *list.Element) { - c.ll.Remove(e) - kv := e.Value.(*entry) - delete(c.cache, kv.key) - if c.OnEvicted != nil { - c.OnEvicted(kv.key, kv.value) - } -} - -// Len returns the number of items in the cache. -func (c *Cache) Len() int { - if c.cache == nil { - return 0 - } - return c.ll.Len() -} - -// Clear purges all stored items from the cache. -func (c *Cache) Clear() { - if c.OnEvicted != nil { - for _, e := range c.cache { - kv := e.Value.(*entry) - c.OnEvicted(kv.key, kv.value) - } - } - c.ll = nil - c.cache = nil -} diff --git a/vendor/k8s.io/utils/lru/lru.go b/vendor/k8s.io/utils/lru/lru.go deleted file mode 100644 index 4fad3f6dd..000000000 --- a/vendor/k8s.io/utils/lru/lru.go +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 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 lru - -import ( - "fmt" - "sync" - - groupcache "k8s.io/utils/internal/third_party/forked/golang/golang-lru" -) - -type Key = groupcache.Key -type EvictionFunc = func(key Key, value any) - -// Cache is a thread-safe fixed size LRU cache. -type Cache struct { - cache *groupcache.Cache - lock sync.RWMutex -} - -// New creates an LRU of the given size. -func New(size int) *Cache { - return &Cache{ - cache: groupcache.New(size), - } -} - -// NewWithEvictionFunc creates an LRU of the given size with the given eviction func. -func NewWithEvictionFunc(size int, f EvictionFunc) *Cache { - c := New(size) - c.cache.OnEvicted = f - return c -} - -// SetEvictionFunc updates the eviction func -func (c *Cache) SetEvictionFunc(f EvictionFunc) error { - c.lock.Lock() - defer c.lock.Unlock() - if c.cache.OnEvicted != nil { - return fmt.Errorf("lru cache eviction function is already set") - } - c.cache.OnEvicted = f - return nil -} - -// Add adds a value to the cache. -func (c *Cache) Add(key Key, value any) { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.Add(key, value) -} - -// Get looks up a key's value from the cache. -func (c *Cache) Get(key Key) (value any, ok bool) { - c.lock.Lock() - defer c.lock.Unlock() - return c.cache.Get(key) -} - -// Remove removes the provided key from the cache. -func (c *Cache) Remove(key Key) { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.Remove(key) -} - -// RemoveOldest removes the oldest item from the cache. -func (c *Cache) RemoveOldest() { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.RemoveOldest() -} - -// Len returns the number of items in the cache. -func (c *Cache) Len() int { - c.lock.RLock() - defer c.lock.RUnlock() - return c.cache.Len() -} - -// Clear purges all stored items from the cache. -func (c *Cache) Clear() { - c.lock.Lock() - defer c.lock.Unlock() - c.cache.Clear() -} diff --git a/vendor/modules.txt b/vendor/modules.txt index c6c6a6568..15f187b5c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -164,12 +164,6 @@ github.com/aws/aws-sdk-go/service/sso github.com/aws/aws-sdk-go/service/sso/ssoiface github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface -# github.com/beorn7/perks v1.0.1 -## explicit; go 1.11 -github.com/beorn7/perks/quantile -# github.com/blang/semver/v4 v4.0.0 -## explicit; go 1.14 -github.com/blang/semver/v4 # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 @@ -333,9 +327,6 @@ github.com/gophercloud/utils/v2/env github.com/gophercloud/utils/v2/gnocchi github.com/gophercloud/utils/v2/internal github.com/gophercloud/utils/v2/openstack/clientconfig -# github.com/imdario/mergo v0.3.16 -## explicit; go 1.13 -github.com/imdario/mergo # github.com/jmespath/go-jmespath v0.4.0 ## explicit; go 1.14 github.com/jmespath/go-jmespath @@ -402,82 +393,8 @@ github.com/onsi/gomega/matchers/support/goraph/util github.com/onsi/gomega/types # github.com/openshift/api v0.0.0-20260715165912-72066cc9718b ## explicit; go 1.26.0 -github.com/openshift/api -github.com/openshift/api/annotations -github.com/openshift/api/apiextensions -github.com/openshift/api/apiextensions/v1alpha1 -github.com/openshift/api/apiserver -github.com/openshift/api/apiserver/v1 -github.com/openshift/api/apps -github.com/openshift/api/apps/v1 -github.com/openshift/api/authorization -github.com/openshift/api/authorization/v1 -github.com/openshift/api/build -github.com/openshift/api/build/v1 -github.com/openshift/api/cloudnetwork github.com/openshift/api/cloudnetwork/v1 -github.com/openshift/api/config github.com/openshift/api/config/v1 -github.com/openshift/api/config/v1alpha1 -github.com/openshift/api/config/v1alpha2 -github.com/openshift/api/console -github.com/openshift/api/console/v1 -github.com/openshift/api/etcd -github.com/openshift/api/etcd/v1 -github.com/openshift/api/etcd/v1alpha1 -github.com/openshift/api/features -github.com/openshift/api/helm -github.com/openshift/api/helm/v1beta1 -github.com/openshift/api/image -github.com/openshift/api/image/docker10 -github.com/openshift/api/image/dockerpre012 -github.com/openshift/api/image/v1 -github.com/openshift/api/imageregistry -github.com/openshift/api/imageregistry/v1 -github.com/openshift/api/kubecontrolplane -github.com/openshift/api/kubecontrolplane/v1 -github.com/openshift/api/legacyconfig/v1 -github.com/openshift/api/machine -github.com/openshift/api/machine/v1 -github.com/openshift/api/machine/v1alpha1 -github.com/openshift/api/machine/v1beta1 -github.com/openshift/api/monitoring -github.com/openshift/api/monitoring/v1 -github.com/openshift/api/network -github.com/openshift/api/network/v1 -github.com/openshift/api/network/v1alpha1 -github.com/openshift/api/networkoperator -github.com/openshift/api/networkoperator/v1 -github.com/openshift/api/oauth -github.com/openshift/api/oauth/v1 -github.com/openshift/api/openshiftcontrolplane -github.com/openshift/api/openshiftcontrolplane/v1 -github.com/openshift/api/operator -github.com/openshift/api/operator/v1 -github.com/openshift/api/operator/v1alpha1 -github.com/openshift/api/operatorcontrolplane -github.com/openshift/api/operatorcontrolplane/v1alpha1 -github.com/openshift/api/osin -github.com/openshift/api/osin/v1 -github.com/openshift/api/pkg/serialization -github.com/openshift/api/project -github.com/openshift/api/project/v1 -github.com/openshift/api/quota -github.com/openshift/api/quota/v1 -github.com/openshift/api/route -github.com/openshift/api/route/v1 -github.com/openshift/api/samples -github.com/openshift/api/samples/v1 -github.com/openshift/api/security -github.com/openshift/api/security/v1 -github.com/openshift/api/servicecertsigner -github.com/openshift/api/servicecertsigner/v1alpha1 -github.com/openshift/api/sharedresource -github.com/openshift/api/sharedresource/v1alpha1 -github.com/openshift/api/template -github.com/openshift/api/template/v1 -github.com/openshift/api/user -github.com/openshift/api/user/v1 # github.com/openshift/client-go v0.0.0-20260715172546-dac61734e0ec ## explicit; go 1.26.0 github.com/openshift/client-go/cloudnetwork/applyconfigurations @@ -493,45 +410,6 @@ github.com/openshift/client-go/cloudnetwork/informers/externalversions/cloudnetw github.com/openshift/client-go/cloudnetwork/informers/externalversions/cloudnetwork/v1 github.com/openshift/client-go/cloudnetwork/informers/externalversions/internalinterfaces github.com/openshift/client-go/cloudnetwork/listers/cloudnetwork/v1 -github.com/openshift/client-go/config/applyconfigurations/config/v1 -github.com/openshift/client-go/config/applyconfigurations/config/v1alpha1 -github.com/openshift/client-go/config/applyconfigurations/config/v1alpha2 -github.com/openshift/client-go/config/applyconfigurations/internal -github.com/openshift/client-go/config/clientset/versioned -github.com/openshift/client-go/config/clientset/versioned/scheme -github.com/openshift/client-go/config/clientset/versioned/typed/config/v1 -github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha1 -github.com/openshift/client-go/config/clientset/versioned/typed/config/v1alpha2 -github.com/openshift/client-go/config/informers/externalversions -github.com/openshift/client-go/config/informers/externalversions/config -github.com/openshift/client-go/config/informers/externalversions/config/v1 -github.com/openshift/client-go/config/informers/externalversions/config/v1alpha1 -github.com/openshift/client-go/config/informers/externalversions/config/v1alpha2 -github.com/openshift/client-go/config/informers/externalversions/internalinterfaces -github.com/openshift/client-go/config/listers/config/v1 -github.com/openshift/client-go/config/listers/config/v1alpha1 -github.com/openshift/client-go/config/listers/config/v1alpha2 -github.com/openshift/client-go/operator/applyconfigurations/internal -github.com/openshift/client-go/operator/applyconfigurations/operator/v1 -# github.com/openshift/library-go v0.0.0-20260716164659-7926d144f96a -## explicit; go 1.26.0 -github.com/openshift/library-go/pkg/apiserver/jsonpatch -github.com/openshift/library-go/pkg/certs -github.com/openshift/library-go/pkg/controller/factory -github.com/openshift/library-go/pkg/crypto -github.com/openshift/library-go/pkg/operator/certrotation -github.com/openshift/library-go/pkg/operator/condition -github.com/openshift/library-go/pkg/operator/configobserver -github.com/openshift/library-go/pkg/operator/configobserver/featuregates -github.com/openshift/library-go/pkg/operator/events -github.com/openshift/library-go/pkg/operator/management -github.com/openshift/library-go/pkg/operator/resource/resourceapply -github.com/openshift/library-go/pkg/operator/resource/resourcehelper -github.com/openshift/library-go/pkg/operator/resource/resourcemerge -github.com/openshift/library-go/pkg/operator/resource/resourceread -github.com/openshift/library-go/pkg/operator/resourcesynccontroller -github.com/openshift/library-go/pkg/operator/v1helpers -github.com/openshift/library-go/pkg/pki # github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c ## explicit; go 1.14 github.com/pkg/browser @@ -541,30 +419,10 @@ github.com/pkg/errors # github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 ## explicit github.com/pmezard/go-difflib/difflib -# github.com/prometheus/client_golang v1.23.2 -## explicit; go 1.23.0 -github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil -github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil/header -github.com/prometheus/client_golang/prometheus -github.com/prometheus/client_golang/prometheus/collectors -github.com/prometheus/client_golang/prometheus/internal -github.com/prometheus/client_golang/prometheus/promhttp -github.com/prometheus/client_golang/prometheus/promhttp/internal -# github.com/prometheus/client_model v0.6.2 -## explicit; go 1.22.0 -github.com/prometheus/client_model/go # github.com/prometheus/common v0.70.0 ## explicit; go 1.25.0 -github.com/prometheus/common/expfmt -github.com/prometheus/common/model # github.com/prometheus/procfs v0.21.1 ## explicit; go 1.25.0 -github.com/prometheus/procfs -github.com/prometheus/procfs/internal/fs -github.com/prometheus/procfs/internal/util -# github.com/robfig/cron v1.2.0 -## explicit -github.com/robfig/cron # github.com/spf13/pflag v1.0.10 ## explicit; go 1.12 github.com/spf13/pflag @@ -774,7 +632,6 @@ google.golang.org/grpc/status google.golang.org/grpc/tap # google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af ## explicit; go 1.23 -google.golang.org/protobuf/encoding/protodelim google.golang.org/protobuf/encoding/protojson google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire @@ -826,8 +683,6 @@ gopkg.in/yaml.v2 gopkg.in/yaml.v3 # k8s.io/api v0.36.2 ## explicit; go 1.26.0 -k8s.io/api/admission/v1 -k8s.io/api/admission/v1beta1 k8s.io/api/admissionregistration/v1 k8s.io/api/admissionregistration/v1alpha1 k8s.io/api/admissionregistration/v1beta1 @@ -886,15 +741,6 @@ k8s.io/api/storage/v1beta1 k8s.io/api/storagemigration/v1beta1 # k8s.io/apiextensions-apiserver v0.36.2 ## explicit; go 1.26.0 -k8s.io/apiextensions-apiserver/pkg/apis/apiextensions -k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1 -k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1 -k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1 -k8s.io/apiextensions-apiserver/pkg/client/applyconfiguration/apiextensions/v1beta1 -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/scheme -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1 -k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/typed/apiextensions/v1beta1 # k8s.io/apimachinery v0.36.2 ## explicit; go 1.26.0 k8s.io/apimachinery/pkg/api/equality @@ -943,11 +789,9 @@ k8s.io/apimachinery/pkg/util/managedfields/internal k8s.io/apimachinery/pkg/util/mergepatch k8s.io/apimachinery/pkg/util/naming k8s.io/apimachinery/pkg/util/net -k8s.io/apimachinery/pkg/util/rand k8s.io/apimachinery/pkg/util/runtime k8s.io/apimachinery/pkg/util/sets k8s.io/apimachinery/pkg/util/strategicpatch -k8s.io/apimachinery/pkg/util/uuid k8s.io/apimachinery/pkg/util/validation k8s.io/apimachinery/pkg/util/validation/field k8s.io/apimachinery/pkg/util/version @@ -957,9 +801,6 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect -# k8s.io/apiserver v0.36.2 -## explicit; go 1.26.0 -k8s.io/apiserver/pkg/authentication/user # k8s.io/client-go v0.36.2 ## explicit; go 1.26.0 k8s.io/client-go/applyconfigurations @@ -1267,13 +1108,10 @@ k8s.io/client-go/tools/clientcmd k8s.io/client-go/tools/clientcmd/api k8s.io/client-go/tools/clientcmd/api/latest k8s.io/client-go/tools/clientcmd/api/v1 -k8s.io/client-go/tools/internal/events k8s.io/client-go/tools/leaderelection k8s.io/client-go/tools/leaderelection/resourcelock k8s.io/client-go/tools/metrics k8s.io/client-go/tools/pager -k8s.io/client-go/tools/record -k8s.io/client-go/tools/record/util k8s.io/client-go/tools/reference k8s.io/client-go/transport k8s.io/client-go/util/apply @@ -1289,14 +1127,6 @@ k8s.io/client-go/util/workqueue # k8s.io/cloud-provider v0.36.2 ## explicit; go 1.26.0 k8s.io/cloud-provider/api -# k8s.io/component-base v0.36.2 -## explicit; go 1.26.0 -k8s.io/component-base/metrics -k8s.io/component-base/metrics/api/v1 -k8s.io/component-base/metrics/internal -k8s.io/component-base/metrics/legacyregistry -k8s.io/component-base/metrics/prometheusextension -k8s.io/component-base/version # k8s.io/klog/v2 v2.140.0 ## explicit; go 1.21 k8s.io/klog/v2 @@ -1308,15 +1138,6 @@ k8s.io/klog/v2/internal/severity k8s.io/klog/v2/internal/sloghandler k8s.io/klog/v2/internal/verbosity k8s.io/klog/v2/textlogger -# k8s.io/kube-aggregator v0.36.2 -## explicit; go 1.26.0 -k8s.io/kube-aggregator/pkg/apis/apiregistration -k8s.io/kube-aggregator/pkg/apis/apiregistration/v1 -k8s.io/kube-aggregator/pkg/apis/apiregistration/v1beta1 -k8s.io/kube-aggregator/pkg/client/applyconfiguration/apiregistration/v1 -k8s.io/kube-aggregator/pkg/client/applyconfiguration/internal -k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme -k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/typed/apiregistration/v1 # k8s.io/kube-openapi v0.0.0-20260718133925-74c0ba7c0470 ## explicit; go 1.24.0 k8s.io/kube-openapi/pkg/cached @@ -1339,9 +1160,7 @@ k8s.io/kube-openapi/pkg/validation/spec k8s.io/utils/buffer k8s.io/utils/clock k8s.io/utils/dump -k8s.io/utils/internal/third_party/forked/golang/golang-lru k8s.io/utils/internal/third_party/forked/golang/net -k8s.io/utils/lru k8s.io/utils/net k8s.io/utils/ptr k8s.io/utils/trace @@ -1355,12 +1174,6 @@ sigs.k8s.io/controller-runtime/pkg/log ## explicit; go 1.23 sigs.k8s.io/json sigs.k8s.io/json/internal/golang/encoding/json -# sigs.k8s.io/kube-storage-version-migrator v0.0.6-0.20230721195810-5c8923c5ff96 -## explicit; go 1.20 -sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1 -sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset -sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme -sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1 # sigs.k8s.io/randfill v1.0.0 ## explicit; go 1.18 sigs.k8s.io/randfill diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/LICENSE b/vendor/sigs.k8s.io/kube-storage-version-migrator/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - 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/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/doc.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/doc.go deleted file mode 100644 index da6d19a24..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2018 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. -*/ - -// +k8s:deepcopy-gen=package - -// +groupName=migration.k8s.io -package v1alpha1 diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/register.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/register.go deleted file mode 100644 index f400f747e..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/register.go +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2017 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 v1alpha1 - -import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" - "k8s.io/apimachinery/pkg/runtime/schema" -) - -// GroupName is the group name use in this package -const GroupName = "migration.k8s.io" - -// SchemeGroupVersion is group version used to register these objects -var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"} - -// Resource takes an unqualified resource and returns a Group qualified GroupResource -func Resource(resource string) schema.GroupResource { - return SchemeGroupVersion.WithResource(resource).GroupResource() -} - -var ( - // TODO: move SchemeBuilder with zz_generated.deepcopy.go to k8s.io/api. - // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - localSchemeBuilder = &SchemeBuilder - AddToScheme = localSchemeBuilder.AddToScheme -) - -// Adds the list of known types to the given scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - scheme.AddKnownTypes(SchemeGroupVersion, - &StorageVersionMigration{}, - &StorageVersionMigrationList{}, - &StorageState{}, - &StorageStateList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/types.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/types.go deleted file mode 100644 index 427350b1e..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/types.go +++ /dev/null @@ -1,186 +0,0 @@ -/* -Copyright 2018 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 v1alpha1 - -import ( - corev1 "k8s.io/api/core/v1" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" -) - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient:nonNamespaced - -// StorageVersionMigration represents a migration of stored data to the latest -// storage version. -type StorageVersionMigration struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the migration. - // +optional - Spec StorageVersionMigrationSpec `json:"spec,omitempty"` - // Status of the migration. - // +optional - Status StorageVersionMigrationStatus `json:"status,omitempty"` -} - -// The names of the group, the version, and the resource. -type GroupVersionResource struct { - // The name of the group. - Group string `json:"group,omitempty"` - // The name of the version. - Version string `json:"version,omitempty"` - // The name of the resource. - Resource string `json:"resource,omitempty"` -} - -// Spec of the storage version migration. -type StorageVersionMigrationSpec struct { - // The resource that is being migrated. The migrator sends requests to - // the endpoint serving the resource. - // Immutable. - Resource GroupVersionResource `json:"resource"` - // The token used in the list options to get the next chunk of objects - // to migrate. When the .status.conditions indicates the migration is - // "Running", users can use this token to check the progress of the - // migration. - // +optional - ContinueToken string `json:"continueToken,omitempty"` - // TODO: consider recording the storage version hash when the migration - // is created. It can avoid races. -} - -type MigrationConditionType string - -const ( - // Indicates that the migration is running. - MigrationRunning MigrationConditionType = "Running" - // Indicates that the migration has completed successfully. - MigrationSucceeded MigrationConditionType = "Succeeded" - // Indicates that the migration has failed. - MigrationFailed MigrationConditionType = "Failed" -) - -// Describes the state of a migration at a certain point. -type MigrationCondition struct { - // Type of the condition. - Type MigrationConditionType `json:"type"` - // Status of the condition, one of True, False, Unknown. - Status corev1.ConditionStatus `json:"status"` - // The last time this condition was updated. - // +optional - LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` - // The reason for the condition's last transition. - // +optional - Reason string `json:"reason,omitempty"` - // A human readable message indicating details about the transition. - // +optional - Message string `json:"message,omitempty"` -} - -// Status of the storage version migration. -type StorageVersionMigrationStatus struct { - // The latest available observations of the migration's current state. - // +optional - // +patchMergeKey=type - // +patchStrategy=merge - Conditions []MigrationCondition `json:"conditions,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// StorageVersionMigrationList is a collection of storage version migrations. -type StorageVersionMigrationList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty"` - // Items is the list of StorageVersionMigration - Items []StorageVersionMigration `json:"items"` -} - -// +genclient -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object -// +genclient:nonNamespaced - -// The state of the storage of a specific resource. -type StorageState struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ObjectMeta `json:"metadata,omitempty"` - // Specification of the storage state. - // +optional - Spec StorageStateSpec `json:"spec,omitempty"` - // Status of the storage state. - // +optional - Status StorageStateStatus `json:"status,omitempty"` -} - -// The names of the group and the resource. -type GroupResource struct { - // The name of the group. - Group string `json:"group,omitempty"` - // The name of the resource. - Resource string `json:"resource,omitempty"` -} - -// Specification of the storage state. -type StorageStateSpec struct { - // The resource this storageState is about. - Resource GroupResource `json:"resource,omitempty"` -} - -// Unknown is a valid value in persistedStorageVersionHashes. -const Unknown = "Unknown" - -// Status of the storage state. -type StorageStateStatus struct { - // The hash values of storage versions that persisted instances of - // spec.resource might still be encoded in. - // "Unknown" is a valid value in the list, and is the default value. - // It is not safe to upgrade or downgrade to an apiserver binary that does not - // support all versions listed in this field, or if "Unknown" is listed. - // Once the storage version migration for this resource has completed, the - // value of this field is refined to only contain the - // currentStorageVersionHash. - // Once the apiserver has changed the storage version, the new storage version - // is appended to the list. - // +optional - PersistedStorageVersionHashes []string `json:"persistedStorageVersionHashes,omitempty"` - // The hash value of the current storage version, as shown in the discovery - // document served by the API server. - // Storage Version is the version to which objects are converted to - // before persisted. - // +optional - CurrentStorageVersionHash string `json:"currentStorageVersionHash,omitempty"` - // LastHeartbeatTime is the last time the storage migration triggering - // controller checks the storage version hash of this resource in the - // discovery document and updates this field. - // +optional - LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime,omitempty"` -} - -// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object - -// StorageStateList is a collection of storage state. -type StorageStateList struct { - metav1.TypeMeta `json:",inline"` - // +optional - metav1.ListMeta `json:"metadata,omitempty"` - // Items is the list of StorageState - Items []StorageState `json:"items"` -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/zz_generated.deepcopy.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index da9613aef..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,276 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -/* -Copyright 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. -*/ - -// Code generated by deepcopy-gen. DO NOT EDIT. - -package v1alpha1 - -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 *GroupResource) DeepCopyInto(out *GroupResource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupResource. -func (in *GroupResource) DeepCopy() *GroupResource { - if in == nil { - return nil - } - out := new(GroupResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupVersionResource) DeepCopyInto(out *GroupVersionResource) { - *out = *in - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionResource. -func (in *GroupVersionResource) DeepCopy() *GroupVersionResource { - if in == nil { - return nil - } - out := new(GroupVersionResource) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MigrationCondition) DeepCopyInto(out *MigrationCondition) { - *out = *in - in.LastUpdateTime.DeepCopyInto(&out.LastUpdateTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MigrationCondition. -func (in *MigrationCondition) DeepCopy() *MigrationCondition { - if in == nil { - return nil - } - out := new(MigrationCondition) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageState) DeepCopyInto(out *StorageState) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageState. -func (in *StorageState) DeepCopy() *StorageState { - if in == nil { - return nil - } - out := new(StorageState) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageState) 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 *StorageStateList) DeepCopyInto(out *StorageStateList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]StorageState, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStateList. -func (in *StorageStateList) DeepCopy() *StorageStateList { - if in == nil { - return nil - } - out := new(StorageStateList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageStateList) 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 *StorageStateSpec) DeepCopyInto(out *StorageStateSpec) { - *out = *in - out.Resource = in.Resource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStateSpec. -func (in *StorageStateSpec) DeepCopy() *StorageStateSpec { - if in == nil { - return nil - } - out := new(StorageStateSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageStateStatus) DeepCopyInto(out *StorageStateStatus) { - *out = *in - if in.PersistedStorageVersionHashes != nil { - in, out := &in.PersistedStorageVersionHashes, &out.PersistedStorageVersionHashes - *out = make([]string, len(*in)) - copy(*out, *in) - } - in.LastHeartbeatTime.DeepCopyInto(&out.LastHeartbeatTime) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageStateStatus. -func (in *StorageStateStatus) DeepCopy() *StorageStateStatus { - if in == nil { - return nil - } - out := new(StorageStateStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageVersionMigration) DeepCopyInto(out *StorageVersionMigration) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigration. -func (in *StorageVersionMigration) DeepCopy() *StorageVersionMigration { - if in == nil { - return nil - } - out := new(StorageVersionMigration) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageVersionMigration) 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 *StorageVersionMigrationList) DeepCopyInto(out *StorageVersionMigrationList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]StorageVersionMigration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationList. -func (in *StorageVersionMigrationList) DeepCopy() *StorageVersionMigrationList { - if in == nil { - return nil - } - out := new(StorageVersionMigrationList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageVersionMigrationList) 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 *StorageVersionMigrationSpec) DeepCopyInto(out *StorageVersionMigrationSpec) { - *out = *in - out.Resource = in.Resource - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationSpec. -func (in *StorageVersionMigrationSpec) DeepCopy() *StorageVersionMigrationSpec { - if in == nil { - return nil - } - out := new(StorageVersionMigrationSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageVersionMigrationStatus) DeepCopyInto(out *StorageVersionMigrationStatus) { - *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]MigrationCondition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageVersionMigrationStatus. -func (in *StorageVersionMigrationStatus) DeepCopy() *StorageVersionMigrationStatus { - if in == nil { - return nil - } - out := new(StorageVersionMigrationStatus) - in.DeepCopyInto(out) - return out -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/clientset.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/clientset.go deleted file mode 100644 index c92124b7a..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/clientset.go +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package clientset - -import ( - "fmt" - "net/http" - - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - MigrationV1alpha1() migrationv1alpha1.MigrationV1alpha1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - migrationV1alpha1 *migrationv1alpha1.MigrationV1alpha1Client -} - -// MigrationV1alpha1 retrieves the MigrationV1alpha1Client -func (c *Clientset) MigrationV1alpha1() migrationv1alpha1.MigrationV1alpha1Interface { - return c.migrationV1alpha1 -} - -// 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. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.migrationV1alpha1, err = migrationv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - 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 { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.migrationV1alpha1 = migrationv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/doc.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/doc.go deleted file mode 100644 index ee865e56d..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated clientset. -package clientset diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/doc.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/doc.go deleted file mode 100644 index 7dc375616..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/register.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/register.go deleted file mode 100644 index 32bd297c5..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme/register.go +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - 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" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" - migrationv1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - migrationv1alpha1.AddToScheme, -} - -// 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. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/doc.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/doc.go deleted file mode 100644 index df51baa4d..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/generated_expansion.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/generated_expansion.go deleted file mode 100644 index 3ce4f5753..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type StorageStateExpansion interface{} - -type StorageVersionMigrationExpansion interface{} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/migration_client.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/migration_client.go deleted file mode 100644 index 9deb423ce..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/migration_client.go +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - rest "k8s.io/client-go/rest" - v1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme" -) - -type MigrationV1alpha1Interface interface { - RESTClient() rest.Interface - StorageStatesGetter - StorageVersionMigrationsGetter -} - -// MigrationV1alpha1Client is used to interact with features provided by the migration.k8s.io group. -type MigrationV1alpha1Client struct { - restClient rest.Interface -} - -func (c *MigrationV1alpha1Client) StorageStates() StorageStateInterface { - return newStorageStates(c) -} - -func (c *MigrationV1alpha1Client) StorageVersionMigrations() StorageVersionMigrationInterface { - return newStorageVersionMigrations(c) -} - -// NewForConfig creates a new MigrationV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*MigrationV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new MigrationV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*MigrationV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &MigrationV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new MigrationV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *MigrationV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new MigrationV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *MigrationV1alpha1Client { - return &MigrationV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - 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 *MigrationV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storagestate.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storagestate.go deleted file mode 100644 index 8345b3619..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storagestate.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - 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" - v1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - scheme "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme" -) - -// StorageStatesGetter has a method to return a StorageStateInterface. -// A group's client should implement this interface. -type StorageStatesGetter interface { - StorageStates() StorageStateInterface -} - -// StorageStateInterface has methods to work with StorageState resources. -type StorageStateInterface interface { - Create(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.CreateOptions) (*v1alpha1.StorageState, error) - Update(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.UpdateOptions) (*v1alpha1.StorageState, error) - UpdateStatus(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.UpdateOptions) (*v1alpha1.StorageState, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StorageState, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageStateList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageState, err error) - StorageStateExpansion -} - -// storageStates implements StorageStateInterface -type storageStates struct { - client rest.Interface -} - -// newStorageStates returns a StorageStates -func newStorageStates(c *MigrationV1alpha1Client) *storageStates { - return &storageStates{ - client: c.RESTClient(), - } -} - -// Get takes name of the storageState, and returns the corresponding storageState object, and an error if there is any. -func (c *storageStates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageState, err error) { - result = &v1alpha1.StorageState{} - err = c.client.Get(). - Resource("storagestates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of StorageStates that match those selectors. -func (c *storageStates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageStateList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.StorageStateList{} - err = c.client.Get(). - Resource("storagestates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested storageStates. -func (c *storageStates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("storagestates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a storageState and creates it. Returns the server's representation of the storageState, and an error, if there is any. -func (c *storageStates) Create(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.CreateOptions) (result *v1alpha1.StorageState, err error) { - result = &v1alpha1.StorageState{} - err = c.client.Post(). - Resource("storagestates"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageState). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a storageState and updates it. Returns the server's representation of the storageState, and an error, if there is any. -func (c *storageStates) Update(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.UpdateOptions) (result *v1alpha1.StorageState, err error) { - result = &v1alpha1.StorageState{} - err = c.client.Put(). - Resource("storagestates"). - Name(storageState.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageState). - Do(ctx). - 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 *storageStates) UpdateStatus(ctx context.Context, storageState *v1alpha1.StorageState, opts v1.UpdateOptions) (result *v1alpha1.StorageState, err error) { - result = &v1alpha1.StorageState{} - err = c.client.Put(). - Resource("storagestates"). - Name(storageState.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageState). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the storageState and deletes it. Returns an error if one occurs. -func (c *storageStates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("storagestates"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *storageStates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("storagestates"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched storageState. -func (c *storageStates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageState, err error) { - result = &v1alpha1.StorageState{} - err = c.client.Patch(pt). - Resource("storagestates"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storageversionmigration.go b/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storageversionmigration.go deleted file mode 100644 index 34fa3a987..000000000 --- a/vendor/sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/typed/migration/v1alpha1/storageversionmigration.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - 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" - v1alpha1 "sigs.k8s.io/kube-storage-version-migrator/pkg/apis/migration/v1alpha1" - scheme "sigs.k8s.io/kube-storage-version-migrator/pkg/clients/clientset/scheme" -) - -// StorageVersionMigrationsGetter has a method to return a StorageVersionMigrationInterface. -// A group's client should implement this interface. -type StorageVersionMigrationsGetter interface { - StorageVersionMigrations() StorageVersionMigrationInterface -} - -// StorageVersionMigrationInterface has methods to work with StorageVersionMigration resources. -type StorageVersionMigrationInterface interface { - Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (*v1alpha1.StorageVersionMigration, error) - Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) - UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (*v1alpha1.StorageVersionMigration, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.StorageVersionMigration, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.StorageVersionMigrationList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) - StorageVersionMigrationExpansion -} - -// storageVersionMigrations implements StorageVersionMigrationInterface -type storageVersionMigrations struct { - client rest.Interface -} - -// newStorageVersionMigrations returns a StorageVersionMigrations -func newStorageVersionMigrations(c *MigrationV1alpha1Client) *storageVersionMigrations { - return &storageVersionMigrations{ - client: c.RESTClient(), - } -} - -// Get takes name of the storageVersionMigration, and returns the corresponding storageVersionMigration object, and an error if there is any. -func (c *storageVersionMigrations) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.StorageVersionMigration, err error) { - result = &v1alpha1.StorageVersionMigration{} - err = c.client.Get(). - Resource("storageversionmigrations"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of StorageVersionMigrations that match those selectors. -func (c *storageVersionMigrations) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.StorageVersionMigrationList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.StorageVersionMigrationList{} - err = c.client.Get(). - Resource("storageversionmigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested storageVersionMigrations. -func (c *storageVersionMigrations) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Resource("storageversionmigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a storageVersionMigration and creates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. -func (c *storageVersionMigrations) Create(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.CreateOptions) (result *v1alpha1.StorageVersionMigration, err error) { - result = &v1alpha1.StorageVersionMigration{} - err = c.client.Post(). - Resource("storageversionmigrations"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageVersionMigration). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a storageVersionMigration and updates it. Returns the server's representation of the storageVersionMigration, and an error, if there is any. -func (c *storageVersionMigrations) Update(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { - result = &v1alpha1.StorageVersionMigration{} - err = c.client.Put(). - Resource("storageversionmigrations"). - Name(storageVersionMigration.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageVersionMigration). - Do(ctx). - 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 *storageVersionMigrations) UpdateStatus(ctx context.Context, storageVersionMigration *v1alpha1.StorageVersionMigration, opts v1.UpdateOptions) (result *v1alpha1.StorageVersionMigration, err error) { - result = &v1alpha1.StorageVersionMigration{} - err = c.client.Put(). - Resource("storageversionmigrations"). - Name(storageVersionMigration.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(storageVersionMigration). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the storageVersionMigration and deletes it. Returns an error if one occurs. -func (c *storageVersionMigrations) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Resource("storageversionmigrations"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *storageVersionMigrations) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Resource("storageversionmigrations"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched storageVersionMigration. -func (c *storageVersionMigrations) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.StorageVersionMigration, err error) { - result = &v1alpha1.StorageVersionMigration{} - err = c.client.Patch(pt). - Resource("storageversionmigrations"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -}